diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-09-26 21:44:19 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-09-26 21:44:19 +0000 |
commit | f7ccdf4686d486ef5994c97f6f57bc5fe0425bb7 (patch) | |
tree | d0058a72199dbc48d5d3a54d074a8f475eb3a4e2 | |
parent | db442681416bbd91f743659acc9e03fa175032bc (diff) | |
download | pfsense-packages-f7ccdf4686d486ef5994c97f6f57bc5fe0425bb7.tar.gz pfsense-packages-f7ccdf4686d486ef5994c97f6f57bc5fe0425bb7.tar.bz2 pfsense-packages-f7ccdf4686d486ef5994c97f6f57bc5fe0425bb7.zip |
* Alert user when no items are in the list
* Otherwise show how many items listed
-rw-r--r-- | packages/snort/snort_blocked.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/snort/snort_blocked.php b/packages/snort/snort_blocked.php index c23639c5..4dd0a72d 100644 --- a/packages/snort/snort_blocked.php +++ b/packages/snort/snort_blocked.php @@ -80,15 +80,21 @@ include("head.inc"); $ips = `/sbin/pfctl -t snort2c -T show`; $ips_array = split("\n", $ips); + $counter = 0; foreach($ips_array as $ip) { if(!$ip) continue; + $counter++; echo "<tr>"; echo "<td align=\"center\" valign=\"top\"'><a href='snort_blocked.php?todelete=" . urlencode($ip) . "'>'"; echo "<img title=\"Delete\" border=\"0\" name='todelete' id='todelete' alt=\"Delete\" src=\"./themes/{$g['theme']}/images/icons/icon_x.gif\"></a></td>"; echo "<td>{$ip}</td>"; echo "</tr>"; } + if($counter < 1) + echo "<tr><td colspan='2' align=\"center\" valign=\"top\">There are currently no items being blocked by snort.</td></tr>"; + else + echo "<tr><td colspan='2' align=\"center\" valign=\"top\">{$counter} items listed.</td></tr>"; ?> </table> |