From c2cabfca5a60a7197f9dc607c7262e2430b1a66b Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 21 Jun 2010 09:45:07 -0300 Subject: Remove spaces and tabs from EOL --- usr/local/www/diag_arp.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'usr') diff --git a/usr/local/www/diag_arp.php b/usr/local/www/diag_arp.php index e202bc0..3aff783 100755 --- a/usr/local/www/diag_arp.php +++ b/usr/local/www/diag_arp.php @@ -205,15 +205,15 @@ if(count($pools) > 0) { // Put this in an easy to use form $dhcpmac = array(); $dhcpip = array(); - + foreach ($leases as $value) { - $dhcpmac[$value['mac']] = $value['hostname']; - $dhcpip[$value['ip']] = $value['hostname']; + $dhcpmac[$value['mac']] = $value['hostname']; + $dhcpip[$value['ip']] = $value['hostname']; } exec("/usr/sbin/arp -an",$rawdata); -$i = 0; +$i = 0; /* if list */ $ifdescrs = get_configured_interface_with_descr(); @@ -225,7 +225,7 @@ foreach ($ifdescrs as $key =>$interface) { $data = array(); foreach ($rawdata as $line) { $elements = explode(' ',$line); - + if ($elements[3] != "(incomplete)") { $arpent = array(); $arpent['ip'] = trim(str_replace(array('(',')'),'',$elements[1])); @@ -238,15 +238,15 @@ foreach ($rawdata as $line) { function getHostName($mac,$ip) { global $dhcpmac, $dhcpip; - + if ($dhcpmac[$mac]) return $dhcpmac[$mac]; else if ($dhcpip[$ip]) return $dhcpip[$ip]; else if(gethostbyaddr($ip) <> "" and gethostbyaddr($ip) <> $ip) return gethostbyaddr($ip); - else - return ""; + else + return ""; } $pgtitle = array(gettext("Diagnostics"),gettext("ARP Table")); @@ -255,7 +255,7 @@ include("head.inc"); ?> - +
@@ -276,7 +276,7 @@ foreach ($data as &$entry) { $dns = trim(getHostName($entry['mac'], $entry['ip'])); if(trim($dns)) $entry['dnsresolve'] = "$dns"; - else + else $entry['dnsresolve'] = "Z_ "; } -- cgit v1.1