Implemented "First" and "Last" link for search results (fixes FS#15690).

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-01-20 20:09:33 +01:00
parent ec0dfc27de
commit 517ac744b2

View file

@ -131,6 +131,7 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
$O = 0; $O = 0;
} }
?> ?>
<a class="page_num" href="packages.php?<?php print mkurl("O=0") ?>"><?php echo __('First') ?></a>
<a class="page_num" href="packages.php?<?php print mkurl("O=$O") ?>"><?php echo __('Previous') ?></a> <a class="page_num" href="packages.php?<?php print mkurl("O=$O") ?>"><?php echo __('Previous') ?></a>
<?php endif; ?> <?php endif; ?>
@ -171,6 +172,7 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
<?php if ($total - $_GET['PP'] - $_GET['O'] > 0): ?> <?php if ($total - $_GET['PP'] - $_GET['O'] > 0): ?>
<a class="page_num" href='packages.php?<?php print mkurl('O=' . ($_GET['O'] + $_GET['PP'])) ?>'><?php echo __('Next') ?></a> <a class="page_num" href='packages.php?<?php print mkurl('O=' . ($_GET['O'] + $_GET['PP'])) ?>'><?php echo __('Next') ?></a>
<a class="page_num" href='packages.php?<?php print mkurl('O=' . ($total - $_GET['PP'])) ?>'><?php echo __('Last') ?></a>
<?php endif; ?> <?php endif; ?>
</div> </div>