• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP setStr函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中setStr函数的典型用法代码示例。如果您正苦于以下问题:PHP setStr函数的具体用法?PHP setStr怎么用?PHP setStr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了setStr函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: MiniApplySSID

function MiniApplySSID($ssid)
{
    $apply_id = 1 << intval($ssid) - 1;
    $apply_rf = 2 - intval($ssid) % 2;
    setStr("Device.WiFi.Radio.{$apply_rf}.X_CISCO_COM_ApplySettingSSID", $apply_id, false);
    setStr("Device.WiFi.Radio.{$apply_rf}.X_CISCO_COM_ApplySetting", "true", true);
}
开发者ID:WizzerWorks,项目名称:webui,代码行数:7,代码来源:ajaxSet_wireless_network_configuration_edit.php


示例2: setRIPconfig

function setRIPconfig($ripInfo)
{
    $authType = $ripInfo['AuthType'];
    setStr("Device.Routing.RIP.Enable", "true", false);
    setStr("Device.Routing.RIP.InterfaceSetting.1.Enable", "true", false);
    setStr("Device.Routing.RIP.InterfaceSetting.1.Interface", $ripInfo['IfName'], false);
    if ($ripInfo['SendVer'] == "NA") {
        setStr("Device.Routing.RIP.InterfaceSetting.1.SendRA", "false", false);
    } else {
        setStr("Device.Routing.RIP.InterfaceSetting.1.SendRA", "true", false);
        setStr("Device.Routing.RIP.InterfaceSetting.1.X_CISCO_COM_SendVersion", $ripInfo['SendVer'], false);
    }
    if ($ripInfo['RecVer'] == "NA") {
        setStr("Device.Routing.RIP.InterfaceSetting.1.AcceptRA", "false", false);
    } else {
        setStr("Device.Routing.RIP.InterfaceSetting.1.AcceptRA", "true", false);
        setStr("Device.Routing.RIP.InterfaceSetting.1.X_CISCO_COM_ReceiveVersion", $ripInfo['RecVer'], false);
    }
    setStr("Device.Routing.RIP.X_CISCO_COM_UpdateInterval", $ripInfo['Interval'], false);
    setStr("Device.Routing.RIP.X_CISCO_COM_DefaultMetric", $ripInfo['Metric'], false);
    if (!strcasecmp($authType, "SimplePassword")) {
        setStr("Device.Routing.RIP.InterfaceSetting.1.X_CISCO_COM_SimplePassword", $ripInfo['auth_key'], false);
    } elseif (!strcasecmp($authType, "MD5")) {
        setStr("Device.Routing.RIP.InterfaceSetting.1.X_CISCO_COM_Md5KeyValue", $ripInfo['auth_key'], false);
        setStr("Device.Routing.RIP.InterfaceSetting.1.X_CISCO_COM_Md5KeyID", $ripInfo['auth_id'], false);
        //doesn't work?
    }
    setStr("Device.Routing.RIP.InterfaceSetting.1.X_CISCO_COM_AuthenticationType", $ripInfo['AuthType'], false);
    setStr("Device.Routing.RIP.InterfaceSetting.1.X_CISCO_COM_Neighbor", $ripInfo['NeighborIP'], true);
}
开发者ID:WizzerWorks,项目名称:webui,代码行数:30,代码来源:ajaxSet_RIP_configuration.php


