1) { ?>
=5) {
$maxp=5;
}else{
$maxp=$totpg;
}
}else{
if (($actpg+2)<=$totpg) {
$maxp=$actpg+2;
}else{
$maxp=$totpg;
if (($maxp==$totpg) && (($minp-2)>1)) {
$minp=$totpg-2;
}
}
}
if ($actpg!=1){
echo "
<< PREV ";
}
for ($x=$minp;$x<=$maxp;$x++){
if ($x==$actpg) {
echo "
" . $x . " ";
}else{
echo "
" . $x ." ";
}
}
if ($actpg!=$totpg){
echo "
NEXT >> "; }?>