Moving Page Forward and Backward to Function

This commit is contained in:
2025-05-28 16:24:43 +02:00
parent f92f48b0af
commit 5a88f2b536
5 changed files with 12 additions and 4 deletions
+8
View File
@@ -325,6 +325,10 @@ class furatalogLib {
$currentpage = (isset($_GET["p"]) ? $_GET["p"] : 1);
$currentMaxPages = $this->maxpages;
if (!($currentpage <= 1)) {
echo "<a class=\"prev\" href=\"?p=" . ($currentpage-1) . "\"><</a>";
}
for ($i = $currentpage-1; $i > 0; $i--) {
if (($i+1) == 1) return;
echo "<a class=\"number\" href=\"?p=" . $i . "\">" . $i . "</a>";
@@ -336,5 +340,9 @@ class furatalogLib {
if ($currentMaxPages == $currentpage) return;
echo "<a class=\"number\" href=\"?p=" . $i . "\">" . $i . "</a>";
}
if (!($currentpage >= $currentMaxPages)) {
echo "<a class=\"prev\" href=\"?p=" . ($currentpage+1) . "\"><</a>";
}
}
}