Location: PHPKode > scripts > Open4Listing > navig.php
<?php
// print the link to access each page
$self = "";
$nav  = '';







for($page=1; $page <= $maxPage; $page++)
{
   if ($page == $pageNum)
   {$nav .= "<font color=red size=1 face=verdana>$page</font>&nbsp; &nbsp;";}
   else
   {$nav .= "<a href=\"$self?page=$page\"><font color=#666666 size=1 face=verdana><b>$page</font></b></a>&nbsp; &nbsp; ";} 
}






if ($pageNum > 1)
{
   $page  = $pageNum - 1;
   $prev  = "<span style=background-color:#000000><a href=\"$self?categ=$categ2&page=$page\"><font color=#ffffff size=1 face=verdana><b>&nbsp;&laquo; previous&nbsp;</b></a></span>&nbsp; &nbsp;";

   $first = " <a href=\"$self\"><font color=#666666 size=1 face=verdana><< Prima pagina</a>&nbsp; &nbsp;  ";
} 
else
{
   $prev  = '&nbsp;'; // we're on page one, don't print previous link
   $first = '&nbsp;'; // nor the first page link
}

if ($pageNum < $maxPage)
{
   $page = $pageNum + 1;
   $next = "<span style=background-color:#000000><a href=\"$self?categ=$categ2&page=$page\"><font color=#ffffff size=1 face=verdana><b>&nbsp;next &raquo; &nbsp;</b></a></span> &nbsp; &nbsp;";

   $last = "<a href=\"$self?page=$maxPage\"><font color=#666666 size=1 face=verdana>ultima pagina >></a>&nbsp; &nbsp;  ";
} 
else
{
   $next = '&nbsp;'; // we're on the last page, don't print next link
   $last = '&nbsp;'; // nor the last page link
}

// print the navigation link
echo $prev . $next;
;
?>
Return current item: Open4Listing