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

PHP update_if_changed函数代码示例

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

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



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

示例1: array

 if (!$input_errors) {
     $poolent = array();
     if (isset($id) && $a_pool[$id]) {
         $poolent = $a_pool[$id];
     }
     if ($poolent['name'] != "") {
         $changedesc .= sprintf(gettext(" modified '%s' pool:"), $poolent['name']);
     }
     update_if_changed("name", $poolent['name'], $_POST['name']);
     update_if_changed("mode", $poolent['mode'], $_POST['mode']);
     update_if_changed("description", $poolent['descr'], $_POST['descr']);
     update_if_changed("port", $poolent['port'], $_POST['port']);
     update_if_changed("retry", $poolent['retry'], $_POST['retry']);
     update_if_changed("servers", $poolent['servers'], $_POST['servers']);
     update_if_changed("serversdisabled", $poolent['serversdisabled'], $_POST['serversdisabled']);
     update_if_changed("monitor", $poolent['monitor'], $_POST['monitor']);
     if (isset($id) && $a_pool[$id]) {
         /* modify all virtual servers with this name */
         for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
             if ($config['load_balancer']['virtual_server'][$i]['lbpool'] == $a_pool[$id]['name']) {
                 $config['load_balancer']['virtual_server'][$i]['lbpool'] = $poolent['name'];
             }
         }
         $a_pool[$id] = $poolent;
     } else {
         $a_pool[] = $poolent;
     }
     if ($changecount > 0) {
         /* Mark pool dirty */
         mark_subsystem_dirty('loadbalancer');
         write_config($changedesc);
开发者ID:nmccurdy,项目名称:pfsense,代码行数:31,代码来源:load_balancer_pool_edit.php


示例2: gettext

         $input_errors[] = gettext("A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.");
     }
 }
 if (!$input_errors) {
     update_if_changed("hostname", $config['system']['hostname'], $_POST['hostname']);
     update_if_changed("domain", $config['system']['domain'], $_POST['domain']);
     update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']);
     update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
     update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']);
     if ($_POST['language'] && $_POST['language'] != $config['system']['language']) {
         $config['system']['language'] = $_POST['language'];
         set_language($config['system']['language']);
     }
     /* pfSense themes */
     if (!$g['disablethemeselection']) {
         update_if_changed("System Theme", $config['theme'], $_POST['theme']);
     }
     /* XXX - billm: these still need updating after figuring out how to check if they actually changed */
     $olddnsservers = $config['system']['dnsserver'];
     unset($config['system']['dnsserver']);
     if ($_POST['dns1']) {
         $config['system']['dnsserver'][] = $_POST['dns1'];
     }
     if ($_POST['dns2']) {
         $config['system']['dnsserver'][] = $_POST['dns2'];
     }
     if ($_POST['dns3']) {
         $config['system']['dnsserver'][] = $_POST['dns3'];
     }
     if ($_POST['dns4']) {
         $config['system']['dnsserver'][] = $_POST['dns4'];
开发者ID:OptimWIFI,项目名称:pfsense,代码行数:31,代码来源:system.php


示例3: explode

 if ($pconfig['mode'] != "p2p_shared_key") {
     $reqdfields = explode(" ", "caref");
     $reqdfieldsn = array(gettext("Certificate Authority"));
 } elseif (!$pconfig['autokey_enable']) {
     /* We only need the shared key filled in if we are in shared key mode and autokey is not selected. */
     $reqdfields = array('shared_key');
     $reqdfieldsn = array(gettext('Shared key'));
 }
 do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
 if ($pconfig['mode'] != "p2p_shared_key" && empty($pconfig['certref']) && empty($pconfig['auth_user']) && empty($pconfig['auth_pass'])) {
     $input_errors[] = gettext("If no Client Certificate is selected, a username and/or password must be entered.");
 }
 if (!$input_errors) {
     $client = array();
     foreach ($simplefields as $stat) {
         update_if_changed($stat, $client[$stat], $_POST[$stat]);
     }
     if ($vpnid) {
         $client['vpnid'] = $vpnid;
     } else {
         $client['vpnid'] = openvpn_vpnid_next();
     }
     if ($_POST['disable'] == "yes") {
         $client['disable'] = true;
     }
     $client['protocol'] = $pconfig['protocol'];
     $client['dev_mode'] = $pconfig['dev_mode'];
     list($client['interface'], $client['ipaddr']) = explode("|", $pconfig['interface']);
     $client['local_port'] = $pconfig['local_port'];
     $client['server_addr'] = $pconfig['server_addr'];
     $client['server_port'] = $pconfig['server_port'];
开发者ID:vasiqmz,项目名称:pfsense,代码行数:31,代码来源:vpn_openvpn_client.php


示例4: sprintf

 if (isset($id) && $a_vs[$id]) {
     $vsent = $a_vs[$id];
 }
 if ($vsent['name'] != "") {
     $changedesc .= " " . sprintf(gettext("modified '%s' vs:"), $vsent['name']);
 } else {
     $changedesc .= " " . sprintf(gettext("created '%s' vs:"), $_POST['name']);
 }
 update_if_changed("name", $vsent['name'], $_POST['name']);
 update_if_changed("descr", $vsent['descr'], $_POST['descr']);
 update_if_changed("poolname", $vsent['poolname'], $_POST['poolname']);
 update_if_changed("port", $vsent['port'], $_POST['port']);
 update_if_changed("sitedown", $vsent['sitedown'], $_POST['sitedown']);
 update_if_changed("ipaddr", $vsent['ipaddr'], $_POST['ipaddr']);
 update_if_changed("mode", $vsent['mode'], $_POST['mode']);
 update_if_changed("relay protocol", $vsent['relay_protocol'], $_POST['relay_protocol']);
 if ($_POST['sitedown'] == "") {
     unset($vsent['sitedown']);
 }
 if (isset($id) && $a_vs[$id]) {
     if ($a_vs[$id]['name'] != $_POST['name']) {
         /* Because the VS name changed, mark the old name for cleanup. */
         cleanup_lb_mark_anchor($a_vs[$id]['name']);
     }
     $a_vs[$id] = $vsent;
 } else {
     $a_vs[] = $vsent;
 }
 if ($changecount > 0) {
     /* Mark virtual server dirty */
     mark_subsystem_dirty('loadbalancer');
开发者ID:mtisza,项目名称:pfsense,代码行数:31,代码来源:load_balancer_virtual_server_edit.php


示例5: gettext

     $input_errors[] = gettext("The time update interval must be either 0 (disabled) or between 6 and 1440.");
 }
 # it's easy to have a little too much whitespace in the field, clean it up for the user before processing.
 $_POST['timeservers'] = preg_replace('/[[:blank:]]+/', ' ', $_POST['timeservers']);
 $_POST['timeservers'] = trim($_POST['timeservers']);
 foreach (explode(' ', $_POST['timeservers']) as $ts) {
     if (!is_domain($ts)) {
         $input_errors[] = gettext("A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.");
     }
 }
 if (!$input_errors) {
     update_if_changed("hostname", $config['system']['hostname'], $_POST['hostname']);
     update_if_changed("domain", $config['system']['domain'], $_POST['domain']);
     update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']);
     update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
     update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']);
     if ($_POST['language'] && $_POST['language'] != $config['system']['language']) {
         $config['system']['language'] = $_POST['language'];
         set_language($config['system']['language']);
     }
     /* XXX - billm: these still need updating after figuring out how to check if they actually changed */
     $olddnsservers = $config['system']['dnsserver'];
     unset($config['system']['dnsserver']);
     if ($_POST['dns1']) {
         $config['system']['dnsserver'][] = $_POST['dns1'];
     }
     if ($_POST['dns2']) {
         $config['system']['dnsserver'][] = $_POST['dns2'];
     }
     if ($_POST['dns3']) {
         $config['system']['dnsserver'][] = $_POST['dns3'];
开发者ID:heper,项目名称:pfsense,代码行数:31,代码来源:system.php


示例6: update_if_changed

                    }
                }
            }
        }
    }
    if ($pool['name'] != "") {
        $changedesc .= " modified pool: '{$pool['name']}'";
    }
    $pool['ha_servers']['item'] = $a_servers;
    $pool['a_acl']['item'] = $pconfig['a_acl'];
    $pool['a_actionitems']['item'] = $pconfig['a_actionitems'];
    update_if_changed("advanced", $pool['advanced'], base64_encode($_POST['advanced']));
    update_if_changed("advanced_backend", $pool['advanced_backend'], base64_encode($_POST['advanced_backend']));
    global $simplefields;
    foreach ($simplefields as $stat) {
        update_if_changed($stat, $pool[$stat], $_POST[$stat]);
    }
    if (isset($id) && $a_pools[$id]) {
        $a_pools[$id] = $pool;
    } else {
        $a_pools[] = $pool;
    }
    if (!isset($input_errors)) {
        if ($changecount > 0) {
            touch($d_haproxyconfdirty_path);
            write_config($changedesc);
        }
        header("Location: haproxy_pools.php");
        exit;
    }
}
开发者ID:LFCavalcanti,项目名称:pfsense-packages,代码行数:31,代码来源:haproxy_pool_edit.php


