From fdad84496e689ae640449aaffadaac642adc2f1e Mon Sep 17 00:00:00 2001 From: FabioZumbi12 Date: Sat, 30 Dec 2017 18:10:00 -0200 Subject: [PATCH 1/4] Add pagination --- bans.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/bans.php b/bans.php index d8d0731..f97c357 100644 --- a/bans.php +++ b/bans.php @@ -7,6 +7,13 @@ > // + $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); @@ -16,6 +23,13 @@

Bans

+ + Previous Page | Next Page'; + ?> + @@ -67,4 +81,4 @@ - \ No newline at end of file + From d24d429a18131e1939beef7f4d95b537d3a08d4f Mon Sep 17 00:00:00 2001 From: FabioZumbi12 Date: Sat, 30 Dec 2017 18:10:58 -0200 Subject: [PATCH 2/4] Add page extensions --- includes/header.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/header.php b/includes/header.php index 2f5092d..4f5be0c 100644 --- a/includes/header.php +++ b/includes/header.php @@ -17,10 +17,10 @@ @@ -29,4 +29,4 @@ - \ No newline at end of file + From b5d49cdbba08891f85115d98de2c5a823794e0be Mon Sep 17 00:00:00 2001 From: FabioZumbi12 Date: Sat, 30 Dec 2017 18:13:53 -0200 Subject: [PATCH 3/4] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c728a0..60faf2d 100644 --- a/README.md +++ b/README.md @@ -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 From fea853079e9695e0af559c7664fdb08d27533d4f Mon Sep 17 00:00:00 2001 From: FabioZumbi12 Date: Sat, 30 Dec 2017 18:14:25 -0200 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 60faf2d..4b96501 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ maxbans-php PHP listings script for MaxBans Demo: http://maxbans.yive.me/ - +___ **I updated to allow us to use pagination and fix other pages access.** FabioZumbi12