-
Notifications
You must be signed in to change notification settings - Fork 4
/
whosonline_ignore.php
77 lines (75 loc) · 2.16 KB
/
whosonline_ignore.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
69
70
71
72
73
74
75
76
77
<?php
require 'memory.php';
require 'header.inc';
check_auth($_SERVER['PHP_SELF']); // checks for required access
$query = SHOW_OIGNORED;
$result = execute_query($query, "whosonline_ignore.php");
if ($GET_del > 0) {
$query = sprintf(DEL_OIGNORED, $GET_del);
$result = execute_query($query, "whosonline_ignore.php");
add_admin_entry("Removed Account $GET_del to Who\'s Online Ignored List");
redir("whosonline_ignore.php", "Removed account $GET_del from Who's Online ignore!");
}
elseif ($GET_add > 0) {
$query = sprintf(ADD_OIGNORED, $GET_add);
$result = execute_query($query, "whosonline_ignore.php");
add_admin_entry("Added Account $GET_add to Who\'s Online Ignored List");
redir("whosonline_ignore.php", "Added account $GET_add to Who's Online ignore!");
}
elseif ($GET_account_name) {
$id = UserID_To_AccountID($GET_account_name);
if ($id) {
$query = sprintf(ADD_OIGNORED, $id);
$result = execute_query($query, "whosonline_ignore.php");
add_admin_entry("Added Account $id to Who\'s Online Ignored List");
redir("whosonline_ignore.php", "Added account $id to Who's Online ignore!");
}
else {
redir("whosonline_ignore.php", "Account $GET_account_name doesn't exist!");
}
}
EchoHead(80);
echo "
<tr class=mytitle>
<td colspan=3>Ignored From Who's Online</td>
</tr>
<tr class=myheader>
<td>Account ID</td>
<td>Account Name</td>
<td>Remove</td>
</tr>
";
if ($result->RowCount() == 0) {
echo "
<tr class=mycell>
<td colspan=3>No accounts are ignored from Who's Online!</td>
</tr>
";
}
else {
while ($line = $result->FetchRow()) {
echo "
<tr class=mycell>
<td>{$line[0]}</td>
<td><a href=\"account_manage.php?search={$line[1]}\">{$line[1]}</a></td>
<td><a href=\"whosonline_ignore.php?del={$line[0]}\">Remove</a></td>
</tr>";
}
}
echo "
<tr>
<td> </td>
</tr>
<tr class=mycell>
<td colspan=3>
<form action=\"whosonline_ignore.php\" method=\"GET\">
Add Account:
<input type=\"text\" name=\"account_name\" class=\"myctl\">
<input type=\"submit\" name=\"addignore\" class=\"myctl\" value=\"Add\">
</form>
</td>
</tr>
</table>
";
require 'footer.inc';
?>