diff --git a/includes/functions.php b/includes/functions.php index 4c4cc2f7..2f821d63 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -50,31 +50,40 @@ function ConvertToChannel( $freq ) { } /** -* +* Converts WPA security string to readable format * @param string $security * @return string */ function ConvertToSecurity( $security ) { - + switch( $security ) { case "[WPA2-PSK-CCMP][ESS]": return "WPA2-PSK (AES)"; - break; + break; case "[WPA2-PSK-TKIP][ESS]": return "WPA2-PSK (TKIP)"; - break; + break; + case "[WPA2-PSK-CCMP][WPS][ESS]": + return "WPA/WPA2-PSK (TKIP/AES)"; + break; + case "[WPA2-PSK-TKIP+CCMP][WPS][ESS]": + return "WPA2-PSK (TKIP/AES) with WPS"; + break; case "[WPA-PSK-TKIP+CCMP][WPS][ESS]": return "WPA-PSK (TKIP/AES) with WPS"; - break; + break; + case "[WPA-PSK-TKIP][WPA2-PSK-CCMP][WPS][ESS]": + return "WPA/WPA2-PSK (TKIP/AES)"; + break; case "[WPA-PSK-TKIP+CCMP][WPA2-PSK-TKIP+CCMP][ESS]": return "WPA/WPA2-PSK (TKIP/AES)"; - break; + break; case "[WPA-PSK-TKIP][ESS]": return "WPA-PSK (TKIP)"; - break; + break; case "[WEP][ESS]": return "WEP"; - break; + break; } } @@ -121,10 +130,14 @@ function DisplayDashboard(){ $strFrequency = $result[1]; if(strpos( $strWlan0, "UP" ) !== false && strpos( $strWlan0, "RUNNING" ) !== false ) { - $strStatus = 'Interface is up'; + $status = '