mirror of
https://codeberg.org/mclemens/tsmmonitor2.git
synced 2025-01-03 08:56:22 -05:00
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) {
|
function renderZebraTableRow ($row, $shade , $alarmcol, $color, $cellproperties) {
|
||||||
|
|
||||||
|
$isNotEmpty = FALSE;
|
||||||
$colorsarray = $this->configarray["colorsarray"];
|
$colorsarray = $this->configarray["colorsarray"];
|
||||||
|
|
||||||
$outp = $outp."<tr class='d".$shade."'>";
|
$outp = $outp."<tr class='d".$shade."'>";
|
||||||
|
|
||||||
while(list($keycell, $valcell) = each($row)) {
|
while(list($keycell, $valcell) = each($row)) {
|
||||||
|
|
||||||
if (isset($cellproperties) && $cellproperties[$keycell] != "") {
|
if (isset($cellproperties) && $cellproperties[$keycell] != "") {
|
||||||
$cellproperty = " ".$cellproperties[$keycell]." ";
|
$cellproperty = " ".$cellproperties[$keycell]." ";
|
||||||
} else {
|
} else {
|
||||||
@ -900,10 +902,15 @@ class TSMMonitor {
|
|||||||
} else {
|
} else {
|
||||||
$outp = $outp."<td".$cellproperty.">".$valcell."</td>";
|
$outp = $outp."<td".$cellproperty.">".$valcell."</td>";
|
||||||
}
|
}
|
||||||
|
if ($valcell != "") $isNotEmpty = TRUE;
|
||||||
}
|
}
|
||||||
$outp = $outp."</tr>\n";
|
$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>";
|
echo "<tr><th>Key</th><th>Value</th></tr>";
|
||||||
foreach ($tablearray as $row) {
|
foreach ($tablearray as $row) {
|
||||||
while(list($keycell, $valcell) = each($row)) {
|
while(list($keycell, $valcell) = each($row)) {
|
||||||
if ($i == 0) {
|
$vertrow = array();
|
||||||
echo "<tr class='d0'>";
|
$vertrow["key"] = $keycell;
|
||||||
$i = 1;
|
$vertrow["value"] = $valcell;
|
||||||
} else {
|
echo $tsmmonitor->renderZebraTableRow($vertrow, $i%2, "", "", "");
|
||||||
echo "<tr class='d1'>";
|
$i++;
|
||||||
$i = 0;
|
|
||||||
}
|
|
||||||
echo "<td><b>".$keycell."</b></td><td>".$valcell."</td></tr>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user