summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorErik Kristensen <ekristen@pfsense.org>2005-08-23 01:18:28 +0000
committerErik Kristensen <ekristen@pfsense.org>2005-08-23 01:18:28 +0000
commit8ab3e9ed14dc643d1f0192a67655b0691e083968 (patch)
treeb8f31194997af46f303beaad8892b7173c19178c /usr/local/www
parent1e055202d3b8e244e65188eb1d0b261fae0c5749 (diff)
downloadpfsense-8ab3e9ed14dc643d1f0192a67655b0691e083968.zip
pfsense-8ab3e9ed14dc643d1f0192a67655b0691e083968.tar.gz
First Step in Fixing AutoComplete and Cleaning Up Code
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php888
-rwxr-xr-xusr/local/www/head.inc18
-rw-r--r--usr/local/www/includes/javascript.inc.php18
-rw-r--r--usr/local/www/javascript/autosuggest.js336
-rw-r--r--usr/local/www/javascript/firewall_rules_edit.js120
-rw-r--r--usr/local/www/javascript/suggestions.js33
-rwxr-xr-xusr/local/www/status_graph.php14
-rw-r--r--usr/local/www/themes/_orange-flow/all.css257
-rw-r--r--usr/local/www/themes/metallic/all.css29
-rw-r--r--usr/local/www/themes/pfsense-dropdown/all.css23
-rw-r--r--usr/local/www/themes/pfsense/all.css25
11 files changed, 1083 insertions, 678 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 534db44..8465a3b 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -309,484 +309,361 @@ if ($_POST) {
$pgtitle = "Firewall: Rules: Edit";
$closehead = false;
+
+$page_filename = "firewall_rules_edit.php";
include("head.inc");
?>
-<script language="JavaScript">
-<!--
-var portsenabled = 1;
-
-function ext_change() {
- if ((document.iform.srcbeginport.selectedIndex == 0) && portsenabled) {
- document.iform.srcbeginport_cust.disabled = 0;
- } else {
- document.iform.srcbeginport_cust.value = "";
- document.iform.srcbeginport_cust.disabled = 1;
- }
- if ((document.iform.srcendport.selectedIndex == 0) && portsenabled) {
- document.iform.srcendport_cust.disabled = 0;
- } else {
- document.iform.srcendport_cust.value = "";
- document.iform.srcendport_cust.disabled = 1;
- }
- if ((document.iform.dstbeginport.selectedIndex == 0) && portsenabled) {
- document.iform.dstbeginport_cust.disabled = 0;
- } else {
- document.iform.dstbeginport_cust.value = "";
- document.iform.dstbeginport_cust.disabled = 1;
- }
- if ((document.iform.dstendport.selectedIndex == 0) && portsenabled) {
- document.iform.dstendport_cust.disabled = 0;
- } else {
- document.iform.dstendport_cust.value = "";
- document.iform.dstendport_cust.disabled = 1;
- }
-
- if (!portsenabled) {
- document.iform.srcbeginport.disabled = 1;
- document.iform.srcendport.disabled = 1;
- document.iform.dstbeginport.disabled = 1;
- document.iform.dstendport.disabled = 1;
- } else {
- document.iform.srcbeginport.disabled = 0;
- document.iform.srcendport.disabled = 0;
- document.iform.dstbeginport.disabled = 0;
- document.iform.dstendport.disabled = 0;
- }
-}
-
-function typesel_change() {
- switch (document.iform.srctype.selectedIndex) {
- case 1: /* single */
- document.iform.src.disabled = 0;
- document.iform.srcmask.value = "";
- document.iform.srcmask.disabled = 1;
- break;
- case 2: /* network */
- document.iform.src.disabled = 0;
- document.iform.srcmask.disabled = 0;
- break;
- default:
- document.iform.src.value = "";
- document.iform.src.disabled = 1;
- document.iform.srcmask.value = "";
- document.iform.srcmask.disabled = 1;
- break;
- }
- switch (document.iform.dsttype.selectedIndex) {
- case 1: /* single */
- document.iform.dst.disabled = 0;
- document.iform.dstmask.value = "";
- document.iform.dstmask.disabled = 1;
- break;
- case 2: /* network */
- document.iform.dst.disabled = 0;
- document.iform.dstmask.disabled = 0;
- break;
- default:
- document.iform.dst.value = "";
- document.iform.dst.disabled = 1;
- document.iform.dstmask.value = "";
- document.iform.dstmask.disabled = 1;
- break;
- }
-}
-
-function proto_change() {
- if (document.iform.proto.selectedIndex < 3) {
- portsenabled = 1;
- } else {
- portsenabled = 0;
- }
-
- /* Disable OS knob if the proto is not TCP. */
- if (document.iform.proto.selectedIndex < 1) {
- document.forms[0].os.disabled = 0;
- } else {
- document.forms[0].os.disabled = 1;
- }
-
- if (document.iform.proto.selectedIndex == 3) {
- document.iform.icmptype.disabled = 0;
- } else {
- document.iform.icmptype.disabled = 1;
- }
-
- ext_change();
-}
-
-function src_rep_change() {
- document.iform.srcendport.selectedIndex = document.iform.srcbeginport.selectedIndex;
-}
-function dst_rep_change() {
- document.iform.dstendport.selectedIndex = document.iform.dstbeginport.selectedIndex;
-}
-//-->
-</script>
</head>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
<p class="pgtitle"><?=$pgtitle?></p>
<?php if ($input_errors) print_input_errors($input_errors); ?>
- <form action="firewall_rules_edit.php" method="post" name="iform" id="iform">
- <?display_topbar()?>
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="22%" valign="top" class="vncellreq">Action</td>
- <td width="78%" class="vtable">
-<select name="type" class="formfld">
- <?php $types = explode(" ", "Pass Block Reject"); foreach ($types as $type): ?>
- <option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['type'])) echo "selected"; ?>>
- <?=htmlspecialchars($type);?>
- </option>
- <?php endforeach; ?>
- </select> <br>
- <span class="vexpl">Choose what to do with packets that match
- the criteria specified below.<br>
-Hint: the difference between block and reject is that with reject, a packet (TCP RST or ICMP port unreachable for UDP) is returned to the sender, whereas with block the packet is dropped silently. In either case, the original packet is discarded. Reject only works when the protocol is set to either TCP or UDP (but not &quot;TCP/UDP&quot;) below.</span></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">Disabled</td>
- <td width="78%" class="vtable">
- <input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
- <strong>Disable this rule</strong><br>
- <span class="vexpl">Set this option to disable this rule without
- removing it from the list.</span></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">Interface</td>
- <td width="78%" class="vtable">
-<select name="interface" class="formfld">
- <?php $interfaces = array('wan' => 'WAN', 'lan' => 'LAN', 'pptp' => 'PPTP', 'pppoe' => 'PPPOE');
- for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
- $interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr'];
- }
- foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>>
- <?=htmlspecialchars($ifacename);?>
- </option>
- <?php endforeach; ?>
- </select> <br>
- <span class="vexpl">Choose on which interface packets must
- come in to match this rule.</span></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">Protocol</td>
- <td width="78%" class="vtable">
-<select name="proto" class="formfld" onchange="proto_change()">
- <?php $protocols = explode(" ", "TCP UDP TCP/UDP ICMP ICMP6 ESP AH GRE IPv6 IGMP any carp pfsync"); foreach ($protocols as $proto): ?>
- <option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected"; ?>>
- <?=htmlspecialchars($proto);?>
- </option>
- <?php endforeach; ?>
- </select> <br>
- <span class="vexpl">Choose which IP protocol this rule should
- match.<br>
- Hint: in most cases, you should specify <em>TCP</em> &nbsp;here.</span></td>
- </tr>
- <tr>
- <td valign="top" class="vncell">ICMP type</td>
- <td class="vtable">
- <select name="icmptype" class="formfld">
- <?php
-
- $icmptypes = array(
- "" => "any",
- "echorep" => "Echo reply",
- "unreach" => "Destination unreachable",
- "squench" => "Source quench",
- "redir" => "Redirect",
- "althost" => "Alternate Host",
- "echoreq" => "Echo",
- "routeradv" => "Router advertisement",
- "routersol" => "Router solicitation",
- "timex" => "Time exceeded",
- "paramprob" => "Invalid IP header",
- "timereq" => "Timestamp",
- "timerep" => "Timestamp reply",
- "inforeq" => "Information request",
- "inforep" => "Information reply",
- "maskreq" => "Address mask request",
- "maskrep" => "Address mask reply"
- );
-
- foreach ($icmptypes as $icmptype => $descr): ?>
- <option value="<?=$icmptype;?>" <?php if ($icmptype == $pconfig['icmptype']) echo "selected"; ?>>
- <?=htmlspecialchars($descr);?>
- </option>
- <?php endforeach; ?>
- </select>
- <br>
- <span class="vexpl">If you selected ICMP for the protocol above, you may specify an ICMP type here.</span></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">Source</td>
- <td width="78%" class="vtable">
-<input name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
- <strong>not</strong><br>
- Use this option to invert the sense of the match.<br>
- <br>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>Type:&nbsp;&nbsp;</td>
- <td><select name="srctype" class="formfld" onChange="typesel_change()">
- <?php $sel = is_specialnet($pconfig['src']); ?>
- <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>>
- any</option>
- <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>
- Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>
- Network</option>
- <option value="lan" <?php if ($pconfig['src'] == "lan") { echo "selected"; } ?>>
- LAN subnet</option>
- <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>
- PPTP clients</option>
- <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>>
- PPPoE clients</option>
- <?php for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++): ?>
- <option value="opt<?=$i;?>" <?php if ($pconfig['src'] == "opt" . $i) { echo "selected"; } ?>>
- <?=htmlspecialchars($config['interfaces']['opt' . $i]['descr']);?> subnet</option>
- <?php endfor; ?>
- </select></td>
- </tr>
- <tr>
- <td>Address:&nbsp;&nbsp;</td>
- <td><input autocomplete='off' onblur='actb_removedisp()' onkeypress='return (event.keyCode!=13);' onkeydown='actb_checkkey(event, this)' onkeyup='actb_tocomplete(this,event,addressarray);' 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="formfld" id="srcmask">
- <?php for ($i = 31; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected"; ?>><?=$i;?></option>
- <?php endfor; ?>
- </select>
+
+<form action="firewall_rules_edit.php" method="post" name="iform" id="iform">
+<? display_topbar() ?>
+ <table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Action</td>
+ <td width="78%" class="vtable">
+ <select name="type" class="formfld">
+ <?php $types = explode(" ", "Pass Block Reject"); foreach ($types as $type): ?>
+ <option value="<?=strtolower($type);?>" <?php if (strtolower($type) == strtolower($pconfig['type'])) echo "selected"; ?>>
+ <?=htmlspecialchars($type);?>
+ </option>
+ <?php endforeach; ?>
+ </select>
+ <br/>
+ <span class="vexpl">
+ Choose what to do with packets that match the criteria specified below. <br/>
+ Hint: the difference between block and reject is that with reject, a packet (TCP RST or ICMP port unreachable for UDP) is returned to the sender, whereas with block the packet is dropped silently. In either case, the original packet is discarded. Reject only works when the protocol is set to either TCP or UDP (but not &quot;TCP/UDP&quot;) below.
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Disabled</td>
+ <td width="78%" class="vtable">
+ <input name="disabled" type="checkbox" id="disabled" value="yes" <?php if ($pconfig['disabled']) echo "checked"; ?>>
+ <strong>Disable this rule</strong><br />
+ <span class="vexpl">Set this option to disable this rule without removing it from the list.</span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Interface</td>
+ <td width="78%" class="vtable">
+ <select name="interface" class="formfld">
+<?php
+ $interfaces = array('wan' => 'WAN', 'lan' => 'LAN', 'pptp' => 'PPTP', 'pppoe' => 'PPPOE');
+ for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
+ $interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr'];
+ }
+ foreach ($interfaces as $iface => $ifacename): ?>
+ <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>><?=htmlspecialchars($ifacename);?></option>
+<?php endforeach; ?>
+ </select>
+ <br />
+ <span class="vexpl">Choose on which interface packets must come in to match this rule.</span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Protocol</td>
+ <td width="78%" class="vtable">
+ <select name="proto" class="formfld" onchange="proto_change()">
+<?php
+ $protocols = explode(" ", "TCP UDP TCP/UDP ICMP ICMP6 ESP AH GRE IPv6 IGMP any carp pfsync");
+ foreach ($protocols as $proto): ?>
+ <option value="<?=strtolower($proto);?>" <?php if (strtolower($proto) == $pconfig['proto']) echo "selected"; ?>><?=htmlspecialchars($proto);?></option>
+<?php endforeach; ?>
+ </select>
+ <br />
+ <span class="vexpl">Choose which IP protocol this rule should match. <br /> Hint: in most cases, you should specify <em>TCP</em> &nbsp;here.</span>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" class="vncell">ICMP type</td>
+ <td class="vtable">
+ <select name="icmptype" class="formfld">
+<?php
+ $icmptypes = array(
+ "" => "any",
+ "echorep" => "Echo reply",
+ "unreach" => "Destination unreachable",
+ "squench" => "Source quench",
+ "redir" => "Redirect",
+ "althost" => "Alternate Host",
+ "echoreq" => "Echo",
+ "routeradv" => "Router advertisement",
+ "routersol" => "Router solicitation",
+ "timex" => "Time exceeded",
+ "paramprob" => "Invalid IP header",
+ "timereq" => "Timestamp",
+ "timerep" => "Timestamp reply",
+ "inforeq" => "Information request",
+ "inforep" => "Information reply",
+ "maskreq" => "Address mask request",
+ "maskrep" => "Address mask reply"
+ );
+
+ foreach ($icmptypes as $icmptype => $descr): ?>
+ <option value="<?=$icmptype;?>" <?php if ($icmptype == $pconfig['icmptype']) echo "selected"; ?>><?=htmlspecialchars($descr);?></option>
+<?php endforeach; ?>
+ </select>
+ <br />
+ <span class="vexpl">If you selected ICMP for the protocol above, you may specify an ICMP type here.</span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Source</td>
+ <td width="78%" class="vtable">
+ <input name="srcnot" type="checkbox" id="srcnot" value="yes" <?php if ($pconfig['srcnot']) echo "checked"; ?>>
+ <strong>not</strong>
+ <br />
+ Use this option to invert the sense of the match.
+ <br />
+ <br />
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td>Type:&nbsp;&nbsp;</td>
+ <td>
+ <select name="srctype" class="formfld" onChange="typesel_change()">
+<?php
+ $sel = is_specialnet($pconfig['src']); ?>
+ <option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>>any</option>
+ <option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="lan" <?php if ($pconfig['src'] == "lan") { echo "selected"; } ?>>LAN subnet</option>
+ <option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pppoe" <?php if ($pconfig['src'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+<?php
+ for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++): ?>
+ <option value="opt<?=$i;?>" <?php if ($pconfig['src'] == "opt" . $i) { echo "selected"; } ?>><?=htmlspecialchars($config['interfaces']['opt' . $i]['descr']);?> subnet</option>
+<?php endfor; ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>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']);?>"> /
+ <select name="srcmask" class="formfld" id="srcmask">
+<?php for ($i = 31; $i > 0; $i--): ?>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected"; ?>><?=$i;?></option>
+<?php endfor; ?>
+ </select>
</td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">Source port range
- </td>
- <td width="78%" class="vtable">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>from:&nbsp;&nbsp;</td>
- <td><select name="srcbeginport" class="formfld" onchange="src_rep_change();ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
- <?php foreach ($wkports as $wkport => $wkportdesc): ?>
- <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) {
- echo "selected";
- $bfound = 1;
- }?>>
- <?=htmlspecialchars($wkportdesc);?>
- </option>
- <?php endforeach; ?>
- </select> <input autocomplete='off' onblur='actb_removedisp()' onkeypress='return (event.keyCode!=13);' onkeydown='actb_checkkey(event, this);' onkeyup='actb_tocomplete(this,event,customarray)' class="formfldalias" name="srcbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcbeginport']) echo $pconfig['srcbeginport']; ?>"></td>
- </tr>
- <tr>
- <td>to:</td>
- <td><select name="srcendport" class="formfld" onchange="ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
- <?php foreach ($wkports as $wkport => $wkportdesc): ?>
- <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) {
- echo "selected";
- $bfound = 1;
- }?>>
- <?=htmlspecialchars($wkportdesc);?>
- </option>
- <?php endforeach; ?>
- </select> <input autocomplete='off' onblur='actb_removedisp()' onkeypress='return (event.keyCode!=13);' onkeydown='actb_checkkey(event, this);' onkeyup='actb_tocomplete(this,event,customarray)' class="formfldalias" name="srcendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['srcendport']) echo $pconfig['srcendport']; ?>"></td>
- </tr>
- </table>
- <br>
- <span class="vexpl">Specify the port or port range for
- the source of the packet for this rule. This is usually not equal to the destination port range (and is often &quot;any&quot;). <br>
- Hint: you can leave the <em>'to'</em> field empty if you only
- want to filter a single port</span></td>
-
- <tr>
- <td width="22%" valign="top" class="vncellreq">Source OS</td>
- <td width="78%" class="vtable">OS Type:&nbsp;
- <select name="os" id="os" class="formfld">
- <?php
- $ostypes = array(
- "" => "any",
- "AIX" => "AIX",
- "Linux" => "Linux",
- "FreeBSD" => "FreeBSD",
- "NetBSD" => "NetBSD",
- "OpenBSD" => "OpenBSD",
- "Solaris" => "Solaris",
- "MacOS" => "MacOS",
- "Windows" => "Windows",
- "Novell" => "Novell"
- );
-
- foreach ($ostypes as $ostype => $descr): ?>
- <option value="<?=$ostype;?>" <?php if ($ostype == $pconfig['os']) echo "selected"; ?>>
- <?=htmlspecialchars($descr);?>
- </option>
- <?php endforeach; ?>
- </select><br>
- Note: this only works for TCP rules</td>
+ </tr>
+ </table>
+ </td>
</tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">Destination</td>
- <td width="78%" class="vtable">
- <input name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked"; ?>>
- <strong>not</strong><br>
- Use this option to invert the sense of the match.<br>
- <br>
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>Type:&nbsp;&nbsp;</td>
- <td><select name="dsttype" class="formfld" onChange="typesel_change()">
- <?php $sel = is_specialnet($pconfig['dst']); ?>
- <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>>
- any</option>
- <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>
- Single host or alias</option>
- <option value="network" <?php if (!$sel) echo "selected"; ?>>
- Network</option>
- <option value="lan" <?php if ($pconfig['dst'] == "lan") { echo "selected"; } ?>>
- LAN subnet</option>
- <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>
- PPTP clients</option>
- <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>
- PPPoE clients</option>
-
- <?php for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++): ?>
- <option value="opt<?=$i;?>" <?php if ($pconfig['dst'] == "opt" . $i) { echo "selected"; } ?>>
- <?=htmlspecialchars($config['interfaces']['opt' . $i]['descr']);?> subnet</option>
- <?php endfor; ?>
- </select></td>
- </tr>
- <tr>
- <td>Address:&nbsp;&nbsp;</td>
- <td><input name="dst" autocomplete='off' onblur='actb_removedisp()' onkeypress='return (event.keyCode!=13);' onkeydown='actb_checkkey(event, this);' onkeyup='actb_tocomplete(this,event,addressarray)' type="text" class="formfldalias" id="dst" size="20" value="<?php if (!is_specialnet($pconfig['dst'])) echo htmlspecialchars($pconfig['dst']);?>">
- /
- <select name="dstmask" class="formfld" id="dstmask">
- <?php for ($i = 31; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected"; ?>><?=$i;?></option>
- <?php endfor; ?>
- </select></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">Destination port
- range </td>
- <td width="78%" class="vtable">
- <table border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td>from:&nbsp;&nbsp;</td>
- <td><select name="dstbeginport" class="formfld" onchange="dst_rep_change();ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
- <?php foreach ($wkports as $wkport => $wkportdesc): ?>
- <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) {
- echo "selected";
- $bfound = 1;
- }?>>
- <?=htmlspecialchars($wkportdesc);?>
- </option>
- <?php endforeach; ?>
- </select> <input autocomplete='off' onblur='actb_removedisp()' onkeypress='return (event.keyCode!=13);' onkeydown='actb_checkkey(event, this);' onkeyup='actb_tocomplete(this,event,customarray)' class="formfldalias" name="dstbeginport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstbeginport']) echo $pconfig['dstbeginport']; ?>"></td>
- </tr>
- <tr>
- <td>to:</td>
- <td><select name="dstendport" class="formfld" onchange="ext_change()">
- <option value="">(other)</option>
- <option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
- <?php foreach ($wkports as $wkport => $wkportdesc): ?>
- <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) {
- echo "selected";
- $bfound = 1;
- }?>>
- <?=htmlspecialchars($wkportdesc);?>
- </option>
- <?php endforeach; ?>
- </select> <input autocomplete='off' onblur='actb_removedisp()' onkeypress='return (event.keyCode!=13);' onkeydown='actb_checkkey(event, this);' onkeyup='actb_tocomplete(this,event,customarray)' class="formfldalias" name="dstendport_cust" type="text" size="5" value="<?php if (!$bfound && $pconfig['dstendport']) echo $pconfig['dstendport']; ?>"></td>
- </tr>
- </table>
- <br> <span class="vexpl">Specify the port or port range for
- the destination of the packet for this rule.<br>
- Hint: you can leave the <em>'to'</em> field empty if you only
- want to filter a single port</span></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncellreq">Log</td>
- <td width="78%" class="vtable">
- <input name="log" type="checkbox" id="log" value="yes" <?php if ($pconfig['log']) echo "checked"; ?>>
- <strong>Log packets that are handled by this rule</strong><br>
- <span class="vexpl">Hint: the firewall has limited local log
- space. Don't turn on logging for everything. If you want to
- do a lot of logging, consider using a remote syslog server
- (see the <a href="diag_logs_settings.php">Diagnostics: System
- logs: Settings</a> page).</span></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell">Description</td>
- <td width="78%" class="vtable">
- <input name="descr" type="text" class="formfld" id="descr" size="52" maxlength="52" value="<?=htmlspecialchars($pconfig['descr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell">Advanced Options</td>
- <td width="78%" class="vtable">
- <input name="max-src-nodes" id="max-src-nodes" value="<?php echo $pconfig['max-src-nodes'] ?>"><br> Simultaneous client connection limit<p>
- <input name="max-src-states" id="max-src-states" value="<?php echo $pconfig['max-src-states'] ?>"><br> Maximum state entries per host<p>
- <input name="max-src-conn-rate" id="max-src-conn-rate" value="<?php echo $pconfig['max-src-conn-rate'] ?>"> /
- <select name="max-src-conn-rates" id="max-src-conn-rates">
- <option value=""<?php if(intval($pconfig['max-src-conn-rates']) < 1) echo " selected"; ?>></option>
- <?php
- for($x=1; $x<255; $x++) {
- if($x == $pconfig['max-src-conn-rates'])
- $selected = " selected";
- else
- $selected = "";
- echo "<option value=\"{$x}\"{$selected}>{$x}</option>\n";
- }
- ?>
- </select>
- <br>
- Maximum new connections / per second
- <p><strong>NOTE: Leave these fields blank to disable this feature.</strong>
- </td>
- </tr>
- <tr>
- <td width="22%" valign="top" class="vncell">State Type</td>
- <td width="78%" class="vtable">
- <select name="statetype">
- <option value="keep state" <?php if(!isset($pconfig['statetype']) or $pconfig['statetype'] == "keep state") echo "selected"; ?>>keep state</option>
- <option value="modulate state" <?php if($pconfig['statetype'] == "modulate state") echo "selected"; ?>>modulate state</option>
- <option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected"; ?>>synproxy state</option>
- <option value="none"<?php if($pconfig['statetype'] == "none") echo "selected"; ?>>none</option>
- </select><br>HINT: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.
- <p><strong>
- <table>
- <tr><td width="25%"><li>keep state</li></td><td>works with TCP, UDP, and ICMP.</td></tr>
- <tr><td width="25%"><li>modulate state</li></td><td>works only with TCP. pfSense will generate strong Initial Sequence Numbers (ISNs) for packets matching this rule.</li></td></tr>
- <tr><td width="25%"><li>synproxy state</li></td><td>proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.</td></tr>
- <tr><td width="25%"><li>none</li></td><td>do not use state mechanisms to keep track. this is only useful if your doing advanced queueing in certain situations. please check the faq.</td></tr>
- </table>
- </strong>
- </td>
- </tr>
-
<tr>
- <td width="22%" valign="top" class="vncell">State Timeout</td>
- <td width="78%" class="vtable">
- <input name="statetimeout" value="<?php echo $pconfig['frags'] ?>">
- <p><strong>Leave blank for default. Amount is in seconds.
- </strong>
- </td>
+ <td width="22%" valign="top" class="vncellreq">Source port range</td>
+ <td width="78%" class="vtable">
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td>from:&nbsp;&nbsp;</td>
+ <td>
+ <select name="srcbeginport" class="formfld" onchange="src_rep_change();ext_change()">
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+<?php foreach ($wkports as $wkport => $wkportdesc): ?>
+ <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcbeginport']) { echo "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 $pconfig['srcbeginport']; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td>to:</td>
+ <td>
+ <select name="srcendport" class="formfld" onchange="ext_change()">
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['srcendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+<?php foreach ($wkports as $wkport => $wkportdesc): ?>
+ <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['srcendport']) { echo "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 $pconfig['srcendport']; ?>">
+ </td>
+ </tr>
+ </table>
+ <br />
+ <span class="vexpl">Specify the port or port range for the source of the packet for this rule. This is usually not equal to the destination port range (and is often &quot;any&quot;). <br /> Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port</span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Source OS</td>
+ <td width="78%" class="vtable">OS Type:&nbsp;
+ <select name="os" id="os" class="formfld">
+<?php
+ $ostypes = array(
+ "" => "any",
+ "AIX" => "AIX",
+ "Linux" => "Linux",
+ "FreeBSD" => "FreeBSD",
+ "NetBSD" => "NetBSD",
+ "OpenBSD" => "OpenBSD",
+ "Solaris" => "Solaris",
+ "MacOS" => "MacOS",
+ "Windows" => "Windows",
+ "Novell" => "Novell"
+ );
+
+ foreach ($ostypes as $ostype => $descr): ?>
+ <option value="<?=$ostype;?>" <?php if ($ostype == $pconfig['os']) echo "selected"; ?>><?=htmlspecialchars($descr);?></option>
+<?php endforeach; ?>
+ </select>
+ <br />
+ Note: this only works for TCP rules
+ </td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Destination</td>
+ <td width="78%" class="vtable">
+ <input name="dstnot" type="checkbox" id="dstnot" value="yes" <?php if ($pconfig['dstnot']) echo "checked"; ?>>
+ <strong>not</strong>
+ <br />
+ Use this option to invert the sense of the match.
+ <br />
+ <br />
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td>Type:&nbsp;&nbsp;</td>
+ <td>
+ <select name="dsttype" class="formfld" onChange="typesel_change()">
+<?php
+ $sel = is_specialnet($pconfig['dst']); ?>
+ <option value="any" <?php if ($pconfig['dst'] == "any") { echo "selected"; } ?>>any</option>
+ <option value="single" <?php if (($pconfig['dstmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
+ <option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
+ <option value="lan" <?php if ($pconfig['dst'] == "lan") { echo "selected"; } ?>>LAN subnet</option>
+ <option value="pptp" <?php if ($pconfig['dst'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
+ <option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
+<?php for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++): ?>
+ <option value="opt<?=$i;?>" <?php if ($pconfig['dst'] == "opt" . $i) { echo "selected"; } ?>><?=htmlspecialchars($config['interfaces']['opt' . $i]['descr']);?> subnet</option>
+<?php endfor; ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>Address:&nbsp;&nbsp;</td>
+ <td>
+ <input 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="formfld" id="dstmask">
+<?php
+ for ($i = 31; $i > 0; $i--): ?>
+ <option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected"; ?>><?=$i;?></option>
+<?php endfor; ?>
+ </select>
+ </td>
+ </tr>
+ </table>
- <?php
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Destination port range </td>
+ <td width="78%" class="vtable">
+ <table border="0" cellspacing="0" cellpadding="0">
+ <tr>
+ <td>from:&nbsp;&nbsp;</td>
+ <td>
+ <select name="dstbeginport" class="formfld" onchange="dst_rep_change();ext_change()">
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['dstbeginport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+<?php foreach ($wkports as $wkport => $wkportdesc): ?>
+ <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstbeginport']) { echo "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 $pconfig['dstbeginport']; ?>">
+ </td>
+ </tr>
+ <tr>
+ <td>to:</td>
+ <td>
+ <select name="dstendport" class="formfld" onchange="ext_change()">
+ <option value="">(other)</option>
+ <option value="any" <?php $bfound = 0; if ($pconfig['dstendport'] == "any") { echo "selected"; $bfound = 1; } ?>>any</option>
+<?php foreach ($wkports as $wkport => $wkportdesc): ?>
+ <option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['dstendport']) { echo "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 $pconfig['dstendport']; ?>">
+ </td>
+ </tr>
+ </table>
+ <br />
+ <span class="vexpl">
+ Specify the port or port range for the destination of the packet for this rule.
+ <br />
+ Hint: you can leave the <em>'to'</em> field empty if you only want to filter a single port
+ </span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Log</td>
+ <td width="78%" class="vtable">
+ <input name="log" type="checkbox" id="log" value="yes" <?php if ($pconfig['log']) echo "checked"; ?>>
+ <strong>Log packets that are handled by this rule</strong>
+ <br />
+ <span class="vexpl">Hint: the firewall has limited local log space. Don't turn on logging for everything. If you want to do a lot of logging, consider using a remote syslog server (see the <a href="diag_logs_settings.php">Diagnostics: System logs: Settings</a> page).</span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">Description</td>
+ <td width="78%" class="vtable">
+ <input name="descr" type="text" class="formfld" id="descr" size="52" maxlength="52" value="<?=htmlspecialchars($pconfig['descr']);?>">
+ <br />
+ <span class="vexpl">You may enter a description here for your reference (not parsed).</span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">Advanced Options</td>
+ <td width="78%" class="vtable">
+ <input name="max-src-nodes" id="max-src-nodes" value="<?php echo $pconfig['max-src-nodes'] ?>"><br> Simultaneous client connection limit<p>
+ <input name="max-src-states" id="max-src-states" value="<?php echo $pconfig['max-src-states'] ?>"><br> Maximum state entries per host<p>
+ <input name="max-src-conn-rate" id="max-src-conn-rate" value="<?php echo $pconfig['max-src-conn-rate'] ?>"> /
+ <select name="max-src-conn-rates" id="max-src-conn-rates">
+ <option value=""<?php if(intval($pconfig['max-src-conn-rates']) < 1) echo " selected"; ?>></option>
+<?php for($x=1; $x<255; $x++) {
+ if($x == $pconfig['max-src-conn-rates']) $selected = " selected"; else $selected = "";
+ echo "<option value=\"{$x}\"{$selected}>{$x}</option>\n";
+ } ?>
+ </select>
+ <br />
+ Maximum new connections / per second
+ <p><strong>NOTE: Leave these fields blank to disable this feature.</strong>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">State Type</td>
+ <td width="78%" class="vtable">
+ <select name="statetype">
+ <option value="keep state" <?php if(!isset($pconfig['statetype']) or $pconfig['statetype'] == "keep state") echo "selected"; ?>>keep state</option>
+ <option value="modulate state" <?php if($pconfig['statetype'] == "modulate state") echo "selected"; ?>>modulate state</option>
+ <option value="synproxy state"<?php if($pconfig['statetype'] == "synproxy state") echo "selected"; ?>>synproxy state</option>
+ <option value="none"<?php if($pconfig['statetype'] == "none") echo "selected"; ?>>none</option>
+ </select><br>HINT: Select which type of state tracking mechanism you would like to use. If in doubt, use keep state.
+ <p><strong>
+ <table>
+ <tr><td width="25%"><li>keep state</li></td><td>works with TCP, UDP, and ICMP.</td></tr>
+ <tr><td width="25%"><li>modulate state</li></td><td>works only with TCP. pfSense will generate strong Initial Sequence Numbers (ISNs) for packets matching this rule.</li></td></tr>
+ <tr><td width="25%"><li>synproxy state</li></td><td>proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined.</td></tr>
+ <tr><td width="25%"><li>none</li></td><td>do not use state mechanisms to keep track. this is only useful if your doing advanced queueing in certain situations. please check the faq.</td></tr>
+ </table>
+ </strong></p>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">State Timeout</td>
+ <td width="78%" class="vtable">
+ <input name="statetimeout" value="<?php echo $pconfig['frags'] ?>">
+ <p><strong>Leave blank for default. Amount is in seconds.</strong></p>
+ </td>
+ </tr>
+<?php
/* build a list of gateways */
$gateways = array();
$gateways[] = "default"; // default to don't use this feature :)
@@ -794,12 +671,12 @@ Hint: the difference between block and reject is that with reject, a packet (TCP
if($int['gateway'] <> "")
$gateways[]=$int['gateway'];
}
- ?>
+?>
<tr>
- <td width="22%" valign="top" class="vncell">Gateway</td>
- <td width="78%" class="vtable">
- <select name='gateway'>
- <?php
+ <td width="22%" valign="top" class="vncell">Gateway</td>
+ <td width="78%" class="vtable">
+ <select name='gateway'>
+<?php
foreach($gateways as $gw) {
if($gw == $pconfig['gateway']) {
$selected = " SELECTED";
@@ -830,56 +707,55 @@ Hint: the difference between block and reject is that with reject, a packet (TCP
echo "<option value=\"opt{$i}\" {$selected}>OPT{$i} - {$descr}</option>\n";
}
}
- ?>
- </select>
- <p><strong>Leave blank for default.
- </strong>
- </td>
+?>
+ </select>
+ <p><strong>Leave blank for default.</strong></p>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top">&nbsp;</td>
+ <td width="78%">
+ <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
+<?php if (isset($id) && $a_filter[$id]): ?>
+ <input name="id" type="hidden" value="<?=$id;?>">
+<?php endif; ?>
+ <input name="after" type="hidden" value="<?=$after;?>">
+ </td>
</tr>
- <tr>
- <td width="22%" valign="top">&nbsp;</td>
- <td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="Save"> <input type="button" class="formbtn" value="Cancel" onclick="history.back()">
- <?php if (isset($id) && $a_filter[$id]): ?>
- <input name="id" type="hidden" value="<?=$id;?>">
- <?php endif; ?>
- <input name="after" type="hidden" value="<?=$after;?>">
- </td>
- </tr>
- </table>
+ </table>
</form>
<script language="JavaScript">
<!--
-ext_change();
-typesel_change();
-proto_change();
+ ext_change();
+ typesel_change();
+ proto_change();
<?php
-$isfirst = 0;
-$aliases = "";
-$addrisfirst = 0;
-$aliasesaddr = "";
-if($config['aliases']['alias'] <> "" and is_array($config['aliases']['alias']))
- foreach($config['aliases']['alias'] as $alias_name) {
- if(!stristr($alias_name['address'], ".")) {
- if($isfirst == 1) $aliases .= ",";
- $aliases .= "'" . $alias_name['name'] . "'";
- $isfirst = 1;
- } else {
- if($addrisfirst == 1) $aliasesaddr .= ",";
- $aliasesaddr .= "'" . $alias_name['name'] . "'";
- $addrisfirst = 1;
+ $isfirst = 0;
+ $aliases = "";
+ $addrisfirst = 0;
+ $aliasesaddr = "";
+ if($config['aliases']['alias'] <> "" and is_array($config['aliases']['alias']))
+ foreach($config['aliases']['alias'] as $alias_name) {
+ if(!stristr($alias_name['address'], ".")) {
+ if($isfirst == 1) $aliases .= ",";
+ $aliases .= "'" . $alias_name['name'] . "'";
+ $isfirst = 1;
+ } else {
+ if($addrisfirst == 1) $aliasesaddr .= ",";
+ $aliasesaddr .= "'" . $alias_name['name'] . "'";
+ $addrisfirst = 1;
+ }
}
- }
?>
-var addressarray=new Array(<?php echo $aliasesaddr; ?>);
-var customarray=new Array(<?php echo $aliases; ?>);
+ var addressarray=new Array(<?php echo $aliasesaddr; ?>);
+ var customarray=new Array(<?php echo $aliases; ?>);
//-->
</script>
-<script type="text/javascript" language="javascript" src="auto_complete_helper.js">
-</script>
+
+
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/usr/local/www/head.inc b/usr/local/www/head.inc
index febf1c8..3246e48 100755
--- a/usr/local/www/head.inc
+++ b/usr/local/www/head.inc
@@ -18,6 +18,24 @@ else
<link rel="stylesheet" type="text/css" href="/niftycssprintCode.css" media="print">
<script type="text/javascript" src="/themes/<?php echo $g['theme']; ?>/loader.js"></script>
+<?
+ /*
+ * Find all javascript files that need to be included
+ * for this page ... from the arrays ... :)
+ * Coded by: Erik Kristensen
+ */
+
+ ## Make Sure $page_filename has been set ##
+ ## if it hasn't been don't bother ... :P ##
+ if ($page_filename) {
+ include('includes/javascript.inc.php');
+
+ foreach ($top_javascript_files["$page_filename"] as $file) {
+ echo '<script type="text/javascript" src="/javascript/'.$file.'"></script>';
+ }
+ }
+?>
+
<?php if (!isset($closehead)){ ?>
</head>
<?php } ?>
diff --git a/usr/local/www/includes/javascript.inc.php b/usr/local/www/includes/javascript.inc.php
new file mode 100644
index 0000000..d1acf17
--- /dev/null
+++ b/usr/local/www/includes/javascript.inc.php
@@ -0,0 +1,18 @@
+<?
+ /* $Id: */
+
+ /*
+ * Two Arrays the hold the information for what javascript files
+ * need to be loaded at the top and or bottom of each page listed
+ * in the arrays.
+ */
+
+ $top_javascript_files = array();
+ $bottom_javascript_files = array();
+
+
+ $top_javascript_files['firewall_rules_edit.php'][] = 'autosuggest.js';
+ $top_javascript_files['firewall_rules_edit.php'][] = 'suggestions.js';
+ $top_javascript_files['firewall_rules_edit.php'][] = 'firewall_rules_edit.js';
+
+?> \ No newline at end of file
diff --git a/usr/local/www/javascript/autosuggest.js b/usr/local/www/javascript/autosuggest.js
new file mode 100644
index 0000000..a4ebd81
--- /dev/null
+++ b/usr/local/www/javascript/autosuggest.js
@@ -0,0 +1,336 @@
+
+/**
+ * An autosuggest textbox control.
+ * @class
+ * @scope public
+ */
+function AutoSuggestControl(oTextbox /*:HTMLInputElement*/,
+ oProvider /*:SuggestionProvider*/) {
+
+ /**
+ * The currently selected suggestions.
+ * @scope private
+ */
+ this.cur /*:int*/ = -1;
+
+ /**
+ * The dropdown list layer.
+ * @scope private
+ */
+ this.layer = null;
+
+ /**
+ * Suggestion provider for the autosuggest feature.
+ * @scope private.
+ */
+ this.provider /*:SuggestionProvider*/ = oProvider;
+
+ /**
+ * The textbox to capture.
+ * @scope private
+ */
+ this.textbox /*:HTMLInputElement*/ = oTextbox;
+
+ //initialize the control
+ this.init();
+
+}
+
+/**
+ * Autosuggests one or more suggestions for what the user has typed.
+ * If no suggestions are passed in, then no autosuggest occurs.
+ * @scope private
+ * @param aSuggestions An array of suggestion strings.
+ * @param bTypeAhead If the control should provide a type ahead suggestion.
+ */
+AutoSuggestControl.prototype.autosuggest = function (aSuggestions /*:Array*/,
+ bTypeAhead /*:boolean*/) {
+
+ //make sure there's at least one suggestion
+ if (aSuggestions.length > 0) {
+ if (bTypeAhead) {
+ this.typeAhead(aSuggestions[0]);
+ }
+
+ this.showSuggestions(aSuggestions);
+ } else {
+ this.hideSuggestions();
+ }
+};
+
+/**
+ * Creates the dropdown layer to display multiple suggestions.
+ * @scope private
+ */
+AutoSuggestControl.prototype.createDropDown = function () {
+
+ var oThis = this;
+
+ //create the layer and assign styles
+ this.layer = document.createElement("div");
+ this.layer.className = "suggestions";
+ this.layer.style.visibility = "hidden";
+ this.layer.style.width = this.textbox.offsetWidth;
+
+ //when the user clicks on the a suggestion, get the text (innerHTML)
+ //and place it into a textbox
+ this.layer.onmousedown =
+ this.layer.onmouseup =
+ this.layer.onmouseover = function (oEvent) {
+ oEvent = oEvent || window.event;
+ oTarget = oEvent.target || oEvent.srcElement;
+
+ if (oEvent.type == "mousedown") {
+ oThis.textbox.value = oTarget.firstChild.nodeValue;
+ oThis.hideSuggestions();
+ } else if (oEvent.type == "mouseover") {
+ oThis.highlightSuggestion(oTarget);
+ } else {
+ oThis.textbox.focus();
+ }
+ };
+
+
+ document.body.appendChild(this.layer);
+};
+
+/**
+ * Gets the left coordinate of the textbox.
+ * @scope private
+ * @return The left coordinate of the textbox in pixels.
+ */
+AutoSuggestControl.prototype.getLeft = function () /*:int*/ {
+
+ var oNode = this.textbox;
+ var iLeft = 0;
+
+ while(oNode.tagName != "BODY") {
+ iLeft += oNode.offsetLeft;
+ oNode = oNode.offsetParent;
+ }
+
+ return iLeft;
+};
+
+/**
+ * Gets the top coordinate of the textbox.
+ * @scope private
+ * @return The top coordinate of the textbox in pixels.
+ */
+AutoSuggestControl.prototype.getTop = function () /*:int*/ {
+
+ var oNode = this.textbox;
+ var iTop = 0;
+
+ while(oNode.tagName != "BODY") {
+ iTop += oNode.offsetTop;
+ oNode = oNode.offsetParent;
+ }
+
+ return iTop;
+};
+
+/**
+ * Handles three keydown events.
+ * @scope private
+ * @param oEvent The event object for the keydown event.
+ */
+AutoSuggestControl.prototype.handleKeyDown = function (oEvent /*:Event*/) {
+
+ switch(oEvent.keyCode) {
+ case 38: //up arrow
+ this.previousSuggestion();
+ break;
+ case 40: //down arrow
+ this.nextSuggestion();
+ break;
+ case 13: //enter
+ this.hideSuggestions();
+ break;
+ }
+
+};
+
+/**
+ * Handles keyup events.
+ * @scope private
+ * @param oEvent The event object for the keyup event.
+ */
+AutoSuggestControl.prototype.handleKeyUp = function (oEvent /*:Event*/) {
+
+ var iKeyCode = oEvent.keyCode;
+
+ //for backspace (8) and delete (46), shows suggestions without typeahead
+ if (iKeyCode == 8 || iKeyCode == 46) {
+ this.provider.requestSuggestions(this, false);
+
+ //make sure not to interfere with non-character keys
+ } else if (iKeyCode < 32 || (iKeyCode >= 33 && iKeyCode < 46) || (iKeyCode >= 112 && iKeyCode <= 123)) {
+ //ignore
+ } else {
+ //request suggestions from the suggestion provider with typeahead
+ this.provider.requestSuggestions(this, true);
+ }
+};
+
+/**
+ * Hides the suggestion dropdown.
+ * @scope private
+ */
+AutoSuggestControl.prototype.hideSuggestions = function () {
+ this.layer.style.visibility = "hidden";
+};
+
+/**
+ * Highlights the given node in the suggestions dropdown.
+ * @scope private
+ * @param oSuggestionNode The node representing a suggestion in the dropdown.
+ */
+AutoSuggestControl.prototype.highlightSuggestion = function (oSuggestionNode) {
+
+ for (var i=0; i < this.layer.childNodes.length; i++) {
+ var oNode = this.layer.childNodes[i];
+ if (oNode == oSuggestionNode) {
+ oNode.className = "current"
+ } else if (oNode.className == "current") {
+ oNode.className = "";
+ }
+ }
+};
+
+/**
+ * Initializes the textbox with event handlers for
+ * auto suggest functionality.
+ * @scope private
+ */
+AutoSuggestControl.prototype.init = function () {
+
+ //save a reference to this object
+ var oThis = this;
+
+ //assign the onkeyup event handler
+ this.textbox.onkeyup = function (oEvent) {
+
+ //check for the proper location of the event object
+ if (!oEvent) {
+ oEvent = window.event;
+ }
+
+ //call the handleKeyUp() method with the event object
+ oThis.handleKeyUp(oEvent);
+ };
+
+ //assign onkeydown event handler
+ this.textbox.onkeydown = function (oEvent) {
+
+ //check for the proper location of the event object
+ if (!oEvent) {
+ oEvent = window.event;
+ }
+
+ //call the handleKeyDown() method with the event object
+ oThis.handleKeyDown(oEvent);
+ };
+
+ //assign onblur event handler (hides suggestions)
+ this.textbox.onblur = function () {
+ oThis.hideSuggestions();
+ };
+
+ //create the suggestions dropdown
+ this.createDropDown();
+};
+
+/**
+ * Highlights the next suggestion in the dropdown and
+ * places the suggestion into the textbox.
+ * @scope private
+ */
+AutoSuggestControl.prototype.nextSuggestion = function () {
+ var cSuggestionNodes = this.layer.childNodes;
+
+ if (cSuggestionNodes.length > 0 && this.cur < cSuggestionNodes.length-1) {
+ var oNode = cSuggestionNodes[++this.cur];
+ this.highlightSuggestion(oNode);
+ this.textbox.value = oNode.firstChild.nodeValue;
+ }
+};
+
+/**
+ * Highlights the previous suggestion in the dropdown and
+ * places the suggestion into the textbox.
+ * @scope private
+ */
+AutoSuggestControl.prototype.previousSuggestion = function () {
+ var cSuggestionNodes = this.layer.childNodes;
+
+ if (cSuggestionNodes.length > 0 && this.cur > 0) {
+ var oNode = cSuggestionNodes[--this.cur];
+ this.highlightSuggestion(oNode);
+ this.textbox.value = oNode.firstChild.nodeValue;
+ }
+};
+
+/**
+ * Selects a range of text in the textbox.
+ * @scope public
+ * @param iStart The start index (base 0) of the selection.
+ * @param iLength The number of characters to select.
+ */
+AutoSuggestControl.prototype.selectRange = function (iStart /*:int*/, iLength /*:int*/) {
+
+ //use text ranges for Internet Explorer
+ if (this.textbox.createTextRange) {
+ var oRange = this.textbox.createTextRange();
+ oRange.moveStart("character", iStart);
+ oRange.moveEnd("character", iLength - this.textbox.value.length);
+ oRange.select();
+
+ //use setSelectionRange() for Mozilla
+ } else if (this.textbox.setSelectionRange) {
+ this.textbox.setSelectionRange(iStart, iLength);
+ }
+
+ //set focus back to the textbox
+ this.textbox.focus();
+};
+
+/**
+ * Builds the suggestion layer contents, moves it into position,
+ * and displays the layer.
+ * @scope private
+ * @param aSuggestions An array of suggestions for the control.
+ */
+AutoSuggestControl.prototype.showSuggestions = function (aSuggestions /*:Array*/) {
+
+ var oDiv = null;
+ this.layer.innerHTML = ""; //clear contents of the layer
+
+ for (var i=0; i < aSuggestions.length; i++) {
+ oDiv = document.createElement("div");
+ oDiv.appendChild(document.createTextNode(aSuggestions[i]));
+ this.layer.appendChild(oDiv);
+ }
+
+ this.layer.style.left = this.getLeft() + "px";
+ this.layer.style.top = (this.getTop()+this.textbox.offsetHeight) + "px";
+ this.layer.style.visibility = "visible";
+
+};
+
+/**
+ * Inserts a suggestion into the textbox, highlighting the
+ * suggested part of the text.
+ * @scope private
+ * @param sSuggestion The suggestion for the textbox.
+ */
+AutoSuggestControl.prototype.typeAhead = function (sSuggestion /*:String*/) {
+
+ //check for support of typeahead functionality
+ if (this.textbox.createTextRange || this.textbox.setSelectionRange){
+ var iLen = this.textbox.value.length;
+ this.textbox.value = sSuggestion;
+ this.selectRange(iLen, sSuggestion.length);
+ }
+};
+
diff --git a/usr/local/www/javascript/firewall_rules_edit.js b/usr/local/www/javascript/firewall_rules_edit.js
new file mode 100644
index 0000000..aa38bde
--- /dev/null
+++ b/usr/local/www/javascript/firewall_rules_edit.js
@@ -0,0 +1,120 @@
+<!--
+var portsenabled = 1;
+
+function ext_change() {
+ if ((document.iform.srcbeginport.selectedIndex == 0) && portsenabled) {
+ document.iform.srcbeginport_cust.disabled = 0;
+ } else {
+ document.iform.srcbeginport_cust.value = "";
+ document.iform.srcbeginport_cust.disabled = 1;
+ }
+ if ((document.iform.srcendport.selectedIndex == 0) && portsenabled) {
+ document.iform.srcendport_cust.disabled = 0;
+ } else {
+ document.iform.srcendport_cust.value = "";
+ document.iform.srcendport_cust.disabled = 1;
+ }
+ if ((document.iform.dstbeginport.selectedIndex == 0) && portsenabled) {
+ document.iform.dstbeginport_cust.disabled = 0;
+ } else {
+ document.iform.dstbeginport_cust.value = "";
+ document.iform.dstbeginport_cust.disabled = 1;
+ }
+ if ((document.iform.dstendport.selectedIndex == 0) && portsenabled) {
+ document.iform.dstendport_cust.disabled = 0;
+ } else {
+ document.iform.dstendport_cust.value = "";
+ document.iform.dstendport_cust.disabled = 1;
+ }
+
+ if (!portsenabled) {
+ document.iform.srcbeginport.disabled = 1;
+ document.iform.srcendport.disabled = 1;
+ document.iform.dstbeginport.disabled = 1;
+ document.iform.dstendport.disabled = 1;
+ } else {
+ document.iform.srcbeginport.disabled = 0;
+ document.iform.srcendport.disabled = 0;
+ document.iform.dstbeginport.disabled = 0;
+ document.iform.dstendport.disabled = 0;
+ }
+}
+
+function typesel_change() {
+ switch (document.iform.srctype.selectedIndex) {
+ case 1: /* single */
+ document.iform.src.disabled = 0;
+ document.iform.srcmask.value = "";
+ document.iform.srcmask.disabled = 1;
+ break;
+ case 2: /* network */
+ document.iform.src.disabled = 0;
+ document.iform.srcmask.disabled = 0;
+ break;
+ default:
+ document.iform.src.value = "";
+ document.iform.src.disabled = 1;
+ document.iform.srcmask.value = "";
+ document.iform.srcmask.disabled = 1;
+ break;
+ }
+ switch (document.iform.dsttype.selectedIndex) {
+ case 1: /* single */
+ document.iform.dst.disabled = 0;
+ document.iform.dstmask.value = "";
+ document.iform.dstmask.disabled = 1;
+ break;
+ case 2: /* network */
+ document.iform.dst.disabled = 0;
+ document.iform.dstmask.disabled = 0;
+ break;
+ default:
+ document.iform.dst.value = "";
+ document.iform.dst.disabled = 1;
+ document.iform.dstmask.value = "";
+ document.iform.dstmask.disabled = 1;
+ break;
+ }
+}
+
+function proto_change() {
+ if (document.iform.proto.selectedIndex < 3) {
+ portsenabled = 1;
+ } else {
+ portsenabled = 0;
+ }
+
+ /* Disable OS knob if the proto is not TCP. */
+ if (document.iform.proto.selectedIndex < 1) {
+ document.forms[0].os.disabled = 0;
+ } else {
+ document.forms[0].os.disabled = 1;
+ }
+
+ if (document.iform.proto.selectedIndex == 3) {
+ document.iform.icmptype.disabled = 0;
+ } else {
+ document.iform.icmptype.disabled = 1;
+ }
+
+ ext_change();
+}
+
+function src_rep_change() {
+ document.iform.srcendport.selectedIndex = document.iform.srcbeginport.selectedIndex;
+}
+function dst_rep_change() {
+ document.iform.dstendport.selectedIndex = document.iform.dstbeginport.selectedIndex;
+}
+
+
+
+window.onload = function () {
+ var oTextbox1 = new AutoSuggestControl(document.getElementById("src"), new StateSuggestions(addressarray));
+ var oTextbox2 = new AutoSuggestControl(document.getElementById("srcbeginport_cust"), new StateSuggestions(customarray));
+ var oTextbox3 = new AutoSuggestControl(document.getElementById("srcendport_cust"), new StateSuggestions(customarray));
+ var oTextbox4 = new AutoSuggestControl(document.getElementById("dst"), new StateSuggestions(addressarray));
+ var oTextbox5 = new AutoSuggestControl(document.getElementById("dstbeginport_cust"), new StateSuggestions(customarray));
+ var oTextbox6 = new AutoSuggestControl(document.getElementById("dstendport_cust"), new StateSuggestions(customarray));
+}
+//--> \ No newline at end of file
diff --git a/usr/local/www/javascript/suggestions.js b/usr/local/www/javascript/suggestions.js
new file mode 100644
index 0000000..1b30fff
--- /dev/null
+++ b/usr/local/www/javascript/suggestions.js
@@ -0,0 +1,33 @@
+
+/**
+ * Provides suggestions for state names (USA).
+ * @class
+ * @scope public
+ */
+function StateSuggestions(text) {
+ this.states = text;
+}
+
+/**
+ * Request suggestions for the given autosuggest control.
+ * @scope protected
+ * @param oAutoSuggestControl The autosuggest control to provide suggestions for.
+ */
+StateSuggestions.prototype.requestSuggestions = function (oAutoSuggestControl /*:AutoSuggestControl*/,
+ bTypeAhead /*:boolean*/) {
+ var aSuggestions = [];
+ var sTextboxValue = oAutoSuggestControl.textbox.value;
+
+ if (sTextboxValue.length > 0){
+
+ //search for matching states
+ for (var i=0; i < this.states.length; i++) {
+ if (this.states[i].indexOf(sTextboxValue) == 0) {
+ aSuggestions.push(this.states[i]);
+ }
+ }
+ }
+
+ //provide suggestions to the control
+ oAutoSuggestControl.autosuggest(aSuggestions, bTypeAhead);
+}; \ No newline at end of file
diff --git a/usr/local/www/status_graph.php b/usr/local/www/status_graph.php
index acc88ec..470cea7 100755
--- a/usr/local/www/status_graph.php
+++ b/usr/local/www/status_graph.php
@@ -70,7 +70,7 @@ for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) {
?>
<form name="form1" action="status_graph.php" method="get" style="padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid #999999">
Interface:
-<select name="if" class="formfld" onchange="document.form1.submit()">
+<select name="if" class="formfld" style="z-index: -10;" onchange="document.form1.submit()">
<?php
foreach ($ifdescrs as $ifn => $ifd) {
echo "<option value=\"$ifn\"";
@@ -80,13 +80,15 @@ foreach ($ifdescrs as $ifn => $ifd) {
?>
</select>
</form>
-<div align="center" style="z-index: 5">
-<embed src="graph.php?ifnum=<?=$ifnum;?>&ifname=<?=rawurlencode($ifdescrs[$curif]);?>" type="image/svg+xml"
- width="<? echo $width; ?>" height="<? echo $height; ?>" style="z-index: 5"; pluginspage="http://www.adobe.com/svg/viewer/install/auto" />
-</div>
+<p><span class="red"><strong>Note:</strong></span> the <a href="http://www.adobe.com/svg/viewer/install/" target="_blank">Adobe SVG viewer</a> is required to view the graph.
<p><form method="post" action="status_graph.php">
Graph Width: <input name="width" value="<? echo $width; ?>"> Height: <input name="height" value="<? echo $height; ?>"> <input type="submit" value="Change Graph Size"></p>
-<p><span class="red"><strong>Note:</strong></span> the <a href="http://www.adobe.com/svg/viewer/install/" target="_blank">Adobe SVG viewer</a> is required to view the graph.
+</form>
+<div>
+<embed id="graph" src="graph.php?ifnum=<?=$ifnum;?>&ifname=<?=rawurlencode($ifdescrs[$curif]);?>" type="image/svg+xml"
+ width="<? echo $width; ?>" height="<? echo $height; ?>" pluginspage="http://www.adobe.com/svg/viewer/install/auto" />
+</div>
+
<?php include("fend.inc"); ?>
</body>
</html>
diff --git a/usr/local/www/themes/_orange-flow/all.css b/usr/local/www/themes/_orange-flow/all.css
index 607b54a..3a9db7a 100644
--- a/usr/local/www/themes/_orange-flow/all.css
+++ b/usr/local/www/themes/_orange-flow/all.css
@@ -3,12 +3,6 @@ html, body, td, th, input, select {
font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 0.9em;
}
-
-body {
- background-color: #333333;
- margin: 5px auto;
-}
-
form {
margin: 0px;
}
@@ -19,40 +13,42 @@ form input {
font-size: 1.1em;
}
-iframe {
- z-index: 1;
- border: 1px dashed #990000;
-}
-.iframe {
- background-color: #FFFFFF;
-}
+
/* ID Based CSS Definitions */
-#wrapper {
- width: 815px;
- margin: 5px auto;
+
+#notices {
+ width: 795px;
+ background-color: #E1E4B8;
+ border: 1px solid #000000;
+ padding: 0px;
+ margin-bottom: 5px;
+}
+#notices ul {
+ margin: 0px;
+ padding: 5px;
+ padding-top: 3px;
+ list-style: none;
}
#header {
- background: url('images/header.gif') no-repeat;
- background-position: 4px;
- height: 102px;
- width: 808px;
- margin-bottom: 5px;
- z-index: 2;
+ height: 70px;
+ width: 840px;
+ background: url('/themes/_orange-flow/images/bgr_top.gif') no-repeat;
}
#header-left {
position: relative;
- /* background: url('images/logo.gif') no-repeat; */
+ /* background: url('/themes/_orange-flow/images/logo.gif') no-repeat; */
background-position: center;
height: 65px;
width: 145px;
left: 10px;
float: left;
+ /* background-color: #fff; */
}
#header-right {
position: relative;
- /* background: url('images/header.gif') no-repeat; */
+ background: url('images/header.gif') no-repeat;
height: 70px;
color: #fff;
left: 0px;
@@ -69,22 +65,18 @@ iframe {
padding-left: 27px;
float: left;
}
-#header-right .container {
- position: relative;
-}
+
#header-right .container .left {
- position: relative;
- float: left;
- font-size: 1.3em;
- font-weight: bold;
- top: 15px;
- left: 4px;
- display: none;
+ position: relative;
+ top: 32px;
+ left: 9px;
+ font-size: 1.8em;
}
+
#header-right .container .right {
position: relative;
float: right;
- top: 22px;
+ top: -9px;
padding-right: 4px;
z-index: 1;
}
@@ -151,171 +143,105 @@ table#marquee div#container div#scroller {
+
+
+
#content {
- position: relative;
- top: -15px;
- left: 4px;
+ border-top: 1px solid #FFFFFF;
margin-top: 0px;
- margin-left: 5px;
padding-top: 0px;
width: 800px;
- background: url('images/horizontal.gif') repeat-y;
-}
-
-#left {
- width: 800px;
- height: 1px;
-}
-#right {
- position: relative;
- top: -10px;
- width: 770px;
- margin-top: 0px;
- margin-left: 5px;
- margin-right: 5px;
- padding-top: 5px;
- padding-left: 10px;
- padding-right: 10px;
- padding-bottom: 20px;
- min-height: 400px;
}
#footer {
position: relative;
- background: url('images/footer.gif') no-repeat;
- top: -18px;
- left: 7px;
+ top: 10px;
+ padding: 0px;
+ margin: 6px;
width: 800px;
- height: 75px;
+ background-color: #990000;
+ text-align: center;
color: #ffffff;
- text-align: center;;
- font-size: 0.9em;
- padding-top: 17px;
- margin-bottom: 20px;
+ font-size: 0.75em;
clear: both;
+ margin-bottom: 20px;
}
#footer p {
padding: 0px;
margin: 0px;
}
-/* Style the List */
-#navigation {
- /* background: url('images/menu.gif') no-repeat; */
- /* width: 693px; */
- position: relative;
- top: -24px;
- left: -4px;
- width: 800px;
- padding: 0px;
- height: 28px;
- z-index: 3;
-}
-#navigation ul {
- padding: 0;
- margin: 0;
- list-style: none;
- text-align: center;
+#left {
+ width: 150px;
+ float: left;
}
-#navigation ul#menu {
- padding-top: 3px;
- padding-left: 5px;
+#right {
+ /*margin-left: 171px;*/
+ margin-left: 170px;
+ margin-top: 5px;
+ width: 620px;
+ background: url('/themes/_orange-flow/images/bgr_middle_right.gif') repeat-y;
}
-/* Style the List Elements */
-#navigation ul li {
- float: left;
+
+
+#navigation {
position: relative;
- /* width: 7.5em; */
- width: 8.77em;
-}
-#navigation ul li div {
- font-size: 1em;
- font-weight: bold;
-}
-/* Make the List inside the List Elements */
-/* initially hidden with absolute position */
-#navigation ul li ul {
- display: none;
- position: absolute;
- top: 2em;
- left: -2px;
- width: 9em;
- font-weight: normal;
- background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */
- background-color: #202020;
- background: url("images/menu_footer.gif") no-repeat;
- background-position: bottom;
- padding: 0em 0 0.4em 0;
- padding-top: 0.3em;
-}
-/* to override top and left in browsers other than IE */
-/* which will position to the top right of the containing */
-/* li, rather than bottom left */
-#navigation ul li > ul {
- top: auto;
- left: auto;
- left: -1px !important;
-}
-/* Show initial drop down upon mouse over, but do not show */
-/* nested side drop menus within listed elements */
-#navigation ul li:hover ul {
- display: block;
- cursor: hand;
-}
-#navigation ul li:hover {
- cursor: hand;
- cursor: pointer;
-}
-#navigation ul li:hover div {
- text-decoration: none;
+ background-color: #000000;
+ top: 0px;
+ left: 5px;
+ width: 157px;
+ padding-top: 6px;
+ margin-left: 1px;
+ color: #fff;
+ padding-bottom: 6px;
+ padding-right: 0px;
}
-#navigation ul li {
- background-color: transparent;
- color: #FFF;
-}
-#navigation ul li ul li {
- border: 1px solid #505050;
- width: 8.8em;
- height: 1.6em;
- line-height: 1.6em;
- background: url('images/metal_bgr.gif') repeat-x;
- color: #FFF;
-}
-#navigation ul li ul li:hover {
- background: url('images/metal_bgr_red.gif') repeat-x;
+#navigation ul {
+ margin: 0px;
+ padding: 0px;
+ width: 100%;
}
-#navigation li li a {
+#navigation ul li {
display: block;
padding-left: 10px;
- padding-right: 10px;
}
-#navigation ul li ul li a.navlnk:hover {
- text-decoration: none;
-}
-#navigation ul li.first {
- border-right: 0px;
-}
-#navigation ul li.middle {
- border-right: 0px;
+#navigation ul li div {
+ margin-top: 2px;
}
-#navigation ul li.last {
+#navigation ul li div {
+ font-weight: bold;
}
-#navigation ul li.dropfirst {
- border-bottom: 0px;
-}
-#navigation ul li.dropmiddle {
- border-bottom: 0px;
-}
-#navigation ul li.droplast {
+#navigation ul li div .small,
+#navigation ul li div .small:hover {
+ font-weight: normal;
+ font-size: 0.79em;
}
+#navigation ul li a {
+ padding-left: 0.5em;
+ padding-right: 0.5em;
+ padding-top: 0.2em;
+ padding-bottom: 0.2em;
+ height: 1.2em;
+ line-height: 1.2em;
+ color: #fff;
+ text-decoration: none;
+ width: 61px;
+ font-size: 0.9em;
+ text-align: center;
+}
+#navigation ul li a:hover {
+ color: #fff;
+ text-decoration: underline;
+ font-size: 0.9em;
+}
@@ -659,7 +585,6 @@ ul#tabnav li.tabact {
}
-
/* Nifty Corners Crap */
.rtop,.artop{display:block}
.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px}
@@ -681,4 +606,4 @@ ul#tabnav li.tabact {
.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0}
.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0}
.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px}
-.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px}
+.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} \ No newline at end of file
diff --git a/usr/local/www/themes/metallic/all.css b/usr/local/www/themes/metallic/all.css
index 607b54a..adb67f8 100644
--- a/usr/local/www/themes/metallic/all.css
+++ b/usr/local/www/themes/metallic/all.css
@@ -317,6 +317,11 @@ table#marquee div#container div#scroller {
+#graph {
+ position: relative;
+ z-index: 10;
+}
+
/* Class Based CSS Definitions */
@@ -659,6 +664,29 @@ ul#tabnav li.tabact {
}
+/* Auto Complete Suggestions */
+div.suggestions {
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ border: 1px solid black;
+ position: absolute;
+ background-color: #990000;
+ color: #FFF;
+}
+
+div.suggestions div {
+ cursor: default;
+ padding: 0px 3px;
+ background-color: #990000;
+ color: #FFF;
+}
+
+div.suggestions div.current {
+ background-color: #3366cc;
+ color: #FFF;
+}
+/* End Auto Complete Suggestions */
+
/* Nifty Corners Crap */
.rtop,.artop{display:block}
@@ -682,3 +710,4 @@ ul#tabnav li.tabact {
.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0}
.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px}
.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px}
+/* End Nifty Corners Crap */ \ No newline at end of file
diff --git a/usr/local/www/themes/pfsense-dropdown/all.css b/usr/local/www/themes/pfsense-dropdown/all.css
index 7d5918b..71630bb 100644
--- a/usr/local/www/themes/pfsense-dropdown/all.css
+++ b/usr/local/www/themes/pfsense-dropdown/all.css
@@ -613,6 +613,29 @@ ul#tabnav li.tabact {
}
+/* Auto Complete Suggestions */
+div.suggestions {
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ border: 1px solid black;
+ position: absolute;
+ background-color: #990000;
+ color: #FFF;
+}
+
+div.suggestions div {
+ cursor: default;
+ padding: 0px 3px;
+ background-color: #990000;
+ color: #FFF;
+}
+
+div.suggestions div.current {
+ background-color: #3366cc;
+ color: #FFF;
+}
+/* End Auto Complete Suggestions */
+
/* Nifty Corners Crap */
.rtop,.artop{display:block}
diff --git a/usr/local/www/themes/pfsense/all.css b/usr/local/www/themes/pfsense/all.css
index 5af4192..a072f31 100644
--- a/usr/local/www/themes/pfsense/all.css
+++ b/usr/local/www/themes/pfsense/all.css
@@ -583,6 +583,31 @@ ul#tabnav li.tabact {
}
+/* Auto Complete Suggestions */
+div.suggestions {
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ border: 1px solid black;
+ position: absolute;
+ background-color: #990000;
+ color: #FFF;
+}
+
+div.suggestions div {
+ cursor: default;
+ padding: 0px 3px;
+ background-color: #990000;
+ color: #FFF;
+}
+
+div.suggestions div.current {
+ background-color: #3366cc;
+ color: #FFF;
+}
+/* End Auto Complete Suggestions */
+
+
+
/* Nifty Corners Crap */
.rtop,.artop{display:block}
.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px}
OpenPOWER on IntegriCloud