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 --- .../8/countryblock_IPBlocklist.widget.tmp | 153 ++++++++++++++++----- .../8/countryblock_ipblocklist_widget.tmp | 116 ---------------- config/ipblocklist/8/ipblocklist.inc | 2 - config/ipblocklist/8/ipblocklist.xml | 7 +- 4 files changed, 116 insertions(+), 162 deletions(-) delete mode 100644 config/ipblocklist/8/countryblock_ipblocklist_widget.tmp (limited to 'config/ipblocklist') diff --git a/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp b/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp index e81f1a55..a62fcede 100644 --- a/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp +++ b/config/ipblocklist/8/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""; + +?> diff --git a/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp b/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp deleted file mode 100644 index d8d0f780..00000000 --- a/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp +++ /dev/null @@ -1,116 +0,0 @@ -"; -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""; - -?> \ No newline at end of file diff --git a/config/ipblocklist/8/ipblocklist.inc b/config/ipblocklist/8/ipblocklist.inc index 6797f689..545cb4ab 100755 --- a/config/ipblocklist/8/ipblocklist.inc +++ b/config/ipblocklist/8/ipblocklist.inc @@ -64,8 +64,6 @@ function php_install_command_ip() //rename PHP files from .tmp to .php exec("cp /tmp/countryblock_IPBlocklist.widget.tmp /usr/local/www/widgets/widgets/countryblock_IPBlocklist.widget.php"); unlink_if_exists("/tmp/countryblock_IPBlocklist.widget.tmp"); - exec("cp /tmp/countryblock_ipblocklist_widget.tmp /usr/local/www/countryblock_ipblocklist_widget.php"); - unlink_if_exists("/tmp/ccountryblock_ipblocklist_widget.tmp"); exec("cp /tmp/lists.txt /usr/local/www/packages/ipblocklist/lists.txt"); exec("cp /tmp/class.phpmailer.tmp /usr/local/www/packages/ipblocklist/class.phpmailer.php"); diff --git a/config/ipblocklist/8/ipblocklist.xml b/config/ipblocklist/8/ipblocklist.xml index 4d38eae4..00ac22b8 100755 --- a/config/ipblocklist/8/ipblocklist.xml +++ b/config/ipblocklist/8/ipblocklist.xml @@ -156,14 +156,9 @@ /tmp/ - 0755 + 0644 http://www.pfsense.org/packages/config/ipblocklist/8/countryblock_IPBlocklist.widget.tmp - - /tmp/ - 0755 - http://www.pfsense.org/packages/config/ipblocklist/8/countryblock_ipblocklist_widget.tmp - Variable One -- cgit v1.2.3