-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdean_students.php
More file actions
214 lines (182 loc) · 6.16 KB
/
dean_students.php
File metadata and controls
214 lines (182 loc) · 6.16 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
<!-- This is the page for managing all the staffs --><!-- This is a page for Admin Home page -->
<?php
session_start();
$id=$_SESSION['id'];
if ($_SESSION['role']=='') {
header('Location:index.html');
}
else{
include 'config/connection.php';
$sq="SELECT * FROM user,staff,department,school
WHERE staff.userId=user.id
AND school.school_id=department.school
AND department.dept_id=staff.department
AND user.id='$id'";
$qr=mysqli_query($conn,$sq);
$user=mysqli_fetch_array($qr);
$school=$user['school'];
$sql="SELECT * FROM user,student,programme,department
WHERE user.role='4'
AND department.school='$school'
AND department.dept_id=programme.department
AND student.userid=user.id
AND programme.prog_id=student.program ";
$qry=mysqli_query($conn,$sql);
include 'include/header.php';
?>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">
<?php include 'include/dnav.php'; ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<!-- Manage staffs buttons -->
<div class="col-sm-6">
</div><!-- /.col -->
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item "><a href="admin.php" class="text-orange">Home</a></li>
<li class="breadcrumb-item ">School Students</li>
</ol>
</div><!-- /.col -->
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- /.content-header -->
<!-- Start of Staff Table -->
<section class="content">
<div class="container-fluid">
<!-- Small boxes (Stat box) -->
<div class="row">
<div class="col-md-12">
<div class="card">
<?php
if (mysqli_num_rows($qry) == 0){
?>
<p class="alert text-dark">No student was Registered !</p>
<?php
}
else{
?>
<div class="card-header bg-dark">
<h3 class="card-title"></h3>
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>SN</th>
<th>Full Names</th>
<th>Reg NO</th>
<th>Programme</th>
<th>Department</th>
<th>Year</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
for ($i=1; $i<=mysqli_num_rows($qry); $i++){
$row = mysqli_fetch_array($qry);
?>
<tr>
<td>
<?php echo $i; ?></td>
<td>
<?php echo $row['fname'].' '.$row['mname'].' '.$row['lname']; ?>
</td>
<td>
<?php echo $row['user_id']; ?>
</td>
<td>
<?php echo $row['prog_name']; ?>
</td>
<td>
<?php echo $row['dname']; ?>
</td>
<td>
<?php echo $row['year']; ?>
</td>
<td>
<div class="text-center">
<a class="bg-dark p-1" href="SingleStudent.php?id=<?php echo $row['user_id'];?>"><i class="fa fa-eye "></i></a>
</div>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
</div>
</div>
</div>
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<footer class="main-footer bg-dark text-center">
<br>
<strong>Copyright © 2021/2022 <a href="" class="text-orange">TazarChriss </a>.</strong>
All rights reserved.
<div class="mt-4">
<h1></h1>
</div>
</footer>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- jQuery -->
<script src="plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables & Plugins -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="plugins/jszip/jszip.min.js"></script>
<script src="plugins/pdfmake/pdfmake.min.js"></script>
<script src="plugins/pdfmake/vfs_fonts.js"></script>
<script src="plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="dist/js/demo.js"></script>
<!-- Page specific script -->
<script>
$(function () {
$("#example1").DataTable({
"responsive": true, "lengthChange": false, "autoWidth": false,
}).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false,
"responsive": true,
});
});
</script>
</body>
</html>
<?php }
?>