mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-09 15:27:32 +00:00
Adjust bans.php for LiteBans
This commit is contained in:
parent
f95826f95c
commit
839ec25a38
8
bans.php
8
bans.php
@ -7,7 +7,7 @@
|
|||||||
// <<-----------------mysql Database Connection------------>> //
|
// <<-----------------mysql Database Connection------------>> //
|
||||||
require 'includes/data/database.php';
|
require 'includes/data/database.php';
|
||||||
|
|
||||||
$sql = 'SELECT name, reason, banner, time, expires FROM bans ORDER BY time DESC LIMIT 20';
|
$sql = 'SELECT time,until,reason,name,banned_by_name FROM bans INNER JOIN history on bans.uuid = history.uuid ORDER BY time DESC LIMIT 20';
|
||||||
|
|
||||||
$retval = mysql_query($sql, $conn);
|
$retval = mysql_query($sql, $conn);
|
||||||
if (!$retval) {
|
if (!$retval) {
|
||||||
@ -57,13 +57,13 @@ if (!$retval) {
|
|||||||
$timeConvert = $timeEpoch / 1000;
|
$timeConvert = $timeEpoch / 1000;
|
||||||
$timeResult = date('F j, Y, g:i a', $timeConvert);
|
$timeResult = date('F j, Y, g:i a', $timeConvert);
|
||||||
// <<-----------------Expiration Time Converter------------>> //
|
// <<-----------------Expiration Time Converter------------>> //
|
||||||
$expiresEpoch = $row['expires'];
|
$expiresEpoch = $row['until'];
|
||||||
$expiresConvert = $expiresEpoch / 1000;
|
$expiresConvert = $expiresEpoch / 1000;
|
||||||
$expiresResult = date('F j, Y, g:i a', $expiresConvert);
|
$expiresResult = date('F j, Y, g:i a', $expiresConvert);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name']; ?></td>
|
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['history.name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['history.name']; ?></td>
|
||||||
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banner'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner']; ?></td>
|
<td><?php echo "<img src='http://mineskin.ca/v2/avatar/?player=" . $row['banned_by_name'] . "&size=25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banned_by_name']; ?></td>
|
||||||
<td style="width: 30%;"><?php echo $row['reason']; ?></td>
|
<td style="width: 30%;"><?php echo $row['reason']; ?></td>
|
||||||
<td><?php echo $timeResult; ?></td>
|
<td><?php echo $timeResult; ?></td>
|
||||||
<td><?php if ($row['expires'] <= 0) {
|
<td><?php if ($row['expires'] <= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user