@@ 20-29 (lines=10) @@ | ||
17 | <?php endif ?> |
|
18 | ||
19 | ||
20 | <?php for ($i = 1; $i <= $total_pages; $i++): ?> |
|
21 | ||
22 | <?php if ($i == $current_page): ?> |
|
23 | <strong><?php echo $i ?></strong> |
|
24 | <?php else: ?> |
|
25 | <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> |
|
26 | <?php endif ?> |
|
27 | ||
28 | <?php endfor ?> |
|
29 | ||
30 | ||
31 | <?php if ($next_page): ?> |
|
32 | <a href="<?php echo str_replace('{page}', $next_page, $url) ?>">></a> |
@@ 20-27 (lines=8) @@ | ||
17 | ||
18 | <?php if ($total_pages < 13): /* « Previous 1 2 3 4 5 6 7 8 9 10 11 12 Next » */ ?> |
|
19 | ||
20 | <?php for ($i = 1; $i <= $total_pages; $i++): ?> |
|
21 | <?php if ($i == $current_page): ?> |
|
22 | <strong><?php echo $i ?></strong> |
|
23 | <?php else: ?> |
|
24 | <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> |
|
25 | <?php endif ?> |
|
26 | <?php endfor ?> |
|
27 | ||
28 | <?php elseif ($current_page < 9): /* « Previous 1 2 3 4 5 6 7 8 9 10 … 25 26 Next » */ ?> |
|
29 | ||
30 | <?php for ($i = 1; $i <= 10; $i++): ?> |
|
@@ 30-37 (lines=8) @@ | ||
27 | ||
28 | <?php elseif ($current_page < 9): /* « Previous 1 2 3 4 5 6 7 8 9 10 … 25 26 Next » */ ?> |
|
29 | ||
30 | <?php for ($i = 1; $i <= 10; $i++): ?> |
|
31 | <?php if ($i == $current_page): ?> |
|
32 | <strong><?php echo $i ?></strong> |
|
33 | <?php else: ?> |
|
34 | <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> |
|
35 | <?php endif ?> |
|
36 | <?php endfor ?> |
|
37 | ||
38 | … |
|
39 | <a href="<?php echo str_replace('{page}', $total_pages - 1, $url) ?>"><?php echo $total_pages - 1 ?></a> |
|
40 | <a href="<?php echo str_replace('{page}', $total_pages, $url) ?>"><?php echo $total_pages ?></a> |
|
@@ 48-55 (lines=8) @@ | ||
45 | <a href="<?php echo str_replace('{page}', 2, $url) ?>">2</a> |
|
46 | … |
|
47 | ||
48 | <?php for ($i = $total_pages - 9; $i <= $total_pages; $i++): ?> |
|
49 | <?php if ($i == $current_page): ?> |
|
50 | <strong><?php echo $i ?></strong> |
|
51 | <?php else: ?> |
|
52 | <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> |
|
53 | <?php endif ?> |
|
54 | <?php endfor ?> |
|
55 | ||
56 | <?php else: /* « Previous 1 2 … 5 6 7 8 9 10 11 12 13 14 … 25 26 Next » */ ?> |
|
57 | ||
58 | <a href="<?php echo str_replace('{page}', 1, $url) ?>">1</a> |
|
@@ 62-69 (lines=8) @@ | ||
59 | <a href="<?php echo str_replace('{page}', 2, $url) ?>">2</a> |
|
60 | … |
|
61 | ||
62 | <?php for ($i = $current_page - 5; $i <= $current_page + 5; $i++): ?> |
|
63 | <?php if ($i == $current_page): ?> |
|
64 | <strong><?php echo $i ?></strong> |
|
65 | <?php else: ?> |
|
66 | <a href="<?php echo str_replace('{page}', $i, $url) ?>"><?php echo $i ?></a> |
|
67 | <?php endif ?> |
|
68 | <?php endfor ?> |
|
69 | ||
70 | … |
|
71 | <a href="<?php echo str_replace('{page}', $total_pages - 1, $url) ?>"><?php echo $total_pages - 1 ?></a> |
|
72 | <a href="<?php echo str_replace('{page}', $total_pages, $url) ?>"><?php echo $total_pages ?></a> |