Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage
Php > Site Navigation sample source codes
Another Paging with Stage
Another Paging with Stage rowperpage = 50; $this->pageperstg = 20; } function getPaging($rownum, $pg="1", $stg="1") { $arr = explode("&",$_SERVER["QUERY_STRING"]); if (is_array($arr)) { for ($i=0;$i
rowperpage<$rownum) { $allpage = ceil($rownum/$this->rowperpage); $allstg = ceil($allpage/$this->pageperstg); $minpage = (($stg-1)*$this->pageperstg)+1; $maxpage = $stg*$this->pageperstg; if ($maxpage>$allpage) $maxpage = $allpage; if ($allpage>1) { $rtn = "
"; if ($stg>1) $rtn .= "
Previous Stage</a> | "; if ($pg>1) { if ($pg==$minpage) { $rtn .= "
Previous</a> | "; } else { $rtn .= "
Previous</a> | "; } } for ($i=$minpage;$i<=$maxpage;$i++) { if ($i==$pg) { $rtn .= "
$i</b> | "; } else { $rtn .= "
$i</a> | "; } } if ($pg<=$maxpage) { if ($pg==$maxpage && $stg<$allstg) { $rtn .= "
Next</a> | "; } elseif ($pg<$maxpage) { $rtn .= "
Next</a> | "; } } if ($stg<$allstg) $rtn .= "
Next Stage</a> | "; $rtn = substr($rtn,0,strlen($rtn)-3); $rtn .= "</td></tr></table>"; return $rtn; } } } }; ?>
Privacy Policy
|
Link to Us
|
Links