diff --git a/includes/dashboard.php b/includes/dashboard.php index 7fffa208..981833c7 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -6,142 +6,142 @@ */ function DisplayDashboard(){ - exec( 'ifconfig wlan0', $return ); - exec( 'iwconfig wlan0', $return ); + exec( 'ifconfig wlan0', $return ); + exec( 'iwconfig wlan0', $return ); - $strWlan0 = implode( " ", $return ); - $strWlan0 = preg_replace( '/\s\s+/', ' ', $strWlan0 ); + $strWlan0 = implode( " ", $return ); + $strWlan0 = preg_replace( '/\s\s+/', ' ', $strWlan0 ); - // Parse results from ifconfig/iwconfig - preg_match( '/HWaddr ([0-9a-f:]+)/i',$strWlan0,$result ); - $strHWAddress = $result[1]; - preg_match( '/inet addr:([0-9.]+)/i',$strWlan0,$result ); - $strIPAddress = $result[1]; - preg_match( '/Mask:([0-9.]+)/i',$strWlan0,$result ); - $strNetMask = $result[1]; - preg_match( '/RX packets:(\d+)/',$strWlan0,$result ); - $strRxPackets = $result[1]; - preg_match( '/TX packets:(\d+)/',$strWlan0,$result ); - $strTxPackets = $result[1]; - preg_match( '/RX bytes:(\d+ \(\d+.\d+ [K|M|G]iB\))/i',$strWlan0,$result ); - $strRxBytes = $result[1]; - preg_match( '/TX Bytes:(\d+ \(\d+.\d+ [K|M|G]iB\))/i',$strWlan0,$result ); - $strTxBytes = $result[1]; - preg_match( '/ESSID:\"([a-zA-Z0-9\s]+)\"/i',$strWlan0,$result ); - $strSSID = str_replace( '"','',$result[1] ); - preg_match( '/Access Point: ([0-9a-f:]+)/i',$strWlan0,$result ); - $strBSSID = $result[1]; - preg_match( '/Bit Rate=([0-9]+ Mb\/s)/i',$strWlan0,$result ); - $strBitrate = $result[1]; - preg_match( '/Tx-Power=([0-9]+ dBm)/i',$strWlan0,$result ); - $strTxPower = $result[1]; - preg_match( '/Link Quality=([0-9]+)/i',$strWlan0,$result ); - $strLinkQuality = $result[1]; - preg_match( '/Signal Level=([0-9]+)/i',$strWlan0,$result ); - $strSignalLevel = $result[1]; - preg_match('/Frequency:(\d+.\d+ GHz)/i',$strWlan0,$result); - $strFrequency = $result[1]; + // Parse results from ifconfig/iwconfig + preg_match( '/HWaddr ([0-9a-f:]+)/i',$strWlan0,$result ); + $strHWAddress = $result[1]; + preg_match( '/inet addr:([0-9.]+)/i',$strWlan0,$result ); + $strIPAddress = $result[1]; + preg_match( '/Mask:([0-9.]+)/i',$strWlan0,$result ); + $strNetMask = $result[1]; + preg_match( '/RX packets:(\d+)/',$strWlan0,$result ); + $strRxPackets = $result[1]; + preg_match( '/TX packets:(\d+)/',$strWlan0,$result ); + $strTxPackets = $result[1]; + preg_match( '/RX bytes:(\d+ \(\d+.\d+ [K|M|G]iB\))/i',$strWlan0,$result ); + $strRxBytes = $result[1]; + preg_match( '/TX Bytes:(\d+ \(\d+.\d+ [K|M|G]iB\))/i',$strWlan0,$result ); + $strTxBytes = $result[1]; + preg_match( '/ESSID:\"([a-zA-Z0-9\s]+)\"/i',$strWlan0,$result ); + $strSSID = str_replace( '"','',$result[1] ); + preg_match( '/Access Point: ([0-9a-f:]+)/i',$strWlan0,$result ); + $strBSSID = $result[1]; + preg_match( '/Bit Rate=([0-9]+ Mb\/s)/i',$strWlan0,$result ); + $strBitrate = $result[1]; + preg_match( '/Tx-Power=([0-9]+ dBm)/i',$strWlan0,$result ); + $strTxPower = $result[1]; + preg_match( '/Link Quality=([0-9]+)/i',$strWlan0,$result ); + $strLinkQuality = $result[1]; + preg_match( '/Signal Level=([0-9]+)/i',$strWlan0,$result ); + $strSignalLevel = $result[1]; + preg_match('/Frequency:(\d+.\d+ GHz)/i',$strWlan0,$result); + $strFrequency = $result[1]; - if(strpos( $strWlan0, "UP" ) !== false && strpos( $strWlan0, "RUNNING" ) !== false ) { - $status = '