-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpending.php
More file actions
97 lines (97 loc) · 2.52 KB
/
pending.php
File metadata and controls
97 lines (97 loc) · 2.52 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
require 'memory.php';
require 'header.inc';
check_auth($_SERVER['PHP_SELF']); // checks for required access
if ($GET_auth) {
$query = sprintf(AUTH_PENDING, $GET_auth);
$result = execute_query($query, "pending.php");
$line = $result->FetchRow();
// Adds account, skips the encryption
add_account($line[2], $line[3], $line[4], $line[5], $CONFIG_default_level, true);
$query = sprintf(DEL_PENDING, $GET_auth);
$result = execute_query($query, "pending.php");
add_admin_entry("Accepted Pending Registration for {$line[2]}");
redir("pending.php", "Pending Account Accepted!");
}
elseif ($GET_del) {
$query = sprintf(DEL_PENDING, $GET_del);
$result = execute_query($query, "pending.php");
add_admin_entry("Removed Pending Registration");
redir("pending.php", "Pending Account Removed!");
}
elseif ($GET_action == "authall") {
$query = VIEW_PENDING;
$result = execute_query($query, "pending.php");
while ($line = $result->FetchRow()) {
// Adds account, skips the encryption
add_account($line[2], $line[3], $line[4], $line[5], $CONFIG_default_level, true);
}
$query = DEL_ALL_PENDING;
$result = execute_query($query, "pending.php");
add_admin_entry("Accepted All Pending Registration");
redir("pending.php", "All Pending Accounts Accepted!");
}
elseif ($GET_action == "delall") {
$query = DEL_ALL_PENDING;
$result = execute_query($query, "pending.php");
add_admin_entry("Removed All Pending Registrations");
redir("pending.php", "All Pending Accounts Removed!");
}
EchoHead(100);
echo "
<tr class=mytitle>
<td colspan=8>Pending Registration</td>
</tr>
<tr class=myheader>
<td>Action</td>
<td>Date</td>
<td>Auth Code</td>
<td>Account Name</td>
<td>Password</td>
<td>Gender</td>
<td>Email</td>
<td>IP</td>
</tr>
";
$query = VIEW_PENDING;
$result = execute_query($query, "pending.php");
if ($result->RowCount() == 0) {
echo "
<tr class=mycell>
<td colspan=8>There are no pending registrations!</td>
</tr>
";
}
else {
while ($line = $result->FetchRow()) {
echo "
<tr class=mycell>
<td>
<a href=\"pending.php?auth={$line[1]}\">Auth</a>
-
<a href=\"pending.php?del={$line[1]}\">Delete</a>
</td>
";
foreach ($line as $display_index => $col_value) {
if ($display_index == 0) {
$col_value = convert_date($col_value);
}
echo "<td>$col_value</td>";
}
echo "</tr>";
}
echo "
<tr class=mycell>
<td colspan=8>
<a href=\"pending.php?action=authall\">Auth All</a>
-
<a href=\"pending.php?action=delall\">Delete All</a>
</td>
</tr>
";
}
echo "
</table>
";
require 'footer.inc';
?>