-
Notifications
You must be signed in to change notification settings - Fork 9
/
hospital.php
44 lines (43 loc) · 1.07 KB
/
hospital.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
<?php
declare(strict_types=1);
/**
* MCCodes v2 by Dabomstew & ColdBlooded
*
* Repository: https://github.com/davemacaulay/mccodesv2
* License: MIT License
*/
global $db, $h;
require_once('globals.php');
echo "
<h3>Hospital</h3>
<table width='75%' class='table' border='0' cellspacing='1' cellpadding='1'>
<tr bgcolor='gray'>
<th>Name</th>
<th>Level</th>
<th>Time</th>
<th>Reason</th>
</tr>
";
$q =
$db->query(
'SELECT `userid`, `username`, `hospital`, `level`,
`hospreason`, `gangPREF`
FROM `users` AS `u`
LEFT JOIN `gangs` AS `g`
ON `u`.`gang` = `g`.`gangID`
WHERE `u`.`hospital` > 0
ORDER BY `u`.`hospital` DESC');
while ($r = $db->fetch_row($q))
{
echo "
<tr>
<td>{$r['gangPREF']} <a href='viewuser.php?u={$r['userid']}'>{$r['username']}</a> [{$r['userid']}]</td>
<td>{$r['level']}</td>
<td>{$r['hospital']} minutes</td>
<td>{$r['hospreason']}</td>
</tr>
";
}
$db->free_result($q);
echo '</table>';
$h->endpage();