-
Notifications
You must be signed in to change notification settings - Fork 4
/
clear_all_banned.php
67 lines (63 loc) · 1.32 KB
/
clear_all_banned.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
<?php
require 'memory.php';
require 'header.inc';
check_auth($_SERVER['PHP_SELF']); // checks for required access
if (!$GET_action) {
EchoHead(50);
echo "
<tr class=mytitle>
<td>Clear All Banned Accounta</td>
</tr>
<tr class=myheader>
<td>
This will allow you to permanently delete all accounts that are banned.
</td>
</tr>
";
$query = SHOW_BAN_LIST;
$result = execute_query($query, "clear_banned.php");
if ($result->RowCount() == 0) {
echo "
<tr class=mycell>
<td>There are no banned accounts!</td>
</tr>
";
}
else {
echo "
<tr class=myheader>
<td>The following accounts are banned:</td>
</tr>
";
while ($line = $result->FetchRow()) {
echo "
<tr class=mycell>
<td>{$line[0]}</td>
</tr>
";
}
echo "
<tr class=mycell>
<td>
<form action=\"clear_all_banned.php\" method=\"GET\">
<input type=\"submit\" name=\"action\" class=\"myctl\" value=\"Clear Information\">
</form>
</td>
</tr>
";
}
echo "
</table>
";
}
else {
$query = SHOW_BAN_LIST;
$result = execute_query($query, "clear_all_banned.php");
while ($line = $result->FetchRow()) {
clear_account($line[0]);
add_admin_entry("Deleted Account {$line[1]}");
redir("clear_all_banned.php", "Deleted Banned Account {$line[1]}");
}
}
require 'footer.inc';
?>