示例7: update_if_changed

 update_if_changed("type", $monent['type'], $pconfig['type']);
 update_if_changed("description", $monent['descr'], $pconfig['descr']);
 if ($pconfig['type'] == "http" || $pconfig['type'] == "https") {
     /* log updates, then clear array and reassign - dumb, but easiest way to have a clear array */
     update_if_changed("path", $monent['options']['path'], $pconfig['options']['path']);
     update_if_changed("host", $monent['options']['host'], $pconfig['options']['host']);
     update_if_changed("code", $monent['options']['code'], $pconfig['options']['code']);
     $monent['options'] = array();
     $monent['options']['path'] = $pconfig['options']['path'];
     $monent['options']['host'] = $pconfig['options']['host'];
     $monent['options']['code'] = $pconfig['options']['code'];
 }
 if ($pconfig['type'] == "send") {
     /* log updates, then clear array and reassign - dumb, but easiest way to have a clear array */
     update_if_changed("send", $monent['options']['send'], $pconfig['options']['send']);
     update_if_changed("expect", $monent['options']['expect'], $pconfig['options']['expect']);
     $monent['options'] = array();
     $monent['options']['send'] = $pconfig['options']['send'];
     $monent['options']['expect'] = $pconfig['options']['expect'];
 }
 if ($pconfig['type'] == "tcp" || $pconfig['type'] == "icmp") {
     $monent['options'] = array();
 }
 if (isset($id) && $a_monitor[$id]) {
     /* modify all pools with this name */
     for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
         if ($config['load_balancer']['lbpool'][$i]['monitor'] == $a_monitor[$id]['name']) {
             $config['load_balancer']['lbpool'][$i]['monitor'] = $monent['name'];
         }
     }
     $a_monitor[$id] = $monent;
