- Added template versioning. If a template was not compiled with current haanga versi...
[haanga.git] / tests / tmp / assert_templates / load.tpl.php
blob787f6c6decbb7925e6a42ac25f58a387f753c301
1 <?php
2 $HAANGA_VERSION = '1.1.1';
3 /* Generated from /home/crodas/projects/playground/haanga/tests/assert_templates/load.tpl */
4 function haanga_8d56a9a504af63b0aa1f9e966ad860de9c65c99b($vars, $return=FALSE, $blocks=array())
6 global $test_global;
7 extract($vars);
8 if ($return == TRUE) {
9 ob_start();
11 echo '
13 $mnm_current = $page;
14 $mnm_total = ceil($total / $results_per_page);
15 $mnm_start = max($mnm_current - intval(5 / 2), 1);
16 $mnm_end = $mnm_start + 5 - 1;
17 $mnm_prev = (1 == $mnm_current ? FALSE : $mnm_current - 1);
18 $mnm_next = ($total < 0 || $mnm_current < $mnm_total ? $mnm_current + 1 : FALSE);
19 $mnm_pages = range($mnm_start, ($mnm_end < $mnm_total ? $mnm_end : $mnm_total));
20 echo '
22 if (empty($mnm_prev) === FALSE) {
23 echo '
24 <span class="nextprev">&#171; Previous</span>
26 } else {
27 echo '
28 <a href="?page'.htmlentities($mnm_prev).'">&#171; Previous</a>
31 echo '
34 if ($mnm_start > 1) {
35 echo '
36 <a href="?page=1">1</a>\';
37 <span>...</span>
40 echo '
43 foreach ($mnm_pages as $page) {
44 echo '
46 if ($mnm_current == $page) {
47 echo '
48 <span class="current">'.htmlentities($page).'</span>
50 } else {
51 echo '
52 <a href="?page='.htmlentities($page).'">'.htmlentities($page).'</a>
55 echo '
58 echo '
61 if ($mnm_total > $mnm_end) {
62 echo '
63 <span>...</span>
64 <a href="?page='.htmlentities($mnm_total).'">'.htmlentities($mnm_total).'</a>
67 echo '
70 if (empty($mnm_next) === FALSE) {
71 echo '
72 <a href="?page='.htmlentities($mnm_next).'">&#187; Next</a>
74 } else {
75 echo '
76 <span class="nextprev">&#187; Next</span>
79 echo '
81 if ($return == TRUE) {
82 return ob_get_clean();