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 . ************************************************************************ */ /** * * index.php, TSM Monitor * * main php file * * @author Michael Clemens * @package tsmmonitor */ include_once "includes/global.php"; include_once "includes/page_head.php"; if ($_POST["css"] != "") { $_SESSION['stylesheet'] = $_POST["css"]; } ?>
GETVars['qq'], array("admin", "serverlist", "custom", "polldstat", "index", "overview", "")) && !strstr($tsmmonitor->GETVars['qq'], 'table') ) { echo $tsmmonitor->getSearchfield(); } ?>



GETVars['qq'] != "logout" && $_SESSION["logindata"]["loggedin"]){ if ($tsmmonitor->GETVars['qq'] != "" && $tsmmonitor->GETVars['qq'] != "overview"){ // show overview page if ($tsmmonitor->GETVars['qq'] == "index") { include_once "includes/overview.php" ; // show polld status } else if ($tsmmonitor->GETVars['qq'] == "polldstat") { echo $tsmmonitor->getPollDStat(); // show serverlist } else if ( $tsmmonitor->GETVars['qq'] == "serverlist" ) { echo $tsmmonitor->getServerlist(); // show graphical chart (timetable) } else if ( strstr($tsmmonitor->GETVars['qq'], 'timetable')) { if ($_POST["back"] != "") { $_SESSION['timeshift'] += $_SESSION['selectedtimestep']; } if ($_POST["forward"] != "") { $_SESSION['timeshift'] -= $_SESSION['selectedtimestep']; } if ($_SESSION['timeshift'] < 0) { $_SESSION['timeshift'] = 0; } $tablearray = $tsmmonitor->execute('timetable'); $headerarray = $queryarray[$tsmmonitor->GETVars['qq']]["header"]["column"]; echo $tsmmonitor->generateTimetable($tablearray, $headerarray[0]); // "vertical" table } else if ( strstr($tsmmonitor->GETVars['qq'], 'vertical')) { $i = 0; $tablearray = $tsmmonitor->execute('verticaltable'); echo ""; echo ""; foreach ($tablearray as $row) { while(list($keycell, $valcell) = each($row)) { if ($i == 0) { echo ""; $i = 1; } else { echo ""; $i = 0; } echo ""; } //} } echo "
KeyValue
".$keycell."".$valcell."
"; // show normal table layout } else { $whereclause = array(); //if (!$_POST["Clear"] == "Clear") { $whereclause["field"] = $_POST["wcfield"]; $whereclause["val"] = $_POST["wcval"]; $whereclause["op"] = $_POST["wcop"]; //} if ($whereclause["field"]!="" && $whereclause["val"]!="") { if ($_POST["Clear"] == "Clear") { $_SESSION["search"][$tsmmonitor->GETVars['qq']] = ""; } else { if (!isset($_SESSION["search"])){ $temp = array(); $temp[$tsmmonitor->GETVars['qq']] = $whereclause; $_SESSION["search"] = $temp; } else { $_SESSION["search"][$tsmmonitor->GETVars['qq']] = $whereclause; } } } echo ""; //echo get_tableheader($queryarray[$tsmmonitor->GETVars['qq']]["header"]["column"]); echo $tsmmonitor->getTableheader(); echo $tsmmonitor->execute('table'); $nav = $tsmmonitor->showPageNavigation("40"); if ($nav!="") { echo ""; } echo "
"; } } } else { if (isset($_SESSION["logindata"])){ $errormsg = "Login failed!"; }else{ $errormsg = "Login"; } session_unset(); $_SESSION=array(); include_once "includes/login.php"; } $_SESSION['from'] = $tsmmonitor->GETVars['qq']; session_write_close(void); ?>