开发者ID:dariomas,项目名称:pfsense,代码行数:31,代码来源:load_balancer_monitor_edit.php


示例8: system_start_ftp_helpers

        /* per interface pftpx helper */
        if ($_POST['disableftpproxy'] == "yes") {
            $lancfg['disableftpproxy'] = true;
            system_start_ftp_helpers();
        } else {
            system_start_ftp_helpers();
        }
        $bridge = discover_bridge($lancfg['if'], filter_translate_type_to_real_interface($lancfg['bridge']));
        if ($bridge != "-1") {
            destroy_bridge($bridge);
            setup_bridge();
        }
        $lancfg['bridge'] = $_POST['bridge'];
        if ($lancfg['ipaddr'] != $_POST['ipaddr'] || $lancfg['subnet'] != $_POST['subnet']) {
            update_if_changed("IP Address", &$lancfg['ipaddr'], $_POST['ipaddr']);
            update_if_changed("subnet", &$lancfg['subnet'], $_POST['subnet']);
        }
        write_config($changedesc);
        touch($d_landirty_path);
        /* restart snmp so that it binds to correct address */
        services_snmpd_configure();
        if ($_POST['apply'] != "") {
            unlink($d_landirty_path);
            $savemsg = "Değişiklikler uygulandı.  İnternet gezgininizde yeni IP adresini yazmanız gerekebilir.";
        }
    }
}
$pgtitle = "Ağ aygıtları: LAN";
include "head.inc";
?>
开发者ID:rootsghost,项目名称:5651-pfsense,代码行数:30,代码来源:interfaces_lan.php


