?
Current Path : /home1/savoy/public_html/savoyglobal.net/futuredraft/application/libraries/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/futuredraft/application/libraries/Fpaginate.php |
<?php class Fpaginate { function paginate($currentpagenum,$count) { $CI =& get_instance(); $nooflist= $CI->config->item('nooflist'); $perpage= $CI->config->item('perpage'); $maxpage= ceil($count/$perpage); //no of pages to display $maxpagetodisplay=$maxpage; $startpage=1; //calculate the max no list to display if(($currentpagenum + ($nooflist/2))<$maxpage) { $maxpagetodisplay=ceil($currentpagenum + ($nooflist/2)); } else { $maxpagetodisplay=$maxpage; } //calculate the starting list no if($currentpagenum>=$nooflist) { $startpage=ceil($currentpagenum-($nooflist/2)); } if($currentpagenum) $start = ($currentpagenum-1)*$perpage; else $start=0; $arr[0]=$startpage; $arr[1]=$maxpagetodisplay; $arr[2]=$start; $arr[3]=$perpage; return $arr; } }