-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.php
163 lines (146 loc) · 5.13 KB
/
list.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<?php
/* bootstrap */
namespace App;
require __DIR__.'/./vendor/autoload.php';
require './classes/boot.php';
require './classes/Student.php';
require './classes/Faculty.php';
require_once './config.php';
if(isset($_POST['password'])&&$_POST['password']==$password){
$logged = true;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="C-SCAN'16" />
<meta property="og:site_name" content="cscan.org.in"/>
<meta property="og:url" content="http://cscan.org.in"/>
<meta property="og:description" content="C-SCAN 2016, the first of it's kind, is a conference aimed at bringing in student-teacher fraternity of CS Departments of reputed NIT's across the nation under a single umbrella for exchange of ideas spark innovation." />
<meta property="og:image" content="http://athena.nitc.ac.in/anas_b130705cs/cscan/logo.png">
<title>C-SCAN'16</title>
<link href="./css/styles.css" rel="stylesheet">
<link rel="icon" href="./logo.png" type="image/png">
<link rel="shortcut icon" href="./logo.png" type="image/png">
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/dynamics.min.js"></script>
</head>
<body>
<?php
if(isset($logged)&&$logged){
?>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h2>Student Reg</h2>
<table class="table">
<thead>
<tr>
<td>No</td>
<td>RegId</td>
<td>College</td>
<td>Faculty</td>
<td>Name</td>
<td>Email</td>
<td>Phone</td>
<td>Course</td>
<td>Semester</td>
<td>Gender</td>
<td>Food</td>
</tr>
</thead>
<tbody>
<?php
$s = Student::with('colg')->orderBy('college', 'asc')->get();
foreach ($s as $key => $student) {
$regid = $student->colg->abbr."S".str_pad($student->regid, 3, '0', STR_PAD_LEFT);
?>
<tr>
<td><?=$key+1?></td>
<td><?=$regid?></td>
<td><?=$student->colg->name?></td>
<td><?=$student->faculty?></td>
<td><?=$student->name?></td>
<td><?=$student->email?></td>
<td><?=$student->phone?></td>
<td><?=$student->course?></td>
<td><?=$student->semester?></td>
<td><?=$student->gender?></td>
<td><?=$student->food?></td>
<?php
}
?>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2>Faculty Reg</h2>
<table class="table">
<thead>
<tr>
<td>No</td>
<td>Reg ID</td>
<td>College</td>
<td>Name</td>
<td>Email</td>
<td>Phone</td>
<td>Designation</td>
<td>Interest</td>
<td>Gender</td>
<td>Food</td>
</tr>
</thead>
<tbody>
<?php
$s = Faculty::with('colg')->orderBy('college', 'asc')->get();
foreach ($s as $key => $student) {
$regid = $student->colg->abbr."F".str_pad($student->regid, 3, '0', STR_PAD_LEFT);
?>
<tr>
<td><?=$key+1?></td>
<td><?=$regid?></td>
<td><?=$student->colg->name?></td>
<td><?=$student->name?></td>
<td><?=$student->email?></td>
<td><?=$student->phone?></td>
<td><?=$student->designation?></td>
<td><?=$student->interest?></td>
<td><?=$student->gender?></td>
<td><?=$student->food?></td>
<?php
}
?>
</tbody>
</table>
<a class="btn btn-danger" href="javascript:window.print()">Print</a>
</div>
</div>
</div>
<?php
}else{
?>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<form action="" method="POST">
<h2>Password Please</h2>
<div class="form-group">
<input type="password" name="password" class="form-control" value="" required>
</div>
<div class="form-group">
<input type="submit" class="btn btn-default" value="Authenticate">
</div>
</form
</div>
</div>
</div>
<?php
}
?>
</body>