From bcad40a05ab2dc2a341a3227e30b96668bce4500 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 9 Jun 2005 16:34:40 +0000 Subject: New Import --- templates/list_header.inc | 99 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 templates/list_header.inc (limited to 'templates/list_header.inc') diff --git a/templates/list_header.inc b/templates/list_header.inc new file mode 100644 index 00000000..658d0972 --- /dev/null +++ b/templates/list_header.inc @@ -0,0 +1,99 @@ +offset >= $view->offset_limit ) { + $offset2 = $view->offset - 25; +} +else { + $offset2 = $view->offset; + if (!$view->offset) { $offset2 = "0"; } +} + +// Get the prev page offset +$offset1 = $view->offset - $view->offset_limit; +if ($offset1 < 1) { $offset1 = 0; } + + +// since we have an array of objects, let's build a purdy thingie +$pages = ceil($total_items/$view->offset_limit); + +$offset4 = ($pages - 1); +$offset4 = ($offset4 * $view->offset_limit); + +//We do this one last to make sure we don't go beyond offset4 +$offset3 = $view->offset + $view->offset_limit; +if ($offset3 >= $offset4) { $offset3 = $offset4; } + + +//setup the next action +preg_match("/.*\/(.+\.php)$/",$_SERVER['SCRIPT_NAME'],$matches); + +$action = "action=" . scrub_in($_REQUEST['action']); +$script = conf('web_path') . "/" . $admin_menu . $matches[1]; + +// are there enough items to even need this view? +if ( $pages > 1 && $_SESSION['view_script']) { +?> + + + + + + + +
+  ]  + + offset == $offset_pages ) { + ?> +   + +   + offset_limit; + $counter++; + } + ?> + +  ]  +
+ + -- cgit