Make some non functional changes, mostly to keep up with latest gw changes. Related to Ticket #666

This commit is contained in:
Ermal 2010-06-16 11:24:00 +00:00
parent a138f4fbc0
commit 096ee9c22d
4 changed files with 9 additions and 9 deletions

View File

@ -480,7 +480,7 @@ function lookup_gateway_monitor_ip_by_name($name) {
$gateway['monitor'] = "127.0.0.2";
$monitorip = $gateway['monitor'];
if($monitorip == "")
if(!is_ipaddr($monitorip))
$monitorip = $gateway['gateway'];
return ($monitorip);

View File

@ -128,7 +128,7 @@ include("head.inc");
} elseif (stristr($status, "delay")) {
$online = "Warning, Latency";
$bgcolor = "khaki";
} elseif (stristr($status, "none")) {
} elseif ($status == "none") {
$online = "Online";
$bgcolor = "lightgreen";
} else {

View File

@ -99,7 +99,7 @@ include("head.inc");
} elseif (stristr($gateway['status'], "delay")) {
$online = "Warning, Latency";
$bgcolor = "khaki";
} elseif (stristr($gateway['status'], "none")) {
} elseif ($gateway['status'] == "none") {
$online = "Online";
$bgcolor = "lightgreen";
}
@ -110,9 +110,9 @@ include("head.inc");
array_shift($lastchange);
array_shift($lastchange);
$lastchange = implode(" ", $lastchange);
PRINT "Last check $lastchange";
echo "Last check $lastchange";
} else {
print "Gathering data";
echo "Gathering data";
}
echo "</td></tr>";
?>

View File

@ -54,11 +54,11 @@ $counter = 1;
<tr>
<td class="listlr" id="gateway<?= $counter; ?>">
<?=$gateway['name'];?>
<?php $counter++; ?>
<?php $counter++; ?>
</td>
<td class="listr" align="center" id="gateway<?= $counter; ?>">
<?php echo lookup_gateway_ip_by_name($gateway['name']);?>
<?php $counter++; ?>
<?php echo lookup_gateway_ip_by_name($gateway['name']);?>
<?php $counter++; ?>
</td>
<td class="listr" align="center" id="gateway<?= $counter; ?>">
<?=$gateway['delay'];?>
@ -80,7 +80,7 @@ $counter = 1;
} elseif (stristr($gateway['status'], "delay")) {
$online = "Warning, Latency";
$bgcolor = "khaki";
} elseif (stristr($gateway['status'], "none")) {
} elseif ($gateway['status'] == "none") {
$online = "Online";
$bgcolor = "lightgreen";
} else