diff options
author | Tom Schaefer <tom@tomschaefer.org> | 2010-12-06 12:20:00 -0500 |
---|---|---|
committer | Tom Schaefer <tom@tomschaefer.org> | 2010-12-06 12:20:00 -0500 |
commit | e6a67ab642563f5122d8a661977740c1ea8749b7 (patch) | |
tree | e1a1dc530f45d9303389c806b386899902457c6d /config/ipblocklist/7/whitelist.tmp | |
parent | 7ab65e4c7553580cf9f66350cb3cb6401443d045 (diff) | |
download | pfsense-packages-e6a67ab642563f5122d8a661977740c1ea8749b7.tar.gz pfsense-packages-e6a67ab642563f5122d8a661977740c1ea8749b7.tar.bz2 pfsense-packages-e6a67ab642563f5122d8a661977740c1ea8749b7.zip |
ipblocklist 3.0.1 update with new file structure
Diffstat (limited to 'config/ipblocklist/7/whitelist.tmp')
-rwxr-xr-x | config/ipblocklist/7/whitelist.tmp | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/config/ipblocklist/7/whitelist.tmp b/config/ipblocklist/7/whitelist.tmp new file mode 100755 index 00000000..98745fa2 --- /dev/null +++ b/config/ipblocklist/7/whitelist.tmp @@ -0,0 +1,175 @@ +<?php +header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past +//$pgtitle = "Firewall: IPblo - Whitelist"; + + require("guiconfig.inc"); + include("head.inc"); + + //set the config as a global variable + global $config; + + $global_usage = '/usr/local/www/packages/ipblocklist/global_usage'; + //$fh = fopen($global_usage, 'r'); + + //phpinfo(); + + + + + + +?> + +<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> +<?php include("fbegin.inc"); ?> +<p class="pgtitle"><?=$pgtitle?></p> +<?php if ($input_errors) print_input_errors($input_errors); ?> +<?php if ($savemsg) print_info_box($savemsg); ?> +<form method=POST action=""> +<?php + + +//mwexec("touch countries-white.txt"); +//$myFile = "countries-white.txt"; +//$fh = fopen($myFile, 'a+'); + + +?> +<br /><br /> +<table width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr><td class="tabnavtbl"> +<?php + $tab_array = array(); + $tab_array[0] = array("IP-Blocklist", false, "ipblocklist.php"); + $tab_array[1] = array("Settings", false, "settings.php"); + $tab_array[2] = array("Whitelist", true, "whitelist.php"); + $tab_array[3] = array("Interfaces", false, "ipblocklist_if.php"); + $tab_array[4] = array("Help", false, "http://forum.pfsense.org/index.php/topic,24769.0.html"); + $tab_array[5] = array("Email", false, "email.php"); + display_top_tabs($tab_array); +?> + </td></tr> + <tr> + <td> + <div id="mainarea"> + <table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0"> + <tr> + <td class="listhdrr">Whitelist</td> + + </tr> + + <tr> + <td class="listlr" valign="middle"> + +<table width="100%" border="0" cellpadding="0" cellspacing="0"> +<tr> + +<span style="color:red">White lists</span> - The lists added here will be added to a whitelist + <br/>Add List URL: + + <p><form method="post" action=""> +<input name="content" type="text" /> +<input type="image" src="../../themes/nervecenter/images/icons/icon_plus.gif" value="submit"> +<a href="purgeip.php?line=0">Purge All</a> + +<STYLE type="text/css"> + a img {border:none; } + </STYLE> +</head> + +<?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 $theData; + + +} +echo "<br/><br/>"; + + + + +?></p> + + +</form> + + +</div> + + +</td> +</tr> +</table> + </td> + + + </tr> + + +</table> + +</div> +<p> <u>Usage</u> + <br/> + Add direct link to list and press <img src="../../themes/nervecenter/images/icons/icon_plus.gif"> + (Example: + <a href="http://iblocklist.whitacrecomputers.com/files/bt_level1.gz">Level1</a>, + <a href="http://iblocklist.whitacrecomputers.com/files/bt_level2.gz">Level2</a>, + <a href="http://iblocklist.whitacrecomputers.com/files/bt_level3.gz">Level3</a>) + <br/> + Compressed lists should have .gz extention and follows PeerBlock syntax <br/> + <br/> + </p> +<br> + +<br><br> + +<p> +</p> +</td> + </tr> +</table> +</form> +<?php include("fend.inc"); ?> +</body> +</html> + |