- Fixed Bug #0000010: Do not commit empty user passwords to DB.

- Removed navbar from admin.php since its broken there anyway.
- Catch empty results in "Overview" page.
- Some formating and cleanup.
This commit is contained in:
Frank Fegert 2009-06-25 19:40:21 +00:00
parent 706a738ff1
commit 3f1dfaea2e
3 changed files with 5 additions and 11 deletions

View File

@ -86,10 +86,8 @@ if ($_POST["css"] != "") {
}
if ($tmonpolld->isEnabled()=="1") {
$polldenabled = "enabled and ".$tmonpolld->getStatus();
//$cellcolor = "green";
} else {
$polldenabled = "disabled";
//$cellcolor = "red";
}
echo "<form action=".$_SERVER['PHP_SELF']."?q=".$tsmmonitor->GETVars['qq']."&m=".$tsmmonitor->GETVars['menu']." method='post'>";
echo "<table class='zebra'>";
@ -250,7 +248,8 @@ if ($_POST["css"] != "") {
if ($_POST["txt".$col['Field']] != "") {
$val = md5($_POST["txt".$col['Field']]);
} else {
$val = "";
$pwerr = "<p style='font-size: 14px; font-weight: bold; color: red;'>Password cannot be empty! Password was not reset.</p>";
continue;
}
} else {
$val = $_POST["txt".$col['Field']];
@ -273,6 +272,7 @@ if ($_POST["css"] != "") {
}
$adodb->updateDB("cfg_".$_GET['q'], $colarray, 'id');
}
if (!empty($pwerr)) echo $pwerr;
echo "<form action=".$_SERVER['PHP_SELF']."?q=".$tsmmonitor->GETVars['qq']."&m=".$tsmmonitor->GETVars['menu']." method='post'>";
echo "<table class='zebra'>";
$thead = $tsmmonitor->getTableheader();
@ -281,12 +281,8 @@ if ($_POST["css"] != "") {
if ($tbody != "") {
echo $tbody;
} else {
echo "<tr class='d0'><td colspan='".($thead["numfields"]+1)."' align='center'>No entries found in database.</td></tr>";
echo "<tr class='d0'><td colspan='".($thead["numfields"] + 1)."' align='center'>No entries found in database.</td></tr>";
}
$nav = $tsmmonitor->showPageNavigation("40");
if ($nav!="") {
echo "<tr><td colspan='".($thead["numfields"]+1)."' align='center' class='footer'><a class='navhead'>".$nav."</a></td></tr>";
}
echo "</table>";
echo "<input type='submit' class='button' name='Add' value='Add' onclick='submit();'>";
echo "</form>";

View File

@ -47,7 +47,6 @@
<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>
@ -57,7 +56,6 @@
<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>
@ -66,7 +64,6 @@
<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>

View File

@ -1156,6 +1156,7 @@ class TSMMonitor {
} else {
$sql = "SELECT name, result from res_overview_".$this->GETVars['server']." where name='".$subindexqueryarray[$key]["name"]."'";
$sqlres = $this->adodb->fetchArrayDB($sql);
if (empty($sqlres[0]["result"])) $sqlres[0]["result"] = 0;
$comperator = $subindexqueryarray[$key]["alert_comp"];
$alertval = $subindexqueryarray[$key]["alert_val"];
$alertcol = $subindexqueryarray[$key]["alert_col"];