Location: PHPKode > projects > ZompLog > layout/navbar.php
<?php

if($_GET['show']){
if(!is_numeric($_GET['show'])){ echo "Direct access is not allowed."; exit; } // no hacking around here
}

if(!isset($hide_nav)){

if ($_GET[catid]){
$catlink = "&amp;catid=$_GET[catid]";
}

if ($_GET[username]){
$userlink = "&amp;username=$_GET[username]";
}

if ($_GET[search]){
$searchlink = "&amp;search=$_GET[search]";
}

// this is for the plugin filters
if ($_GET[$filter]){
$filterlink = "&amp;$filter=$_GET[$filter]";
}

$paging = ceil ($numrows / $limit);
?>


<div id="navrow"><span class="right"><?php
// first, previous
if ($display > 1) {
	$previous = $display - 1;
	echo "<a href=\"$_SERVER[PHP_SELF]?show=1$catlink$userlink$searchlink$filterlink\">$lang_first</a> |";
	echo " <a href=\"$_SERVER[PHP_SELF]?show=$previous$catlink$userlink$searchlink$filterlink\">$lang_previous</a> ";

}
?></span>


<span class="left">
<?php
	// page numbers
if ($numrows != $limit) {
	if ($paging > $scroll) {
		$first = $_GET[show];
		$last = ($scroll - 1) + $_GET[show];
	} else {
		$first = 1;
		$last = $paging;
	}
		if ($last > $paging ) {
			$first = $paging - ($scroll - 1);
			$last = $paging;
	}
	for ($i = $first;$i <= $last;$i++){
		if ($display == $i) {
			echo "<b>$i</b>";
		} else {
			echo " <a href=\"$_SERVER[PHP_SELF]?show=$i$catlink$userlink$searchlink$filterlink\">$i</a> ";
		}
	}
}
?>
</span>


<span class="right">
<?php
// next, last
if ($display < $paging) {
	$next = $display + 1;
	echo " <a href=\"$_SERVER[PHP_SELF]?show=$next$catlink$userlink$searchlink$filterlink\">$lang_next</a> ";
	echo "| <a href=\"$_SERVER[PHP_SELF]?show=$last$catlink$userlink$searchlink$filterlink\">$lang_last</a> ";
}
?></span>


</div>

<?php } ?>
Return current item: ZompLog