From e178ef94bf3930b9a9bc5e0f563bc0412ae1cee6 Mon Sep 17 00:00:00 2001 From: Thomas Schaefer Date: Mon, 3 Oct 2011 10:02:32 -0400 Subject: correct permissions on widget and removed ajax --- .../countryblock_IPBlocklist.widget.tmp | 153 ++++++++++++++++----- 1 file changed, 115 insertions(+), 38 deletions(-) (limited to 'config/countryblock/countryblock_IPBlocklist.widget.tmp') diff --git a/config/countryblock/countryblock_IPBlocklist.widget.tmp b/config/countryblock/countryblock_IPBlocklist.widget.tmp index e81f1a55..a62fcede 100644 --- a/config/countryblock/countryblock_IPBlocklist.widget.tmp +++ b/config/countryblock/countryblock_IPBlocklist.widget.tmp @@ -1,39 +1,116 @@ - - - -
Ajax Loading...
+"; +if (file_exists($ipblocklist_file)) { + echo " IP-Blocklist"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c ipblocklist"); + ob_end_clean(); + if ($results > '2') echo ""; + else + echo ""; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " Countryblock"; + ob_start(); + $results = exec("/sbin/pfctl -s rules | grep -c countryblock"); + ob_end_clean(); + if ($results > '0') echo ""; + else + echo ""; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + echo " "; + ob_start(); + $resultsIP = exec("/sbin/pfctl -T show -t ipblocklist |grep -v -c Z"); + ob_end_clean(); + echo $resultsIP; + echo " Networks"; + echo ""; +} +if (file_exists($countryblock_file)) { + echo " "; + ob_start(); + $resultsCB = exec("pfctl -T show -t countryblock |grep -v -c Z"); + ob_end_clean(); + echo $resultsCB; + echo " Networks"; + echo ""; +} +echo" "; +echo" "; +if (file_exists($ipblocklist_file)) { + ob_start(); + $resultsIP = exec("tail -r /usr/local/www/packages/ipblocklist/errorOUT.txt"); + ob_end_clean(); + if ($resultsIP == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsIP; + echo ""; + echo ""; + } +} +if (file_exists($countryblock_file)) { + ob_start(); + $resultsCB = exec("tail -r /usr/local/www/packages/countryblock/errorOUT.txt"); + ob_end_clean(); + if ($resultsCB == "") { + echo " "; + } else { + echo " "; + echo "
"; + echo $resultsCB; + echo ""; + echo ""; + } +} +echo" "; +//echo" "; +//if (file_exists($ipblocklist_file)) echo "  "; +//if (file_exists($countryblock_file)) echo "  "; +//echo" "; +echo""; + +?> -- cgit v1.2.3