From 78a78f151c15a14b32fc151e02a9a0315a339da5 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 2 Jun 2006 17:31:11 +0000 Subject: Add database total counts to bottom of SpamDB --- packages/spamd_db.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'packages/spamd_db.php') 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`; + ?> @@ -401,6 +413,12 @@ if (typeof getURL == 'undefined') {
Note: 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.
+

Database totals:
+ "; + echo "  {$blacklist_items} total items in the blacklist.
"; + echo "  {$spamdb_items} total items in the SpamDB.
"; + ?> -- cgit v1.2.3