-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin_all_student.php
68 lines (64 loc) · 1.82 KB
/
admin_all_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
ob_start ();
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="all_student">
<div class="search_st">
<div class="hdinfo"><h3>All Registered Student List</h3></div>
<div class="search">
<form action="admin_search_student.php" method="GET">
<input type="text" name="src_student" placeholder="search student" />
<input type="submit" value="Search" />
</form>
</div>
</div>
<?php
if(isset($_REQUEST['res'])){
if($_REQUEST['res']==1){
echo "<h3 style='color:green;text-align:center;margin:0;padding:10px;'>Data deleted successfully</h3>";
}
}
?>
<table class="tab_one">
<tr>
<th>SL</th>
<th>Name</th>
<th>ID</th>
<th>Show Profile</th>
<th>Edit</th>
<th>Delete</th>
<th>Photo</th>
</tr>
<?php
$i=0;
$alluser = $user->get_all_student();
while($rows = $alluser->fetch_assoc()){
$i++;
?>
<tr>
<td><?php echo $i; ?></td>
<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>
</div>
<?php include "php/footerbottom.php";?>
<?php ob_end_flush() ; ?>