示例9: update_if_changed

     $a_backend =& $config['installedpackages']['haproxy']['ha_backends']['item'];
     for ($i = 0; $i < count($a_backend); $i++) {
         if ($a_backend[$i]['pool'] == $pool['name']) {
             $a_backend[$i]['pool'] = $_POST['name'];
         }
     }
 }
 if ($pool['name'] != "") {
     $changedesc .= " modified '{$pool['name']}' pool:";
 }
 $pool['ha_servers']['item'] = $a_servers;
 update_if_changed("name", $pool['name'], $_POST['name']);
 update_if_changed("cookie", $pool['cookie'], $_POST['cookie']);
 update_if_changed("advanced", $pool['advanced'], base64_encode($_POST['advanced']));
 update_if_changed("checkinter", $pool['checkinter'], $_POST['checkinter']);
 update_if_changed("monitor_uri", $pool['monitor_uri'], $_POST['monitor_uri']);
 if (isset($id) && $a_pools[$id]) {
     $a_pools[$id] = $pool;
 } else {
     $a_pools[] = $pool;
 }
 if ($changecount > 0) {
     touch($d_haproxyconfdirty_path);
     write_config($changedesc);
     /*
     echo "<PRE>";
     print_r($config);
     echo "</PRE>";
     */
 }
 header("Location: haproxy_pools.php");
开发者ID:nagyrobi,项目名称:pfsense-packages,代码行数:31,代码来源:haproxy_pool_edit.php


