syntaxer run

git-svn-id: http://www.observium.org/svn/observer/trunk@2969 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-04-05 16:48:06 +00:00
parent 2b6581f25d
commit 866c352c5f
6 changed files with 13 additions and 14 deletions

View File

@ -38,6 +38,6 @@ echo(' <td>' . formatUptime($device['uptime'], 'short') . ' <br />');
if (get_dev_attrib($device,'override_sysLocation_bool')) { $device['location'] = get_dev_attrib($device,'override_sysLocation_string'); }
echo(' ' . truncate($device['location'],32, '') . '</td>');
echo (' </tr>');
echo(' </tr>');
?>

View File

@ -44,11 +44,11 @@ echo(' <tr class="'.$class.'" bgcolor="' . $bg . '" onmouseover="this.style.bac
<br />' . $device['sysName'] . '</td>'
);
echo ('<td width="55">');
echo('<td width="55">');
if ($port_count) { echo(' <img src="images/icons/port.png" align=absmiddle /> '.$port_count); }
echo('<br />');
if ($sensor_count) { echo(' <img src="images/icons/sensors.png" align=absmiddle /> '.$sensor_count); }
echo ('</td>');
echo('</td>');
echo(' <td class="paddedcell">' . $device['hardware'] . '<br />' . $device['features'] . '</td>');
echo(' <td class="paddedcell">' . $device['os_text'] . '<br />' . $device['version'] . '</td>');
echo(' <td class="paddedcell">' . formatUptime($device['uptime'], 'short') . ' <br />');
@ -56,6 +56,6 @@ echo(' <td class="paddedcell">' . formatUptime($device['uptime'], 'short') .
if (get_dev_attrib($device,'override_sysLocation_bool')) { $device['location'] = get_dev_attrib($device,'override_sysLocation_string'); }
echo(' ' . truncate($device['location'],32, '') . '</td>');
echo (' </tr>');
echo(' </tr>');
?>

View File

@ -92,9 +92,9 @@ if ($device['os'] == "ios" || $device['os'] == "iosxe")
echo('<p class=box-desc><span class=purple><a title="');
$vlans = dbFetchRows("SELECT * FROM `ports_vlans` AS PV, vlans AS V WHERE PV.`interface_id` ='".$port['interface_id']."' and PV.`device_id` = '".$device['device_id']."' AND V.`vlan_vlan` = PV.vlan AND V.device_id = PV.device_id");
foreach($vlans as $vlan)
foreach ($vlans as $vlan)
{
if($vlan['state'] == "blocking") { $class="red"; } elseif ($vlan['state'] == "forwarding" ) { $class="green"; } else { $class = "none"; }
if ($vlan['state'] == "blocking") { $class="red"; } elseif ($vlan['state'] == "forwarding" ) { $class="green"; } else { $class = "none"; }
echo("<b class=".$class.">".$vlan['vlan'] ."</b> ".$vlan['vlan_descr']."<br />");
}
echo('">'.$port['ifTrunk'].'</a></span></p>');

View File

@ -346,7 +346,7 @@ foreach (array('fanspeed','humidity','temperature') as $item)
{
if ($menu_sensors[$item])
{
echo ('<li><a href="health/metric='.$item.'/"><img src="images/icons/'.$item.'.png" border="0" align="absmiddle" /> '.ucfirst($item).'</a></li>');
echo('<li><a href="health/metric='.$item.'/"><img src="images/icons/'.$item.'.png" border="0" align="absmiddle" /> '.ucfirst($item).'</a></li>');
unset($menu_sensors[$item]);$sep++;
}
}
@ -361,7 +361,7 @@ foreach (array('current','frequency','power','voltage') as $item)
{
if ($menu_sensors[$item])
{
echo ('<li><a href="health/metric='.$item.'/"><img src="images/icons/'.$item.'.png" border="0" align="absmiddle" /> '.ucfirst($item).'</a></li>');
echo('<li><a href="health/metric='.$item.'/"><img src="images/icons/'.$item.'.png" border="0" align="absmiddle" /> '.ucfirst($item).'</a></li>');
unset($menu_sensors[$item]);$sep++;
}
}
@ -374,7 +374,7 @@ if ($sep && array_keys($menu_sensors))
foreach (array_keys($menu_sensors) as $item)
{
echo ('<li><a href="health/metric='.$item.'/"><img src="images/icons/'.$item.'.png" border="0" align="absmiddle" /> '.ucfirst($item).'</a></li>');
echo('<li><a href="health/metric='.$item.'/"><img src="images/icons/'.$item.'.png" border="0" align="absmiddle" /> '.ucfirst($item).'</a></li>');
unset($menu_sensors[$item]);$sep++;
}
@ -456,7 +456,6 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
<?php
}
$packages = dbFetchCell("SELECT COUNT(package_id) from `packages`");
if ($packages)

View File

@ -10,12 +10,12 @@ echo("<td class=list-bold>");
$vlan_ports = array();
$otherports = dbFetchRows("SELECT * FROM `ports_vlans` AS V, `ports` as P WHERE V.`device_id` = ? AND V.`vlan` = ? AND P.interface_id = V.interface_id", array($device['device_id'], $vlan['vlan_vlan']));
foreach($otherports as $otherport)
foreach ($otherports as $otherport)
{
$vlan_ports[$otherport[ifIndex]] = $otherport;
}
$otherports = dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?", array($device['device_id'], $vlan['vlan_vlan']));
foreach($otherports as $otherport)
foreach ($otherports as $otherport)
{
$vlan_ports[$otherport[ifIndex]] = array_merge($otherport, array('untagged' => '1'));
}
@ -42,7 +42,7 @@ foreach ($vlan_ports as $port)
{
echo($vlan['port_sep'] . generate_port_link($port, makeshortif($port['label'])));
$vlan['port_sep'] = ", ";
if($port['untagged']) { echo("(U)"); }
if ($port['untagged']) { echo("(U)"); }
}
}