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

PHP update_alias_names_upon_change函数代码示例

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

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



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

示例1: update_alias_names_upon_change

     update_alias_names_upon_change(array('nat', 'rule'), array('destination', 'address'), $_POST['name'], $origname);
     update_alias_names_upon_change(array('nat', 'rule'), array('destination', 'port'), $_POST['name'], $origname);
     update_alias_names_upon_change(array('nat', 'rule'), array('target'), $_POST['name'], $origname);
     update_alias_names_upon_change(array('nat', 'rule'), array('local-port'), $_POST['name'], $origname);
     // NAT 1:1 Rules
     //update_alias_names_upon_change(array('nat', 'onetoone'), array('external'), $_POST['name'], $origname);
     //update_alias_names_upon_change(array('nat', 'onetoone'), array('source', 'address'), $_POST['name'], $origname);
     update_alias_names_upon_change(array('nat', 'onetoone'), array('destination', 'address'), $_POST['name'], $origname);
     // NAT Outbound Rules
     update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('source', 'network'), $_POST['name'], $origname);
     update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('sourceport'), $_POST['name'], $origname);
     update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('destination', 'address'), $_POST['name'], $origname);
     update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('dstport'), $_POST['name'], $origname);
     update_alias_names_upon_change(array('nat', 'outbound', 'rule'), array('target'), $_POST['name'], $origname);
     // Alias in an alias
     update_alias_names_upon_change(array('aliases', 'alias'), array('address'), $_POST['name'], $origname);
 }
 pfSense_handle_custom_code("/usr/local/pkg/firewall_aliases_edit/pre_write_config");
 if (isset($id) && $a_aliases[$id]) {
     if ($a_aliases[$id]['name'] != $alias['name']) {
         foreach ($a_aliases as $aliasid => $aliasd) {
             if ($aliasd['address'] != "") {
                 $tmpdirty = false;
                 $tmpaddr = explode(" ", $aliasd['address']);
                 foreach ($tmpaddr as $tmpidx => $tmpalias) {
                     if ($tmpalias == $a_aliases[$id]['name']) {
                         $tmpaddr[$tmpidx] = $alias['name'];
                         $tmpdirty = true;
                     }
                 }
                 if ($tmpdirty == true) {
开发者ID:jefersonJim,项目名称:pfsense,代码行数:31,代码来源:firewall_aliases_edit.php


示例2: foreach

 }
 /* check for interface names with an alias */
 if (is_array($ifdescrs)) {
     foreach ($ifdescrs as $iface) {
         if (is_alias($config['interfaces'][$iface]['descr'])) {
             // Firewall rules
             $origname = $config['interfaces'][$iface]['descr'];
             $newname = $config['interfaces'][$iface]['descr'] . "Alias";
             update_alias_names_upon_change(array('filter', 'rule'), array('source', 'address'), $newname, $origname);
             update_alias_names_upon_change(array('filter', 'rule'), array('destination', 'address'), $newname, $origname);
             // NAT Rules
             update_alias_names_upon_change(array('nat', 'rule'), array('source', 'address'), $newname, $origname);
             update_alias_names_upon_change(array('nat', 'rule'), array('destination', 'address'), $newname, $origname);
             update_alias_names_upon_change(array('nat', 'rule'), array('target'), $newname, $origname);
             // Alias in an alias
             update_alias_names_upon_change(array('aliases', 'alias'), array('address'), $newname, $origname);
         }
     }
 }
 unlink_if_exists("{$g['tmp_path']}/config.cache");
 // Reset configuration version to something low
 // in order to force the config upgrade code to
 // run through with all steps that are required.
 $config['system']['version'] = "1.0";
 // Deal with descriptions longer than 63 characters
 for ($i = 0; isset($config["filter"]["rule"][$i]); $i++) {
     if (count($config['filter']['rule'][$i]['descr']) > 63) {
         $config['filter']['rule'][$i]['descr'] = substr($config['filter']['rule'][$i]['descr'], 0, 63);
     }
 }
 // Move interface from ipsec to enc0
开发者ID:jdillard,项目名称:pfsense,代码行数:31,代码来源:diag_backup.php


示例3: foreach

     }
     /* check for interface names with an alias */
     if (is_array($ifdescrs)) {
         foreach ($ifdescrs as $iface) {
             if (is_alias($config['interfaces'][$iface]['descr'])) {
                 // Firewall rules
                 $origname = $config['interfaces'][$iface]['descr'];
                 $newname = $config['interfaces'][$iface]['descr'] . "Alias";
                 update_alias_names_upon_change('filter', 'rule', 'source', 'address', $newname, $origname);
                 update_alias_names_upon_change('filter', 'rule', 'destination', 'address', $newname, $origname);
                 // NAT Rules
                 update_alias_names_upon_change('nat', 'rule', 'target', '', $newname, $origname);
                 update_alias_names_upon_change('nat', 'rule', 'external-port', '', $newname, $origname);
                 update_alias_names_upon_change('nat', 'rule', 'local-port', '', $newname, $origname);
                 // Alias in an alias
                 update_alias_names_upon_change('aliases', 'alias', 'address', '', $newname, $origname);
             }
         }
     }
     unlink_if_exists("/tmp/config.cache");
     write_config();
     add_base_packages_menu_items();
     conf_mount_ro();
     $savemsg = "m0n0wall ayarları sisteme uyarlandı {$g['product_name']}.<p>Firewall şu anda yeniden başlatılıyor.";
     $reboot_needed = true;
 }
 if (isset($config['captiveportal']['enable'])) {
     /* for some reason ipfw doesn't init correctly except on bootup sequence */
     $savemsg = "Ayarlar yapılandırıldı.<p>Firewall şu anda yeniden başlatılıyor.";
     $reboot_needed = true;
 }
开发者ID:rootsghost,项目名称:5651-pfsense,代码行数:31,代码来源:diag_backup.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP update_application函数代码示例发布时间:2022-05-23
下一篇:
PHP update_address函数代码示例发布时间: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