summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/crash_reporter.php2
-rwxr-xr-xusr/local/www/diag_backup.php4
-rw-r--r--usr/local/www/diag_packet_capture.php53
-rw-r--r--usr/local/www/diag_tables.php62
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php12
-rwxr-xr-xusr/local/www/firewall_nat.php4
-rwxr-xr-xusr/local/www/firewall_nat_1to1_edit.php55
-rwxr-xr-xusr/local/www/firewall_nat_edit.php103
-rw-r--r--usr/local/www/firewall_nat_npt_edit.php6
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php57
-rwxr-xr-xusr/local/www/firewall_rules_edit.php6
-rw-r--r--usr/local/www/firewall_schedule_edit.php37
-rwxr-xr-xusr/local/www/firewall_shaper_layer7.php4
-rwxr-xr-xusr/local/www/firewall_shaper_queues.php4
-rw-r--r--usr/local/www/firewall_shaper_vinterface.php4
-rwxr-xr-xusr/local/www/guiconfig.inc20
-rwxr-xr-xusr/local/www/pkg_mgr_installed.php2
-rw-r--r--usr/local/www/services_captiveportal_vouchers.php3
-rwxr-xr-xusr/local/www/services_dhcp.php162
-rwxr-xr-xusr/local/www/services_dhcp_edit.php84
-rwxr-xr-xusr/local/www/services_dnsmasq.php136
-rwxr-xr-xusr/local/www/services_dnsmasq_domainoverride_edit.php22
-rwxr-xr-xusr/local/www/services_dnsmasq_edit.php22
-rw-r--r--usr/local/www/system_certmanager.php8
-rw-r--r--usr/local/www/system_groupmanager.php4
-rwxr-xr-xusr/local/www/vpn_ipsec.php46
-rw-r--r--usr/local/www/vpn_ipsec_keys.php16
-rw-r--r--usr/local/www/vpn_ipsec_keys_edit.php12
-rwxr-xr-xusr/local/www/vpn_ipsec_mobile.php80
-rw-r--r--usr/local/www/vpn_ipsec_phase1.php149
-rw-r--r--usr/local/www/vpn_ipsec_phase2.php98
-rw-r--r--usr/local/www/vpn_l2tp.php36
-rw-r--r--usr/local/www/vpn_l2tp_users.php2
-rw-r--r--usr/local/www/vpn_l2tp_users_edit.php1
-rw-r--r--usr/local/www/vpn_openvpn_client.php131
-rw-r--r--usr/local/www/vpn_openvpn_csc.php92
-rw-r--r--usr/local/www/vpn_openvpn_server.php199
-rwxr-xr-xusr/local/www/vpn_pppoe.php12
-rwxr-xr-xusr/local/www/vpn_pppoe_edit.php116
-rwxr-xr-xusr/local/www/vpn_pptp.php112
-rwxr-xr-xusr/local/www/vpn_pptp_users.php10
-rwxr-xr-xusr/local/www/vpn_pptp_users_edit.php17
42 files changed, 1064 insertions, 941 deletions
diff --git a/usr/local/www/crash_reporter.php b/usr/local/www/crash_reporter.php
index 978e372..956db05 100755
--- a/usr/local/www/crash_reporter.php
+++ b/usr/local/www/crash_reporter.php
@@ -124,7 +124,7 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors);
echo "Could not find any crash files.";
}
} else if(gettext($_POST['Submit']) == "No") {
- array_map('unlink', glob("rm /var/crash/*"));
+ array_map('unlink', glob("/var/crash/*"));
// Erase the contents of the PHP error log
fclose(fopen("/tmp/PHP_errors.log", 'w'));
Header("Location: /");
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index 8e3f601..d7a3a7c 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -134,7 +134,7 @@ function restore_rrddata() {
function add_base_packages_menu_items() {
global $g, $config;
- $base_packages = explode($g['base_packages'], ",");
+ $base_packages = explode(",", $g['base_packages']);
$modified_config = false;
foreach($base_packages as $bp) {
$basepkg_path = "/usr/local/pkg/{$bp}";
@@ -187,7 +187,7 @@ function spit_out_select_items($name, $showall) {
"interfaces" => gettext("Interfaces"),
"ipsec" => gettext("IPSEC"),
"nat" => gettext("NAT"),
- "ovpn" => gettext("OpenVPN"),
+ "openvpn" => gettext("OpenVPN"),
"installedpackages" => gettext("Package Manager"),
"pptpd" => gettext("PPTP Server"),
"rrddata" => gettext("RRD Data"),
diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php
index 116f3ab..f56be9b 100644
--- a/usr/local/www/diag_packet_capture.php
+++ b/usr/local/www/diag_packet_capture.php
@@ -192,7 +192,7 @@ include("fbegin.inc");
<?php
?>
<?php foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if ($selectedif == $iface) echo "selected"; ?>>
+ <option value="<?=$iface;?>" <?php if ($selectedif == $iface) echo "selected=\"selected\""; ?>>
<?php echo $ifacename;?>
</option>
<?php endforeach; ?>
@@ -203,7 +203,7 @@ include("fbegin.inc");
<tr>
<td width="17%" valign="top" class="vncellreq"><?=gettext("Promiscuous");?></td>
<td width="51%" class="vtable">
- <input name="promiscuous" type="checkbox"<?php if($_POST['promiscuous']) echo " CHECKED"; ?>>
+ <input name="promiscuous" type="checkbox" <?php if($_POST['promiscuous']) echo "checked=\"checked\""; ?>/>
<br/><?=gettext("If checked, the");?> <a target="_blank" href="http://www.freebsd.org/cgi/man.cgi?query=tcpdump&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+8.3-stable&amp;arch=default&amp;format=html"><?= gettext("packet capture")?></a> <?= gettext("will be performed using promiscuous mode.");?>
<br/><b><?=gettext("Note");?>: </b><?=gettext("Some network adapters do not support or work well in promiscuous mode.");?>
</td>
@@ -213,8 +213,8 @@ include("fbegin.inc");
<td colspan="2" width="83%" class="vtable">
<select name="fam">
<option value="">Any</option>
- <option value="ip" <?php if ($fam == "ip") echo "selected"; ?>>IPv4 Only</option>
- <option value="ip6" <?php if ($fam == "ip6") echo "selected"; ?>>IPv6 Only</option>
+ <option value="ip" <?php if ($fam == "ip") echo "selected=\"selected\""; ?>>IPv4 Only</option>
+ <option value="ip6" <?php if ($fam == "ip6") echo "selected=\"selected\""; ?>>IPv6 Only</option>
</select>
<br/><?=gettext("Select the type of traffic to be captured, either Any, IPv4 only or IPv6 only.");?>
</td>
@@ -224,13 +224,13 @@ include("fbegin.inc");
<td colspan="2" width="83%" class="vtable">
<select name="proto">
<option value="">Any</option>
- <option value="icmp" <?php if ($proto == "icmp") echo "selected"; ?>>ICMP</option>
- <option value="icmp6" <?php if ($proto == "icmp6") echo "selected"; ?>>ICMPv6</option>
- <option value="tcp" <?php if ($proto == "tcp") echo "selected"; ?>>TCP</option>
- <option value="udp" <?php if ($proto == "udp") echo "selected"; ?>>UDP</option>
- <option value="arp" <?php if ($proto == "arp") echo "selected"; ?>>ARP</option>
- <option value="carp" <?php if ($proto == "carp") echo "selected"; ?>>CARP (VRRP)</option>
- <option value="esp" <?php if ($proto == "esp") echo "selected"; ?>>ESP</option>
+ <option value="icmp" <?php if ($proto == "icmp") echo "selected=\"selected\""; ?>>ICMP</option>
+ <option value="icmp6" <?php if ($proto == "icmp6") echo "selected=\"selected\""; ?>>ICMPv6</option>
+ <option value="tcp" <?php if ($proto == "tcp") echo "selected=\"selected\""; ?>>TCP</option>
+ <option value="udp" <?php if ($proto == "udp") echo "selected=\"selected\""; ?>>UDP</option>
+ <option value="arp" <?php if ($proto == "arp") echo "selected=\"selected\""; ?>>ARP</option>
+ <option value="carp" <?php if ($proto == "carp") echo "selected=\"selected\""; ?>>CARP (VRRP)</option>
+ <option value="esp" <?php if ($proto == "esp") echo "selected=\"selected\""; ?>>ESP</option>
</select>
<br/><?=gettext("Select the protocol to capture, or Any.");?>
</td>
@@ -238,7 +238,7 @@ include("fbegin.inc");
<tr>
<td width="17%" valign="top" class="vncellreq"><?=gettext("Host Address");?></td>
<td colspan="2" width="83%" class="vtable">
- <input name="host" type="text" class="formfld host" id="host" size="20" value="<?=htmlspecialchars($host);?>">
+ <input name="host" type="text" class="formfld host" id="host" size="20" value="<?=htmlspecialchars($host);?>"/>
<br/><?=gettext("This value is either the Source or Destination IP address or subnet in CIDR notation. The packet capture will look for this address in either field.");?>
<br/><?=gettext("This value can be a domain name or IP address, or subnet in CIDR notation.");?>
<br/><?=gettext("If you leave this field blank, all packets on the specified interface will be captured.");?>
@@ -247,7 +247,7 @@ include("fbegin.inc");
<tr>
<td width="17%" valign="top" class="vncellreq"><?=gettext("Port");?></td>
<td colspan="2" width="83%" class="vtable">
- <input name="port" type="text" class="formfld unknown" id="port" size="5" value="<?=$port;?>">
+ <input name="port" type="text" class="formfld unknown" id="port" size="5" value="<?=$port;?>"/>
<br/><?=gettext("The port can be either the source or destination port. The packet capture will look for this port in either field.");?>
<br/><?=gettext("Leave blank if you do not want to filter by port.");?>
</td>
@@ -255,25 +255,25 @@ include("fbegin.inc");
<tr>
<td width="17%" valign="top" class="vncellreq"><?=gettext("Packet Length");?></td>
<td colspan="2" width="83%" class="vtable">
- <input name="snaplen" type="text" class="formfld unknown" id="snaplen" size="5" value="<?=$snaplen;?>">
+ <input name="snaplen" type="text" class="formfld unknown" id="snaplen" size="5" value="<?=$snaplen;?>"/>
<br/><?=gettext("The Packet length is the number of bytes of each packet that will be captured. Default value is 0, which will capture the entire frame regardless of its size.");?>
</td>
</tr>
<tr>
<td width="17%" valign="top" class="vncellreq"><?=gettext("Count");?></td>
<td colspan="2" width="83%" class="vtable">
- <input name="count" type="text" class="formfld unknown" id="count" size="5" value="<?=$count;?>">
+ <input name="count" type="text" class="formfld unknown" id="count" size="5" value="<?=$count;?>"/>
<br/><?=gettext("This is the number of packets the packet capture will grab. Default value is 100.") . "<br/>" . gettext("Enter 0 (zero) for no count limit.");?>
</td>
</tr>
<tr>
<td width="17%" valign="top" class="vncellreq"><?=gettext("Level of Detail");?></td>
<td colspan="2" width="83%" class="vtable">
- <select name="detail" type="text" class="formselect" id="detail" size="1">
- <option value="normal" <?php if ($detail == "normal") echo "selected"; ?>><?=gettext("Normal");?></option>
- <option value="medium" <?php if ($detail == "medium") echo "selected"; ?>><?=gettext("Medium");?></option>
- <option value="high" <?php if ($detail == "high") echo "selected"; ?>><?=gettext("High");?></option>
- <option value="full" <?php if ($detail == "full") echo "selected"; ?>><?=gettext("Full");?></option>
+ <select name="detail" class="formselect" id="detail" size="1">
+ <option value="normal" <?php if ($detail == "normal") echo "selected=\"selected\""; ?>><?=gettext("Normal");?></option>
+ <option value="medium" <?php if ($detail == "medium") echo "selected=\"selected\""; ?>><?=gettext("Medium");?></option>
+ <option value="high" <?php if ($detail == "high") echo "selected=\"selected\""; ?>><?=gettext("High");?></option>
+ <option value="full" <?php if ($detail == "full") echo "selected=\"selected\""; ?>><?=gettext("Full");?></option>
</select>
<br/><?=gettext("This is the level of detail that will be displayed after hitting 'Stop' when the packets have been captured.") . "<br/><b>" .
gettext("Note:") . "</b> " .
@@ -283,7 +283,7 @@ include("fbegin.inc");
<tr>
<td width="17%" valign="top" class="vncellreq"><?=gettext("Reverse DNS Lookup");?></td>
<td colspan="2" width="83%" class="vtable">
- <input name="dnsquery" type="checkbox"<?php if($_POST['dnsquery']) echo " CHECKED"; ?>>
+ <input name="dnsquery" type="checkbox" <?php if($_POST['dnsquery']) echo "checked=\"checked\""; ?>/>
<br/><?=gettext("This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses.");?>
<br/><b><?=gettext("Note");?>: </b><?=gettext("This option can cause delays for large packet captures.");?>
</td>
@@ -302,13 +302,13 @@ include("fbegin.inc");
$processisrunning = false;
if (($action == gettext("Stop") or $action == "") and $processisrunning != true)
- echo "<input type=\"submit\" name=\"startbtn\" value=\"" . gettext("Start") . "\">&nbsp;";
+ echo "<input type=\"submit\" name=\"startbtn\" value=\"" . gettext("Start") . "\"/>&nbsp;";
else {
- echo "<input type=\"submit\" name=\"stopbtn\" value=\"" . gettext("Stop") . "\">&nbsp;";
+ echo "<input type=\"submit\" name=\"stopbtn\" value=\"" . gettext("Stop") . "\"/>&nbsp;";
}
if (file_exists($fp.$fn) and $processisrunning != true) {
- echo "<input type=\"submit\" name=\"viewbtn\" value=\"" . gettext("View Capture") . "\">&nbsp;";
- echo "<input type=\"submit\" name=\"downloadbtn\" value=\"" . gettext("Download Capture") . "\">";
+ echo "<input type=\"submit\" name=\"viewbtn\" value=\"" . gettext("View Capture") . "\"/>&nbsp;";
+ echo "<input type=\"submit\" name=\"downloadbtn\" value=\"" . gettext("Download Capture") . "\"/>";
echo "<br/>" . gettext("The packet capture file was last updated:") . " " . date("F jS, Y g:i:s a.", filemtime($fp.$fn));
}
?>
@@ -390,6 +390,7 @@ include("fbegin.inc");
<?php
}
}
+ echo "</font>";
?>
</td>
</tr>
@@ -400,3 +401,5 @@ include("fbegin.inc");
<?php
include("fend.inc");
?>
+</body>
+</html>
diff --git a/usr/local/www/diag_tables.php b/usr/local/www/diag_tables.php
index 9bbcc46..fdfc99a 100644
--- a/usr/local/www/diag_tables.php
+++ b/usr/local/www/diag_tables.php
@@ -91,19 +91,22 @@ exec("/sbin/pfctl -t " . escapeshellarg($tablename) . " -T show", $entries);
exec("/sbin/pfctl -sT", $tables);
include("head.inc");
+?>
+<body>
+<?php
include("fbegin.inc");
+if ($savemsg) print_info_box($savemsg);
?>
-<?php if ($savemsg) print_info_box($savemsg); ?>
-<form method='post'>
+<form method='post' action='' >
-<script language="javascript">
+<script type="text/javascript">
function method_change(entrytype) {
window.location='diag_tables.php?type=' + entrytype;
}
function del_entry(entry) {
- jQuery.ajax("diag_tables.php?type=<?php echo htmlspecialchars($tablename);?>&delete=" + entry, {
+ jQuery.ajax("diag_tables.php?type=<?php echo htmlspecialchars($tablename);?>&amp;delete=" + entry, {
complete: function(response) {
if (200 == response.status) {
// Escape all dots to not confuse jQuery selectors
@@ -117,11 +120,11 @@ include("fbegin.inc");
</script>
<?=gettext("Table:");?>
-<select id='type' onChange='method_change(jQuery("#type").val());' name='type'>
+<select id='type' onchange='method_change(jQuery("#type").val());' name='type'>
<?php foreach ($tables as $table) {
- echo "<option name='{$table}' value='{$table}'";
+ echo "<option id='{$table}' value='{$table}'";
if ($tablename == $table)
- echo " selected ";
+ echo " selected=\"selected\" ";
echo ">{$table}</option>\n";
}
?>
@@ -129,43 +132,44 @@ include("fbegin.inc");
<p/>
+<?php
+ if( (is_array($entries)) && (count($entries) > 0) )
+ if( ($tablename == "bogons") || ($tablename == "bogonsv6") ) {
+ $last_updated = exec('/usr/bin/grep -i -m 1 -E "^# last updated" /etc/' . escapeshellarg($tablename));
+ echo "<p/>&nbsp;<b>" . count($entries) . "</b> " . gettext("entries in this table.") . "&nbsp;&nbsp;" . "<input name='Download' type='submit' class='formbtn' value='" . gettext("Download") . "' /> " . gettext(" the latest bogon data.") . "<br />" . $last_updated;
+ }
+ else
+ echo "<p/>" . gettext("Delete") . " <a href='diag_tables.php?deleteall=true&amp;type=" . htmlspecialchars($tablename) . "'>" . gettext("all") . "</a> " . "<b>" . count($entries) . "</b> " . gettext("entries in this table.");
+
+ else
+ if( ($tablename == "bogons") || ($tablename == "bogonsv6") )
+ echo "<p/>" . gettext("No entries exist in this table.") . "&nbsp;&nbsp;" . "<input name='Download' type='submit' class='formbtn' value='" . gettext("Download") . "' /> " . gettext(" the latest bogon data.");
+ else
+ echo "<p/>" . gettext("No entries exist in this table.");
+?>
+
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="listhdrr"><?=gettext("IP Address");?></td>
</tr>
<?php $count = 0; foreach($entries as $entryA): ?>
<?php $entry = trim($entryA); ?>
- <tr id='<?=$entry?>'>
+ <tr id='table_row_<?=$count?>'>
<td>
<?php echo $entry; ?>
</td>
<td>
<?php if ( ($tablename != "bogons") && ($tablename != "bogonsv6") ) { ?>
- <a onClick='del_entry("<?=htmlspecialchars($entry)?>");'>
- <img img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif">
- <?php } ?>
+ <a onclick='del_entry("<?=htmlspecialchars($entry)?>");'>
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" alt='' />
</a>
+ <?php } ?>
</td>
</tr>
<?php $count++; endforeach; ?>
-<?php
- if($count == 0)
- if( ($tablename == "bogons") || ($tablename == "bogonsv6") )
- echo "<p/>" . gettext("No entries exist in this table.") . "&nbsp&nbsp" . "<input name='Download' type='submit' class='formbtn' value='" . gettext("Download") . "'> " . gettext(" the latest bogon data.");
- else
- echo "<p/>" . gettext("No entries exist in this table.");
-?>
-
-<?php
- if($count > 0)
- if( ($tablename == "bogons") || ($tablename == "bogonsv6") ) {
- $last_updated = exec('/usr/bin/grep -i -m 1 -E "^# last updated" /etc/' . escapeshellarg($tablename));
- echo "<p/>&nbsp<b>$count</b> " . gettext("entries in this table.") . "&nbsp&nbsp" . "<input name='Download' type='submit' class='formbtn' value='" . gettext("Download") . "'> " . gettext(" the latest bogon data.") . "<br>" . "$last_updated";
- }
- else
- echo "<p/>" . gettext("Delete") . " <a href='diag_tables.php?deleteall=true&type=" . htmlspecialchars($tablename) . "'>" . gettext("all") . "</a> " . "<b>$count</b> " . gettext("entries in this table.");
-?>
-
</table>
+</form>
<?php include("fend.inc"); ?>
+</body>
+</html>
diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php
index 6326153..f787d1e 100755
--- a/usr/local/www/firewall_aliases_edit.php
+++ b/usr/local/www/firewall_aliases_edit.php
@@ -665,7 +665,7 @@ if (empty($tab)) {
?>
<tr>
<td>
- <input autocomplete="off" name="address<?php echo $counter; ?>" type="text" class="formfldalias ipv4v6" id="address<?php echo $counter; ?>" size="30" value="<?=htmlspecialchars($address);?>" />
+ <input style="autocomplete:off" name="address<?php echo $counter; ?>" type="text" class="formfldalias ipv4v6" id="address<?php echo $counter; ?>" size="30" value="<?=htmlspecialchars($address);?>" />
</td>
<td>
<select name="address_subnet<?php echo $counter; ?>" class="formselect ipv4v6" id="address_subnet<?php echo $counter; ?>">
@@ -709,6 +709,16 @@ if (empty($tab)) {
<script type="text/javascript">
//<![CDATA[
+var autocomplete_off = ['address'];
+for (var i = 0; i < autocomplete_off.length; i++) {
+ var node = document.getElementById(autocomplete_off[i]);
+ node.setAttribute("autocomplete",node.style.autocomplete);
+}
+//]]>
+</script>
+
+<script type="text/javascript">
+//<![CDATA[
field_counter_js = 3;
rows = 1;
totalrows = <?php echo $counter; ?>;
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index d1f715e..ee9ebb0 100755
--- a/usr/local/www/firewall_nat.php
+++ b/usr/local/www/firewall_nat.php
@@ -322,15 +322,15 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<td valign="middle" class="list nowrap">
<table border="0" cellspacing="0" cellpadding="1" summary="move">
<tr>
- <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" type="image" style="width:17; height:17; border=0" /></td>
+ <td><input onmouseover="fr_insline(<?=$nnats;?>, true)" onmouseout="fr_insline(<?=$nnats;?>, false)" name="move_<?=$i;?>" src="/themes/<?= $g['theme']; ?>/images/icons/icon_left.gif" title="<?=gettext("move selected rules before this rule");?>" type="image" style="width:17; height:17; border:0" /></td>
<td><a href="firewall_nat_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit rule"); ?>" alt="edit" /></a></td>
</tr>
<tr>
<td align="center" valign="middle"><a href="firewall_nat.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this rule?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete rule");?>" alt="delete" /></a></td>
<td><a href="firewall_nat_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new NAT based on this one");?>" width="17" height="17" border="0" alt="add" /></a></td>
</tr>
- </td>
</table>
+ </td>
</tr>
<?php $i++; $nnats++; endforeach; ?>
<tr>
diff --git a/usr/local/www/firewall_nat_1to1_edit.php b/usr/local/www/firewall_nat_1to1_edit.php
index dafeaea..8f54686 100755
--- a/usr/local/www/firewall_nat_1to1_edit.php
+++ b/usr/local/www/firewall_nat_1to1_edit.php
@@ -313,7 +313,7 @@ function typesel_change() {
foreach ($interfaces as $iface => $ifacename):
?>
- <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
+ <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo " selected=\"selected\""; ?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
@@ -346,23 +346,23 @@ function typesel_change() {
<select name="srctype" class="formselect" onchange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['src']); ?>
- <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
- <option value="single" <?php if ((($pconfig['srcmask'] == 32) || !isset($pconfig['srcmask'])) && !$sel) { echo "selected=\"selected\""; $sel = 1; } ?>><?=gettext("Single host"); ?></option>
- <option value="network" <?php if (!$sel) echo "selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
+ <option value="any" <?php if ($pconfig['src'] == "any") { echo " selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
+ <option value="single" <?php if ((($pconfig['srcmask'] == 32) || !isset($pconfig['srcmask'])) && !$sel) { echo " selected=\"selected\""; $sel = 1; } ?>><?=gettext("Single host"); ?></option>
+ <option value="network" <?php if (!$sel) echo " selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected=\"selected\""; } ?>><?=gettext("PPTP clients"); ?></option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo " selected=\"selected\""; } ?>><?=gettext("PPTP clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected=\"selected\""; } ?>><?=gettext("PPPoE clients"); ?></option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo " selected=\"selected\""; } ?>><?=gettext("PPPoE clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
+ <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo " selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
<?php endif; ?>
<?php
foreach ($ifdisp as $ifent => $ifdesc): ?>
<?php if(have_ruleint_access($ifent)): ?>
- <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
- <option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected=\"selected\""; } ?>>
+ <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo " selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
+ <option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo " selected=\"selected\""; } ?>>
<?=$ifdesc?> <?=gettext("address");?>
</option>
<?php endif; endforeach; ?>
@@ -375,7 +375,7 @@ function typesel_change() {
<input name="src" type="text" class="formfld" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> /
<select name="srcmask" class="formselect" id="srcmask">
<?php for ($i = 31; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo " selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
@@ -401,23 +401,23 @@ function typesel_change() {
<select name="dsttype" class="formselect" onchange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['dst']); ?>
- <option value="any" <?php if (empty($pconfig['dst']) || $pconfig['dst'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
- <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected=\"selected\""; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
- <option value="network" <?php if (!$sel && !empty($pconfig['dst'])) echo "selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
+ <option value="any" <?php if (empty($pconfig['dst']) || $pconfig['dst'] == "any") { echo " selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
+ <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo " selected=\"selected\""; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
+ <option value="network" <?php if (!$sel && !empty($pconfig['dst'])) echo " selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected=\"selected\""; } ?>><?=gettext("PPTP clients"); ?></option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo " selected=\"selected\""; } ?>><?=gettext("PPTP clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected=\"selected\""; } ?>><?=gettext("PPPoE clients"); ?></option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo " selected=\"selected\""; } ?>><?=gettext("PPPoE clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
+ <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo " selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
<?php endif; ?>
<?php foreach ($ifdisp as $if => $ifdesc): ?>
<?php if(have_ruleint_access($if)): ?>
- <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
- <option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected=\"selected\""; } ?>>
+ <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo " selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
+ <option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo " selected=\"selected\""; } ?>>
<?=$ifdesc;?> <?=gettext("address");?>
</option>
<?php endif; endforeach; ?>
@@ -427,12 +427,12 @@ function typesel_change() {
<tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td>
- <input name="dst" type="text" autocomplete="off" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
+ <input name="dst" type="text" style="autocomplete:off" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
/
<select name="dstmask" class="formselect" id="dstmask">
<?php
for ($i = 31; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo " selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
@@ -454,9 +454,9 @@ function typesel_change() {
<td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td>
<td width="78%" class="vtable">
<select name="natreflection" class="formselect">
- <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected=\"selected\""; ?>><?=gettext("use system default"); ?></option>
- <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected=\"selected\""; ?>><?=gettext("enable"); ?></option>
- <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected=\"selected\""; ?>><?=gettext("disable"); ?></option>
+ <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo " selected=\"selected\""; ?>><?=gettext("use system default"); ?></option>
+ <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo " selected=\"selected\""; ?>><?=gettext("enable"); ?></option>
+ <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo " selected=\"selected\""; ?>><?=gettext("disable"); ?></option>
</select>
</td>
</tr>
@@ -473,6 +473,15 @@ function typesel_change() {
</form>
<script type="text/javascript">
//<![CDATA[
+var autocomplete_off = ['dst'];
+for (var i = 0; i < autocomplete_off.length; i++) {
+ var node = document.getElementById(autocomplete_off[i]);
+ node.setAttribute("autocomplete",node.style.autocomplete);
+}
+//]]>
+</script>
+<script type="text/javascript">
+//<![CDATA[
typesel_change();
//]]>
</script>
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index 61fef62..b879481 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -539,13 +539,13 @@ include("fbegin.inc"); ?>
"this rule should match."); ?><br/>
<?=gettext("Hint: in most cases, you should specify"); ?> <em><?=gettext("TCP"); ?></em> &nbsp;<?=gettext("here."); ?></span></td>
</tr>
- <tr id="showadvancedboxsrc" name="showadvancedboxsrc">
+ <tr id="showadvancedboxsrc">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Source"); ?></td>
<td width="78%" class="vtable">
<input type="button" onclick="show_source()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show source address and port range"); ?>
</td>
</tr>
- <tr style="display: none;" id="srctable" name="srctable">
+ <tr style="display: none;" id="srctable">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Source"); ?></td>
<td width="78%" class="vtable">
<input name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked=\"checked\""; ?> />
@@ -561,23 +561,23 @@ include("fbegin.inc"); ?>
<select name="srctype" class="formselect" onchange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['src']); ?>
- <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
- <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected=\"selected\""; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
- <option value="network" <?php if (!$sel) echo "selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
+ <option value="any" <?php if ($pconfig['src'] == "any") { echo " selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
+ <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo " selected=\"selected\""; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
+ <option value="network" <?php if (!$sel) echo " selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected=\"selected\""; } ?>><?=gettext("PPTP clients"); ?></option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo " selected=\"selected\""; } ?>><?=gettext("PPTP clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected=\"selected\""; } ?>><?=gettext("PPPoE clients"); ?></option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo " selected=\"selected\""; } ?>><?=gettext("PPPoE clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo "selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
+ <option value="l2tp" <?php if ($pconfig['src'] == "l2tp") { echo " selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
<?php endif; ?>
<?php
foreach ($ifdisp as $ifent => $ifdesc): ?>
<?php if(have_ruleint_access($ifent)): ?>
- <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo "selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
- <option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo "selected=\"selected\""; } ?>>
+ <option value="<?=$ifent;?>" <?php if ($pconfig['src'] == $ifent) { echo " selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
+ <option value="<?=$ifent;?>ip"<?php if ($pconfig['src'] == $ifent . "ip") { echo " selected=\"selected\""; } ?>>
<?=$ifdesc?> <?=gettext("address");?>
</option>
<?php endif; ?>
@@ -588,10 +588,10 @@ include("fbegin.inc"); ?>
<tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td>
- <input autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> /
+ <input style="autocomplete:off" name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> /
<select name="srcmask" class="formselect" id="srcmask">
<?php for ($i = 31; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo " selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
@@ -599,7 +599,7 @@ include("fbegin.inc"); ?>
</table>
</td>
</tr>
- <tr style="display:none" id="sprtable" name="sprtable">
+ <tr style="display:none" id="sprtable">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Source port range"); ?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0" summary="source port range">
@@ -608,12 +608,12 @@ include("fbegin.inc"); ?>
<td>
<select name="srcbeginport" class="formselect" onchange="src_rep_change();ext_change()">
<option value="">(<?=gettext("other"); ?>)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any"); ?></option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo " selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any"); ?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
- <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
+ <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo " selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
</select>
- <input autocomplete='off' class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcbeginport']) echo htmlspecialchars($pconfig['srcbeginport']); ?>" />
+ <input style="autocomplete:off" class="formfldalias" name="srcbeginport_cust" id="srcbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcbeginport']) echo htmlspecialchars($pconfig['srcbeginport']); ?>" />
</td>
</tr>
<tr>
@@ -621,12 +621,12 @@ include("fbegin.inc"); ?>
<td>
<select name="srcendport" class="formselect" onchange="ext_change()">
<option value="">(<?=gettext("other"); ?>)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any"); ?></option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo " selected=\"selected\""; $bfound = 1; } ?>><?=gettext("any"); ?></option>
<?php foreach ($wkports as $wkport => $wkportdesc): ?>
- <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo "selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
+ <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo " selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
</select>
- <input autocomplete='off' class="formfldalias" name="srcendport_cust" id="srcendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcendport']) echo htmlspecialchars($pconfig['srcendport']); ?>" />
+ <input style="autocomplete:off" class="formfldalias" name="srcendport_cust" id="srcendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcendport']) echo htmlspecialchars($pconfig['srcendport']); ?>" />
</td>
</tr>
</table>
@@ -650,23 +650,23 @@ include("fbegin.inc"); ?>
<select name="dsttype" class="formselect" onchange="typesel_change()">
<?php
$sel = is_specialnet($pconfig['dst']); ?>
- <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
- <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected=\"selected\""; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
- <option value="network" <?php if (!$sel) echo "selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
+ <option value="any" <?php if ($pconfig['dst'] == "any") { echo " selected=\"selected\""; } ?>><?=gettext("any"); ?></option>
+ <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo " selected=\"selected\""; $sel = 1; } ?>><?=gettext("Single host or alias"); ?></option>
+ <option value="network" <?php if (!$sel) echo " selected=\"selected\""; ?>><?=gettext("Network"); ?></option>
<?php if(have_ruleint_access("pptp")): ?>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected=\"selected\""; } ?>><?=gettext("PPTP clients"); ?></option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo " selected=\"selected\""; } ?>><?=gettext("PPTP clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("pppoe")): ?>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected=\"selected\""; } ?>><?=gettext("PPPoE clients"); ?></option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo " selected=\"selected\""; } ?>><?=gettext("PPPoE clients"); ?></option>
<?php endif; ?>
<?php if(have_ruleint_access("l2tp")): ?>
- <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo "selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
+ <option value="l2tp" <?php if ($pconfig['dst'] == "l2tp") { echo " selected=\"selected\""; } ?>><?=gettext("L2TP clients"); ?></option>
<?php endif; ?>
<?php foreach ($ifdisp as $if => $ifdesc): ?>
<?php if(have_ruleint_access($if)): ?>
- <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo "selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
- <option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo "selected=\"selected\""; } ?>>
+ <option value="<?=$if;?>" <?php if ($pconfig['dst'] == $if) { echo " selected=\"selected\""; } ?>><?=htmlspecialchars($ifdesc);?> <?=gettext("net"); ?></option>
+ <option value="<?=$if;?>ip"<?php if ($pconfig['dst'] == $if . "ip") { echo " selected=\"selected\""; } ?>>
<?=$ifdesc;?> <?=gettext("address");?>
</option>
<?php endif; ?>
@@ -683,11 +683,11 @@ include("fbegin.inc"); ?>
for ($i = 0; $i <= $len; $i++):
$snip = long2ip32($start+$i);
?>
- <option value="<?=$snip;?>" <?php if ($snip == $pconfig['dst']) echo "selected=\"selected\""; ?>><?=htmlspecialchars("{$snip} ({$sn['descr']})");?></option>
+ <option value="<?=$snip;?>" <?php if ($snip == $pconfig['dst']) echo " selected=\"selected\""; ?>><?=htmlspecialchars("{$snip} ({$sn['descr']})");?></option>
<?php endfor;
else:
?>
- <option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['dst']) echo "selected=\"selected\""; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
+ <option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['dst']) echo " selected=\"selected\""; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
<?php endif;
endforeach;
endif;
@@ -698,12 +698,12 @@ include("fbegin.inc"); ?>
<tr>
<td><?=gettext("Address:"); ?>&nbsp;&nbsp;</td>
<td>
- <input autocomplete='off' name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
+ <input style="autocomplete:off" name="dst" type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>" />
/
<select name="dstmask" class="formselect" id="dstmask">
<?php
for ($i = 31; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo " selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
@@ -711,7 +711,7 @@ include("fbegin.inc"); ?>
</table>
</td>
</tr>
- <tr id="dprtr" name="dprtr">
+ <tr id="dprtr">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Destination port range"); ?> </td>
<td width="78%" class="vtable">
<table border="0" cellspacing="0" cellpadding="0" summary="destination port range">
@@ -722,10 +722,10 @@ include("fbegin.inc"); ?>
<option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
- <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "selected=\"selected\""; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
+ <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo " selected=\"selected\""; $bfound = 1; }?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
</select>
- <input autocomplete='off' class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstbeginport']) echo htmlspecialchars($pconfig['dstbeginport']); ?>" />
+ <input style="autocomplete:off" class="formfldalias" name="dstbeginport_cust" id="dstbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstbeginport']) echo htmlspecialchars($pconfig['dstbeginport']); ?>" />
</td>
</tr>
<tr>
@@ -735,10 +735,10 @@ include("fbegin.inc"); ?>
<option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
- <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
+ <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo " selected=\"selected\""; $bfound = 1; } ?>><?=htmlspecialchars($wkportdesc);?></option>
<?php endforeach; ?>
</select>
- <input autocomplete='off' class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstendport']) echo htmlspecialchars($pconfig['dstendport']); ?>" />
+ <input style="autocomplete:off" class="formfldalias" name="dstendport_cust" id="dstendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstendport']) echo htmlspecialchars($pconfig['dstendport']); ?>" />
</td>
</tr>
</table>
@@ -750,28 +750,28 @@ include("fbegin.inc"); ?>
</span>
</td>
</tr>
- <tr name="localiptable" id="localiptable">
+ <tr id="localiptable">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target IP"); ?></td>
<td width="78%" class="vtable">
- <input autocomplete='off' name="localip" type="text" class="formfldalias" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>" />
+ <input style="autocomplete:off" name="localip" type="text" class="formfldalias" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip']);?>" />
<br/> <span class="vexpl"><?=gettext("Enter the internal IP address of " .
"the server on which you want to map the ports."); ?><br/>
<?=gettext("e.g."); ?> <em>192.168.1.12</em></span></td>
</tr>
- <tr name="lprtr" id="lprtr">
+ <tr id="lprtr">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target port"); ?></td>
<td width="78%" class="vtable">
<select name="localbeginport" id="localbeginport" class="formselect" onchange="ext_change();check_for_aliases();">
<option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0; foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['localbeginport']) {
- echo "selected=\"selected\"";
+ echo " selected=\"selected\"";
$bfound = 1;
}?>>
<?=htmlspecialchars($wkportdesc);?>
</option>
<?php endforeach; ?>
- </select> <input onchange="check_for_aliases();" autocomplete='off' class="formfldalias" name="localbeginport_cust" id="localbeginport_cust" type="text" size="5" value="<?php if (!$bfound) echo htmlspecialchars($pconfig['localbeginport']); ?>" />
+ </select> <input onchange="check_for_aliases();" style="autocomplete:off" class="formfldalias" name="localbeginport_cust" id="localbeginport_cust" type="text" size="5" value="<?php if (!$bfound) echo htmlspecialchars($pconfig['localbeginport']); ?>" />
<br/>
<span class="vexpl"><?=gettext("Specify the port on the machine with the " .
"IP address entered above. In case of a port range, specify " .
@@ -797,15 +797,15 @@ include("fbegin.inc"); ?>
<td width="22%" valign="top" class="vncell"><?=gettext("NAT reflection"); ?></td>
<td width="78%" class="vtable">
<select name="natreflection" class="formselect">
- <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "purenat" && $pconfig['natreflection'] != "disable") echo "selected=\"selected\""; ?>><?=gettext("Use system default"); ?></option>
- <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected=\"selected\""; ?>><?=gettext("Enable (NAT + Proxy)"); ?></option>
- <option value="purenat" <?php if ($pconfig['natreflection'] == "purenat") echo "selected=\"selected\""; ?>><?=gettext("Enable (Pure NAT)"); ?></option>
- <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected=\"selected\""; ?>><?=gettext("Disable"); ?></option>
+ <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "purenat" && $pconfig['natreflection'] != "disable") echo " selected=\"selected\""; ?>><?=gettext("Use system default"); ?></option>
+ <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo " selected=\"selected\""; ?>><?=gettext("Enable (NAT + Proxy)"); ?></option>
+ <option value="purenat" <?php if ($pconfig['natreflection'] == "purenat") echo " selected=\"selected\""; ?>><?=gettext("Enable (Pure NAT)"); ?></option>
+ <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo " selected=\"selected\""; ?>><?=gettext("Disable"); ?></option>
</select>
</td>
</tr>
<?php if (isset($id) && $a_nat[$id] && !isset($_GET['dup'])): ?>
- <tr name="assoctable" id="assoctable">
+ <tr id="assoctable">
<td width="22%" valign="top" class="vncell"><?=gettext("Filter rule association"); ?></td>
<td width="78%" class="vtable">
<select name="associated-rule-id">
@@ -836,7 +836,7 @@ include("fbegin.inc"); ?>
</tr>
<?php endif; ?>
<?php if ((!(isset($id) && $a_nat[$id])) || (isset($_GET['dup']))): ?>
- <tr name="assoctable" id="assoctable">
+ <tr id="assoctable">
<td width="22%" valign="top" class="vncell"><?=gettext("Filter rule association"); ?></td>
<td width="78%" class="vtable">
<select name="filter-rule-association" id="filter-rule-association">
@@ -898,6 +898,15 @@ $has_updated_time = (isset($a_nat[$id]['updated']) && is_array($a_nat[$id]['upda
</form>
<script type="text/javascript">
//<![CDATA[
+var autocomplete_off = ['src', 'srcbeginport_cust', 'srcendport_cust', 'dst', 'dstbeginport_cust', 'dstendport_cust', 'localip', 'localbeginport_cust'];
+for (var i = 0; i < autocomplete_off.length; i++) {
+ var node = document.getElementById(autocomplete_off[i]);
+ node.setAttribute("autocomplete",node.style.autocomplete);
+}
+//]]>
+</script>
+<script type="text/javascript">
+//<![CDATA[
ext_change();
dst_change(document.iform.interface.value,'<?=htmlspecialchars($pconfig['interface'])?>','<?=htmlspecialchars($pconfig['dst'])?>');
var iface_old = document.iform.interface.value;
diff --git a/usr/local/www/firewall_nat_npt_edit.php b/usr/local/www/firewall_nat_npt_edit.php
index f0ffbab..583490f 100644
--- a/usr/local/www/firewall_nat_npt_edit.php
+++ b/usr/local/www/firewall_nat_npt_edit.php
@@ -197,7 +197,7 @@ include("head.inc");
foreach ($interfaces as $iface => $ifacename):
?>
- <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
+ <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo " selected=\"selected\""; ?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
@@ -221,7 +221,7 @@ include("head.inc");
<input name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>" /> /
<select name="srcmask" class="formselect" id="srcmask">
<?php for ($i = 128; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo " selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
@@ -251,7 +251,7 @@ external prefix.");
<select name="dstmask" class="formselect" id="dstmask">
<?php
for ($i = 128; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected=\"selected\""; ?>><?=$i;?></option>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo " selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
</td>
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 7072fe0..a187afd 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -473,7 +473,7 @@ function poolopts_change() {
$interfaces["openvpn"] = "OpenVPN";
foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""; ?>>
+ <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo " selected=\"selected\""; ?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
@@ -487,7 +487,7 @@ function poolopts_change() {
<select name="protocol" class="formselect" onchange="proto_change();">
<?php $protocols = explode(" ", "any TCP UDP TCP/UDP ICMP ESP AH GRE IPV6 IGMP carp pfsync");
foreach ($protocols as $proto): ?>
- <option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['protocol']) echo "selected=\"selected\""; ?>><?=htmlspecialchars($proto);?></option>
+ <option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['protocol']) echo " selected=\"selected\""; ?>><?=htmlspecialchars($proto);?></option>
<?php endforeach; ?>
</select> <br/> <span class="vexpl"><?=gettext("Choose which protocol this rule should match.");?><br />
<?php printf(gettext("Hint: in most cases, you should specify %s any %s here."),"<em>","</em>&nbsp;");?></span>
@@ -501,14 +501,14 @@ function poolopts_change() {
<td><?=gettext("Type:");?>&nbsp;&nbsp;</td>
<td>
<select name="source_type" class="formselect" onchange="sourcesel_change()">
- <option value="any" <?php if ($pconfig['source'] == "any") echo "selected=\"selected\""; ?>><?=gettext("any");?></option>
- <option value="network" <?php if ($pconfig['source'] != "any") echo "selected=\"selected\""; ?>><?=gettext("Network");?></option>
+ <option value="any" <?php if ($pconfig['source'] == "any") echo " selected=\"selected\""; ?>><?=gettext("any");?></option>
+ <option value="network" <?php if ($pconfig['source'] != "any") echo " selected=\"selected\""; ?>><?=gettext("Network");?></option>
</select>
</td>
</tr>
<tr>
<td><?=gettext("Address:");?>&nbsp;&nbsp;</td>
- <td><input name="source" type="text" autocomplete="off" class="formfldalias" id="source" size="20" value="<?=htmlspecialchars($pconfig['source']);?>" />/<select name="source_subnet" class="formfld" id="source_subnet">
+ <td><input name="source" type="text" style="autocomplete:off" class="formfldalias" id="source" size="20" value="<?=htmlspecialchars($pconfig['source']);?>" />/<select name="source_subnet" class="formfld" id="source_subnet">
<?php for ($i = 32; $i >= 0; $i--): ?>
<option value="<?=$i;?>"<?php if ($i == $pconfig['source_subnet']) echo " selected=\"selected\""; ?>><?=$i;?></option>
<?php endfor; ?>
@@ -518,9 +518,9 @@ function poolopts_change() {
<td>&nbsp;</td>
<td><span class="vexpl"><?=gettext("Enter the source network for the outbound NAT mapping.");?></span></td>
</tr>
- <tr name="sport_tr" id="sport_tr">
+ <tr id="sport_tr">
<td><?=gettext("Source port:");?>&nbsp;&nbsp;</td>
- <td><input name="sourceport" type="text" autocomplete="off" class="formfldalias" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>" /> <?=gettext("(leave blank for any)");?></td>
+ <td><input name="sourceport" type="text" style="autocomplete:off" class="formfldalias" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>" /> <?=gettext("(leave blank for any)");?></td>
</tr>
</table></td>
</tr>
@@ -543,7 +543,7 @@ function poolopts_change() {
</tr>
<tr>
<td><?=gettext("Address:");?>&nbsp;&nbsp;</td>
- <td><input name="destination" type="text" autocomplete="off" class="formfldalias" id="destination" size="20" value="<?=htmlspecialchars($pconfig['destination']);?>" />
+ <td><input name="destination" type="text" style="autocomplete:off" class="formfldalias" id="destination" size="20" value="<?=htmlspecialchars($pconfig['destination']);?>" />
/
<select name="destination_subnet" class="formselect" id="destination_subnet">
<?php for ($i = 32; $i >= 0; $i--): ?>
@@ -556,14 +556,14 @@ function poolopts_change() {
<td><span class="vexpl"><?=gettext("Enter the destination network for ".
"the outbound NAT mapping.");?></span></td>
</tr>
- <tr name="dport_tr" id="dport_tr">
+ <tr id="dport_tr">
<td><?=gettext("Destination port:");?>&nbsp;&nbsp;</td>
- <td><input name="dstport" type="text" autocomplete="off" class="formfldalias" id="dstport" size="5" value="<?=htmlspecialchars($pconfig['dstport']);?>" /> <?=gettext("(leave blank for any)");?></td>
+ <td><input name="dstport" type="text" style="autocomplete:off" class="formfldalias" id="dstport" size="5" value="<?=htmlspecialchars($pconfig['dstport']);?>" /> <?=gettext("(leave blank for any)");?></td>
</tr>
</table>
</td>
</tr>
- <tr name="transtable" id="transtable">
+ <tr id="transtable">
<td width="22%" valign="top" class="vncell"><?=gettext("Translation");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="1" cellpadding="1" summary="translation">
@@ -579,20 +579,20 @@ function poolopts_change() {
$start = ip2long32(gen_subnet($sn['subnet'], $sn['subnet_bits']));
$end = ip2long32(gen_subnet_max($sn['subnet'], $sn['subnet_bits']));
$len = $end - $start; ?>
- <option value="<?=$sn['subnet'].'/'.$sn['subnet_bits'];?>" <?php if ($sn['subnet'].'/'.$sn['subnet_bits'] == $pconfig['target']) echo "selected=\"selected\""; ?>><?=htmlspecialchars("Subnet: {$sn['subnet']}/{$sn['subnet_bits']} ({$sn['descr']})");?></option>
+ <option value="<?=$sn['subnet'].'/'.$sn['subnet_bits'];?>" <?php if ($sn['subnet'].'/'.$sn['subnet_bits'] == $pconfig['target']) echo " selected=\"selected\""; ?>><?=htmlspecialchars("Subnet: {$sn['subnet']}/{$sn['subnet_bits']} ({$sn['descr']})");?></option>
<?php for ($i = 0; $i <= $len; $i++):
$snip = long2ip32($start+$i);
?>
<option value="<?=$snip;?>" <?php if ($snip == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$snip} ({$sn['descr']})");?></option>
<?php endfor; ?>
<?php else: ?>
- <option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo "selected=\"selected\""; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
+ <option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo " selected=\"selected\""; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
<?php endif; endforeach;
endif;
foreach ($a_aliases as $alias):
if ($alias['type'] != "host")
continue; ?>
- <option value="<?=$alias['name'];?>" <?php if ($alias['name'] == $pconfig['target']) echo "selected=\"selected\""; ?>><?=htmlspecialchars("Host Alias: {$alias['name']} ({$alias['descr']})");?></option>
+ <option value="<?=$alias['name'];?>" <?php if ($alias['name'] == $pconfig['target']) echo " selected=\"selected\""; ?>><?=htmlspecialchars("Host Alias: {$alias['name']} ({$alias['descr']})");?></option>
<?php endforeach; ?>
<option value="other-subnet"<?php if($pconfig['target'] == "other-subnet") echo " selected=\"selected\""; ?>><?=gettext("Other Subnet (Enter Below)");?></option>
</select>
@@ -620,13 +620,13 @@ function poolopts_change() {
<td valign="top">Pool Options</td>
<td>
<select name="poolopts" id="poolopts">
- <option value="" <?php if ($pconfig['poolopts'] == "" ) echo "selected=\"selected\""; ?>><?=htmlspecialchars("Default" );?></option>
- <option value="round-robin" <?php if ($pconfig['poolopts'] == "round-robin" ) echo "selected=\"selected\""; ?>><?=htmlspecialchars("Round Robin" );?></option>
- <option value="round-robin sticky-address" <?php if ($pconfig['poolopts'] == "round-robin sticky-address") echo "selected=\"selected\""; ?>><?=htmlspecialchars("Round Robin with Sticky Address");?></option>
- <option value="random" <?php if ($pconfig['poolopts'] == "random" ) echo "selected=\"selected\""; ?>><?=htmlspecialchars("Random" );?></option>
- <option value="random sticky-address" <?php if ($pconfig['poolopts'] == "random sticky-address" ) echo "selected=\"selected\""; ?>><?=htmlspecialchars("Random with Sticky Address" );?></option>
- <option value="source-hash" <?php if ($pconfig['poolopts'] == "source-hash" ) echo "selected=\"selected\""; ?>><?=htmlspecialchars("Source Hash" );?></option>
- <option value="bitmask" <?php if ($pconfig['poolopts'] == "bitmask" ) echo "selected=\"selected\""; ?>><?=htmlspecialchars("Bitmask" );?></option>
+ <option value="" <?php if ($pconfig['poolopts'] == "" ) echo " selected=\"selected\""; ?>><?=htmlspecialchars("Default" );?></option>
+ <option value="round-robin" <?php if ($pconfig['poolopts'] == "round-robin" ) echo " selected=\"selected\""; ?>><?=htmlspecialchars("Round Robin" );?></option>
+ <option value="round-robin sticky-address" <?php if ($pconfig['poolopts'] == "round-robin sticky-address") echo " selected=\"selected\""; ?>><?=htmlspecialchars("Round Robin with Sticky Address");?></option>
+ <option value="random" <?php if ($pconfig['poolopts'] == "random" ) echo " selected=\"selected\""; ?>><?=htmlspecialchars("Random" );?></option>
+ <option value="random sticky-address" <?php if ($pconfig['poolopts'] == "random sticky-address" ) echo " selected=\"selected\""; ?>><?=htmlspecialchars("Random with Sticky Address" );?></option>
+ <option value="source-hash" <?php if ($pconfig['poolopts'] == "source-hash" ) echo " selected=\"selected\""; ?>><?=htmlspecialchars("Source Hash" );?></option>
+ <option value="bitmask" <?php if ($pconfig['poolopts'] == "bitmask" ) echo " selected=\"selected\""; ?>><?=htmlspecialchars("Bitmask" );?></option>
</select><br/>
<span class="vexpl">
<?=gettext("Only Round Robin types work with Host Aliases. Any type can be used with a Subnet.");?><br/>
@@ -638,14 +638,14 @@ function poolopts_change() {
</span><br/>
</td>
</tr>
- <tr name="tport_tr" id="tport_tr">
+ <tr id="tport_tr">
<td><?=gettext("Port:");?>&nbsp;&nbsp;</td>
<td><input name="natport" type="text" class="formfld unknown" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>" /></td>
</tr>
- <tr name="tporttext_tr" id="tporttext_tr"><td>&nbsp;</td><td>
+ <tr id="tporttext_tr"><td>&nbsp;</td><td>
<span class="vexpl"><?=gettext("Enter the source port for the outbound NAT mapping.");?></span>
</td></tr>
- <tr name="tportstatic_tr" id="tportstatic_tr">
+ <tr id="tportstatic_tr">
<td><?=gettext("Static-port:");?>&nbsp;&nbsp;</td>
<td><input onchange="staticportchange();" name="staticnatport" type="checkbox" class="formfld" id="staticnatport" size="5"<?php if($pconfig['staticnatport']) echo " checked=\"checked\"";?> /></td>
</tr>
@@ -712,6 +712,15 @@ $has_updated_time = (isset($a_out[$id]['updated']) && is_array($a_out[$id]['upda
</form>
<script type="text/javascript">
//<![CDATA[
+var autocomplete_off = ['source', 'sourceport', 'destination', 'dstport''];
+for (var i = 0; i < autocomplete_off.length; i++) {
+ var node = document.getElementById(autocomplete_off[i]);
+ node.setAttribute("autocomplete",node.style.autocomplete);
+}
+//]]>
+</script>
+<script type="text/javascript">
+//<![CDATA[
sourcesel_change();
typesel_change();
staticportchange();
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 525e40d..24788d9 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -420,11 +420,11 @@ if ($_POST) {
$input_errors[] = gettext("You can not use IPv6 addresses in IPv4 rules.");
if((is_ipaddrv4($_POST['src']) || is_ipaddrv4($_POST['dst'])) && ($_POST['ipprotocol'] == "inet6"))
$input_errors[] = gettext("You can not use IPv4 addresses in IPv6 rules.");
- if((is_ipaddr($_POST['src']) || is_ipaddr($_POST['dst'])) && ($_POST['ipprotocol'] == "inet46"))
- $input_errors[] = gettext("You can not use a IPv4 or IPv6 address in combined IPv4 + IPv6 rules.");
-
}
+ if((is_ipaddr($_POST['src']) || is_ipaddr($_POST['dst'])) && ($_POST['ipprotocol'] == "inet46"))
+ $input_errors[] = gettext("You can not use a IPv4 or IPv6 address in combined IPv4 + IPv6 rules.");
+
if ($_POST['srcbeginport'] > $_POST['srcendport']) {
/* swap */
$tmp = $_POST['srcendport'];
diff --git a/usr/local/www/firewall_schedule_edit.php b/usr/local/www/firewall_schedule_edit.php
index f430682..5de6a27 100644
--- a/usr/local/www/firewall_schedule_edit.php
+++ b/usr/local/www/firewall_schedule_edit.php
@@ -243,11 +243,11 @@ function repeatExistingDays(){
}
}
-function daytogglerepeating(week,daypos,bExists){
+function daytogglerepeating(year,week,daypos,bExists){
var tempstr, daycell, dayoriginal = "";
for (j=1; j<=53; j++)
{
- tempstr = 'w' + j + 'p' + daypos;
+ tempstr = 'y' + year +'w' + j + 'p' + daypos;
daycell = eval('document.getElementById(tempstr)');
dayoriginalpos = daysSelected.indexOf(tempstr);
@@ -280,8 +280,15 @@ function daytoggle(id) {
var bFoundValid = false;
iddashpos = id.search("-");
+
+ var tempstryearpos = id.search("y");
+ var tempstrweekpos = id.search("w");
var tempstrdaypos = id.search("p");
- var week = id.substring(1,tempstrdaypos);
+
+ var year = id.substring(tempstryearpos + 1,tempstrweekpos);
+ year = parseInt(year);
+
+ var week = id.substring(tempstrweekpos + 1,tempstrdaypos);
week = parseInt(week);
if (iddashpos == "-1")
@@ -309,7 +316,7 @@ function daytoggle(id) {
}
else if (daycell.style.backgroundColor == "#F08080") // lightcoral
{
- daytogglerepeating(week,daypos,true);
+ daytogglerepeating(year,week,daypos,true);
}
else //color is white cell
{
@@ -320,7 +327,7 @@ function daytoggle(id) {
else
{
daycell.style.backgroundColor = "#F08080"; // lightcoral
- daytogglerepeating(week,daypos,false);
+ daytogglerepeating(year,week,daypos,false);
}
daysSelected += id + ",";
}
@@ -330,7 +337,7 @@ function daytoggle(id) {
{
//we found an invalid cell when column was clicked, move up to the next week
week++;
- tempstr = "w" + week + "p" + daypos;
+ tempstr = "y" + year + "w" + week + "p" + daypos;
idmod = tempstr;
}
}
@@ -842,13 +849,13 @@ EOD;
<tr><td colspan="7" align="center" class="listbg"><b><?php echo date("F_Y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));?></b></td>
</tr>
<tr>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p1');"><u><b><?=gettext("Mon");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p2');"><u><b><?=gettext("Tue");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p3');"><u><b><?=gettext("Wed");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p4');"><u><b><?=gettext("Thu");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p5');"><u><b><?=gettext("Fri");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p6');"><u><b><?=gettext("Sat");?></b></u></td>
- <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('w1p7');"><u><b><?=gettext("Sun");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p1');"><u><b><?=gettext("Mon");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p2');"><u><b><?=gettext("Tue");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p3');"><u><b><?=gettext("Wed");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p4');"><u><b><?=gettext("Thu");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p5');"><u><b><?=gettext("Fri");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p6');"><u><b><?=gettext("Sat");?></b></u></td>
+ <td align="center" class="listhdrr" style="cursor: pointer;" onclick="daytoggle('y<?=$yearcounter;?>w1p7');"><u><b><?=gettext("Sun");?></b></u></td>
</tr>
<?php
$firstmonth = FALSE;
@@ -860,14 +867,14 @@ EOD;
echo "<tr>";
}
if ($firstdayofmonth == $positioncounter){?>
- <td align="center" style="cursor: pointer;" class="listr" id="w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
+ <td align="center" style="cursor: pointer;" class="listr" id="y<?=$yearcounter;?>w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('y<?=$yearcounter;?>w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
<?php echo $daycounter;
$daycounter++;
$firstdayprinted = TRUE;
echo "</td>";
}
elseif ($firstdayprinted == TRUE && $daycounter <= $numberofdays){?>
- <td align="center" style="cursor: pointer;" class="listr" id="w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
+ <td align="center" style="cursor: pointer;" class="listr" id="y<?=$yearcounter;?>w<?=$weekcounter;?>p<?=$positioncounter;?>" onclick="daytoggle('y<?=$yearcounter;?>w<?=$weekcounter;?>p<?=$positioncounter;?>-m<?=$monthcounter;?>d<?=$daycounter;?>');">
<?php echo $daycounter;
$daycounter++;
echo "</td>";
diff --git a/usr/local/www/firewall_shaper_layer7.php b/usr/local/www/firewall_shaper_layer7.php
index fe37735..2a1571e 100755
--- a/usr/local/www/firewall_shaper_layer7.php
+++ b/usr/local/www/firewall_shaper_layer7.php
@@ -213,11 +213,15 @@ else {
// Builds the left tree
$tree = "<ul class=\"tree\" >";
+$rowIndex = 0;
if (is_array($layer7_rules_list)) {
foreach ($layer7_rules_list as $tmpl7) {
+ $rowIndex++;
$tree .= $tmpl7->build_tree();
}
}
+if ($rowIndex == 0)
+ $tree .= "<li></li>";
$tree .= "</ul>";
$output = "<table summary=\"output form\">";
diff --git a/usr/local/www/firewall_shaper_queues.php b/usr/local/www/firewall_shaper_queues.php
index c21d7e3..24c6274 100755
--- a/usr/local/www/firewall_shaper_queues.php
+++ b/usr/local/www/firewall_shaper_queues.php
@@ -58,13 +58,17 @@ if (!is_array($qlist))
$qlist = array();
$tree = "<ul class=\"tree\" >";
+$rowIndex = 0;
foreach ($qlist as $queue => $qkey) {
+ $rowIndex++;
$tree .= "<li><a href=\"firewall_shaper_queues.php?queue={$queue}&amp;action=show\" >";
if (isset($shaperIFlist[$queue]))
$tree .= $shaperIFlist[$queue] . "</a></li>";
else
$tree .= $queue . "</a></li>";
}
+if ($rowIndex == 0)
+ $tree .= "<li></li>";
$tree .= "</ul>";
if ($_GET) {
diff --git a/usr/local/www/firewall_shaper_vinterface.php b/usr/local/www/firewall_shaper_vinterface.php
index 24f7fff..7e36fc1 100644
--- a/usr/local/www/firewall_shaper_vinterface.php
+++ b/usr/local/www/firewall_shaper_vinterface.php
@@ -303,11 +303,15 @@ if ($queue) {
}
$tree = "<ul class=\"tree\" >";
+$rowIndex = 0;
if (is_array($dummynet_pipe_list)) {
foreach ($dummynet_pipe_list as $tmpdn) {
+ $rowIndex++;
$tree .= $tmpdn->build_tree();
}
}
+if ($rowIndex == 0)
+ $tree .= "<li></li>";
$tree .= "</ul>";
if (!$dontshow || $newqueue) {
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index a17c514..8cb2d9f 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -349,7 +349,7 @@ function print_info_box_np($msg, $name="apply",$value="", $showapply=false) {
&nbsp;&nbsp;&nbsp;<img class="infoboxnpimg" src="/themes/{$g['theme']}/images/icons/icon_exclam.gif" alt="exclamation" />
</td>
<td class="infoboxnptd2">
- <b>{$msg}</b>
+ {$msg}
</td>
{$savebutton}
</tr>
@@ -495,6 +495,10 @@ function pprint_port($port) {
function firewall_check_for_advanced_options(&$item) {
$item_set = "";
+ if($item['os'])
+ $item_set .= "os {$item['os']} ";
+ if($item['dscp'])
+ $item_set .= "dscp {$item['dscp']} ";
if($item['max'])
$item_set .= "max {$item['max']} ";
if($item['max-src-nodes'])
@@ -503,22 +507,32 @@ function firewall_check_for_advanced_options(&$item) {
$item_set .= "max-src-conn {$item['max-src-conn']} ";
if($item['max-src-states'])
$item_set .= "max-src-states {$item['max-src-states']} ";
+ if(isset($item['nopfsync']))
+ $item_set .= "nopfsync ";
if($item['statetype'] != "keep state" && $item['statetype'] != "")
$item_set .= "statetype {$item['statetype']} ";
if($item['statetimeout'])
$item_set .= "statetimeout {$item['statetimeout']} ";
- if($item['nosync'])
- $item_set .= "nosync ";
+ if(isset($item['nosync']))
+ $item_set .= "no XMLRPC Sync ";
if($item['max-src-conn-rate'])
$item_set .= "max-src-conn-rate {$item['max-src-conn-rate']} ";
if($item['max-src-conn-rates'])
$item_set .= "max-src-conn-rates {$item['max-src-conn-rates']} ";
+ if($item['vlanprio'])
+ $item_set .= "vlanprio {$item['vlanprio']} ";
+ if($item['vlanprioset'])
+ $item_set .= "vlanprioset {$item['vlanprioset']} ";
if($item['gateway'])
$item_set .= "gateway {$item['gateway']} ";
if($item['dnpipe'])
$item_set .= "limiter {$item['dnpipe']} ";
if($item['pdnpipe'])
$item_set .= "limiter {$item['pdnpipe']} ";
+ if($item['ackqueue'])
+ $item_set .= "ackqueue {$item['ackqueue']} ";
+ if($item['defaultqueue'])
+ $item_set .= "defaultqueue {$item['defaultqueue']} ";
if($item['l7container'])
$item_set .= "layer7 {$item['l7container']} ";
if($item['tag'])
diff --git a/usr/local/www/pkg_mgr_installed.php b/usr/local/www/pkg_mgr_installed.php
index 03d5441..1308213 100755
--- a/usr/local/www/pkg_mgr_installed.php
+++ b/usr/local/www/pkg_mgr_installed.php
@@ -206,7 +206,7 @@ include("head.inc");
<?php endif; ?>
</td>
<td valign="middle" class="list nowrap">
- <a onclick="return confirm('<?=gettext("Do you really want to remove {$pkg['name']} package?"); ?>')" href="pkg_mgr_install.php?mode=delete&amp;pkg=<?= $pkg['name']; ?>">
+ <a href="pkg_mgr_install.php?mode=delete&amp;pkg=<?= $pkg['name']; ?>">
<img <?=domTT_title(gettext("Remove ".ucfirst($pkg['name'])." package."))?> src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="delete" />
</a>
<br/>
diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php
index 4edc39f..a7edc3d 100644
--- a/usr/local/www/services_captiveportal_vouchers.php
+++ b/usr/local/www/services_captiveportal_vouchers.php
@@ -285,7 +285,8 @@ if ($_POST) {
$url = "http://{$newvoucher['vouchersyncdbip']}";
$execcmd = <<<EOF
- \$toreturn['voucher'] = \$config['voucher'][$cpzone];
+ \$toreturn = array();
+ \$toreturn['voucher'] = \$config['voucher']['$cpzone'];
unset(\$toreturn['vouchersyncport'], \$toreturn['vouchersyncpass'], \$toreturn['vouchersyncusername'], \$toreturn['vouchersyncdbip']);
EOF;
diff --git a/usr/local/www/services_dhcp.php b/usr/local/www/services_dhcp.php
index 3b136c9..a76c9c7 100755
--- a/usr/local/www/services_dhcp.php
+++ b/usr/local/www/services_dhcp.php
@@ -109,7 +109,7 @@ if($config['installedpackages']['olsrd']) {
}
if (!$_GET['if'])
- $savemsg = "<b>" . gettext("The DHCP Server can only be enabled on interfaces configured with static IP addresses") . ".<p>" . gettext("Only interfaces configured with a static IP will be shown") . ".</p></b>";
+ $savemsg = "<b>" . gettext("The DHCP Server can only be enabled on interfaces configured with static IP addresses") . ".</b><p><b>" . gettext("Only interfaces configured with a static IP will be shown") . ".</b></p>";
$iflist = get_configured_interface_with_descr();
@@ -562,10 +562,13 @@ include("head.inc");
?>
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+
<script type="text/javascript" src="/javascript/row_helper.js">
</script>
<script type="text/javascript">
+//<![CDATA[
function itemtype_field(fieldname, fieldsize, n) {
return '<select name="' + fieldname + n + '" class="formselect" id="' + fieldname + n + '"><?php
$customitemtypes = array('text' => gettext('Text'), 'string' => gettext('String'), 'boolean' => gettext('Boolean'),
@@ -585,6 +588,7 @@ include("head.inc");
rowname[2] = "value";
rowtype[2] = "textbox";
rowsize[2] = "40";
+//]]>
</script>
<script type="text/javascript" language="JavaScript">
@@ -669,7 +673,6 @@ include("head.inc");
}
</script>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<form action="services_dhcp.php" method="post" name="iform" id="iform">
<?php if ($input_errors) print_input_errors($input_errors); ?>
@@ -683,8 +686,8 @@ include("head.inc");
exit;
}
?>
-<?php if (is_subsystem_dirty('staticmaps')): ?><p>
-<?php print_info_box_np(gettext("The static mapping configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
+<?php if (is_subsystem_dirty('staticmaps')): ?><p/>
+<?php print_info_box_np(gettext("The static mapping configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td>
@@ -723,7 +726,7 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
- <input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false)">
+ <input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\""; ?> onclick="enable_change(false)"/>
<strong><?php printf(gettext("Enable DHCP server on " .
"%s " .
"interface"),htmlspecialchars($iflist[$if]));?></strong></td>
@@ -736,15 +739,15 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
- <input name="denyunknown" id="denyunknown" type="checkbox" value="yes" <?php if ($pconfig['denyunknown']) echo "checked"; ?>>
- <strong><?=gettext("Deny unknown clients");?></strong><br>
+ <input name="denyunknown" id="denyunknown" type="checkbox" value="yes" <?php if ($pconfig['denyunknown']) echo "checked=\"checked\""; ?>/>
+ <strong><?=gettext("Deny unknown clients");?></strong><br />
<?=gettext("If this is checked, only the clients defined below will get DHCP leases from this server. ");?></td>
</tr>
<?php if (is_numeric($pool) || ($act == "newpool")): ?>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Pool Description");?></td>
<td width="78%" class="vtable">
- <input name="descr" type="text" class="formfld unknown" id="descr" size="20" value="<?=htmlspecialchars($pconfig['descr']);?>">
+ <input name="descr" type="text" class="formfld unknown" id="descr" size="20" value="<?=htmlspecialchars($pconfig['descr']);?>"/>
</td>
</tr>
<?php endif; ?>
@@ -796,7 +799,7 @@ include("head.inc");
for ($i = 32; $i > 0; $i--) {
if($i <> 31) {
echo "<option value=\"{$i}\" ";
- if ($i == $pconfig['netmask']) echo "selected";
+ if ($i == $pconfig['netmask']) echo "selected=\"selected\"";
echo ">" . $i . "</option>";
}
}
@@ -808,8 +811,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Range");?></td>
<td width="78%" class="vtable">
- <input name="range_from" type="text" class="formfld unknown" id="range_from" size="20" value="<?=htmlspecialchars($pconfig['range_from']);?>">
- &nbsp;<?=gettext("to"); ?>&nbsp; <input name="range_to" type="text" class="formfld unknown" id="range_to" size="20" value="<?=htmlspecialchars($pconfig['range_to']);?>">
+ <input name="range_from" type="text" class="formfld unknown" id="range_from" size="20" value="<?=htmlspecialchars($pconfig['range_from']);?>"/>
+ &nbsp;<?=gettext("to"); ?>&nbsp; <input name="range_to" type="text" class="formfld unknown" id="range_to" size="20" value="<?=htmlspecialchars($pconfig['range_to']);?>"/>
</td>
</tr>
<?php if (!is_numeric($pool) && !($act == "newpool")): ?>
@@ -826,7 +829,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17"></td>
- <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&act=newpool"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&amp;act=newpool"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
@@ -844,11 +847,11 @@ include("head.inc");
<td class="listr" ondblclick="document.location='services_dhcp.php?if=<?=htmlspecialchars($if);?>&pool=<?=$i;?>';">
<?=htmlspecialchars($poolent['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list">
+ <td valign="middle" nowrap="nowrap" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&pool=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&act=delpool&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this pool?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&pool=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" alt="" width="17" height="17" border="0"/></a></td>
+ <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&amp;act=delpool&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this pool?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
@@ -862,7 +865,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17"></td>
- <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&act=newpool"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&amp;act=newpool"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
@@ -874,56 +877,56 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("WINS servers");?></td>
<td width="78%" class="vtable">
- <input name="wins1" type="text" class="formfld unknown" id="wins1" size="20" value="<?=htmlspecialchars($pconfig['wins1']);?>"><br>
- <input name="wins2" type="text" class="formfld unknown" id="wins2" size="20" value="<?=htmlspecialchars($pconfig['wins2']);?>">
+ <input name="wins1" type="text" class="formfld unknown" id="wins1" size="20" value="<?=htmlspecialchars($pconfig['wins1']);?>"/><br />
+ <input name="wins2" type="text" class="formfld unknown" id="wins2" size="20" value="<?=htmlspecialchars($pconfig['wins2']);?>"/>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
<td width="78%" class="vtable">
- <input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>"><br>
- <input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>"><br>
+ <input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>"/><br />
+ <input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>"/><br />
<?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td>
<td width="78%" class="vtable">
- <input name="gateway" type="text" class="formfld host" id="gateway" size="20" value="<?=htmlspecialchars($pconfig['gateway']);?>"><br>
+ <input name="gateway" type="text" class="formfld host" id="gateway" size="20" value="<?=htmlspecialchars($pconfig['gateway']);?>"/><br />
<?=gettext("The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Domain name");?></td>
<td width="78%" class="vtable">
- <input name="domain" type="text" class="formfld unknown" id="domain" size="20" value="<?=htmlspecialchars($pconfig['domain']);?>"><br>
+ <input name="domain" type="text" class="formfld unknown" id="domain" size="20" value="<?=htmlspecialchars($pconfig['domain']);?>"/><br />
<?=gettext("The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
- <input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
+ <input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"/><br />
<?=gettext("The DHCP server can optionally provide a domain search list. Use the semicolon character as separator ");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Default lease time");?></td>
<td width="78%" class="vtable">
- <input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>">
- <?=gettext("seconds");?><br>
+ <input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>"/>
+ <?=gettext("seconds");?><br />
<?=gettext("This is used for clients that do not ask for a specific " .
- "expiration time."); ?><br>
+ "expiration time."); ?><br />
<?=gettext("The default is 7200 seconds.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Maximum lease time");?></td>
<td width="78%" class="vtable">
- <input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>">
- <?=gettext("seconds");?><br>
+ <input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>"/>
+ <?=gettext("seconds");?><br />
<?=gettext("This is the maximum lease time for clients that ask".
- " for a specific expiration time."); ?><br>
+ " for a specific expiration time."); ?><br />
<?=gettext("The default is 86400 seconds.");?>
</td>
</tr>
@@ -931,8 +934,8 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Failover peer IP:");?></td>
<td width="78%" class="vtable">
- <input name="failover_peerip" type="text" class="formfld host" id="failover_peerip" size="20" value="<?=htmlspecialchars($pconfig['failover_peerip']);?>"><br>
- <?=gettext("Leave blank to disable. Enter the interface IP address of the other machine. Machines must be using CARP. Interface's advskew determines whether the DHCPd process is Primary or Secondary. Ensure one machine's advskew<20 (and the other is >20).");?>
+ <input name="failover_peerip" type="text" class="formfld host" id="failover_peerip" size="20" value="<?=htmlspecialchars($pconfig['failover_peerip']);?>"/><br />
+ <?=gettext("Leave blank to disable. Enter the interface IP address of the other machine. Machines must be using CARP. Interface's advskew determines whether the DHCPd process is Primary or Secondary. Ensure one machine's advskew&lt;20 (and the other is >20).");?>
</td>
</tr>
<?php endif; ?>
@@ -943,7 +946,7 @@ include("head.inc");
<table>
<tr>
<td>
- <input valign="middle" type="checkbox" value="yes" name="staticarp" id="staticarp" <?php if($pconfig['staticarp']) echo " checked"; ?>>&nbsp;
+ <input style="vertical-align:middle" type="checkbox" value="yes" name="staticarp" id="staticarp" <?php if($pconfig['staticarp']) echo "checked=\"checked\""; ?>/>&nbsp;
</td>
<td><b><?=gettext("Enable Static ARP entries");?></b></td>
</tr>
@@ -964,7 +967,7 @@ include("head.inc");
<table>
<tr>
<td>
- <input name="dhcpleaseinlocaltime" type="checkbox" id="dhcpleaseinlocaltime" value="yes" <?php if ($pconfig['dhcpleaseinlocaltime']) echo "checked"; ?>>
+ <input name="dhcpleaseinlocaltime" type="checkbox" id="dhcpleaseinlocaltime" value="yes" <?php if ($pconfig['dhcpleaseinlocaltime']) echo "checked=\"checked\""; ?>/>
</td>
<td>
<strong>
@@ -987,13 +990,13 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable">
<div id="showddnsbox">
- <input type="button" onClick="show_ddns_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Dynamic DNS");?></a>
+ <input type="button" onclick="show_ddns_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Dynamic DNS");?>
</div>
<div id="showddns" style="display:none">
- <input valign="middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo " checked"; ?>>&nbsp;
+ <input style="vertical-align=middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo "checked=\"checked\""; ?>/>&nbsp;
<b><?=gettext("Enable registration of DHCP client names in DNS.");?></b><br />
- <p>
- <input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>"><br />
+ <p/>
+ <input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>"/><br />
<?=gettext("Note: Leave blank to disable dynamic DNS registration.");?><br />
<?=gettext("Enter the dynamic DNS domain which will be used to register client names in the DNS server.");?>
</div>
@@ -1003,12 +1006,12 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("MAC Address Control");?></td>
<td width="78%" class="vtable">
<div id="showmaccontrolbox">
- <input type="button" onClick="show_maccontrol_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show MAC Address Control");?></a>
+ <input type="button" onclick="show_maccontrol_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show MAC Address Control");?>
</div>
<div id="showmaccontrol" style="display:none">
- <input name="mac_allow" type="text" class="formfld unknown" id="mac_allow" size="20" value="<?=htmlspecialchars($pconfig['mac_allow']);?>"><br />
+ <input name="mac_allow" type="text" class="formfld unknown" id="mac_allow" size="20" value="<?=htmlspecialchars($pconfig['mac_allow']);?>"/><br />
<?=gettext("Enter a list of partial MAC addresses to allow, comma separated, no spaces, such as ");?>00:00:00,01:E5:FF
- <input name="mac_deny" type="text" class="formfld unknown" id="mac_deny" size="20" value="<?=htmlspecialchars($pconfig['mac_deny']);?>"><br />
+ <input name="mac_deny" type="text" class="formfld unknown" id="mac_deny" size="20" value="<?=htmlspecialchars($pconfig['mac_deny']);?>"/><br />
<?=gettext("Enter a list of partial MAC addresses to deny access, comma separated, no spaces, such as ");?>00:00:00,01:E5:FF
</div>
</td>
@@ -1017,11 +1020,11 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td>
<td width="78%" class="vtable">
<div id="showntpbox">
- <input type="button" onClick="show_ntp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show NTP configuration");?></a>
+ <input type="button" onclick="show_ntp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show NTP configuration");?>
</div>
<div id="showntp" style="display:none">
- <input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="20" value="<?=htmlspecialchars($pconfig['ntp1']);?>"><br>
- <input name="ntp2" type="text" class="formfld unknown" id="ntp2" size="20" value="<?=htmlspecialchars($pconfig['ntp2']);?>">
+ <input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="20" value="<?=htmlspecialchars($pconfig['ntp1']);?>"/><br />
+ <input name="ntp2" type="text" class="formfld unknown" id="ntp2" size="20" value="<?=htmlspecialchars($pconfig['ntp2']);?>"/>
</div>
</td>
</tr>
@@ -1029,10 +1032,10 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("TFTP server");?></td>
<td width="78%" class="vtable">
<div id="showtftpbox">
- <input type="button" onClick="show_tftp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show TFTP configuration");?></a>
+ <input type="button" onclick="show_tftp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show TFTP configuration");?>
</div>
<div id="showtftp" style="display:none">
- <input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>"><br>
+ <input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>"/><br />
<?=gettext("Leave blank to disable. Enter a full hostname or IP for the TFTP server.");?>
</div>
</td>
@@ -1041,10 +1044,10 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("LDAP URI");?></td>
<td width="78%" class="vtable">
<div id="showldapbox">
- <input type="button" onClick="show_ldap_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show LDAP configuration");?></a>
+ <input type="button" onclick="show_ldap_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show LDAP configuration");?>
</div>
<div id="showldap" style="display:none">
- <input name="ldap" type="text" class="formfld unknown" id="ldap" size="80" value="<?=htmlspecialchars($pconfig['ldap']);?>"><br>
+ <input name="ldap" type="text" class="formfld unknown" id="ldap" size="80" value="<?=htmlspecialchars($pconfig['ldap']);?>"/><br />
<?=gettext("Leave blank to disable. Enter a full URI for the LDAP server in the form ldap://ldap.example.com/dc=example,dc=com");?>
</div>
</td>
@@ -1053,20 +1056,20 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Enable network booting");?></td>
<td width="78%" class="vtable">
<div id="shownetbootbox">
- <input type="button" onClick="show_netboot_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Network booting");?></a>
+ <input type="button" onclick="show_netboot_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Network booting");?>
</div>
<div id="shownetboot" style="display:none">
- <input valign="middle" type="checkbox" value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo " checked"; ?>>&nbsp;
+ <input style="vertical-align=middle" type="checkbox" value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo "checked=\"checked\""; ?>/>&nbsp;
<b><?=gettext("Enables network booting.");?></b>
- <p>
+ <p/>
<?=gettext("Enter the IP of the"); ?> <b><?=gettext("next-server"); ?></b>
- <input name="nextserver" type="text" class="formfld unknown" id="nextserver" size="20" value="<?=htmlspecialchars($pconfig['nextserver']);?>">
+ <input name="nextserver" type="text" class="formfld unknown" id="nextserver" size="20" value="<?=htmlspecialchars($pconfig['nextserver']);?>"/>
<?=gettext("and the filename");?>
- <input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>"><br>
+ <input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>"/><br />
<?=gettext("Note: You need both a filename and a boot server configured for this to work!");?>
- <p>
+ <p/>
<?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>
- <input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"><br>
+ <input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"/><br />
<?=gettext("Note: string-format: iscsi:(servername):(protocol):(port):(LUN):targetname");?>
</div>
</td>
@@ -1076,10 +1079,13 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Additional BOOTP/DHCP Options");?></td>
<td width="78%" class="vtable">
<div id="shownumbervaluebox">
- <input type="button" onClick="show_shownumbervalue()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Additional BOOTP/DHCP Options");?></a>
+ <input type="button" onclick="show_shownumbervalue()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Additional BOOTP/DHCP Options");?>
</div>
<div id="shownumbervalue" style="display:none">
<table id="maintable">
+ <tfoot>
+ <tr><td></td></tr>
+ </tfoot>
<tbody>
<tr>
<td colspan="3">
@@ -1112,7 +1118,7 @@ include("head.inc");
<?php
foreach ($customitemtypes as $typename => $typedescr) {
echo "<option value=\"{$typename}\" ";
- if ($itemtype == $typename) echo "selected";
+ if ($itemtype == $typename) echo "selected=\"selected\"";
echo ">" . $typedescr . "</option>";
}
?>
@@ -1122,14 +1128,12 @@ include("head.inc");
<input autocomplete="off" name="value<?php echo $counter; ?>" type="text" class="formfld unknown" id="value<?php echo $counter; ?>" size="40" value="<?=htmlspecialchars($value);?>" />
</td>
<td>
- <a onclick="removeRow(this); return false;" href="#"><img border="0" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" /></a>
+ <a onclick="removeRow(this); return false;" href="#"><img border="0" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" alt="" /></a>
</td>
</tr>
<?php $counter++; ?>
<?php endforeach; ?>
</tbody>
- <tfoot>
- </tfoot>
</table>
<a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#">
<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
@@ -1149,25 +1153,25 @@ include("head.inc");
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<?php if ($act == "newpool"): ?>
- <input type="hidden" name="act" value="newpool">
+ <input type="hidden" name="act" value="newpool"/>
<?php endif; ?>
<?php if (is_numeric($pool)): ?>
- <input type="hidden" name="pool" value="<?php echo $pool; ?>">
+ <input type="hidden" name="pool" value="<?php echo $pool; ?>"/>
<?php endif; ?>
- <input name="if" type="hidden" value="<?=htmlspecialchars($if);?>">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)">
+ <input name="if" type="hidden" value="<?=htmlspecialchars($if);?>"/>
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)"/>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
- <td width="78%"> <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br>
+ <td width="78%"> <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br />
</strong></span><?=gettext("The DNS servers entered in"); ?> <a href="system.php"><?=gettext("System: " .
"General setup"); ?></a> <?=gettext("(or the"); ?> <a href="services_dnsmasq.php"><?=gettext("DNS " .
"forwarder"); ?></a>, <?=gettext("if enabled)"); ?> </span><span class="vexpl"><?=gettext("will " .
- "be assigned to clients by the DHCP server."); ?><br>
- <br>
+ "be assigned to clients by the DHCP server."); ?><br />
+ <br />
<?=gettext("The DHCP lease table can be viewed on the"); ?> <a href="status_dhcp_leases.php"><?=gettext("Status: " .
- "DHCP leases"); ?></a> <?=gettext("page."); ?><br>
+ "DHCP leases"); ?></a> <?=gettext("page."); ?><br />
</span></p>
</td>
</tr>
@@ -1188,7 +1192,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17"></td>
- <td valign="middle"><a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
@@ -1197,28 +1201,28 @@ include("head.inc");
<?php $i = 0; foreach ($a_maps as $mapent): ?>
<?php if($mapent['mac'] <> "" or $mapent['ipaddr'] <> ""): ?>
<tr>
- <td align="center" class="listlr" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&id=<?=$i;?>';">
+ <td align="center" class="listlr" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>';">
<?php if (isset($mapent['arp_table_static_entry'])): ?>
- <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_alert.gif" alt="ARP Table Static Entry" width="17" height="17" border="0">
+ <img src="./themes/<?= $g['theme']; ?>/images/icons/icon_alert.gif" alt="ARP Table Static Entry" width="17" height="17" border="0"/>
<?php endif; ?>
</td>
- <td class="listlr" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&id=<?=$i;?>';">
+ <td class="listlr" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>';">
<?=htmlspecialchars($mapent['mac']);?>
</td>
- <td class="listr" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&id=<?=$i;?>';">
+ <td class="listr" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>';">
<?=htmlspecialchars($mapent['ipaddr']);?>&nbsp;
</td>
- <td class="listr" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&id=<?=$i;?>';">
+ <td class="listr" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>';">
<?=htmlspecialchars($mapent['hostname']);?>&nbsp;
</td>
- <td class="listbg" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&id=<?=$i;?>';">
+ <td class="listbg" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>';">
<?=htmlspecialchars($mapent['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list">
+ <td valign="middle" nowrap="nowrap" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" alt="" width="17" height="17" border="0"/></a></td>
+ <td valign="middle"><a href="services_dhcp.php?if=<?=htmlspecialchars($if);?>&amp;act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
@@ -1232,7 +1236,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17"></td>
- <td valign="middle"><a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if);?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
@@ -1244,7 +1248,7 @@ include("head.inc");
</tr>
</table>
</form>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
enable_change(false);
//-->
diff --git a/usr/local/www/services_dhcp_edit.php b/usr/local/www/services_dhcp_edit.php
index f318bc4..a132478 100755
--- a/usr/local/www/services_dhcp_edit.php
+++ b/usr/local/www/services_dhcp_edit.php
@@ -305,6 +305,8 @@ include("head.inc");
?>
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+
<script type="text/javascript" language="JavaScript">
function show_ddns_config() {
document.getElementById("showddnsbox").innerHTML='';
@@ -325,7 +327,6 @@ include("head.inc");
}
</script>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<form action="services_dhcp_edit.php" method="post" name="iform" id="iform">
@@ -336,22 +337,22 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("MAC address");?></td>
<td width="78%" class="vtable">
- <input name="mac" type="text" class="formfld unknown" id="mac" size="30" value="<?=htmlspecialchars($pconfig['mac']);?>">
+ <input name="mac" type="text" class="formfld unknown" id="mac" size="30" value="<?=htmlspecialchars($pconfig['mac']);?>"/>
<?php
$ip = getenv('REMOTE_ADDR');
$mac = `/usr/sbin/arp -an | grep {$ip} | cut -d" " -f4`;
$mac = str_replace("\n","",$mac);
?>
- <a OnClick="document.forms[0].mac.value='<?=$mac?>';" href="#"><?=gettext("Copy my MAC address");?></a>
- <br>
+ <a onclick="document.forms[0].mac.value='<?=$mac?>';" href="#"><?=gettext("Copy my MAC address");?></a>
+ <br />
<span class="vexpl"><?=gettext("Enter a MAC address in the following format: ".
"xx:xx:xx:xx:xx:xx");?></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
- <input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>">
- <br>
+ <input name="ipaddr" type="text" class="formfld unknown" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>"/>
+ <br />
<?=gettext("If an IPv4 address is entered, the address must be outside of the pool.");?>
<br/>
<?=gettext("If no IPv4 address is given, one will be dynamically allocated from the pool.");?>
@@ -360,90 +361,90 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Hostname");?></td>
<td width="78%" class="vtable">
- <input name="hostname" type="text" class="formfld unknown" id="hostname" size="20" value="<?=htmlspecialchars($pconfig['hostname']);?>">
- <br> <span class="vexpl"><?=gettext("Name of the host, without domain part.");?></span></td>
+ <input name="hostname" type="text" class="formfld unknown" id="hostname2" size="20" value="<?=htmlspecialchars($pconfig['hostname']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("Name of the host, without domain part.");?></span></td>
</tr>
<?php if($netboot_enabled) { ?>
<tr>
<td width="22%" valign="top" class="vncell">Netboot Filename</td>
<td width="78%" class="vtable">
- <input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>">
- <br> <span class="vexpl">Name of the file that should be loaded when this host boots off of the network, overrides setting on main page.</span></td>
+ <input name="filename" type="text" class="formfld unknown" id="filename" size="20" value="<?=htmlspecialchars($pconfig['filename']);?>"/>
+ <br /> <span class="vexpl">Name of the file that should be loaded when this host boots off of the network, overrides setting on main page.</span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell">Root Path</td>
<td width="78%" class="vtable">
- <input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>">
- <br> <span class="vexpl"><?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>, overrides setting on main page.</span></td>
+ <input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>, overrides setting on main page.</span></td>
</tr>
<?php } ?>
<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> <span class="vexpl"><?=gettext("You may enter a description here ".
+ <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).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("ARP Table Static Entry");?></td>
<td width="78%" class="vtable">
- <input name="arp_table_static_entry" id="arp_table_static_entry" type="checkbox" value="yes" <?php if ($pconfig['arp_table_static_entry']) echo "checked"; ?>>
- <br> <span class="vexpl"><?=gettext("Create an ARP Table Static Entry for this MAC & IP Address pair. ".
+ <input name="arp_table_static_entry" id="arp_table_static_entry" type="checkbox" value="yes" <?php if ($pconfig['arp_table_static_entry']) echo "checked=\"checked\""; ?>/>
+ <br /> <span class="vexpl"><?=gettext("Create an ARP Table Static Entry for this MAC &amp; IP Address pair. ".
"");?></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("WINS servers");?></td>
<td width="78%" class="vtable">
- <input name="wins1" type="text" class="formfld unknown" id="wins1" size="20" value="<?=htmlspecialchars($pconfig['wins1']);?>"><br>
- <input name="wins2" type="text" class="formfld unknown" id="wins2" size="20" value="<?=htmlspecialchars($pconfig['wins2']);?>">
+ <input name="wins1" type="text" class="formfld unknown" id="wins1" size="20" value="<?=htmlspecialchars($pconfig['wins1']);?>"/><br />
+ <input name="wins2" type="text" class="formfld unknown" id="wins2" size="20" value="<?=htmlspecialchars($pconfig['wins2']);?>"/>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
<td width="78%" class="vtable">
- <input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>"><br>
- <input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>"><br>
+ <input name="dns1" type="text" class="formfld unknown" id="dns1" size="20" value="<?=htmlspecialchars($pconfig['dns1']);?>"/><br />
+ <input name="dns2" type="text" class="formfld unknown" id="dns2" size="20" value="<?=htmlspecialchars($pconfig['dns2']);?>"/><br />
<?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td>
<td width="78%" class="vtable">
- <input name="gateway" type="text" class="formfld host" id="gateway" size="20" value="<?=htmlspecialchars($pconfig['gateway']);?>"><br>
+ <input name="gateway" type="text" class="formfld host" id="gateway" size="20" value="<?=htmlspecialchars($pconfig['gateway']);?>"/><br />
<?=gettext("The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Domain name");?></td>
<td width="78%" class="vtable">
- <input name="domain" type="text" class="formfld unknown" id="domain" size="20" value="<?=htmlspecialchars($pconfig['domain']);?>"><br>
+ <input name="domain" type="text" class="formfld unknown" id="domain" size="20" value="<?=htmlspecialchars($pconfig['domain']);?>"/><br />
<?=gettext("The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
<td width="78%" class="vtable">
- <input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
+ <input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="20" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"/><br />
<?=gettext("The DHCP server can optionally provide a domain search list. Use the semicolon character as separator ");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Default lease time");?></td>
<td width="78%" class="vtable">
- <input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>">
- <?=gettext("seconds");?><br>
+ <input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>"/>
+ <?=gettext("seconds");?><br />
<?=gettext("This is used for clients that do not ask for a specific " .
- "expiration time."); ?><br>
+ "expiration time."); ?><br />
<?=gettext("The default is 7200 seconds.");?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Maximum lease time");?></td>
<td width="78%" class="vtable">
- <input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>">
- <?=gettext("seconds");?><br>
+ <input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>"/>
+ <?=gettext("seconds");?><br />
<?=gettext("This is the maximum lease time for clients that ask".
- " for a specific expiration time."); ?><br>
+ " for a specific expiration time."); ?><br />
<?=gettext("The default is 86400 seconds.");?>
</td>
</tr>
@@ -451,13 +452,13 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
<td width="78%" class="vtable">
<div id="showddnsbox">
- <input type="button" onClick="show_ddns_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Dynamic DNS");?></a>
+ <input type="button" onclick="show_ddns_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Dynamic DNS");?>
</div>
<div id="showddns" style="display:none">
- <input valign="middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo " checked"; ?>>&nbsp;
+ <input style="vertical-align:middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo "checked=\"checked\""; ?>/>&nbsp;
<b><?=gettext("Enable registration of DHCP client names in DNS.");?></b><br />
- <p>
- <input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>"><br />
+ <p/>
+ <input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="20" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>"/><br />
<?=gettext("Note: Leave blank to disable dynamic DNS registration.");?><br />
<?=gettext("Enter the dynamic DNS domain which will be used to register client names in the DNS server.");?>
</div>
@@ -467,11 +468,11 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td>
<td width="78%" class="vtable">
<div id="showntpbox">
- <input type="button" onClick="show_ntp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show NTP configuration");?></a>
+ <input type="button" onclick="show_ntp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show NTP configuration");?>
</div>
<div id="showntp" style="display:none">
- <input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="20" value="<?=htmlspecialchars($pconfig['ntp1']);?>"><br>
- <input name="ntp2" type="text" class="formfld unknown" id="ntp2" size="20" value="<?=htmlspecialchars($pconfig['ntp2']);?>">
+ <input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="20" value="<?=htmlspecialchars($pconfig['ntp1']);?>"/><br />
+ <input name="ntp2" type="text" class="formfld unknown" id="ntp2" size="20" value="<?=htmlspecialchars($pconfig['ntp2']);?>"/>
</div>
</td>
</tr>
@@ -479,23 +480,22 @@ include("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("TFTP server");?></td>
<td width="78%" class="vtable">
<div id="showtftpbox">
- <input type="button" onClick="show_tftp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show TFTP configuration");?></a>
+ <input type="button" onclick="show_tftp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show TFTP configuration");?>
</div>
<div id="showtftp" style="display:none">
- <input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>"><br>
+ <input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>"/><br />
<?=gettext("Leave blank to disable. Enter a full hostname or IP for the TFTP server.");?>
</div>
</td>
</tr>
- <tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"/> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()"/>
<?php if (isset($id) && $a_maps[$id]): ?>
- <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
+ <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>"/>
<?php endif; ?>
- <input name="if" type="hidden" value="<?=htmlspecialchars($if);?>">
+ <input name="if" type="hidden" value="<?=htmlspecialchars($if);?>"/>
</td>
</tr>
</table>
diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php
index 59f55f2..331aecf 100755
--- a/usr/local/www/services_dnsmasq.php
+++ b/usr/local/www/services_dnsmasq.php
@@ -149,7 +149,9 @@ include("head.inc");
?>
-<script language="JavaScript">
+<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
+
+<script type="text/JavaScript">
<!--
function enable_change(enable_over) {
var endis;
@@ -166,13 +168,12 @@ function show_advanced_dns() {
//-->
</script>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<form action="services_dnsmasq.php" method="post" name="iform" id="iform">
<?php if ($input_errors) print_input_errors($input_errors); ?>
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('hosts')): ?><p>
-<?php print_info_box_np(gettext("The DNS forwarder configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
+<?php print_info_box_np(gettext("The DNS forwarder configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
<?php endif; ?>
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
@@ -181,15 +182,15 @@ function show_advanced_dns() {
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Enable");?></td>
<td width="78%" class="vtable"><p>
- <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable'] == "yes") echo "checked";?> onClick="enable_change(false)">
- <strong><?=gettext("Enable DNS forwarder");?><br>
+ <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable'] == "yes") echo "checked=\"checked\"";?> onclick="enable_change(false)"/>
+ <strong><?=gettext("Enable DNS forwarder");?><br />
</strong></p></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("DHCP Registration");?></td>
<td width="78%" class="vtable"><p>
- <input name="regdhcp" type="checkbox" id="regdhcp" value="yes" <?php if ($pconfig['regdhcp'] == "yes") echo "checked";?>>
- <strong><?=gettext("Register DHCP leases in DNS forwarder");?><br>
+ <input name="regdhcp" type="checkbox" id="regdhcp" value="yes" <?php if ($pconfig['regdhcp'] == "yes") echo "checked=\"checked\"";?>/>
+ <strong><?=gettext("Register DHCP leases in DNS forwarder");?><br />
</strong><?php printf(gettext("If this option is set, then machines that specify".
" their hostname when requesting a DHCP lease will be registered".
" in the DNS forwarder, so that their name can be resolved.".
@@ -200,8 +201,8 @@ function show_advanced_dns() {
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Static DHCP");?></td>
<td width="78%" class="vtable"><p>
- <input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?php if ($pconfig['regdhcpstatic'] == "yes") echo "checked";?>>
- <strong><?=gettext("Register DHCP static mappings in DNS forwarder");?><br>
+ <input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?php if ($pconfig['regdhcpstatic'] == "yes") echo "checked=\"checked\"";?>/>
+ <strong><?=gettext("Register DHCP static mappings in DNS forwarder");?><br />
</strong><?php printf(gettext("If this option is set, then DHCP static mappings will ".
"be registered in the DNS forwarder, so that their name can be ".
"resolved. You should also set the domain in %s".
@@ -211,8 +212,8 @@ function show_advanced_dns() {
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Prefer DHCP");?></td>
<td width="78%" class="vtable"><p>
- <input name="dhcpfirst" type="checkbox" id="dhcpfirst" value="yes" <?php if ($pconfig['dhcpfirst'] == "yes") echo "checked";?>>
- <strong><?=gettext("Resolve DHCP mappings first");?><br>
+ <input name="dhcpfirst" type="checkbox" id="dhcpfirst" value="yes" <?php if ($pconfig['dhcpfirst'] == "yes") echo "checked=\"checked\"";?>/>
+ <strong><?=gettext("Resolve DHCP mappings first");?><br />
</strong><?php printf(gettext("If this option is set, then DHCP mappings will ".
"be resolved before the manual list of names below. This only ".
"affects the name given for a reverse lookup (PTR)."));?></p>
@@ -221,8 +222,8 @@ function show_advanced_dns() {
<tr>
<td rowspan="3" width="22%" valign="top" class="vncellreq"><?=gettext("DNS Query Forwarding");?></td>
<td width="78%" class="vtable"><p>
- <input name="strict_order" type="checkbox" id="strict_order" value="yes" <?php if ($pconfig['strict_order'] == "yes") echo "checked";?>>
- <strong><?=gettext("Query DNS servers sequentially");?><br>
+ <input name="strict_order" type="checkbox" id="strict_order" value="yes" <?php if ($pconfig['strict_order'] == "yes") echo "checked=\"checked\"";?>/>
+ <strong><?=gettext("Query DNS servers sequentially");?><br />
</strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ".
"query the DNS servers sequentially in the order specified (<i>System - General Setup - DNS Servers</i>), ".
"rather than all at once in parallel. ".
@@ -231,8 +232,8 @@ function show_advanced_dns() {
</tr>
<tr>
<td width="78%" class="vtable"><p>
- <input name="domain_needed" type="checkbox" id="domain_needed" value="yes" <?php if ($pconfig['domain_needed'] == "yes") echo "checked";?>>
- <strong><?=gettext("Require domain");?><br>
+ <input name="domain_needed" type="checkbox" id="domain_needed" value="yes" <?php if ($pconfig['domain_needed'] == "yes") echo "checked=\"checked\"";?>/>
+ <strong><?=gettext("Require domain");?><br />
</strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ".
"not forward A or AAAA queries for plain names, without dots or domain parts, to upstream name servers. ".
"If the name is not known from /etc/hosts or DHCP then a \"not found\" answer is returned. ".
@@ -241,8 +242,8 @@ function show_advanced_dns() {
</tr>
<tr>
<td width="78%" class="vtable"><p>
- <input name="no_private_reverse" type="checkbox" id="no_private_reverse" value="yes" <?php if ($pconfig['no_private_reverse'] == "yes") echo "checked";?>>
- <strong><?=gettext("Do not forward private reverse lookups");?><br>
+ <input name="no_private_reverse" type="checkbox" id="no_private_reverse" value="yes" <?php if ($pconfig['no_private_reverse'] == "yes") echo "checked=\"checked\"";?>/>
+ <strong><?=gettext("Do not forward private reverse lookups");?><br />
</strong><?php printf(gettext("If this option is set, %s DNS Forwarder (dnsmasq) will ".
"not forward reverse DNS lookups (PTR) for private addresses (RFC 1918) to upstream name servers. ".
"Any entries in the Domain Overrides section forwarding private \"n.n.n.in-addr.arpa\" names to a specific server are still forwarded. ".
@@ -253,7 +254,7 @@ function show_advanced_dns() {
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Listen Port");?></td>
<td width="78%" class="vtable"><p>
- <input name="port" type="text" id="port" size="6" <?php if ($pconfig['port']) echo "value=\"{$pconfig['port']}\"";?>>
+ <input name="port" type="text" id="port" size="6" <?php if ($pconfig['port']) echo "value=\"{$pconfig['port']}\"";?>/>
<br /><br />
<?=gettext("The port used for responding to DNS queries. It should normally be left blank unless another service needs to bind to TCP/UDP port 53.");?></p>
</td>
@@ -267,7 +268,7 @@ function show_advanced_dns() {
?>
<?=gettext("Interface IPs used by the DNS Forwarder for responding to queries from clients. If an interface has both IPv4 and IPv6 IPs, both are used. Queries to other interface IPs not selected below are discarded. The default behavior is to respond to queries on every available IPv4 and IPv6 address.");?>
<br /><br />
- <select id="interface" name="interface[]" multiple="true" class="formselect" size="<?php echo $size; ?>">
+ <select id="interface" name="interface[]" multiple="multiple" class="formselect" size="<?php echo $size; ?>">
<option value="" <?php if (empty($pconfig['interface'])) echo 'selected="selected"'; ?>>All</option>
<?php foreach ($interface_addresses as $laddr):
$selected = "";
@@ -284,7 +285,7 @@ function show_advanced_dns() {
</tr>
<tr>
<td width="78%" class="vtable"><p>
- <input name="strictbind" type="checkbox" id="strictbind" value="yes" <?php if ($pconfig['strictbind'] == "yes") echo "checked";?>>
+ <input name="strictbind" type="checkbox" id="strictbind" value="yes" <?php if ($pconfig['strictbind'] == "yes") echo "checked=\"checked\"";?>/>
<strong><?=gettext("Strict Interface Binding");?></strong>
<br />
<?= gettext("If this option is set, the DNS forwarder will only bind to the interfaces containing the IP addresses selected above, rather than binding to all interfaces and discarding queries to other addresses."); ?>
@@ -295,26 +296,25 @@ function show_advanced_dns() {
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Advanced");?></td>
- <td width="78%" class="vtable"><p>
+ <td width="78%" class="vtable">
<div id="showadvbox" <?php if ($pconfig['custom_options']) echo "style='display:none'"; ?>>
- <input type="button" onClick="show_advanced_dns()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?></a>
+ <input type="button" onclick="show_advanced_dns()" value="<?=gettext("Advanced"); ?>"></input> - <?=gettext("Show advanced option");?>
</div>
<div id="showadv" <?php if (empty($pconfig['custom_options'])) echo "style='display:none'"; ?>>
- <strong><?=gettext("Advanced");?><br></strong>
+ <strong><?=gettext("Advanced");?><br /></strong>
<textarea rows="6" cols="78" name="custom_options" id="custom_options"><?=htmlspecialchars($pconfig['custom_options']);?></textarea><br/>
<?=gettext("Enter any additional options you would like to add to the dnsmasq configuration here, separated by a space or newline"); ?><br/>
</div>
- </p>
</td>
</tr>
<tr>
<td colspan="2">
- <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>
</table>
-<p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br>
+<p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br />
</strong></span><?php printf(gettext("If the DNS forwarder is enabled, the DHCP".
" service (if enabled) will automatically serve the LAN IP".
" address as a DNS server to DHCP clients so they will use".
@@ -325,10 +325,10 @@ function show_advanced_dns() {
" is checked. If you don't use that option (or if you use".
" a static IP address on WAN), you must manually specify at".
" least one DNS server on the %sSystem:".
-"General setup%s page."),'<a href="system.php">','</a>','<a href="system.php">','</a>');?><br>
+"General setup%s page."),'<a href="system.php">','</a>','<a href="system.php">','</a>');?><br />
</span></p>
-&nbsp;<br>
+&nbsp;<br />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont">
<tr>
<td colspan="5" valign="top" class="listtopic"><?=gettext("Host Overrides");?></td>
@@ -351,12 +351,25 @@ function show_advanced_dns() {
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
- <td valign="middle"><a href="services_dnsmasq_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dnsmasq_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
</tr>
</thead>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="4"></td>
+ <td class="list">
+ <table border="0" cellspacing="0" cellpadding="1">
+ <tr>
+ <td width="17"></td>
+ <td valign="middle"><a href="services_dnsmasq_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </tfoot>
<tbody>
<?php $i = 0; foreach ($a_hosts as $hostent): ?>
<tr>
@@ -372,13 +385,14 @@ function show_advanced_dns() {
<td class="listbg" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
<?=htmlspecialchars($hostent['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list">
+ <td valign="middle" nowrap="nowrap" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="services_dnsmasq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
- <td><a href="services_dnsmasq.php?type=host&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this host?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle"><a href="services_dnsmasq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" alt="" width="17" height="17" border="0"/></a></td>
+ <td><a href="services_dnsmasq.php?type=host&amp;act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this host?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
+ </td>
</tr>
<?php if ($hostent['aliases']['item'] && is_array($hostent['aliases']['item'])): ?>
<?php foreach ($hostent['aliases']['item'] as $alias): ?>
@@ -395,39 +409,24 @@ function show_advanced_dns() {
<td class="listbg" ondblclick="document.location='services_dnsmasq_edit.php?id=<?=$i;?>';">
<?=htmlspecialchars($alias['description']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list">
- <a href="services_dnsmasq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
+ <td valign="middle" nowrap="nowrap" class="list">
+ <a href="services_dnsmasq_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" alt="" width="17" height="17" border="0"/></a>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
<?php $i++; endforeach; ?>
</tbody>
- <tfoot>
- <tr>
- <td class="list" colspan="4"></td>
- <td class="list">
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td width="17"></td>
- <td valign="middle"><a href="services_dnsmasq_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
- </tr>
- </table>
- </td>
- </tr>
- </tfoot>
</table>
<br/>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont">
<tr>
<td colspan="5" valign="top" class="listtopic"><?=gettext("Domain Overrides");?></td>
</tr>
-<tr>
<tr>
<td><p><?=gettext("Entries in this area override an entire domain by specifying an".
" authoritative DNS server to be queried for that domain.");?></p></td>
</tr>
-</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tabcont sortable">
<thead>
@@ -438,13 +437,26 @@ function show_advanced_dns() {
<td width="10%" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td width="17" heigth="17"></td>
- <td><a href="services_dnsmasq_domainoverride_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
+ <td width="17" height="17"></td>
+ <td><a href="services_dnsmasq_domainoverride_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
</tr>
</thead>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="3"></td>
+ <td class="list">
+ <table border="0" cellspacing="0" cellpadding="1">
+ <tr>
+ <td width="17" height="17"></td>
+ <td><a href="services_dnsmasq_domainoverride_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" width="17" height="17" border="0"/></a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </tfoot>
<tbody>
<?php $i = 0; foreach ($a_domainOverrides as $doment): ?>
<tr>
@@ -457,27 +469,15 @@ function show_advanced_dns() {
<td class="listbg">
<?=htmlspecialchars($doment['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list"> <a href="services_dnsmasq_domainoverride_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a>
- &nbsp;<a href="services_dnsmasq.php?act=del&type=doverride&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this domain override?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
+ <td valign="middle" nowrap="nowrap" class="list"> <a href="services_dnsmasq_domainoverride_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" alt="" width="17" height="17" border="0"/></a>
+ &nbsp;<a href="services_dnsmasq.php?act=del&type=doverride&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this domain override?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" alt="" width="17" height="17" border="0"/></a></td>
</tr>
- <?php $i++; endforeach; ?>
+ <?php $i++; endforeach;
+ if ($i == 0) echo "<tr><td></td></tr>"; ?>
</tbody>
- <tfoot>
- <tr>
- <td class="list" colspan="3"></td>
- <td class="list">
- <table border="0" cellspacing="0" cellpadding="1">
- <tr>
- <td width="17" heigth="17"></td>
- <td><a href="services_dnsmasq_domainoverride_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
- </tr>
- </table>
- </td>
- </tr>
- </tfoot>
</table>
</form>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
enable_change(false);
//-->
diff --git a/usr/local/www/services_dnsmasq_domainoverride_edit.php b/usr/local/www/services_dnsmasq_domainoverride_edit.php
index c228353..3cf2fc3 100755
--- a/usr/local/www/services_dnsmasq_domainoverride_edit.php
+++ b/usr/local/www/services_dnsmasq_domainoverride_edit.php
@@ -129,40 +129,42 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
- <br> <span class="vexpl"><?=gettext("Domain to override (NOTE: this does not have to be a valid TLD!)"); ?><br>
+ <?=$mandfldhtml;?><input name="domain" type="text" class="formfld unknown" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("Domain to override (NOTE: this does not have to be a valid TLD!)"); ?><br />
<?=gettext("e.g."); ?> <em><?=gettext("test"); ?></em> <?=gettext("or"); ?> <em>mycompany.localdomain</em> <?=gettext("or"); ?> <em>1.168.192.in-addr.arpa</em> </span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="ip" type="text" class="formfld unknown" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>">
- <br> <span class="vexpl"><?=gettext("IP address of the authoritative DNS server for this domain"); ?><br>
+ <?=$mandfldhtml;?><input name="ip" type="text" class="formfld unknown" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("IP address of the authoritative DNS server for this domain"); ?><br />
<?=gettext("e.g."); ?> <em>192.168.100.100</em><br/><?=gettext("Or enter # for an exclusion to pass through this host/subdomain to standard nameservers instead of a previous override."); ?><br/><?=gettext("Or enter ! for lookups for this host/subdomain to NOT be forwarded anywhere."); ?></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Source IP");?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="dnssrcip" type="text" class="formfld unknown" id="dnssrcip" size="40" value="<?=htmlspecialchars($pconfig['dnssrcip']);?>">
- <br> <span class="vexpl"><?=gettext("Source IP address for queries to the DNS server for the override domain."); ?><br>
+ <?=$mandfldhtml;?><input name="dnssrcip" type="text" class="formfld unknown" id="dnssrcip" size="40" value="<?=htmlspecialchars($pconfig['dnssrcip']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("Source IP address for queries to the DNS server for the override domain."); ?><br />
<?=gettext("Leave blank unless your DNS server is accessed through a VPN tunnel."); ?></span></td>
</tr>
<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> <span class="vexpl"><?=gettext("You may enter a description here".
+ <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).");?></span></td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"/> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()"/>
<?php if (isset($id) && $a_domainOverrides[$id]): ?>
- <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
+ <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>"/>
<?php endif; ?>
</td>
</tr>
</table>
</form>
<?php include("fend.inc"); ?>
+</body>
+</html>
diff --git a/usr/local/www/services_dnsmasq_edit.php b/usr/local/www/services_dnsmasq_edit.php
index e38f977..33a7918 100755
--- a/usr/local/www/services_dnsmasq_edit.php
+++ b/usr/local/www/services_dnsmasq_edit.php
@@ -196,30 +196,30 @@ include("head.inc");
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Host");?></td>
<td width="78%" class="vtable">
- <input name="host" type="text" class="formfld" id="host" size="40" value="<?=htmlspecialchars($pconfig['host']);?>">
- <br> <span class="vexpl"><?=gettext("Name of the host, without".
- " domain part"); ?><br>
+ <input name="host" type="text" class="formfld" id="host" size="40" value="<?=htmlspecialchars($pconfig['host']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("Name of the host, without".
+ " domain part"); ?><br />
<?=gettext("e.g."); ?> <em><?=gettext("myhost"); ?></em></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Domain");?></td>
<td width="78%" class="vtable">
- <input name="domain" type="text" class="formfld" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>">
- <br> <span class="vexpl"><?=gettext("Domain of the host"); ?><br>
+ <input name="domain" type="text" class="formfld" id="domain" size="40" value="<?=htmlspecialchars($pconfig['domain']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("Domain of the host"); ?><br />
<?=gettext("e.g."); ?> <em><?=gettext("example.com"); ?></em></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("IP address");?></td>
<td width="78%" class="vtable">
- <input name="ip" type="text" class="formfld" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>">
- <br> <span class="vexpl"><?=gettext("IP address of the host"); ?><br>
+ <input name="ip" type="text" class="formfld" id="ip" size="40" value="<?=htmlspecialchars($pconfig['ip']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("IP address of the host"); ?><br />
<?=gettext("e.g."); ?> <em>192.168.100.100</em> <?=gettext("or"); ?> <em>fd00:abcd::1</em></span></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description");?></td>
<td width="78%" class="vtable">
- <input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl"><?=gettext("You may enter a description here".
+ <input name="descr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>"/>
+ <br /> <span class="vexpl"><?=gettext("You may enter a description here".
" for your reference (not parsed).");?></span></td>
</tr>
<tr>
@@ -282,9 +282,9 @@ include("head.inc");
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()">
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>"/> <input class="formbtn" type="button" value="<?=gettext("Cancel");?>" onclick="history.back()"/>
<?php if (isset($id) && $a_hosts[$id]): ?>
- <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>">
+ <input name="id" type="hidden" value="<?=htmlspecialchars($id);?>"/>
<?php endif; ?>
</td>
</tr>
diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php
index 57d6864..7acc2eb 100644
--- a/usr/local/www/system_certmanager.php
+++ b/usr/local/www/system_certmanager.php
@@ -240,7 +240,7 @@ if ($_POST) {
$altnames = array();
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
- if ($pconfig['method'] != "import") {
+ if ($pconfig['method'] != "import" && $pconfig['method'] != "existing") {
/* subjectAltNames */
foreach ($_POST as $key => $value) {
$entry = '';
@@ -288,12 +288,12 @@ if ($_POST) {
/* Make sure we do not have invalid characters in the fields for the certificate */
for ($i = 0; $i < count($reqdfields); $i++) {
if (preg_match('/email/', $reqdfields[$i])){ /* dn_email or csr_dn_name */
- if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["$reqdfields[$i]"]))
+ if (preg_match("/[\!\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST[$reqdfields[$i]]))
array_push($input_errors, "The field 'Distinguished name Email Address' contains invalid characters.");
}else if (preg_match('/commonname/', $reqdfields[$i])){ /* dn_commonname or csr_dn_commonname */
- if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST["$reqdfields[$i]"]))
+ if (preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\"\']/", $_POST[$reqdfields[$i]]))
array_push($input_errors, "The field 'Distinguished name Common Name' contains invalid characters.");
- }else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST["$reqdfields[$i]"]))
+ }else if (($reqdfields[$i] != "descr") && preg_match("/[\!\@\#\$\%\^\(\)\~\?\>\<\&\/\\\,\.\"\']/", $_POST[$reqdfields[$i]]))
array_push($input_errors, "The field '" . $reqdfieldsn[$i] . "' contains invalid characters.");
}
diff --git a/usr/local/www/system_groupmanager.php b/usr/local/www/system_groupmanager.php
index 27cd2f2..85d6664 100644
--- a/usr/local/www/system_groupmanager.php
+++ b/usr/local/www/system_groupmanager.php
@@ -64,7 +64,9 @@ if ($_GET['act'] == "delgroup") {
exit;
}
+ conf_mount_rw();
local_group_del($a_group[$_GET['id']]);
+ conf_mount_ro();
$groupdeleted = $a_group[$_GET['id']]['name'];
unset($a_group[$_GET['id']]);
write_config();
@@ -154,7 +156,9 @@ if ($_POST) {
$a_group[] = $group;
}
+ conf_mount_rw();
local_group_set($group);
+ conf_mount_ro();
/* Refresh users in this group since their privileges may have changed. */
if (is_array($group['member'])) {
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']);?>&nbsp;
<?=$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\">&nbsp;</td><td nowrap class=\"listr\">&nbsp;</td>";
+ echo "<td nowrap=\"nowrap\" class=\"listr\">&nbsp;</td><td nowrap=\"nowrap\" class=\"listr\">&nbsp;</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_keys.php b/usr/local/www/vpn_ipsec_keys.php
index bf2582c..f93f313 100644
--- a/usr/local/www/vpn_ipsec_keys.php
+++ b/usr/local/www/vpn_ipsec_keys.php
@@ -82,7 +82,7 @@ include("head.inc");
if ($savemsg)
print_info_box($savemsg);
if (is_subsystem_dirty('ipsec'))
- print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));
+ 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">
@@ -105,8 +105,8 @@ if (is_subsystem_dirty('ipsec'))
<td class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td width="20" heigth="17"></td>
- <td><a href="vpn_ipsec_keys_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add key"); ?>" width="17" height="17" border="0"></a></td>
+ <td width="20" height="17"></td>
+ <td><a href="vpn_ipsec_keys_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add key"); ?>" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
@@ -119,7 +119,7 @@ if (is_subsystem_dirty('ipsec'))
<td class="listr gray">
<?=htmlspecialchars($secretent['pre-shared-key']);?>
</td>
- <td class="list" nowrap><a href="system_usermanager.php?act=edit&id=<?=$secretent['id'];?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit key"); ?>" width="17" height="17" border="0"></a>
+ <td class="list" nowrap="nowrap"><a href="system_usermanager.php?act=edit&id=<?=$secretent['id'];?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit key"); ?>" alt="" width="17" height="17" border="0"/></a>
&nbsp;</td>
</tr>
<?php $i++; endforeach; ?>
@@ -132,8 +132,8 @@ if (is_subsystem_dirty('ipsec'))
<td class="listr">
<?=htmlspecialchars($secretent['pre-shared-key']);?>
</td>
- <td class="list" nowrap> <a href="vpn_ipsec_keys_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit key"); ?>" width="17" height="17" border="0"></a>
- &nbsp;<a href="vpn_ipsec_keys.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Pre-Shared Key?"); ?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete key"); ?>" width="17" height="17" border="0"></a></td>
+ <td class="list" nowrap="nowrap"> <a href="vpn_ipsec_keys_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="<?=gettext("edit key"); ?>" alt="" width="17" height="17" border="0"/></a>
+ &nbsp;<a href="vpn_ipsec_keys.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this Pre-Shared Key?"); ?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="<?=gettext("delete key"); ?>" alt="" width="17" height="17" border="0"/></a></td>
</tr>
<?php $i++; endforeach; ?>
<tr>
@@ -141,8 +141,8 @@ if (is_subsystem_dirty('ipsec'))
<td class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td width="20" heigth="17"></td>
- <td><a href="vpn_ipsec_keys_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add key"); ?>" width="17" height="17" border="0"></a></td>
+ <td width="20" height="17"></td>
+ <td><a href="vpn_ipsec_keys_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add key"); ?>" alt="" width="17" height="17" border="0"/></a></td>
</tr>
</table>
</td>
diff --git a/usr/local/www/vpn_ipsec_keys_edit.php b/usr/local/www/vpn_ipsec_keys_edit.php
index 5a04c08..4863943 100644
--- a/usr/local/www/vpn_ipsec_keys_edit.php
+++ b/usr/local/www/vpn_ipsec_keys_edit.php
@@ -126,26 +126,28 @@ include("head.inc");
<tr>
<td valign="top" class="vncellreq"><?=gettext("Identifier"); ?></td>
<td class="vtable">
- <?=$mandfldhtml;?><input name="ident" type="text" class="formfld unknown" id="ident" size="30" value="<?=htmlspecialchars($pconfig['ident']);?>">
- <br>
+ <?=$mandfldhtml;?><input name="ident" type="text" class="formfld unknown" id="ident" size="30" value="<?=htmlspecialchars($pconfig['ident']);?>"/>
+ <br />
<?=gettext("This can be either an IP address, fully qualified domain name or an e-mail address"); ?>.
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Pre-Shared Key"); ?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="psk" type="text" class="formfld unknown" id="psk" size="40" value="<?=htmlspecialchars($pconfig['psk']);?>">
+ <?=$mandfldhtml;?><input name="psk" type="text" class="formfld unknown" id="psk" size="40" value="<?=htmlspecialchars($pconfig['psk']);?>"/>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td 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>
</table>
</form>
<?php include("fend.inc"); ?>
+</body>
+</html>
diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php
index 30927c2..84bf198 100755
--- a/usr/local/www/vpn_ipsec_mobile.php
+++ b/usr/local/www/vpn_ipsec_mobile.php
@@ -246,7 +246,7 @@ include("head.inc");
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
function pool_change() {
@@ -327,12 +327,12 @@ function login_banner_change() {
if ($savemsg)
print_info_box($savemsg);
if (isset($config['ipsec']['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."));
foreach ($a_phase1 as $ph1ent)
if (isset($ph1ent['mobile']))
$ph1found = true;
if ($pconfig['enable'] && !$ph1found)
- print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br>" . gettext("Please click Create to define one."),gettext("create"),gettext("Create Phase1"));
+ print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br />" . gettext("Please click Create to define one."),gettext("create"),gettext("Create Phase1"));
if ($input_errors)
print_input_errors($input_errors);
?>
@@ -360,7 +360,7 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['enable'],$chk); ?>
- <input name="enable" type="checkbox" id="enable" value="yes" <?=$chk;?>>
+ <input name="enable" type="checkbox" id="enable" value="yes" <?=$chk;?>/>
</td>
<td>
<strong><?=gettext("Enable IPsec Mobile Client Support"); ?></strong>
@@ -381,14 +381,14 @@ function login_banner_change() {
<td width="22%" valign="top" class="vncellreq"><?=gettext("User Authentication"); ?></td>
<td width="78%" class="vtable">
<?=gettext("Source"); ?>:&nbsp;&nbsp;
- <select name="user_source[]" class="formselect" id="user_source" multiple="true" size="3">
+ <select name="user_source[]" class="formselect" id="user_source" multiple="multiple" size="3">
<?php
$authmodes = explode(",", $pconfig['user_source']);
$auth_servers = auth_get_authserver_list();
foreach ($auth_servers as $auth_server) {
$selected = "";
if (in_array($auth_server['name'], $authmodes))
- $selected = "selected";
+ $selected = "selected=\"selected\"";
echo "<option value='{$auth_server['name']}' {$selected}>{$auth_server['name']}</option>\n";
}
?>
@@ -401,7 +401,7 @@ function login_banner_change() {
<?=gettext("Source"); ?>:&nbsp;&nbsp;
<select name="group_source" class="formselect" id="group_source">
<option value="none"><?=gettext("none"); ?></option>
- <option value="system" <?php if ($pconfig['group_source'] == "system") echo "selected"; ?> ><?=gettext("system"); ?></option>
+ <option value="system" <?php if ($pconfig['group_source'] == "system") echo "selected=\"selected\""; ?> ><?=gettext("system"); ?></option>
</select>
</td>
</tr>
@@ -420,10 +420,10 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['pool_enable'],$chk); ?>
- <input name="pool_enable" type="checkbox" id="pool_enable" value="yes" <?=$chk;?> onClick="pool_change()">
+ <input name="pool_enable" type="checkbox" id="pool_enable" value="yes" <?=$chk;?> onclick="pool_change()"/>
</td>
<td>
- <?=gettext("Provide a virtual IP address to clients"); ?><br>
+ <?=gettext("Provide a virtual IP address to clients"); ?><br />
</td>
</tr>
</table>
@@ -431,11 +431,11 @@ function login_banner_change() {
<tr>
<td>
<?=gettext("Network"); ?>:&nbsp;
- <input name="pool_address" type="text" class="formfld unknown" id="pool_address" size="20" value="<?=htmlspecialchars($pconfig['pool_address']);?>">
+ <input name="pool_address" type="text" class="formfld unknown" id="pool_address" size="20" value="<?=htmlspecialchars($pconfig['pool_address']);?>"/>
/
<select name="pool_netbits" class="formselect" id="pool_netbits">
<?php for ($i = 32; $i >= 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['pool_netbits']) echo "selected"; ?>>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['pool_netbits']) echo "selected=\"selected\""; ?>>
<?=$i;?>
</option>
<?php endfor; ?>
@@ -452,10 +452,10 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['net_list_enable'],$chk); ?>
- <input name="net_list_enable" type="checkbox" id="net_list_enable" value="yes" <?=$chk;?>>
+ <input name="net_list_enable" type="checkbox" id="net_list_enable" value="yes" <?=$chk;?>/>
</td>
<td>
- <?=gettext("Provide a list of accessible networks to clients"); ?><br>
+ <?=gettext("Provide a list of accessible networks to clients"); ?><br />
</td>
</tr>
</table>
@@ -468,11 +468,11 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['save_passwd_enable'],$chk); ?>
- <input name="save_passwd_enable" type="checkbox" id="save_passwd_enable" value="yes" <?=$chk;?>>
+ <input name="save_passwd_enable" type="checkbox" id="save_passwd_enable" value="yes" <?=$chk;?>/>
</td>
<td>
- <?=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("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 />
</td>
</tr>
</table>
@@ -485,17 +485,17 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['dns_domain_enable'],$chk); ?>
- <input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onClick="dns_domain_change()">
+ <input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onclick="dns_domain_change()"/>
</td>
<td>
- <?=gettext("Provide a default domain name to clients"); ?><br>
+ <?=gettext("Provide a default domain name to clients"); ?><br />
</td>
</tr>
</table>
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
- <input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>">
+ <input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>"/>
</td>
</tr>
</table>
@@ -508,10 +508,10 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['dns_split_enable'],$chk); ?>
- <input name="dns_split_enable" type="checkbox" id="dns_split_enable" value="yes" <?=$chk;?> onClick="dns_split_change()">
+ <input name="dns_split_enable" type="checkbox" id="dns_split_enable" value="yes" <?=$chk;?> onclick="dns_split_change()"/>
</td>
<td>
- <?=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."); ?>
</td>
</tr>
@@ -519,7 +519,7 @@ function login_banner_change() {
<table border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
- <input name="dns_split" type="text" class="formfld unknown" id="dns_split" size="30" value="<?=htmlspecialchars($pconfig['dns_split']);?>">
+ <input name="dns_split" type="text" class="formfld unknown" id="dns_split" size="30" value="<?=htmlspecialchars($pconfig['dns_split']);?>"/>
</td>
</tr>
</table>
@@ -532,10 +532,10 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['dns_server_enable'],$chk); ?>
- <input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onClick="dns_server_change()">
+ <input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onclick="dns_server_change()"/>
</td>
<td>
- <?=gettext("Provide a DNS server list to clients"); ?><br>
+ <?=gettext("Provide a DNS server list to clients"); ?><br />
</td>
</tr>
</table>
@@ -543,25 +543,25 @@ function login_banner_change() {
<tr>
<td>
<?=gettext("Server"); ?> #1:&nbsp;
- <input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>">
+ <input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>"/>
</td>
</tr>
<tr>
<td>
<?=gettext("Server"); ?> #2:&nbsp;
- <input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>">
+ <input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>"/>
</td>
</tr>
<tr>
<td>
<?=gettext("Server"); ?> #3:&nbsp;
- <input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>">
+ <input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>"/>
</td>
</tr>
<tr>
<td>
<?=gettext("Server"); ?> #4:&nbsp;
- <input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>">
+ <input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>"/>
</td>
</tr>
</table>
@@ -574,10 +574,10 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['wins_server_enable'],$chk); ?>
- <input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onClick="wins_server_change()">
+ <input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onclick="wins_server_change()"/>
</td>
<td>
- <?=gettext("Provide a WINS server list to clients"); ?><br>
+ <?=gettext("Provide a WINS server list to clients"); ?><br />
</td>
</tr>
</table>
@@ -585,13 +585,13 @@ function login_banner_change() {
<tr>
<td>
<?=gettext("Server"); ?> #1:&nbsp;
- <input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=htmlspecialchars($pconfig['wins_server1']);?>">
+ <input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=htmlspecialchars($pconfig['wins_server1']);?>"/>
</td>
</tr>
<tr>
<td>
<?=gettext("Server"); ?> #2:&nbsp;
- <input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=htmlspecialchars($pconfig['wins_server2']);?>">
+ <input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=htmlspecialchars($pconfig['wins_server2']);?>"/>
</td>
</tr>
</table>
@@ -604,10 +604,10 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['pfs_group_enable'],$chk); ?>
- <input name="pfs_group_enable" type="checkbox" id="pfs_group_enable" value="yes" <?=$chk;?> onClick="pfs_group_change()">
+ <input name="pfs_group_enable" type="checkbox" id="pfs_group_enable" value="yes" <?=$chk;?> onclick="pfs_group_change()"/>
</td>
<td>
- <?=gettext("Provide the Phase2 PFS group to clients ( overrides all mobile phase2 settings )"); ?><br>
+ <?=gettext("Provide the Phase2 PFS group to clients ( overrides all mobile phase2 settings )"); ?><br />
</td>
</tr>
</table>
@@ -617,7 +617,7 @@ function login_banner_change() {
<?=gettext("Group"); ?>:&nbsp;&nbsp;
<select name="pfs_group" class="formselect" id="pfs_group">
<?php foreach ($p2_pfskeygroups as $keygroup => $keygroupname): ?>
- <option value="<?=$keygroup;?>" <?php if ($pconfig['pfs_group'] == $keygroup) echo "selected"; ?>>
+ <option value="<?=$keygroup;?>" <?php if ($pconfig['pfs_group'] == $keygroup) echo "selected=\"selected\""; ?>>
<?=htmlspecialchars($keygroupname);?>
</option>
<?php endforeach; ?>
@@ -634,10 +634,10 @@ function login_banner_change() {
<tr>
<td>
<?php set_checked($pconfig['login_banner_enable'],$chk); ?>
- <input name="login_banner_enable" type="checkbox" id="login_banner_enable" value="yes" <?=$chk;?> onClick="login_banner_change()">
+ <input name="login_banner_enable" type="checkbox" id="login_banner_enable" value="yes" <?=$chk;?> onclick="login_banner_change()"/>
</td>
<td>
- <?=gettext("Provide a login banner to clients"); ?><br>
+ <?=gettext("Provide a login banner to clients"); ?><br />
</td>
</tr>
</table>
@@ -654,7 +654,7 @@ function login_banner_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
+ <input name="submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"/>
</td>
</tr>
</table>
@@ -663,7 +663,7 @@ function login_banner_change() {
</tr>
</table>
</form>
-<script language="JavaScript">
+<script type="text/JavaScript">
pool_change();
dns_domain_change();
dns_split_change();
@@ -683,7 +683,7 @@ login_banner_change();
function set_checked($var,& $chk) {
if($var)
- $chk = 'checked';
+ $chk = 'checked="checked"';
else
$chk = '';
}
diff --git a/usr/local/www/vpn_ipsec_phase1.php b/usr/local/www/vpn_ipsec_phase1.php
index 90c2c34..9d850df 100644
--- a/usr/local/www/vpn_ipsec_phase1.php
+++ b/usr/local/www/vpn_ipsec_phase1.php
@@ -85,6 +85,7 @@ if (isset($p1index) && $a_phase1[$p1index]) {
$pconfig['myid_data'] = $a_phase1[$p1index]['myid_data'];
$pconfig['peerid_type'] = $a_phase1[$p1index]['peerid_type'];
$pconfig['peerid_data'] = $a_phase1[$p1index]['peerid_data'];
+ $pconfig['verify_identifier'] = isset($a_phase1[$p1index]['verify_identifier']);
$pconfig['ealgo'] = $a_phase1[$p1index]['encryption-algorithm'];
$pconfig['halgo'] = $a_phase1[$p1index]['hash-algorithm'];
$pconfig['dhgroup'] = $a_phase1[$p1index]['dhgroup'];
@@ -327,6 +328,10 @@ if ($_POST) {
$ph1ent['myid_data'] = $pconfig['myid_data'];
$ph1ent['peerid_type'] = $pconfig['peerid_type'];
$ph1ent['peerid_data'] = $pconfig['peerid_data'];
+ if (isset($pconfig['verify_identifier']))
+ $ph1ent['verify_identifier'] = true;
+ else
+ unset($ph1ent['verify_identifier']);
$ph1ent['encryption-algorithm'] = $pconfig['ealgo'];
$ph1ent['hash-algorithm'] = $pconfig['halgo'];
@@ -388,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() {
@@ -407,6 +412,11 @@ function peeridsel_change() {
document.getElementById('peerid_data').style.visibility = 'hidden';
else
document.getElementById('peerid_data').style.visibility = 'visible';
+
+ if (value == 'asn1dn')
+ document.getElementById('opt_verify_identifier').style.visibility = 'visible';
+ else
+ document.getElementById('opt_verify_identifier').style.visibility = 'hidden';
}
function methodsel_change() {
@@ -531,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"); ?>.
@@ -547,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>
@@ -581,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>
@@ -596,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>
@@ -607,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)"); ?>.
@@ -626,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>
@@ -651,41 +661,45 @@ 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>
+ </span>
<?php if ($pconfig['mobile']) { ?>
<br/><br/><?=gettext("NOTE: This is known as the \"group\" setting on some VPN client implementations"); ?>.
<?php } ?>
@@ -695,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>
@@ -706,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>
@@ -722,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>
@@ -737,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>
@@ -758,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>
@@ -774,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>
@@ -788,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>
@@ -800,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>
@@ -819,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>
@@ -840,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">
@@ -854,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>
@@ -877,13 +892,13 @@ function dpdchkbox_change() {
<td width="22%" valign="top">&nbsp;</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>
@@ -893,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"); ?>:&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>
@@ -553,11 +553,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; ?>
@@ -572,16 +572,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>
@@ -589,11 +589,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; ?>
@@ -614,9 +614,9 @@ function change_protocol() {
<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>
@@ -624,13 +624,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";
+ 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">&nbsp;</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'])?>');
diff --git a/usr/local/www/vpn_l2tp.php b/usr/local/www/vpn_l2tp.php
index cedcef5..f77ed5c 100644
--- a/usr/local/www/vpn_l2tp.php
+++ b/usr/local/www/vpn_l2tp.php
@@ -313,7 +313,7 @@ function enable_change(enable_over) {
$interfaces = get_configured_interface_with_descr();
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; ?>
@@ -348,14 +348,14 @@ function enable_change(enable_over) {
<?php
for($x=0; $x<33; $x++) {
if($x == $pconfig['l2tp_subnet'])
- $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:"); ?> 24 <?=gettext("is"); ?> 255.255.255.0
+ <br /><?=gettext("Hint:"); ?> 24 <?=gettext("is"); ?> 255.255.255.0
</td>
</tr>
<tr>
@@ -365,20 +365,20 @@ function enable_change(enable_over) {
<?php
for($x=0; $x<255; $x++) {
if($x == $pconfig['n_l2tp_units'])
- $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 <?=gettext("is ten L2TP clients"); ?>
+ <br /><?=gettext("Hint:"); ?> 10 <?=gettext("is ten L2TP clients"); ?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Secret");?></td>
<td width="78%" class="vtable">
- <input type="password" name="secret" id="secret" class="formfld pwd" value="<?php echo htmlspecialchars($pconfig['secret']); ?>">
+ <input type="password" name="secret" id="secret" class="formfld pwd" value="<?php echo htmlspecialchars($pconfig['secret']); ?>" />
<br />
<?=gettext("Specify optional secret shared between peers. Required on some devices/setups.");?><br />
</td>
@@ -387,8 +387,8 @@ function enable_change(enable_over) {
<td width="22%" valign="top" class="vncellreq"><?=gettext("Authentication Type");?></td>
<td width="78%" class="vtable">
<?=$mandfldhtml;?><select name="paporchap" id="paporchap">
- <option value='chap'<?php if($pconfig['paporchap'] == "chap") echo " SELECTED"; ?>><?=gettext("CHAP"); ?></option>
- <option value='pap'<?php if($pconfig['paporchap'] == "pap") echo " SELECTED"; ?>><?=gettext("PAP"); ?></option>
+ <option value='chap' <?php if($pconfig['paporchap'] == "chap") echo "selected=\"selected\""; ?>><?=gettext("CHAP"); ?></option>
+ <option value='pap' <?php if($pconfig['paporchap'] == "pap") echo "selected=\"selected\""; ?>><?=gettext("PAP"); ?></option>
</select>
<br />
<?=gettext("Specifies which protocol to use for authentication.");?><br />
@@ -397,17 +397,17 @@ function enable_change(enable_over) {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("L2TP DNS Servers"); ?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="l2tp_dns1" type="text" class="formfld unknown" id="l2tp_dns1" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns1']);?>">
- <br>
- <input name="l2tp_dns2" type="text" class="formfld unknown" id="l2tp_dns2" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns2']);?>">
- <br>
- <?=gettext("primary and secondary DNS servers assigned to L2TP clients"); ?><br>
+ <?=$mandfldhtml;?><input name="l2tp_dns1" type="text" class="formfld unknown" id="l2tp_dns1" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns1']);?>" />
+ <br />
+ <input name="l2tp_dns2" type="text" class="formfld unknown" id="l2tp_dns2" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns2']);?>" />
+ <br />
+ <?=gettext("primary and secondary DNS servers assigned to L2TP 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>
diff --git a/usr/local/www/vpn_l2tp_users.php b/usr/local/www/vpn_l2tp_users.php
index 58a2ebb..b8d7b8f 100644
--- a/usr/local/www/vpn_l2tp_users.php
+++ b/usr/local/www/vpn_l2tp_users.php
@@ -112,7 +112,7 @@ include("head.inc");
<?php if($secretent['ip'] == "") $secretent['ip'] = "Dynamic"; ?>
<?=htmlspecialchars($secretent['ip']);?>&nbsp;
</td>
- <td class="list" nowrap> <a href="vpn_l2tp_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit user" width="17" height="17" border="0" alt="" /></a>
+ <td class="list" nowrap="nowrap"> <a href="vpn_l2tp_users_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit user" width="17" height="17" border="0" alt="" /></a>
&nbsp;<a href="vpn_l2tp_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" alt="" /></a></td>
</tr>
<?php $i++; endforeach; ?>
diff --git a/usr/local/www/vpn_l2tp_users_edit.php b/usr/local/www/vpn_l2tp_users_edit.php
index 28e9707..bae2a10 100644
--- a/usr/local/www/vpn_l2tp_users_edit.php
+++ b/usr/local/www/vpn_l2tp_users_edit.php
@@ -156,6 +156,7 @@ include("head.inc");
<td width="78%" class="vtable">
<?=$mandfldhtml;?><input name="usernamefld" type="text" class="formfld user" id="usernamefld" size="20" value="<?=htmlspecialchars($pconfig['usernamefld']);?>" />
</td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Password");?></td>
<td width="78%" class="vtable">
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index 6452895..c692959 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -312,7 +312,7 @@ include("head.inc");
<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
<?php include("fbegin.inc"); ?>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
function mode_change() {
@@ -390,7 +390,7 @@ if ($savemsg)
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tabnavtbl">
- <ul id="tabnav">
+ <ul id="tabnav"><li>
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
@@ -400,7 +400,7 @@ if ($savemsg)
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
?>
- </ul>
+ </li></ul>
</td>
</tr>
<tr>
@@ -425,7 +425,7 @@ if ($savemsg)
<td>
&nbsp;
<span class="vexpl">
- <strong><?=gettext("Disable this client"); ?></strong><br>
+ <strong><?=gettext("Disable this client"); ?></strong><br />
</span>
</td>
</tr>
@@ -441,7 +441,7 @@ if ($savemsg)
foreach ($openvpn_client_modes as $name => $desc):
$selected = "";
if ($pconfig['mode'] == $name)
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$name;?>" <?=$selected;?>><?=$desc;?></option>
<?php endforeach; ?>
@@ -456,7 +456,7 @@ if ($savemsg)
foreach ($openvpn_prots as $prot):
$selected = "";
if ($pconfig['protocol'] == $prot)
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$prot;?>" <?=$selected;?>><?=$prot;?></option>
<?php endforeach; ?>
@@ -471,7 +471,7 @@ if ($savemsg)
foreach ($openvpn_dev_mode as $mode):
$selected = "";
if ($pconfig['dev_mode'] == $mode)
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$mode;?>" <?=$selected;?>><?=$mode;?></option>
<?php endforeach; ?>
@@ -505,13 +505,13 @@ if ($savemsg)
foreach ($interfaces as $iface => $ifacename):
$selected = "";
if ($iface == $pconfig['interface'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$iface;?>" <?=$selected;?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
- </select> <br>
+ </select> <br />
</td>
</tr>
<tr>
@@ -557,10 +557,10 @@ if ($savemsg)
</span>
</td>
<td>
- <select name="proxy_authtype" id="proxy_authtype" class="formfld select" onChange="useproxy_changed()">
- <option value="none" <?php if ($pconfig['proxy_authtype'] == "none") echo "selected"; ?>><?=gettext("none"); ?></option>
- <option value="basic" <?php if ($pconfig['proxy_authtype'] == "basic") echo "selected"; ?>><?=gettext("basic"); ?></option>
- <option value="ntlm" <?php if ($pconfig['proxy_authtype'] == "ntlm") echo "selected"; ?>><?=gettext("ntlm"); ?></option>
+ <select name="proxy_authtype" id="proxy_authtype" class="formfld select" onchange="useproxy_changed()">
+ <option value="none" <?php if ($pconfig['proxy_authtype'] == "none") echo "selected=\"selected\""; ?>><?=gettext("none"); ?></option>
+ <option value="basic" <?php if ($pconfig['proxy_authtype'] == "basic") echo "selected=\"selected\""; ?>><?=gettext("basic"); ?></option>
+ <option value="ntlm" <?php if ($pconfig['proxy_authtype'] == "ntlm") echo "selected=\"selected\""; ?>><?=gettext("ntlm"); ?></option>
</select>
</td>
</tr>
@@ -597,7 +597,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['resolve_retry'],$chk); ?>
- <input name="resolve_retry" type="checkbox" value="yes" <?=$chk;?>>
+ <input name="resolve_retry" type="checkbox" value="yes" <?=$chk;?>/>
</td>
<td>
<span class="vexpl">
@@ -614,8 +614,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
- <input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>">
- <br>
+ <input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>"/>
+ <br />
<?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
</td>
</tr>
@@ -632,7 +632,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['tlsauth_enable'],$chk); ?>
- <input name="tlsauth_enable" id="tlsauth_enable" type="checkbox" value="yes" <?=$chk;?> onClick="tlsauth_change()">
+ <input name="tlsauth_enable" id="tlsauth_enable" type="checkbox" value="yes" <?=$chk;?> onclick="tlsauth_change()"/>
</td>
<td>
<span class="vexpl">
@@ -646,7 +646,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['autotls_enable'],$chk); ?>
- <input name="autotls_enable" id="autotls_enable" type="checkbox" value="yes" <?=$chk;?> onClick="autotls_change()">
+ <input name="autotls_enable" id="autotls_enable" type="checkbox" value="yes" <?=$chk;?> onclick="autotls_change()"/>
</td>
<td>
<span class="vexpl">
@@ -676,7 +676,7 @@ if ($savemsg)
foreach ($a_ca as $ca):
$selected = "";
if ($pconfig['caref'] == $ca['refid'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$ca['refid'];?>" <?=$selected;?>><?=$ca['descr'];?></option>
<?php endforeach; ?>
@@ -701,7 +701,7 @@ if ($savemsg)
if ($ca)
$caname = " (CA: {$ca['descr']})";
if ($pconfig['certref'] == $cert['refid'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
if (cert_in_use($cert['refid']))
$inuse = " *In Use";
if (is_cert_revoked($cert))
@@ -723,7 +723,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['autokey_enable'],$chk); ?>
- <input name="autokey_enable" type="checkbox" value="yes" <?=$chk;?> onClick="autokey_change()">
+ <input name="autokey_enable" type="checkbox" value="yes" <?=$chk;?> onclick="autokey_change()"/>
</td>
<td>
<span class="vexpl">
@@ -753,9 +753,9 @@ if ($savemsg)
foreach ($cipherlist as $name => $desc):
$selected = '';
if ($name == $pconfig['crypto'])
- $selected = ' selected';
+ $selected = 'selected="selected"';
?>
- <option value="<?=$name;?>"<?=$selected?>>
+ <option value="<?=$name;?>" <?=$selected?>>
<?=htmlspecialchars($desc);?>
</option>
<?php endforeach; ?>
@@ -771,9 +771,9 @@ if ($savemsg)
foreach ($engines as $name => $desc):
$selected = '';
if ($name == $pconfig['engine'])
- $selected = ' selected';
+ $selected = 'selected="selected"';
?>
- <option value="<?=$name;?>"<?=$selected?>>
+ <option value="<?=$name;?>" <?=$selected?>>
<?=htmlspecialchars($desc);?>
</option>
<?php endforeach; ?>
@@ -789,8 +789,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IPv4 Tunnel Network"); ?></td>
<td width="78%" class="vtable">
- <input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>">
- <br>
+ <input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>"/>
+ <br />
<?=gettext("This is the virtual network used for private " .
"communications between this client and the " .
"server expressed using CIDR (eg. 10.0.8.0/24). " .
@@ -803,8 +803,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IPv6 Tunnel Network"); ?></td>
<td width="78%" class="vtable">
- <input name="tunnel_networkv6" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_networkv6']);?>">
- <br>
+ <input name="tunnel_networkv6" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_networkv6']);?>"/>
+ <br />
<?=gettext("This is the IPv6 virtual network used for private " .
"communications between this client and the " .
"server expressed using CIDR (eg. fe80::/64). " .
@@ -817,8 +817,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IPv4 Remote Network/s"); ?></td>
<td width="78%" class="vtable">
- <input name="remote_network" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['remote_network']);?>">
- <br>
+ <input name="remote_network" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['remote_network']);?>"/>
+ <br />
<?=gettext("These are the IPv4 networks that will be routed through " .
"the tunnel, so that a site-to-site VPN can be " .
"established without manually changing the routing tables. " .
@@ -831,8 +831,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IPv6 Remote Network/s"); ?></td>
<td width="78%" class="vtable">
- <input name="remote_networkv6" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['remote_networkv6']);?>">
- <br>
+ <input name="remote_networkv6" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['remote_networkv6']);?>"/>
+ <br />
<?=gettext("These are the IPv6 networks that will be routed through " .
"the tunnel, so that a site-to-site VPN can be " .
"established without manually changing the routing tables. " .
@@ -860,7 +860,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['compression'],$chk); ?>
- <input name="compression" type="checkbox" value="yes" <?=$chk;?>>
+ <input name="compression" type="checkbox" value="yes" <?=$chk;?>/>
</td>
<td>
<span class="vexpl">
@@ -878,7 +878,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['passtos'],$chk); ?>
- <input name="passtos" type="checkbox" value="yes" <?=$chk;?>>
+ <input name="passtos" type="checkbox" value="yes" <?=$chk;?>/>
</td>
<td>
<span class="vexpl">
@@ -891,7 +891,7 @@ if ($savemsg)
</tr>
</table>
- <table width="100%" border="0" cellpadding="6" cellspacing="0" id="client_opts">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" id="avd_config">
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
@@ -919,10 +919,10 @@ if ($savemsg)
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
- <input name="act" type="hidden" value="<?=$act;?>">
+ <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"/>
+ <input name="act" type="hidden" value="<?=$act;?>"/>
<?php if (isset($id) && $a_client[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>">
+ <input name="id" type="hidden" value="<?=$id;?>"/>
<?php endif; ?>
</td>
</tr>
@@ -941,6 +941,22 @@ if ($savemsg)
<td width="10%" class="list"></td>
</tr>
</thead>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="4"></td>
+ <td class="list">
+ <a href="vpn_openvpn_client.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add client"); ?>" alt="" width="17" height="17" border="0"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="4">
+ <p>
+ <?=gettext("Additional OpenVPN clients can be added here.");?>
+ </p>
+ </td>
+ </tr>
+ </tfoot>
<tbody>
<?php
$i = 0;
@@ -950,7 +966,7 @@ if ($savemsg)
$disabled = "YES";
$server = "{$client['server_addr']}:{$client['server_port']}";
?>
- <tr ondblclick="document.location='vpn_openvpn_client.php?act=edit&id=<?=$i;?>'">
+ <tr ondblclick="document.location='vpn_openvpn_client.php?act=edit&amp;id=<?=$i;?>'">
<td class="listlr">
<?=$disabled;?>
</td>
@@ -963,37 +979,23 @@ if ($savemsg)
<td class="listbg">
<?=htmlspecialchars($client['description']);?>
</td>
- <td valign="middle" nowrap class="list">
- <a href="vpn_openvpn_client.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit client"); ?>" width="17" height="17" border="0">
+ <td valign="middle" nowrap="nowrap" class="list">
+ <a href="vpn_openvpn_client.php?act=edit&amp;id=<?=$i;?>">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit client"); ?>" alt="" width="17" height="17" border="0"/>
</a>
&nbsp;
- <a href="vpn_openvpn_client.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this client?"); ?>')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete client"); ?>" width="17" height="17" border="0">
+ <a href="vpn_openvpn_client.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this client?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete client"); ?>" alt="" width="17" height="17" border="0"/>
</a>
</td>
</tr>
<?php
$i++;
endforeach;
+ if ($i == 0)
+ echo "<tr><td></td></tr>";
?>
</tbody>
- <tfoot>
- <tr>
- <td class="list" colspan="4"></td>
- <td class="list">
- <a href="vpn_openvpn_client.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add client"); ?>" width="17" height="17" border="0">
- </a>
- </td>
- </tr>
- <tr>
- <td colspan="4">
- <p>
- <?=gettext("Additional OpenVPN clients can be added here.");?>
- </p>
- </td>
- </tr>
- </tfoot>
</table>
<?php endif; ?>
@@ -1001,7 +1003,7 @@ if ($savemsg)
</td>
</tr>
</table>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
mode_change();
autokey_change();
@@ -1009,7 +1011,6 @@ tlsauth_change();
useproxy_changed();
//-->
</script>
-</body>
<?php include("fend.inc"); ?>
<?php
@@ -1018,9 +1019,11 @@ useproxy_changed();
function set_checked($var,& $chk) {
if($var)
- $chk = 'checked';
+ $chk = 'checked="checked"';
else
$chk = '';
}
?>
+</body>
+</html>
diff --git a/usr/local/www/vpn_openvpn_csc.php b/usr/local/www/vpn_openvpn_csc.php
index 9d0bc67..0d12dfb 100644
--- a/usr/local/www/vpn_openvpn_csc.php
+++ b/usr/local/www/vpn_openvpn_csc.php
@@ -232,7 +232,7 @@ include("head.inc");
<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
<?php include("fbegin.inc"); ?>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
function dns_domain_change() {
@@ -289,7 +289,7 @@ function netbios_change() {
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tabnavtbl">
- <ul id="tabnav">
+ <ul id="tabnav"><li>
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
@@ -299,7 +299,7 @@ function netbios_change() {
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
?>
- </ul>
+ </li></ul>
</td>
</tr>
<tr>
@@ -324,7 +324,7 @@ function netbios_change() {
<td>
&nbsp;
<span class="vexpl">
- <strong><?=gettext("Disable this override"); ?></strong><br>
+ <strong><?=gettext("Disable this override"); ?></strong><br />
</span>
</td>
</tr>
@@ -335,16 +335,16 @@ function netbios_change() {
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Common name"); ?></td>
<td width="78%" class="vtable">
- <input name="common_name" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['common_name']);?>">
- <br>
+ <input name="common_name" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['common_name']);?>"/>
+ <br />
<?=gettext("Enter the client's X.509 common name here"); ?>.
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
- <input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>">
- <br>
+ <input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>"/>
+ <br />
<?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
</td>
</tr>
@@ -378,8 +378,8 @@ function netbios_change() {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Tunnel Network"); ?></td>
<td width="78%" class="vtable">
- <input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>">
- <br>
+ <input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>"/>
+ <br />
<?=gettext("This is the virtual network used for private " .
"communications between this client and the " .
"server expressed using CIDR (eg. 10.0.8.0/24). " .
@@ -438,11 +438,11 @@ function netbios_change() {
<tr>
<td>
<?php set_checked($pconfig['dns_domain_enable'],$chk); ?>
- <input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onClick="dns_domain_change()">
+ <input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onclick="dns_domain_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Provide a default domain name to clients"); ?><br>
+ <?=gettext("Provide a default domain name to clients"); ?><br />
</span>
</td>
</tr>
@@ -450,7 +450,7 @@ function netbios_change() {
<table border="0" cellpadding="2" cellspacing="0" id="dns_domain_data">
<tr>
<td>
- <input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>">
+ <input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>"/>
</td>
</tr>
</table>
@@ -463,11 +463,11 @@ function netbios_change() {
<tr>
<td>
<?php set_checked($pconfig['dns_server_enable'],$chk); ?>
- <input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onClick="dns_server_change()">
+ <input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onclick="dns_server_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Provide a DNS server list to clients"); ?><br>
+ <?=gettext("Provide a DNS server list to clients"); ?><br />
</span>
</td>
</tr>
@@ -478,7 +478,7 @@ function netbios_change() {
<span class="vexpl">
<?=gettext("Server"); ?> #1:&nbsp;
</span>
- <input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>">
+ <input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>"/>
</td>
</tr>
<tr>
@@ -486,7 +486,7 @@ function netbios_change() {
<span class="vexpl">
<?=gettext("Server"); ?> #2:&nbsp;
</span>
- <input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>">
+ <input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>"/>
</td>
</tr>
<tr>
@@ -494,7 +494,7 @@ function netbios_change() {
<span class="vexpl">
<?=gettext("Server"); ?> #3:&nbsp;
</span>
- <input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>">
+ <input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>"/>
</td>
</tr>
<tr>
@@ -502,7 +502,7 @@ function netbios_change() {
<span class="vexpl">
<?=gettext("Server"); ?> #4:&nbsp;
</span>
- <input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>">
+ <input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>"/>
</td>
</tr>
</table>
@@ -515,11 +515,11 @@ function netbios_change() {
<tr>
<td>
<?php set_checked($pconfig['ntp_server_enable'],$chk); ?>
- <input name="ntp_server_enable" type="checkbox" id="ntp_server_enable" value="yes" <?=$chk;?> onClick="ntp_server_change()">
+ <input name="ntp_server_enable" type="checkbox" id="ntp_server_enable" value="yes" <?=$chk;?> onclick="ntp_server_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Provide a NTP server list to clients"); ?><br>
+ <?=gettext("Provide a NTP server list to clients"); ?><br />
</span>
</td>
</tr>
@@ -530,7 +530,7 @@ function netbios_change() {
<span class="vexpl">
<?=gettext("Server"); ?> #1:&nbsp;
</span>
- <input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=$pconfig['ntp_server1'];?>">
+ <input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=$pconfig['ntp_server1'];?>"/>
</td>
</tr>
<tr>
@@ -538,7 +538,7 @@ function netbios_change() {
<span class="vexpl">
<?=gettext("Server"); ?> #2:&nbsp;
</span>
- <input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=$pconfig['ntp_server2'];?>">
+ <input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=$pconfig['ntp_server2'];?>"/>
</td>
</tr>
</table>
@@ -551,11 +551,11 @@ function netbios_change() {
<tr>
<td>
<?php set_checked($pconfig['netbios_enable'],$chk); ?>
- <input name="netbios_enable" type="checkbox" id="netbios_enable" value="yes" <?=$chk;?> onClick="netbios_change()">
+ <input name="netbios_enable" type="checkbox" id="netbios_enable" value="yes" <?=$chk;?> onclick="netbios_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Enable NetBIOS over TCP/IP"); ?><br>
+ <?=gettext("Enable NetBIOS over TCP/IP"); ?><br />
</span>
</td>
</tr>
@@ -574,7 +574,7 @@ function netbios_change() {
foreach ($netbios_nodetypes as $type => $name):
$selected = "";
if ($pconfig['netbios_ntype'] == $type)
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$type;?>" <?=$selected;?>><?=$name;?></option>
<?php endforeach; ?>
@@ -592,7 +592,7 @@ function netbios_change() {
<span class="vexpl">
Scope ID:&nbsp;
</span>
- <input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=htmlspecialchars($pconfig['netbios_scope']);?>">
+ <input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=htmlspecialchars($pconfig['netbios_scope']);?>"/>
<br/>
<?=gettext("A NetBIOS Scope ID provides an extended naming " .
"service for NetBIOS over TCP/IP. The NetBIOS " .
@@ -611,11 +611,11 @@ function netbios_change() {
<tr>
<td>
<?php set_checked($pconfig['wins_server_enable'],$chk); ?>
- <input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onClick="wins_server_change()">
+ <input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onclick="wins_server_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Provide a WINS server list to clients"); ?><br>
+ <?=gettext("Provide a WINS server list to clients"); ?><br />
</span>
</td>
</tr>
@@ -626,7 +626,7 @@ function netbios_change() {
<span class="vexpl">
<?=gettext("Server"); ?> #1:&nbsp;
</span>
- <input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>">
+ <input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=$pconfig['wins_server1'];?>"/>
</td>
</tr>
<tr>
@@ -634,7 +634,7 @@ function netbios_change() {
<span class="vexpl">
<?=gettext("Server"); ?> #2:&nbsp;
</span>
- <input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>">
+ <input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=$pconfig['wins_server2'];?>"/>
</td>
</tr>
</table>
@@ -657,10 +657,10 @@ function netbios_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
- <input name="act" type="hidden" value="<?=$act;?>">
+ <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"/>
+ <input name="act" type="hidden" value="<?=$act;?>"/>
<?php if (isset($id) && $a_csc[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>">
+ <input name="id" type="hidden" value="<?=$id;?>"/>
<?php endif; ?>
</td>
</tr>
@@ -683,7 +683,7 @@ function netbios_change() {
if (isset($csc['disable']))
$disabled = "YES";
?>
- <tr ondblclick="document.location='vpn_openvpn_csc.php?act=edit&id=<?=$i;?>'">
+ <tr ondblclick="document.location='vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>'">
<td class="listlr">
<?=$disabled;?>
</td>
@@ -693,24 +693,26 @@ function netbios_change() {
<td class="listbg">
<?=htmlspecialchars($csc['description']);?>
</td>
- <td valign="middle" nowrap class="list">
- <a href="vpn_openvpn_csc.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit csc"); ?>" width="17" height="17" border="0">
+ <td valign="middle" nowrap="nowrap" class="list">
+ <a href="vpn_openvpn_csc.php?act=edit&amp;id=<?=$i;?>">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit csc"); ?>" alt="" width="17" height="17" border="0"/>
</a>
&nbsp;
- <a href="vpn_openvpn_csc.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this csc?"); ?>')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete csc"); ?>" width="17" height="17" border="0">
+ <a href="vpn_openvpn_csc.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this csc?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete csc"); ?>" alt="" width="17" height="17" border="0"/>
</a>
</td>
</tr>
<?php
$i++;
endforeach;
+ if ($i == 0)
+ echo "<tr><td></td></tr>";
?>
<tr>
<td class="list" colspan="3"></td>
<td class="list">
- <a href="vpn_openvpn_csc.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add csc"); ?>" width="17" height="17" border="0">
+ <a href="vpn_openvpn_csc.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add csc"); ?>" alt="" width="17" height="17" border="0"/>
</a>
</td>
</tr>
@@ -728,7 +730,7 @@ function netbios_change() {
</td>
</tr>
</table>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
dns_domain_change();
dns_server_change();
@@ -737,7 +739,6 @@ ntp_server_change();
netbios_change();
//-->
</script>
-</body>
<?php include("fend.inc"); ?>
<?php
@@ -746,10 +747,11 @@ netbios_change();
function set_checked($var,& $chk) {
if($var)
- $chk = 'checked';
+ $chk = 'checked="checked"';
else
$chk = '';
}
?>
-
+</body>
+</html>
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index 78f08a2..4b47b3c 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -451,7 +451,7 @@ include("head.inc");
<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
<?php include("fbegin.inc"); ?>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
function mode_change() {
@@ -494,6 +494,7 @@ function mode_change() {
switch(value) {
case "p2p_shared_key":
document.getElementById("client_opts").style.display="none";
+ document.getElementById("adv_confg").style.display="";
document.getElementById("remote_optsv4").style.display="";
document.getElementById("remote_optsv6").style.display="";
document.getElementById("gwredir_opts").style.display="none";
@@ -504,6 +505,7 @@ function mode_change() {
break;
case "p2p_tls":
document.getElementById("client_opts").style.display="none";
+ document.getElementById("adv_confg").style.display="";
document.getElementById("remote_optsv4").style.display="";
document.getElementById("remote_optsv6").style.display="";
document.getElementById("gwredir_opts").style.display="";
@@ -515,6 +517,7 @@ function mode_change() {
case "server_user":
case "server_tls_user":
document.getElementById("authmodetr").style.display="";
+ document.getElementById("adv_confg").style.display="";
document.getElementById("client_opts").style.display="";
document.getElementById("remote_optsv4").style.display="none";
document.getElementById("remote_optsv6").style.display="none";
@@ -527,6 +530,7 @@ function mode_change() {
document.getElementById("authmodetr").style.display="none";
default:
document.getElementById("client_opts").style.display="";
+ document.getElementById("adv_confg").style.display="";
document.getElementById("remote_optsv4").style.display="none";
document.getElementById("remote_optsv6").style.display="none";
document.getElementById("gwredir_opts").style.display="";
@@ -693,7 +697,7 @@ if ($savemsg)
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td class="tabnavtbl">
+ <ul id="tabnav"><li>
<ul id="tabnav">
<?php
$tab_array = array();
@@ -704,7 +708,7 @@ if ($savemsg)
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
?>
- </ul>
+ </li></ul>
</td>
</tr>
<tr>
@@ -729,7 +733,7 @@ if ($savemsg)
<td>
&nbsp;
<span class="vexpl">
- <strong><?=gettext("Disable this server"); ?></strong><br>
+ <strong><?=gettext("Disable this server"); ?></strong><br />
</span>
</td>
</tr>
@@ -745,7 +749,7 @@ if ($savemsg)
foreach ($openvpn_server_modes as $name => $desc):
$selected = "";
if ($pconfig['mode'] == $name)
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$name;?>" <?=$selected;?>><?=$desc;?></option>
<?php endforeach; ?>
@@ -755,14 +759,14 @@ if ($savemsg)
<tr id="authmodetr" style="display:none">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Backend for authentication");?></td>
<td width="78%" class="vtable">
- <select name='authmode[]' id='authmode' class="formselect" multiple="true" size="<?php echo count($auth_servers); ?>">
+ <select name='authmode[]' id='authmode' class="formselect" multiple="multiple" size="<?php echo count($auth_servers); ?>">
<?php $authmodes = explode(",", $pconfig['authmode']); ?>
<?php
$auth_servers = auth_get_authserver_list();
foreach ($auth_servers as $auth_server):
$selected = "";
if (in_array($auth_server['name'], $authmodes))
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option>
<?php endforeach; ?>
@@ -777,7 +781,7 @@ if ($savemsg)
foreach ($openvpn_prots as $prot):
$selected = "";
if ($pconfig['protocol'] == $prot)
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$prot;?>" <?=$selected;?>><?=$prot;?></option>
<?php endforeach; ?>
@@ -793,10 +797,10 @@ if ($savemsg)
$selected = "";
if (! empty($pconfig['dev_mode'])) {
if ($pconfig['dev_mode'] == $device)
- $selected = "selected";
+ $selected = "selected=\"selected\"";
} else {
if ($device == "tun")
- $selected = "selected";
+ $selected = "selected=\"selected\"";
}
?>
<option value="<?=$device;?>" <?=$selected;?>><?=$device;?></option>
@@ -831,13 +835,13 @@ if ($savemsg)
foreach ($interfaces as $iface => $ifacename):
$selected = "";
if ($iface == $pconfig['interface'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$iface;?>" <?=$selected;?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
- </select> <br>
+ </select> <br />
</td>
</tr>
<tr>
@@ -849,8 +853,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
- <input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>">
- <br>
+ <input name="description" type="text" class="formfld unknown" size="30" value="<?=htmlspecialchars($pconfig['description']);?>"/>
+ <br />
<?=gettext("You may enter a description here for your reference (not parsed)"); ?>.
</td>
</tr>
@@ -867,7 +871,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['tlsauth_enable'],$chk); ?>
- <input name="tlsauth_enable" id="tlsauth_enable" type="checkbox" value="yes" <?=$chk;?> onClick="tlsauth_change()">
+ <input name="tlsauth_enable" id="tlsauth_enable" type="checkbox" value="yes" <?=$chk;?> onclick="tlsauth_change()"/>
</td>
<td>
<span class="vexpl">
@@ -881,7 +885,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['autotls_enable'],$chk); ?>
- <input name="autotls_enable" id="autotls_enable" type="checkbox" value="yes" <?=$chk;?> onClick="autotls_change()">
+ <input name="autotls_enable" id="autotls_enable" type="checkbox" value="yes" <?=$chk;?> onclick="autotls_change()"/>
</td>
<td>
<span class="vexpl">
@@ -911,7 +915,7 @@ if ($savemsg)
foreach ($a_ca as $ca):
$selected = "";
if ($pconfig['caref'] == $ca['refid'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$ca['refid'];?>" <?=$selected;?>><?=$ca['descr'];?></option>
<?php endforeach; ?>
@@ -935,7 +939,7 @@ if ($savemsg)
if ($ca) {
$caname = " (CA: {$ca['descr']})";
if ($pconfig['crlref'] == $crl['refid'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
}
?>
<option value="<?=$crl['refid'];?>" <?=$selected;?>><?=$crl['descr'] . $caname;?></option>
@@ -961,7 +965,7 @@ if ($savemsg)
if ($ca)
$caname = " (CA: {$ca['descr']})";
if ($pconfig['certref'] == $cert['refid'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
if (cert_in_use($cert['refid']))
$inuse = " *In Use";
if (is_cert_revoked($cert))
@@ -983,9 +987,9 @@ if ($savemsg)
foreach ($openvpn_dh_lengths as $length):
$selected = '';
if ($length == $pconfig['dh_length'])
- $selected = ' selected';
+ $selected = 'selected="selected"';
?>
- <option<?=$selected?>><?=$length;?></option>
+ <option <?=$selected?>> <?=$length;?></option>
<?php endforeach; ?>
</select>
<span class="vexpl">
@@ -1001,7 +1005,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['autokey_enable'],$chk); ?>
- <input name="autokey_enable" type="checkbox" value="yes" <?=$chk;?> onClick="autokey_change()">
+ <input name="autokey_enable" type="checkbox" value="yes" <?=$chk;?> onclick="autokey_change()"/>
</td>
<td>
<span class="vexpl">
@@ -1031,9 +1035,9 @@ if ($savemsg)
foreach ($cipherlist as $name => $desc):
$selected = '';
if ($name == $pconfig['crypto'])
- $selected = ' selected';
+ $selected = 'selected="selected"';
?>
- <option value="<?=$name;?>"<?=$selected?>>
+ <option value="<?=$name;?>" <?=$selected?>>
<?=htmlspecialchars($desc);?>
</option>
<?php endforeach; ?>
@@ -1049,9 +1053,9 @@ if ($savemsg)
foreach ($engines as $name => $desc):
$selected = '';
if ($name == $pconfig['engine'])
- $selected = ' selected';
+ $selected = 'selected="selected"';
?>
- <option value="<?=$name;?>"<?=$selected?>>
+ <option value="<?=$name;?>" <?=$selected?>>
<?=htmlspecialchars($desc);?>
</option>
<?php endforeach; ?>
@@ -1069,7 +1073,7 @@ if ($savemsg)
foreach ($openvpn_cert_depths as $depth => $depthdesc):
$selected = '';
if ($depth == $pconfig['cert_depth'])
- $selected = ' selected';
+ $selected = 'selected="selected"';
?>
<option value="<?= $depth ?>" <?= $selected ?>><?= $depthdesc ?></option>
<?php endforeach; ?>
@@ -1110,8 +1114,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top" class="vncellreq" id="ipv4_tunnel_network"><?=gettext("IPv4 Tunnel Network"); ?></td>
<td width="78%" class="vtable">
- <input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>">
- <br>
+ <input name="tunnel_network" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_network']);?>"/>
+ <br />
<?=gettext("This is the IPv4 virtual network used for private " .
"communications between this server and client " .
"hosts expressed using CIDR (eg. 10.0.8.0/24). " .
@@ -1124,8 +1128,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IPv6 Tunnel Network"); ?></td>
<td width="78%" class="vtable">
- <input name="tunnel_networkv6" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_networkv6']);?>">
- <br>
+ <input name="tunnel_networkv6" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['tunnel_networkv6']);?>"/>
+ <br />
<?=gettext("This is the IPv6 virtual network used for private " .
"communications between this server and client " .
"hosts expressed using CIDR (eg. fe80::/64). " .
@@ -1146,7 +1150,7 @@ if ($savemsg)
</td>
<td>
<span class="vexpl">
- <?=gettext("Allow clients on the bridge to obtain DHCP."); ?><br>
+ <?=gettext("Allow clients on the bridge to obtain DHCP."); ?><br />
</span>
</td>
</tr>
@@ -1169,13 +1173,13 @@ if ($savemsg)
foreach ($serverbridge_interface as $iface => $ifacename):
$selected = "";
if ($iface == $pconfig['serverbridge_interface'])
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$iface;?>" <?=$selected;?>>
<?=htmlspecialchars($ifacename);?>
</option>
<?php endforeach; ?>
- </select> <br>
+ </select> <br />
<?=gettext("The interface to which this tap instance will be " .
"bridged. This is not done automatically. You must assign this " .
"interface and create the bridge separately. " .
@@ -1187,8 +1191,8 @@ if ($savemsg)
<tr id="serverbridge_dhcp_start">
<td width="22%" valign="top" class="vncell"><?=gettext("Server Bridge DHCP Start"); ?></td>
<td width="78%" class="vtable">
- <input name="serverbridge_dhcp_start" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['serverbridge_dhcp_start']);?>">
- <br>
+ <input name="serverbridge_dhcp_start" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['serverbridge_dhcp_start']);?>"/>
+ <br />
<?=gettext("When using tap mode as a multi-point server, " .
"you may optionally supply a DHCP range to use on the " .
"interface to which this tap instance is bridged. " .
@@ -1200,8 +1204,8 @@ if ($savemsg)
<tr id="serverbridge_dhcp_end">
<td width="22%" valign="top" class="vncell"><?=gettext("Server Bridge DHCP End"); ?></td>
<td width="78%" class="vtable">
- <input name="serverbridge_dhcp_end" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['serverbridge_dhcp_end']);?>">
- <br>
+ <input name="serverbridge_dhcp_end" type="text" class="formfld unknown" size="20" value="<?=htmlspecialchars($pconfig['serverbridge_dhcp_end']);?>"/>
+ <br />
</td>
</tr>
<tr id="gwredir_opts">
@@ -1211,7 +1215,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['gwredir'],$chk); ?>
- <input name="gwredir" type="checkbox" value="yes" <?=$chk;?> onClick="gwredir_change()"/>
+ <input name="gwredir" type="checkbox" value="yes" <?=$chk;?> onclick="gwredir_change()"/>
</td>
<td>
<span class="vexpl">
@@ -1225,8 +1229,8 @@ if ($savemsg)
<tr id="local_optsv4">
<td width="22%" valign="top" class="vncell"><?=gettext("IPv4 Local Network/s"); ?></td>
<td width="78%" class="vtable">
- <input name="local_network" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['local_network']);?>">
- <br>
+ <input name="local_network" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['local_network']);?>"/>
+ <br />
<?=gettext("These are the IPv4 networks that will be accessible " .
"from the remote endpoint. Expressed as a comma-separated list of one or more CIDR ranges. " .
"You may leave this blank if you don't " .
@@ -1238,8 +1242,8 @@ if ($savemsg)
<tr id="local_optsv6">
<td width="22%" valign="top" class="vncell"><?=gettext("IPv6 Local Network/s"); ?></td>
<td width="78%" class="vtable">
- <input name="local_networkv6" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['local_networkv6']);?>">
- <br>
+ <input name="local_networkv6" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['local_networkv6']);?>"/>
+ <br />
<?=gettext("These are the IPv6 networks that will be accessible " .
"from the remote endpoint. Expressed as a comma-separated list of one or more IP/PREFIX. " .
"You may leave this blank if you don't " .
@@ -1251,8 +1255,8 @@ if ($savemsg)
<tr id="remote_optsv4">
<td width="22%" valign="top" class="vncell"><?=gettext("IPv4 Remote Network/s"); ?></td>
<td width="78%" class="vtable">
- <input name="remote_network" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['remote_network']);?>">
- <br>
+ <input name="remote_network" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['remote_network']);?>"/>
+ <br />
<?=gettext("These are the IPv4 networks that will be routed through " .
"the tunnel, so that a site-to-site VPN can be " .
"established without manually changing the routing tables. " .
@@ -1265,8 +1269,8 @@ if ($savemsg)
<tr id="remote_optsv6">
<td width="22%" valign="top" class="vncell"><?=gettext("IPv6 Remote Network/s"); ?></td>
<td width="78%" class="vtable">
- <input name="remote_networkv6" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['remote_networkv6']);?>">
- <br>
+ <input name="remote_networkv6" type="text" class="formfld unknown" size="40" value="<?=htmlspecialchars($pconfig['remote_networkv6']);?>"/>
+ <br />
<?=gettext("These are the IPv6 networks that will be routed through " .
"the tunnel, so that a site-to-site VPN can be " .
"established without manually changing the routing tables. " .
@@ -1291,7 +1295,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['compression'],$chk); ?>
- <input name="compression" type="checkbox" value="yes" <?=$chk;?>>
+ <input name="compression" type="checkbox" value="yes" <?=$chk;?>/>
</td>
<td>
<span class="vexpl">
@@ -1309,7 +1313,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['passtos'],$chk); ?>
- <input name="passtos" type="checkbox" value="yes" <?=$chk;?>>
+ <input name="passtos" type="checkbox" value="yes" <?=$chk;?>/>
</td>
<td>
<span class="vexpl">
@@ -1376,7 +1380,7 @@ if ($savemsg)
</td>
<td>
<span class="vexpl">
- <?=gettext("Allow connected clients to retain their connections if their IP address changes"); ?>.<br>
+ <?=gettext("Allow connected clients to retain their connections if their IP address changes"); ?>.<br />
</span>
</td>
</tr>
@@ -1394,7 +1398,7 @@ if ($savemsg)
</td>
<td>
<span class="vexpl">
- <?=gettext("Provide a virtual adapter IP address to clients (see Tunnel Network)"); ?><br>
+ <?=gettext("Provide a virtual adapter IP address to clients (see Tunnel Network)"); ?><br />
</span>
</td>
</tr>
@@ -1420,7 +1424,7 @@ if ($savemsg)
<td>&nbsp;</td>
<td>
<?=gettext("Relevant when supplying a virtual adapter IP address to clients when using tun mode on IPv4."); ?><br/>
- <?=gettext("Some clients may require this even for IPv6, such as OpenVPN Connect (iOS/Android). Others may break if it is present, such as older versions of OpenVPN or clients such as Yealink phones."); ?><br>
+ <?=gettext("Some clients may require this even for IPv6, such as OpenVPN Connect (iOS/Android). Others may break if it is present, such as older versions of OpenVPN or clients such as Yealink phones."); ?><br />
</td>
</tr>
</table>
@@ -1433,7 +1437,7 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['dns_domain_enable'],$chk); ?>
- <input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onClick="dns_domain_change()">
+ <input name="dns_domain_enable" type="checkbox" id="dns_domain_enable" value="yes" <?=$chk;?> onclick="dns_domain_change()"/>
</td>
<td>
<span class="vexpl">
@@ -1445,7 +1449,7 @@ if ($savemsg)
<table border="0" cellpadding="2" cellspacing="0" id="dns_domain_data">
<tr>
<td>
- <input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>">
+ <input name="dns_domain" type="text" class="formfld unknown" id="dns_domain" size="30" value="<?=htmlspecialchars($pconfig['dns_domain']);?>"/>
</td>
</tr>
</table>
@@ -1458,11 +1462,11 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['dns_server_enable'],$chk); ?>
- <input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onClick="dns_server_change()">
+ <input name="dns_server_enable" type="checkbox" id="dns_server_enable" value="yes" <?=$chk;?> onclick="dns_server_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Provide a DNS server list to clients"); ?><br>
+ <?=gettext("Provide a DNS server list to clients"); ?><br />
</span>
</td>
</tr>
@@ -1473,7 +1477,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Server"); ?> #1:&nbsp;
</span>
- <input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>">
+ <input name="dns_server1" type="text" class="formfld unknown" id="dns_server1" size="20" value="<?=htmlspecialchars($pconfig['dns_server1']);?>"/>
</td>
</tr>
<tr>
@@ -1481,7 +1485,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Server"); ?> #2:&nbsp;
</span>
- <input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>">
+ <input name="dns_server2" type="text" class="formfld unknown" id="dns_server2" size="20" value="<?=htmlspecialchars($pconfig['dns_server2']);?>"/>
</td>
</tr>
<tr>
@@ -1489,7 +1493,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Server"); ?> #3:&nbsp;
</span>
- <input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>">
+ <input name="dns_server3" type="text" class="formfld unknown" id="dns_server3" size="20" value="<?=htmlspecialchars($pconfig['dns_server3']);?>"/>
</td>
</tr>
<tr>
@@ -1497,7 +1501,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Server"); ?> #4:&nbsp;
</span>
- <input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>">
+ <input name="dns_server4" type="text" class="formfld unknown" id="dns_server4" size="20" value="<?=htmlspecialchars($pconfig['dns_server4']);?>"/>
</td>
</tr>
</table>
@@ -1510,11 +1514,11 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['ntp_server_enable'],$chk); ?>
- <input name="ntp_server_enable" type="checkbox" id="ntp_server_enable" value="yes" <?=$chk;?> onClick="ntp_server_change()">
+ <input name="ntp_server_enable" type="checkbox" id="ntp_server_enable" value="yes" <?=$chk;?> onclick="ntp_server_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Provide a NTP server list to clients"); ?><br>
+ <?=gettext("Provide a NTP server list to clients"); ?><br />
</span>
</td>
</tr>
@@ -1525,7 +1529,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Server"); ?> #1:&nbsp;
</span>
- <input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=htmlspecialchars($pconfig['ntp_server1']);?>">
+ <input name="ntp_server1" type="text" class="formfld unknown" id="ntp_server1" size="20" value="<?=htmlspecialchars($pconfig['ntp_server1']);?>"/>
</td>
</tr>
<tr>
@@ -1533,7 +1537,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Server"); ?> #2:&nbsp;
</span>
- <input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=htmlspecialchars($pconfig['ntp_server2']);?>">
+ <input name="ntp_server2" type="text" class="formfld unknown" id="ntp_server2" size="20" value="<?=htmlspecialchars($pconfig['ntp_server2']);?>"/>
</td>
</tr>
</table>
@@ -1546,11 +1550,11 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['netbios_enable'],$chk); ?>
- <input name="netbios_enable" type="checkbox" id="netbios_enable" value="yes" <?=$chk;?> onClick="netbios_change()">
+ <input name="netbios_enable" type="checkbox" id="netbios_enable" value="yes" <?=$chk;?> onclick="netbios_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Enable NetBIOS over TCP/IP"); ?><br>
+ <?=gettext("Enable NetBIOS over TCP/IP"); ?><br />
</span>
</td>
</tr>
@@ -1569,7 +1573,7 @@ if ($savemsg)
foreach ($netbios_nodetypes as $type => $name):
$selected = "";
if ($pconfig['netbios_ntype'] == $type)
- $selected = "selected";
+ $selected = "selected=\"selected\"";
?>
<option value="<?=$type;?>" <?=$selected;?>><?=$name;?></option>
<?php endforeach; ?>
@@ -1587,7 +1591,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Scope ID"); ?>:&nbsp;
</span>
- <input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=htmlspecialchars($pconfig['netbios_scope']);?>">
+ <input name="netbios_scope" type="text" class="formfld unknown" id="netbios_scope" size="30" value="<?=htmlspecialchars($pconfig['netbios_scope']);?>"/>
<br/>
<?=gettext("A NetBIOS Scope ID provides an extended naming " .
"service for NetBIOS over TCP/IP. The NetBIOS " .
@@ -1606,11 +1610,11 @@ if ($savemsg)
<tr>
<td>
<?php set_checked($pconfig['wins_server_enable'],$chk); ?>
- <input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onClick="wins_server_change()">
+ <input name="wins_server_enable" type="checkbox" id="wins_server_enable" value="yes" <?=$chk;?> onclick="wins_server_change()"/>
</td>
<td>
<span class="vexpl">
- <?=gettext("Provide a WINS server list to clients"); ?><br>
+ <?=gettext("Provide a WINS server list to clients"); ?><br />
</span>
</td>
</tr>
@@ -1621,7 +1625,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Server"); ?> #1:&nbsp;
</span>
- <input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=htmlspecialchars($pconfig['wins_server1']);?>">
+ <input name="wins_server1" type="text" class="formfld unknown" id="wins_server1" size="20" value="<?=htmlspecialchars($pconfig['wins_server1']);?>"/>
</td>
</tr>
<tr>
@@ -1629,7 +1633,7 @@ if ($savemsg)
<span class="vexpl">
<?=gettext("Server"); ?> #2:&nbsp;
</span>
- <input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=htmlspecialchars($pconfig['wins_server2']);?>">
+ <input name="wins_server2" type="text" class="formfld unknown" id="wins_server2" size="20" value="<?=htmlspecialchars($pconfig['wins_server2']);?>"/>
</td>
</tr>
</table>
@@ -1637,7 +1641,7 @@ if ($savemsg)
</tr>
</table>
- <table width="100%" border="0" cellpadding="6" cellspacing="0" id="client_opts">
+ <table width="100%" border="0" cellpadding="6" cellspacing="0" id="adv_confg">
<tr>
<td colspan="2" class="list" height="12"></td>
</tr>
@@ -1665,8 +1669,8 @@ if ($savemsg)
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>">
- <input name="act" type="hidden" value="<?=$act;?>">
+ <input name="save" type="submit" class="formbtn" value="<?=gettext("Save"); ?>"/>
+ <input name="act" type="hidden" value="<?=$act;?>"/>
<?php if (isset($id) && $a_server[$id]): ?>
<input name="id" type="hidden" value="<?=$id;?>">
<?php endif; ?>
@@ -1687,6 +1691,15 @@ if ($savemsg)
<td width="10%" class="list"></td>
</tr>
</thead>
+ <tfoot>
+ <tr>
+ <td class="list" colspan="4"></td>
+ <td class="list">
+ <a href="vpn_openvpn_server.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server"); ?>" alt="" width="17" height="17" border="0" />
+ </a>
+ </td>
+ </tr>
+ </tfoot>
<tbody>
<?php
$i = 0;
@@ -1696,43 +1709,36 @@ if ($savemsg)
$disabled = "YES";
?>
<tr>
- <td class="listlr" ondblclick="document.location='vpn_openvpn_server.php?act=edit&id=<?=$i;?>'">
+ <td class="listlr" ondblclick="document.location='vpn_openvpn_server.php?act=edit&amp;id=<?=$i;?>'">
<?=$disabled;?>
</td>
- <td class="listr" ondblclick="document.location='vpn_openvpn_server.php?act=edit&id=<?=$i;?>'">
+ <td class="listr" ondblclick="document.location='vpn_openvpn_server.php?act=edit&amp;id=<?=$i;?>'">
<?=htmlspecialchars($server['protocol']);?> / <?=htmlspecialchars($server['local_port']);?>
</td>
- <td class="listr" ondblclick="document.location='vpn_openvpn_server.php?act=edit&id=<?=$i;?>'">
+ <td class="listr" ondblclick="document.location='vpn_openvpn_server.php?act=edit&amp;id=<?=$i;?>'">
<?=htmlspecialchars($server['tunnel_network']);?><br/>
<?=htmlspecialchars($server['tunnel_networkv6']);?><br/>
</td>
- <td class="listbg" ondblclick="document.location='vpn_openvpn_server.php?act=edit&id=<?=$i;?>'">
+ <td class="listbg" ondblclick="document.location='vpn_openvpn_server.php?act=edit&amp;id=<?=$i;?>'">
<?=htmlspecialchars($server['description']);?>
</td>
- <td valign="middle" nowrap class="list">
- <a href="vpn_openvpn_server.php?act=edit&id=<?=$i;?>">
- <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server"); ?>" width="17" height="17" border="0">
+ <td valign="middle" nowrap="nowrap" class="list">
+ <a href="vpn_openvpn_server.php?act=edit&amp;id=<?=$i;?>">
+ <img src="./themes/<?=$g['theme'];?>/images/icons/icon_e.gif" title="<?=gettext("edit server"); ?>" alt="" width="17" height="17" border="0" />
</a>
&nbsp;
- <a href="vpn_openvpn_server.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this server?"); ?>')">
- <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server"); ?>" width="17" height="17" border="0">
+ <a href="vpn_openvpn_server.php?act=del&amp;id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this server?"); ?>')">
+ <img src="/themes/<?=$g['theme'];?>/images/icons/icon_x.gif" title="<?=gettext("delete server"); ?>" alt="" width="17" height="17" border="0" />
</a>
</td>
</tr>
<?php
$i++;
endforeach;
+ if ($i == 0)
+ echo "<tr><td></td></tr>";
?>
</tbody>
- <tfoot>
- <tr>
- <td class="list" colspan="4"></td>
- <td class="list">
- <a href="vpn_openvpn_server.php?act=new"><img src="./themes/<?=$g['theme'];?>/images/icons/icon_plus.gif" title="<?=gettext("add server"); ?>" width="17" height="17" border="0">
- </a>
- </td>
- </tr>
- </tfoot>
</table>
<?=gettext("Additional OpenVPN servers can be added here.");?>
@@ -1742,7 +1748,7 @@ if ($savemsg)
</td>
</tr>
</table>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
mode_change();
autokey_change();
@@ -1756,7 +1762,6 @@ netbios_change();
tuntap_change();
//-->
</script>
-</body>
<?php include("fend.inc"); ?>
<?php
@@ -1765,9 +1770,11 @@ tuntap_change();
function set_checked($var,& $chk) {
if($var)
- $chk = 'checked';
+ $chk = 'checked="checked"';
else
$chk = '';
}
?>
+</body>
+</html>
diff --git a/usr/local/www/vpn_pppoe.php b/usr/local/www/vpn_pppoe.php
index b91e6d2..128e22c 100755
--- a/usr/local/www/vpn_pppoe.php
+++ b/usr/local/www/vpn_pppoe.php
@@ -95,7 +95,7 @@ include("head.inc");
<form action="vpn_pppoe.php" method="post">
<?php if ($savemsg) print_info_box($savemsg); ?>
<?php if (is_subsystem_dirty('vpnpppoe')): ?><p>
-<?php print_info_box_np(gettext("The PPPoE entry list has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?>
+<?php print_info_box_np(gettext("The PPPoE entry list has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?>
<?php endif; ?>
<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
@@ -108,7 +108,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="vpn_pppoe_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new pppoe instance");?>"></a></td>
+ <td valign="middle"><a href="vpn_pppoe_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new pppoe instance");?>" alt=""/></a></td>
</tr>
</table>
</td>
@@ -127,11 +127,11 @@ include("head.inc");
<td class="listbg" ondblclick="document.location='vpn_pppoe_edit.php?id=<?=$i;?>';">
<?=htmlspecialchars($pppoe['descr']);?>&nbsp;
</td>
- <td valign="middle" nowrap class="list">
+ <td valign="middle" nowrap="nowrap" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
- <td valign="middle"><a href="vpn_pppoe_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit pppoe instance"); ?>"></a></td>
- <td><a href="vpn_pppoe.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete pppoe instance");?>"></a></td>
+ <td valign="middle"><a href="vpn_pppoe_edit.php?id=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0" title="<?=gettext("edit pppoe instance"); ?>" alt=""/></a></td>
+ <td><a href="vpn_pppoe.php?act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this entry? All elements that still use it will become invalid (e.g. filter rules)!");?>')"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" title="<?=gettext("delete pppoe instance");?>"alt=""/></a></td>
</tr>
</table>
</td>
@@ -143,7 +143,7 @@ include("head.inc");
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td valign="middle" width="17">&nbsp;</td>
- <td valign="middle"><a href="vpn_pppoe_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new pppoe instance");?>"></a></td>
+ <td valign="middle"><a href="vpn_pppoe_edit.php"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0" title="<?=gettext("add a new pppoe instance");?>" alt=""/></a></td>
</td>
</tr>
</table>
diff --git a/usr/local/www/vpn_pppoe_edit.php b/usr/local/www/vpn_pppoe_edit.php
index 5690818..5f17221 100755
--- a/usr/local/www/vpn_pppoe_edit.php
+++ b/usr/local/www/vpn_pppoe_edit.php
@@ -4,7 +4,7 @@
part of pfSense
Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
- Copyright (C) 2010 Ermal Luçi
+ Copyright (C) 2010 Ermal Luçi
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -263,7 +263,7 @@ include("head.inc");
rowsize[2] = "10";
</script>
-<script language="JavaScript">
+<script type="text/JavaScript">
<!--
function get_radio_value(obj)
{
@@ -362,13 +362,13 @@ function enable_change(enable_over) {
<td width="22%" valign="top" class="vtable">&nbsp;</td>
<td width="78%" class="vtable">
<input name="mode" type="radio" onclick="enable_change(false)" value="off"
- <?php if ($pconfig['mode'] != "server") echo "checked";?>>
+ <?php if ($pconfig['mode'] != "server") echo "checked=\"checked\"";?>/>
<?=gettext("Off"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vtable">&nbsp;</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 PPPoE server"); ?></td>
</tr>
@@ -382,11 +382,11 @@ function enable_change(enable_over) {
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>
+ </select> <br />
</td>
</tr>
@@ -397,14 +397,14 @@ function enable_change(enable_over) {
<?php
for($x=0; $x<33; $x++) {
if($x == $pconfig['pppoe_subnet'])
- $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"); ?>: 24 <?=gettext("is"); ?> 255.255.255.0
+ <br /><?=gettext("Hint"); ?>: 24 <?=gettext("is"); ?> 255.255.255.0
</td>
</tr>
<tr>
@@ -414,20 +414,20 @@ function enable_change(enable_over) {
<?php
for($x=0; $x<255; $x++) {
if($x == $pconfig['n_pppoe_units'])
- $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 PPPoE clients"); ?>
+ <br /><?=gettext("Hint: 10 is ten PPPoE 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 PPPoE server should give to clients for use as their \"gateway\""); ?>.
<br/>
@@ -439,95 +439,95 @@ function enable_change(enable_over) {
<tr>
<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 address 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 address subnet"); ?>.<br />
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Description"); ?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>">
+ <?=$mandfldhtml;?><input name="descr" type="text" class="formfld unknown" id="descr" size="40" value="<?=htmlspecialchars($pconfig['descr']);?>"/>
<br/>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers"); ?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="pppoe_dns1" type="text" class="formfld unknown" id="pppoe_dns1" size="20" value="<?=htmlspecialchars($pconfig['pppoe_dns1']);?>">
- <br>
- <input name="pppoe_dns2" type="text" class="formfld unknown" id="pppoe_dns2" size="20" value="<?=htmlspecialchars($pconfig['pppoe_dns2']);?>">
- <br>
- <?=gettext("If entered they will be given to all PPPoE clients, else LAN DNS and one WAN DNS will go to all clients"); ?><br>
+ <?=$mandfldhtml;?><input name="pppoe_dns1" type="text" class="formfld unknown" id="pppoe_dns1" size="20" value="<?=htmlspecialchars($pconfig['pppoe_dns1']);?>"/>
+ <br />
+ <input name="pppoe_dns2" type="text" class="formfld unknown" id="pppoe_dns2" size="20" value="<?=htmlspecialchars($pconfig['pppoe_dns2']);?>"/>
+ <br />
+ <?=gettext("If entered they will be given to all PPPoE clients, else LAN DNS and one WAN DNS will go to all clients"); ?><br />
</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"); ?><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"); ?><br />
</strong><?=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>
- <br>
- </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br>
- <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked"; ?>>
- <strong><?=gettext("Use Backup RADIUS Server"); ?></strong><br>
+ "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 />
+ <br />
+ </strong><?=gettext("Sends accounting packets to the RADIUS server"); ?>.<br />
+ <input name="radiussecenable" type="checkbox" id="radiussecenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiussecenable']) echo "checked=\"checked\""; ?>/>
+ <strong><?=gettext("Use Backup RADIUS Server"); ?></strong><br />
<?=gettext("When set, if primary server fails all requests will be sent via backup server"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("NAS IP Address"); ?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="radius_nasip" type="text" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>">
- <br><?=gettext("RADIUS server NAS IP Address"); ?><br>
+ <?=$mandfldhtml;?><input name="radius_nasip" type="text" class="formfld unknown" id="radius_nasip" size="20" value="<?=htmlspecialchars($pconfig['radius_nasip']);?>"/>
+ <br /><?=gettext("RADIUS server NAS IP Address"); ?><br />
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("RADIUS Accounting Update"); ?></td>
<td width="78%" class="vtable">
- <?=$mandfldhtml;?><input name="radius_acct_update" type="text" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>">
- <br><?=gettext("RADIUS accounting update period in seconds"); ?>
+ <?=$mandfldhtml;?><input name="radius_acct_update" type="text" class="formfld unknown" id="radius_acct_update" size="20" value="<?=htmlspecialchars($pconfig['radius_acct_update']);?>"/>
+ <br /><?=gettext("RADIUS accounting update period in seconds"); ?>
</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RADIUS issued IPs"); ?></td>
<td width="78%" valign="top" class="vtable">
- <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if($pconfig['radiusissueips']) echo " CHECKED"; ?>>
- <br><?=gettext("Issue IP Addresses via RADIUS server"); ?>.</td>
+ <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips" <?php if($pconfig['radiusissueips']) echo "checked=\"checked\""; ?>/>
+ <br /><?=gettext("Issue IP Addresses via RADIUS server"); ?>.</td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RADIUS server Primary"); ?></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><?=gettext("Enter the IP address, authentication port and accounting port (optional) of the RADIUS server."); ?><br>
- <br> <?=gettext("standard port 1812 and 1813 accounting"); ?></td>
+ <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, authentication port and accounting port (optional) of the RADIUS server."); ?><br />
+ <br /> <?=gettext("standard port 1812 and 1813 accounting"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RADIUS primary 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><?=gettext("Enter the shared secret that will be used to authenticate " .
+ <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("RADIUS server Secondary"); ?></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><?=gettext("Enter the IP address, authentication port and accounting port (optional) of the backup RADIUS server."); ?><br>
- <br> <?=gettext("standard port 1812 and 1813 accounting"); ?></td>
+ <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, authentication port and accounting port (optional) of the backup RADIUS server."); ?><br />
+ <br /> <?=gettext("standard port 1812 and 1813 accounting"); ?></td>
</tr>
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("RADIUS secondary 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 RADIUS server"); ?>.</td>
</tr>
@@ -585,18 +585,18 @@ function enable_change(enable_over) {
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
<?php if (isset($id))
- echo "<input type='hidden' name='id' id='id' value='{$id}' >";
+ echo "<input type='hidden' name='id' id='id' value='{$id}' />";
?>
<?php if (isset($pconfig['pppoeid']))
- echo "<input type='hidden' name='pppoeid' id='pppoeid' value='{$pppoeid}' >";
+ echo "<input type='hidden' name='pppoeid' id='pppoeid' value='{$pppoeid}' />";
?>
<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save"); ?>" onclick="enable_change(true)"/>
- <a href="vpn_pppoe.php"><input name="Cancel" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>"></a>
+ <a href="vpn_pppoe.php"><input name="Cancel" type="button" class="formbtn" value="<?=gettext("Cancel"); ?>"/></a>
</td>
</tr>
<tr>
<td width="22%" valign="top">&nbsp;</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 add a firewall rule to permit " .
"traffic from PPPoE clients"); ?>!</span></td>
</tr>
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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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">&nbsp;</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']);?>&nbsp;
</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>
- &nbsp;<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>
+ &nbsp;<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">
- &nbsp;(<?=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"/>
+ &nbsp;(<?=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">&nbsp;</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>
OpenPOWER on IntegriCloud