diff options
-rw-r--r-- | query.php | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -35,13 +35,15 @@ return; printf("<br>\n<div id='footer'>\n"); + $_SERVER['REQUEST_URI'] = preg_replace("/&page=[0-9]+/i", "", + $_SERVER['REQUEST_URI']); if ($page > 1) printf("<a href='%s&page=1'><<</a> <a href='%s&page=%d'><</a> ", $_SERVER['REQUEST_URI'], $_SERVER['REQUEST_URI'], $page - 1); for ($i = $page; $i <= ($res[1]["pages"] > $page + 10 ? $page + 10 : $res[1]["pages"]); $i++) printf("<a href='%s&page=%d'>%d</a> ", $_SERVER['REQUEST_URI'], $i, $i); if ($page != $res[1]["pages"]) - printf("<a href='%s&page=%d'>></a> <a href='%s&page=%d'>>></a> ", + printf("<a href='%s&page=%s'>></a> <a href='%s&page=%s'>>></a> ", $_SERVER['REQUEST_URI'], $page + 1, $_SERVER['REQUEST_URI'], $res[1]["pages"]); printf("</div>\n<br><br>\n"); |