diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-08-20 19:14:44 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-08-20 19:14:44 -0400 |
commit | f1c49ff42816cb3ccbac3dc95b7c26c07a63116f (patch) | |
tree | 030b05ad6998b4980436de060050632b99c4c858 /usr/local/www/firewall_rules.php | |
parent | 24b9ea9a860ca880c1c21695f000e36fa81adcca (diff) | |
download | pfsense-f1c49ff42816cb3ccbac3dc95b7c26c07a63116f.zip pfsense-f1c49ff42816cb3ccbac3dc95b7c26c07a63116f.tar.gz |
Add avanced item indicator which will show when hovering the mouse over the icon which advanced item has been enabled
Diffstat (limited to 'usr/local/www/firewall_rules.php')
-rwxr-xr-x | usr/local/www/firewall_rules.php | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index a4da1e0..3227b69 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -42,6 +42,25 @@ $pgtitle = array("Firewall", "Rules"); require("guiconfig.inc"); +function check_for_advaned_options(&$item) { + $item_set = ""; + if($item['max-src-nodes']) + $item_set .= "max-src-nodes {$item['max-src-nodes']} "; + if($item['max-src-states']) + $item_set .= "max-src-states {$item['max-src-states']} "; + if($item['statetype'] != "keep state" && $item['statetype'] != "") + $item_set .= "statetype {$item['statetype']} {$item['statetype']}"; + if($item['statetimeout']) + $item_set .= "statetimeout {$item['statetimeout']}"; + if($item['nosync']) + $item_set .= "nosync "; + 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']} "; + return $item_set; +} + if (!is_array($config['filter']['rule'])) { $config['filter']['rule'] = array(); } @@ -247,8 +266,8 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript for ($i = 0; isset($a_filter[$i]); $i++) { $filterent = $a_filter[$i]; if ($filterent['interface'] != $if && !isset($filterent['floating'])) - continue; - if (isset($filterent['floating']) && "FloatingRules" != $if) + continue; + if (isset($filterent['floating']) && "FloatingRules" != $if) continue; $nrules++; } @@ -320,12 +339,20 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <?php $nrules = 0; for ($i = 0; isset($a_filter[$i]); $i++): $filterent = $a_filter[$i]; if ($filterent['interface'] != $if && !isset($filterent['floating'])) - continue; - if (isset($filterent['floating']) && "FloatingRules" != $if) - continue; + continue; + if (isset($filterent['floating']) && "FloatingRules" != $if) + continue; + $isadvset = check_for_advaned_options($filterent); + if($isadvset) + $advanced_set = "<img src=\"./themes/{$g['theme']}/images/icons/icon_advanced.gif\" width=\"17\" height=\"17\" title=\"advanced settings set: $isadvset\" border=\"0\">"; + else + $advanced_set = "" ?> <tr valign="top" id="fr<?=$nrules;?>"> - <td class="listt"><input type="checkbox" id="frc<?=$nrules;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nrules;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;"></td> + <td class="listt"> + <input type="checkbox" id="frc<?=$nrules;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nrules;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;"> + <?php echo $advanced_set; ?> + </td> <td class="listt" align="center"> <?php if ($filterent['type'] == "block") $iconfn = "block"; |