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

vpn: moar style for almost all pages

parent a4736cbf
This diff is collapsed.
...@@ -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,15 +136,15 @@ $( document ).ready(function() { ...@@ -136,15 +136,15 @@ $( 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>
...@@ -152,16 +152,17 @@ $( document ).ready(function() { ...@@ -152,16 +152,17 @@ $( document ).ready(function() {
<?=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'];
?>&act=edit" title="<?=gettext("edit"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
</td> </td>
</tr> </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>
...@@ -169,12 +170,14 @@ $( document ).ready(function() { ...@@ -169,12 +170,14 @@ $( document ).ready(function() {
<?=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>
<a id="del_<?=$i;
?>" title="<?=gettext("delete key"); ?>" class="act_delete btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
</td> </td>
</tr> </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">
......
...@@ -61,9 +61,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -61,9 +61,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['pool_netbits'] = 24; $pconfig['pool_netbits'] = 24;
// copy / initialize $pconfig attributes // copy / initialize $pconfig attributes
foreach (explode(",",$form_fields) as $fieldname) { foreach (explode(",", $form_fields) as $fieldname) {
$fieldname = trim($fieldname); $fieldname = trim($fieldname);
if(isset($config['ipsec']['client'][$fieldname])) { if (isset($config['ipsec']['client'][$fieldname])) {
$pconfig[$fieldname] = $config['ipsec']['client'][$fieldname]; $pconfig[$fieldname] = $config['ipsec']['client'][$fieldname];
} elseif (!isset($pconfig[$fieldname])) { } elseif (!isset($pconfig[$fieldname])) {
// initialize element // initialize element
...@@ -153,9 +153,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -153,9 +153,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$copy_fields = "user_source,group_source,pool_address,pool_netbits,dns_domain,dns_server1 $copy_fields = "user_source,group_source,pool_address,pool_netbits,dns_domain,dns_server1
,dns_server2,dns_server3,dns_server4,wins_server1,wins_server2 ,dns_server2,dns_server3,dns_server4,wins_server1,wins_server2
,dns_split,pfs_group,login_banner"; ,dns_split,pfs_group,login_banner";
foreach (explode(",",$copy_fields) as $fieldname) { foreach (explode(",", $copy_fields) as $fieldname) {
$fieldname = trim($fieldname); $fieldname = trim($fieldname);
if(!empty($pconfig[$fieldname])) { if (!empty($pconfig[$fieldname])) {
$client[$fieldname] = $pconfig[$fieldname]; $client[$fieldname] = $pconfig[$fieldname];
} }
} }
...@@ -182,7 +182,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -182,7 +182,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} }
// initialize missing post attributes // initialize missing post attributes
foreach (explode(",",$form_fields) as $fieldname) { foreach (explode(",", $form_fields) as $fieldname) {
$fieldname = trim($fieldname); $fieldname = trim($fieldname);
if (!isset($pconfig[$fieldname])) { if (!isset($pconfig[$fieldname])) {
$pconfig[$fieldname] = null; $pconfig[$fieldname] = null;
...@@ -319,24 +319,24 @@ function login_banner_change() { ...@@ -319,24 +319,24 @@ function login_banner_change() {
<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 (isset($config['ipsec']['enable']) && is_subsystem_dirty('ipsec')) { if (isset($config['ipsec']['enable']) && 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."));
} }
$ph1found = false; $ph1found = false;
foreach ($config['ipsec']['phase1'] as $ph1ent) { foreach ($config['ipsec']['phase1'] as $ph1ent) {
if (isset($ph1ent['mobile'])) { if (isset($ph1ent['mobile'])) {
$ph1found = true; $ph1found = true;
} }
} }
if (!empty($pconfig['enable']) && !$ph1found) { if (!empty($pconfig['enable']) && !$ph1found) {
print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br />" . gettext("Please click Create to define one."), gettext("create"), gettext("Create Phase1")); print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br />" . gettext("Please click Create to define one."), gettext("create"), gettext("Create Phase1"));
} }
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">
...@@ -375,7 +375,7 @@ function login_banner_change() { ...@@ -375,7 +375,7 @@ function login_banner_change() {
<?php <?php
$authmodes = explode(",", $pconfig['user_source']); $authmodes = explode(",", $pconfig['user_source']);
$auth_servers = auth_get_authserver_list(); $auth_servers = auth_get_authserver_list();
foreach ($auth_servers as $auth_server) : foreach ($auth_servers as $auth_server) :
?> ?>
<option value="<?=htmlspecialchars($auth_server['name'])?>" <?=in_array($auth_server['name'], $authmodes) ? "selected=\"selected\"" : ""?> ><?=$auth_server['name']?></option> <option value="<?=htmlspecialchars($auth_server['name'])?>" <?=in_array($auth_server['name'], $authmodes) ? "selected=\"selected\"" : ""?> ><?=$auth_server['name']?></option>
<?php endforeach; <?php endforeach;
...@@ -388,7 +388,8 @@ function login_banner_change() { ...@@ -388,7 +388,8 @@ function login_banner_change() {
<td> <td>
<select name="group_source" class="form-control" id="group_source"> <select name="group_source" class="form-control" id="group_source">
<option value="none"><?=gettext("none"); ?></option> <option value="none"><?=gettext("none"); ?></option>
<option value="system" <?= $pconfig['group_source'] == "system" ? "selected=\"selected\"" : "";?>><?=gettext("system"); ?></option> <option value="system" <?= $pconfig['group_source'] == "system" ? "selected=\"selected\"" : "";
?>><?=gettext("system"); ?></option>
</select> </select>
</td> </td>
</tr> </tr>
...@@ -406,11 +407,12 @@ function login_banner_change() { ...@@ -406,11 +407,12 @@ function login_banner_change() {
<select name="pool_netbits" class="form-control" id="pool_netbits"> <select name="pool_netbits" class="form-control" id="pool_netbits">
<?php for ($i = 32; $i >= 0; $i--) : <?php for ($i = 32; $i >= 0; $i--) :
?> ?>
<option value="<?=$i;?>" <?= ($i == $pconfig['pool_netbits']) ? "selected=\"selected\"" : "";?>> <option value="<?=$i;
?>" <?= ($i == $pconfig['pool_netbits']) ? "selected=\"selected\"" : "";?>>
<?=$i;?> <?=$i;?>
</option> </option>
<?php <?php
endfor; ?> endfor; ?>
</select> </select>
</td> </td>
</tr> </tr>
...@@ -496,11 +498,12 @@ function login_banner_change() { ...@@ -496,11 +498,12 @@ function login_banner_change() {
<select name="pfs_group" class="form-control" id="pfs_group"> <select name="pfs_group" class="form-control" id="pfs_group">
<?php foreach ($p2_pfskeygroups as $keygroup => $keygroupname) : <?php foreach ($p2_pfskeygroups as $keygroup => $keygroupname) :
?> ?>
<option value="<?=$keygroup;?>" <?= $pconfig['pfs_group'] == $keygroup ? "selected=\"selected\"" : "" ; ?>> <option value="<?=$keygroup;
?>" <?= $pconfig['pfs_group'] == $keygroup ? "selected=\"selected\"" : "" ; ?>>
<?=$keygroupname;?> <?=$keygroupname;?>
</option> </option>
<?php <?php
endforeach; endforeach;
?> ?>
</select> </select>
<div class="hidden" for="help_for_pfs_group_enable"> <div class="hidden" for="help_for_pfs_group_enable">
......
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";
...@@ -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."); ?>
...@@ -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.
...@@ -61,9 +61,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -61,9 +61,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if ($act=="edit" && isset($id) && isset($a_csc[$id])) { if ($act=="edit" && isset($id) && isset($a_csc[$id])) {
// 1 on 1 copy of config attributes // 1 on 1 copy of config attributes
foreach (explode(",",$all_form_fields) as $fieldname) { foreach (explode(",", $all_form_fields) as $fieldname) {
$fieldname = trim($fieldname); $fieldname = trim($fieldname);
if(isset($a_csc[$id][$fieldname])) { if (isset($a_csc[$id][$fieldname])) {
$pconfig[$fieldname] = $a_csc[$id][$fieldname]; $pconfig[$fieldname] = $a_csc[$id][$fieldname];
} elseif (!isset($pconfig[$fieldname])) { } elseif (!isset($pconfig[$fieldname])) {
// initialize element // initialize element
...@@ -72,7 +72,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -72,7 +72,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
} }
} else { } else {
// init all form attributes // init all form attributes
foreach (explode(",",$all_form_fields) as $fieldname) { foreach (explode(",", $all_form_fields) as $fieldname) {
$fieldname = trim($fieldname); $fieldname = trim($fieldname);
if (!isset($pconfig[$fieldname])) { if (!isset($pconfig[$fieldname])) {
$pconfig[$fieldname] = null; $pconfig[$fieldname] = null;
...@@ -165,9 +165,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -165,9 +165,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (count($input_errors) == 0) { if (count($input_errors) == 0) {
$csc = array(); $csc = array();
// 1 on 1 copy of config attributes // 1 on 1 copy of config attributes
foreach (explode(",",$all_form_fields) as $fieldname) { foreach (explode(",", $all_form_fields) as $fieldname) {
$fieldname = trim($fieldname); $fieldname = trim($fieldname);
if(!empty($pconfig[$fieldname])) { if (!empty($pconfig[$fieldname])) {
$csc[$fieldname] = $pconfig[$fieldname]; $csc[$fieldname] = $pconfig[$fieldname];
} }
} }
...@@ -549,7 +549,7 @@ if ($act!="new" && $act!="edit") { ...@@ -549,7 +549,7 @@ if ($act!="new" && $act!="edit") {
<option value="<?=$type; <option value="<?=$type;
?>" <?=$selected; ?>" <?=$selected;
?>><?=$name;?></option> ?>><?=$name;?></option>
<?php <?php
endforeach; ?> endforeach; ?>
</select> </select>
...@@ -644,7 +644,8 @@ else : ...@@ -644,7 +644,8 @@ else :
</td> </td>
<td valign="middle" class="list nowrap"> <td valign="middle" class="list nowrap">
<a href="vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a> <a href="vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
<a id="del_<?=$i;?>" title="<?=gettext("delete csc"); ?>" class="act_delete btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a> <a id="del_<?=$i;
?>" title="<?=gettext("delete csc"); ?>" class="act_delete btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
</td> </td>
</tr> </tr>
<?php <?php
......
...@@ -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>
...@@ -658,7 +659,8 @@ if (isset($savemsg)) { ...@@ -658,7 +659,8 @@ if (isset($savemsg)) {
?> ?>
<?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");
?>: <?= htmlspecialchars($ddns["host"]); ?></option>
<?php <?php
endforeach; ?> endforeach; ?>
<?php <?php
...@@ -667,7 +669,8 @@ endif; ?> ...@@ -667,7 +669,8 @@ endif; ?>
?> ?>
<?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");
?>: <?= htmlspecialchars($ddns["host"]); ?></option>
<?php <?php
endforeach; ?> endforeach; ?>
<?php <?php
......
...@@ -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;
...@@ -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>
...@@ -335,7 +336,9 @@ if (isset($savemsg)) { ...@@ -335,7 +336,9 @@ if (isset($savemsg)) {
?> ?>
<?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"]);
?>"><?=gettext("DynDNS:");
?> <?= htmlspecialchars($ddns["host"]);?></option>
<?php <?php
endforeach; ?> endforeach; ?>
<?php <?php
......
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