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++; } ?> | [ ] |