function _pageft ($totle, $displaypg = $url = ') {
Global $page, $firstcount, $pagenav, $_server;
$globals ["displaypg"] = $DISPLAYPG;
if (! $page)
$page = 1;
if (! $url) {
$url = $_server["Request_uri"];
}
//url Analysis:
$parse _url = Parse_url ($url);
$url _query = $parse _url["Query "]; Query string
if ($url _query) {
$url _query = ereg_replace ("(^|&) page=$" for individual removal of URLs Page "," ", $url _query);
$url = str_replace ($parse _url["Query"), $url _query, $url);
if ($url _query)
$url. = "&page";
else
$url. = "page";
} else {
$url. = "? page";
}
$lastpg = ceil ($totle /$DISPLAYPG); Last page, is also the total number of pages
$page = min ($lastpg, $page);
$PREPG = $page-1;//prev
$ NEXTPG = ($page = = $LASTPG 0: $page + 1); Next page
$firstcount = ($page-1) * $DISPLAYPG;
To start the pager bar code:
$pagenav = "Show <b>". ($totle? ($firstcount + 1): 0). "</b>-<b>". Min ($firstcount + $DISPLAYPG, $totle). "</b> Records, a total of $totle records";