CONSOLE -> Console

This commit is contained in:
Ruan 2015-02-21 08:31:39 +02:00
parent cc923d5c34
commit bf5a783f94
4 changed files with 16 additions and 4 deletions

View File

@ -53,6 +53,7 @@ if(!$result = $conn->query($sql)) {
<tbody> <tbody>
<?php while($row = $result->fetch_assoc()){ <?php while($row = $result->fetch_assoc()){
// <<-----------------Ban Date Converter------------>> // // <<-----------------Ban Date Converter------------>> //
date_default_timezone_set("UTC");
$timeEpoch = $row['time']; $timeEpoch = $row['time'];
$timeConvert = $timeEpoch / 1000; $timeConvert = $timeEpoch / 1000;
$timeResult = date('F j, Y, g:i a', $timeConvert); $timeResult = date('F j, Y, g:i a', $timeConvert);
@ -64,8 +65,8 @@ if(!$result = $conn->query($sql)) {
<tr> <tr>
<td><?php $banned = $row['name']; <td><?php $banned = $row['name'];
echo "<img src='https://minotar.net/avatar/" . $banned . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $banned; ?></td> echo "<img src='https://minotar.net/avatar/" . $banned . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $banned; ?></td>
<td><?php $banner = $row['banned_by_name']; <td><?php $banner = get_banner_name($row['banned_by_name']);
echo "<img src='https://minotar.net/avatar/" . $banner . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banned_by_name']; ?></td> echo "<img src='https://minotar.net/avatar/" . $banner . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $banner ?></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['until'] <= 0) { <td><?php if ($row['until'] <= 0) {

View File

@ -2,4 +2,11 @@
// <<---------Ban Listing Settings (Simplified)--------->> // // <<---------Ban Listing Settings (Simplified)--------->> //
$name = 'LiteBans'; $name = 'LiteBans';
$serverip = 'mc.example.com'; $serverip = 'mc.example.com';
function get_banner_name($banner) {
if ($banner === "CONSOLE") {
return "Console";
}
return $banner;
}
?> ?>

View File

@ -42,6 +42,7 @@ if(!$result = $conn->query($sql)) {
<tbody> <tbody>
<?php while($row = $result->fetch_assoc()){ <?php while($row = $result->fetch_assoc()){
// <<-----------------Ban Date Converter------------>> // // <<-----------------Ban Date Converter------------>> //
date_default_timezone_set("UTC");
$timeEpoch = $row['time']; $timeEpoch = $row['time'];
$timeConvert = $timeEpoch / 1000; $timeConvert = $timeEpoch / 1000;
$timeResult = date('F j, Y, g:i a', $timeConvert); $timeResult = date('F j, Y, g:i a', $timeConvert);
@ -52,7 +53,8 @@ if(!$result = $conn->query($sql)) {
?> ?>
<tr> <tr>
<td><?php echo "<img src='https://minotar.net/avatar/" . $row['name'] . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name']; ?></td> <td><?php echo "<img src='https://minotar.net/avatar/" . $row['name'] . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name']; ?></td>
<td><?php echo "<img src='https://minotar.net/avatar/" . $row['banned_by_name'] . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banned_by_name']; ?></td> <td><?php $banner = get_banner_name($row['banned_by_name']);
echo "<img src='https://minotar.net/avatar/" . $banner . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $banner; ?></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['until'] <= 0) { <td><?php if ($row['until'] <= 0) {

View File

@ -50,13 +50,15 @@ if(!$result = $conn->query($sql)) {
<tbody> <tbody>
<?php while($row = $result->fetch_assoc()){ <?php while($row = $result->fetch_assoc()){
// <<-----------------Expiration Time Converter------------>> // // <<-----------------Expiration Time Converter------------>> //
date_default_timezone_set("UTC");
$expiresEpoch = $row['until']; $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='https://minotar.net/avatar/" . $row['name'] . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name']; ?></td> <td><?php echo "<img src='https://minotar.net/avatar/" . $row['name'] . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['name']; ?></td>
<td><?php echo "<img src='https://minotar.net/avatar/" . $row['banned_by_name'] . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banned_by_name']; ?></td> <td><?php $banner = get_banner_name($row['banned_by_name']);
echo "<img src='https://minotar.net/avatar/" . $banner . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $banner; ?></td>
<td style="width: 30%;"><?php echo $row['reason']; ?></td> <td style="width: 30%;"><?php echo $row['reason']; ?></td>
<td><?php if ($row['until'] <= 0) { <td><?php if ($row['until'] <= 0) {
echo 'Permanent Warning'; echo 'Permanent Warning';