-
Notifications
You must be signed in to change notification settings - Fork 0
/
artStudents.php
112 lines (103 loc) · 3.18 KB
/
artStudents.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
<?php
include('links.php');
include('connect.php');
//include('DataTableLinks.php');
$getData = $db_con->query("SELECT * FROM students WHERE learner_type ='Arts Students' ORDER BY date_time DESC");
$count = $getData->rowCount();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style type="text/css">
</style>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<?php include('header.php'); ?>
<aside class="main-sidebar">
<?php include('sidebar.php') ?>
</aside>
<div class="content-wrapper">
<section class="content-header">
<h1>Arts Students</b></h1>
</h1>
<br>
</section>
<div style="background: white;padding: 5px;">
<div class="box">
<!-- /.box-header -->
<div class="box-body">
<table class="table table-bordered table-responsive" id="example1" class="example1">
<thead>
<tr>
<th>Name</th>
<th>Surname</th>
<th>Age</th>
<th>Status</th>
<th>ID Number</th>
<th>D.O.B</th>
<th>CityZenship</th>
<th>Gender</th>
<th>City</th>
<th>Address</th>
<th>Year </th>
<th>Edit</th>
<th>Delete</th>
</tr>
</thead>
<?php
if($count > 0)
{
while($row = $getData->fetch())
{
?>
<tr>
<td><?= $row["name"]?></td>
<td><?= $row["surname"]?></td>
<td><?= $row["age"]?></td>
<td><?= $row["student_status"]?></td>
<td><?= $row["id_number"]?></td>
<td><?= $row["date_of_birth"]?></td>
<td><?= $row["citizenship"]?></td>
<td><?= $row["gender"]?></td>
<td><?= $row["city"]?></td>
<td><?= $row["address"]?></td>
<td><?= $row["year_of_duty"]?></td>
<td><a href=update.php?id=<?php echo $row["id"]?> class="btn btn-success"><i class="ionicon ion-ios-compose"></i> Edit</a></td>
<td><a href=delete.php?id=<?php echo $row["id"]?> class="btn btn-danger" onclick="return confirm('Are you sure you want to delete this Post?')"><i class="ionicon ion-ios-trash"></i> Del</a></td>
</tr>
<?php
}
}
?>
</table>
</div>
</div>
</div>
</div>
<!-- /.content-wrapper -->
<?php
include('footer.php');
?>
<?php include('DataTableLinks.php')?>
<script type="text/javascript">
$(document).ready(function() {
$('#example1').DataTable( {
responsive: {
details: {
display: $.fn.dataTable.Responsive.display.modal( {
header: function ( row ) {
var data = row.data();
return 'Details for '+data[0]+' '+data[1];
}
} ),
renderer: $.fn.dataTable.Responsive.renderer.tableAll( {
tableClass: 'table'
} )
}
}
} );
} );
</script>