From b9faf0fbba22bab974f60b47f524fd8a15fa8b8d Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Mon, 14 Mar 2011 18:10:05 +0000 Subject: [PATCH] fix arp webpage, found by falz git-svn-id: http://www.observium.org/svn/observer/trunk@1829 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/pages/device/port/arp.inc.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/html/pages/device/port/arp.inc.php b/html/pages/device/port/arp.inc.php index 0f21664e50..bad24bad50 100644 --- a/html/pages/device/port/arp.inc.php +++ b/html/pages/device/port/arp.inc.php @@ -6,22 +6,22 @@ $query = mysql_query($sql); echo(''); $i = "1"; -while($arp = mysql_fetch_array($query)) { - if(!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; } +while ($arp = mysql_fetch_array($query)) { + if (!is_integer($i/2)) { $bg_colour = $list_colour_a; } else { $bg_colour = $list_colour_b; } $arp_host = mysql_fetch_array(mysql_query("SELECT * FROM ipv4_addresses AS A, ports AS I, devices AS D WHERE A.ipv4_address = '".$arp['ipv4_address']."' AND I.interface_id = A.interface_id AND D.device_id = I.device_id")); - if($arp_host) { $arp_name = generate_device_link($arp_host); } else { unset($arp_name); } - if($arp_host) { $arp_if = generate_port_link($arp_host); } else { unset($arp_if); } + if ($arp_host) { $arp_name = generate_device_link($arp_host); } else { unset($arp_name); } + if ($arp_host) { $arp_if = generate_port_link($arp_host); } else { unset($arp_if); } - if($arp_host['device_id'] == $device['device_id']) { $arp_name = "Localhost"; } - if($arp_host['interface_id'] == $arp['interface_id']) { $arp_if = "Local Port"; } + if ($arp_host['device_id'] == $device['device_id']) { $arp_name = "Localhost"; } + if ($arp_host['interface_id'] == $arp['interface_id']) { $arp_if = "Local Port"; } echo(' - - + + '); $i++; }
'.formatmac($arp['mac_address']).' '.$arp['ipv4_address'].''.$arp_name;'$arp_if'.$arp_name.''.$arp_if.'