-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminWLAP.php
More file actions
295 lines (239 loc) · 9.06 KB
/
Copy pathadminWLAP.php
File metadata and controls
295 lines (239 loc) · 9.06 KB
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
290
291
292
293
294
295
<?php
require("database.php");
require("sessionadmin.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>WLAP and Syllabus Management System</title>
<!-- Styles -->
<style>
body {
background:none !important;
background-color: #fff !important;
}
</style>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="margin-bottom: 0">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<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="#"><img src="img/logo.png" style="margin-top:-12px;"></a>
</div>
<!-- /.navbar-header -->
<ul class="nav navbar-nav navbar-right" style="margin-right:25px;">
<li><a href="#"><i class="fa fa-user-circle-o fa-fw"></i> <?php echo $vFirstName; ?> <?php echo $vMiddleName; ?>. <?php echo $vLastName; ?></a></li>
</ul>
<div class="navbar-default sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse text-center">
<ul class="nav" id="side-menu">
<li>
<a href="adminHome.php"><i class="fa fa-3x fa-home fa-fw"></i><br>Home</a>
</li>
<li>
<a href="adminWLAP.php"><i class="fa fa-3x fa-calendar-o fa-fw"></i><br>WLAP</a>
</li>
<li>
<a href="adminSyllabus.php"><i class="fa fa-3x fa-file-text-o fa-fw"></i><br>Syllabus</a>
</li>
<li>
<a href="adminFacultyMgmt.php"><i class="fa fa-3x fa-id-card-o fa-fw"></i><br>Faculty</a>
</li>
<li>
<a href="adminlogout.php"><i class="fa fa-3x fa-sign-out fa-fw"></i><br>Logout</a>
</li>
</ul>
</div>
<!-- /.sidebar-collapse -->
</div>
<!-- /.navbar-static-side -->
</nav>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h2 class="page-header">WLAP</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-lg-7">
<div class="panel panel-green">
<div class="panel-heading">
<i class="fa fa-search fa-fw"></i> Search WLAP
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<!-- Nav tabs -->
<ul class="nav nav-tabs nav-justified">
<li class="active"><a href="#mycourses" data-toggle="tab">My Courses</a>
</li>
<li><a href="#other" data-toggle="tab">Other Courses</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content"><br>
<?php
$t=date('d-m-Y');
$p=date("D",strtotime($t));
require ("database.php");
$sql="Select distinct c.CourseOrder,c.CourseName,s.CourseCode from schedule s INNER JOIN course c ON c.CourseCode = s.CourseCode WHERE s.userID = '".$IuserID."' ORDER by c.CourseName ";
$result1 = mysqli_query($conn,$sql);
?>
<div class="tab-pane fade in active" id="mycourses">
<table class="table table-scroll table-striped">
<thead>
<tr>
<th>Course Code</th>
<th>Descriptive Title</th>
<th>Action</th>
</tr>
</thead>
<tbody style="width:80%; height:50%;">
<?php while ($course = mysqli_fetch_object($result1)){?>
<tr>
<td id="code"><?php echo $course->CourseCode;?></td>
<td id="desc"><?php echo $course->CourseName;?></td>
<td><a href="adminWLAPcourses.php?id=<?php echo $course->CourseOrder;?>">View list</a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php
$t=date('d-m-Y');
$p=date("D",strtotime($t));
require ("database.php");
$sql="Select distinct T.CourseOrder,T.CourseName,T.CourseCode,T.UserID from (Select distinct c.CourseOrder,c.CourseName,c.CourseCode,s.UserID from schedule s RIGHT JOIN course c ON c.CourseCode = s.CourseCode )AS T WHERE T.UserID !='".$IuserID."' or T.UserID is NULL ORDER by CourseName";
$result1 = mysqli_query($conn,$sql);
?>
<div class="tab-pane fade" id="other">
<?php
$t=date('d-m-Y');
$p=date("D",strtotime($t));
require ("database.php");
$sql="Select distinct T.CourseCode from (Select distinct c.CourseOrder,c.CourseName,c.CourseCode,s.UserID from schedule s RIGHT JOIN course c ON c.CourseCode = s.CourseCode )AS T WHERE T.UserID !='".$IuserID."' or T.UserID is NULL ORDER by CourseName";
$result2 = mysqli_query($conn,$sql);
?>
<form>
Find course code:
<select name="users" onchange="showUser(this.value)">
<?php while ($othercourses = mysqli_fetch_object($result2)){?>
<option value="<?php echo $othercourses->CourseCode;?>"><?php echo $othercourses->CourseCode;?></option>
<?php } ?>
</select>
</form>
<br>
<div class="panel-body" id="txtHint">
<table class="table table-scroll table-striped">
<thead>
<tr>
<th>Course Code</th>
<th>Descriptive Title</th>
<th>Action</th>
</tr>
</thead>
<tbody style="width:80%; height:50%;">
<?php while ($othercourses = mysqli_fetch_object($result1)){?>
<tr>
<td id="code"><?php echo $othercourses->CourseCode;?></td>
<td id="desc"><?php echo $othercourses->CourseName;?></td>
<td><a href="adminWLAPothercourses.php?id=<?php echo $othercourses->CourseOrder;?>">View list</a></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- /.panel-body -->
</div>
<!-- /.panel -->
</div>
<!-- /.col-lg-6 -->
<div class="col-lg-4">
<!-- WLAP List of My Courses -->
<div class="panel panel-green" style="display:none;" id="WLAPList">
<div class="panel-heading" id="code">
</div>
<!-- /.panel-heading -->
<!-- /.panel-body -->
</div>
<!-- /.panel -->
<!-- WLAP List of Other Courses -->
<!-- /.panel -->
</div>
<!-- /.col-lg-4 -->
</div>
<!-- /.row -->
<!-- Popup for remarks -->
</div>
<!-- /#Popup window -->
<!-- Popup view of WLAP -->
<!-- /#Popup window -->
<!-- Footer -->
<footer class="text-center">
<div class="footer-below">
<div class="container">
<div class="row">
<div class="col-lg-12" style="color:#666666;">
Copyright © WLAP and Syllabus Management System 2017
</div>
</div>
</div>
</div>
</footer>
</div>
<!--/#page-wrapper -->
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Metis Menu Plugin JavaScript -->
<script src="js/metisMenu.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="js/sb-admin-2.js"></script>
<script src="js/customJS.js"></script>
<script>
function showUser(str) {
if (str == "") {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
}
};
xmlhttp.open("GET","getcourse.php?q="+str,true);
xmlhttp.send();
}
}
</script>
</body>
</html>