/************************************!!!Backend Design Changed!!!**********************************************/ $online_client = array(); $disconnect_client = array_trim(explode(",", getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.X_CISCO_COM_DISCONNECT_CLIENT"))); // get all wired attached MoCA extender (including connected/disconnected(just disable radio)) $dat = array(); $exts = explode(",", getInstanceIds("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.")); // $exts = explode(",", ""); $exts = array_trim($exts); foreach ($exts as $i) { $dat[$i]['ext_name'] = getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.DeviceName"); $dat[$i]['ext_ip'] = trim(getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.IPAddress")); $dat[$i]['ext_action'] = in_array($dat[$i]['ext_ip'], $disconnect_client) ? "Connect" : "Disconnect"; $dat[$i]['ssid_info'] = array(); $ssids = explode(",", getInstanceIds("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.SSID.")); foreach ($ssids as $j) { array_push($dat[$i]['ssid_info'], array('ssid' => getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.SSID.{$j}.SSID"), 'bssid' => getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.SSID.{$j}.BSSID"), 'freq' => getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.SSID.{$j}.Band"), 'channel' => getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.SSID.{$j}.Channel"), 'secur' => encrypt_map(getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.SSID.{$j}.SecurityMode"), getStr("Device.MoCA.X_CISCO_COM_WiFi_Extender.ExtenderDevice.{$i}.SSID.{$j}.Encryption")))); } array_push($online_client, $dat[$i]['ext_ip']); } $arConfig = array('dat' => $dat, 'online_client' => $online_client, 'disconnect_client' => $disconnect_client); $jsConfig = json_encode($arConfig); ?> <style> #range_extender td { border: 1px solid #39BAF1; } </style>
if (strpos($v, ".")) { array_push($RemoteEndpointsV4, $v); } else { if (strpos($v, ":")) { array_push($RemoteEndpointsV6, $v); } } } $wlan_gw = ""; if (isset($RemoteEndpointsV4[0])) { $wlan_gw = $RemoteEndpointsV4[0]; } if (isset($RemoteEndpointsV6[0])) { $wlan_gw = $wlan_gw . "/" . $RemoteEndpointsV6[0]; } array_push($public_v, array('ssid_id' => $i, 'ssid_enable' => php_getstr("Device.WiFi.SSID.{$i}.Enable"), 'ssid_name' => php_getstr("Device.WiFi.SSID.{$i}.SSID"), 'xf_capable' => php_getstr("Device.DeviceInfo.X_COMCAST-COM_xfinitywifiCapable"), 'time_last' => sec2dhms(php_getstr("Device.X_COMCAST_COM_GRE.Interface.1.LastChange")), 'wlan_gw' => $wlan_gw, 'radio_mode' => strtoupper(php_getstr("Device.WiFi.Radio.{$freq_id}.OperatingStandards")), 'radio_freq' => "1" == $freq_id ? "2.4" : "5", 'client_cnt' => php_getstr("Device.WiFi.AccessPoint.{$i}.AssociatedDeviceNumberOfEntries"), 'security' => encrypt_map(php_getstr("Device.WiFi.AccessPoint.{$i}.Security.ModeEnabled"), php_getstr("Device.WiFi.AccessPoint.{$i}.Security.X_CISCO_COM_EncryptionMethod")))); } for ($j = 0; $j < count($public_v); $j++) { echo '<div class="module forms block tr_hotspot" style="position:relative;top:0px;right:0px;">'; echo '<h2>Public Wi-Fi Network-' . $public_v[$j]['ssid_name'] . '</h2>'; echo '<p class="button"><a class="btn" href="wireless_network_configuration_edit_public.php?id=' . $public_v[$j]['ssid_id'] . '">Edit</a></p>'; echo '<div class="form-row ' . (($odd = !$odd) ? 'odd' : '') . '"><span class="readonlyLabel">Xfinity Wi-Fi Capable:</span> <span class="value">' . ("true" == $public_v[$j]['xf_capable'] ? "Yes" : "No") . '</span></div>'; echo '<div class="form-row ' . (($odd = !$odd) ? 'odd' : '') . '"><span class="readonlyLabel">Wireless Network(Wi-Fi ' . $public_v[$j]['radio_freq'] . ' GHz):</span> <span class="value">' . ("true" == $public_v[$j]['ssid_enable'] ? "Active" : "Inactive") . '</span></div>'; echo '<div class="form-row ' . (($odd = !$odd) ? 'odd' : '') . '"><span class="readonlyLabel">Time Since Last Status:</span> <span class="value">' . $public_v[$j]['time_last'] . '</span></div>'; echo '<div class="form-row ' . (($odd = !$odd) ? 'odd' : '') . '"><span class="readonlyLabel">WLAN Gateway:</span> <span class="value">' . $public_v[$j]['wlan_gw'] . '</span></div>'; echo '<div class="form-row ' . (($odd = !$odd) ? 'odd' : '') . '"><span class="readonlyLabel">Supported Protocols:</span> <span class="value">' . $public_v[$j]['radio_mode'] . '</span></div>'; echo '<div class="form-row ' . (($odd = !$odd) ? 'odd' : '') . '"><span class="readonlyLabel">Security:</span> <span class="value">' . $public_v[$j]['security'] . '</span></div>'; echo '<div class="form-row ' . (($odd = !$odd) ? 'odd' : '') . '"><span class="readonlyLabel">No of Clients connected:</span> <span class="value">' . $public_v[$j]['client_cnt'] . '</span></div>'; echo '</div>'; } ?>
<th id="public-Frequency" class="name">Frequency Band</th> <th id="public-MAC" width="20%" class="protocals">MAC Address</th> <th id="public-Security" width="30%" class="security">Security Mode</th> <th id="public-Blank" width="10%" class="edit"> </th> </tr> <?php $ssids = explode(",", getInstanceIds("Device.WiFi.SSID.")); $public_v = array(); $odd = true; foreach ($ssids as $i) { if (intval($i) < 3 || intval($i) > 6) { //SSID 1,2 for Private, 3,4 for Home Security, 5,6 for Hot Spot continue; } array_push($public_v, array('sufix' => intval($i) == 5 || intval($i) == 6 ? "_public" : "", 'id' => $i, 'ssid' => getStr("Device.WiFi.SSID.{$i}.SSID"), 'freq' => intval($i) % 2 ? "2.4 GHz" : "5 GHz", 'bssid' => getStr("Device.WiFi.SSID.{$i}.BSSID"), 'secur' => encrypt_map(getStr("Device.WiFi.AccessPoint.{$i}.Security.ModeEnabled"), getStr("Device.WiFi.AccessPoint.{$i}.Security.X_CISCO_COM_EncryptionMethod")))); } for ($j = 0; $j < count($public_v); $j++) { echo '<tr class="' . (($odd = !$odd) ? "odd" : "even") . '">'; echo '<td headers="public-Name"><b><font color="black">' . $public_v[$j]['ssid'] . '</font></b> </td>'; echo '<td headers="public-Frequency">' . $public_v[$j]['freq'] . '</td>'; echo '<td headers="public-MAC">' . $public_v[$j]['bssid'] . '</td>'; echo '<td headers="public-Security">' . $public_v[$j]['secur'] . '</td>'; echo '<td headers="public-Blank"><a class="btn ' . $public_v[$j]['sufix'] . '" href="wireless_network_configuration_edit' . $public_v[$j]['sufix'] . '.php?id=' . $public_v[$j]['id'] . '">Edit</a></td>'; echo '</tr>'; } ?> </tbody> </table> <div id="no_public_wifi" style="display: none;"> <p>There are no valid public Wi-Fi found!</p>