|
@@ 50-63 (lines=14) @@
|
| 47 |
|
} |
| 48 |
|
$counter = 1; |
| 49 |
|
$current_page = (int)floor(($this->current + $this->perpage) / $this->perpage); |
| 50 |
|
while ($counter <= $total_pages) { |
| 51 |
|
if ($counter == $current_page) { |
| 52 |
|
$ret .= '<strong>(' . $counter . ')</strong> '; |
| 53 |
|
} elseif (($counter > $current_page - $offset && $counter < $current_page + $offset) || $counter == 1 |
| 54 |
|
|| $counter == $total_pages |
| 55 |
|
) { |
| 56 |
|
if ($counter == $total_pages && $current_page < $total_pages - $offset) { |
| 57 |
|
$ret .= '... '; |
| 58 |
|
} |
| 59 |
|
$ret .= '<a href="' . $this->url . (($counter - 1) * $this->perpage) . '">' . $counter . '</a> '; |
| 60 |
|
if ($counter == 1 && $current_page > 1 + $offset) { |
| 61 |
|
$ret .= '... '; |
| 62 |
|
} |
| 63 |
|
} |
| 64 |
|
$counter++; |
| 65 |
|
} |
| 66 |
|
$next = $this->current + $this->perpage; |
|
@@ 128-141 (lines=14) @@
|
| 125 |
|
} |
| 126 |
|
$counter = 1; |
| 127 |
|
$current_page = (int)floor(($this->current + $this->perpage) / $this->perpage); |
| 128 |
|
while ($counter <= $total_pages) { |
| 129 |
|
if ($counter == $current_page) { |
| 130 |
|
$ret .= '<td class="pagact"><b>' . $counter . '</b></td>'; |
| 131 |
|
} elseif (($counter > $current_page - $offset && $counter < $current_page + $offset) || $counter == 1 |
| 132 |
|
|| $counter == $total_pages |
| 133 |
|
) { |
| 134 |
|
if ($counter == $total_pages && $current_page < $total_pages - $offset) { |
| 135 |
|
$ret .= '<td class="paginact">...</td>'; |
| 136 |
|
} |
| 137 |
|
$ret .= '<td class="paginact"><a href="' . $this->url . (($counter - 1) * $this->perpage) . '">' . $counter . '</a></td>'; |
| 138 |
|
if ($counter == 1 && $current_page > 1 + $offset) { |
| 139 |
|
$ret .= '<td class="paginact">...</td>'; |
| 140 |
|
} |
| 141 |
|
} |
| 142 |
|
$counter++; |
| 143 |
|
} |
| 144 |
|
$next = $this->current + $this->perpage; |