-
Notifications
You must be signed in to change notification settings - Fork 0
/
manageUsers.php
66 lines (51 loc) · 1.47 KB
/
manageUsers.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
<?php
include_once 'includes/dbHandler.php';
session_start();
include_once 'includes/overlay.php';
?>
<!DOCTYPE html>
<html>
<head> <link rel="stylesheet" href="design/index.css?v=<?php echo time(); ?>"> </head>
<body>
<div class = "menu1">
<h1>Delete users</h1>
<form action = "includes/deleteUsers.php" method = "POST">
<input type="text" name="userID" placeholder="userID"><br><br>
<button class = "button" type="submit" value="Submit"> Submit </button>
</form>
</div>
<div class = "menu2">
<h1> Ban user</h1>
<form action = "includes/ban.php" method = "POST">
<input type="text" name="userID" placeholder="userID"><br><br>
<button name = "removeB" class="button" type="submit" value="Submit"> Submit </button>
</form>
</div>
<div class = "menu3">
<h1>Unban user </h1>
<form action = "includes/unban.php" method = "POST">
<input type="text" name="userID" placeholder="userID"><br><br>
<button name = "removeB" class="button" type="submit" value="Submit"> Submit </button>
</form>
</div>
<div class = "printout">
<b>
<p>
<?php
$sql = "SELECT * FROM customer;";
$result = mysqli_query($conn, $sql);
$checkResult = mysqli_num_rows($result);
if($checkResult > 0){
while($row = mysqli_fetch_assoc($result)){
echo "<br>" . "User ID: " . $row['idCustomer'] . "<br>";
echo "Name: " . $row['username'] . "<br>";
echo "Password: " . $row['password'] . "<br>";
echo "Role: " . $row['user_type'] . "<br>";
}
}
?>
</p>
</b>
</div>
</body>
</html>