Commit 1fcd3fc1 authored by Franco Fichtner's avatar Franco Fichtner

src: whitespace and style sweep

parent f9b697e2
...@@ -74,7 +74,9 @@ class FirmwareController extends ApiControllerBase ...@@ -74,7 +74,9 @@ class FirmwareController extends ApiControllerBase
$response['status_msg'] = sprintf('There are %s updates available.', $response['updates']); $response['status_msg'] = sprintf('There are %s updates available.', $response['updates']);
} }
if ($response['upgrade_needs_reboot'] == 1) { if ($response['upgrade_needs_reboot'] == 1) {
$response['status_msg'] = sprintf('%s %s', $response['status_msg'], 'This update requires a reboot.'); $response['status_msg'] = sprintf(
'%s %s', $response['status_msg'], 'This update requires a reboot.'
);
} }
} }
} else { } else {
......
...@@ -118,7 +118,7 @@ include("head.inc"); ...@@ -118,7 +118,7 @@ include("head.inc");
<div class="row"> <div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?> <?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12"> <section class="col-xs-12">
<? $active_tab = "/diag_ipsec.php"; <? $active_tab = "/diag_ipsec.php";
include('diag_ipsec_tabs.inc'); include('diag_ipsec_tabs.inc');
?> ?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
...@@ -212,22 +212,22 @@ include("head.inc"); ...@@ -212,22 +212,22 @@ include("head.inc");
<form method="post"> <form method="post">
<input type="hidden" value="<?=$con_id?>" name="ikeid"/> <input type="hidden" value="<?=$con_id?>" name="ikeid"/>
<input type="hidden" value="<?=isset($ikesa['id']) ? $ikesa['id'] :""?>" name="ikesaid" /> <input type="hidden" value="<?=isset($ikesa['id']) ? $ikesa['id'] :""?>" name="ikesaid" />
<?php if (!$connected): ?> <?php if (!$connected): ?>
<button type="submit" class="btn btn-xs" name="action" value="connect" title="<?=gettext("Connect VPN");?>"> <button type="submit" class="btn btn-xs" name="action" value="connect" title="<?=gettext("Connect VPN");?>">
<span class="glyphicon glyphicon-play"/> <span class="glyphicon glyphicon-play"/>
</button> </button>
<?php else: ?> <?php else: ?>
<button type="submit" class="btn btn-xs" name="action" value="ikedisconnect" title="<?=gettext("Disconnect VPN");?>"> <button type="submit" class="btn btn-xs" name="action" value="ikedisconnect" title="<?=gettext("Disconnect VPN");?>">
<span class="glyphicon glyphicon-stop"/> <span class="glyphicon glyphicon-stop"/>
</button> </button>
<button type="submit" class="btn btn-xs" name="action" value="ikedisconnectconn" title="<?=gettext("Disconnect VPN Connection");?>"> <button type="submit" class="btn btn-xs" name="action" value="ikedisconnectconn" title="<?=gettext("Disconnect VPN Connection");?>">
<span class="glyphicon glyphicon-remove"/> <span class="glyphicon glyphicon-remove"/>
</button> </button>
<?php endif; ?> <?php endif; ?>
</form> </form>
</td> </td>
</tr> </tr>
<?php if (isset($ikesa['childsalist']) && is_array($ikesa['childsalist']) ): ?> <?php if (isset($ikesa['childsalist']) && is_array($ikesa['childsalist']) ): ?>
<tr> <tr>
<td colspan="8"> <td colspan="8">
<div id="btnchildsa-<?=$ikeid;?>"> <div id="btnchildsa-<?=$ikeid;?>">
...@@ -264,8 +264,8 @@ include("head.inc"); ...@@ -264,8 +264,8 @@ include("head.inc");
foreach ($childsa['local']['networks']['network'] as $lnets): foreach ($childsa['local']['networks']['network'] as $lnets):
?> ?>
<?=htmlspecialchars(ipsec_fixup_network($lnets));?> <br/> <?=htmlspecialchars(ipsec_fixup_network($lnets));?> <br/>
<?php endforeach; <?php endforeach;
else: else:
?> ?>
Unknown <br/> Unknown <br/>
<?php endif; <?php endif;
...@@ -275,12 +275,12 @@ include("head.inc"); ...@@ -275,12 +275,12 @@ include("head.inc");
<?php if (isset($childsa['local']['spi'])): <?php if (isset($childsa['local']['spi'])):
?> ?>
Local : <?=htmlspecialchars($childsa['local']['spi']);?> Local : <?=htmlspecialchars($childsa['local']['spi']);?>
<?php endif; <?php endif;
?> ?>
<?php if (isset($childsa['remote']['spi'])): <?php if (isset($childsa['remote']['spi'])):
?> ?>
<br/>Remote : <?=htmlspecialchars($childsa['remote']['spi']);?> <br/>Remote : <?=htmlspecialchars($childsa['remote']['spi']);?>
<?php endif; <?php endif;
?> ?>
</td> </td>
<td> <td>
...@@ -288,7 +288,7 @@ include("head.inc"); ...@@ -288,7 +288,7 @@ include("head.inc");
foreach ($childsa['remote']['networks']['network'] as $rnets): foreach ($childsa['remote']['networks']['network'] as $rnets):
?> ?>
<?=htmlspecialchars(ipsec_fixup_network($rnets));?> <br/> <?=htmlspecialchars(ipsec_fixup_network($rnets));?> <br/>
<?php endforeach; <?php endforeach;
else: else:
?> ?>
Unknown <br/> Unknown <br/>
...@@ -302,7 +302,7 @@ include("head.inc"); ...@@ -302,7 +302,7 @@ include("head.inc");
</table> </table>
</td> </td>
</tr> </tr>
<?php endif; <?php endif;
unset($con_id); unset($con_id);
// close outer loop {foreach ($status['query']['ikesalist']['ikesa'] as $ikeid => $ikesa)} // close outer loop {foreach ($status['query']['ikesalist']['ikesa'] as $ikeid => $ikesa)}
endforeach; endforeach;
...@@ -356,9 +356,9 @@ include("head.inc"); ...@@ -356,9 +356,9 @@ include("head.inc");
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
</div> </div>
</section> </section>
......
...@@ -95,7 +95,7 @@ legacy_html_escape_form_data($spd); ...@@ -95,7 +95,7 @@ legacy_html_escape_form_data($spd);
</tr> </tr>
<?php endif; ?> <?php endif; ?>
</table> </table>
</div> </div>
</div> </div>
</section> </section>
</div> </div>
......
...@@ -289,11 +289,11 @@ function show_source_port_range() { ...@@ -289,11 +289,11 @@ function show_source_port_range() {
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<select name="members[]" multiple="multiple" class="selectpicker" size="3" data-live-search="true"> <select name="members[]" multiple="multiple" class="selectpicker" size="3" data-live-search="true">
<?php <?php
// let's fix this for now in the template, although it should be fixed at the top of the page // let's fix this for now in the template, although it should be fixed at the top of the page
// $pconfig['members'] can be of different type now. // $pconfig['members'] can be of different type now.
if ( isset($pconfig['members']) && is_array($pconfig['members'])) { if ( isset($pconfig['members']) && is_array($pconfig['members'])) {
$members_array = $pconfig['members']; $members_array = $pconfig['members'];
} elseif (!empty($pconfig['members'])) { } elseif (!empty($pconfig['members'])) {
$members_array = explode(',', $pconfig['members']); $members_array = explode(',', $pconfig['members']);
} else { } else {
$members_array = array(); $members_array = array();
......
...@@ -169,9 +169,9 @@ endif; ?> ...@@ -169,9 +169,9 @@ endif; ?>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>
<span class="text-danger"> <span class="text-danger">
<strong><?=gettext("Note"); ?>:<br /></strong> <strong><?=gettext("Note"); ?>:<br /></strong>
</span> </span>
<?=gettext("PSK for any user can be set by using an identifier of any/ANY");?> <?=gettext("PSK for any user can be set by using an identifier of any/ANY");?>
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -339,8 +339,8 @@ function login_banner_change() { ...@@ -339,8 +339,8 @@ function login_banner_change() {
?> ?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<form action="vpn_ipsec_mobile.php" method="post" name="iform" id="iform"> <form action="vpn_ipsec_mobile.php" method="post" name="iform" id="iform">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<tr> <tr>
<td width="22%"><b><?=gettext("IKE Extensions"); ?> </b></td> <td width="22%"><b><?=gettext("IKE Extensions"); ?> </b></td>
<td width="78%" align="right"> <td width="78%" align="right">
...@@ -348,24 +348,24 @@ function login_banner_change() { ...@@ -348,24 +348,24 @@ function login_banner_change() {
<i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_opnvpn_server" type="button"></i></a> <i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_opnvpn_server" type="button"></i></a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_enabled" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Enable")?></td> <td><a id="help_for_enabled" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Enable")?></td>
<td> <td>
<input name="enable" type="checkbox" id="enable" value="yes" <?= !empty($pconfig['enable']) ? "checked=\"checked\"" : "";?> /> <input name="enable" type="checkbox" id="enable" value="yes" <?= !empty($pconfig['enable']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" for="help_for_enabled"> <div class="hidden" for="help_for_enabled">
<?=gettext("Enable IPsec Mobile Client Support"); ?> <?=gettext("Enable IPsec Mobile Client Support"); ?>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><b><?=gettext("Extended Authentication (Xauth)"); ?></b></td> <td colspan="2"><b><?=gettext("Extended Authentication (Xauth)"); ?></b></td>
</tr> </tr>
<tr> <tr>
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("User Authentication"); ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("User Authentication"); ?></td>
<td> <td>
<?=gettext("Source"); ?>: <?=gettext("Source"); ?>:
<select name="user_source[]" class="form-control" id="user_source" multiple="multiple" size="3"> <select name="user_source[]" class="form-control" id="user_source" multiple="multiple" size="3">
<?php <?php
$authmodes = explode(",", $pconfig['user_source']); $authmodes = explode(",", $pconfig['user_source']);
$auth_servers = auth_get_authserver_list(); $auth_servers = auth_get_authserver_list();
...@@ -374,83 +374,83 @@ function login_banner_change() { ...@@ -374,83 +374,83 @@ function login_banner_change() {
<option value="<?=htmlspecialchars($auth_server['name'])?>" <?=in_array($auth_server['name'], $authmodes) ? "selected=\"selected\"" : ""?> ><?=$auth_server['name']?></option> <option value="<?=htmlspecialchars($auth_server['name'])?>" <?=in_array($auth_server['name'], $authmodes) ? "selected=\"selected\"" : ""?> ><?=$auth_server['name']?></option>
<?php endforeach; <?php endforeach;
?> ?>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Group Authentication"); ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Group Authentication"); ?></td>
<td> <td>
<select name="group_source" class="form-control" id="group_source"> <select name="group_source" class="form-control" id="group_source">
<option value="none"><?=gettext("none"); ?></option> <option value="none"><?=gettext("none"); ?></option>
<option value="system" <?= $pconfig['group_source'] == "system" ? "selected=\"selected\"" : "";?>><?=gettext("system"); ?></option> <option value="system" <?= $pconfig['group_source'] == "system" ? "selected=\"selected\"" : "";?>><?=gettext("system"); ?></option>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><b><?=gettext("Client Configuration (mode-cfg)"); ?> </b></td> <td colspan="2"><b><?=gettext("Client Configuration (mode-cfg)"); ?> </b></td>
</tr> </tr>
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Virtual Address Pool"); ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Virtual Address Pool"); ?></td>
<td> <td>
<input name="pool_enable" type="checkbox" id="pool_enable" value="yes" <?= !empty($pconfig['pool_address'])&&!empty($pconfig['pool_netbits']) ? "checked=\"checked\"" : "";?> onclick="pool_change()" /> <input name="pool_enable" type="checkbox" id="pool_enable" value="yes" <?= !empty($pconfig['pool_address'])&&!empty($pconfig['pool_netbits']) ? "checked=\"checked\"" : "";?> onclick="pool_change()" />
<?=gettext("Provide a virtual IP address to clients"); ?><br /> <?=gettext("Provide a virtual IP address to clients"); ?><br />
<?=gettext("Network"); ?>:&nbsp; <?=gettext("Network"); ?>:&nbsp;
<input name="pool_address" type="text" class="form-control unknown" id="pool_address" size="20" value="<?=$pconfig['pool_address'];?>" /> <input name="pool_address" type="text" class="form-control unknown" id="pool_address" size="20" value="<?=$pconfig['pool_address'];?>" />
/ /
<select name="pool_netbits" class="form-control" id="pool_netbits"> <select name="pool_netbits" class="form-control" id="pool_netbits">
<?php for ($i = 32; $i >= 0; $i--) : <?php for ($i = 32; $i >= 0; $i--) :
?> ?>
<option value="<?=$i;?>" <?= ($i == $pconfig['pool_netbits']) ? "selected=\"selected\"" : "";?>> <option value="<?=$i;?>" <?= ($i == $pconfig['pool_netbits']) ? "selected=\"selected\"" : "";?>>
<?=$i;?> <?=$i;?>
</option> </option>
<?php <?php
endfor; ?> endfor; ?>
</select> </select>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_net_list" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Network List"); ?></td> <td><a id="help_for_net_list" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Network List"); ?></td>
<td> <td>
<input name="net_list" type="checkbox" id="net_list_enable" value="yes" <?= !empty($pconfig['net_list']) ? "checked=\"checked\"" : "";?> /> <input name="net_list" type="checkbox" id="net_list_enable" value="yes" <?= !empty($pconfig['net_list']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" for="help_for_net_list"> <div class="hidden" for="help_for_net_list">
<?=gettext("Provide a list of accessible networks to clients"); ?><br /> <?=gettext("Provide a list of accessible networks to clients"); ?><br />
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_save_passwd" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Save Xauth Password"); ?></td> <td><a id="help_for_save_passwd" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Save Xauth Password"); ?></td>
<td> <td>
<input name="save_passwd" type="checkbox" id="save_passwd_enable" value="yes" <?= !empty($pconfig['save_passwd']) ? "checked=\"checked\"" : "";?> /> <input name="save_passwd" type="checkbox" id="save_passwd_enable" value="yes" <?= !empty($pconfig['save_passwd']) ? "checked=\"checked\"" : "";?> />
<div class="hidden" for="help_for_save_passwd"> <div class="hidden" for="help_for_save_passwd">
<?=gettext("Allow clients to save Xauth passwords (Cisco VPN client only)."); ?><br /> <?=gettext("Allow clients to save Xauth passwords (Cisco VPN client only)."); ?><br />
<?=gettext("NOTE: With iPhone clients, this does not work when deployed via the iPhone configuration utility, only by manual entry."); ?><br /> <?=gettext("NOTE: With iPhone clients, this does not work when deployed via the iPhone configuration utility, only by manual entry."); ?><br />
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_dns_domain_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("DNS Default Domain"); ?></td> <td><a id="help_for_dns_domain_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("DNS Default Domain"); ?></td>
<td> <td>
<input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?= !empty($pconfig['dns_domain']) ? "checked=\"checked\"" : "";?> onclick="dns_domain_change()" /> <input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?= !empty($pconfig['dns_domain']) ? "checked=\"checked\"" : "";?> onclick="dns_domain_change()" />
<input name="dns_domain" type="text" id="dns_domain" size="30" value="<?=$pconfig['dns_domain'];?>" /> <input name="dns_domain" type="text" id="dns_domain" size="30" value="<?=$pconfig['dns_domain'];?>" />
<div class="hidden" for="help_for_dns_domain_enable"> <div class="hidden" for="help_for_dns_domain_enable">
<?=gettext("Provide a default domain name to clients"); ?> <?=gettext("Provide a default domain name to clients"); ?>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_dns_split_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Split DNS"); ?></td> <td><a id="help_for_dns_split_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Split DNS"); ?></td>
<td> <td>
<input name="dns_split_enable" type="checkbox" id="dns_split_enable" value="yes" <?= !empty($pconfig['dns_split']) ? "checked=\"checked\"" : "";?> onclick="dns_split_change()" /> <input name="dns_split_enable" type="checkbox" id="dns_split_enable" value="yes" <?= !empty($pconfig['dns_split']) ? "checked=\"checked\"" : "";?> onclick="dns_split_change()" />
<input name="dns_split" type="text" class="form-control unknown" id="dns_split" size="30" value="<?=$pconfig['dns_split'];?>" /> <input name="dns_split" type="text" class="form-control unknown" id="dns_split" size="30" value="<?=$pconfig['dns_split'];?>" />
<div class="hidden" for="help_for_dns_split_enable"> <div class="hidden" for="help_for_dns_split_enable">
<?=gettext("Provide a list of split DNS domain names to clients. Enter a comma separated list."); ?><br /> <?=gettext("Provide a list of split DNS domain names to clients. Enter a comma separated list."); ?><br />
<?=gettext("NOTE: If left blank, and a default domain is set, it will be used for this value."); ?> <?=gettext("NOTE: If left blank, and a default domain is set, it will be used for this value."); ?>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_dns_server_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("DNS Servers"); ?></td> <td><a id="help_for_dns_server_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("DNS Servers"); ?></td>
<td> <td>
<input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?= !empty($pconfig['dns_server1']) || !empty($pconfig['dns_server2']) || !empty($pconfig['dns_server3']) || !empty($pconfig['dns_server4']) ? "checked=\"checked\"" : "";?> onclick="dns_server_change()" /> <input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?= !empty($pconfig['dns_server1']) || !empty($pconfig['dns_server2']) || !empty($pconfig['dns_server3']) || !empty($pconfig['dns_server4']) ? "checked=\"checked\"" : "";?> onclick="dns_server_change()" />
<div id="dns_server_enable_inputs"> <div id="dns_server_enable_inputs">
<?=gettext("Server"); ?> #1: <?=gettext("Server"); ?> #1:
...@@ -465,11 +465,11 @@ function login_banner_change() { ...@@ -465,11 +465,11 @@ function login_banner_change() {
<div class="hidden" for="help_for_dns_server_enable"> <div class="hidden" for="help_for_dns_server_enable">
<?=gettext("Provide a DNS server list to clients"); ?> <?=gettext("Provide a DNS server list to clients"); ?>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_wins_server_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("WINS Servers"); ?></td> <td><a id="help_for_wins_server_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("WINS Servers"); ?></td>
<td> <td>
<input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?= !empty($pconfig['wins_server1']) || !empty($pconfig['wins_server2']) ? "checked=\"checked\"" : "";?> onclick="wins_server_change()" /> <input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?= !empty($pconfig['wins_server1']) || !empty($pconfig['wins_server2']) ? "checked=\"checked\"" : "";?> onclick="wins_server_change()" />
<div id="wins_server_enable_inputs"> <div id="wins_server_enable_inputs">
<?=gettext("Server"); ?> #1: <?=gettext("Server"); ?> #1:
...@@ -480,11 +480,11 @@ function login_banner_change() { ...@@ -480,11 +480,11 @@ function login_banner_change() {
<div class="hidden" for="help_for_wins_server_enable"> <div class="hidden" for="help_for_wins_server_enable">
<?=gettext("Provide a WINS server list to clients"); ?> <?=gettext("Provide a WINS server list to clients"); ?>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_pfs_group_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Phase2 PFS Group"); ?></td> <td><a id="help_for_pfs_group_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Phase2 PFS Group"); ?></td>
<td> <td>
<input name="pfs_group_enable" type="checkbox" id="pfs_group_enable" value="yes" <?= !empty($pconfig['pfs_group']) ? "checked=\"checked\"" : "";?> onclick="pfs_group_change()" /> <input name="pfs_group_enable" type="checkbox" id="pfs_group_enable" value="yes" <?= !empty($pconfig['pfs_group']) ? "checked=\"checked\"" : "";?> onclick="pfs_group_change()" />
<select name="pfs_group" class="form-control" id="pfs_group"> <select name="pfs_group" class="form-control" id="pfs_group">
...@@ -500,26 +500,26 @@ function login_banner_change() { ...@@ -500,26 +500,26 @@ function login_banner_change() {
<div class="hidden" for="help_for_pfs_group_enable"> <div class="hidden" for="help_for_pfs_group_enable">
<?=gettext("Provide the Phase2 PFS group to clients ( overrides all mobile phase2 settings )"); ?> <?=gettext("Provide the Phase2 PFS group to clients ( overrides all mobile phase2 settings )"); ?>
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><a id="help_for_login_banner_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Login Banner"); ?></td> <td><a id="help_for_login_banner_enable" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Login Banner"); ?></td>
<td> <td>
<input name="login_banner_enable" type="checkbox" id="login_banner_enable" value="yes" <?= !empty($pconfig['login_banner']) ? "checked=\"checked\"" : "";?> onclick="login_banner_change()" /> <input name="login_banner_enable" type="checkbox" id="login_banner_enable" value="yes" <?= !empty($pconfig['login_banner']) ? "checked=\"checked\"" : "";?> onclick="login_banner_change()" />
<textarea name="login_banner" cols="65" rows="7" id="login_banner" class="formpre"><?=$pconfig['login_banner'];?></textarea> <textarea name="login_banner" cols="65" rows="7" id="login_banner" class="formpre"><?=$pconfig['login_banner'];?></textarea>
<div class="hidden" for="help_for_login_banner_enable"> <div class="hidden" for="help_for_login_banner_enable">
<?=gettext("Provide a login banner to clients"); ?><br /> <?=gettext("Provide a login banner to clients"); ?><br />
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>
<input name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" /> <input name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save"); ?>" />
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</form> </form>
</div> </div>
</section> </section>
......
...@@ -711,7 +711,7 @@ if (isset($input_errors) && count($input_errors) > 0) { ...@@ -711,7 +711,7 @@ if (isset($input_errors) && count($input_errors) > 0) {
<input name="localid_address" type="text" id="localid_address" size="28" value="<?=$pconfig['localid_address'];?>" /> <input name="localid_address" type="text" id="localid_address" size="28" value="<?=$pconfig['localid_address'];?>" />
/ /
<select name="localid_netbits" id="localid_netbits"> <select name="localid_netbits" id="localid_netbits">
<?php for ($i = 128; $i >= 0; $i--) : <?php for ($i = 128; $i >= 0; $i--) :
?> ?>
<option value="<?=$i;?>" <?= isset($pconfig['localid_netbits']) && $i == $pconfig['localid_netbits'] ? "selected=\"selected\"" : "";?>> <option value="<?=$i;?>" <?= isset($pconfig['localid_netbits']) && $i == $pconfig['localid_netbits'] ? "selected=\"selected\"" : "";?>>
<?=$i;?> <?=$i;?>
...@@ -762,7 +762,7 @@ if (isset($input_errors) && count($input_errors) > 0) { ...@@ -762,7 +762,7 @@ if (isset($input_errors) && count($input_errors) > 0) {
</td> </td>
</tr> </tr>
<?php if (!isset($pconfig['mobile'])) : <?php if (!isset($pconfig['mobile'])) :
?> ?>
<tr id="opt_remoteid"> <tr id="opt_remoteid">
<td colspan="2"><b><?=gettext("Remote Network");?></b></td> <td colspan="2"><b><?=gettext("Remote Network");?></b></td>
...@@ -786,12 +786,12 @@ if (isset($input_errors) && count($input_errors) > 0) { ...@@ -786,12 +786,12 @@ if (isset($input_errors) && count($input_errors) > 0) {
<input name="remoteid_address" type="text" class="formfld unknown ipv4v6" id="remoteid_address" size="28" value="<?=$pconfig['remoteid_address'];?>" /> <input name="remoteid_address" type="text" class="formfld unknown ipv4v6" id="remoteid_address" size="28" value="<?=$pconfig['remoteid_address'];?>" />
/ /
<select name="remoteid_netbits" class="formselect ipv4v6" id="remoteid_netbits"> <select name="remoteid_netbits" class="formselect ipv4v6" id="remoteid_netbits">
<?php for ($i = 128; $i >= 0; $i--) : <?php for ($i = 128; $i >= 0; $i--) :
?> ?>
<option value="<?=$i;?>" <?= isset($pconfig['remoteid_netbits']) && $i == $pconfig['remoteid_netbits'] ? "selected=\"selected\"" : "";?> > <option value="<?=$i;?>" <?= isset($pconfig['remoteid_netbits']) && $i == $pconfig['remoteid_netbits'] ? "selected=\"selected\"" : "";?> >
<?=$i;?> <?=$i;?>
</option> </option>
<?php endfor; <?php endfor;
?> ?>
</select> </select>
</td> </td>
...@@ -831,18 +831,18 @@ if (isset($input_errors) && count($input_errors) > 0) { ...@@ -831,18 +831,18 @@ if (isset($input_errors) && count($input_errors) > 0) {
?> ?>
<input type="checkbox" name="ealgos[]" value="<?=$algo;?>" <?=isset($pconfig['ealgos']) && in_array($algo, $pconfig['ealgos']) ? "checked=\"checked\"" : ""; ?> /> <input type="checkbox" name="ealgos[]" value="<?=$algo;?>" <?=isset($pconfig['ealgos']) && in_array($algo, $pconfig['ealgos']) ? "checked=\"checked\"" : ""; ?> />
<?=$algodata['name'];?> <?=$algodata['name'];?>
<?php if (isset($algodata['keysel'])) : <?php if (isset($algodata['keysel'])) :
?> ?>
<select name="keylen_<?=$algo;?>" class="formselect"> <select name="keylen_<?=$algo;?>" class="formselect">
<option value="auto"><?=gettext("auto"); ?></option> <option value="auto"><?=gettext("auto"); ?></option>
<?php <?php
for ($keylen = $algodata['keysel']['hi']; $keylen >= $algodata['keysel']['lo']; $keylen -= $algodata['keysel']['step']) : for ($keylen = $algodata['keysel']['hi']; $keylen >= $algodata['keysel']['lo']; $keylen -= $algodata['keysel']['step']) :
?> ?>
<option value="<?=$keylen;?>" <?=$keylen == $pconfig["keylen_".$algo] ? "selected=\"selected\"" : "";?>><?=$keylen;?> <?=gettext("bits"); ?></option> <option value="<?=$keylen;?>" <?=$keylen == $pconfig["keylen_".$algo] ? "selected=\"selected\"" : "";?>><?=$keylen;?> <?=gettext("bits"); ?></option>
<?php <?php
endfor; ?> endfor; ?>
</select> </select>
<?php else :?> <?php else :?>
<br/> <br/>
<?php <?php
endif; ?> endif; ?>
...@@ -860,7 +860,7 @@ if (isset($input_errors) && count($input_errors) > 0) { ...@@ -860,7 +860,7 @@ if (isset($input_errors) && count($input_errors) > 0) {
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Hash algorithms"); ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Hash algorithms"); ?></td>
<td width="78%" class="vtable"> <td width="78%" class="vtable">
<?php foreach ($p2_halgos as $algo => $algoname) : <?php foreach ($p2_halgos as $algo => $algoname) :
?> ?>
<input type="checkbox" name="hash-algorithm-option[]" value="<?=$algo;?>" <?=in_array($algo, $pconfig['hash-algorithm-option']) ? "checked=\"checked\"" : "";?>/> <input type="checkbox" name="hash-algorithm-option[]" value="<?=$algo;?>" <?=in_array($algo, $pconfig['hash-algorithm-option']) ? "checked=\"checked\"" : "";?>/>
<?=$algoname;?> <?=$algoname;?>
...@@ -872,10 +872,10 @@ if (isset($input_errors) && count($input_errors) > 0) { ...@@ -872,10 +872,10 @@ if (isset($input_errors) && count($input_errors) > 0) {
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("PFS key group"); ?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("PFS key group"); ?></td>
<td> <td>
<?php if (!isset($pconfig['mobile']) || !isset($config['ipsec']['client']['pfs_group'])) : <?php if (!isset($pconfig['mobile']) || !isset($config['ipsec']['client']['pfs_group'])) :
?> ?>
<select name="pfsgroup"> <select name="pfsgroup">
<?php foreach ($p2_pfskeygroups as $keygroup => $keygroupname) : <?php foreach ($p2_pfskeygroups as $keygroup => $keygroupname) :
?> ?>
<option value="<?=$keygroup;?>" <?= $keygroup == $pconfig['pfsgroup'] ? "selected=\"selected\"" : "";?>> <option value="<?=$keygroup;?>" <?= $keygroup == $pconfig['pfsgroup'] ? "selected=\"selected\"" : "";?>>
<?=$keygroupname;?> <?=$keygroupname;?>
...@@ -920,7 +920,7 @@ if (isset($input_errors) && count($input_errors) > 0) { ...@@ -920,7 +920,7 @@ if (isset($input_errors) && count($input_errors) > 0) {
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td width="78%"> <td width="78%">
<?php if (isset($pconfig['mobile'])) : <?php if (isset($pconfig['mobile'])) :
?> ?>
<input name="mobile" type="hidden" value="true" /> <input name="mobile" type="hidden" value="true" />
<input name="remoteid_type" type="hidden" value="mobile" /> <input name="remoteid_type" type="hidden" value="mobile" />
......
...@@ -209,7 +209,7 @@ function maxmss_checked(obj) { ...@@ -209,7 +209,7 @@ function maxmss_checked(obj) {
<?php <?php
endforeach; ?> endforeach; ?>
<div class="hidden" for="help_for_ipsec_debug"> <div class="hidden" for="help_for_ipsec_debug">
<?=gettext("Launches IPSec in debug mode so that more verbose logs " . <?=gettext("Launches IPSec in debug mode so that more verbose logs " .
"will be generated to aid in troubleshooting."); ?> "will be generated to aid in troubleshooting."); ?>
</div> </div>
</td> </td>
...@@ -234,7 +234,7 @@ function maxmss_checked(obj) { ...@@ -234,7 +234,7 @@ function maxmss_checked(obj) {
<strong><?=gettext("Enable MSS clamping on VPN traffic"); ?></strong> <strong><?=gettext("Enable MSS clamping on VPN traffic"); ?></strong>
<input name="maxmss" id="maxmss" type="text" value="<?= !empty($pconfig['maxmss']) ? $pconfig['maxmss'] : "1400";?>" <?= !empty($pconfig['maxmss_enable']) ? "disabled=\"disabled\"" : "" ;?> /> <input name="maxmss" id="maxmss" type="text" value="<?= !empty($pconfig['maxmss']) ? $pconfig['maxmss'] : "1400";?>" <?= !empty($pconfig['maxmss_enable']) ? "disabled=\"disabled\"" : "" ;?> />
<div class="hidden" for="help_for_maxmss_enable"> <div class="hidden" for="help_for_maxmss_enable">
<?=gettext("Enable MSS clamping on TCP flows over VPN. " . <?=gettext("Enable MSS clamping on TCP flows over VPN. " .
"This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "); ?> "This helps overcome problems with PMTUD on IPsec VPN links. If left blank, the default value is 1400 bytes. "); ?>
</div> </div>
</td> </td>
......
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