Fix pagination nav (prev, next)

This commit is contained in:
Knah Tsaeb 2024-03-19 16:59:01 +01:00
parent 34b1e135c6
commit 347f243c58
3 changed files with 7 additions and 2 deletions

View File

@ -131,6 +131,7 @@ class Backend {
$inError = $conx->getInError();
$inQueue = $this->getInQueue();
$start = $this->start;
$max = $this->max;
$next = $start + $max;
$previous = $start - ($max);
@ -141,7 +142,7 @@ class Backend {
}
if ($previous < 0) {
$previous = 0;
$previous = null;
}
require __DIR__ . '/../../tpl/infos.php';

View File

@ -3,6 +3,6 @@ namespace App\Controllers;
class GenHmac {
function index($params, $conf) {
echo hash_hmac('sha1', $params->url, $conf['key']);
echo hash_hmac('sha1', $params->url, $conf->key);
}
}

View File

@ -54,8 +54,12 @@ use App\Utils\Domains;
<div class="w3-center w3-margin-top">
<div class="w3-bar">
<?php if($start > 0) : ?>
<a href="?page=infos&start=<?= $previous; ?>" class="w3-teal w3-button">&laquo; Previous</a>
<?php endif; ?>
<?php if($next != $start): ;?>
<a href="?page=infos&start=<?= $next; ?>" class="w3-teal w3-button">Next &raquo; </a>
<?php endif; ?>
</div>
</div>
</div>