Commit 78935e17 authored by Franco Fichtner's avatar Franco Fichtner

vpn: apply whitespace cleanups

parent 8efe7dca
......@@ -225,25 +225,25 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<form action="vpn_ipsec.php" method="post">
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if ($savemsg)
print_info_box($savemsg);
if ($pconfig['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."));
?>
<section class="col-xs-12">
<? $active_tab = "/vpn_ipsec.php"; include('vpn_ipsec_tabs.php'); ?>
<? $active_tab = "/vpn_ipsec.php"; include('vpn_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr id="frheader">
<td class="list">&nbsp;</td>
<td class="list">&nbsp;</td>
......@@ -272,7 +272,7 @@ include("head.inc");
<input type="checkbox" id="frc<?=$i;?>" name="p1entry[]" value="<?=$i;?>" onclick="fr_bgcolor('<?=$i;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;" />
</td>
<td class="listt" align="center" valign="middle">
<button name="toggle_<?=$i;?>_x"
<button name="toggle_<?=$i;?>_x"
title="<?=gettext("click to toggle enabled/disabled status");?>"
type="submit" class="btn btn-<?php echo $iconfn?> btn-xs"><span class="glyphicon glyphicon-play"></span>
</button>
......@@ -457,7 +457,7 @@ include("head.inc");
type="image" style="height:11;width:11;border:0" />
<button name="togglep2_<?=$ph2index;?>_x"
title="<?=gettext("click to toggle enabled/disabled status");?>"
type="submit"
type="submit"
class="btn btn-<?php echo $iconfn?> btn-xs">
<span class="glyphicon glyphicon-play"></span>
</button>
......@@ -534,7 +534,7 @@ include("head.inc");
<button name="delp2_<?=$ph2index;?>_x" src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif"
title="<?=gettext("delete phase2 entry");?>"
type="submit"
onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')"
onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')"
class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-remove"><span>
</button>
......@@ -555,10 +555,10 @@ include("head.inc");
?>
<span title="<?=gettext("move selected phase2 entries to end");?>" alt="move" class="btn btn-default btn-xs glyphicon glyphicon-arrow-down hide"></span>
<?php
else:
else:
?>
<button onmouseover="fr_insline(<?=$j;?>, true, '<?=$fr_prefix;?>')" onmouseout="fr_insline(<?=$j;?>, false, '<?=$fr_prefix;?>')"
name="movep2_<?=$j;?>_x" type="submit"
<button onmouseover="fr_insline(<?=$j;?>, true, '<?=$fr_prefix;?>')" onmouseout="fr_insline(<?=$j;?>, false, '<?=$fr_prefix;?>')"
name="movep2_<?=$j;?>_x" type="submit"
title="<?=gettext("move selected phase2 entries to end");?>"
class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-arrow-down"></span>
......@@ -575,10 +575,10 @@ include("head.inc");
<span title="<?=gettext("delete selected phase2 entries");?>" alt="delete" class="btn btn-default btn-xs glyphicon glyphicon-remove hide"></span>
<?php
else:
?>
<button name="delp2_x"
type="submit"
title="<?=gettext("delete selected phase2 entries");?>"
?>
<button name="delp2_x"
type="submit"
title="<?=gettext("delete selected phase2 entries");?>"
onclick="return confirm('<?=gettext("Do you really want to delete the selected phase2 entries?");?>')"
class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-remove"></span>
......@@ -609,8 +609,8 @@ include("head.inc");
<?php
else:
?>
<button onmouseover="fr_insline(<?=$i;?>, true)" onmouseout="fr_insline(<?=$i;?>, false)"
name="move_<?=$i;?>_x"
<button onmouseover="fr_insline(<?=$i;?>, true)" onmouseout="fr_insline(<?=$i;?>, false)"
name="move_<?=$i;?>_x"
type="submit"
title="<?=gettext("move selected phase1 entries to end");?>"
class="btn btn-default btn-xs">
......@@ -635,10 +635,10 @@ include("head.inc");
<?php
else:
?>
<button
name="del_x"
<button
name="del_x"
type="submit"
title="<?=gettext("delete selected phase1 entries");?>"
title="<?=gettext("delete selected phase1 entries");?>"
onclick="return confirm('<?=gettext("Do you really want to delete the selected phase1 entries?");?>')"
class="btn btn-default btn-xs">
<span class="glyphicon glyphicon-remove"></span>
......
......@@ -2,20 +2,20 @@
/*
vpn_ipsec_keys.php
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2005 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
......@@ -84,31 +84,31 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
<?php
if ($savemsg)
print_info_box($savemsg);
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."));
?>
<section class="col-xs-12">
<? $active_tab = "/vpn_ipsec_settings.php"; include('vpn_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<? $active_tab = "/vpn_ipsec_settings.php"; include('vpn_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<form action="vpn_ipsec_keys.php" method="post">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr>
<tr>
<td class="listhdrr"><?=gettext("Identifier"); ?></td>
<td class="listhdr"><?=gettext("Pre-Shared Key"); ?></td>
<td class="list">
......@@ -144,9 +144,9 @@ include("head.inc");
&nbsp;</td>
</tr>
<?php $i++; endforeach; ?>
<?php $i = 0; foreach ($a_secret as $secretent): ?>
<tr>
<tr>
<td class="listlr">
<?=htmlspecialchars($secretent['ident']);?>
</td>
......@@ -157,7 +157,7 @@ include("head.inc");
&nbsp;<a href="vpn_ipsec_keys.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Pre-Shared Key?"); ?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete key"); ?>" width="17" height="17" border="0" alt="delete" /></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
<tr>
<td class="list" colspan="2"></td>
<td class="list">
<table border="0" cellspacing="0" cellpadding="1" summary="add key">
......@@ -171,7 +171,7 @@ include("head.inc");
</table>
</div>
</form>
<div class="container-fluid">
<p>
<span class="vexpl">
......@@ -181,11 +181,11 @@ include("head.inc");
<?=gettext("PSK for any user can be set by using an identifier of any/ANY");?>
</span>
</p>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -2,20 +2,20 @@
/*
vpn_ipsec_keys_edit.php
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2005 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
......@@ -61,23 +61,23 @@ if ($_POST) {
foreach ($config['system']['user'] as $uid => $user) {
$userids[$user['name']] = $uid;
}
unset($input_errors);
$pconfig = $_POST;
/* input validation */
$reqdfields = explode(" ", "ident psk");
$reqdfieldsn = array(gettext("Identifier"),gettext("Pre-Shared Key"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if (preg_match("/[^a-zA-Z0-9@\.\-]/", $_POST['ident']))
$input_errors[] = gettext("The identifier contains invalid characters.");
if (array_key_exists($_POST['ident'], $userids))
$input_errors[] = gettext("A user with this name already exists. Add the key to the user instead.");
unset($userids);
if (!$input_errors && !(isset($id) && $a_secret[$id])) {
/* make sure there are no dupes */
foreach ($a_secret as $secretent) {
......@@ -89,14 +89,14 @@ if ($_POST) {
}
if (!$input_errors) {
if (isset($id) && $a_secret[$id])
$secretent = $a_secret[$id];
$secretent['ident'] = $_POST['ident'];
$secretent['pre-shared-key'] = $_POST['psk'];
$text = "";
if (isset($id) && $a_secret[$id]) {
$a_secret[$id] = $secretent;
$text = gettext("Edited");
......@@ -104,10 +104,10 @@ if ($_POST) {
$a_secret[] = $secretent;
$text = gettext("Added");
}
write_config("{$text} IPsec Pre-Shared Keys");
mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec_keys.php");
exit;
}
......@@ -126,45 +126,45 @@ include("head.inc");
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="content-box">
<form action="vpn_ipsec_keys_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<div class="content-box">
<form action="vpn_ipsec_keys_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td valign="top" class="vncellreq"><?=gettext("Identifier"); ?></td>
<td class="vtable">
<?=$mandfldhtml;?><input name="ident" type="text" class="formfld unknown" id="ident" size="30" value="<?=htmlspecialchars($pconfig['ident']);?>" />
<br />
<?=gettext("This can be either an IP address, fully qualified domain name or an e-mail address"); ?>.
<?=gettext("This can be either an IP address, fully qualified domain name or an e-mail address"); ?>.
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Pre-Shared Key"); ?></td>
<td width="78%" class="vtable">
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="psk" type="text" class="formfld unknown" id="psk" size="40" value="<?=htmlspecialchars($pconfig['psk']);?>" />
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<td width="78%">
<input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<?php if (isset($id) && $a_secret[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?>
</td>
</tr>
</table>
</div>
<div class="col-xs-12">
</div>
<div class="col-xs-12">
<span class="vexpl">
<span class="text-danger">
<strong><?=gettext("Note"); ?>:<br /></strong>
......@@ -173,10 +173,10 @@ include("head.inc");
</span>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
<?php
/*
vpn_ipsec_mobile.php
Copyright (C) 2008 Shrew Soft Inc
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
......@@ -124,7 +124,7 @@ if ($_POST['submit']) {
/* input consolidation */
/* input validation */
......@@ -182,7 +182,7 @@ if ($_POST['submit']) {
if (!$input_errors) {
$client = array();
if ($pconfig['enable'])
$client['enable'] = true;
......@@ -228,10 +228,10 @@ if ($_POST['submit']) {
// $echo "login banner = {$pconfig['login_banner']}";
$a_client = $client;
write_config();
mark_subsystem_dirty('ipsec');
header("Location: vpn_ipsec_mobile.php");
exit;
}
......@@ -324,9 +324,9 @@ function login_banner_change() {
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if ($savemsg)
print_info_box($savemsg);
......@@ -341,20 +341,20 @@ function login_banner_change() {
print_input_errors($input_errors);
?>
<section class="col-xs-12">
<? $active_tab = "/vpn_ipsec_mobile.php"; include('vpn_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<? $active_tab = "/vpn_ipsec_mobile.php"; include('vpn_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<form action="vpn_ipsec_mobile.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("IKE Extensions"); ?></td>
<td width="78%" class="vtable">
......@@ -372,18 +372,18 @@ function login_banner_change() {
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-sort">
</table>
<table class="table table-striped table-sort">
<thead>
<tr>
<th colspan="2" class="listtopic"><?=gettext("Extended Authentication (Xauth)"); ?></th>
<th colspan="2" class="listtopic"><?=gettext("Extended Authentication (Xauth)"); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("User Authentication"); ?></td>
<td width="78%" class="vtable">
......@@ -413,19 +413,19 @@ function login_banner_change() {
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-sort">
</table>
<table class="table table-striped table-sort">
<thead>
<tr>
<th colspan="2" class="listtopic"><?=gettext("Client Configuration (mode-cfg)"); ?></th>
<th colspan="2" class="listtopic"><?=gettext("Client Configuration (mode-cfg)"); ?></th>
</tr>
</thead>
<tbody>
<tr>
<tbody>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Virtual Address Pool"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0" summary="enable pool">
......@@ -490,7 +490,7 @@ function login_banner_change() {
</table>
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS Default Domain"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0" summary="enable dns default domain">
......@@ -537,7 +537,7 @@ function login_banner_change() {
</table>
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0" summary="enable dns servers">
......@@ -579,7 +579,7 @@ function login_banner_change() {
</table>
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("WINS Servers"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0" summary="enable wins servers">
......@@ -639,7 +639,7 @@ function login_banner_change() {
</table>
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Login Banner"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="2" cellpadding="0" summary="enable login banner">
......@@ -670,7 +670,7 @@ function login_banner_change() {
</td>
</tr>
</table>
</div>
</form>
</div>
......@@ -678,7 +678,7 @@ function login_banner_change() {
</div>
</div>
</section>
<script type="text/javascript">
//<![CDATA[
pool_change();
......
......@@ -520,16 +520,16 @@ function dpdchkbox_change() {
</script>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if ($input_errors)
print_input_errors($input_errors);
?>
?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
$tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
......@@ -537,22 +537,22 @@ function dpdchkbox_change() {
$tab_array[3] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="vpn_ipsec_phase1.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<thead>
<tr>
<th colspan="2" class="listtopic"><?=gettext("General information"); ?></th>
<th colspan="2" class="listtopic"><?=gettext("General information"); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
......@@ -600,15 +600,15 @@ function dpdchkbox_change() {
<select name="interface" class="formselect">
<?php
$interfaces = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip)
$interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")";
$aliaslist = get_configured_ip_aliases_list();
foreach ($aliaslist as $aliasip => $aliasif)
$interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
$grouplist = return_gateway_groups_array();
foreach ($grouplist as $name => $group) {
if($group[0]['vip'] <> "")
......@@ -617,8 +617,8 @@ function dpdchkbox_change() {
$vipif = $group[0]['int'];
$interfaces[$name] = "GW Group {$name}";
}
foreach ($interfaces as $iface => $ifacename):
?>
<option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
......@@ -630,9 +630,9 @@ function dpdchkbox_change() {
<span class="vexpl"><?=gettext("Select the interface for the local endpoint of this phase1 entry"); ?>.</span>
</td>
</tr>
<?php if (!$pconfig['mobile']): ?>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Remote gateway"); ?></td>
<td width="78%" class="vtable">
......@@ -641,9 +641,9 @@ function dpdchkbox_change() {
<?=gettext("Enter the public IP address or host name of the remote gateway"); ?>
</td>
</tr>
<?php endif; ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
......@@ -659,18 +659,18 @@ function dpdchkbox_change() {
<td colspan="2" class="list" height="12"></td>
</tr>
</tbody>
</table>
<table class="table table-striped table-sort">
</table>
<table class="table table-striped table-sort">
<thead>
<tr>
<th colspan="2" class="listtopic"><?=gettext("Phase 1 proposal (Authentication)"); ?></th>
<th colspan="2" class="listtopic"><?=gettext("Phase 1 proposal (Authentication)"); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication method"); ?></td>
<td width="78%" class="vtable">
......@@ -789,18 +789,18 @@ function dpdchkbox_change() {
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-sort">
</table>
<table class="table table-striped table-sort">
<thead>
<tr>
<th colspan="2" class="listtopic"><?=gettext("Phase 1 proposal (Algorithms)"); ?></th>
<th colspan="2" class="listtopic"><?=gettext("Phase 1 proposal (Algorithms)"); ?></th>
</tr>
</thead>
<tbody>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Encryption algorithm"); ?></td>
<td width="78%" class="vtable">
......@@ -860,17 +860,17 @@ function dpdchkbox_change() {
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-sort">
</table>
<table class="table table-striped table-sort">
<thead>
<tr>
<th colspan="2" class="listtopic"><?=gettext("Advanced Options"); ?></th>
<th colspan="2" class="listtopic"><?=gettext("Advanced Options"); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Disable Rekey");?></td>
<td width="78%" class="vtable">
......@@ -939,13 +939,13 @@ function dpdchkbox_change() {
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<script type="text/javascript">
//<![CDATA[
......@@ -963,4 +963,4 @@ ealgosel_change(<?=$keyset;?>);
dpdchkbox_change();
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -136,7 +136,7 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if(($pconfig['mode'] == "tunnel") || ($pconfig['mode'] == "tunnel6"))
if(($pconfig['mode'] == "tunnel") || ($pconfig['mode'] == "tunnel6"))
{
switch ($pconfig['localid_type']) {
case "network":
......@@ -167,7 +167,7 @@ if ($_POST) {
if (($pconfig['natlocalid_netbits'] != 0 && !$pconfig['natlocalid_netbits']) || !is_numeric($pconfig['natlocalid_netbits']))
$input_errors[] = gettext("A valid NAT local network bit count must be specified.");
if ($pconfig['localid_type'] == "address")
$input_errors[] = gettext("You cannot configure a network type address for NAT while only an address type is selected for local source.");
$input_errors[] = gettext("You cannot configure a network type address for NAT while only an address type is selected for local source.");
case "address":
if (!empty($pconfig['natlocalid_address']) && !is_ipaddr($pconfig['natlocalid_address']))
$input_errors[] = gettext("A valid NAT local network IP address must be specified.");
......@@ -239,7 +239,7 @@ if ($_POST) {
if (isset($pconfig['remoteid_address'])) $entered_remote['address'] = $pconfig['remoteid_address'];
if (isset($pconfig['remoteid_netbits'])) $entered_remote['netbits'] = $pconfig['remoteid_netbits'];
$entered_remoteid_data = ipsec_idinfo_to_cidr($entered_remote, false, $pconfig['mode']);
if ($localid_data == $entered_localid_data && $remoteid_data == $entered_remoteid_data) {
if ($localid_data == $entered_localid_data && $remoteid_data == $entered_remoteid_data) {
/* adding new p2 entry */
$input_errors[] = gettext("Phase2 with this Local/Remote networks combination is already defined for this Phase1.");
break;
......@@ -264,7 +264,7 @@ if ($_POST) {
}
}
}
}
if (($_POST['lifetime'] && !is_numeric($_POST['lifetime']))) {
$input_errors[] = gettext("The P2 lifetime must be an integer.");
......@@ -607,7 +607,7 @@ function change_protocol() {
</tr>
<?php if (!isset($pconfig['mobile'])): ?>
<tr id="opt_remoteid">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Remote Network"); ?></td>
<td width="78%" class="vtable">
......@@ -629,8 +629,8 @@ function change_protocol() {
<input name="remoteid_address" type="text" class="formfld unknown ipv4v6" id="remoteid_address" size="28" value="<?=htmlspecialchars($pconfig['remoteid_address']);?>" />
/
<select name="remoteid_netbits" class="formselect ipv4v6" id="remoteid_netbits">
<?php for ($i = 128; $i >= 0; $i--) {
<?php for ($i = 128; $i >= 0; $i--) {
echo "<option value=\"{$i}\"";
if (isset($pconfig['remoteid_netbits']) && $i == $pconfig['remoteid_netbits']) echo " selected=\"selected\"";
echo ">{$i}</option>\n";
......@@ -641,9 +641,9 @@ function change_protocol() {
</table>
</td>
</tr>
<?php endif; ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
......@@ -717,12 +717,12 @@ function change_protocol() {
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<br />
<?=gettext("Hint: use 3DES for best compatibility or if you have a hardware " .
<?=gettext("Hint: use 3DES for best compatibility or if you have a hardware " .
"crypto accelerator card. Blowfish is usually the fastest in " .
"software encryption"); ?>.
</td>
......
......@@ -135,10 +135,10 @@ function maxmss_checked(obj) {
</script>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if ($savemsg)
print_info_box($savemsg);
......@@ -146,26 +146,26 @@ function maxmss_checked(obj) {
print_input_errors($input_errors);
?>
<section class="col-xs-12">
<? $active_tab = "/vpn_ipsec_settings.php"; include('vpn_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<? $active_tab = "/vpn_ipsec_settings.php"; include('vpn_ipsec_tabs.php'); ?>
<div class="tab-content content-box col-xs-12">
<form action="vpn_ipsec_settings.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<thead>
<tr>
<th colspan="2" class="listtopic"><?=gettext("IPSec Advanced Settings"); ?></th>
<th colspan="2" class="listtopic"><?=gettext("IPSec Advanced Settings"); ?></th>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("LAN security associsations"); ?></td>
<td width="78%" class="vtable">
......@@ -248,10 +248,10 @@ function maxmss_checked(obj) {
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -5,4 +5,4 @@
$tab_array[2] = array(gettext("Pre-Shared Keys"), $_SERVER['PHP_SELF'] == "/vpn_ipsec_keys.php", "vpn_ipsec_keys.php");
$tab_array[3] = array(gettext("Advanced Settings"), $_SERVER['PHP_SELF'] == "/vpn_ipsec_settings.php", "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
?>
\ No newline at end of file
?>
......@@ -278,29 +278,29 @@ function enable_change(enable_over) {
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<div id="inputerrors"></div>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Configuration"), true, "vpn_l2tp.php");
$tab_array[1] = array(gettext("Users"), false, "vpn_l2tp_users.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="tab-content content-box col-xs-12">
<form action="vpn_l2tp.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
......@@ -314,11 +314,11 @@ function enable_change(enable_over) {
<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked=\"checked\""; ?> />
<?=gettext("Enable L2TP server"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><b><?=gettext("Interface");?></b></td>
<td width="78%" valign="top" class="vtable">
<select name="interface" class="form-control" id="interface">
<?php
$interfaces = get_configured_interface_with_descr();
......@@ -329,7 +329,7 @@ function enable_change(enable_over) {
</option>
<?php endforeach; ?>
</select> <br />
</td>
</tr>
<tr>
......@@ -408,7 +408,7 @@ function enable_change(enable_over) {
<td width="22%" valign="top" class="vncell"><?=gettext("L2TP DNS Servers"); ?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="l2tp_dns1" type="text" class="form-control unknown" id="l2tp_dns1" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns1']);?>" />
<br />
<br />
<input name="l2tp_dns2" type="text" class="form-control unknown" id="l2tp_dns2" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns2']);?>" />
<br />
<p class="text-muted"><em><small><?=gettext("primary and secondary DNS servers assigned to L2TP clients"); ?></small></em></p>
......@@ -475,7 +475,7 @@ function enable_change(enable_over) {
</div>
</div>
</section>
<script type="text/javascript">
//<![CDATA[
......
......@@ -86,38 +86,38 @@ $main_buttons = array(
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?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')): ?><br/>
<?php print_info_box_np(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">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Configuration"), false, "vpn_l2tp.php");
$tab_array[1] = array(gettext("Users"), true, "vpn_l2tp_users.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box 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">
<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>
<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>
......@@ -130,16 +130,16 @@ $main_buttons = array(
</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="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php $i++; endforeach; ?>
</table>
</div>
</form>
</div>
</section>
......
......@@ -150,30 +150,30 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<div id="inputerrors"></div>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Configuration"), false, "vpn_l2tp.php");
$tab_array[1] = array(gettext("Users"), true, "vpn_l2tp_users.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box 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>
<table class="table table-striped table-sort">
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="usernamefld" type="text" class="form-control user" id="usernamefld" size="20" value="<?=htmlspecialchars($pconfig['usernamefld']);?>" />
......@@ -207,11 +207,11 @@ include("head.inc");
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -153,7 +153,7 @@ if($_GET['act']=="edit"){
// just in case the modes switch
$pconfig['autokey_enable'] = "yes";
$pconfig['autotls_enable'] = "yes";
$pconfig['no_tun_ipv6'] = $a_client[$id]['no_tun_ipv6'];
$pconfig['route_no_pull'] = $a_client[$id]['route_no_pull'];
$pconfig['route_no_exec'] = $a_client[$id]['route_no_exec'];
......@@ -342,7 +342,7 @@ include("head.inc");
$main_buttons = array(
array('href'=>'vpn_openvpn_client.php?act=new', 'label'=>gettext("add client")),
);
?>
......@@ -432,23 +432,23 @@ function autotls_change() {
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if (!$savemsg)
$savemsg = "";
if ($input_errors)
print_input_errors($input_errors);
if ($savemsg)
print_info_box($savemsg);
?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), true, "vpn_openvpn_client.php");
......@@ -457,15 +457,15 @@ function autotls_change() {
add_package_tabs("OpenVPN", $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">
<?php if($act=="new" || $act=="edit"): ?>
<form action="vpn_openvpn_client.php" method="post" name="iform" id="iform" onsubmit="presubmit()">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("General information"); ?></td>
</tr>
......@@ -1117,7 +1117,7 @@ function autotls_change() {
<td width="10%" class="list"></td>
</tr>
</thead>
<tbody>
<?php
$i = 0;
......@@ -1142,10 +1142,10 @@ function autotls_change() {
</td>
<td valign="middle" class="list nowrap">
<a href="vpn_openvpn_client.php?id=<?=$i;?>" class="btn btn-default"><span class="glyphicon glyphicon-edit"></span></a>
<a href="vpn_openvpn_client.php?act=del&amp;id=<?=$i;?>" class="btn btn-default" onclick="return confirm('<?=gettext("Do you really want to delete this client?"); ?>')"title="<?=gettext("delete client"); ?>"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php
......@@ -1156,7 +1156,7 @@ function autotls_change() {
</table>
<?php endif; ?>
</div>
</section>
</div>
......
<?php
<?php
/*
vpn_openvpn_csc.php
Copyright (C) 2008 Shrew Soft Inc.
All rights reserved.
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
......@@ -230,7 +230,7 @@ if ($_POST) {
if ($pconfig['dns_server_enable'])
$csc['nbdd_server1'] = $pconfig['nbdd_server1'];
}
if (isset($id) && $a_csc[$id]) {
$old_csc_cn = $a_csc[$id]['common_name'];
$a_csc[$id] = $csc;
......@@ -241,7 +241,7 @@ if ($_POST) {
openvpn_cleanup_csc($old_csc_cn);
openvpn_resync_csc($csc);
write_config();
header("Location: vpn_openvpn_csc.php");
exit;
}
......@@ -304,7 +304,7 @@ function netbios_change() {
<?
if($act!="new" && $act!="edit") {
if($act!="new" && $act!="edit") {
$main_buttons = array(
array('href'=>'vpn_openvpn_csc.php?act=new', 'label'=>gettext("add csc")),
);
......@@ -315,20 +315,20 @@ if($act!="new" && $act!="edit") {
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if ($input_errors)
print_input_errors($input_errors);
if ($savemsg)
print_info_box($savemsg);
?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
......@@ -337,18 +337,18 @@ if($act!="new" && $act!="edit") {
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<?php if($act=="new" || $act=="edit"): ?>
<form action="vpn_openvpn_csc.php" method="post" name="iform" id="iform" onsubmit="presubmit()">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("General information"); ?></td>
</tr>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
......@@ -369,16 +369,16 @@ if($act!="new" && $act!="edit") {
<p class="text-muted"><em><small><?=gettext("Set this option to disable this client-specific override without removing it from the list"); ?>.</small></em></p>
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Common name"); ?></td>
<td width="78%" class="vtable">
<td width="78%" class="vtable">
<input name="common_name" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['common_name']);?>" />
<p class="text-muted"><em><small><?=gettext("Enter the client's X.509 common name here"); ?>.</small></em></p>
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<td width="78%" class="vtable">
<input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>" />
<p class="text-muted"><em><small><?=gettext("You may enter a description here for your reference (not parsed)"); ?>.</small></em></p>
</td>
......@@ -736,8 +736,8 @@ if($act!="new" && $act!="edit") {
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="save" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<td width="78%">
<input name="save" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<input name="act" type="hidden" value="<?=$act;?>" />
<?php if (isset($id) && $a_csc[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
......@@ -747,12 +747,12 @@ if($act!="new" && $act!="edit") {
</table>
</div>
</form>
<?php else: ?>
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr>
<td width="10%" class="listhdrr"><?=gettext("Disabled"); ?></td>
<td width="40%" class="listhdrr"><?=gettext("Common Name"); ?></td>
......@@ -790,7 +790,7 @@ if($act!="new" && $act!="edit") {
$i++;
endforeach;
?>
<tr>
<td colspan="3">
<p>
......@@ -800,8 +800,8 @@ if($act!="new" && $act!="edit") {
</tr>
</table>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</section>
</div>
......
<?php
<?php
/*
vpn_openvpn_server.php
Copyright (C) 2008 Shrew Soft Inc.
All rights reserved.
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
......@@ -206,13 +206,13 @@ if($_GET['act']=="edit"){
$pconfig['autotls_enable'] = "yes";
$pconfig['duplicate_cn'] = isset($a_server[$id]['duplicate_cn']);
$pconfig['no_tun_ipv6'] = $a_server[$id]['no_tun_ipv6'];
if (isset($a_server[$id]['verbosity_level']))
$pconfig['verbosity_level'] = $a_server[$id]['verbosity_level'];
else
$pconfig['verbosity_level'] = 1; // Default verbosity is 1
$pconfig['push_register_dns'] = $a_server[$id]['push_register_dns'];
}
}
......@@ -342,7 +342,7 @@ if ($_POST) {
} else {
if ($pconfig['serverbridge_dhcp'] && $pconfig['tunnel_network'])
$input_errors[] = gettext("Using a tunnel network and server bridge settings together is not allowed.");
if (($pconfig['serverbridge_dhcp_start'] && !$pconfig['serverbridge_dhcp_end'])
if (($pconfig['serverbridge_dhcp_start'] && !$pconfig['serverbridge_dhcp_end'])
|| (!$pconfig['serverbridge_dhcp_start'] && $pconfig['serverbridge_dhcp_end']))
$input_errors[] = gettext("Server Bridge DHCP Start and End must both be empty, or defined.");
if (($pconfig['serverbridge_dhcp_start'] && !is_ipaddrv4($pconfig['serverbridge_dhcp_start'])))
......@@ -353,7 +353,7 @@ if ($_POST) {
$input_errors[] = gettext("The Server Bridge DHCP range is invalid (start higher than end).");
}
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
if (!$input_errors) {
$server = array();
......@@ -440,7 +440,7 @@ if ($_POST) {
$server['netbios_enable'] = $pconfig['netbios_enable'];
$server['netbios_ntype'] = $pconfig['netbios_ntype'];
$server['netbios_scope'] = $pconfig['netbios_scope'];
$server['no_tun_ipv6'] = $pconfig['no_tun_ipv6'];
$server['verbosity_level'] = $pconfig['verbosity_level'];
......@@ -468,7 +468,7 @@ if ($_POST) {
openvpn_resync('server', $server);
write_config();
header("Location: vpn_openvpn_server.php");
exit;
}
......@@ -732,22 +732,22 @@ function tuntap_change() {
</script>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php
if (!$savemsg)
$savemsg = "";
if ($input_errors)
print_input_errors($input_errors);
if ($savemsg)
print_info_box_np($savemsg);
?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), true, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
......@@ -756,14 +756,14 @@ function tuntap_change() {
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<?php if($act=="new" || $act=="edit"): ?>
<div class="tab-content content-box col-xs-12">
<?php if($act=="new" || $act=="edit"): ?>
<form action="vpn_openvpn_server.php" method="post" name="iform" id="iform" onsubmit="presubmit()">
<div class="table-responsive">
<table class="table table-striped">
<table class="table table-striped">
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("General information"); ?></td>
</tr>
......@@ -815,7 +815,7 @@ function tuntap_change() {
$selected = "selected=\"selected\"";
?>
<option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option>
<?php endforeach; ?>
<?php endforeach; ?>
</select>
</td>
</tr>
......@@ -896,9 +896,9 @@ function tuntap_change() {
<input name="local_port" type="text" class="form-control unknown" size="5" value="<?=htmlspecialchars($pconfig['local_port']);?>" />
</td>
</tr>
<tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
<td width="78%" class="vtable">
<input name="description" type="text" class="form-control unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>" />
<br />
<?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
......@@ -1424,7 +1424,7 @@ function tuntap_change() {
</table>
</td>
</tr>
<tr id="chkboxNoTunIPv6">
<td width="22%" valign="top" class="vncell"><?=gettext("Disable IPv6"); ?></td>
<td width="78%" class="vtable">
......@@ -1768,8 +1768,8 @@ function tuntap_change() {
</td>
</tr>
</table>
<table class="table table-striped" id="client_opts" summary="advance configuration">
<table class="table table-striped" id="client_opts" summary="advance configuration">
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
......@@ -1813,11 +1813,11 @@ function tuntap_change() {
</td>
</tr>
</table>
<table class="table table-striped" id="client_opts" summary="advance configuration">
<table class="table table-striped" id="client_opts" summary="advance configuration">
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<input name="save" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<td width="78%">
<input name="save" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
<input name="act" type="hidden" value="<?=$act;?>" />
<?php if (isset($id) && $a_server[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
......@@ -1840,7 +1840,7 @@ function tuntap_change() {
<td width="10%" class="list"></td>
</tr>
</thead>
<tbody>
<?php
$i = 0;
......@@ -1877,9 +1877,9 @@ function tuntap_change() {
</tbody>
</table>
</div>
<?php endif; ?>
</div>
</section>
</div>
......@@ -1913,4 +1913,4 @@ function set_checked($var,& $chk) {
$chk = "";
}
?>
\ No newline at end of file
?>
......@@ -97,19 +97,19 @@ $main_buttons = array(
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('vpnpppoe')): ?><br/>
<?php print_info_box_np(gettext("The PPPoE entry list has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), true, "vpn_openvpn_client.php");
......@@ -118,20 +118,20 @@ $main_buttons = array(
add_package_tabs("OpenVPN", $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">
<form action="vpn_pppoe.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<table class="table table-striped table-sort">
<tr>
<td width="15%" class="listhdrr"><?=gettext("Interface");?></td>
<td width="10%" class="listhdrr"><?=gettext("Local IP");?></td>
<td width="20%" class="listhdrr"><?=gettext("Number of users");?></td>
<td width="25%" class="listhdr"><?=gettext("Description");?></td>
<td width="10%" class="list">
</td>
</tr>
<?php $i = 0; foreach ($a_pppoes as $pppoe): ?>
......@@ -149,21 +149,21 @@ $main_buttons = array(
<?=htmlspecialchars($pppoe['descr']);?>&nbsp;
</td>
<td valign="middle" class="list nowrap">
<a href="vpn_pppoe_edit.php?id=<?=$i;?>" title="<?=gettext("edit pppoe instance"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="vpn_pppoe.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry? All elements that still use it will become invalid (e.g. filter rules)!");?>')" title="<?=gettext("delete pppoe instance");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
<a href="vpn_pppoe_edit.php?id=<?=$i;?>" title="<?=gettext("edit pppoe instance"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
<a href="vpn_pppoe.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry? All elements that still use it will become invalid (e.g. filter rules)!");?>')" title="<?=gettext("delete pppoe instance");?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span></a>
</td>
</tr>
<?php $i++; endforeach; ?>
</table>
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -246,8 +246,8 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<script type="text/javascript" src="/javascript/row_helper.js"></script>
<script type="text/javascript">
//<![CDATA[
rowname[0] = "username";
......@@ -352,8 +352,8 @@ function enable_change(enable_over) {
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<div class="row">
<?php
if ($input_errors)
print_input_errors($input_errors);
......@@ -362,17 +362,17 @@ function enable_change(enable_over) {
?>
<section class="col-xs-12">
<div class="content-box">
<form action="vpn_pppoe_edit.php" method="post" name="iform" id="iform">
<div class="content-box">
<form action="vpn_pppoe_edit.php" method="post" name="iform" id="iform">
<input type='hidden' name='username' value='textbox' class="formfld unknown" />
<input type='hidden' name='password' value='textbox' />
<input type='hidden' name='ip' value='textbox' />
<div class="table-responsive">
<table class="table table-striped table-sort">
<input type='hidden' name='ip' value='textbox' />
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td height="16" colspan="2" class="listtopic" valign="top"><?php echo gettext("PPPoE server configuration"); ?></td>
</tr>
......@@ -389,11 +389,11 @@ function enable_change(enable_over) {
<input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked=\"checked\""; ?> />
<?=gettext("Enable PPPoE server"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><b><?=gettext("Interface"); ?></b></td>
<td width="78%" valign="top" class="vtable">
<select name="interface" class="formselect" id="interface">
<?php
$interfaces = get_configured_interface_with_descr();
......@@ -406,7 +406,7 @@ function enable_change(enable_over) {
endforeach;
?>
</select> <br />
</td>
</tr>
<tr>
......@@ -621,14 +621,14 @@ function enable_change(enable_over) {
"traffic from PPPoE clients"); ?>!</span></td>
</tr>
</table>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</section>
<script type="text/javascript">
//<![CDATA[
enable_change(false);
......@@ -639,4 +639,4 @@ function enable_change(enable_over) {
loaded = <?php echo $counter; ?>;
//]]>
</script>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
This diff is collapsed.
......@@ -2,20 +2,20 @@
/*
vpn_pptp_users.php
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2005 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
......@@ -81,41 +81,41 @@ $main_buttons = array(
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (isset($config['pptpd']['radius']['enable']))
print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used.")); ?>
<?php if (is_subsystem_dirty('pptpusers')): ?><br/>
<?php print_info_box_np(gettext("The PPTP user list has been modified").".<br />".gettext("You must apply the changes in order for them to take effect").".<br /></b><b>".gettext("Warning: this will terminate all current PPTP sessions")."!");?><br />
<?php endif; ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Configuration"), false, "vpn_pptp.php");
$tab_array[1] = array(gettext("Users"), true, "vpn_pptp_users.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
?>
<div class="tab-content content-box col-xs-12">
<form action="vpn_pptp_users.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<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">
<?=htmlspecialchars($secretent['name']);?>
</td>
......@@ -124,19 +124,19 @@ $main_buttons = array(
</td>
<td class="list nowrap">
<a href="vpn_pptp_users_edit.php?id=<?=$i;?>" class="btn btn-default"><span class="glyphicon glyphicon-edit"></span></a>
<a href="vpn_pptp_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="glyphicon glyphicon-remove"></span></a></td>
</tr>
<?php $i++; endforeach; ?>
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?php include("foot.inc"); ?>
......@@ -143,28 +143,28 @@ include("head.inc");
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<?php
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Configuration"), false, "vpn_pptp.php");
$tab_array[1] = array(gettext("Users"), true, "vpn_pptp_users.php");
display_top_tabs($tab_array);
?>
?>
<div class="tab-content content-box col-xs-12">
<form action="vpn_pptp_users_edit.php" method="post" name="iform" id="iform">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<table class="table table-striped table-sort">
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="username" type="text" class="form-control user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>" />
......@@ -197,11 +197,11 @@ include("head.inc");
</table>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
\ No newline at end of file
<?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