Skip to content
This repository was archived by the owner on Jan 25, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
maxbans-php
===========
# This repo has been completely abandoned. I've moved to a new framework that not many people use so not worth updating this to a framework that not many people use.

PHP listings script for MaxBans

Demo: http://maxbans.yive.me/
___
**I updated to allow us to use pagination and fix other pages access.**

FabioZumbi12
16 changes: 15 additions & 1 deletion bans.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
</head>
<?php
// <<-----------------Database Connection------------>> //
$page = 1;
if(!empty($_GET['p'])) {
$page = $_GET['p'];
}
$limit = 20;
$offset = ($page - 1) * $limit;

require 'includes/data/database.php';
$sql = 'SELECT name, reason, banner, time, expires FROM bans ORDER BY time DESC LIMIT 20';
$retval = $conn->query($sql);
Expand All @@ -16,6 +23,13 @@
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Bans</h1>

<?php
$next = ($page + 1);
$previous = ($page - 1);
echo '<a href="bans.php?p='.$previous.'">Previous Page</a> | <a href="bans.php?p='.$next.'">Next Page</a>';
?>

<table class="table table-hover table-bordered table-condensed">
<thead>
<tr>
Expand Down Expand Up @@ -67,4 +81,4 @@
</div>
</div>
<?php include 'includes/footer.php'; ?>
</div>
</div>
10 changes: 5 additions & 5 deletions includes/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Categories <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="bans">Bans</a></li>
<li><a href="mutes">Mutes</a></li>
<li><a href="ipbans">IP Bans</a></li>
<li><a href="warnings">Warnings</a></li>
<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>
</ul>
Expand All @@ -29,4 +29,4 @@
</ul>
</div>
</div>
</div>
</div>