this and that
This commit is contained in:
parent
9fc372d337
commit
45983ec077
@ -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 "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
13
index.php
13
index.php
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user