-
Notifications
You must be signed in to change notification settings - Fork 2
/
userAdmin.php
51 lines (46 loc) · 1.57 KB
/
userAdmin.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
<?php
include("common.php");
outHtml1("User Admin");
outHtml2("User Admin:","editUser.php?userId=".$_SESSION['user']->getUserId());
?>
<table class='list' style="margin-top: 10px; margin-bottom: 10px; font-family: Trebuchet MS;">
<tr>
<td class='listname' style="background: url(images/bar.png) repeat-x; color: white;"><u>Username</u></td>
<td class='listlevel' style="background: url(images/bar.png) repeat-x; color: white;"><u>Level</u></td>
<td class='listbanned' style="background: url(images/bar.png) repeat-x; color: white;"><u>Banned</u></td>
</tr>
</table>
<form action="userAdminExecute.php" method="post">
<table class='list'>
<?php
$dir=dir("db/Users/");
$count = 0;
while ($filename = $dir->read())
{
if ($filename != "." && $filename != "..")
{
$temp = new User(file_get_contents("db/Users/".$filename));
echo "<tr><td class='listname'>".$temp->getUserId()."</td>";
echo "<td class='listlevel'><input type='text' name='".$temp->getUserId()."[]' value='".$temp->getLevel()."' /></td>";
if ($temp->isBanned() == 'false')
{
$checked = "";
}
else
{
$checked = " checked";
}
echo "<td class='listlevel'><input type='checkbox' name='".$temp->getUserId()."[]' value='yes'".$checked." /></td></tr>";
$count++;
}
}
$dir->close();
?>
</table>
<div id="submitDiv">
<input type="submit" value="Update" />
</div>
</form>
<?php
outHtml3();
?>