summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_ipsec_phase2.php
diff options
context:
space:
mode:
authorColin Fleming <cj_fleming@sky.com>2014-05-08 23:25:08 +0100
committerColin Fleming <cj_fleming@sky.com>2014-05-08 23:25:08 +0100
commit3a50eb39a6453d0a7564a2c84037555ad22ae980 (patch)
tree8b825c8709dcec05a43b23c9dc434503aed2f8b2 /usr/local/www/vpn_ipsec_phase2.php
parent0a15a38d75ebebdeda4727580e82290e87663816 (diff)
downloadpfsense-3a50eb39a6453d0a7564a2c84037555ad22ae980.zip
pfsense-3a50eb39a6453d0a7564a2c84037555ad22ae980.tar.gz
Tidy up "vpn_ipsec_phase2.php" XHTML
Move script after the FBEGIN.INC include Add CDATA sections to SCRIPTS Add SUMMARY to TABLES Close INPUT tags Update HTML Boolean operators
Diffstat (limited to 'usr/local/www/vpn_ipsec_phase2.php')
-rw-r--r--usr/local/www/vpn_ipsec_phase2.php103
1 files changed, 51 insertions, 52 deletions
diff --git a/usr/local/www/vpn_ipsec_phase2.php b/usr/local/www/vpn_ipsec_phase2.php
index 3958707..382030b 100644
--- a/usr/local/www/vpn_ipsec_phase2.php
+++ b/usr/local/www/vpn_ipsec_phase2.php
@@ -324,10 +324,10 @@ include("head.inc");
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<script type="text/javascript" src="/javascript/jquery.ipv4v6ify.js"></script>
<?php include("fbegin.inc"); ?>
+<script type="text/javascript" src="/javascript/jquery.ipv4v6ify.js"></script>
<script type="text/javascript">
-<!--
+//<![CDATA[
function change_mode() {
index = document.iform.mode.selectedIndex;
@@ -477,7 +477,7 @@ function change_protocol() {
document.getElementById('opt_enc').style.display = 'none';
}
-//-->
+//]]>
</script>
<form action="vpn_ipsec_phase2.php" method="post" name="iform" id="iform">
@@ -487,7 +487,7 @@ function change_protocol() {
print_input_errors($input_errors);
?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
+<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="vpn ipsec phase-2">
<tr class="tabnavtbl">
<td id="tabnav">
<?php
@@ -503,11 +503,11 @@ function change_protocol() {
<tr>
<td id="mainarea">
<div class="tabcont">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Disabled"); ?></td>
<td width="78%" class="vtable">
- <input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
+ <input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked=\"checked\""; ?> />
<strong><?=gettext("Disable this phase2 entry"); ?></strong>
<br />
<span class="vexpl"><?=gettext("Set this option to disable this phase2 entry without " .
@@ -518,12 +518,12 @@ function change_protocol() {
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Mode"); ?></td>
<td width="78%" class="vtable">
- <select name="mode" class="formselect" onChange="change_mode()">
+ <select name="mode" class="formselect" onchange="change_mode()">
<?php
foreach($p2_modes as $name => $value):
$selected = "";
if ($name == $pconfig['mode'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$name;?>" <?=$selected;?>><?=$value;?></option>
<?php endforeach; ?>
@@ -533,19 +533,19 @@ function change_protocol() {
<tr id="opt_localid">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Local Network"); ?></td>
<td width="78%" class="vtable">
- <table border="0" cellspacing="0" cellpadding="0">
+ <table border="0" cellspacing="0" cellpadding="0" summary="local network">
<tr>
<td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td></td>
<td>
- <select name="localid_type" class="formselect" onChange="typesel_change_local()">
- <option value="address" <?php if ($pconfig['localid_type'] == "address") echo "selected";?>><?=gettext("Address"); ?></option>
- <option value="network" <?php if ($pconfig['localid_type'] == "network") echo "selected";?>><?=gettext("Network"); ?></option>
+ <select name="localid_type" class="formselect" onchange="typesel_change_local()">
+ <option value="address" <?php if ($pconfig['localid_type'] == "address") echo "selected=\"selected\"";?>><?=gettext("Address"); ?></option>
+ <option value="network" <?php if ($pconfig['localid_type'] == "network") echo "selected=\"selected\"";?>><?=gettext("Network"); ?></option>
<?php
$iflist = get_configured_interface_with_descr();
foreach ($iflist as $ifname => $ifdescr):
?>
- <option value="<?=$ifname; ?>" <?php if ($pconfig['localid_type'] == $ifname ) echo "selected";?>><?=sprintf(gettext("%s subnet"), $ifdescr); ?></option>
+ <option value="<?=$ifname; ?>" <?php if ($pconfig['localid_type'] == $ifname ) echo "selected=\"selected\"";?>><?=sprintf(gettext("%s subnet"), $ifdescr); ?></option>
<?php endforeach; ?>
</select>
</td>
@@ -554,11 +554,11 @@ function change_protocol() {
<td><?=gettext("Address:");?>&nbsp;&nbsp;</td>
<td><?=$mandfldhtmlspc;?></td>
<td>
- <input name="localid_address" type="text" class="formfld unknown ipv4v6" id="localid_address" size="28" value="<?=htmlspecialchars($pconfig['localid_address']);?>">
+ <input name="localid_address" type="text" class="formfld unknown ipv4v6" id="localid_address" size="28" value="<?=htmlspecialchars($pconfig['localid_address']);?>" />
/
<select name="localid_netbits" class="formselect ipv4v6" id="localid_netbits">
<?php for ($i = 128; $i >= 0; $i--): ?>
- <option value="<?=$i;?>" <?php if (isset($pconfig['localid_netbits']) && $i == $pconfig['localid_netbits']) echo "selected"; ?>>
+ <option value="<?=$i;?>" <?php if (isset($pconfig['localid_netbits']) && $i == $pconfig['localid_netbits']) echo "selected=\"selected\""; ?>>
<?=$i;?>
</option>
<?php endfor; ?>
@@ -573,16 +573,16 @@ function change_protocol() {
<td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td></td>
<td>
- <select name="natlocalid_type" class="formselect" onChange="typesel_change_natlocal()">
- <option value="address" <?php if ($pconfig['natlocalid_type'] == "address") echo "selected";?>><?=gettext("Address"); ?></option>
- <option value="network" <?php if ($pconfig['natlocalid_type'] == "network") echo "selected";?>><?=gettext("Network"); ?></option>
+ <select name="natlocalid_type" class="formselect" onchange="typesel_change_natlocal()">
+ <option value="address" <?php if ($pconfig['natlocalid_type'] == "address") echo "selected=\"selected\"";?>><?=gettext("Address"); ?></option>
+ <option value="network" <?php if ($pconfig['natlocalid_type'] == "network") echo "selected=\"selected\"";?>><?=gettext("Network"); ?></option>
<?php
$iflist = get_configured_interface_with_descr();
foreach ($iflist as $ifname => $ifdescr):
?>
- <option value="<?=$ifname; ?>" <?php if ($pconfig['natlocalid_type'] == $ifname ) echo "selected";?>><?=sprintf(gettext("%s subnet"), $ifdescr); ?></option>
+ <option value="<?=$ifname; ?>" <?php if ($pconfig['natlocalid_type'] == $ifname ) echo "selected=\"selected\"";?>><?=sprintf(gettext("%s subnet"), $ifdescr); ?></option>
<?php endforeach; ?>
- <option value="none" <?php if (empty($pconfig['natlocalid_type']) || $pconfig['natlocalid_type'] == "none" ) echo "selected";?>><?=gettext("None"); ?></option>
+ <option value="none" <?php if (empty($pconfig['natlocalid_type']) || $pconfig['natlocalid_type'] == "none" ) echo "selected=\"selected\"";?>><?=gettext("None"); ?></option>
</select>
</td>
</tr>
@@ -590,11 +590,11 @@ function change_protocol() {
<td><?=gettext("Address:");?>&nbsp;&nbsp;</td>
<td><?=$mandfldhtmlspc;?></td>
<td>
- <input name="natlocalid_address" type="text" class="formfld unknown ipv4v6" id="natlocalid_address" size="28" value="<?=htmlspecialchars($pconfig['natlocalid_address']);?>">
+ <input name="natlocalid_address" type="text" class="formfld unknown ipv4v6" id="natlocalid_address" size="28" value="<?=htmlspecialchars($pconfig['natlocalid_address']);?>" />
/
<select name="natlocalid_netbits" class="formselect ipv4v6" id="natlocalid_netbits">
<?php for ($i = 128; $i >= 0; $i--): ?>
- <option value="<?=$i;?>" <?php if (isset($pconfig['natlocalid_netbits']) && $i == $pconfig['natlocalid_netbits']) echo "selected"; ?>>
+ <option value="<?=$i;?>" <?php if (isset($pconfig['natlocalid_netbits']) && $i == $pconfig['natlocalid_netbits']) echo "selected=\"selected\""; ?>>
<?=$i;?>
</option>
<?php endfor; ?>
@@ -610,14 +610,14 @@ function change_protocol() {
<tr id="opt_remoteid">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Remote Network"); ?></td>
<td width="78%" class="vtable">
- <table border="0" cellspacing="0" cellpadding="0">
+ <table border="0" cellspacing="0" cellpadding="0" summary="remote network">
<tr>
<td><?=gettext("Type"); ?>:&nbsp;&nbsp;</td>
<td></td>
<td>
- <select name="remoteid_type" class="formselect" onChange="typesel_change_remote()">
- <option value="address" <?php if ($pconfig['remoteid_type'] == "address") echo "selected"; ?>><?=gettext("Address"); ?></option>
- <option value="network" <?php if ($pconfig['remoteid_type'] == "network") echo "selected"; ?>><?=gettext("Network"); ?></option>
+ <select name="remoteid_type" class="formselect" onchange="typesel_change_remote()">
+ <option value="address" <?php if ($pconfig['remoteid_type'] == "address") echo "selected=\"selected\""; ?>><?=gettext("Address"); ?></option>
+ <option value="network" <?php if ($pconfig['remoteid_type'] == "network") echo "selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
</select>
</td>
</tr>
@@ -625,13 +625,13 @@ function change_protocol() {
<td><?=gettext("Address"); ?>:&nbsp;&nbsp;</td>
<td><?=$mandfldhtmlspc;?></td>
<td>
- <input name="remoteid_address" type="text" class="formfld unknown ipv4v6" id="remoteid_address" size="28" value="<?=htmlspecialchars($pconfig['remoteid_address']);?>">
+ <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--) {
echo "<option value=\"{$i}\"";
- if (isset($pconfig['remoteid_netbits']) && $i == $pconfig['remoteid_netbits']) echo " selected";
+ if (isset($pconfig['remoteid_netbits']) && $i == $pconfig['remoteid_netbits']) echo " selected=\"selected\"";
echo ">{$i}</option>\n";
} ?>
</select>
@@ -646,7 +646,7 @@ function change_protocol() {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
- <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
+ <input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>" />
<br />
<span class="vexpl">
<?=gettext("You may enter a description here " .
@@ -665,9 +665,9 @@ function change_protocol() {
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol"); ?></td>
<td width="78%" class="vtable">
- <select name="proto" class="formselect" onChange="change_protocol()">
+ <select name="proto" class="formselect" onchange="change_protocol()">
<?php foreach ($p2_protos as $proto => $protoname): ?>
- <option value="<?=$proto;?>" <?php if ($proto == $pconfig['proto']) echo "selected"; ?>>
+ <option value="<?=$proto;?>" <?php if ($proto == $pconfig['proto']) echo "selected=\"selected\""; ?>>
<?=htmlspecialchars($protoname);?>
</option>
<?php endforeach; ?>
@@ -681,16 +681,16 @@ function change_protocol() {
<tr id="opt_enc">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Encryption algorithms"); ?></td>
<td width="78%" class="vtable">
- <table border="0" cellspacing="0" cellpadding="0">
+ <table border="0" cellspacing="0" cellpadding="0" summary="encryption">
<?php
foreach ($p2_ealgos as $algo => $algodata):
$checked = '';
if (is_array($pconfig['ealgos']) && in_array($algo,$pconfig['ealgos']))
- $checked = " checked";
+ $checked = " checked=\"checked\"";
?>
<tr>
<td>
- <input type="checkbox" name="ealgos[]" value="<?=$algo;?>"<?=$checked?>>
+ <input type="checkbox" name="ealgos[]" value="<?=$algo;?>"<?=$checked?> />
</td>
<td>
<?=htmlspecialchars($algodata['name']);?>
@@ -705,10 +705,10 @@ function change_protocol() {
$key_lo = $algodata['keysel']['lo'];
$key_step = $algodata['keysel']['step'];
for ($keylen = $key_hi; $keylen >= $key_lo; $keylen -= $key_step):
- $selected = '';
+ $selected = "";
// if ($checked && in_array("keylen_".$algo,$pconfig))
if ($keylen == $pconfig["keylen_".$algo])
- $selected = " selected";
+ $selected = " selected=\"selected\"";
?>
<option value="<?=$keylen;?>"<?=$selected;?>><?=$keylen;?> <?=gettext("bits"); ?></option>
<?php endfor; ?>
@@ -730,7 +730,7 @@ function change_protocol() {
<td width="22%" valign="top" class="vncellreq"><?=gettext("Hash algorithms"); ?></td>
<td width="78%" class="vtable">
<?php foreach ($p2_halgos as $algo => $algoname): ?>
- <input type="checkbox" name="halgos[]" value="<?=$algo;?>" <?php if (in_array($algo, $pconfig['halgos'])) echo "checked"; ?>>
+ <input type="checkbox" name="halgos[]" value="<?=$algo;?>" <?php if (in_array($algo, $pconfig['halgos'])) echo "checked=\"checked\""; ?> />
<?=htmlspecialchars($algoname);?>
<br />
<?php endforeach; ?>
@@ -742,7 +742,7 @@ function change_protocol() {
<?php if (!isset($pconfig['mobile']) || !isset($a_client['pfs_group'])): ?>
<select name="pfsgroup" class="formselect">
<?php foreach ($p2_pfskeygroups as $keygroup => $keygroupname): ?>
- <option value="<?=$keygroup;?>" <?php if ($keygroup == $pconfig['pfsgroup']) echo "selected"; ?>>
+ <option value="<?=$keygroup;?>" <?php if ($keygroup == $pconfig['pfsgroup']) echo "selected=\"selected\""; ?>>
<?=htmlspecialchars($keygroupname);?>
</option>
<?php endforeach; ?>
@@ -750,10 +750,10 @@ function change_protocol() {
<br />
<?php else: ?>
- <select class="formselect" disabled>
- <option selected><?=$p2_pfskeygroups[$a_client['pfs_group']];?></option>
+ <select class="formselect" disabled="disabled">
+ <option selected="selected"><?=$p2_pfskeygroups[$a_client['pfs_group']];?></option>
</select>
- <input name="pfsgroup" type="hidden" value="<?=htmlspecialchars($pconfig['pfsgroup']);?>">
+ <input name="pfsgroup" type="hidden" value="<?=htmlspecialchars($pconfig['pfsgroup']);?>" />
<br />
<span class="vexpl"><em><?=gettext("Set globally in mobile client options"); ?></em></span>
<?php endif; ?>
@@ -762,7 +762,7 @@ function change_protocol() {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Lifetime"); ?></td>
<td width="78%" class="vtable">
- <input name="lifetime" type="text" class="formfld unknown" id="lifetime" size="20" value="<?=htmlspecialchars($pconfig['lifetime']);?>">
+ <input name="lifetime" type="text" class="formfld unknown" id="lifetime" size="20" value="<?=htmlspecialchars($pconfig['lifetime']);?>" />
<?=gettext("seconds"); ?>
</td>
</tr>
@@ -775,7 +775,7 @@ function change_protocol() {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Automatically ping host"); ?></td>
<td width="78%" class="vtable">
- <input name="pinghost" type="text" class="formfld unknown" id="pinghost" size="28" value="<?=htmlspecialchars($pconfig['pinghost']);?>">
+ <input name="pinghost" type="text" class="formfld unknown" id="pinghost" size="28" value="<?=htmlspecialchars($pconfig['pinghost']);?>" />
<?=gettext("IP address"); ?>
</td>
</tr>
@@ -783,14 +783,14 @@ function change_protocol() {
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<?php if (isset($p2index) && $a_phase2[$p2index]): ?>
- <input name="p2index" type="hidden" value="<?=htmlspecialchars($p2index);?>">
+ <input name="p2index" type="hidden" value="<?=htmlspecialchars($p2index);?>" />
<?php endif; ?>
<?php if ($pconfig['mobile']): ?>
- <input name="mobile" type="hidden" value="true">
- <input name="remoteid_type" type="hidden" value="mobile">
+ <input name="mobile" type="hidden" value="true" />
+ <input name="remoteid_type" type="hidden" value="mobile" />
<?php endif; ?>
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
- <input name="ikeid" type="hidden" value="<?=htmlspecialchars($pconfig['ikeid']);?>">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" />
+ <input name="ikeid" type="hidden" value="<?=htmlspecialchars($pconfig['ikeid']);?>" />
</td>
</tr>
</table>
@@ -799,8 +799,8 @@ function change_protocol() {
</tr>
</table>
</form>
-<script lannguage="JavaScript">
-<!--
+<script type="text/javascript">
+//<![CDATA[
change_mode('<?=htmlspecialchars($pconfig['mode'])?>');
change_protocol('<?=htmlspecialchars($pconfig['proto'])?>');
typesel_change_local(<?=htmlspecialchars($pconfig['localid_netbits'])?>);
@@ -808,7 +808,7 @@ typesel_change_natlocal(<?=htmlspecialchars($pconfig['natlocalid_netbits'])?>);
<?php if (!isset($pconfig['mobile'])): ?>
typesel_change_remote(<?=htmlspecialchars($pconfig['remoteid_netbits'])?>);
<?php endif; ?>
-//-->
+//]]>
</script>
<?php include("fend.inc"); ?>
</body>
@@ -887,4 +887,3 @@ function idinfo_to_pconfig($prefix,& $idinfo,& $pconfig) {
}
?>
-
OpenPOWER on IntegriCloud