Fix pagination nav (prev, next)
This commit is contained in:
parent
34b1e135c6
commit
347f243c58
3 changed files with 7 additions and 2 deletions
|
@ -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';
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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">« Previous</a>
|
||||
<?php endif; ?>
|
||||
<?php if($next != $start): ;?>
|
||||
<a href="?page=infos&start=<?= $next; ?>" class="w3-teal w3-button">Next » </a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue