This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . ************************************************************************ */ include_once "includes/functions.php"; initialize(); ?> TSM Monitor
(Values marked with '*' are cached results)

"; // show admin page } else if ( $GETVars['qq'] == "admin" ) { echo "nothing to see here"; // show serverlist } else if ( $GETVars['qq'] == "serverlist" ) { echo getServerlist(); // show graphical chart } else if ( strstr($GETVars['qq'], 'timetable')) { if ($_POST["edit"] == "edit") { echo showEdit(); }else { $timesteps = array("1 hour" => "1", "6 hours" => "6", "12 hours" => "12", "24 hours" => "24"); echo "
"; if ($queryarray[$GETVars['qq']]["searchfield"] != "") { // get value from combobox if ($_POST["timestep"] != "") { $_SESSION['selectedtimestep'] = $_POST["timestep"]; } echo "
"; echo ""; echo ""; echo ""; echo "
"; if ($_POST["back"] != "") { $_SESSION['timeshift'] += $_SESSION['selectedtimestep']; } if ($_POST["forward"] != "") { $_SESSION['timeshift'] -= $_SESSION['selectedtimestep']; } if ($_SESSION['timeshift'] < 0) { $_SESSION['timeshift'] = 0; } } $searchfield = 24 + $_SESSION['timeshift']; $tablearray = execute($query, 'no', 'timetable'); $headerarray = $queryarray[$GETVars['qq']]["header"]["column"]; echo generate_timetable($tablearray, $headerarray[0]); echo "
"; } // "vertical" table } else if ( strstr($GETVars['qq'], 'vertical')) { if ($_POST["edit"] == "edit") { echo showEdit(); }else { $i = 0; $headerarray = $queryarray[$GETVars['qq']]["header"]["column"]; $tablearray = execute($query, 'no', 'verticaltable'); echo ""; for ( $co = 0; $co <= count($headerarray); $co++) { if ($i == 0) { echo ""; $i = 1; } else { echo ""; $i = 0; } echo ""; } echo "
".$headerarray[$co]['label']."".$tablearray[$co]."
"; } // show normal table layout } else { if ($_POST["Edit"] == "Edit") { echo showEdit(); }else { if ($_POST["Save"] == "Save") { saveQuery(); } if ($_POST["Refresh"] == "Refresh") { $_SESSION["cachedqueries"][$GETVars['server']][$query]["timestamp"] = ''; } $cache = $queryarray[$GETVars['qq']]["cache"]; $searchfieldxml = $queryarray[$GETVars['qq']]["searchfield"]; if (isset($searchfieldxml) && $searchfieldxml != "") { echo getSearchfield(); } $searchfield = $_POST["searchfield"]; if ($searchfield == "" && $_GET['sf']!=""){ $searchfield = $_GET['sf']; } if ( $searchfieldxml == "" || $searchfield != "") { echo ""; echo get_tableheader($queryarray[$GETVars['qq']]["header"]["column"]); echo execute($query, 'no', 'table', $cache); echo "
"; } } } } } else { if (!$bLoginOK){ $errormsg = "Login failed!"; }else{ $errormsg = "Login"; } session_unset(); $_SESSION=array(); include_once "includes/login.php"; } $_SESSION['from'] = $GETVars['qq']; session_write_close(void); ?>