-
Notifications
You must be signed in to change notification settings - Fork 5
/
admin_search_student.php
68 lines (61 loc) · 1.83 KB
/
admin_search_student.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
<?php
session_start();
require "php/config.php";
require_once "php/functions.php";
$user = new login_registration_class();
$admin_id = $_SESSION['admin_id'];
$admin_name = $_SESSION['admin_name'];
if(!$user->get_admin_session()){
header('Location: index.php');
exit();
}
?>
<?php
$pageTitle = "All student details";
include "php/headertop_admin.php";
?>
<div class="search_result">
<table class="tab_one">
<?php
$key = $_GET['src_student'];
$min_length = 1;
if(strlen($key) >= $min_length){
$key = htmlspecialchars($key);
$src_result = $user->search($key);
$count = $src_result->num_rows;
if($count>0){
?>
<tr>
<th>Name</th>
<th>ID</th>
<th>Show Profile</th>
<th>Edit</th>
<th>Delete</th>
<th>Photo</th>
</tr>
<?php
while($rows = $src_result->fetch_assoc()){
?>
<tr>
<td><?php echo $rows['name'];?></td>
<td><?php echo $rows['st_id'];?></td>
<td><a href="admin_single_student.php?id=<?php echo $rows['st_id'];?>">View Details</a></td>
<td><a href="admin_single_student_update.php?id=<?php echo $rows['st_id'];?>">Edit</a></td>
<td><a href="admin_delete_student.php?id=<?php echo $rows['st_id'];?>">Delete</a></td>
<td><img src="img/student/<?php echo $rows['img'];?>" width="50px" height="50px" title="<?php echo $rows['name'];?>" /></td>
</tr>
<?php } ?>
</table>
<?php
}else{
echo "<h2 style='font-size:45px;text-align:center;color:#ddd;'>Opps....No result found !</h2>";
}
}else{
echo "<h2 style='font-size:45px;text-align:center;color:#ddd;'>Opps....No result found !</h2>";
}
?>
<div class="back fix">
<p style="text-align:center"><a href="admin_all_student.php"><button class="editbtn">Back to student list</button></a></p>
</div>
</div>
<?php include "php/footerbottom.php";?>