} else { if ("WEP_128" == $arConfig['security']) { setStr("Device.WiFi.AccessPoint.{$i}.Security.X_CISCO_COM_WEPKey128Bit.1.WEPKey", $arConfig['network_password'], false); setStr("Device.WiFi.AccessPoint.{$i}.Security.X_CISCO_COM_WEPKey128Bit.2.WEPKey", $arConfig['network_password'], false); setStr("Device.WiFi.AccessPoint.{$i}.Security.X_CISCO_COM_WEPKey128Bit.3.WEPKey", $arConfig['network_password'], false); setStr("Device.WiFi.AccessPoint.{$i}.Security.X_CISCO_COM_WEPKey128Bit.4.WEPKey", $arConfig['network_password'], false); setStr("Device.WiFi.AccessPoint.{$i}.Security.ModeEnabled", $encrypt_mode, true); } else { //no open, no wep //bCommit false->true still do validation each, have to group set this... DmExtSetStrsWithRootObj("Device.WiFi.", true, array(array("Device.WiFi.AccessPoint.{$i}.Security.ModeEnabled", "string", $encrypt_mode), array("Device.WiFi.AccessPoint.{$i}.Security.X_CISCO_COM_EncryptionMethod", "string", $encrypt_method))); setStr("Device.WiFi.AccessPoint.{$i}.Security.X_CISCO_COM_KeyPassphrase", $arConfig['network_password'], true); } } } setStr("Device.WiFi.SSID.{$i}.SSID", $arConfig['network_name'], true); setStr("Device.WiFi.AccessPoint.{$i}.SSIDAdvertisementEnabled", $arConfig['broadcastSSID'], true); if ("mso" == $thisUser) { // if ("false" == $arConfig['enableWMM']){ // setStr("Device.WiFi.AccessPoint.$i.UAPSDEnable", "false", true); // } // setStr("Device.WiFi.AccessPoint.$i.WMMEnable", $arConfig['enableWMM'], true); //when disable WMM, make sure UAPSD is disabled as well, have to use group set if (getStr("Device.WiFi.AccessPoint.{$i}.WMMEnable") != $arConfig['enableWMM']) { DmExtSetStrsWithRootObj("Device.WiFi.", true, array(array("Device.WiFi.AccessPoint.{$i}.UAPSDEnable", "bool", "false"), array("Device.WiFi.AccessPoint.{$i}.WMMEnable", "bool", $arConfig['enableWMM']))); } } } // setStr("Device.WiFi.Radio.$r.X_CISCO_COM_ApplySetting", "true", true); MiniApplySSID($i); echo $jsConfig;
} } else { //this is to edit blocked Keyword if ($blockedSiteInfo['alwaysBlock'] == "true") { $paramArray = array(array($objPrefix . $index . ".Site", "string", $blockedSiteInfo['Keyword']), array($objPrefix . $index . ".AlwaysBlock", "bool", $blockedSiteInfo['alwaysBlock'])); $retStatus = DmExtSetStrsWithRootObj($rootObjName, TRUE, $paramArray); if (!$retStatus) { $result = "Success!"; } else { $result = 'Failed to add'; } /*setStr($objPrefix.$index.".Site", $blockedSiteInfo['Keyword'], false); setStr($objPrefix.$index.".AlwaysBlock", $blockedSiteInfo['alwaysBlock'], true);*/ } else { $paramArray = array(array($objPrefix . $index . ".Site", "string", $blockedSiteInfo['Keyword']), array($objPrefix . $index . ".AlwaysBlock", "bool", $blockedSiteInfo['alwaysBlock']), array($objPrefix . $index . ".StartTime", "string", $blockedSiteInfo['StartTime']), array($objPrefix . $index . ".EndTime", "string", $blockedSiteInfo['EndTime']), array($objPrefix . $index . ".BlockDays", "string", $blockedSiteInfo['blockedDays'])); $retStatus = DmExtSetStrsWithRootObj($rootObjName, TRUE, $paramArray); if (!$retStatus) { $result = "Success!"; } else { $result = 'Failed to add'; } /* setStr($objPrefix.$blockedSiteInfo['InstanceID'].".Site", $blockedSiteInfo['Keyword'], false); setStr($objPrefix.$blockedSiteInfo['InstanceID'].".AlwaysBlock", $blockedSiteInfo['alwaysBlock'], false); //setStr($objPrefix.$blockedSiteInfo['InstanceID'].".BlockMethod", "Keyword"); setStr($objPrefix.$blockedSiteInfo['InstanceID'].".StartTime", $blockedSiteInfo['StartTime'], false); setStr($objPrefix.$blockedSiteInfo['InstanceID'].".EndTime", $blockedSiteInfo['EndTime'], false); setStr($objPrefix.$blockedSiteInfo['InstanceID'].".BlockDays", $blockedSiteInfo['blockedDays'], true); */ } }
function DmSetStrsWithRootObj($rootObjName, $bCommit = TRUE, $paramArray) { return DmExtSetStrsWithRootObj($rootObjName, $bCommit, $paramArray); }