示例10: gettext

 }
 if ($_POST['sshport']) {
     if (!is_port($_POST['sshport'])) {
         $input_errors[] = gettext("You must specify a valid port number");
     }
 }
 ob_flush();
 flush();
 if (!$input_errors) {
     if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['webguiproto'])) {
         $restart_webgui = true;
     }
     if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['webguiport'])) {
         $restart_webgui = true;
     }
     if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref'])) {
         $restart_webgui = true;
     }
     if ($_POST['disablehttpredirect'] == "yes") {
         $config['system']['webgui']['disablehttpredirect'] = true;
         $restart_webgui = true;
     } else {
         unset($config['system']['webgui']['disablehttpredirect']);
         $restart_webgui = true;
     }
     if ($_POST['quietlogin'] == "yes") {
         $config['system']['webgui']['quietlogin'] = true;
     } else {
         unset($config['system']['webgui']['quietlogin']);
     }
     if ($_POST['disableconsolemenu'] == "yes") {
开发者ID:eneas193933,项目名称:core,代码行数:31,代码来源:system_advanced_admin.php


示例11: array

 $server = array();
 if (isset($id) && $a_server[$id]) {
     $server = $a_server[$id];
 }
 if ($server['name'] != "") {
     $changedesc .= " modified '{$server['name']}' pool:";
 }
 update_if_changed("name", $server['name'], $_POST['name']);
 update_if_changed("port", $server['port'], $_POST['port']);
 update_if_changed("backend", $server['backend'], $backend);
 update_if_changed("cookie", $server['cookie'], $_POST['cookie']);
 update_if_changed("weight", $server['weight'], $_POST['weight']);
 update_if_changed("status", $server['status'], $_POST['status']);
 update_if_changed("address", $server['address'], $_POST['address']);
 update_if_changed("advanced", $server['advanced'], base64_encode($_POST['advanced']));
 update_if_changed("checkinter", $server['checkinter'], $_POST['checkinter']);
 if (isset($id) && $a_server[$id]) {
     $a_server[$id] = $server;
 } else {
     $a_server[] = $server;
 }
 if ($changecount > 0) {
     touch($d_haproxyconfdirty_path);
     write_config($changedesc);
     /*
     echo "<PRE>";
     print_r($config);
     echo "</PRE>";
     */
 }
 header("Location: haproxy_servers.php");
开发者ID:nagyrobi,项目名称:pfsense-packages,代码行数:31,代码来源:haproxy_servers_edit.php


示例12: update_if_changed

 update_if_changed("protocol", $actent['protocol'], $pconfig['protocol']);
 update_if_changed("type", $actent['type'], $pconfig['type']);
 update_if_changed("direction", $actent['direction'], $pconfig['direction']);
 update_if_changed("description", $actent['descr'], $pconfig['descr']);
 update_if_changed("action", $actent['action'], $pconfig['action']);
 switch ($pconfig['action']) {
     case "append":
     case "change":
     case "expect":
     case "filter":
         update_if_changed("value", $actent['options']['value'], $pconfig['option_action_value']);
         update_if_changed("key", $actent['options']['akey'], $pconfig['option_action_key']);
         break;
     case "hash":
     case "log":
         update_if_changed("key", $actent['options']['akey'], $pconfig['option_action_key']);
         break;
 }
 if (isset($id) && $a_action[$id]) {
     //    XXX - TODO
     /* modify all virtual servers with this name */
     //			for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
     //				if ($config['load_balancer']['virtual_server'][$i]['protocol'] == $a_protocol[$id]['name'])
     //					$config['load_balancer']['virtual_server'][$i]['protocol'] = $protent['name'];
     //			}
     $a_action[$id] = $actent;
 } else {
     $a_action[] = $actent;
 }
 if ($changecount > 0) {
     /* Mark config dirty */
开发者ID:rdmenezes,项目名称:pfsense,代码行数:31,代码来源:load_balancer_relay_action_edit.php


示例13: preg_replace

         }
     }
 }
 # it's easy to have a little too much whitespace in the field, clean it up for the user before processing.
 $_POST['timeservers'] = preg_replace('/[[:blank:]]+/', ' ', $_POST['timeservers']);
 $_POST['timeservers'] = trim($_POST['timeservers']);
 foreach (explode(' ', $_POST['timeservers']) as $ts) {
     if (!is_domain($ts)) {
         $input_errors[] = gettext("A NTP Time Server name may only contain the characters a-z, 0-9, '-' and '.'.");
     }
 }
 if (!$input_errors) {
     update_if_changed("hostname", $config['system']['hostname'], $_POST['hostname']);
     update_if_changed("domain", $config['system']['domain'], $_POST['domain']);
     update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']);
     update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
     if ($_POST['language'] && $_POST['language'] != $config['system']['language']) {
         $config['system']['language'] = $_POST['language'];
         set_language();
     }
     unset($config['system']['webgui']['webguileftcolumnhyper']);
     $config['system']['webgui']['webguileftcolumnhyper'] = $_POST['webguileftcolumnhyper'] ? true : false;
     unset($config['system']['webgui']['dashboardavailablewidgetspanel']);
     $config['system']['webgui']['dashboardavailablewidgetspanel'] = $_POST['dashboardavailablewidgetspanel'] ? true : false;
     unset($config['system']['webgui']['systemlogsfilterpanel']);
     $config['system']['webgui']['systemlogsfilterpanel'] = $_POST['systemlogsfilterpanel'] ? true : false;
     unset($config['system']['webgui']['systemlogsmanagelogpanel']);
     $config['system']['webgui']['systemlogsmanagelogpanel'] = $_POST['systemlogsmanagelogpanel'] ? true : false;
     unset($config['system']['webgui']['statusmonitoringsettingspanel']);
     $config['system']['webgui']['statusmonitoringsettingspanel'] = $_POST['statusmonitoringsettingspanel'] ? true : false;
     /* XXX - billm: these still need updating after figuring out how to check if they actually changed */
开发者ID:LFCavalcanti,项目名称:pfsense,代码行数:31,代码来源:system.php


示例14: array

    if (!$input_errors) {
        $vsent = array();
        if (isset($id) && $a_vs[$id]) {
            $vsent = $a_vs[$id];
        }
        if ($vsent['name'] != "") {
            $changedesc .= " modified '{$vsent['name']}' vs:";
        } else {
            $changedesc .= " created '{$_POST['name']}' vs:";
        }
        update_if_changed("name", $vsent['name'], $_POST['name']);
        update_if_changed("desc", $vsent['desc'], $_POST['desc']);
        update_if_changed("pool", $vsent['pool'], $_POST['pool']);
        update_if_changed("port", $vsent['port'], $_POST['port']);
        update_if_changed("sitedown", $vsent['sitedown'], $_POST['sitedown']);
        update_if_changed("ipaddr", $vsent['ipaddr'], $_POST['ipaddr']);
        if (isset($id) && $a_vs[$id]) {
            $a_vs[$id] = $vsent;
        } else {
            $a_vs[] = $vsent;
        }
        if ($changecount > 0) {
            /* Mark virtual server dirty */
            touch($d_vsconfdirty_path);
            write_config($changedesc);
        }
        header("Location: load_balancer_virtual_server.php");
        exit;
    }
}
$pgtitle = "Yük Dağılımı: Sanal Sunucu: Düzenle";
开发者ID:rootsghost,项目名称:5651-pfsense,代码行数:31,代码来源:load_balancer_virtual_server_edit.php


