diff options
author | Renato Botelho <garga@pfSense.org> | 2014-03-08 23:39:16 -0300 |
---|---|---|
committer | Renato Botelho <garga@pfSense.org> | 2014-03-08 23:39:16 -0300 |
commit | 5ec1108682e58c6d0f645588d90618bbf200bab8 (patch) | |
tree | 0852e35f191145527f63b6f6f1a1aac970c75268 | |
parent | 6fee19989aabb6bd65ba9b510a101572db3849b7 (diff) | |
parent | c5935cb42ce2a05469aedfd8f03ae7c99036ced2 (diff) | |
download | pfsense-5ec1108682e58c6d0f645588d90618bbf200bab8.zip pfsense-5ec1108682e58c6d0f645588d90618bbf200bab8.tar.gz |
Merge pull request #1008 from N0YB/RELENG_2_1
XHTML Compliance
-rwxr-xr-x | usr/local/www/vpn_pptp.php | 112 | ||||
-rwxr-xr-x | usr/local/www/vpn_pptp_users.php | 10 | ||||
-rwxr-xr-x | usr/local/www/vpn_pptp_users_edit.php | 17 |
3 files changed, 72 insertions, 67 deletions
diff --git a/usr/local/www/vpn_pptp.php b/usr/local/www/vpn_pptp.php index a5da316..f372e38 100755 --- a/usr/local/www/vpn_pptp.php +++ b/usr/local/www/vpn_pptp.php @@ -201,7 +201,7 @@ include("head.inc"); <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<script language="JavaScript"> +<script type="text/JavaScript"> <!-- function get_radio_value(obj) { @@ -315,25 +315,28 @@ function enable_change(enable_over) { <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> <input name="mode" type="radio" onclick="enable_change(false)" value="off" - <?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked";?>> + <?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked=\"checked\"";?>/> <?=gettext("Off"); ?></td> + </tr> <tr> <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> - <input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked" ?>> + <input type="radio" name="mode" value="redir" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "redir") echo "checked=\"checked\"" ?>/> <?=gettext("Redirect incoming PPTP connections to");?>:</td> + </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("PPTP redirection");?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="redir" type="text" class="formfld unknown" id="redir" size="20" value="<?=htmlspecialchars($pconfig['redir']);?>"> - <br> + <?=$mandfldhtml;?><input name="redir" type="text" class="formfld unknown" id="redir" size="20" value="<?=htmlspecialchars($pconfig['redir']);?>"/> + <br /> <?=gettext("Enter the IP address of a host which will accept incoming " . "PPTP connections"); ?>.</td> + </tr> <tr> <td width="22%" valign="top" class="vtable"> </td> <td width="78%" class="vtable"> - <input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked"; ?>> + <input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked=\"checked\""; ?>/> <?=gettext("Enable PPTP server"); ?></td> </tr> <tr> @@ -344,20 +347,20 @@ function enable_change(enable_over) { $toselect = ($pconfig['n_pptp_units'] > 0) ? $pconfig['n_pptp_units'] : 16; for($x=1; $x<255; $x++) { if($x == $toselect) - $SELECTED = " SELECTED"; + $selected = "selected=\"selected\""; else - $SELECTED = ""; - echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n"; + $selected = ""; + echo "<option value=\"{$x}\" {$selected}>{$x}</option>\n"; } ?> </select> - <br><?=gettext("Hint: 10 is ten PPTP clients"); ?> + <br /><?=gettext("Hint: 10 is ten PPTP clients"); ?> </td> </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Server address"); ?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>"> + <?=$mandfldhtml;?><input name="localip" type="text" class="formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>"/> <br/> <?=gettext("Enter the IP address the PPTP server should give to clients for use as their \"gateway\""); ?>. <br/> @@ -370,91 +373,92 @@ function enable_change(enable_over) { <td width="22%" valign="top" class="vncellreq"><?=gettext("Remote address " . "range"); ?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>"> - <br> - <?=gettext("Specify the starting address for the client IP subnet"); ?>.<br> + <?=$mandfldhtml;?><input name="remoteip" type="text" class="formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip']);?>"/> + <br /> + <?=gettext("Specify the starting address for the client IP subnet"); ?>.<br /> + </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("PPTP DNS Servers"); ?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>"> - <br> - <input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>"> - <br> - <?=gettext("primary and secondary DNS servers assigned to PPTP clients"); ?><br> + <?=$mandfldhtml;?><input name="pptp_dns1" type="text" class="formfld unknown" id="pptp_dns1" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns1']);?>"/> + <br /> + <input name="pptp_dns2" type="text" class="formfld unknown" id="pptp_dns2" size="20" value="<?=htmlspecialchars($pconfig['pptp_dns2']);?>"/> + <br /> + <?=gettext("primary and secondary DNS servers assigned to PPTP clients"); ?><br /> + </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("WINS Server"); ?></td> <td width="78%" valign="top" class="vtable"> - <input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>"> + <input name="wins" class="formfld unknown" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins']);?>"/> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS"); ?></td> <td width="78%" class="vtable"> - <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked"; ?>> - <strong><?=gettext("Use a RADIUS server for authentication"); ?></strong><br> + <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked=\"checked\""; ?>/> + <strong><?=gettext("Use a RADIUS server for authentication"); ?></strong><br /> <?=gettext("When set, all users will be authenticated using " . "the RADIUS server specified below. The local user database " . - "will not be used"); ?>.<br> - <br> - <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked"; ?>> - <strong><?=gettext("Enable RADIUS accounting"); ?> <br> - </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br> - <br> - <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>> - <strong><?=gettext("Secondary RADIUS server for failover authentication"); ?></strong><br> - <?=gettext("When set, all requests will go to the secondary server when primary fails"); ?><br> - <br> - <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>> + "will not be used"); ?>.<br /> + <br /> + <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked=\"checked\""; ?>/> + <strong><?=gettext("Enable RADIUS accounting"); ?> <br /> + </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br /> + <br /> + <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked=\"checked\""; ?>/> + <strong><?=gettext("Secondary RADIUS server for failover authentication"); ?></strong><br /> + <?=gettext("When set, all requests will go to the secondary server when primary fails"); ?><br /> + <br /> + <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips" <?php if($pconfig['radiusissueips']) echo "checked=\"checked\""; ?>/> <strong><?=gettext("RADIUS issued IPs"); ?></strong> - <br><?=gettext("Issue IP addresses via RADIUS server"); ?>. + <br /><?=gettext("Issue IP addresses via RADIUS server"); ?>. </td> - </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS NAS IP"); ?></td> <td width="78%" valign="top" class="vtable"> - <input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>"> + <input name="radius_nasip" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>"/> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Accounting Update"); ?></td> <td width="78%" valign="top" class="vtable"> - <input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>"> + <input name="radius_acct_update" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>"/> </td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS Server"); ?> </td> <td width="78%" class="vtable"> - <input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>"> - <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>"> - <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>"> - <br> + <input name="radiusserver" type="text" class="formfld unknown" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver']);?>"/> + <input name="radiusserverport" type="text" class="formfld unknown" id="radiusserverport" size="4" value="<?=htmlspecialchars($pconfig['radiusserverport']);?>"/> + <input name="radiusserveracctport" type="text" class="formfld unknown" id="radiusserveracctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserveracctport']);?>"/> + <br /> <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("RADIUS shared secret"); ?></td> <td width="78%" valign="top" class="vtable"> - <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>"> - <br> + <input name="radiussecret" type="password" class="formfld pwd" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret']);?>"/> + <br /> <?=gettext("Enter the shared secret that will be used to authenticate " . "to the RADIUS server"); ?>.</td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS server"); ?> </td> <td width="78%" class="vtable"> - <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>"> - <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>"> - <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>"> - <br> + <input name="radiusserver2" type="text" class="formfld unknown" id="radiusserver2" size="20" value="<?=htmlspecialchars($pconfig['radiusserver2']);?>"/> + <input name="radiusserver2port" type="text" class="formfld unknown" id="radiusserver2port" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2port']);?>"/> + <input name="radiusserver2acctport" type="text" class="formfld unknown" id="radiusserver2acctport" size="4" value="<?=htmlspecialchars($pconfig['radiusserver2acctport']);?>"/> + <br /> <?=gettext("Enter the IP address, RADIUS port, and RADIUS accounting port of the RADIUS server"); ?>.</td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("Secondary RADIUS shared secret"); ?></td> <td width="78%" valign="top" class="vtable"> - <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>"> - <br> + <input name="radiussecret2" type="password" class="formfld pwd" id="radiussecret2" size="20" value="<?=htmlspecialchars($pconfig['radiussecret2']);?>"/> + <br /> <?=gettext("Enter the shared secret that will be used to authenticate " . "to the secondary RADIUS server"); ?>.</td> </tr> @@ -464,8 +468,8 @@ function enable_change(enable_over) { <tr> <td width="22%" valign="middle"> </td> <td width="78%" class="vtable"> - <input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked"; ?>> - <strong><?=gettext("Require 128-bit encryption"); ?></strong><br> + <input name="req128" type="checkbox" id="req128" value="yes" <?php if ($pconfig['req128']) echo "checked=\"checked\""; ?>/> + <strong><?=gettext("Require 128-bit encryption"); ?></strong><br /> <?=gettext("When set, only 128-bit encryption will be accepted. Otherwise " . "40-bit and 56-bit encryption will be accepted as well. Note that " . "encryption will always be forced on PPTP connections (i.e. " . @@ -474,12 +478,12 @@ function enable_change(enable_over) { <tr> <td width="22%" valign="top"> </td> <td width="78%"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)"/> </td> </tr> <tr> <td width="22%" valign="top"> </td> - <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br> + <td width="78%"><span class="vexpl"><span class="red"><strong><?=gettext("Note");?>:<br /> </strong></span><?=gettext("don't forget to ");?><a href="firewall_rules.php?if=pptp"><?=gettext("add a firewall rule"); ?></a> <?=gettext("to permit ". "traffic from PPTP clients");?>!</span></td> </tr> @@ -489,7 +493,7 @@ function enable_change(enable_over) { </tr> </table> </form> -<script language="JavaScript"> +<script type="text/JavaScript"> <!-- enable_change(false); //--> diff --git a/usr/local/www/vpn_pptp_users.php b/usr/local/www/vpn_pptp_users.php index 29a3b40..068fb91 100755 --- a/usr/local/www/vpn_pptp_users.php +++ b/usr/local/www/vpn_pptp_users.php @@ -81,7 +81,7 @@ include("head.inc"); <?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')): ?><p> -<?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>".gettext("Warning: this will terminate all current PPTP sessions")."!</b>");?><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>".gettext("Warning: this will terminate all current PPTP sessions")."!</b>");?><br /> <?php endif; ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td class="tabnavtbl"> @@ -102,7 +102,7 @@ include("head.inc"); <table border="0" cellspacing="0" cellpadding="1"> <tr> <td width="17"></td> - <td><a href="vpn_pptp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user");?>" width="17" height="17" border="0"></a></td> + <td><a href="vpn_pptp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user");?>" alt="" width="17" height="17" border="0"/></a></td> </tr> </table> </td> @@ -115,8 +115,8 @@ include("head.inc"); <td class="listr"> <?=htmlspecialchars($secretent['ip']);?> </td> - <td class="list" nowrap> <a href="vpn_pptp_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit user");?>" width="17" height="17" border="0"></a> - <a href="vpn_pptp_users.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this user?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete user");?>" width="17" height="17" border="0"></a></td> + <td class="list" nowrap="nowrap"> <a href="vpn_pptp_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit user");?>" alt="" width="17" height="17" border="0"/></a> + <a href="vpn_pptp_users.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this user?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete user");?>" alt="" width="17" height="17" border="0"/></a></td> </tr> <?php $i++; endforeach; ?> <tr> @@ -125,7 +125,7 @@ include("head.inc"); <table border="0" cellspacing="0" cellpadding="1"> <tr> <td width="17"></td> - <td><a href="vpn_pptp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user");?>" width="17" height="17" border="0"></a></td> + <td><a href="vpn_pptp_users_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add user");?>" alt="" width="17" height="17" border="0"/></a></td> </tr> </table> </td> diff --git a/usr/local/www/vpn_pptp_users_edit.php b/usr/local/www/vpn_pptp_users_edit.php index cf375e8..e058442 100755 --- a/usr/local/www/vpn_pptp_users_edit.php +++ b/usr/local/www/vpn_pptp_users_edit.php @@ -146,29 +146,30 @@ include("head.inc"); <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Username");?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>"> + <?=$mandfldhtml;?><input name="username" type="text" class="formfld user" id="username" size="20" value="<?=htmlspecialchars($pconfig['username']);?>"/> </td> + </tr> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="password" type="password" class="formfld pwd" id="password" size="20"> - <br><?=$mandfldhtml;?><input name="password2" type="password" class="formfld pwd" id="password2" size="20"> - (<?=gettext("confirmation");?>)<?php if (isset($id) && $a_secret[$id]): ?><br> + <?=$mandfldhtml;?><input name="password" type="password" class="formfld pwd" id="password" size="20"/> + <br /><?=$mandfldhtml;?><input name="password2" type="password" class="formfld pwd" id="password2" size="20"/> + (<?=gettext("confirmation");?>)<?php if (isset($id) && $a_secret[$id]): ?><br /> <span class="vexpl"><?=gettext("If you want to change the users' password, ". "enter it here twice.");?></span><?php endif; ?></td> </tr> <tr> <td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td> <td width="78%" class="vtable"> - <input name="ip" type="text" class="formfld unknown" id="ip" size="20" value="<?=htmlspecialchars($pconfig['ip']);?>"> - <br><span class="vexpl"><?=gettext("If you want the user to be assigned a specific IP address, enter it here.");?></span></td> + <input name="ip" type="text" class="formfld unknown" id="ip" size="20" value="<?=htmlspecialchars($pconfig['ip']);?>"/> + <br /><span class="vexpl"><?=gettext("If you want the user to be assigned a specific IP address, enter it here.");?></span></td> </tr> <tr> <td class="vncell" width="22%" valign="top"> </td> <td class="vncell" width="78%"> - <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> + <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"/> <?php if (isset($id) && $a_secret[$id]): ?> - <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>"> + <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>"/> <?php endif; ?> </td> </tr> |