| | | |
 

 
© Copyright Express Audio Industry Sdn Bhd, powered by infozone
 
News & Events
 
Date Post :
News Title :
1) { //previous button if ($page > 1) $pagination_word.= " < Previous"; //pages if ($lastpage < 7 + ($adjacents * 2)) //not enough pages to bother breaking it up { for ($counter = 1; $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination_num.= " $counter | "; else $pagination_num.= " $counter | "; } } elseif($lastpage > 5 + ($adjacents * 2)) //enough pages to hide some { //close to beginning; only hide later pages if($page < 1 + ($adjacents * 2)) { for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) { if ($counter == $page) $pagination_num.= " $counter | "; else $pagination_num.= " $counter | "; } $pagination_num.= " ..."; $pagination_num.= " $lpm1"; $pagination_num.= " $lastpage"; } //in middle; hide some front and some back elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) { $pagination_num.= " 1 | "; $pagination_num.= " 2"; $pagination_num.= " ..."; for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) { if ($counter == $page) $pagination_num.= " $counter | "; else $pagination_num.= " $counter | "; } $pagination_num.= "..."; $pagination_num.= " $lpm1"; $pagination_num.= " $lastpage"; } //close to end; only hide early pages else { $pagination_num.= " 1 | "; $pagination_num.= " 2"; $pagination_num.= "..."; for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) { if ($counter == $page) $pagination_num.= " $counter"; else $pagination_num.= " $counter"; } } } //next button if ($page < $counter - 1) { if($pagination_word != "") $pagination_word .= " | "; $pagination_word.= " Next >"; } } ?>
  Date Post : News Title