Commit 2720f74f authored by Franco Fichtner's avatar Franco Fichtner

vpn: moar style for almost all pages

parent a4736cbf
This diff is collapsed.
...@@ -64,8 +64,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -64,8 +64,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
} }
} else { } else {
// nothing to post, redirect // nothing to post, redirect
header("Location: vpn_ipsec_keys.php"); header("Location: vpn_ipsec_keys.php");
exit; exit;
} }
} }
...@@ -110,12 +110,12 @@ $( document ).ready(function() { ...@@ -110,12 +110,12 @@ $( document ).ready(function() {
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php <?php
if (isset($savemsg)) { if (isset($savemsg)) {
print_info_box($savemsg); print_info_box($savemsg);
} }
if (is_subsystem_dirty('ipsec')) { if (is_subsystem_dirty('ipsec')) {
print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect.")); print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
} }
?> ?>
<section class="col-xs-12"> <section class="col-xs-12">
...@@ -136,45 +136,48 @@ $( document ).ready(function() { ...@@ -136,45 +136,48 @@ $( document ).ready(function() {
</tr> </tr>
<?php $i = 0; <?php $i = 0;
$userkeys = array(); $userkeys = array();
foreach ($config['system']['user'] as $id => $user) { foreach ($config['system']['user'] as $id => $user) {
if (!empty($user['ipsecpsk'])) { if (!empty($user['ipsecpsk'])) {
$userkeys[] = array('ident' => $user['name'], 'pre-shared-key' => $user['ipsecpsk'], 'id' => $id); $userkeys[] = array('ident' => $user['name'], 'pre-shared-key' => $user['ipsecpsk'], 'id' => $id);
; ;
} }
} }
foreach ($userkeys as $secretent) : foreach ($userkeys as $secretent) :
?> ?>
<tr> <tr>
<td> <td>
<?=$secretent['ident'] == 'allusers' ? gettext("ANY USER") : htmlspecialchars($secretent['ident']) ;?> <?=$secretent['ident'] == 'allusers' ? gettext("ANY USER") : htmlspecialchars($secretent['ident']) ;?>
</td> </td>
<td> <td>
<?=htmlspecialchars($secretent['pre-shared-key']);?> <?=htmlspecialchars($secretent['pre-shared-key']);?>
</td> </td>
<td> <td>
<a href="system_usermanager.php?userid=<?=$secretent['id'];?>&act=edit" title="<?=gettext("edit"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a> <a href="system_usermanager.php?userid=<?=$secretent['id'];
</td> ?>&act=edit" title="<?=gettext("edit"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
</tr> </td>
</tr>
<?php $i++; <?php $i++;
endforeach; ?> endforeach; ?>
<?php <?php
$i = 0; $i = 0;
foreach ($config['ipsec']['mobilekey'] as $secretent) : foreach ($config['ipsec']['mobilekey'] as $secretent) :
?> ?>
<tr> <tr>
<td> <td>
<?=htmlspecialchars($secretent['ident']);?> <?=htmlspecialchars($secretent['ident']);?>
</td> </td>
<td> <td>
<?=htmlspecialchars($secretent['pre-shared-key']);?> <?=htmlspecialchars($secretent['pre-shared-key']);?>
</td> </td>
<td> <td>
<a href="vpn_ipsec_keys_edit.php?id=<?=$i;?>" title="<?=gettext("edit key"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a> <a href="vpn_ipsec_keys_edit.php?id=<?=$i;
<a id="del_<?=$i;?>" title="<?=gettext("delete key"); ?>" class="act_delete btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a> ?>" title="<?=gettext("edit key"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
</td> <a id="del_<?=$i;
</tr> ?>" title="<?=gettext("delete key"); ?>" class="act_delete btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php $i++; <?php $i++;
endforeach; ?> endforeach; ?>
<tr> <tr>
<td colspan="2"></td> <td colspan="2"></td>
<td> <td>
......
...@@ -44,7 +44,7 @@ if (!isset($config['ipsec']['mobilekey'])) { ...@@ -44,7 +44,7 @@ if (!isset($config['ipsec']['mobilekey'])) {
if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig = array(); $pconfig = array();
if(isset($_GET['id']) && is_numericint($_GET['id']) && isset($config['ipsec']['mobilekey'][$_GET['id']])) { if (isset($_GET['id']) && is_numericint($_GET['id']) && isset($config['ipsec']['mobilekey'][$_GET['id']])) {
// fetch record // fetch record
$id = $_GET['id']; $id = $_GET['id'];
$pconfig['ident'] = $config['ipsec']['mobilekey'][$id]['ident']; $pconfig['ident'] = $config['ipsec']['mobilekey'][$id]['ident'];
...@@ -58,7 +58,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -58,7 +58,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$input_errors = array(); $input_errors = array();
$pconfig = $_POST; $pconfig = $_POST;
// fetch record number if valid // fetch record number if valid
if (isset($_POST['id']) && is_numericint($_POST['id']) && isset($config['ipsec']['mobilekey'][$_POST['id']]) ) { if (isset($_POST['id']) && is_numericint($_POST['id']) && isset($config['ipsec']['mobilekey'][$_POST['id']])) {
$id = $_POST['id']; $id = $_POST['id'];
} else { } else {
$id = null; $id = null;
...@@ -133,7 +133,7 @@ include("head.inc"); ...@@ -133,7 +133,7 @@ include("head.inc");
<div class="row"> <div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) { <?php if (isset($input_errors) && count($input_errors) > 0) {
print_input_errors($input_errors); print_input_errors($input_errors);
} }
?> ?>
<section class="col-xs-12"> <section class="col-xs-12">
<div class="content-box"> <div class="content-box">
......
This diff is collapsed.
This diff is collapsed.
...@@ -142,12 +142,12 @@ function maxmss_checked(obj) { ...@@ -142,12 +142,12 @@ function maxmss_checked(obj) {
<div class="row"> <div class="row">
<?php <?php
if (isset($savemsg)) { if (isset($savemsg)) {
print_info_box($savemsg); print_info_box($savemsg);
} }
if (isset($input_errors) && count($input_errors) > 0) { if (isset($input_errors) && count($input_errors) > 0) {
print_input_errors($input_errors); print_input_errors($input_errors);
} }
?> ?>
<section class="col-xs-12"> <section class="col-xs-12">
<? $active_tab = "/vpn_ipsec_settings.php"; <? $active_tab = "/vpn_ipsec_settings.php";
...@@ -169,7 +169,7 @@ function maxmss_checked(obj) { ...@@ -169,7 +169,7 @@ function maxmss_checked(obj) {
<input name="noinstalllanspd" type="checkbox" id="noinstalllanspd" value="yes" <?=!empty($pconfig['noinstalllanspd']) ? "checked=\"checked\"" : "";?> /> <input name="noinstalllanspd" type="checkbox" id="noinstalllanspd" value="yes" <?=!empty($pconfig['noinstalllanspd']) ? "checked=\"checked\"" : "";?> />
<strong><?=gettext("Do not install LAN SPD"); ?></strong> <strong><?=gettext("Do not install LAN SPD"); ?></strong>
<div class="hidden" for="help_for_noinstalllanspd"> <div class="hidden" for="help_for_noinstalllanspd">
<?=gettext("By default, if IPSec is enabled negating SPD are inserted to provide protection. " . <?=gettext("By default, if IPSec is enabled negating SPD are inserted to provide protection. " .
"This behaviour can be changed by enabling this setting which will prevent installing these SPDs."); ?> "This behaviour can be changed by enabling this setting which will prevent installing these SPDs."); ?>
</div> </div>
</td> </td>
...@@ -180,7 +180,7 @@ function maxmss_checked(obj) { ...@@ -180,7 +180,7 @@ function maxmss_checked(obj) {
<input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?= !empty($pconfig['preferoldsa_enable']) ? "checked=\"checked\"" : "";?> /> <input name="preferoldsa_enable" type="checkbox" id="preferoldsa_enable" value="yes" <?= !empty($pconfig['preferoldsa_enable']) ? "checked=\"checked\"" : "";?> />
<strong><?=gettext("Prefer older IPsec SAs"); ?></strong> <strong><?=gettext("Prefer older IPsec SAs"); ?></strong>
<div class="hidden" for="help_for_preferoldsa_enable"> <div class="hidden" for="help_for_preferoldsa_enable">
<?=gettext("By default, if several SAs match, the newest one is " . <?=gettext("By default, if several SAs match, the newest one is " .
"preferred if it's at least 30 seconds old. Select this " . "preferred if it's at least 30 seconds old. Select this " .
"option to always prefer old SAs over new ones."); ?> "option to always prefer old SAs over new ones."); ?>
</div> </div>
...@@ -196,16 +196,16 @@ function maxmss_checked(obj) { ...@@ -196,16 +196,16 @@ function maxmss_checked(obj) {
?> ?>
<?=$ldescr?> <?=$ldescr?>
<select name="ipsec_<?=$lkey?>" id="ipsec_<?=$lkey?>"> <select name="ipsec_<?=$lkey?>" id="ipsec_<?=$lkey?>">
<?php foreach (array("Silent", "Audit", "Control", "Diag", "Raw", "Highest") as $lidx => $lvalue): <?php foreach (array("Silent", "Audit", "Control", "Diag", "Raw", "Highest") as $lidx => $lvalue) :
?> ?>
<option value="<?=$lidx?>" <?= isset($pconfig["ipsec_{$lkey}"]) && $pconfig["ipsec_{$lkey}"] == $lidx ? "selected=\"selected\"" : "";?> ?> <option value="<?=$lidx?>" <?= isset($pconfig["ipsec_{$lkey}"]) && $pconfig["ipsec_{$lkey}"] == $lidx ? "selected=\"selected\"" : "";?> ?>
<?=$lvalue?> <?=$lvalue?>
</option> </option>
<?php <?php
endforeach; ?> endforeach; ?>
</select> </select>
<?php <?php
endforeach; ?> endforeach; ?>
<div class="hidden" for="help_for_ipsec_debug"> <div class="hidden" for="help_for_ipsec_debug">
<?=gettext("Launches IPSec in debug mode so that more verbose logs " . <?=gettext("Launches IPSec in debug mode so that more verbose logs " .
"will be generated to aid in troubleshooting."); ?> "will be generated to aid in troubleshooting."); ?>
...@@ -218,7 +218,7 @@ function maxmss_checked(obj) { ...@@ -218,7 +218,7 @@ function maxmss_checked(obj) {
<input name="failoverforcereload" type="checkbox" id="failoverforcereload" value="yes" <?= !empty($pconfig['failoverforcereload']) ? "checked=\"checked\"" : "";?> /> <input name="failoverforcereload" type="checkbox" id="failoverforcereload" value="yes" <?= !empty($pconfig['failoverforcereload']) ? "checked=\"checked\"" : "";?> />
<strong><?=gettext("Force IPsec Reload on Failover"); ?></strong> <strong><?=gettext("Force IPsec Reload on Failover"); ?></strong>
<div class="hidden" for="help_for_failoverforcereloadg"> <div class="hidden" for="help_for_failoverforcereloadg">
<?=gettext("In some circumstances using a gateway group as the interface for " . <?=gettext("In some circumstances using a gateway group as the interface for " .
"an IPsec tunnel does not function properly, and IPsec must be forcefully reloaded " . "an IPsec tunnel does not function properly, and IPsec must be forcefully reloaded " .
"when a failover occurs. Because this will disrupt all IPsec tunnels, this behavior" . "when a failover occurs. Because this will disrupt all IPsec tunnels, this behavior" .
" is disabled by default. Check this box to force IPsec to fully reload on failover."); ?> " is disabled by default. Check this box to force IPsec to fully reload on failover."); ?>
...@@ -230,7 +230,8 @@ function maxmss_checked(obj) { ...@@ -230,7 +230,8 @@ function maxmss_checked(obj) {
<td> <td>
<input name="maxmss_enable" type="checkbox" id="maxmss_enable" value="yes" <?= !empty($pconfig['maxmss_enable']) ? "checked=\"checked\"" : "" ;?> onclick="maxmss_checked()" /> <input name="maxmss_enable" type="checkbox" id="maxmss_enable" value="yes" <?= !empty($pconfig['maxmss_enable']) ? "checked=\"checked\"" : "" ;?> onclick="maxmss_checked()" />
<strong><?=gettext("Enable MSS clamping on VPN traffic"); ?></strong> <strong><?=gettext("Enable MSS clamping on VPN traffic"); ?></strong>
<input name="maxmss" id="maxmss" type="text" value="<?= !empty($pconfig['maxmss']) ? $pconfig['maxmss'] : "1400";?>" <?= !empty($pconfig['maxmss_enable']) ? "disabled=\"disabled\"" : "" ;?> /> <input name="maxmss" id="maxmss" type="text" value="<?= !empty($pconfig['maxmss']) ? $pconfig['maxmss'] : "1400";
?>" <?= !empty($pconfig['maxmss_enable']) ? "disabled=\"disabled\"" : "" ;?> />
<div class="hidden" for="help_for_maxmss_enable"> <div class="hidden" for="help_for_maxmss_enable">
<?=gettext("Enable MSS clamping on TCP flows over VPN. " . <?=gettext("Enable MSS clamping on TCP flows over VPN. " .
"This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "); ?> "This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "); ?>
......
This diff is collapsed.
This diff is collapsed.
...@@ -74,19 +74,19 @@ if (isset($config['openvpn']['openvpn-server'])) { ...@@ -74,19 +74,19 @@ if (isset($config['openvpn']['openvpn-server'])) {
$ras_userent['certname'] = $cert['descr']; $ras_userent['certname'] = $cert['descr'];
$ras_user[] = $ras_userent; $ras_user[] = $ras_userent;
} }
} }
} }
} elseif (($server['mode'] == "server_tls") || (($server['mode'] == "server_tls_user") && ($server['authmode'] != "Local Database"))) { } elseif (($server['mode'] == "server_tls") || (($server['mode'] == "server_tls_user") && ($server['authmode'] != "Local Database"))) {
if (isset($config['cert'])) { if (isset($config['cert'])) {
foreach ($config['cert'] as $cindex => $cert) { foreach ($config['cert'] as $cindex => $cert) {
if (($cert['caref'] != $server['caref']) || ($cert['refid'] == $server['certref'])) { if (($cert['caref'] != $server['caref']) || ($cert['refid'] == $server['certref'])) {
continue; continue;
} }
$ras_cert_entry['cindex'] = $cindex; $ras_cert_entry['cindex'] = $cindex;
$ras_cert_entry['certname'] = $cert['descr']; $ras_cert_entry['certname'] = $cert['descr'];
$ras_cert_entry['certref'] = $cert['refid']; $ras_cert_entry['certref'] = $cert['refid'];
$ras_certs[] = $ras_cert_entry; $ras_certs[] = $ras_cert_entry;
} }
} }
} }
...@@ -174,18 +174,18 @@ if (isset($config['openvpn']['openvpn-server'])) { ...@@ -174,18 +174,18 @@ if (isset($config['openvpn']['openvpn-server'])) {
} }
if (isset($_GET['proxy_authtype'])) { if (isset($_GET['proxy_authtype'])) {
$proxy['proxy_authtype'] = $_GET['proxy_authtype']; $proxy['proxy_authtype'] = $_GET['proxy_authtype'];
if ($_GET['proxy_authtype'] != "none") { if ($_GET['proxy_authtype'] != "none") {
if (empty($_GET['proxy_user'])) { if (empty($_GET['proxy_user'])) {
$input_errors[] = "You need to specify a username with the proxy config."; $input_errors[] = "You need to specify a username with the proxy config.";
} else { } else {
$proxy['user'] = $_GET['proxy_user']; $proxy['user'] = $_GET['proxy_user'];
} }
if (!empty($_GET['proxy_user']) && empty($_GET['proxy_password'])) { if (!empty($_GET['proxy_user']) && empty($_GET['proxy_password'])) {
$input_errors[] = "You need to specify a password with the proxy user."; $input_errors[] = "You need to specify a password with the proxy user.";
} else { } else {
$proxy['password'] = $_GET['proxy_password']; $proxy['password'] = $_GET['proxy_password'];
} }
} }
} }
} }
...@@ -623,7 +623,7 @@ if (isset($savemsg)) { ...@@ -623,7 +623,7 @@ if (isset($savemsg)) {
$tab_array[] = array(gettext("Client Export"), true, "vpn_openvpn_export.php"); $tab_array[] = array(gettext("Client Export"), true, "vpn_openvpn_export.php");
$tab_array[] = array(gettext("Shared Key Export"), false, "vpn_openvpn_export_shared.php"); $tab_array[] = array(gettext("Shared Key Export"), false, "vpn_openvpn_export_shared.php");
display_top_tabs($tab_array); display_top_tabs($tab_array);
?> ?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="table-responsive"> <div class="table-responsive">
<table width="100%" border="0" class="table table-striped" cellpadding="0" cellspacing="0"> <table width="100%" border="0" class="table table-striped" cellpadding="0" cellspacing="0">
...@@ -640,9 +640,10 @@ if (isset($savemsg)) { ...@@ -640,9 +640,10 @@ if (isset($savemsg)) {
<select name="server" id="server" class="formselect" onchange="server_changed()"> <select name="server" id="server" class="formselect" onchange="server_changed()">
<?php foreach ($ras_server as & $server) : <?php foreach ($ras_server as & $server) :
?> ?>
<option value="<?=$server['index'];?>"><?=htmlspecialchars($server['name']);?></option> <option value="<?=$server['index'];
?>"><?=htmlspecialchars($server['name']);?></option>
<?php <?php
endforeach; ?> endforeach; ?>
</select> </select>
</td> </td>
</tr> </tr>
...@@ -656,19 +657,21 @@ if (isset($savemsg)) { ...@@ -656,19 +657,21 @@ if (isset($savemsg)) {
<option value="serverhostname" ><?=gettext("Installation hostname");?></option> <option value="serverhostname" ><?=gettext("Installation hostname");?></option>
<?php if (isset($config['dyndnses']['dyndns'])) : <?php if (isset($config['dyndnses']['dyndns'])) :
?> ?>
<?php foreach ($config['dyndnses']['dyndns'] as $ddns) : <?php foreach ($config['dyndnses']['dyndns'] as $ddns) :
?> ?>
<option value="<?php echo $ddns["host"] ?>"><?=gettext("DynDNS");?>: <?= htmlspecialchars($ddns["host"]); ?></option> <option value="<?php echo $ddns["host"] ?>"><?=gettext("DynDNS");
<?php ?>: <?= htmlspecialchars($ddns["host"]); ?></option>
<?php
endforeach; ?> endforeach; ?>
<?php <?php
endif; ?> endif; ?>
<?php if (isset($config['dnsupdates']['dnsupdate'])) : <?php if (isset($config['dnsupdates']['dnsupdate'])) :
?> ?>
<?php foreach ($config['dnsupdates']['dnsupdate'] as $ddns) : <?php foreach ($config['dnsupdates']['dnsupdate'] as $ddns) :
?> ?>
<option value="<?php echo $ddns["host"] ?>"><?=gettext("DynDNS");?>: <?= htmlspecialchars($ddns["host"]); ?></option> <option value="<?php echo $ddns["host"] ?>"><?=gettext("DynDNS");
<?php ?>: <?= htmlspecialchars($ddns["host"]); ?></option>
<?php
endforeach; ?> endforeach; ?>
<?php <?php
endif; ?> endif; ?>
...@@ -676,7 +679,7 @@ endif; ?> ...@@ -676,7 +679,7 @@ endif; ?>
</select> </select>
<div id="HostName" style="display:none;" > <div id="HostName" style="display:none;" >
<div> <div>
<?=gettext("Enter the hostname or IP address the client will use to connect to this server.");?> <?=gettext("Enter the hostname or IP address the client will use to connect to this server.");?>
</div> </div>
<input name="useaddr_hostname" type="text" id="useaddr_hostname" size="40" /> <input name="useaddr_hostname" type="text" id="useaddr_hostname" size="40" />
</div> </div>
...@@ -745,7 +748,7 @@ endif; ?> ...@@ -745,7 +748,7 @@ endif; ?>
<?=gettext("Port");?> : <?=gettext("Port");?> :
<input name="proxyport" id="proxyport" type="text" class="formfld unknown" size="5" value="" /> <input name="proxyport" id="proxyport" type="text" class="formfld unknown" size="5" value="" />
<div> <div>
<?=gettext("Choose proxy authentication if any.");?> <?=gettext("Choose proxy authentication if any.");?>
<select name="useproxypass" id="useproxypass" class="formselect" onchange="useproxy_changed(this)"> <select name="useproxypass" id="useproxypass" class="formselect" onchange="useproxy_changed(this)">
<option value="none"><?=gettext("none");?></option> <option value="none"><?=gettext("none");?></option>
<option value="basic"><?=gettext("basic");?></option> <option value="basic"><?=gettext("basic");?></option>
...@@ -754,9 +757,9 @@ endif; ?> ...@@ -754,9 +757,9 @@ endif; ?>
<div id="useproxypass_opts" style="display:none"> <div id="useproxypass_opts" style="display:none">
<?=gettext("Username");?> : <?=gettext("Username");?> :
<input name="proxyuser" id="proxyuser" type="text" class="formfld unknown" size="20" value="" /> <input name="proxyuser" id="proxyuser" type="text" class="formfld unknown" size="20" value="" />
<?=gettext("Password");?> : <?=gettext("Password");?> :
<input name="proxypass" id="proxypass" type="password" class="formfld pwd" size="20" value="" /> <input name="proxypass" id="proxypass" type="password" class="formfld pwd" size="20" value="" />
<?=gettext("Confirm");?> : <?=gettext("Confirm");?> :
<input name="proxyconf" id="proxyconf" type="password" class="formfld pwd" size="20" value="" /> <input name="proxyconf" id="proxyconf" type="password" class="formfld pwd" size="20" value="" />
</div> </div>
</div> </div>
......
...@@ -38,28 +38,28 @@ $pgtitle = array("OpenVPN", "Client Export Utility"); ...@@ -38,28 +38,28 @@ $pgtitle = array("OpenVPN", "Client Export Utility");
$ras_server = array(); $ras_server = array();
if (isset($config['openvpn']['openvpn-server'])) { if (isset($config['openvpn']['openvpn-server'])) {
foreach ($config['openvpn']['openvpn-server'] as $sindex => $server) { foreach ($config['openvpn']['openvpn-server'] as $sindex => $server) {
if (isset($server['disable'])) { if (isset($server['disable'])) {
continue; continue;
} }
$ras_user = array(); $ras_user = array();
if ($server['mode'] != "p2p_shared_key") { if ($server['mode'] != "p2p_shared_key") {
continue; continue;
} }
$ras_serverent = array(); $ras_serverent = array();
$prot = $server['protocol']; $prot = $server['protocol'];
$port = $server['local_port']; $port = $server['local_port'];
if ($server['description']) { if ($server['description']) {
$name = "{$server['description']} {$prot}:{$port}"; $name = "{$server['description']} {$prot}:{$port}";
} else { } else {
$name = "Shared Key Server {$prot}:{$port}"; $name = "Shared Key Server {$prot}:{$port}";
} }
$ras_serverent['index'] = $sindex; $ras_serverent['index'] = $sindex;
$ras_serverent['name'] = $name; $ras_serverent['name'] = $name;
$ras_serverent['mode'] = $server['mode']; $ras_serverent['mode'] = $server['mode'];
$ras_server[] = $ras_serverent; $ras_server[] = $ras_serverent;
} }
} }
if (isset($_GET['act'])) { if (isset($_GET['act'])) {
...@@ -67,7 +67,7 @@ if (isset($_GET['act'])) { ...@@ -67,7 +67,7 @@ if (isset($_GET['act'])) {
$act = $_GET['act']; $act = $_GET['act'];
if (($act == "skconf") || ($act == "skzipconf")) { if (($act == "skconf") || ($act == "skzipconf")) {
$srvid = isset($_GET['srvid']) ? $_GET['srvid'] : false; $srvid = isset($_GET['srvid']) ? $_GET['srvid'] : false;
if ( $srvid === false || !isset($config['openvpn']['openvpn-server'][$srvid]['mode']) || if ($srvid === false || !isset($config['openvpn']['openvpn-server'][$srvid]['mode']) ||
$config['openvpn']['openvpn-server'][$srvid]['mode'] != "p2p_shared_key") { $config['openvpn']['openvpn-server'][$srvid]['mode'] != "p2p_shared_key") {
redirectHeader("vpn_openvpn_export.php"); redirectHeader("vpn_openvpn_export.php");
exit; exit;
...@@ -302,7 +302,7 @@ if (isset($savemsg)) { ...@@ -302,7 +302,7 @@ if (isset($savemsg)) {
$tab_array[] = array(gettext("Client Export"), false, "vpn_openvpn_export.php"); $tab_array[] = array(gettext("Client Export"), false, "vpn_openvpn_export.php");
$tab_array[] = array(gettext("Shared Key Export"), true, "vpn_openvpn_export_shared.php"); $tab_array[] = array(gettext("Shared Key Export"), true, "vpn_openvpn_export_shared.php");
display_top_tabs($tab_array); display_top_tabs($tab_array);
?> ?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="table-responsive"> <div class="table-responsive">
<table width="100%" border="0" class="table table-striped" cellpadding="0" cellspacing="0"> <table width="100%" border="0" class="table table-striped" cellpadding="0" cellspacing="0">
...@@ -319,9 +319,10 @@ if (isset($savemsg)) { ...@@ -319,9 +319,10 @@ if (isset($savemsg)) {
<select name="server" id="server" class="formselect" onchange="server_changed()"> <select name="server" id="server" class="formselect" onchange="server_changed()">
<?php foreach ($ras_server as & $server) : <?php foreach ($ras_server as & $server) :
?> ?>
<option value="<?=htmlspecialchars($server['sindex']);?>"><?=htmlspecialchars($server['name']);?></option> <option value="<?=htmlspecialchars($server['sindex']);
?>"><?=htmlspecialchars($server['name']);?></option>
<?php <?php
endforeach; ?> endforeach; ?>
</select> </select>
</td> </td>
</tr> </tr>
...@@ -333,10 +334,12 @@ if (isset($savemsg)) { ...@@ -333,10 +334,12 @@ if (isset($savemsg)) {
<option value="serverhostname" ><?=gettext("Installation hostname");?></option> <option value="serverhostname" ><?=gettext("Installation hostname");?></option>
<?php if (isset($config['dyndnses']['dyndns'])) : <?php if (isset($config['dyndnses']['dyndns'])) :
?> ?>
<?php foreach ($config['dyndnses']['dyndns'] as $ddns) : <?php foreach ($config['dyndnses']['dyndns'] as $ddns) :
?> ?>
<option value="<?= htmlspecialchars($ddns["host"]); ?>"><?=gettext("DynDNS:");?> <?= htmlspecialchars($ddns["host"]);?></option> <option value="<?= htmlspecialchars($ddns["host"]);
<?php ?>"><?=gettext("DynDNS:");
?> <?= htmlspecialchars($ddns["host"]);?></option>
<?php
endforeach; ?> endforeach; ?>
<?php <?php
endif; ?> endif; ?>
...@@ -354,17 +357,17 @@ endif; ?> ...@@ -354,17 +357,17 @@ endif; ?>
<input name="useproxy" id="useproxy" type="checkbox" value="yes" onclick="useproxy_changed(this)" /> <input name="useproxy" id="useproxy" type="checkbox" value="yes" onclick="useproxy_changed(this)" />
<div id="useproxy_opts" style="display:none"> <div id="useproxy_opts" style="display:none">
<?=gettext("Type");?> : <?=gettext("Type");?> :
<select name="useproxytype" id="useproxytype" class="formselect"> <select name="useproxytype" id="useproxytype" class="formselect">
<option value="http"><?=gettext("HTTP");?></option> <option value="http"><?=gettext("HTTP");?></option>
<option value="socks"><?=gettext("Socks");?></option> <option value="socks"><?=gettext("Socks");?></option>
</select> </select>
<?=gettext("IP Address")?> : <?=gettext("IP Address")?> :
<input name="proxyaddr" id="proxyaddr" type="text" class="formfld unknown" size="30" value="" /> <input name="proxyaddr" id="proxyaddr" type="text" class="formfld unknown" size="30" value="" />
<?=gettext("Port");?> : <?=gettext("Port");?> :
<input name="proxyport" id="proxyport" type="text" class="formfld unknown" size="5" value="" /> <input name="proxyport" id="proxyport" type="text" class="formfld unknown" size="5" value="" />
<?=gettext("Choose proxy authentication if any.");?> <?=gettext("Choose proxy authentication if any.");?>
<select name="useproxypass" id="useproxypass" class="formselect" onchange="useproxy_changed(this)"> <select name="useproxypass" id="useproxypass" class="formselect" onchange="useproxy_changed(this)">
<option value="none"><?=gettext("none");?></option> <option value="none"><?=gettext("none");?></option>
<option value="basic"><?=gettext("basic");?></option> <option value="basic"><?=gettext("basic");?></option>
...@@ -380,7 +383,7 @@ endif; ?> ...@@ -380,7 +383,7 @@ endif; ?>
</div> </div>
</div> </div>
<div class="hidden" for="help_for_use_proxy"> <div class="hidden" for="help_for_use_proxy">
<?= gettext("Use proxy to communicate with the server.");?> <?= gettext("Use proxy to communicate with the server.");?>
</div> </div>
</td> </td>
</tr> </tr>
...@@ -394,8 +397,8 @@ endif; ?> ...@@ -394,8 +397,8 @@ endif; ?>
</tr> </tr>
</table> </table>
<div class="hidden" for="help_for_client_conf_pkg"> <div class="hidden" for="help_for_client_conf_pkg">
<?= gettext("NOTE:") ?> <br/> <?= gettext("NOTE:") ?> <br/>
<?= gettext("These are shared key configurations for use in site-to-site tunnels with other routers. Shared key tunnels are not normally used for remote access connections to end users.") ?> <?= gettext("These are shared key configurations for use in site-to-site tunnels with other routers. Shared key tunnels are not normally used for remote access connections to end users.") ?>
</div> </div>
</td> </td>
</tr> </tr>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment