this and that

This commit is contained in:
Michael Clemens 2009-05-18 15:34:04 +00:00
parent 9fc372d337
commit 45983ec077
2 changed files with 14 additions and 10 deletions

View File

@ -880,10 +880,12 @@ class TSMMonitor {
*/
function renderZebraTableRow ($row, $shade , $alarmcol, $color, $cellproperties) {
$isNotEmpty = FALSE;
$colorsarray = $this->configarray["colorsarray"];
$outp = $outp."<tr class='d".$shade."'>";
while(list($keycell, $valcell) = each($row)) {
if (isset($cellproperties) && $cellproperties[$keycell] != "") {
$cellproperty = " ".$cellproperties[$keycell]." ";
} else {
@ -900,10 +902,15 @@ class TSMMonitor {
} else {
$outp = $outp."<td".$cellproperty.">".$valcell."</td>";
}
if ($valcell != "") $isNotEmpty = TRUE;
}
$outp = $outp."</tr>\n";
return $outp;
if ($isNotEmpty) {
return $outp;
} else {
return "";
}
}

View File

@ -110,14 +110,11 @@ include_once "includes/page_head.php";
echo "<tr><th>Key</th><th>Value</th></tr>";
foreach ($tablearray as $row) {
while(list($keycell, $valcell) = each($row)) {
if ($i == 0) {
echo "<tr class='d0'>";
$i = 1;
} else {
echo "<tr class='d1'>";
$i = 0;
}
echo "<td><b>".$keycell."</b></td><td>".$valcell."</td></tr>";
$vertrow = array();
$vertrow["key"] = $keycell;
$vertrow["value"] = $valcell;
echo $tsmmonitor->renderZebraTableRow($vertrow, $i%2, "", "", "");
$i++;
}
}