aboutsummaryrefslogtreecommitdiffstats
path: root/packages/spamd_db.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-06-02 17:31:11 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-06-02 17:31:11 +0000
commit78a78f151c15a14b32fc151e02a9a0315a339da5 (patch)
tree7cc8413c6315a7a500104da94a4cad795a91e0b2 /packages/spamd_db.php
parent1b1b13f4118fb2561ebb3606d85cc1d43bb0b39c (diff)
downloadpfsense-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/spamd_db.php')
-rw-r--r--packages/spamd_db.php18
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 "&nbsp;&nbsp;{$whitelist_items} total items in the whitelist.<br>";
+ echo "&nbsp;&nbsp;{$blacklist_items} total items in the blacklist.<br>";
+ echo "&nbsp;&nbsp;{$spamdb_items} total items in the SpamDB.<br>";
+ ?>
<?php include("fend.inc"); ?>
</body>
</html>