aboutsummaryrefslogtreecommitdiffstats
path: root/config/ipblocklist
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-05-29 15:39:21 -0400
committerScott Ullrich <sullrich@pfsense.org>2010-05-29 15:39:21 -0400
commit6e09119cab1284b6052a04398c1c58ab530d0d4f (patch)
treeed826338f28e5d650a01b3621bf934b1391f8d94 /config/ipblocklist
parenta2ff742093df3fd3c8fa945668427d92dfd13f1e (diff)
downloadpfsense-packages-6e09119cab1284b6052a04398c1c58ab530d0d4f.tar.gz
pfsense-packages-6e09119cab1284b6052a04398c1c58ab530d0d4f.tar.bz2
pfsense-packages-6e09119cab1284b6052a04398c1c58ab530d0d4f.zip
Adding file from Tom
Diffstat (limited to 'config/ipblocklist')
-rwxr-xr-xconfig/ipblocklist/whitelist.tmp66
1 files changed, 66 insertions, 0 deletions
diff --git a/config/ipblocklist/whitelist.tmp b/config/ipblocklist/whitelist.tmp
new file mode 100755
index 00000000..17cae247
--- /dev/null
+++ b/config/ipblocklist/whitelist.tmp
@@ -0,0 +1,66 @@
+<html>
+<head>
+<STYLE type="text/css">
+ a img {border:none; }
+ </STYLE>
+</head>
+<a href="ipblocklist_list.php"><img src="../../themes/nervecenter/images/icons/icon_alias_url_reload.gif" ALT="Manual" ALIGN=RIGHT></a>
+
+<span style="color:red">White lists</span> - The lists added here will be added to a whitelist
+ <br/>Add List URL:
+<br/><form method="post" action="">
+<input name="content" type="text" />
+<input type="image" src="../../themes/nervecenter/images/icons/icon_plus.gif" value="submit">
+<br/>
+
+<?php
+
+
+$myFile = "wlists.txt";
+$content = $_REQUEST['content'];
+$fh = fopen($myFile, 'a+');
+fwrite($fh, $content);
+if (strlen($content) > 1) {
+ fwrite($fh, "\n");
+ } else {
+
+}
+fclose($fh);
+
+
+//echo (filesize($myFile));
+if (filesize($myFile) > 1) {
+ //$fh = fopen($myFile, 'r');
+ //$theData = fread($fh, filesize($myFile));
+ //fclose($fh);
+ echo "<br/> Current List(s): <br/>";
+ // Get the whole file into a single string
+ $fileContents = file_get_contents($myFile);
+
+ // Explode the file contents string by each line
+ $lines = explode(PHP_EOL, $fileContents); // Replace PHP_EOL with "\r\n" or "\n" or "\r" if you like
+
+ // Iterate through each line and do what you need with it
+
+ foreach ($lines as $line) {
+ $i++;
+ echo "<a href=purgeip.php?line=$i style='border-style: none'><img src='../../themes/nervecenter/images/icons/icon_x.gif'></a>";
+ echo " ";
+ echo $line;
+ //echo "";
+ // echo $i;
+ echo "<br/>";
+
+ }
+
+
+
+
+
+}
+echo "<br/><br/>";
+
+
+
+
+?> \ No newline at end of file