-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathadmin_users.php
45 lines (44 loc) · 1.07 KB
/
admin_users.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
<?php $title = "Admin Users";
session_start();
?>
<html>
<?php
include("head.php");
?>
<div class="container">
<?php
if (isset($_SESSION["userisadmin"])) {
if ($_SESSION["userisadmin"] == 1) {
include("admin_menu.php");
?>
<pageheader>Users</pageheader>
<table class="files-table">
<tr>
<th>Username</th>
<th>Mail</th>
<th>Delete</th>
</tr>
<?php
$users = $db->query("select * from users");
foreach($users as $item){
if($item["is_admin"] == 1)
continue;
?>
<tr>
<td><?php echo $item['username']; ?></td>
<td><?php echo $item['mail']; ?></td>
<td><a href="admin_delete_user.php?userid=<?php echo $item['id']; ?>">Delete</a></td>
</tr>
<?php
}
?>
</table>
<?php
}
}
else {
echo "please <a href='login.php'>login</a>";
}
?>
</div>
</html>