|
@@ 87-100 (lines=14) @@
|
| 84 |
|
} |
| 85 |
|
$counter = 1; |
| 86 |
|
$current_page = (int)floor(($this->current + $this->perpage) / $this->perpage); |
| 87 |
|
while ($counter <= $total_pages) { |
| 88 |
|
if ($counter == $current_page) { |
| 89 |
|
$ret .= '<b>(' . $counter . ')</b> '; |
| 90 |
|
} elseif (($counter > $current_page - $offset && $counter < $current_page + $offset) || 1 == $counter |
| 91 |
|
|| $counter == $total_pages) { |
| 92 |
|
if ($counter == $total_pages && $current_page < $total_pages - $offset) { |
| 93 |
|
$ret .= '... '; |
| 94 |
|
} |
| 95 |
|
$ret .= '<a href="' . $this->url . (($counter - 1) * $this->perpage) . '">' . $counter . '</a> '; |
| 96 |
|
if (1 == $counter && $current_page > 1 + $offset) { |
| 97 |
|
$ret .= '... '; |
| 98 |
|
} |
| 99 |
|
} |
| 100 |
|
++$counter; |
| 101 |
|
} |
| 102 |
|
$next = $this->current + $this->perpage; |
| 103 |
|
if ($this->total > $next) { |
|
@@ 213-226 (lines=14) @@
|
| 210 |
|
} |
| 211 |
|
$counter = 1; |
| 212 |
|
$current_page = (int)floor(($this->current + $this->perpage) / $this->perpage); |
| 213 |
|
while ($counter <= $total_pages) { |
| 214 |
|
if ($counter == $current_page) { |
| 215 |
|
$ret .= '<td class="pagact"><b>' . $counter . '</b></td>'; |
| 216 |
|
} elseif (($counter > $current_page - $offset && $counter < $current_page + $offset) || 1 == $counter |
| 217 |
|
|| $counter == $total_pages) { |
| 218 |
|
if ($counter == $total_pages && $current_page < $total_pages - $offset) { |
| 219 |
|
$ret .= '<td class="paginact">...</td>'; |
| 220 |
|
} |
| 221 |
|
$ret .= '<td class="paginact"><a href="' . $this->url . (($counter - 1) * $this->perpage) . '">' . $counter . '</a></td>'; |
| 222 |
|
if (1 == $counter && $current_page > 1 + $offset) { |
| 223 |
|
$ret .= '<td class="paginact">...</td>'; |
| 224 |
|
} |
| 225 |
|
} |
| 226 |
|
++$counter; |
| 227 |
|
} |
| 228 |
|
$next = $this->current + $this->perpage; |
| 229 |
|
if ($this->total > $next) { |