Example #1
0
        exit;
    }
}
include "head.inc";
if ($input_errors) {
    print_input_errors($input_errors);
}
if ($savemsg) {
    print_info_box($savemsg, 'success');
}
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), true, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml");
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
if ($act == "new" || $act == "edit") {
    $form = new Form();
    $section = new Form_Section('General Information');
    $serveroptionlist = array();
    if (is_array($config['openvpn']['openvpn-server'])) {
        foreach ($config['openvpn']['openvpn-server'] as $serversettings) {
            if (in_array($serversettings['mode'], $openvpn_tls_server_modes)) {
                $serveroptionlist[$serversettings['vpnid']] = sprintf(gettext("OpenVPN Server %d: %s"), $serversettings['vpnid'], $serversettings['description']);
            }
        }
    }
    $section->addInput(new Form_Select('server_list', 'Server List', $pconfig['server_list'], $serveroptionlist, true))->setHelp('Select the servers for which the override will apply. Selecting no servers will also apply the override to all servers.');
    $section->addInput(new Form_Checkbox('disable', 'Disable', 'Disable this override', $pconfig['disable']))->setHelp('Set this option to disable this client-specific override without removing it from the list.');
    $section->addInput(new Form_Input('common_name', 'Common name', 'text', $pconfig['common_name']))->setHelp('Enter the client\'s X.509 common name.');
Example #2
0
    print_input_errors($input_errors);
}
if ($savemsg) {
    print_info_box($savemsg);
}
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn openvpn client">
	<tr>
		<td class="tabnavtbl">
			<?php 
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), true, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml");
add_package_tabs("openvpn-client-export", $tab_array);
display_top_tabs($tab_array);
?>
		</td>
	</tr>
	<tr>
		<td class="tabcont">

			<?php 
if ($act == "new" || $act == "edit") {
    ?>

			<form action="vpn_openvpn_client.php" method="post" name="iform" id="iform" onsubmit="presubmit()">
				<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="general information">
					<tr>
						<td colspan="2" valign="top" class="listtopic"><?php