reformatted/beautified most files

This commit is contained in:
Michael Clemens 2009-05-18 11:37:07 +00:00
parent 75611f3f8f
commit 5624331190
15 changed files with 1337 additions and 1346 deletions

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
*
@ -42,19 +42,17 @@ if ($_POST["css"] != "") {
?>
<?php if ($_SESSION["logindata"]["loggedin"]) { ?>
<tr>
<tr>
<td colspan="2" id="head"><a class='navheader' href="admin.php"><img src="images/PollDTitleAdmin.gif" border=0></img></a></td>
</tr>
<tr>
</tr>
<tr>
<td id="tnleft"></td>
<td id="tnright">
</td>
<td id="tnright"></td>
<?php } ?>
</tr>
<tr>
<?php if ($_SESSION["logindata"]["loggedin"]) { ?>
<!-- Start left cik navigation menu -->
</tr>
<tr>
<?php if ($_SESSION["logindata"]["loggedin"]) { ?>
<!-- Start left navigation menu -->
<td id="menue">
<div class="menuelinks">
<?php echo $tsmmonitor->getMenu( $tsmmonitor->adminmenu, "admin.php?q=".$tsmmonitor->GETVars['qq']."&m=".$tsmmonitor->GETVars['menu'], "admin" ); ?>
@ -62,13 +60,12 @@ if ($_POST["css"] != "") {
<br>
<img src="/images/trans.gif" alt="" width="150" height="1" border="0"><br>
</td>
<!-- End left cik navigation menu -->
<?php } ?>
<!-- End left navigation menu -->
<?php } ?>
<td id="content">
<?php
// main content, right of menu
if (isset($_SESSION["logindata"]["user"]) && isset($_SESSION["logindata"]["pass"]) && $tsmmonitor->GETVars['qq'] != "logout" && $_SESSION["logindata"]["loggedin"]) {
<?php
// main content, right of menu
if (isset($_SESSION["logindata"]["user"]) && isset($_SESSION["logindata"]["pass"]) && $tsmmonitor->GETVars['qq'] != "logout" && $_SESSION["logindata"]["loggedin"]) {
if ($tsmmonitor->GETVars['qq'] != "" && $tsmmonitor->GETVars['qq'] != "overview") {
// show overview page
@ -166,7 +163,7 @@ if (isset($_SESSION["logindata"]["user"]) && isset($_SESSION["logindata"]["pass"
echo "<table class='zebra'>";
echo "<tr><th>Key</th><th>Value</th></tr>";
foreach ($sqlresth as $col) {
echo "TEST: ".$col['Field']." -> $colval<br>\n";
echo "TEST: ".$col['Field']." -> $colval<br>\n";
if ($col['Field'] != "id") {
if ($i == 0) {
echo "<tr class='d0'>";
@ -290,7 +287,7 @@ echo "TEST: ".$col['Field']." -> $colval<br>\n";
}
}
}
} else {
} else {
if (isset($_SESSION["logindata"])) {
$errormsg = "Login failed!";
} else {
@ -301,16 +298,16 @@ echo "TEST: ".$col['Field']." -> $colval<br>\n";
$_SESSION=array();
include_once "includes/login.php";
}
$_SESSION['from'] = $tsmmonitor->GETVars['qq'];
session_write_close(void);
?>
}
$_SESSION['from'] = $tsmmonitor->GETVars['qq'];
session_write_close(void);
?>
</td>
</tr>
</tr>
<?php if ($_SESSION["logindata"]["loggedin"]) include_once "includes/footer.php"; ?>
<?php if ($_SESSION["logindata"]["loggedin"]) include_once "includes/footer.php"; ?>
</table>
</table>
</div>
</body>

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
*

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
*

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
*

View File

@ -1,6 +1,6 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
*
@ -36,7 +36,7 @@
The defaults in this file are not meant to be altered by users!
See include/config.php for user configurable database settings.
*/
*/
// ** Default database settings ** //
$db_type = 'mysql';

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -16,9 +16,9 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
<form action="<?php echo $_SERVER['PHP_SELF']."?q=".$qq."&m=".$menu; ?>" method="post">
*/
************************************************************************
<form action="<?php echo $_SERVER['PHP_SELF']."?q=".$qq."&m=".$menu; ?>" method="post">
*/
/**
*
@ -40,23 +40,23 @@ if ($isAdmin) {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; if ($GETVars['qq'] != 'logout'){ echo '?q='.$GETVars['qq'].'&m='.$GETVars['menu']; } ?>" method="post">
<br>
<br>
<br>
<br>
<table class='login'>
<tr>
<br>
<br>
<br>
<br>
<table class='login'>
<tr>
<td colspan="2" id="head"><a class='navheader' ><img src="<?php echo $headerimage ?>" border=0></img></a></td>
</tr>
<tr><th colspan="2"><?php echo $errormsg ?></th></tr>
<tr><td>Username:</td><td><input name="loginname"></td></tr>
<tr><td>Password:</td><td><input name="loginpasswort" type=password></td></tr>
<tr><td colspan="2"><input type=submit name=submit value="Login"></td></tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
</tr>
<tr><th colspan="2"><?php echo $errormsg ?></th></tr>
<tr><td>Username:</td><td><input name="loginname"></td></tr>
<tr><td>Password:</td><td><input name="loginpasswort" type=password></td></tr>
<tr><td colspan="2"><input type=submit name=submit value="Login"></td></tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
</form>

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
*
@ -32,43 +32,43 @@
?>
<table width=90% cellspacing="3" cellpadding="3">
<tr><td colspan="3" height='15px'></td></tr>
<tr><th colspan="3" align='center'>Quick Overview for Server <?php echo $server; ?></th></tr>
<tr><td colspan="3" height='15px'></td></tr>
<tr><td colspan="3" height='15px'></td></tr>
<tr><th colspan="3" align='center'>Quick Overview for Server <?php echo $server; ?></th></tr>
<tr><td colspan="3" height='15px'></td></tr>
<tr>
<td width='48%' valign='top'>
<table class='zebra'>
<tr><th colspan="2">Health Status</th></tr>
<?php echo $tsmmonitor->getOverviewRows($tsmmonitor->configarray["infoboxarray"]["healthdata"]); ?>
</table>
</td>
<td width='4%'>
</td>
<td width='48%' valign='top'>
<table class='zebra'>
<tr><th colspan="2">TSM Database</th></tr>
<?php //echo getOverviewRows(getInfobox("database")); ?>
<?php echo $tsmmonitor->getOverviewRows($tsmmonitor->configarray["infoboxarray"]["database"]); ?>
</table>
</td>
<td width='48%' valign='top'>
<table class='zebra'>
<tr><th colspan="2">Health Status</th></tr>
<?php echo $tsmmonitor->getOverviewRows($tsmmonitor->configarray["infoboxarray"]["healthdata"]); ?>
</table>
</td>
<td width='4%'>
</td>
<td width='48%' valign='top'>
<table class='zebra'>
<tr><th colspan="2">TSM Database</th></tr>
<?php //echo getOverviewRows(getInfobox("database")); ?>
<?php echo $tsmmonitor->getOverviewRows($tsmmonitor->configarray["infoboxarray"]["database"]); ?>
</table>
</td>
</tr>
<tr><td colspan="3" height='20px'></td></tr>
<tr>
<td width='48%' valign='top'>
<table class='zebra'>
<tr><th colspan="2">Total Data</th></tr>
<?php //echo getOverviewRows(getInfobox("totaldata")); ?>
<?php echo $tsmmonitor->getOverviewRows($tsmmonitor->configarray["infoboxarray"]["totaldata"]); ?>
</table>
</td>
<td width='4%'>
</td>
<td width='48%' valign='top'>
<table class='zebra'>
<tr><th colspan="2">Schedule Status</th></tr>
<?php //echo getOverviewRows(getInfobox("schedules")); ?>
<?php echo $tsmmonitor->getOverviewRows($tsmmonitor->configarray["infoboxarray"]["schedules"]); ?>
</table>
</td>
</tr>
<tr>
<td width='48%' valign='top'>
<table class='zebra'>
<tr><th colspan="2">Total Data</th></tr>
<?php //echo getOverviewRows(getInfobox("totaldata")); ?>
<?php echo $tsmmonitor->getOverviewRows($tsmmonitor->configarray["infoboxarray"]["totaldata"]); ?>
</table>
</td>
<td width='4%'>
</td>
<td width='48%' valign='top'>
<table class='zebra'>
<tr><th colspan="2">Schedule Status</th></tr>
<?php //echo getOverviewRows(getInfobox("schedules")); ?>
<?php echo $tsmmonitor->getOverviewRows($tsmmonitor->configarray["infoboxarray"]["schedules"]); ?>
</table>
</td>
</tr>
</table>

View File

@ -1,6 +1,6 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -15,7 +15,7 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
*************************************************************************/
*************************************************************************/
/**
*
@ -31,13 +31,12 @@ if ($_POST["css"] != "") $_SESSION['stylesheet'] = $_POST["css"];
if ($_POST["tabletype"] != "") $_SESSION["tabletype"] = $_POST["tabletype"];
if ($_POST["DebugMode"] != "") $_SESSION["debug"] = $_POST["DebugMode"];
$adodb->setDebug($_SESSION["debug"]);
//if ($_SESSION['stylesheet'] == "") $_SESSION['stylesheet'] = "style_classic.css";
?>
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
<!-- Begin: page_head.php -->
<html>
<head>
<head>
<title>TSM Monitor</title>
<meta http-equiv='content-type' content='text/html; charset=ISO-8859-1'>
<link rel='shortcut icon' href='images/favicon.ico' type='image/x-icon'>
@ -81,9 +80,9 @@ $adodb->setDebug($_SESSION["debug"]);
// -->
</script>
</meta>
</head>
</head>
<body>
<body>
<div id="inhalt">
<table cellspacing="4" cellpadding="2" border="0" id="design">
<!-- End: page_head.php -->
<!-- End: page_head.php -->

View File

@ -1,6 +1,6 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
@ -57,7 +57,6 @@ class PDF extends FPDF
* Header - generates page header
*
*/
function Header()
{
//Print the table header if necessary
@ -88,7 +87,6 @@ class PDF extends FPDF
* TableHeader
*
*/
function TableHeader()
{
$this->SetFont('Arial','B',6);
@ -107,7 +105,6 @@ class PDF extends FPDF
*
* @param unknown $date
*/
function Row($data)
{
$this->SetX($this->TableX);
@ -129,7 +126,6 @@ class PDF extends FPDF
* @param string $width
* @param string $align
*/
function CalcWidths($width,$align)
{
//Compute the widths of the columns
@ -162,7 +158,6 @@ class PDF extends FPDF
* @param string $caption
* @param string $align
*/
function AddCol($field=-1,$width=-1,$caption='',$align='L')
{
//Add a column to the table
@ -178,7 +173,6 @@ class PDF extends FPDF
* @param string $query
* @param array $prop
*/
function Table($query,$prop=array(),$dbresult)
{
//Issue query

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**

View File

@ -1,6 +1,6 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**

View File

@ -32,9 +32,8 @@
?>
<form action="<?php echo $_SERVER['PHP_SELF']."?q=".$tsmmonitor->GETVars['qq']."&m=".$tsmmonitor->GETVars['menu']."&s=".$tsmmonitor->GETVars['server']; ?>" method="post">
<?php
//if ($tsmmonitor->GETVars['qq'] != "admin" && !$_POST["edit"] == "edit") {
if ($tsmmonitor->GETVars['qq'] != "index" && $tsmmonitor->GETVars['qq'] != "overview" && $tsmmonitor->GETVars['qq'] != "serverlist") {
<?php
if ($tsmmonitor->GETVars['qq'] != "index" && $tsmmonitor->GETVars['qq'] != "overview" && $tsmmonitor->GETVars['qq'] != "serverlist") {
echo "<input type='button' value='PDF' onclick='genPDF()' class='button topnavbutton'>";
if ($tsmmonitor->configarray["queryarray"][$tsmmonitor->GETVars['qq']]["timetablefields"] != "") {
@ -48,10 +47,10 @@ if ($tsmmonitor->GETVars['qq'] != "index" && $tsmmonitor->GETVars['qq'] != "over
}
echo "</select>";
}
}
}
if ($tsmmonitor->GETVars['qq'] != "polldstat" && $tsmmonitor->GETVars['qq'] != "serverlist") {
}
if ($tsmmonitor->GETVars['qq'] != "polldstat" && $tsmmonitor->GETVars['qq'] != "serverlist") {
echo "<select name='s' size=1 onChange='submit();' class='button topnavbutton'>";
@ -61,6 +60,6 @@ if ($tsmmonitor->GETVars['qq'] != "polldstat" && $tsmmonitor->GETVars['qq'] != "
echo '> '.$servername.' ('.$serveritems["description"].')</option>';
}
echo "</select>";
}
?>
}
?>
</form>

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -17,8 +17,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
*

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
TSM Monitor 2 v0.1 (www.tsm-monitor.org)
Copyright (C) 2009 Michael Clemens <mail@tsm-monitor.org>
@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**
*
@ -36,10 +36,10 @@ include_once "includes/page_head.php";
?>
<?php if ($_SESSION["logindata"]["loggedin"]) { ?>
<tr>
<tr>
<td colspan="2" id="head"><a class='navheader' href="index.php"><img src="images/PollDTitle.gif" border=0></img></a></td>
</tr>
<tr>
</tr>
<tr>
<td id="tnleft"></td>
<td id="tnright">
<div id="tnbox1">
@ -56,10 +56,10 @@ include_once "includes/page_head.php";
</div>
</td>
<?php } ?>
</tr>
<tr>
<?php if ($_SESSION["logindata"]["loggedin"]) { ?>
<!-- Start left cik navigation menu -->
</tr>
<tr>
<?php if ($_SESSION["logindata"]["loggedin"]) { ?>
<!-- Start left navigation menu -->
<td id="menue">
<div class="menuelinks">
<?php echo $tsmmonitor->getMenu( $tsmmonitor->submenu, "index.php?q=".$tsmmonitor->GETVars['qq']."&m=".$tsmmonitor->GETVars['menu']."&s=".$tsmmonitor->GETVars['server'], "index" ); ?>
@ -80,13 +80,13 @@ include_once "includes/page_head.php";
</div>
<img src="/images/trans.gif" alt="" width="150" height="1" border="0"><br>
</td>
<!-- End left cik navigation menu -->
<?php } ?>
<!-- End left navigation menu -->
<?php } ?>
<td id="content">
<?php
<?php
// main content, right of menu
if (isset($_SESSION["logindata"]["user"]) && isset($_SESSION["logindata"]["pass"]) && $tsmmonitor->GETVars['qq'] != "logout" && $_SESSION["logindata"]["loggedin"]){
// main content, right of menu
if (isset($_SESSION["logindata"]["user"]) && isset($_SESSION["logindata"]["pass"]) && $tsmmonitor->GETVars['qq'] != "logout" && $_SESSION["logindata"]["loggedin"]){
if ($tsmmonitor->GETVars['qq'] != "" && $tsmmonitor->GETVars['qq'] != "overview"){
// show overview page
@ -176,7 +176,7 @@ if (isset($_SESSION["logindata"]["user"]) && isset($_SESSION["logindata"]["pass"
}
}
} else {
} else {
if (isset($_SESSION["logindata"])){
$errormsg = "Login failed!";
}else{
@ -185,16 +185,18 @@ if (isset($_SESSION["logindata"]["user"]) && isset($_SESSION["logindata"]["pass"
session_unset();
$_SESSION=array();
include_once "includes/login.php";
}
$_SESSION['from'] = $tsmmonitor->GETVars['qq'];
session_write_close(void);
?>
}
$_SESSION['from'] = $tsmmonitor->GETVars['qq'];
session_write_close(void);
?>
</tr>
</td>
</tr>
<?php if ($_SESSION["logindata"]["loggedin"]) include_once "includes/footer.php"; ?>
<?php if ($_SESSION["logindata"]["loggedin"]) include_once "includes/footer.php"; ?>
</table>

View File

@ -1,7 +1,7 @@
<?php
/*
************************************************************************
************************************************************************
This file is part of TSM Monitor.
TSM Monitor is free software: you can redistribute it and/or modify
@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with TSM Monitor. If not, see <http://www.gnu.org/licenses/>.
************************************************************************
*/
************************************************************************
*/
/**