diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-15 06:27:40 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-15 06:27:40 +0000 |
commit | efb4189f6f4007532745bd6949484f74b4791dc9 (patch) | |
tree | 35c035395c81257bd88c016bf79bd2f6d71883aa /templates/list_header.inc | |
parent | 063e67887b48ea9ba5570638dcfaf5439f0337da (diff) | |
download | ampache-efb4189f6f4007532745bd6949484f74b4791dc9.tar.gz ampache-efb4189f6f4007532745bd6949484f74b4791dc9.tar.bz2 ampache-efb4189f6f4007532745bd6949484f74b4791dc9.zip |
yea dont code when your tried.. things seem a lot simpler then they really are
Diffstat (limited to 'templates/list_header.inc')
-rw-r--r-- | templates/list_header.inc | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/templates/list_header.inc b/templates/list_header.inc index 1ca08c4c..793e1703 100644 --- a/templates/list_header.inc +++ b/templates/list_header.inc @@ -38,6 +38,7 @@ else { $offset2 = $GLOBALS['view']->offset; if (!$GLOBALS['view']->offset) { $offset2 = "0"; } } + // Get the prev page offset $offset1 = $GLOBALS['view']->offset - $GLOBALS['view']->offset_limit; if ($offset1 < 1) { $offset1 = 0; } @@ -67,7 +68,6 @@ if (($pages > 1) && ($_SESSION['view_script'])) { </td> <td align="center"> <?php - $page_limit = '10'; $counter = 1; $offset_pages = 0; while ($counter <= $pages) { @@ -79,25 +79,8 @@ if (($pages > 1) && ($_SESSION['view_script'])) { <?php } // end if ($GLOBALS['view']->offset == $offset_pages) and else $offset_pages += $GLOBALS['view']->offset_limit; - if ($counter == $page_limit AND $pages > ($page_limit*2)) { break; } $counter++; - } // end while ($counter <= $pages) - - if ($counter < $pages) { - echo "[.....]"; - $counter = $pages - $page_limit; - while ($counter <= $pages) { - if ($GLOBALS['view']->offset == $offset_pages) { ?> - <a href="<?php echo $script; ?>?<?php echo $action ; ?>&sort_type=<?php echo $GLOBALS['view']->sort_type ; ?>&offset=<?php echo $offset_pages ; ?>&keep_view=true"><b><?php echo $counter; ?></b></a> - <?php } else { ?> - <a href="<?php echo $script; ?>?<?php echo $action; ?>&sort_type=<?php echo $GLOBALS['view']->sort_type; ?>&offset=<?php echo $offset_pages; ?>&keep_view=true"><?php echo $counter; ?></a> - <?php - } // end if ($GLOBALS['view']->offset == $offset_pages) and else - $offset_pages += $GLOBALS['view']->offset_limit; - $counter++; - } // end while ($counter <= $pages) - } // end while if we had to do a second half - ?> + } // end while ($counter <= $pages) ?> </td> <td align="center" valign="top"> <a href="<?php echo $script; ?>?<?php echo $action; ?>&offset=<?php echo $offset3; ?>&keep_view=true">[ <?php echo _("Next"); ?> ]</a> |