Commit 8594ccea authored by Ad Schellevis's avatar Ad Schellevis
parent 75bbd009
...@@ -157,6 +157,7 @@ function restore_config_section_xmlrpc($new_config) ...@@ -157,6 +157,7 @@ function restore_config_section_xmlrpc($new_config)
require_once("interfaces.inc"); require_once("interfaces.inc");
require_once("filter.inc"); require_once("filter.inc");
require_once("ipsec.inc");
// save old config // save old config
$old_config = $config; $old_config = $config;
......
<?php <?php
/* /*
Copyright (C) 2014 Deciso B.V. Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net> Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, 1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once("guiconfig.inc"); require_once("guiconfig.inc");
...@@ -34,100 +34,93 @@ require_once('plugins.inc'); ...@@ -34,100 +34,93 @@ require_once('plugins.inc');
require_once("interfaces.inc"); require_once("interfaces.inc");
if (empty($config['syslog']['nentries'])) { if (empty($config['syslog']['nentries'])) {
$nentries = 50; $nentries = 50;
} else { } else {
$nentries = $config['syslog']['nentries']; $nentries = $config['syslog']['nentries'];
} }
if ($_POST['clear']) { if ($_POST['clear']) {
clear_clog($logfile); clear_clog($logfile);
} }
function dump_clog_vpn($logfile, $tail, $logtype) function dump_clog_vpn($logfile, $tail, $logtype)
{ {
global $config; global $config;
$sor = isset($config['syslog']['reverse']) ? "-r" : ""; $sor = isset($config['syslog']['reverse']) ? "-r" : "";
$logarr = ""; $logarr = "";
exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr); exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
foreach ($logarr as $logent) { foreach ($logarr as $logent) {
$logent = preg_split("/\s+/", $logent, 6); $logent = preg_split("/\s+/", $logent, 6);
$llent = explode(",", $logent[5]); $llent = explode(",", $logent[5]);
$iftype = substr($llent[1], 0, 4); $iftype = substr($llent[1], 0, 4);
if ($iftype != $logtype) { if ($iftype != $logtype) {
continue; continue;
} }
echo "<tr>\n"; echo "<tr>\n";
echo "<td class=\"listlr nowrap\">" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "</td>\n"; echo "<td class=\"listlr nowrap\">" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "</td>\n";
if ($llent[0] == "login") if ($llent[0] == "login") {
echo "<td class=\"listr\"><span class=\"glyphicon glyphicon-arrow-right\" aria-hidden=\"true\" alt=\"in\"></span></td>\n"; echo "<td class=\"listr\"><span class=\"glyphicon glyphicon-arrow-right\" aria-hidden=\"true\" alt=\"in\"></span></td>\n";
else } else {
echo "<td class=\"listr\"><span class=\"glyphicon glyphicon-arrow-left\" aria-hidden=\"true\" alt=\"out\"></span></td>\n"; echo "<td class=\"listr\"><span class=\"glyphicon glyphicon-arrow-left\" aria-hidden=\"true\" alt=\"out\"></span></td>\n";
}
echo "<td class=\"listr\">" . htmlspecialchars($llent[3]) . "</td>\n";
echo "<td class=\"listr\">" . htmlspecialchars($llent[2]) . "&nbsp;</td>\n"; echo "<td class=\"listr\">" . htmlspecialchars($llent[3]) . "</td>\n";
echo "</tr>\n"; echo "<td class=\"listr\">" . htmlspecialchars($llent[2]) . "&nbsp;</td>\n";
} echo "</tr>\n";
}
} }
include("head.inc"); include("head.inc");
?> ?>
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<section class="col-xs-12">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?> <div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<section class="col-xs-12"> <table class="table table-striped table-sort">
<tr>
<div class="tab-content content-box col-xs-12"> <td colspan="4">
<ul class="nav nav-pills" role="tablist">
<?php foreach ($tab_array as $tab): ?>
<div class="table-responsive"> <li role="presentation" <?php if (str_replace('amp;','', $tab[2]) == $_SERVER['REQUEST_URI']):?>class="active"<?php endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
<table class="table table-striped table-sort"> <?php endforeach; ?>
<tr><td colspan="4"> </ul>
<ul class="nav nav-pills" role="tablist"> </td>
<?php foreach ($tab_array as $tab): ?> </tr>
<li role="presentation" <?php if (str_replace('amp;','', $tab[2]) == $_SERVER['REQUEST_URI']):?>class="active"<?php endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li> <?php if ($mode != "raw"): ?>
<?php endforeach; ?> <tr>
</ul> <td class="listhdrr"><?=gettext("Time");?></td>
</td></tr> <td class="listhdrr"><?=gettext("Action");?></td>
<?php if ($mode != "raw"): ?> <td class="listhdrr"><?=gettext("User");?></td>
<tr> <td class="listhdrr"><?=gettext("IP address");?></td>
<td class="listhdrr"><?=gettext("Time");?></td> </tr>
<td class="listhdrr"><?=gettext("Action");?></td> <?php dump_clog_vpn($logfile, $nentries, $logname); ?>
<td class="listhdrr"><?=gettext("User");?></td> <?php else:
<td class="listhdrr"><?=gettext("IP address");?></td> dump_clog($logfile, $nentries);
</tr> endif; ?>
<?php dump_clog_vpn($logfile, $nentries, $logname); ?> <tr>
<?php else: <td colspan="4">
dump_clog($logfile, $nentries); <form method="post">
endif; ?> <input type="hidden" name="mode" id="mode" value="<?=$mode;?>" />
<tr><td colspan="4"> <input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
<form action="<? $_SERVER['REQUEST_URI'] ?>" method="post"> </form>
<input type="hidden" name="mode" id="mode" value="<?=$mode;?>" /> </td>
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" /> </tr>
</form> </table>
</td></tr> </div>
</table> </div>
</div> </section>
</div>
</div>
</div> </section>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?> <?php include("foot.inc"); ?>
...@@ -78,15 +78,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ...@@ -78,15 +78,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$a_phase1 = &$config['ipsec']['phase1']; $a_phase1 = &$config['ipsec']['phase1'];
$a_phase2 = &$config['ipsec']['phase2']; $a_phase2 = &$config['ipsec']['phase2'];
if (isset($_POST['apply'])) { if (isset($_POST['apply'])) {
$retval = ipsec_configure(); ipsec_configure();
/* reload the filter in the background */ /* reload the filter in the background */
filter_configure(); filter_configure();
$savemsg = get_std_save_message(); $savemsg = get_std_save_message();
if ($retval >= 0) { clear_subsystem_dirty('ipsec');
if (is_subsystem_dirty('ipsec')) {
clear_subsystem_dirty('ipsec');
}
}
} elseif (isset($_POST['save'])) { } elseif (isset($_POST['save'])) {
$config['ipsec']['enable'] = !empty($_POST['enable']) ? true : false; $config['ipsec']['enable'] = !empty($_POST['enable']) ? true : false;
write_config(); write_config();
......
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com) Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, 1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once("guiconfig.inc"); require_once("guiconfig.inc");
...@@ -60,82 +60,67 @@ if ($_GET['act'] == "del") { ...@@ -60,82 +60,67 @@ if ($_GET['act'] == "del") {
$service_hook = 'l2tpd'; $service_hook = 'l2tpd';
include("head.inc"); include("head.inc");
$main_buttons = array( $main_buttons = array(
array('label'=>gettext("add user"), 'href'=>'vpn_l2tp_users_edit.php'), array('label'=>gettext("add user"), 'href'=>'vpn_l2tp_users_edit.php'),
); );
?> ?>
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main">
<section class="page-content-main"> <div class="container-fluid">
<div class="container-fluid"> <div class="row">
<div class="row"> <?php if (isset($savemsg)) {
<?php if (isset($savemsg)) {
print_info_box($savemsg); print_info_box($savemsg);
} ?> } ?>
<?php if (isset($config['l2tp']['radius']['enable'])) { <?php if (isset($config['l2tp']['radius']['enable'])) {
print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used.")); print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used."));
} ?> } ?>
<?php if (is_subsystem_dirty('l2tpusers')) : <?php if (is_subsystem_dirty('l2tpusers')) :
?><br/> ?><br/>
<?php print_info_box_apply(gettext("The l2tp user list has been modified") . ".<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>");?> <?php print_info_box_apply(gettext("The l2tp user list has been modified") . ".<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>");?>
<?php <?php
endif; ?> endif; ?>
<section class="col-xs-12">
<div id="inputerrors"></div> <div class="tab-content content-box col-xs-12">
<form method="post" name="iform" id="iform">
<div class="table-responsive">
<section class="col-xs-12"> <table class="table table-striped table-sort">
<tr>
<div class="tab-content content-box col-xs-12"> <td class="listhdrr"><?=gettext("Username");?></td>
<td class="listhdr"><?=gettext("IP address");?></td>
<form action="vpn_l2tp_users.php" method="post" name="iform" id="iform"> <td class="list"></td>
</tr>
<div class="table-responsive"> <?php $i = 0; foreach ($a_secret as $secretent) :
<table class="table table-striped table-sort">
<tr>
<td class="listhdrr"><?=gettext("Username");?></td>
<td class="listhdr"><?=gettext("IP address");?></td>
<td class="list"></td>
</tr>
<?php $i = 0; foreach ($a_secret as $secretent) :
?> ?>
<tr> <tr>
<td class="listlr"> <td class="listlr">
<?=htmlspecialchars($secretent['name']);?> <?=htmlspecialchars($secretent['name']);?>
</td> </td>
<td class="listr"> <td class="listr">
<?php if ($secretent['ip'] == "") { <?php if ($secretent['ip'] == "") {
$secretent['ip'] = "Dynamic"; $secretent['ip'] = "Dynamic";
} ?> } ?>
<?=htmlspecialchars($secretent['ip']);?>&nbsp; <?=htmlspecialchars($secretent['ip']);?>&nbsp;
</td> </td>
<td class="list nowrap" width="150"> <td class="list nowrap" width="150">
<a href="vpn_l2tp_users_edit.php?id=<?=$i;?>" class="btn btn-default"><span class="glyphicon glyphicon-edit"></span></a> <a href="vpn_l2tp_users_edit.php?id=<?=$i;?>" class="btn btn-default"><span class="glyphicon glyphicon-edit"></span></a>
<a href="vpn_l2tp_users.php?act=del&amp;id=<?=$i;?>" class="btn btn-default"
<a href="vpn_l2tp_users.php?act=del&amp;id=<?=$i; onclick="return confirm('<?=gettext("Do you really want to delete this user?");?>')"
?>" class="btn btn-default" onclick="return confirm('<?=gettext("Do you really want to delete this user?"); title="<?=gettext("delete user"); ?>"><span class="fa fa-trash text-muted"></span>
?>')"title="<?=gettext("delete user"); ?>"><span class="fa fa-trash text-muted"></span></a> </a>
</td>
</td> </tr>
</tr> <?php
<?php $i++; $i++;
endforeach; ?>
endforeach; ?> </table>
</div>
</table> </form>
</div> </div>
</section>
</form> </div>
</div> </div>
</section> </section>
</div>
</div>
</section>
<?php include("foot.inc"); <?php include("foot.inc");
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2016 Deciso B.V.
Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com) Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com)
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, 1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
function l2tpusercmp($a, $b) function l2tpusercmp($a, $b)
...@@ -34,13 +34,13 @@ function l2tpusercmp($a, $b) ...@@ -34,13 +34,13 @@ function l2tpusercmp($a, $b)
function l2tp_users_sort() function l2tp_users_sort()
{ {
global $config; global $config;
if (!is_array($config['l2tp']['user'])) { if (!is_array($config['l2tp']['user'])) {
return; return;
} }
usort($config['l2tp']['user'], "l2tpusercmp"); usort($config['l2tp']['user'], "l2tpusercmp");
} }
require_once("guiconfig.inc"); require_once("guiconfig.inc");
...@@ -50,7 +50,7 @@ require_once("plugins.inc.d/vpn.inc"); ...@@ -50,7 +50,7 @@ require_once("plugins.inc.d/vpn.inc");
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/vpn_l2tp_users.php'); $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/vpn_l2tp_users.php');
if (!is_array($config['l2tp']['user'])) { if (empty($config['l2tp']['user']) || !is_array($config['l2tp']['user'])) {
$config['l2tp']['user'] = array(); $config['l2tp']['user'] = array();
} }
$a_secret = &$config['l2tp']['user']; $a_secret = &$config['l2tp']['user'];
...@@ -142,69 +142,57 @@ include("head.inc"); ...@@ -142,69 +142,57 @@ include("head.inc");
<body> <body>
<?php include("fbegin.inc"); ?> <?php include("fbegin.inc"); ?>
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<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);
} ?> } ?>
<div id="inputerrors"></div> <section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<form method="post" name="iform" id="iform">
<section class="col-xs-12"> <div class="table-responsive">
<table class="table table-striped table-sort">
<div class="tab-content content-box col-xs-12"> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
<form action="vpn_l2tp_users_edit.php" method="post" name="iform" id="iform"> <td width="78%" class="vtable">
<input name="usernamefld" type="text" class="form-control user" id="usernamefld" size="20" value="<?=htmlspecialchars($pconfig['usernamefld']);?>" />
<div class="table-responsive"> </td>
<table class="table table-striped table-sort"> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td> <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<input name="usernamefld" type="text" class="form-control user" id="usernamefld" size="20" value="<?=htmlspecialchars($pconfig['usernamefld']);?>" /> <input name="passwordfld" type="password" class="form-control pwd" id="passwordfld" size="20" />
</td> <br /><input name="password2" type="password" class="form-control pwd" id="password2" size="20" />
</tr> &nbsp;(<?=gettext("confirmation");?>)<?php if (isset($id) && $a_secret[$id]) :?><br />
<tr> <p class="text-muted"><em><small><?=gettext("If you want to change the users password, enter it here twice.");?></small></em></p>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td> <?php endif; ?>
<td width="78%" class="vtable"> </td>
<input name="passwordfld" type="password" class="form-control pwd" id="passwordfld" size="20" /> </tr>
<br /><input name="password2" type="password" class="form-control pwd" id="password2" size="20" /> <tr>
&nbsp;(<?=gettext("confirmation");?>)<?php if (isset($id) && $a_secret[$id]) : <td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td>
?><br /> <td width="78%" class="vtable">
<p class="text-muted"><em><small><?=gettext("If you want to change the users password, enter it here twice.");?></small></em></p> <input name="ip" type="text" class="form-control unknown" id="ip" size="20" value="<?=htmlspecialchars($pconfig['ip']);?>" />
<?php <p class="text-muted"><em><small><?=gettext("If you want the user to be assigned a specific IP address, enter it here.");?></small></em></p></td>
endif; ?></td> </tr>
</tr> <tr>
<tr> <td width="22%" valign="top">&nbsp;</td>
<td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td> <td width="78%">
<td width="78%" class="vtable"> <input id="submit" name="Submit" type="submit" class="btn btn-primary" value="<?=gettext('Save');?>" />
<input name="ip" type="text" class="form-control unknown" id="ip" size="20" value="<?=htmlspecialchars($pconfig['ip']);?>" /> <input type="button" class="btn btn-default" value="<?=gettext("Cancel");?>" onclick="window.location.href='<?=$referer;?>'" />
<p class="text-muted"><em><small><?=gettext("If you want the user to be assigned a specific IP address, enter it here.");?></small></em></p></td> <?php if (isset($id) && $a_secret[$id]) :?>
</tr> <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<tr> <?php endif; ?>
<td width="22%" valign="top">&nbsp;</td> </td>
<td width="78%"> </tr>
<input id="submit" name="Submit" type="submit" class="btn btn-primary" value="<?=gettext('Save');?>" /> </table>
<input type="button" class="btn btn-default" value="<?=gettext("Cancel"); </div>
?>" onclick="window.location.href='<?=$referer;?>'" /> </form>
<?php if (isset($id) && $a_secret[$id]) : </div>
?> </section>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" /> </div>
<?php </div>
endif; ?> </section>
</td>
</tr>
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); <?php include("foot.inc");
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