Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function paginator ($paginator) {
- if ($paginator['paginCountPost'] > $paginator['paginLimitPerPage']) {
- $countPages = 0;
- $countPages = ceil($paginator['paginCountPost']/$paginator['paginLimitPerPage']) + 1;
- for ($i=0; $i<$paginator['paginCountPost']; $i+=$paginator['paginLimitPerPage']) {
- $countPages--;
- if ($paginator['nowPageStart'] == $countPages) {
- echo '<b>'.$countPages.'</b> ';
- } else {
- $countPagesUrl = $countPages == 1 ? '' : 'page/' . $countPages;
- echo '<a href="'.$paginator['paginMaskUrlPage'].'/'.$countPagesUrl.'">'.$countPages.'</a> ';
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement