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