-
Notifications
You must be signed in to change notification settings - Fork 1
/
mods.php
63 lines (45 loc) · 1.13 KB
/
mods.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
<html>
<body>
<?php
include('globalsetup.php');
setupHeader();
showSimmonsUsers(getUsers());
//If this is an update of the form
if($_POST['admin'] != NULL) {
//Update the database
$newAdmins = $_POST['admin'];
$newResidents = $_POST['resid'];
setCreds($newAdmins, $newResids);
}
//showDisplayItemTable(getDisplayItems());
?>
</body>
</html>
<?php
function showSimmonsUsers($result) {
global $isAdmin;
echo ("<h2>Simmons Users of Database</h2>");
echo "<table border='1'>
<tr>
<th>Id</th>
<th>Username</th>
<th>Name</th>
<th>isAdmin</th>
<th>isResident</th>
</tr>";
while($row = mysql_fetch_array($result))
{
$uname = $row['username'];
$userLookup = "userLookup.php?uname=$uname";
//print($userLookup);
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . getPopupLink($row['username'], $userLookup) . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td class='tableImg'>" . getBinaryImage($row['isAdmin']) . "</td>";
echo "<td class='tableImg' >" . getBinaryImage($row['isResident']) . "</td>";
echo "</tr>";
}
echo "</table>";
}
?>