diff options
Diffstat (limited to 'config/ipblocklist/whitelist.tmp')
-rwxr-xr-x | config/ipblocklist/whitelist.tmp | 66 |
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 |