From 14fb779ea157fd0f788f1b6e06e18524dd0e4873 Mon Sep 17 00:00:00 2001 From: Michael Clemens Date: Mon, 11 May 2009 09:23:34 +0000 Subject: [PATCH] fixed paged result table problems fixed problems with multiple servers and timemachine --- includes/functions.php | 40 +++++++++++++++++++++------------------- includes/topnav.php | 2 +- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index ab90286..575dc55 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -127,7 +127,7 @@ function initialize() { } - if (($_POST['Poll'] == "Poll Now!" || $_SESSION['timemachine']['date'] == "") && $queryarray[$GETVars['qq']]["polltype"]=="snapshot") { + if (($_POST['Poll'] == "Poll Now!" || $_SESSION['timemachine']['date'] == "") && $queryarray[$GETVars['qq']]["polltype"]=="snapshot" || $_POST['s'] != "") { $qtable = $configarray["queryarray"][$GETVars['qq']]["name"]; $sql = "SELECT MAX(TimeStamp) FROM res_".$qtable."_".$GETVars["server"]; $res = fetchArrayDB($sql, $conn); @@ -166,6 +166,7 @@ function showPageNavigation($links_per_page = "1") { global $GETVars; $page = intval($_GET['page']); + if ($page == "") $page = 1; $so = $_GET['so']; $sortcol = $_GET['sort']; @@ -213,7 +214,7 @@ function showPageNavigation($links_per_page = "1") { $numbers = ''; for( $i=$start ; $i<=$end ; $i++) { - if($i == $page) { + if($i == $page ) { $numbers .= " $i "; } else { @@ -267,7 +268,7 @@ function GetTimemachine() { if ($queryarray[$GETVars['qq']]["polltype"]=="snapshot") { $ret .= "
Time Machine

"; - $ret .= "
"; + $ret .= ""; $ret .= ""; $ret .= "
"; $ret .= "