示例3: explode

            $IDs = explode(",", getInstanceIDs("Device.NAT.PortMapping."));
            $i = $IDs[count($IDs) - 1];
            $rootObjName = "Device.NAT.PortMapping.";
            $paramArray = array(array("Device.NAT.PortMapping." . $i . ".Enable", "bool", $enableHSEntry), array("Device.NAT.PortMapping." . $i . ".InternalClient", "string", $ip), array("Device.NAT.PortMapping." . $i . ".InternalPort", "uint", $priport), array("Device.NAT.PortMapping." . $i . ".ExternalPort", "uint", $startport), array("Device.NAT.PortMapping." . $i . ".ExternalPortEndRange", "uint", $endport), array("Device.NAT.PortMapping." . $i . ".Protocol", "string", $type), array("Device.NAT.PortMapping." . $i . ".Description", "string", $name));
            $retStatus = DmExtSetStrsWithRootObj($rootObjName, TRUE, $paramArray);
            if (!$retStatus) {
                $result = "Success!";
            }
        }
    }
}
if (isset($_POST['active'])) {
    //this is to enable/disable PortActive
    $isChecked = $_POST['isChecked'];
    $i = $_POST['id'];
    setStr("Device.NAT.PortMapping." . $i . ".Enable", $isChecked, true);
}
if ($result == "") {
    //the set operation failure due to conflict with port trigger rules or ...
    //so need to remove the '0.0.0.0' entry
    $ids = explode(",", getInstanceIDs("Device.NAT.PortMapping."));
    foreach ($ids as $key => $j) {
        if (getStr("Device.NAT.PortMapping.{$j}.InternalClient") == "0.0.0.0") {
            delTblObj("Device.NAT.PortMapping.{$j}.");
        }
    }
    //end of foreach
}
//end of if
header("Content-Type: application/json");
echo json_encode($result);
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajax_hs_port_forwarding.php


示例4: json_decode

<?php

//upnpInfo = '{"IsEnabledUPnP":"'+isEnabledUPnP+'", "Period":"'+period+'", "Live":"'+live+'", "IsEnabledZero":"'+isEnabledZero+'", "IsEnabledQosUPnP":"'+isEnabledQosUPnP+'"}';
$upnpInfo = json_decode($_REQUEST['upnpInfo'], true);
//var_dump($upnpInfo);
//echo $ddnsInfo['IsEnabled'];
//echo "<br />";
$isEnabledUPnP = $upnpInfo['IsEnabledUPnP'];
if (!strcmp($isEnabledUPnP, "true")) {
    setStr("Device.UPnP.Device.UPnPIGD", $upnpInfo['IsEnabledUPnP'], true);
    setStr("Device.UPnP.Device.X_CISCO_COM_IGD_AdvertisementPeriod", $upnpInfo['Period'], true);
    setStr("Device.UPnP.Device.X_CISCO_COM_IGD_TTL", $upnpInfo['Live'], true);
} else {
    if (!strcmp($isEnabledUPnP, "false")) {
        setStr("Device.UPnP.Device.UPnPIGD", $upnpInfo['IsEnabledUPnP'], true);
    }
}
setStr("Device.X_CISCO_COM_DeviceControl.EnableZeroConfig", $upnpInfo['IsEnabledZero'], true);
//setStr("", $upnpInfo['IsEnabledQosUPnP']); //? R3
开发者ID:WizzerWorks,项目名称:webui,代码行数:19,代码来源:ajaxSet_UPnP_configuration.php


示例5: setStr

	// now add the data to webui entry
	setStr("Device.UserInterface.X_CISCO_COM_RemoteAccess.iprange.$tag.StartIP", $_POST['startIP'], false);
	setStr("Device.UserInterface.X_CISCO_COM_RemoteAccess.iprange.$tag.EndIP", $_POST['endIP'], true);
}
*/
if ($_POST['startIPv6'] != "notset") {
    setStr("Device.UserInterface.X_CISCO_COM_RemoteAccess.StartIpV6", $_POST['startIPv6'], true);
}
if ($_POST['endIPv6'] != "notset") {
    setStr("Device.UserInterface.X_CISCO_COM_RemoteAccess.EndIpV6", $_POST['endIPv6'], true);
}
if ($_POST['mso_mgmt'] != "notset") {
    setStr("Device.X_CISCO_COM_DeviceControl.EnableMsoRemoteMgmt", $_POST['mso_mgmt'], true);
}
if ($_POST['cus_mgmt'] != "notset") {
    setStr("Device.X_CISCO_COM_DeviceControl.EnableCusadminRemoteMgmt", $_POST['cus_mgmt'], true);
}
// put change port at the end of this script
if ($_POST['https'] != "notset") {
    setStr("Device.UserInterface.X_CISCO_COM_RemoteAccess.HttpsEnable", $_POST['https'], true);
}
if ($_POST['httpsport'] != "notset") {
    setStr("Device.X_CISCO_COM_DeviceControl.HTTPSPort", $_POST['httpsport'], true);
}
if ($_POST['http'] != "notset") {
    setStr("Device.UserInterface.X_CISCO_COM_RemoteAccess.HttpEnable", $_POST['http'], true);
}
if ($_POST['httpport'] != "notset") {
    setStr("Device.X_CISCO_COM_DeviceControl.HTTPPort", $_POST['httpport'], true);
}
// sleep(10);
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajax_remote_management.php


