diff --git a/html/pages/customers.php b/html/pages/customers.php index b5c539c03d..36e1b8ea7c 100644 --- a/html/pages/customers.php +++ b/html/pages/customers.php @@ -1,7 +1,7 @@ - - - - + + + + "); } diff --git a/html/pages/device/arp.inc.php b/html/pages/device/arp.inc.php new file mode 100644 index 0000000000..135e4e881e --- /dev/null +++ b/html/pages/device/arp.inc.php @@ -0,0 +1,32 @@ +"); +$i = "1"; + +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, interfaces 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 = generatedevicelink($arp_host); } else { unset($arp_name); } + if($arp_host) { $arp_if = generateiflink($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"; } + + echo(" + + ".generateiflink(array_merge($arp, $device))." + ".formatmac($arp['mac_address'])." + ".$arp['ipv4_address']." + $arp_name + $arp_if + "); + $i++; +} + +echo(""); + +?> diff --git a/html/pages/device/port/arp.inc.php b/html/pages/device/port/arp.inc.php new file mode 100644 index 0000000000..9c81131454 --- /dev/null +++ b/html/pages/device/port/arp.inc.php @@ -0,0 +1,31 @@ +"); +$i = "1"; + +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, interfaces 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 = generatedevicelink($arp_host); } else { unset($arp_name); } + if($arp_host) { $arp_if = generateiflink($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"; } + + echo(" + + ".formatmac($arp['mac_address'])." + ".$arp['ipv4_address']." + $arp_name + $arp_if + "); + $i++; +} + +echo(""); + +?>