diff options
author | N0YB <Al_Stu@Frontier.com> | 2014-03-06 19:03:32 -0800 |
---|---|---|
committer | N0YB <Al_Stu@Frontier.com> | 2014-03-06 19:03:32 -0800 |
commit | c58a9ec3f1035bdb543aadf3ccff50812e24921f (patch) | |
tree | af62064f1af4988eeabbf202566180ca28fd60a7 /usr | |
parent | f3e65ef46e879c695713c6e78378adf5fbace173 (diff) | |
download | pfsense-c58a9ec3f1035bdb543aadf3ccff50812e24921f.zip pfsense-c58a9ec3f1035bdb543aadf3ccff50812e24921f.tar.gz |
XHTML Compliance
VPN - IPsec - Tunnels
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/vpn_ipsec.php | 46 | ||||
-rw-r--r-- | usr/local/www/vpn_ipsec_phase1.php | 135 | ||||
-rw-r--r-- | usr/local/www/vpn_ipsec_phase2.php | 98 |
3 files changed, 140 insertions, 139 deletions
diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php index 9031e34..d3ee3b6 100755 --- a/usr/local/www/vpn_ipsec.php +++ b/usr/local/www/vpn_ipsec.php @@ -136,7 +136,7 @@ include("head.inc"); 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.")); + 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.")); ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> @@ -159,7 +159,7 @@ include("head.inc"); <table border="0" cellspacing="2" cellpadding="0"> <tr> <td> - <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked";?>> + <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\"";?>/> </td> <td> <strong><?=gettext("Enable IPsec"); ?></strong> @@ -170,7 +170,7 @@ include("head.inc"); </tr> <tr> <td> - <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"> + <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"/> </td> </tr> </table> @@ -217,9 +217,9 @@ include("head.inc"); $if = "WAN"; if (!isset($ph1ent['mobile'])) - echo $if."<br>".$ph1ent['remote-gateway']; + echo $if."<br />".$ph1ent['remote-gateway']; else - echo $if."<br><strong>" . gettext("Mobile Client") . "</strong>"; + echo $if."<br /><strong>" . gettext("Mobile Client") . "</strong>"; ?> <?=$spane;?> </td> @@ -251,17 +251,17 @@ include("head.inc"); <?=htmlspecialchars($ph1ent['descr']);?> <?=$spane;?> </td> - <td valign="middle" nowrap class="list"> + <td valign="middle" nowrap="nowrap" class="list"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td> <a href="vpn_ipsec_phase1.php?p1index=<?=$i;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase1 entry"); ?>" alt="" width="17" height="17" border="0"/> </a> </td> <td> <a href="vpn_ipsec.php?act=delph1&p1index=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase1 and all associated phase2 entries?"); ?>')"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase1 entry"); ?>" alt="" width="17" height="17" border="0"/> </a> </td> </tr> @@ -271,7 +271,7 @@ include("head.inc"); </td> <td> <a href="vpn_ipsec_phase1.php?dup=<?=$i;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("copy phase1 entry"); ?>" alt="" width="17" height="17" border="0"/> </a> </td> </tr> @@ -306,7 +306,7 @@ include("head.inc"); <td class="listhdrr"><?=gettext("P2 Auth Methods"); ?></td> <td class ="list"> <a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid'];?><?php if (isset($ph1ent['mobile'])) echo "&mobile=true";?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase2 entry"); ?>" alt="" width="17" height="17" border="0"/> </a> </td> </tr> @@ -327,29 +327,29 @@ include("head.inc"); ?> <tr valign="top" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$j;?>'"> - <td nowrap class="listlr"> + <td nowrap="nowrap" class="listlr"> <?=$spans;?> <?=$ph2ent['mode'];?> <?=$spane;?> </td> <?php if(($ph2ent['mode'] <> "tunnel") and ($ph2ent['mode'] <> "tunnel6")) { - echo "<td nowrap class=\"listr\"> </td><td nowrap class=\"listr\"> </td>"; + echo "<td nowrap=\"nowrap\" class=\"listr\"> </td><td nowrap=\"nowrap\" class=\"listr\"> </td>"; } ?> <?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?> - <td nowrap class="listr"> + <td nowrap="nowrap" class="listr"> <?=$spans;?> <?=ipsec_idinfo_to_text($ph2ent['localid']); ?> <?=$spane;?> </td> - <td nowrap class="listr"> + <td nowrap="nowrap" class="listr"> <?=$spans;?> <?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?> <?=$spane;?> </td> <?php endif; ?> - <td nowrap class="listr"> + <td nowrap="nowrap" class="listr"> <?=$spans;?> <?php echo $p2_protos[$ph2ent['protocol']]; ?> <?=$spane;?> @@ -372,7 +372,7 @@ include("head.inc"); ?> <?=$spane;?> </td> - <td nowrap class="listr"> + <td nowrap="nowrap" class="listr"> <?=$spans;?> <?php $k = 0; @@ -384,15 +384,15 @@ include("head.inc"); ?> <?=$spane;?> </td> - <td nowrap class="list"> + <td nowrap="nowrap" class="list"> <a href="vpn_ipsec_phase2.php?p2index=<?=$j;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit phase2 entry"); ?>" alt="" width="17" height="17" border="0"/> </a> <a href="vpn_ipsec.php?act=delph2&p1index=<?=$i;?>&p2index=<?=$j;?>" onclick="return confirm('<?=gettext("Do you really want to delete this phase2 entry?"); ?>')"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete phase2 entry"); ?>" alt="" width="17" height="17" border="0"/> </a> <a href="vpn_ipsec_phase2.php?dup=<?=$j;?>"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new Phase 2 based on this one"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new Phase 2 based on this one"); ?>" alt="" width="17" height="17" border="0"/> </a> </td> </tr> @@ -423,19 +423,19 @@ include("head.inc"); <td width="17"></td> <td> <a href="vpn_ipsec_phase1.php"> - <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase1 entry"); ?>" width="17" height="17" border="0"> + <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add phase1 entry"); ?>" alt="" width="17" height="17" border="0"/> </a> </td> </tr> </table> - <td> + </td> </tr> <tr> <td colspan="4"> <p> <span class="vexpl"> <span class="red"> - <strong><?=gettext("Note"); ?>:<br></strong> + <strong><?=gettext("Note"); ?>:<br /></strong> </span> <?=gettext("You can check your IPsec status at"); ?> <a href="diag_ipsec.php"><?=gettext("Status:IPsec"); ?></a>.<br/> <?=gettext("IPsec Debug Mode can be enabled at"); ?> <a href="system_advanced_misc.php"><?=gettext("System:Advanced:Miscellaneous"); ?></a>.<br/> diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php index a72b908..9d850df 100644 --- a/usr/local/www/vpn_ipsec_phase1.php +++ b/usr/local/www/vpn_ipsec_phase1.php @@ -393,7 +393,7 @@ include("head.inc"); <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<script language="JavaScript"> +<script type="text/JavaScript"> <!-- function myidsel_change() { @@ -541,8 +541,8 @@ function dpdchkbox_change() { <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"; ?>> - <strong><?=gettext("Disable this phase1 entry"); ?></strong><br> + <input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked=\"checked\""; ?>/> + <strong><?=gettext("Disable this phase1 entry"); ?></strong><br /> <span class="vexpl"> <?=gettext("Set this option to disable this phase1 without " . "removing it from the list"); ?>. @@ -557,11 +557,11 @@ function dpdchkbox_change() { $protocols = array("inet" => "IPv4", "inet6" => "IPv6"); foreach ($protocols as $protocol => $name): ?> - <option value="<?=$protocol;?>" <?php if ($protocol == $pconfig['protocol']) echo "selected"; ?>> + <option value="<?=$protocol;?>" <?php if ($protocol == $pconfig['protocol']) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($name);?> </option> <?php endforeach; ?> - </select> <br> <span class="vexpl"><?=gettext("Select the Internet Protocol family from this dropdown"); ?>.</span> + </select> <br /> <span class="vexpl"><?=gettext("Select the Internet Protocol family from this dropdown"); ?>.</span> </td> </tr> <tr> @@ -591,12 +591,12 @@ function dpdchkbox_change() { foreach ($interfaces as $iface => $ifacename): ?> - <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>> + <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($ifacename);?> </option> <?php endforeach; ?> </select> - <br> + <br /> <span class="vexpl"><?=gettext("Select the interface for the local endpoint of this phase1 entry"); ?>.</span> </td> </tr> @@ -606,8 +606,8 @@ function dpdchkbox_change() { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote gateway"); ?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="remotegw" type="text" class="formfld unknown" id="remotegw" size="28" value="<?=htmlspecialchars($pconfig['remotegw']);?>"> - <br> + <?=$mandfldhtml;?><input name="remotegw" type="text" class="formfld unknown" id="remotegw" size="28" value="<?=htmlspecialchars($pconfig['remotegw']);?>"/> + <br /> <?=gettext("Enter the public IP address or host name of the remote gateway"); ?> </td> </tr> @@ -617,8 +617,8 @@ function dpdchkbox_change() { <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']);?>"> - <br> + <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 " . "for your reference (not parsed)"); ?>. @@ -636,18 +636,18 @@ function dpdchkbox_change() { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication method"); ?></td> <td width="78%" class="vtable"> - <select name="authentication_method" class="formselect" onChange="methodsel_change()"> + <select name="authentication_method" class="formselect" onchange="methodsel_change()"> <?php foreach ($p1_authentication_methods as $method_type => $method_params): if (!$pconfig['mobile'] && $method_params['mobile']) continue; ?> - <option value="<?=$method_type;?>" <?php if ($method_type == $pconfig['authentication_method']) echo "selected"; ?>> + <option value="<?=$method_type;?>" <?php if ($method_type == $pconfig['authentication_method']) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($method_params['name']);?> </option> <?php endforeach; ?> </select> - <br> + <br /> <span class="vexpl"> <?=gettext("Must match the setting chosen on the remote side"); ?>. </span> @@ -661,41 +661,41 @@ function dpdchkbox_change() { $modes = array("main","aggressive","base"); foreach ($modes as $mode): ?> - <option value="<?=$mode;?>" <?php if ($mode == $pconfig['mode']) echo "selected"; ?>> + <option value="<?=$mode;?>" <?php if ($mode == $pconfig['mode']) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($mode);?> </option> <?php endforeach; ?> - </select> <br> <span class="vexpl"><?=gettext("Aggressive is more flexible, but less secure"); ?>.</span> + </select> <br /> <span class="vexpl"><?=gettext("Aggressive is more flexible, but less secure"); ?>.</span> </td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("My identifier"); ?></td> <td width="78%" class="vtable"> - <select name="myid_type" class="formselect" onChange="myidsel_change()"> + <select name="myid_type" class="formselect" onchange="myidsel_change()"> <?php foreach ($my_identifier_list as $id_type => $id_params): ?> - <option value="<?=$id_type;?>" <?php if ($id_type == $pconfig['myid_type']) echo "selected"; ?>> + <option value="<?=$id_type;?>" <?php if ($id_type == $pconfig['myid_type']) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($id_params['desc']);?> </option> <?php endforeach; ?> </select> - <input name="myid_data" type="text" class="formfld unknown" id="myid_data" size="30" value="<?=htmlspecialchars($pconfig['myid_data']);?>"> + <input name="myid_data" type="text" class="formfld unknown" id="myid_data" size="30" value="<?=htmlspecialchars($pconfig['myid_data']);?>"/> </td> </tr> <tr id="opt_peerid"> <td width="22%" valign="top" class="vncellreq"><?=gettext("Peer identifier"); ?></td> <td width="78%" class="vtable"> - <select name="peerid_type" class="formselect" onChange="peeridsel_change()"> + <select name="peerid_type" class="formselect" onchange="peeridsel_change()"> <?php foreach ($peer_identifier_list as $id_type => $id_params): if ($pconfig['mobile'] && !$id_params['mobile']) continue; ?> - <option value="<?=$id_type;?>" <?php if ($id_type == $pconfig['peerid_type']) echo "selected"; ?>> + <option value="<?=$id_type;?>" <?php if ($id_type == $pconfig['peerid_type']) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($id_params['desc']);?> </option> <?php endforeach; ?> </select> - <input name="peerid_data" type="text" class="formfld unknown" id="peerid_data" size="30" value="<?=htmlspecialchars($pconfig['peerid_data']);?>"> + <input name="peerid_data" type="text" class="formfld unknown" id="peerid_data" size="30" value="<?=htmlspecialchars($pconfig['peerid_data']);?>"/> <span id="opt_verify_identifier"> <input id="verify_identifier" name="verify_identifier" type="checkbox" value="yes" <?php if ($pconfig['verify_identifier']) echo "checked=\"checked\""; ?> /> <span class="vexpl"><?=gettext("Verify peer's identifier"); ?>.</span> @@ -709,9 +709,9 @@ function dpdchkbox_change() { <td width="22%" valign="top" class="vncellreq"><?=gettext("Pre-Shared Key"); ?></td> <td width="78%" class="vtable"> <?=$mandfldhtml;?> - <input name="pskey" type="text" class="formfld unknown" id="pskey" size="40" value="<?=htmlspecialchars($pconfig['pskey']);?>"> + <input name="pskey" type="text" class="formfld unknown" id="pskey" size="40" value="<?=htmlspecialchars($pconfig['pskey']);?>"/> <span class="vexpl"> - <br> + <br /> <?=gettext("Input your Pre-Shared Key string"); ?>. </span> </td> @@ -720,13 +720,13 @@ function dpdchkbox_change() { <td width="22%" valign="top" class="vncellreq"><?=gettext("Policy Generation"); ?></td> <td width="78%" class="vtable"> <select name="generate_policy" class="formselect"> - <option value="" <?php if (empty($pconfig['generate_policy'])) echo "selected"; ?>>Default</option> - <option value="on" <?php if ($pconfig['generate_policy'] == "on") echo "selected"; ?>>On</option> - <option value="off" <?php if ($pconfig['generate_policy'] == "off") echo "selected"; ?>>Off</option> - <option value="require" <?php if ($pconfig['generate_policy'] == "require") echo "selected"; ?>>Require</option> - <option value="unique" <?php if ($pconfig['generate_policy'] == "unique") echo "selected"; ?>>Unique</option> + <option value="" <?php if (empty($pconfig['generate_policy'])) echo "selected=\"selected\""; ?>>Default</option> + <option value="on" <?php if ($pconfig['generate_policy'] == "on") echo "selected=\"selected\""; ?>>On</option> + <option value="off" <?php if ($pconfig['generate_policy'] == "off") echo "selected=\"selected\""; ?>>Off</option> + <option value="require" <?php if ($pconfig['generate_policy'] == "require") echo "selected=\"selected\""; ?>>Require</option> + <option value="unique" <?php if ($pconfig['generate_policy'] == "unique") echo "selected=\"selected\""; ?>>Unique</option> </select> - <br> + <br /> <span class="vexpl"> <?=gettext("When working as a responder (as with mobile clients), this controls how policies are generated based on SA proposals."); ?> </span> @@ -736,13 +736,13 @@ function dpdchkbox_change() { <td width="22%" valign="top" class="vncellreq"><?=gettext("Proposal Checking"); ?></td> <td width="78%" class="vtable"> <select name="proposal_check" class="formselect"> - <option value="" <?php if (empty($pconfig['proposal_check'])) echo "selected"; ?>>Default</option> - <option value="obey" <?php if ($pconfig['proposal_check'] == "obey") echo "selected"; ?>>Obey</option> - <option value="strict" <?php if ($pconfig['proposal_check'] == "strict") echo "selected"; ?>>Strict</option> - <option value="claim" <?php if ($pconfig['proposal_check'] == "claim") echo "selected"; ?>>Claim</option> - <option value="exact" <?php if ($pconfig['proposal_check'] == "exact") echo "selected"; ?>>Exact</option> + <option value="" <?php if (empty($pconfig['proposal_check'])) echo "selected=\"selected\""; ?>>Default</option> + <option value="obey" <?php if ($pconfig['proposal_check'] == "obey") echo "selected=\"selected\""; ?>>Obey</option> + <option value="strict" <?php if ($pconfig['proposal_check'] == "strict") echo "selected=\"selected\""; ?>>Strict</option> + <option value="claim" <?php if ($pconfig['proposal_check'] == "claim") echo "selected=\"selected\""; ?>>Claim</option> + <option value="exact" <?php if ($pconfig['proposal_check'] == "exact") echo "selected=\"selected\""; ?>>Exact</option> </select> - <br> + <br /> <span class="vexpl"> <?=gettext("Specifies the action of lifetime length, key length, and PFS of the phase 2 selection on the responder side, and the action of lifetime check in phase 1."); ?> </span> @@ -751,19 +751,20 @@ function dpdchkbox_change() { <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Encryption algorithm"); ?></td> <td width="78%" class="vtable"> - <select name="ealgo" class="formselect" onChange="ealgosel_change()"> + <select name="ealgo" class="formselect" onchange="ealgosel_change()"> <?php foreach ($p1_ealgos as $algo => $algodata): $selected = ''; if ($algo == $pconfig['ealgo']['name']) - $selected = ' selected'; + $selected = 'selected="selected"'; ?> - <option value="<?=$algo;?>"<?=$selected?>> + <option value="<?=$algo;?>" <?=$selected?>> <?=htmlspecialchars($algodata['name']);?> </option> <?php endforeach; ?> </select> - <select name="ealgo_keylen" width="30" class="formselect"> + <select name="ealgo_keylen" style="width:30" class="formselect"> + <option></option> </select> </td> </tr> @@ -772,12 +773,12 @@ function dpdchkbox_change() { <td width="78%" class="vtable"> <select name="halgo" class="formselect"> <?php foreach ($p1_halgos as $algo => $algoname): ?> - <option value="<?=$algo;?>" <?php if ($algo == $pconfig['halgo']) echo "selected"; ?>> + <option value="<?=$algo;?>" <?php if ($algo == $pconfig['halgo']) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($algoname);?> </option> <?php endforeach; ?> </select> - <br> + <br /> <span class="vexpl"> <?=gettext("Must match the setting chosen on the remote side"); ?>. </span> @@ -788,12 +789,12 @@ function dpdchkbox_change() { <td width="78%" class="vtable"> <select name="dhgroup" class="formselect"> <?php foreach ($p1_dhgroups as $keygroup => $keygroupname): ?> - <option value="<?=$keygroup;?>" <?php if ($keygroup == $pconfig['dhgroup']) echo "selected"; ?>> + <option value="<?=$keygroup;?>" <?php if ($keygroup == $pconfig['dhgroup']) echo "selected=\"selected\""; ?>> <?=htmlspecialchars($keygroupname);?> </option> <?php endforeach; ?> </select> - <br> + <br /> <span class="vexpl"> <?=gettext("Must match the setting chosen on the remote side"); ?>. </span> @@ -802,7 +803,7 @@ function dpdchkbox_change() { <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> @@ -814,12 +815,12 @@ function dpdchkbox_change() { foreach ($config['cert'] as $cert): $selected = ""; if ($pconfig['certref'] == $cert['refid']) - $selected = "selected"; + $selected = "selected=\"selected\""; ?> <option value="<?=$cert['refid'];?>" <?=$selected;?>><?=$cert['descr'];?></option> <?php endforeach; ?> </select> - <br> + <br /> <span class="vexpl"> <?=gettext("Select a certificate previously configured in the Certificate Manager"); ?>. </span> @@ -833,12 +834,12 @@ function dpdchkbox_change() { foreach ($config['ca'] as $ca): $selected = ""; if ($pconfig['caref'] == $ca['refid']) - $selected = "selected"; + $selected = "selected=\"selected\""; ?> <option value="<?=$ca['refid'];?>" <?=$selected;?>><?=$ca['descr'];?></option> <?php endforeach; ?> </select> - <br> + <br /> <span class="vexpl"> <?=gettext("Select a certificate authority previously configured in the Certificate Manager"); ?>. </span> @@ -854,9 +855,9 @@ function dpdchkbox_change() { <td width="22%" valign="top" class="vncell"><?=gettext("NAT Traversal"); ?></td> <td width="78%" class="vtable"> <select name="nat_traversal" class="formselect"> - <option value="off" <?php if ($pconfig['nat_traversal'] == "off") echo "selected"; ?>><?=gettext("Disable"); ?></option> - <option value="on" <?php if ($pconfig['nat_traversal'] == "on") echo "selected"; ?>><?=gettext("Enable"); ?></option> - <option value="force" <?php if ($pconfig['nat_traversal'] == "force") echo "selected"; ?>><?=gettext("Force"); ?></option> + <option value="off" <?php if ($pconfig['nat_traversal'] == "off") echo "selected=\"selected\""; ?>><?=gettext("Disable"); ?></option> + <option value="on" <?php if ($pconfig['nat_traversal'] == "on") echo "selected=\"selected\""; ?>><?=gettext("Enable"); ?></option> + <option value="force" <?php if ($pconfig['nat_traversal'] == "force") echo "selected=\"selected\""; ?>><?=gettext("Force"); ?></option> </select> <br/> <span class="vexpl"> @@ -868,22 +869,22 @@ function dpdchkbox_change() { <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Dead Peer Detection"); ?></td> <td width="78%" class="vtable"> - <input name="dpd_enable" type="checkbox" id="dpd_enable" value="yes" <?php if (isset($pconfig['dpd_enable'])) echo "checked"; ?> onClick="dpdchkbox_change()"> - <?=gettext("Enable DPD"); ?><br> + <input name="dpd_enable" type="checkbox" id="dpd_enable" value="yes" <?php if (isset($pconfig['dpd_enable'])) echo "checked=\"checked\""; ?> onclick="dpdchkbox_change()"/> + <?=gettext("Enable DPD"); ?><br /> <div id="opt_dpd"> - <br> - <input name="dpd_delay" type="text" class="formfld unknown" id="dpd_delay" size="5" value="<?=htmlspecialchars($pconfig['dpd_delay']);?>"> - <?=gettext("seconds"); ?><br> + <br /> + <input name="dpd_delay" type="text" class="formfld unknown" id="dpd_delay" size="5" value="<?=htmlspecialchars($pconfig['dpd_delay']);?>"/> + <?=gettext("seconds"); ?><br /> <span class="vexpl"> <?=gettext("Delay between requesting peer acknowledgement"); ?>. - </span><br> - <br> - <input name="dpd_maxfail" type="text" class="formfld unknown" id="dpd_maxfail" size="5" value="<?=htmlspecialchars($pconfig['dpd_maxfail']);?>"> - <?=gettext("retries"); ?><br> + </span><br /> + <br /> + <input name="dpd_maxfail" type="text" class="formfld unknown" id="dpd_maxfail" size="5" value="<?=htmlspecialchars($pconfig['dpd_maxfail']);?>"/> + <?=gettext("retries"); ?><br /> <span class="vexpl"> <?=gettext("Number of consecutive failures allowed before disconnect"); ?>. </span> - <br> + <br /> </div> </td> </tr> @@ -891,13 +892,13 @@ function dpdchkbox_change() { <td width="22%" valign="top"> </td> <td width="78%"> <?php if (isset($p1index) && $a_phase1[$p1index]): ?> - <input name="p1index" type="hidden" value="<?=$p1index;?>"> + <input name="p1index" type="hidden" value="<?=$p1index;?>"/> <?php endif; ?> <?php if ($pconfig['mobile']): ?> - <input name="mobile" type="hidden" value="true"> + <input name="mobile" type="hidden" value="true"/> <?php endif; ?> - <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']);?>"/> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"/> </td> </tr> </table> @@ -907,7 +908,7 @@ function dpdchkbox_change() { </table> </form> -<script lannguage="JavaScript"> +<script type="text/JavaScript"> <!-- <?php /* determine if we should init the key length */ diff --git a/usr/local/www/vpn_ipsec_phase2.php b/usr/local/www/vpn_ipsec_phase2.php index 483c8ac..cec02ed 100644 --- a/usr/local/www/vpn_ipsec_phase2.php +++ b/usr/local/www/vpn_ipsec_phase2.php @@ -326,7 +326,7 @@ 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 language="JavaScript"> +<script type="text/JavaScript"> <!-- function change_mode() { @@ -506,9 +506,9 @@ function change_protocol() { <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> + <br /> <span class="vexpl"><?=gettext("Set this option to disable this phase2 entry without " . "removing it from the list"); ?>. </span> @@ -517,12 +517,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; ?> @@ -537,14 +537,14 @@ function change_protocol() { <td><?=gettext("Type"); ?>: </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> @@ -553,11 +553,11 @@ function change_protocol() { <td><?=gettext("Address:");?> </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; ?> @@ -572,16 +572,16 @@ function change_protocol() { <td><?=gettext("Type"); ?>: </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> @@ -589,11 +589,11 @@ function change_protocol() { <td><?=gettext("Address:");?> </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; ?> @@ -614,9 +614,9 @@ function change_protocol() { <td><?=gettext("Type"); ?>: </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> @@ -624,13 +624,13 @@ function change_protocol() { <td><?=gettext("Address"); ?>: </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"; + echo "<option value=\"{$i}\" "; + if (isset($pconfig['remoteid_netbits']) && $i == $pconfig['remoteid_netbits']) echo "selected=\"selected\""; echo ">{$i}</option>\n"; } ?> </select> @@ -645,8 +645,8 @@ 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']);?>"> - <br> + <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 " . "for your reference (not parsed)"); ?>. @@ -664,14 +664,14 @@ 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; ?> </select> - <br> + <br /> <span class="vexpl"> <?=gettext("ESP is encryption, AH is authentication only"); ?> </span> @@ -685,11 +685,11 @@ function change_protocol() { 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']);?> @@ -707,9 +707,9 @@ function change_protocol() { $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> + <option value="<?=$keylen;?>" <?=$selected;?>><?=$keylen;?> <?=gettext("bits"); ?></option> <?php endfor; ?> </select> <?php endif; ?> @@ -719,7 +719,7 @@ function change_protocol() { <?php endforeach; ?> </table> - <br> + <br /> <?=gettext("Hint: use 3DES for best compatibility or if you have a hardware " . "crypto accelerator card. Blowfish is usually the fastest in " . "software encryption"); ?>. @@ -729,9 +729,9 @@ 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> + <br /> <?php endforeach; ?> </td> </tr> @@ -741,19 +741,19 @@ 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; ?> </select> - <br> + <br /> <?php else: ?> <select class="formselect" disabled> - <option selected><?=$p2_pfskeygroups[$a_client['pfs_group']];?></option> + <option selected="selected"><?=$p2_pfskeygroups[$a_client['pfs_group']];?></option> </select> - <input name="pfsgroup" type="hidden" value="<?=htmlspecialchars($pconfig['pfsgroup']);?>"> - <br> + <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; ?> </td> @@ -761,7 +761,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> @@ -774,7 +774,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> @@ -782,14 +782,14 @@ function change_protocol() { <td width="22%" valign="top"> </td> <td width="78%"> <?php if (isset($p2index) && $a_phase2[$p2index]): ?> - <input name="p2index" type="hidden" value="<?=$p2index;?>"> + <input name="p2index" type="hidden" value="<?=$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> @@ -798,7 +798,7 @@ function change_protocol() { </tr> </table> </form> -<script lannguage="JavaScript"> +<script type="text/JavaScript"> <!-- change_mode('<?=htmlspecialchars($pconfig['mode'])?>'); change_protocol('<?=htmlspecialchars($pconfig['proto'])?>'); |