示例6: foreach

    foreach ($idArr as $key => $value) {
        $macArr["{$value}"] = getStr("Device.DHCPv4.Server.Pool.1.StaticAddress.{$value}.Chaddr");
    }
    foreach ($macArr as $key => $value) {
        if (!strcasecmp($value, $macAddr)) {
            $index = $key;
            break;
        }
    }
    if (isset($index)) {
        delTblObj("Device.DHCPv4.Server.Pool.1.StaticAddress.{$index}.");
    }
    $idArr = explode(",", getInstanceIds("Device.Hosts.Host."));
    unset($macArr);
    // this is very important
    foreach ($idArr as $key => $value) {
        $macArr["{$value}"] = getStr("Device.Hosts.Host.{$value}.PhysAddress");
    }
    foreach ($macArr as $key => $value) {
        if (!strcasecmp($value, $macAddr)) {
            $i = $key;
            break;
        }
    }
    if (isset($i)) {
        setStr("Device.Hosts.Host.{$i}.Comments", $deviceInfo['Comments'], true);
        setStr("Device.Hosts.Host.{$i}.AddressSource", "DHCP", true);
    }
    $result = "success";
}
echo json_encode($result);
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajaxSet_add_device.php


示例7: json_decode

<?php

//qosInfo = '{"IsEnabledWMM":"'+isEnabledWMM+'", "IsEnabledMoCA":"'+isEnabledMoCA+'", "IsEnabledLAN":"'+isEnabledLAN+'", "IsEnabledUPnP":"'+isEnabledUPnP+'"}';
$qosInfo = json_decode($_REQUEST['qosInfo'], true);
//var_dump($ddnsInfo);
$APIDs = explode(",", getInstanceIDs("Device.WiFi.AccessPoint."));
for ($i = 0; $i < count($APIDs); $i++) {
    if ("false" == $qosInfo['IsEnabledWMM']) {
        setStr("Device.WiFi.AccessPoint." . $APIDs[$i] . ".UAPSDEnable", "false", true);
    }
    setStr("Device.WiFi.AccessPoint." . $APIDs[$i] . ".WMMEnable", $qosInfo['IsEnabledWMM'], true);
    setStr("Device.WiFi.Radio." . $APIDs[$i] . ".X_CISCO_COM_ApplySetting", "true", true);
}
$MoCAIDs = explode(",", getInstanceIDs("Device.MoCA.Interface."));
for ($i = 0; $i < count($MoCAIDs); $i++) {
    setStr("Device.MoCA.Interface." . $MoCAIDs[$i] . ".QoS.X_CISCO_COM_Enabled", $qosInfo['IsEnabledMoCA'], true);
}
//setStr("", $qosInfo['IsEnabledLAN']);
//setStr("", $qosInfo['IsEnabledUPnP']);
开发者ID:WizzerWorks,项目名称:webui,代码行数:19,代码来源:ajaxSet_QoS1_configuration.php


示例8: setStr

<?php

