当前位置: 首页>>代码示例>>PHP>>正文


PHP legacy_move_config_list_items函数代码示例

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


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

示例1: foreach

     foreach ($pconfig['rule'] as $rulei) {
         if (isset($a_out[$rulei])) {
             unset($a_out[$rulei]);
         }
     }
     if (write_config()) {
         mark_subsystem_dirty('natconf');
     }
     header("Location: firewall_nat_out.php");
     exit;
 } elseif (isset($pconfig['act']) && $pconfig['act'] == 'move' && isset($pconfig['rule']) && count($pconfig['rule']) > 0) {
     // if rule not set/found, move to end
     if (!isset($id)) {
         $id = count($a_out);
     }
     $a_out = legacy_move_config_list_items($a_out, $id, $pconfig['rule']);
     if (write_config()) {
         mark_subsystem_dirty('natconf');
     }
     header("Location: firewall_nat_out.php");
     exit;
 } elseif (isset($pconfig['act']) && $pconfig['act'] == 'toggle' && isset($id)) {
     // toggle item disabled / enabled
     if (isset($a_out[$id]['disabled'])) {
         unset($a_out[$id]['disabled']);
     } else {
         $a_out[$id]['disabled'] = true;
     }
     if (write_config("Firewall: NAT: Outbound, enable/disable NAT rule")) {
         mark_subsystem_dirty('natconf');
     }
开发者ID:karawan,项目名称:core,代码行数:31,代码来源:firewall_nat_out.php

示例2: unset

             }
         }
         unset($a_filter[$rulei]);
     }
     if (write_config()) {
         mark_subsystem_dirty('filter');
     }
     header("Location: firewall_rules.php?if=" . htmlspecialchars($current_if));
     exit;
 } elseif (isset($pconfig['act']) && $pconfig['act'] == 'move' && isset($pconfig['rule']) && count($pconfig['rule']) > 0) {
     // move selected rules
     if (!isset($id)) {
         // if rule not set/found, move to end
         $id = count($a_filter);
     }
     $a_filter = legacy_move_config_list_items($a_filter, $id, $pconfig['rule']);
     if (write_config()) {
         mark_subsystem_dirty('filter');
     }
     header("Location: firewall_rules.php?if=" . htmlspecialchars($current_if));
     exit;
 } elseif (isset($pconfig['act']) && $pconfig['act'] == 'toggle' && isset($id)) {
     // toggle item
     if (isset($a_filter[$id]['disabled'])) {
         unset($a_filter[$id]['disabled']);
     } else {
         $a_filter[$id]['disabled'] = true;
     }
     if (write_config()) {
         mark_subsystem_dirty('filter');
     }
开发者ID:siloportem,项目名称:core,代码行数:31,代码来源:firewall_rules.php

示例3: elseif

    } elseif (isset($id) && $act == "toggle") {
        if (isset($a_routes[$id]['disabled'])) {
            unset($a_routes[$id]['disabled']);
        } else {
            delete_static_route($id);
            $a_routes[$id]['disabled'] = true;
        }
        write_config();
        mark_subsystem_dirty('staticroutes');
    } elseif ($act == 'move' && isset($pconfig['route']) && count($pconfig['route']) > 0) {
        // move selected rules
        if (!isset($id)) {
            // if rule not set/found, move to end
            $id = count($a_routes);
        }
        $a_routes = legacy_move_config_list_items($a_routes, $id, $pconfig['route']);
        if (write_config()) {
            mark_subsystem_dirty('staticroutes');
        }
    }
    header("Location: system_routes.php");
    exit;
}
$a_gateways = return_gateways_array(true, true, true);
legacy_html_escape_form_data($a_routes);
legacy_html_escape_form_data($a_gateways);
$main_buttons = array(array('label' => gettext('Add route'), 'href' => 'system_routes_edit.php'));
include "head.inc";
?>

开发者ID:siloportem,项目名称:core,代码行数:29,代码来源:system_routes.php

