This repository has been archived by the owner on Mar 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
banning.php
79 lines (66 loc) · 3.04 KB
/
banning.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
$PAGE['title'] = "Banning";
include 'inc/config.php';
include 'inc/sessions.php';
include 'inc/functions.php';
?>
<!DOCTYPE html>
<html>
<head>
<?php include 'pageparts/head.php'; ?>
</head>
<body>
<div id="wrapper">
<?php include 'pageparts/nav.php'; ?>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">CJFreedom Panel <small>Banning</small></h1>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="panel panel-default">
<div class="panel-heading">
CJFreedom Recent Bans
</div>
<!-- /.panel-heading -->
<div class="panel-body">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Username</th>
<th>Admin</th>
<th>Reason</th>
<th>Time</th>
<?php if ($_SESSION['user']['rank'] >= 3) { echo "<th>Actions</th>"; } ?>
</tr>
</thead>
<tbody>
<?php
$result = sqlQuery("SELECT * FROM cjf_bans ORDER BY time DESC LIMIT 350");
while($row = mysqli_fetch_array($result))
{
$dateTime = date('H:i:s d/m/Y', $row['time']) . ' UTC';
echo "<tr>";
echo '<td>' . $row['ID'] . '</td>';
echo '<td>' . $row['bannedplayer'] . '</td>';
echo '<td>' . $row['adminname'] . '</td>';
echo '<td>' . $row['reason'] . '</td>';
echo '<td>' . $dateTime . '</td>';
if ($_SESSION['user']['rank'] >= 3) { echo "<td><a style='cursor:pointer;' onclick='sendToServer(\"action=cmd&cmd=glist unban " . $row['bannedplayer'] . "\");'>Unban</a> / <a style='cursor:pointer;' onclick='sendToServer(\"action=cmd&cmd=glist ban " . $row['bannedplayer'] . "\");'>Reban</a></td>"; }
echo "</tr>";
}
?>
</tbody>
</table>
</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<?php include 'pageparts/footerjs.php'; ?>
</body>
</html>