if ("save_iq" == $_POST['target']) {
    setStr("Device.X_CISCO_COM_MTA.Dect.Enable", $_POST['cat_iq'], true);
} else {
    if ("save_pin" == $_POST['target']) {
        setStr("Device.X_CISCO_COM_MTA.Dect.PIN", $_POST['cat_pin'], true);
    } else {
        if ("save_tn" == $_POST['target']) {
            $arConfig = json_decode($_POST['cat_tn'], true);
            foreach ($arConfig as $val) {
                setStr("Device.X_CISCO_COM_MTA.Dect.Handsets.{$val['0']}.SupportedTN", $val[1], true);
            }
        } else {
            if ("register" == $_POST['target']) {
                if ("noChange" != $_POST['reg_mode']) {
                    setStr("Device.X_CISCO_COM_MTA.Dect.RegistrationMode", $_POST['reg_mode'], true);
                }
                echo $_POST['reg_mode'];
            } else {
                if ("deregister" == $_POST['target']) {
                    setStr("Device.X_CISCO_COM_MTA.Dect.DeregisterDectHandset", $_POST['dereg_id'], true);
                }
            }
        }
    }
}
// print_r($arConfig);
开发者ID:WizzerWorks,项目名称:webui,代码行数:28,代码来源:ajaxSet_cordless_handsets.php


