|
@@ 35-48 (lines=14) @@
|
| 32 |
|
} |
| 33 |
|
$counter = 1; |
| 34 |
|
$current_page = intval(floor(($this->current + $this->perpage) / $this->perpage)); |
| 35 |
|
while ( $counter <= $total_pages ) { |
| 36 |
|
if ( $counter == $current_page ) { |
| 37 |
|
$ret .= '<strong>(' . $counter . ')</strong> '; |
| 38 |
|
} elseif ( ($counter > $current_page-$offset && $counter < $current_page + $offset ) || $counter == 1 || $counter == $total_pages ) { |
| 39 |
|
if ( $counter == $total_pages && $current_page < $total_pages - $offset ) { |
| 40 |
|
$ret .= '... '; |
| 41 |
|
} |
| 42 |
|
$ret .= '<a href="' . $this->url . (($counter - 1) * $this->perpage) . '">' . $counter . '</a> '; |
| 43 |
|
if ( $counter == 1 && $current_page > 1 + $offset ) { |
| 44 |
|
$ret .= '... '; |
| 45 |
|
} |
| 46 |
|
} |
| 47 |
|
$counter++; |
| 48 |
|
} |
| 49 |
|
$next = $this->current + $this->perpage; |
| 50 |
|
if ( $this->total > $next ) { |
| 51 |
|
$ret .= '<a href="' . $this->url . $next . '"><u>»</u></a> '; |
|
@@ 103-116 (lines=14) @@
|
| 100 |
|
} |
| 101 |
|
$counter = 1; |
| 102 |
|
$current_page = intval(floor(($this->current + $this->perpage) / $this->perpage)); |
| 103 |
|
while ( $counter <= $total_pages ) { |
| 104 |
|
if ( $counter == $current_page ) { |
| 105 |
|
$ret .= '<td class="pagact"><b>'.$counter.'</b></td>'; |
| 106 |
|
} elseif ( ($counter > $current_page-$offset && $counter < $current_page + $offset ) || $counter == 1 || $counter == $total_pages ) { |
| 107 |
|
if ( $counter == $total_pages && $current_page < $total_pages - $offset ) { |
| 108 |
|
$ret .= '<td class="paginact">...</td>'; |
| 109 |
|
} |
| 110 |
|
$ret .= '<td class="paginact"><a href="'.$this->url.(($counter - 1) * $this->perpage).'">'.$counter.'</a></td>'; |
| 111 |
|
if ( $counter == 1 && $current_page > 1 + $offset ) { |
| 112 |
|
$ret .= '<td class="paginact">...</td>'; |
| 113 |
|
} |
| 114 |
|
} |
| 115 |
|
$counter++; |
| 116 |
|
} |
| 117 |
|
$next = $this->current + $this->perpage; |
| 118 |
|
if ( $this->total > $next ) { |
| 119 |
|
$ret .= '<td><img src="'.XOOPS_URL.'/images/blank.gif" width="6" alt=""></td><td class="pagneutral"><a href="'.$this->url.$next.'">></a></td>'; |