示例15: unset

         unset($config['system']['ssh']['sshdkeyonly']);
     }
 }
 ob_flush();
 flush();
 if (!$input_errors) {
     if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['webguiproto'])) {
         $restart_webgui = true;
     }
     if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['webguiport'])) {
         $restart_webgui = true;
     }
     if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref'])) {
         $restart_webgui = true;
     }
     if (update_if_changed("webgui max processes", $config['system']['webgui']['max_procs'], $_POST['max_procs'])) {
         $restart_webgui = true;
     }
     // Restart the webgui only if this actually changed
     if ($_POST['webgui-redirect'] == "yes") {
         if ($config['system']['webgui']['disablehttpredirect'] != true) {
             $restart_webgui = true;
         }
         $config['system']['webgui']['disablehttpredirect'] = true;
     } else {
         if ($config['system']['webgui']['disablehttpredirect'] == true) {
             $restart_webgui = true;
         }
         unset($config['system']['webgui']['disablehttpredirect']);
     }
     if ($_POST['webgui-login-messages'] == "yes") {
开发者ID:calvinbui,项目名称:pfsense,代码行数:31,代码来源:system_advanced_admin.php


示例16: update_if_changed

        update_if_changed("cookie_name", $backend['cookie_name'], $_POST['cookie_name']);
        update_if_changed("forwardfor", $backend['forwardfor'], $_POST['forwardfor']);
        update_if_changed("httpclose", $backend['httpclose'], $_POST['httpclose']);
        update_if_changed("stats_enabled", $backend['stats_enabled'], $_POST['stats_enabled']);
        update_if_changed("stats_username", $backend['stats_username'], $_POST['stats_username']);
        update_if_changed("stats_password", $backend['stats_password'], $_POST['stats_password']);
        update_if_changed("stats_uri", $backend['stats_uri'], $_POST['stats_uri']);
        update_if_changed("stats_realm", $backend['stats_realm'], $_POST['stats_realm']);
        update_if_changed("type", $backend['type'], $_POST['type']);
        update_if_changed("port", $backend['port'], $_POST['port']);
        update_if_changed("svrport", $backend['svrport'], $_POST['svrport']);
        update_if_changed("extaddr", $backend['extaddr'], $_POST['extaddr']);
        update_if_changed("pool", $backend['pool'], $_POST['pool']);
        update_if_changed("max_connections", $backend['max_connections'], $_POST['max_connections']);
        update_if_changed("client_timeout", $backend['client_timeout'], $_POST['client_timeout']);
        update_if_changed("advanced", $backend['advanced'], base64_encode($_POST['advanced']));
        $backend['ha_acls']['item'] = $a_acl;
        if (isset($id) && $a_backend[$id]) {
            $a_backend[$id] = $backend;
        } else {
            $a_backend[] = $backend;
        }
        if ($changecount > 0) {
            touch($d_haproxyconfdirty_path);
            write_config($changedesc);
        }
        header("Location: haproxy_listeners.php");
        exit;
    }
}
$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
开发者ID:nagyrobi,项目名称:pfsense-packages,代码行数:31,代码来源:haproxy_listeners_edit.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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