Moving Page Forward and Backward to Function
This commit is contained in:
@@ -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>";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user