-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblack_listed_students.php
404 lines (382 loc) · 16.1 KB
/
black_listed_students.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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<?php
include_once "php/connection.php";
include_once "php/checkauthentication.php";
?>
<!DOCTYPE html>
<html>
<?php
$pageTitle = 'Black listed students';
include_once "layout/header.php";
?>
<body class="animated fadeIn">
<div id="wrapper">
<?php
include_once "layout/menu.php";
?>
<div id="page-wrapper" class="gray-bg">
<?php
include_once "layout/topbar.php";
?>
<div class="row wrapper border-bottom white-bg page-heading animated fadeInLeftBig">
<div class="col-sm-4">
<h2><p><i class="fa fa-crosshairs"></i> Black listed students.</p></h2>
</div>
</div>
<div class="wrapper wrapper-content animated fadeInRightBig">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>Search and view Students</h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
</div>
</div>
<div class="ibox-content">
<div id="collapseOne" class="panel-collapse collapse in">
<div class="table-responsive">
<table id="example" class=" dataTables-example table table-striped table-hover dt-responsive" cellspacing="0" width="100%">
<thead>
<tr>
<th>extn</th>
<th style="width:1em"></th>
<th style="width:1em"></th><!--order column-->
<th>Name</th>
<th>Type</th>
<th>Nature</th>
<th>Year</th>
<th>Group</th>
<th>Mob</th>
<th>Balance</th>
<th>Archive name</th>
</tr>
</thead>
<tbody>
<?php
$result4 = mysqli_query($con,"select t1.* from black_list_students t1");
while($row4 = mysqli_fetch_assoc($result4))
{
?>
<tr data-child-value=""> <!--info plus-->
<td><!--search in info plus-->
</td>
<td class="details-control"></td>
<td>
<?php echo $row4['stid'] ?>
</td><!--order column-->
<td>
<a class="green" href="stprofile.php?student_id=<?php echo $row4['stid'] ?>"><?php echo $row4['stname'] ?></a>
</td>
<td><?php
if($row4['sttype2'] == "C"):
echo "مراجعة نهائية";
elseif($row4['sttype2'] == 'E'):
echo "منسحب";
elseif($row4['sttype2'] == "A"):
echo "باقي إعادة";
elseif($row4['sttype2'] == "B"):
echo "مستجد";
else:
echo "???????";
endif;
?></td>
<td><?php
if($row4['sttype'] == 1):
echo "إنتظام";
elseif($row4['sttype'] == 2):
echo "إنتساب";
endif;
?>
</td>
<td><?php
if($row4['styear'] == "1"):
echo "الأولى";
elseif($row4['styear'] == "2"):
echo "الثانية";
elseif($row4['styear'] == "3"):
echo "الثالثة";
elseif($row4['styear'] == "4"):
echo "الرابعة";
elseif($row4['styear'] == "5"):
echo "متخرج";
endif;
?></td>
<td><?php echo $row4['stgroup'] ?></td>
<td><?php echo $row4['stmob'] ?></td>
<td><?php
if($row4['stbalance'] > 0):
$varb='<span class="btn btn-xs btn-success">';
elseif($row4['stbalance'] < 0):
$varb='<span class="btn btn-xs btn-danger">';
elseif($row4['stbalance'] == 0):
$varb='<span class="btn btn-xs btn-warning">';
endif;
echo $varb.$row4['stbalance'];?></span>
</td>
<td><?php echo $row4['archive_name'] ?></td>
</tr>
<?php
};
?>
</tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div>
<strong>Copyright</strong> We.Code © 2017
</div>
</div>
</div>
</div>
<?php
include_once "layout/modals.php";
?>
<!-- Mainly scripts -->
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="js/plugins/blueimp/jquery.blueimp-gallery.min.js"></script>
<!-- Custom and plugin javascript -->
<script src="js/inspinia.js"></script>
<script src="js/plugins/pace/pace.min.js"></script>
<!-- iCheck -->
<script src="js/plugins/iCheck/icheck.min.js"></script>
<!-- Data picker -->
<script src="js/plugins/datapicker/bootstrap-datepicker.js"></script>
<!-- Select2 -->
<script src="js/plugins/select2/select2.full.min.js"></script>
<!-- Chosen -->
<script src="js/plugins/chosen/chosen.jquery.js"></script>
<!-- Dual Listbox -->
<script src="js/plugins/dualListbox/jquery.bootstrap-duallistbox.js"></script>
<!-- Toastr -->
<script src="js/plugins/toastr/toastr.min.js"></script>
<script src="js/plugins/dataTables/datatables.min.js"></script>
<script>
function format(value) {
return '<div class="middle wrap col-sm-12" >' + value + '</div>';
}
$(document).ready(function() {
$('.dataTables-example').DataTable({
pageLength: 10,
responsive: {
details: {
type: 'column',
target: 'tr'
}
},
columnDefs: [{
targets: [ 0 , 2 ],
visible: false
}],
order: [2, 'desc']
});
});
</script>
<script>
$(document).ready(function() {
<?php
if (isset($_GET['backresult'])){
$backresult=$_GET['backresult'];
?>
setTimeout(function() {
toastr.options = {
closeButton: true,
progressBar: true,
showMethod: 'slideDown',
timeOut: 4000
};
toastr.
<?php
if ($backresult == "1"){
echo"success('تمت العملية بنجاح')";
}else{
echo "error('برجاء إعادة المحاولة', 'لم تتم العملية بنجاح')";
}
};?>;
}, 1300);
});
</script>
<script>
$(document).ready(function() {
var table = $('.dataTables-example').DataTable();
// Add event listener for opening and closing details
$('#example').on('click', 'td.details-control', function() {
var tr = $(this).closest('tr');
var row = table.row(tr);
if (row.child.isShown()) {
// This row is already open - close it
row.child.hide();
tr.removeClass('shown');
} else {
// Open this row
row.child(format(tr.data('child-value'))).show();
tr.addClass('shown');
}
});
});
$(document).ready(function() {
$('.dual_select').bootstrapDualListbox({
selectorMinimalHeight: 160
});
$('.chosen-select').chosen({width: "100%"});
$('.chosen-select2').chosen({width: "200px"});
$(".category").select2({
placeholder: "Select a category",
allowClear: true
});
$(".storepros").select2({
placeholder: "Select a prosecution",
allowClear: true
});
// Setup - add a text input to each footer cell
$('#example tfoot th').not(":eq(0)").each(function() {
var title = $(this).text();
$(this).html('<input type="text" />');
});
// DataTable
var table = $('#example').DataTable();
// Apply the search
table.columns().every(function() {
var that = this;
$('input', this.footer()).on('keyup change', function() {
if (that.search() !== this.value) {
that
.search(this.value)
.draw();
}
});
});
});
</script>
<script>
$('#data_1 .input-group.date').datepicker({
todayBtn: "linked",
keyboardNavigation: false,
forceParse: false,
calendarWeeks: true,
autoclose: true,
format: 'yyyy-m-d'
});
</script>
<script type="text/javascript">
$(document).ready(function(){
var maxField = 15; //Input fields increment limitation
var addButton = $('.add_button'); //Add button selector
var wrapper = $('.field_wrapper'); //Input field wrapper
var fieldHTML = '<div>' +
'<input style="width: 50px" type="text" class="form-control" name="quantity[]"/>' +
'<select class="chosen-select2 form-control" name="category[]">' +
'<option></option>' +
<?php
$query6 = "SELECT * FROM `owncategory`";
$results6=mysqli_query($con, $query6);
//loop
foreach ($results6 as $owncategory){
?>
'<option value="<?php echo $owncategory["owncategoryid"];?>"><?php echo $owncategory["owncategoryname"];?></option>' +
<?php
}
?>
'</select>' +
'<input type="text" style="width: 250px" placeholder="item name" class="form-control" name="itemname[]">' +
'<button class="btn btn-danger remove_button" type="button">' +
'<i class="fa fa-minus"></i>' +
'</button>' +
'</div>'; //New input field html
var x = 1; //Initial field counter is 1
$(addButton).click(function(){ //Once add button is clicked
if(x < maxField){ //Check maximum number of input fields
x++; //Increment field counter
$(wrapper).append(fieldHTML); // Add field html
$('.chosen-select2').chosen({width: "200px"});
}
});
$(wrapper).on('click', '.remove_button', function(e){ //Once remove button is clicked
e.preventDefault();
$(this).parent('div').remove(); //Remove field html
x--; //Decrement field counter
});
});
</script>
<script>
$(document).ready(function () {
$('#materials_content').slideUp();
});
$('input[id="materials_check"]').click(function(){
if(this.checked)
$('#materials_content').slideDown();
else
$('#materials_content').slideUp();
});
$(document).ready(function () {
$('#year_content').slideUp();
});
$('input[id="year_check"]').click(function(){
if(this.checked)
$('#year_content').slideDown();
else
$('#year_content').slideUp();
});
$(document).ready(function () {
$('#term_content').slideUp();
});
$('input[id="term_check"]').click(function(){
if(this.checked)
$('#term_content').slideDown();
else
$('#term_content').slideUp();
});
$(document).ready(function () {
$('#type_content').slideUp();
});
$('input[id="type_check"]').click(function(){
if(this.checked)
$('#type_content').slideDown();
else
$('#type_content').slideUp();
});
$(document).ready(function () {
$('#balance_content').slideUp();
});
$('input[id="balance_check"]').click(function(){
if(this.checked)
$('#balance_content').slideDown();
else
$('#balance_content').slideUp();
});
</script>
<script>
$(document).ready(function () {
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
});
</script>
</body>
<?php include_once "layout/scripts.php"; ?>
</html>