input->get('p'); if(!$page) $page = 1; if($_page > 0) $page = $_page; $array = array(); $i=0; $endRow = $page * $row; $startRow = ($page * $row) - $row; foreach($items as $key => $item): if($i >= $startRow && $i < $endRow): $array[$key] = $item; endif; $i++; endforeach; return $array; } } if ( ! function_exists('cratePagination')) { function cratePagination($items = array(),$class = 'pagination_links',$row = 6, $_page = 0) { $page = ci()->input->get('p'); if(!$page) $page = 1; if($_page > 0) $page = $_page; $itemCount = count($items); $pageCount = $itemCount / $row; $intPageCount = (int) $pageCount; if($pageCount > $intPageCount): $intPageCount++; endif; $url = getFullUrl(); $url = explode('?',$url); $url = $url[0]; $pagerLink = $url.'?'; if(isset($getVars['p'])): unset($getVars['p']); if(count($getVars) > 0): foreach($getVars as $key => $var) $pagerLink .= $key.'='.$var.'&'; endif; $pagerLink .= 'p='; else: $pagerLink .= 'p='; endif; $html = ''; return $html; } } ?> Mehmet Ozsoy
Yapım Aşamasında!