示例4: foreach

     foreach ($pconfig['rule'] as $rulei) {
         unset($a_1to1[$rulei]);
     }
     if (write_config()) {
         mark_subsystem_dirty('natconf');
     }
     header("Location: firewall_nat_1to1.php");
     exit;
 } elseif (isset($pconfig['action']) && $pconfig['action'] == 'move') {
     // move selected
     if (isset($pconfig['rule']) && count($pconfig['rule']) > 0) {
         // if rule not set/found, move to end
         if (!isset($id)) {
             $id = count($a_1to1);
         }
         $a_1to1 = legacy_move_config_list_items($a_1to1, $id, $pconfig['rule']);
         if (write_config()) {
             mark_subsystem_dirty('natconf');
         }
         header("Location: firewall_nat_1to1.php");
         exit;
     }
 } elseif (isset($pconfig['action']) && $pconfig['action'] == 'toggle' && isset($id)) {
     // toggle item
     if (isset($a_1to1[$id]['disabled'])) {
         unset($a_1to1[$id]['disabled']);
     } else {
         $a_1to1[$id]['disabled'] = true;
     }
     if (write_config(gettext('Toggled NAT rule'))) {
         mark_subsystem_dirty('natconf');
开发者ID:8191,项目名称:opnsense-core,代码行数:31,代码来源:firewall_nat_1to1.php

示例5: elseif

    } elseif (isset($pconfig['act']) && $pconfig['act'] == 'del' && isset($id)) {
        redirectReadOnlyUser();
        $input_errors = deleteVIPEntry($id);
        if (count($input_errors) == 0) {
            write_config();
            header("Location: firewall_virtual_ip.php");
            exit;
        }
    } elseif (isset($pconfig['act']) && $pconfig['act'] == 'move' && isset($pconfig['rule']) && count($pconfig['rule']) > 0) {
        redirectReadOnlyUser();
        // move selected rules
        if (!isset($id)) {
            // if rule not set/found, move to end
            $id = count($a_vip);
        }
        $a_vip = legacy_move_config_list_items($a_vip, $id, $pconfig['rule']);
        write_config();
        header("Location: firewall_virtual_ip.php");
        exit;
    }
}
include "head.inc";
$main_buttons = array(array('href' => 'firewall_virtual_ip_edit.php', 'label' => gettext('Add')));
?>
<body>
  <script type="text/javascript">
  $( document ).ready(function() {
    // link delete buttons
    $(".act_delete").click(function(){
      var id = $(this).attr("id").split('_').pop(-1);
      // delete single
开发者ID:8191,项目名称:opnsense-core,代码行数:31,代码来源:firewall_virtual_ip.php

示例6: mark_subsystem_dirty

        }
        if (write_config()) {
            mark_subsystem_dirty('ipsec');
        }
        header("Location: vpn_ipsec.php");
        exit;
    } elseif (!empty($_POST['act']) && $_POST['act'] == "movep2") {
        // move phase 2 records
        if (isset($_POST['p2entry']) && count($_POST['p2entry']) > 0) {
            // if rule not set/found, move to end
            if (!isset($_POST['id']) || !isset($a_phase2[$_POST['id']])) {
                $id = count($a_phase2);
            } else {
                $id = $_POST['id'];
            }
            $a_phase2 = legacy_move_config_list_items($a_phase2, $id, $_POST['p2entry']);
        }
        if (write_config()) {
            mark_subsystem_dirty('ipsec');
        }
        header("Location: vpn_ipsec.php");
        exit;
    }
}
// form data
$pconfig = $config['ipsec'];
$pconfig['enable'] = isset($config['ipsec']['enable']);
legacy_html_escape_form_data($pconfig);
$shortcut_section = 'ipsec';
include "head.inc";
?>
开发者ID:8191,项目名称:opnsense-core,代码行数:31,代码来源:vpn_ipsec.php


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