<?
/*
Graphical Navigation Bar Example By Mehdi Safavy For PHPclasses.org Members
Send Me Your Attentions To Info@wondercoder.com
2008-2009
*/
include_once("navigator.php");
$Navigator = New navigator();
$Navigator->DistancePages = 4;
$Navigator->PerPageRows = 20;
$offset=(!$_GET[offset])?0:$_GET[offset];//only for test
$numberOfrows=200;//only for test.this is your sql rows count
echo "<table width=100% height='60%'>
<tr>
<td width='80%' bgcolor='#d0d0d0' align='center'>
Example Sql May Be Like This:<br>
SELECT * FROM product WHERE
product.category='$_GET[c_id]'
AND product.publish='Y'
ORDER BY list_order ASC
LIMIT <span style='background:#0099FF'> $offset,".$Navigator->PerPageRows."</span>
</td>
</tr>
</table>";
$Navigator->MakeFooter("TestPage",$offset,$numberOfrows,"&c_id=1");
?>
|