ex: << 1 | 2 | 3 | 4 .. 10 | 20 | 30 >>
and when you move down the line and click on say 20 the four numbers before it will adjust << 15 | 16 | 17 | 19 .. 20 | 30 | 40 >>
Can someone show me how I need to modify my script to do this? I am very frustrated
Code: Select all
// Set up pagesets for all of the records.
$now_date = date("m-d-Y");
$query2 = "select * from inventory where auction='$SESSIONїauction]'";
if ($SESSIONїconsignor]!='')
{
$query2 .= "and consignor='$SESSIONїconsignor]'";
}
if ($SESSIONїlane]!='')
{
$query2 .= "and field1='$SESSIONїlane]'";
}
$query2 .= "AND field2 >= '$now_date'";
if (!$c){
$c = pg_connect($runlistdb);
}
$r = pg_exec($c,$query2);
$numrecords = pg_numrows($r);
$pages = $numrecords/$limit;
echo '<p class="nav"><center><table cellpadding=4 ><tr>';
echo "<td><center><a href="$PHP_SELF?orderby=$orderby&sort=$sort&limit=$limit&offset=0"> << </a> </center></td> ";
for ($p=0;$p<$pages;$p++){
$newoffset = $p*$limit;
if ($p > 0){
echo ' ';
}
echo "<td><center><a href="$PHP_SELF?orderby=$orderby&sort=$sort&limit=$limit&offset=$newoffset"> " . ($p+1) . '</a> | </center></td> ';
}
$forwardoffset = $newoffset + $offset;
echo "<td><center><a href="$PHP_SELF?orderby=$orderby&sort=$sort&limit=$limit&offset=$newoffset"> >> </a> </center></td> ";
echo '</tr></table></p>';