summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules.php
diff options
context:
space:
mode:
authorScott Dale <sdale@pfsense.org>2007-05-05 21:36:31 +0000
committerScott Dale <sdale@pfsense.org>2007-05-05 21:36:31 +0000
commit6fecc73bffccd18270b93a54ab9a965585f546e4 (patch)
tree4ea66781fd6b6cffa7cc2f76d3e1927e8051d732 /usr/local/www/firewall_rules.php
parent1f1958ba38f1ff3be1fbcbdced072e303f686694 (diff)
downloadpfsense-6fecc73bffccd18270b93a54ab9a965585f546e4.zip
pfsense-6fecc73bffccd18270b93a54ab9a965585f546e4.tar.gz
Show icon that indicates whether the traffic is being blocked or allowed
MFC: asap
Diffstat (limited to 'usr/local/www/firewall_rules.php')
-rwxr-xr-xusr/local/www/firewall_rules.php37
1 files changed, 33 insertions, 4 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php
index 1bf4bc5..9dacd5e 100755
--- a/usr/local/www/firewall_rules.php
+++ b/usr/local/www/firewall_rules.php
@@ -323,11 +323,11 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
?>
<a href="?if=<?=$if;?>&act=toggle&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="11" border="0" title="click to toggle enabled/disabled status"></a>
<?php if (isset($filterent['log'])):
- $iconfn = "log_s";
+ $iconfnlog = "log_s";
if (isset($filterent['disabled']))
- $iconfn .= "_d";
+ $iconfnlog .= "_d";
?>
- <br><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfn;?>.gif" width="11" height="15" border="0">
+ <br><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_<?=$iconfnlog;?>.gif" width="11" height="15" border="0">
<?php endif; ?>
</td>
<?php
@@ -496,6 +496,35 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
}
}
}
+ $printicon = false;
+ if ($schedstatus)
+ {
+ if ($iconfn == "block" || $iconfn == "reject")
+ {
+ $image = "icon_clock_red";
+ $alttest = "Traffic matching this rule is currently being denied";
+ }
+ else
+ {
+ $image = "icon_clock_green";
+ $alttest = "Traffic matching this rule is currently being allowed";
+ }
+ $printicon = true;
+ }
+ else if ($filterent['sched'] )
+ {
+ if ($iconfn == "block" || $iconfn == "reject")
+ {
+ $image = "icon_clock_green";
+ $alttext = "Traffic matching this rule is currently being allowed";
+ }
+ else
+ {
+ $image = "icon_clock_red";
+ $alttext = "Traffic matching this rule is currently being denied";
+ }
+ $printicon = true;
+ }
?>
<td class="listlr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';">
@@ -517,7 +546,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript
<?=$textss;?><?php if (isset($config['interfaces'][$filterent['gateway']]['descr'])) echo htmlspecialchars($config['interfaces'][$filterent['gateway']]['descr']); else echo htmlspecialchars(pprint_port($filterent['gateway'])); ?><?=$textse;?>
</td>
<td class="listr" onClick="fr_toggle(<?=$nrules;?>)" id="frd<?=$nrules;?>" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';"><font color="black">
- <?=$textss;?><?php echo $schedule_span_begin;?><?=htmlspecialchars($filterent['sched']);?><?php echo $schedule_span_end; ?><?=$textse;?>&nbsp; <?php if ($schedstatus) { ?><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_frmfld_time.png" title="Schedule is currently active" width="17" height="17" border="0"><?php } ?>
+ <?=$textss;?><?php echo $schedule_span_begin;?><?=htmlspecialchars($filterent['sched']);?><?php echo $schedule_span_end; ?><?=$textse;?>&nbsp; <?php if ($printicon) { ?><img src="./themes/<?= $g['theme']; ?>/images/icons/<?php echo $image; ?>.gif" title="<?php echo $alttext;?>" width="12" height="12" border="0"><?php } ?>
</td>
<td class="listbg" onClick="fr_toggle(<?=$nrules;?>)" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';" bcolor="#990000"><font color="white">
<?=$textss;?><?=htmlspecialchars($filterent['descr']);?>&nbsp;<?=$textse;?>
OpenPOWER on IntegriCloud