示例#1
0
            if ($pconfig['wins_server_enable']) {
                $csc['wins_server1'] = $pconfig['wins_server1'];
                $csc['wins_server2'] = $pconfig['wins_server2'];
            }
            if ($pconfig['dns_server_enable']) {
                $csc['nbdd_server1'] = $pconfig['nbdd_server1'];
            }
        }
        if (isset($id) && $a_csc[$id]) {
            $old_csc = $a_csc[$id];
            $a_csc[$id] = $csc;
        } else {
            $a_csc[] = $csc;
        }
        if (!empty($old_csc['common_name'])) {
            openvpn_delete_csc($old_csc);
        }
        openvpn_resync_csc($csc);
        write_config();
        header("Location: vpn_openvpn_csc.php");
        exit;
    }
}
include "head.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
$tab_array = array();
示例#2
0
if (is_numericint($_GET['id'])) {
    $id = $_GET['id'];
}
if (isset($_POST['id']) && is_numericint($_POST['id'])) {
    $id = $_POST['id'];
}
$act = $_GET['act'];
if (isset($_POST['act'])) {
    $act = $_POST['act'];
}
if ($_GET['act'] == "del") {
    if (!$a_csc[$id]) {
        pfSenseHeader("vpn_openvpn_csc.php");
        exit;
    }
    openvpn_delete_csc($a_csc[$id]);
    unset($a_csc[$id]);
    write_config();
    $savemsg = gettext("Client Specific Override successfully deleted") . "<br />";
}
if ($_GET['act'] == "edit") {
    if (isset($id) && $a_csc[$id]) {
        $pconfig['custom_options'] = $a_csc[$id]['custom_options'];
        $pconfig['disable'] = isset($a_csc[$id]['disable']);
        $pconfig['common_name'] = $a_csc[$id]['common_name'];
        $pconfig['block'] = $a_csc[$id]['block'];
        $pconfig['description'] = $a_csc[$id]['description'];
        $pconfig['tunnel_network'] = $a_csc[$id]['tunnel_network'];
        $pconfig['local_network'] = $a_csc[$id]['local_network'];
        $pconfig['local_networkv6'] = $a_csc[$id]['local_networkv6'];
        $pconfig['remote_network'] = $a_csc[$id]['remote_network'];