@@ 202-202 (lines=1) @@ | ||
199 | ||
200 | // First / previous |
|
201 | if ($this->cur_page > 1) { |
|
202 | if ($this->first != '') $r .= '<a class="first" href="' . $url_start . '1' . $url_end . '">'.$this->first.'</a> '; |
|
203 | if ($this->previous != '') $r .= '<a class="previous" href="' . $url_start . ($cur_page - 1) . $url_end . '">'.$this->previous.'</a> '; |
|
204 | } |
|
205 | ||
@@ 203-203 (lines=1) @@ | ||
200 | // First / previous |
|
201 | if ($this->cur_page > 1) { |
|
202 | if ($this->first != '') $r .= '<a class="first" href="' . $url_start . '1' . $url_end . '">'.$this->first.'</a> '; |
|
203 | if ($this->previous != '') $r .= '<a class="previous" href="' . $url_start . ($cur_page - 1) . $url_end . '">'.$this->previous.'</a> '; |
|
204 | } |
|
205 | ||
206 | // You can optimize this separating BEFORE and AFTER current page in two for (to avoid load "if" in each loop) |
|
@@ 215-215 (lines=1) @@ | ||
212 | ||
213 | // next / last |
|
214 | if ($this->cur_page < $this->total_pages) { |
|
215 | if ($this->next != '') $r .= '<a class="next" href="' . $url_start . ($cur_page + 1) . $url_end . '">'.$this->next.'</a> '; |
|
216 | if ($this->last != '') $r .= '<a class="last" href="' . $url_start . $this->total_pages . $url_end .'">'.$this->last.'</a> '; |
|
217 | } |
|
218 | ||
@@ 216-216 (lines=1) @@ | ||
213 | // next / last |
|
214 | if ($this->cur_page < $this->total_pages) { |
|
215 | if ($this->next != '') $r .= '<a class="next" href="' . $url_start . ($cur_page + 1) . $url_end . '">'.$this->next.'</a> '; |
|
216 | if ($this->last != '') $r .= '<a class="last" href="' . $url_start . $this->total_pages . $url_end .'">'.$this->last.'</a> '; |
|
217 | } |
|
218 | ||
219 | // End div (if exist) |