示例9: array

        // setStr("Device.NAT.X_CISCO_COM_PortTriggers.Trigger.".$i.".Description",$name,false);
        // setStr("Device.NAT.X_CISCO_COM_PortTriggers.Trigger.".$i.".Enable","true",true);
        // $result="Success!";
        $rootObjName = "Device.NAT.X_CISCO_COM_PortTriggers.Trigger.";
        $paramArray = array(array("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".TriggerPortStart", "uint", $fsp), array("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".TriggerPortEnd", "uint", $fep), array("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".TriggerProtocol", "string", $type), array("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".ForwardProtocol", "string", $type), array("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".ForwardPortStart", "uint", $tsp), array("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".ForwardPortEnd", "uint", $tep), array("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".Description", "string", $name), array("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".Enable", "bool", "true"));
        $retStatus = DmExtSetStrsWithRootObj($rootObjName, TRUE, $paramArray);
        if (!$retStatus) {
            $result = "Success!";
        }
    }
    // echo json_encode($result);
}
if (isset($_POST['active'])) {
    $isChecked = $_POST['isChecked'];
    $i = $_POST['id'];
    setStr("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $i . ".Enable", $isChecked, true);
}
if (isset($_GET['del'])) {
    delTblObj("Device.NAT.X_CISCO_COM_PortTriggers.Trigger." . $_GET['del'] . ".");
    Header("Location:../port_triggering.php");
    exit;
}
if ($result == "") {
    //the set operation failure due to conflict with port forwarding rules or ...
    //so need to remove the '0~0,0~0' entry
    $ids = explode(",", getInstanceIDs("Device.NAT.X_CISCO_COM_PortTriggers.Trigger."));
    foreach ($ids as $key => $j) {
        $tport_start = getStr("Device.NAT.X_CISCO_COM_PortTriggers.Trigger.{$j}.TriggerPortStart");
        $fport_start = getStr("Device.NAT.X_CISCO_COM_PortTriggers.Trigger.{$j}.ForwardPortStart");
        if ($tport_start == 0 && $tport_start == $fport_start) {
            delTblObj("Device.NAT.X_CISCO_COM_PortTriggers.Trigger.{$j}.");
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajax_port_triggering.php


示例10: array

    $response = array();
    /* get the flag path first */
    $rootObjName = "Device.X_CISCO_COM_MultiLAN.";
    $paramNameArray = array("Device.X_CISCO_COM_MultiLAN.");
    $mapping_array = array("PrimaryLANBridge", "PrimaryLANBridgeHSPorts", "HomeSecurityBridge", "HomeSecurityBridgePorts");
    $multiLan = getParaValues($rootObjName, $paramNameArray, $mapping_array);
    if (empty($multiLan)) {
        throw new Exception('failed to fetch parameters from backend');
    }
    $pLanBridgeHSPortEnablePath = $multiLan[0]["PrimaryLANBridge"] . ".Port." . $multiLan[0]["PrimaryLANBridgeHSPorts"] . ".Enable";
    $HSBridgePortEnablePath = $multiLan[0]["HomeSecurityBridge"] . ".Port." . $multiLan[0]["HomeSecurityBridgePorts"] . ".Enable";
    if (empty($pLanBridgeHSPortEnablePath) || empty($HSBridgePortEnablePath)) {
        throw new Exception('failed to fetch parameters from backend');
    }
    if ($r_enable === 'true') {
        if (setStr($pLanBridgeHSPortEnablePath, "false", true) !== true || setStr($HSBridgePortEnablePath, "true", true) !== true) {
            throw new Exception('failed to set parameters to backend');
        }
    } else {
        if (setStr($pLanBridgeHSPortEnablePath, "true", true) !== true || setStr($HSBridgePortEnablePath, "false", true) !== true) {
            throw new Exception('failed to set parameters to backend');
        }
    }
    $response["status"] = "success";
    header("Content-Type: application/json");
    echo json_encode($response);
} catch (Exception $e) {
    $response = array("status" => "Failed", "msg" => $e->getMessage());
    header("Content-Type: application/json");
    echo json_encode($response);
}
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajaxSet_hardware_lan.php


示例11: header

<?php

header("Content-Type: application/json");
if (isset($_POST['Bridge'])) {
    $isBridgeModel = $_POST['isBridgeModel'];
    if ($isBridgeModel == "Enabled") {
        setStr("Device.X_CISCO_COM_DeviceControl.LanManagementEntry.1.LanMode", "bridge-static", true);
    } else {
        setStr("Device.X_CISCO_COM_DeviceControl.LanManagementEntry.1.LanMode", "router", true);
    }
    //20140523
    //set LanManagementEntry_ApplySettings after change LanManagementEntry table
    setStr("Device.X_CISCO_COM_DeviceControl.LanManagementEntry_ApplySettings", "true", true);
    $bridgeModel = getStr("Device.X_CISCO_COM_DeviceControl.LanManagementEntry.1.LanMode");
    if ($bridgeModel == "bridge-static") {
        echo json_encode("Enabled");
    } else {
        echo json_encode("Disabled");
    }
}
if (isset($_POST['IGMP'])) {
    $IGMPEnable = $_POST['IGMPEnable'] == "Enabled" ? "true" : "false";
    setStr("Device.X_CISCO_COM_DeviceControl.IGMPSnoopingEnable", $IGMPEnable, true);
    $IGMPModel = getStr("Device.X_CISCO_COM_DeviceControl.IGMPSnoopingEnable") == "true" ? "Enabled" : "Disabled";
    echo json_encode($IGMPModel);
}
开发者ID:WizzerWorks,项目名称:webui,代码行数:26,代码来源:ajax_at_a_glance.php


示例12: switch

<!-- $Id: header.php 3167 2010-03-03 18:11:27Z slemoine $ -->

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>XFINITY</title>
</head>
<body>
    <!--Main Container - Centers Everything-->
	<div id="container">
		<div id="main-content">
		<?php 
switch ($return_var) {
    case -1:
        echo "<h3>Error, get restore status failure</h3>";
        break;
    case 2:
        echo "<h3>Need Reboot to restore the saved configuration.</h3>";
        setStr("Device.X_CISCO_COM_DeviceControl.RebootDevice", "Router,Wifi,VoIP,Dect,MoCA", true);
        break;
    case 3:
        echo "<h3>Error, restore configuration failure!</h3>";
        break;
    default:
        echo "<h3>Restore configuration Failure! Please try later. </h3>";
        break;
}
?>
		</div>
	</div>
</body>
</html>
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:at_mycomputer_upload.php


示例13: setStr

    setStr("Device.DHCPv4.Server.Pool.1.MinAddress", $ip_config['Dhcp_begin_addr'], false);
    setStr("Device.DHCPv4.Server.Pool.1.MaxAddress", $ip_config['Dhcp_end_addr'], false);
    setStr("Device.DHCPv4.Server.Pool.1.LeaseTime", $ip_config['Dhcp_lease_time'], true);
} else {
    //set ipv6 part
    $state = $ip_config['Stateful'];
    $restore = $ip_config['restore'];
    if ($state == 'true') {
        //stateful
        getStr("Device.IP.Interface.1.IPv6Prefix.1.");
        //this line is a trick fix for Yan, may delete in future
        setStr("Device.RouterAdvertisement.InterfaceSetting.1.AdvManagedFlag", "true", true);
        setStr("Device.DHCPv6.Server.X_CISCO_COM_Type", "Stateful", true);
        setStr("Device.DHCPv6.Server.Pool.1.PrefixRangeBegin", $ip_config['dhcpv6_begin_addr'], false);
        setStr("Device.DHCPv6.Server.Pool.1.PrefixRangeEnd", $ip_config['dhcpv6_end_addr'], false);
        setStr("Device.DHCPv6.Server.Pool.1.LeaseTime", $ip_config['dhcpv6_lease_time'], true);
    } else {
        //stateless
        setStr("Device.RouterAdvertisement.InterfaceSetting.1.AdvManagedFlag", "false", true);
        setStr("Device.DHCPv6.Server.X_CISCO_COM_Type", "Stateless", true);
    }
    if ($restore == 'true') {
        getStr("Device.IP.Interface.1.IPv6Prefix.1.");
        //this line is a trick fix for Yan, may delete in future
        setStr("Device.RouterAdvertisement.InterfaceSetting.1.AdvManagedFlag", "true", true);
        setStr("Device.DHCPv6.Server.X_CISCO_COM_Type", "Stateful", true);
        setStr("Device.DHCPv6.Server.Pool.1.PrefixRangeBegin", $ip_config['dhcpv6_begin_addr'], false);
        setStr("Device.DHCPv6.Server.Pool.1.PrefixRangeEnd", $ip_config['dhcpv6_end_addr'], false);
        setStr("Device.DHCPv6.Server.Pool.1.LeaseTime", $ip_config['dhcpv6_lease_time'], true);
    }
}
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajaxSet_IP_configuration.php


示例14: json_decode

$jsConfig = $_REQUEST['configInfo'];
//$jsConfig = '{"moca_enable": "true", "scan_method": "true", "channel": "0000000001000000", "beacon_power": "0", "taboo_enable": "false", "taboo_freq": "00000003ffffc000", "nc_enable": "false", "privacy_enable": "false", "net_password": "", "qos_enable": "false"}';
$arConfig = json_decode($jsConfig, true);
//print_r($arConfig);
$thisUser = $arConfig['thisUser'];
if ("true" == $arConfig['moca_enable']) {
    if ("admin" != $thisUser) {
        setStr("Device.MoCA.Interface.1.X_CISCO_COM_ChannelScanning", $arConfig['scan_method'], false);
        if ("false" == $arConfig['scan_method']) {
            setStr("Device.MoCA.Interface.1.FreqCurrentMaskSetting", $arConfig['channel'], false);
        }
        setStr("Device.MoCA.Interface.1.BeaconPowerLimit", $arConfig['beacon_power'], false);
        // GUI version 3.0 removed Taboo enable option
        // setStr("Device.MoCA.Interface.1.X_CISCO_COM_EnableTabooBit", $arConfig['taboo_enable'], false);
        // if ("true" == $arConfig['taboo_enable']){
        setStr("Device.MoCA.Interface.1.NodeTabooMask", $arConfig['taboo_freq'], false);
        // }
        setStr("Device.MoCA.Interface.1.PreferredNC", $arConfig['nc_enable'], false);
        // GUI version 3.0 removed QoS option
        // setStr("Device.MoCA.Interface.1.QoS.X_CISCO_COM_Enabled", $arConfig['qos_enable'], false);
    }
    // GUI version 3.0 don't allowd home user to set MoCA privacy
    if ("admin" != $thisUser) {
        if ("true" == $arConfig['privacy_enable']) {
            setStr("Device.MoCA.Interface.1.KeyPassphrase", $arConfig['net_password'], false);
        }
        setStr("Device.MoCA.Interface.1.PrivacyEnabledSetting", $arConfig['privacy_enable'], false);
    }
}
setStr("Device.MoCA.Interface.1.Enable", $arConfig['moca_enable'], true);
echo $jsConfig;
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajaxSet_moca_config.php


示例15: json_decode

<?php

$flag = json_decode($_REQUEST['Enable'], true);
setStr("Device.X_Comcast_com_ParentalControl.ManagedSites.Enable", $flag['Enable'], true);
开发者ID:WizzerWorks,项目名称:webui,代码行数:4,代码来源:ajaxSet_enable_manageSite.php


示例16: array

            }
        }
    }
    if ($result == "") {
        $rootObjName = "Device.NAT.PortMapping.";
        $paramArray = array(array("Device.NAT.PortMapping." . $i . ".Enable", "bool", "true"), array("Device.NAT.PortMapping." . $i . ".InternalClient", "string", $ip), array("Device.NAT.PortMapping." . $i . ".X_CISCO_COM_InternalClientV6", "string", $ip6), array("Device.NAT.PortMapping." . $i . ".InternalPort", "uint", "0"), array("Device.NAT.PortMapping." . $i . ".ExternalPort", "uint", $sport), array("Device.NAT.PortMapping." . $i . ".ExternalPortEndRange", "uint", $eport), array("Device.NAT.PortMapping." . $i . ".Protocol", "string", $type), array("Device.NAT.PortMapping." . $i . ".Description", "string", $name));
        $retStatus = DmExtSetStrsWithRootObj($rootObjName, TRUE, $paramArray);
        if (!$retStatus) {
            $result = "Success!";
        }
    }
}
if (isset($_POST['active'])) {
    $isChecked = $_POST['isChecked'];
    $i = $_POST['id'];
    if (setStr("Device.NAT.PortMapping.{$i}.Enable", $isChecked, true) === true) {
        $result = "Success!";
    }
}
if (isset($_REQUEST['del'])) {
    delTblObj("Device.NAT.PortMapping." . $_REQUEST['del'] . ".");
    Header("Location:../port_forwarding.php");
    exit;
}
if ($result == "") {
    //the set operation failure due to conflict with port trigger rules or ...
    //so need to remove the '0.0.0.0' entry
    $ids = explode(",", getInstanceIDs("Device.NAT.PortMapping."));
    foreach ($ids as $key => $j) {
        if (getStr("Device.NAT.PortMapping.{$j}.InternalClient") == "0.0.0.0") {
            delTblObj("Device.NAT.PortMapping.{$j}.");
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajax_port_forwarding.php


示例17: json_decode

<?php

//$_REQUEST['configInfo'] = '{"SSID": "HOME-1FD9-5", "Channel": "3","SecurityMode": "WPA-PSK (TKIP)", Password": "12345678"}';
$wifi24G_config = json_decode($_REQUEST['configInfo'], true);
setStr("Device.WiFi.SSID.1.SSID", $wifi24G_config['SSID'], false);
setStr("Device.WiFi.Radio.1.Channel", $wifi24G_config['Channel'], false);
setStr("Device.WiFi.AccessPoint.1.Security.ModeEnabled", $wifi24G_config['SecurityMode'], false);
setStr("Device.WiFi.AccessPoint.1.Security.KeyPassphrase", $wifi24G_config['Password'], true);
开发者ID:WizzerWorks,项目名称:webui,代码行数:8,代码来源:ajaxSet_rangeExtenders_config.php


示例18: setStr

<?php

if (isset($_POST['set'])) {
    setStr("Device.DLNA.X_CISCO_COM_DMS.Enable", $_POST['dlna_enabled'], true);
}
开发者ID:WizzerWorks,项目名称:webui,代码行数:5,代码来源:ajaxSet_dlna_setting.php


示例19: setStr

//echo $ddnsInfo['Index'];
//echo $ddnsInfo['IsEnabled'];
//echo "<br />";
//echo $ddnsInfo['SpName'];
//echo "<br />";
//echo $ddnsInfo['User'];
//echo "<br />";
//echo $ddnsInfo['Passwd'];
//$index = $ddnsInfo['Index'];;
$index = 1;
$isEnabled = $ddnsInfo['IsEnabled'];
$spName = $ddnsInfo['SpName'];
if ($isEnabled == "true") {
    setStr("Device.X_CISCO_COM_DDNS.Enable", $isEnabled, false);
    if ($spName == "dyndns.org") {
        $index = 1;
        setStr("Device.X_CISCO_COM_DDNS.Service.2.Enable", "false", false);
    } else {
        $index = 2;
        setStr("Device.X_CISCO_COM_DDNS.Service.1.Enable", "false", false);
    }
    setStr("Device.X_CISCO_COM_DDNS.Service." . "{$index}" . ".ServiceName", $ddnsInfo['SpName'], false);
    setStr("Device.X_CISCO_COM_DDNS.Service." . "{$index}" . ".Username", $ddnsInfo['User'], false);
    setStr("Device.X_CISCO_COM_DDNS.Service." . "{$index}" . ".Password", $ddnsInfo['Passwd'], false);
    setStr("Device.X_CISCO_COM_DDNS.Service." . "{$index}" . ".Domain", $ddnsInfo['Host'], false);
    setStr("Device.X_CISCO_COM_DDNS.Service." . "{$index}" . ".Enable", $isEnabled, true);
} else {
    if ($isEnabled == "false") {
        setStr("Device.X_CISCO_COM_DDNS.Enable", $isEnabled, false);
    }
}
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajaxSet_DDNS_configuration.php


示例20: json_encode

    			setStr("Device.X_CISCO_COM_DDNS.Service.".$i.".Password",$password,false);
    			setStr("Device.X_CISCO_COM_DDNS.Service.".$i.".Domain",$hostname,false);
    			setStr("Device.X_CISCO_COM_DDNS.Service.".$i.".Enable","true",true);
    			$result="Success!";
    		}
    		echo json_encode($result);
    	}
    */
}
if (isset($_POST['edit'])) {
    $i = $_POST['ID'];
    $sp = $_POST['sp'];
    $username = $_POST['username'];
    $password = $_POST['password'];
    $hostname = $_POST['hostname'];
    setStr("Device.X_CISCO_COM_DDNS.Service." . $i . ".ServiceName", $sp, false);
    setStr("Device.X_CISCO_COM_DDNS.Service." . $i . ".Username", $username, false);
    setStr("Device.X_CISCO_COM_DDNS.Service." . $i . ".Password", $password, false);
    setStr("Device.X_CISCO_COM_DDNS.Service." . $i . ".Domain", $hostname, false);
    setStr("Device.X_CISCO_COM_DDNS.Service." . $i . ".Enable", "true", true);
    $result = "Success!";
    header("Content-Type: application/json");
    echo json_encode($result);
}
if (isset($_GET['del'])) {
    /*	delTblObj("Device.X_CISCO_COM_DDNS.Service.".$_GET['del'].".");*/
    $i = $_GET['del'];
    setStr("Device.X_CISCO_COM_DDNS.Service." . $i . ".Enable", "false", true);
    Header("Location:../dynamic_dns.php");
    exit;
}
开发者ID:WizzerWorks,项目名称:webui,代码行数:31,代码来源:ajax_ddns.php



注:本文中的setStr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP setThemeOption函数代码示例发布时间:2022-05-15
下一篇:
PHP setStatus函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap