mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-09 15:27:32 +00:00
Remove ipbans.php
This commit is contained in:
parent
293bde3c5e
commit
28318d2eb6
@ -18,7 +18,6 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="bans.php">Bans</a></li>
|
||||
<li><a href="mutes.php">Mutes</a></li>
|
||||
<li><a href="ipbans.php">IP Bans</a></li>
|
||||
<li><a href="warnings.php">Warnings</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
98
ipbans.php
98
ipbans.php
@ -1,98 +0,0 @@
|
||||
<?php include 'includes/head.php'; ?>
|
||||
<?php include 'includes/header.php'; ?>
|
||||
<head>
|
||||
<title>IP Bans - <?php echo $name; ?></title>
|
||||
</head>
|
||||
<?php
|
||||
// <<-----------------mysql Database Connection------------>> //
|
||||
require 'includes/data/database.php';
|
||||
|
||||
$sql = 'SELECT ip, reason, banner, time, expires FROM ipbans ORDER BY time DESC LIMIT 20';
|
||||
|
||||
$retval = mysql_query($sql, $conn);
|
||||
if (!$retval) {
|
||||
die('Could not get data: ' . mysql_error());
|
||||
}
|
||||
?>
|
||||
<body>
|
||||
<div class="container">
|
||||
<!-- Example row of columns -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header">IP Bans</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="index.php">Home</a></li>
|
||||
<li class="active">IP Bans</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" style="margin-bottom:60px;">
|
||||
<div class="col-lg-12">
|
||||
<table class="table table-hover table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<div style="text-align: center;">IP</div>
|
||||
</th>
|
||||
<th>
|
||||
<div style="text-align: center;">Banned By</div>
|
||||
</th>
|
||||
<th>
|
||||
<div style="text-align: center;">Reason</div>
|
||||
</th>
|
||||
<th>
|
||||
<div style="text-align: center;">Banned On</div>
|
||||
</th>
|
||||
<th>
|
||||
<div style="text-align: center;">Banned Until</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while ($row = mysql_fetch_assoc($retval)) {
|
||||
// <<-----------------Ban Date Converter------------>> //
|
||||
$timeEpoch = $row['time'];
|
||||
$timeConvert = $timeEpoch / 1000;
|
||||
$timeResult = date('F j, Y, g:i a', $timeConvert);
|
||||
// <<-----------------Expiration Time Converter------------>> //
|
||||
$expiresEpoch = $row['expires'];
|
||||
$expiresConvert = $expiresEpoch / 1000;
|
||||
$expiresResult = date('F j, Y, g:i a', $expiresConvert);
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
$ip = $row['ip'];
|
||||
|
||||
$array = explode(".", $ip);
|
||||
$numbers = $array[0] . "." . $array[1] . "." . $array[2];
|
||||
$numbers .= ".";
|
||||
|
||||
for ($i = 0; $i < strlen($array[3]); $i++) {
|
||||
$numbers .= "*";
|
||||
}
|
||||
|
||||
echo $numbers;
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo "<img src='https://minotar.net/avatar/" . $row['banner'] . "/25' style='margin-bottom:5px;margin-right:5px;border-radius:2px;' />" . $row['banner']; ?></td>
|
||||
<td style="width: 30%;"><?php echo $row['reason']; ?></td>
|
||||
<td><?php echo $timeResult; ?></td>
|
||||
<td><?php if ($row['expires'] == 0) {
|
||||
echo 'Permanent Ban';
|
||||
} else {
|
||||
echo $expiresResult;
|
||||
} ?></td>
|
||||
</tr>
|
||||
<?php }
|
||||
mysql_close($conn);
|
||||
echo "</tbody></table>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
include 'includes/footer.php';
|
||||
?>
|
||||
</div>
|
Loading…
x
Reference in New Issue
Block a user