diff options
-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> |