diff --git a/html/includes/hostbox.inc b/html/includes/hostbox.inc index b53da3cb9..294468751 100644 --- a/html/includes/hostbox.inc +++ b/html/includes/hostbox.inc @@ -12,22 +12,22 @@ $image = getImage($device['device_id']); - $device['os_text'] = $os_text[$device[os]]; + $device['os_text'] = $os_text[$device['os']]; - echo(" - $image - " . generatedevicelink($device) . " -
$device[sysName] - $device[os_text]
- $device[version] - $device[hardware]
- $device[features] - " . formatUptime($device[uptime]) . " + echo(' + ' . $image . ' + ' . generatedevicelink($device) . ' +
' . $device['sysName'] . ' + ' . $device['os_text'] . '
+ ' . $device['version'] . ' + ' . $device['hardware'] . '
+ ' . $device['features'] . ' + ' . formatUptime($device['uptime']) . '
- $device[location] - + ' . $device['location'] . ' + - "); + '); ?> diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index f4e024e80..ab48ee721 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -9,81 +9,77 @@ $query_a = mysql_query("SELECT * FROM `devices`"); while($device = mysql_fetch_array($query_a)) { - if($device['status'] == 0 && $device['ignore'] == '0') { $this_alert = "1"; } elseif($device['ignore'] == '0') { - if(mysql_result(mysql_query("SELECT count(service_id) FROM services WHERE service_status = '0' AND service_host = '".$device['device_id']."'"),0)) { $this_alert = "1"; } - if(mysql_result(mysql_query("SELECT count(*) FROM interfaces WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND device_id = '" . $device['device_id'] . "'"),0)) { $this_alert = "1"; } + $this_alert = 0; + if ($device['status'] == 0 && $device['ignore'] == '0') { $this_alert = "1"; } elseif ($device['ignore'] == '0') { + if (mysql_result(mysql_query("SELECT count(service_id) FROM services WHERE service_status = '0' AND service_host = '".$device['device_id']."'"),0)) { $this_alert = "1"; } + if (mysql_result(mysql_query("SELECT count(*) FROM interfaces WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND device_id = '" . $device['device_id'] . "'"),0)) { $this_alert = "1"; } } - if($this_alert) { + if ($this_alert) { $device_alerts++; $device_alert_sql .= " OR `device_id` = '" . $device['device_id'] . "'"; } - unset($this_alert); } ?>