-
Notifications
You must be signed in to change notification settings - Fork 8
/
jail.php
53 lines (52 loc) · 1.19 KB
/
jail.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
<?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>Jail</h3>
<table width='75%' class='table' cellspacing='1' cellpadding='1'>
<tr>
<th>Name</th>
<th>Level</th>
<th>Time</th>
<th>Reason</th>
<th>Actions</th>
</tr>
";
$q =
$db->query(
'SELECT `jail_reason`, `jail`, `level`, `username`, `userid`,
`gangPREF`
FROM `users` AS `u`
LEFT JOIN `gangs` AS `g`
ON `u`.`gang` = `g`.`gangID`
WHERE `u`.`jail` > 0
ORDER BY `u`.`jail` 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['jail']} minutes</td>
<td>{$r['jail_reason']}</td>
<td>
[<a href='jailbust.php?ID={$r['userid']}'>Bust</a>]
[<a href='jailbail.php?ID={$r['userid']}'>Bail</a>]
</td>
</tr>
";
}
$db->free_result($q);
echo '</table>';
$h->endpage();