-
Notifications
You must be signed in to change notification settings - Fork 0
/
tea_view_att.php
289 lines (214 loc) · 10.5 KB
/
tea_view_att.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<?php
session_start();
include('dbconfig.php');
error_reporting(1);
$user= $_SESSION['faculty_login'];
if($user=="")
{header('location:home2.php');}
$sql=mysqli_query($conn,"select * from faculty where email='$user' ");
$users=mysqli_fetch_assoc($sql);
$cc = $users['course_code'];
$select_query = "select stud_id,count(stud_id) as count from attendance where course_id = '$cc' and status = 'Present' group by stud_id";
$select_query_result = mysqli_query($conn, $select_query) or die(mysqli_error($conn));
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/png" href="assets/img/favicon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>STIP</title>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />
<meta name="viewport" content="width=device-width" />
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet" />
<!-- Animation library for notifications -->
<link href="assets/css/animate.min.css" rel="stylesheet" />
<!-- Light Bootstrap Table core CSS -->
<link href="assets/css/light-bootstrap-dashboard.css?v=1.4.0" rel="stylesheet" />
<!-- CSS for Demo Purpose, don't include it in your project -->
<link href="assets/css/demo.css" rel="stylesheet" />
<!-- Fonts and icons -->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'>
<link href="assets/css/pe-icon-7-stroke.css" rel="stylesheet" />
<style>
.main-panel{
background-image: url('assets/img/image7.jpg');
background-size: cover;
background-repeat: no-repeat;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="sidebar" data-color="purple" data-image="assets/img/sidebar-5.jpg">
<div class="sidebar-wrapper">
<div class="logo">
<a href="#" class="simple-text">
Hello <?php echo $users['Name'];?>
</a>
<br>
<img src="images/f1.jpeg" style="width:200px;height:180px;border-radius:50%">
</div>
<ul class="nav">
<li class="active">
<a href="faculty/index.php">
<i class="pe-7s-graph"></i>
<p>Dashboard</p>
</a>
</li>
<li>
<a href="faculty/Update_profile1.php">
<i class="pe-7s-user"></i>
<p>View/Edit Profile</p>
</a>
</li>
<li>
<a href="tea_co_reg.php">
<i class="pe-7s-news-paper"></i>
<p> Approve Courses </p>
</a>
</li>
<li>
<a href="tea_atte.php">
<i class="pe-7s-id"></i>
<p> Give Attendance </p>
</a>
</li>
<li>
<a href="tea_view_att.php">
<i class="pe-7s-look"></i>
<p> View Attendance </p>
</a>
</li>
<li>
<a href="faculty/Forum1.php">
<i class="pe-7s-notebook"></i>
<p>Q-A forum </p>
</a>
</li>
<li>
<a href="faculty/Upload.php">
<i class="pe-7s-upload"></i>
<p>Upload Study Material/Assignment </p>
</a>
</li>
<li>
<a href="faculty/view1.php">
<i class="pe-7s-look"></i>
<p> View Assignment submissions</p>
</a>
</li>
<li>
<a href="faculty/Feedback1.php">
<i class="pe-7s-like2"></i>
<p>View Feedback</p>
</a>
</li>
</ul>
</div>
</div>
<div class="main-panel">
<nav class="navbar navbar-inverse navbar-fixed">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navigation-example-2">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Dashboard</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-left">
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-dashboard"></i>
<p class="hidden-lg hidden-md">Dashboard</p>
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="faculty/logout.php">
<p>Log out</p>
</a>
</li>
<li class="separator hidden-lg"></li>
</ul>
</div>
</div>
</nav>
<div class="content" style="color: black; margin-bottom: 30px">
<div class="container-fluid">
<div class="row panel panel-default">
<div class="col-md-6">
<div style="margin-top: 30px;margin-bottom: 20px">
<h4>Choose the course to see the attendance:</h4>
<form method="post" action="">
<table style="border-spacing: 100px;">
<tr>
<td>
<div class="form-inline">
<select class="form-control" name="course1" style="width: 100px">
<option value="" selected disabled>Course</option>
<?php foreach ($_SESSION['course'] as $course){?>
<option value=<?php echo $course?>><?php echo $course;?></option>
<?php } ?>
</div>
</td>
<td><input type="submit" class="btn btn-primary" style="margin-left: 50px" name="att1"></td>
</tr>
</table>
<table style="border-spacing: 100px;border: #000 solid thin; margin-top: 20px; padding: 10%">
<tr>
<th style="padding-right: 50px">Student Id</th>
<th style="padding-right: 50px">Name</th>
<th style="padding-right: 50px">Days present</th>
</tr>
<?php
while ($row = mysqli_fetch_array($select_query_result))
{
$select_query1 = "select name from user where id = $row[stud_id]";
$select_query1_result = mysqli_query($conn, $select_query1) or die(mysqli_error($conn));
$row1 = mysqli_fetch_array($select_query1_result);
?>
<tr style="margin-top:30px;padding-top: 30px">
<td style="padding-right: 50px">
<?php echo $row[stud_id];?>
</td>
<td style="padding-right: 50px">
<?php echo $row1[name];?>
</td>
<td style="padding-right: 50px">
<?php echo $row[count];?>
</td>
</tr>
<?php
}
?>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<!-- Core JS Files -->
<script src="assets/js/jquery.3.2.1.min.js" type="text/javascript"></script>
<script src="assets/js/bootstrap.min.js" type="text/javascript"></script>
<!-- Charts Plugin -->
<script src="assets/js/chartist.min.js"></script>
<!-- Notifications Plugin -->
<script src="assets/js/bootstrap-notify.js"></script>
<!-- Google Maps Plugin -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
<!-- Light Bootstrap Table Core javascript and methods for Demo purpose -->
<script src="assets/js/light-bootstrap-dashboard.js?v=1.4.0"></script>
<!-- Light Bootstrap Table DEMO methods, don't include it in your project! -->
<script src="assets/js/demo.js"></script>
</html>