diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-06-02 17:31:11 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-06-02 17:31:11 +0000 |
commit | 78a78f151c15a14b32fc151e02a9a0315a339da5 (patch) | |
tree | 7cc8413c6315a7a500104da94a4cad795a91e0b2 /packages | |
parent | 1b1b13f4118fb2561ebb3606d85cc1d43bb0b39c (diff) | |
download | pfsense-packages-78a78f151c15a14b32fc151e02a9a0315a339da5.tar.gz pfsense-packages-78a78f151c15a14b32fc151e02a9a0315a339da5.tar.bz2 pfsense-packages-78a78f151c15a14b32fc151e02a9a0315a339da5.zip |
Add database total counts to bottom of SpamDB
Diffstat (limited to 'packages')
-rw-r--r-- | packages/spamd_db.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/spamd_db.php b/packages/spamd_db.php index 761e64ac..0867fc7e 100644 --- a/packages/spamd_db.php +++ b/packages/spamd_db.php @@ -168,6 +168,18 @@ function delete_from_whitelist($srcip) { $pgtitle = "SpamD: Database"; include("head.inc"); +if(file_exists("/var/db/whitelist.txt")) + $whitelist_items = `cat /var/db/whitelist.txt | wc -l`; +else + $whitelist_items = "0"; + +if(file_exists("/var/db/blacklist.txt")) + $blacklist_items = `cat /var/db/blacklist.txt | wc -l`; +else + $blacklist_items = "0"; + +$spamdb_items = `/usr/local/sbin/spamdb | wc -l`; + ?> <body link="#000000" vlink="#000000" alink="#000000"> <?php include("fbegin.inc"); ?> @@ -401,6 +413,12 @@ if (typeof getURL == 'undefined') { <br> <span class="vexpl"><strong><span class="red">Note:</span> Clicking on the action icons will invoke a AJAX query and the page will not refresh. Click refresh in you're browser if you wish to view the changes in status.</strong></span> <br> + <p><font size="-2"><b>Database totals:</b><br><font size="-3"> + <?php + echo " {$whitelist_items} total items in the whitelist.<br>"; + echo " {$blacklist_items} total items in the blacklist.<br>"; + echo " {$spamdb_items} total items in the SpamDB.<br>"; + ?> <?php include("fend.inc"); ?> </body> </html> |