X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/2573a637bff34caeb3de0f3489c0c6dfbf6d2a1d..68acff62101e1c302e55befa6d526c46f15da464:/mail/index.php diff --git a/mail/index.php b/mail/index.php index d4d4c29..d8195f6 100644 --- a/mail/index.php +++ b/mail/index.php @@ -60,7 +60,13 @@ $rows = glob("$mailbox/*"); if (!$rows) { throw new Exception('Kon inbox niet openen.'); } -array_splice($rows, 0, -50); + +$nav = [ + 'start' => $_GET['start'] ?? 0, + 'n' => $_GET['n'] ?? 10, + 'total' => count($rows), +]; +$rows = array_slice(array_reverse($rows), $nav['start'], $nav['n']); ob_start(); print '\n"; + +print $Page->widget('nav', [ + "start=$nav[start]", "n=$nav[n]", "total=$nav[total]", +]); + $Page->place['maillist'] = ob_get_clean();