Location: PHPKode > projects > HIOX GuestBook > filter.php
<?php
include "authheader.php";

if($block == false){

include 'col.php';
include 'header.php';

echo "<br><br><br>";

$iswrite = $_POST['what'];
if($iswrite == "write")
{
    echo "<div align=center style='color: green;'><b>filters have been updated</div>";    
    $str = $_POST['filters'];
    $file = fopen('fil.php',w);
    $ara = explode("\n",$str);
    fwrite($file, "<?php \n\n");
    for($yy=0; $yy<count($ara);$yy++)
    {
	$xxa = $ara[$yy];
	$xxa = trim($xxa);
           if($xxa != "")
	    fwrite($file, "$"."asi[$yy] = \"$xxa\";");
    }
    
    fwrite($file, $ara[$yy]);
    fwrite($file, "\n?>");
    fclose($file);
}

include "fil.php";
?>

<table bgcolor=dfdff0 align=center style="padding: 10px; border:2px red groove;
        font-family: arial, verdana, san-serif; font-size: 14px;">
<form name=fil method=post action="<?php echo "$PHP_SELF"; ?>">
<tr><td></td><td>Add/Edit Filters .....<br>
 <textarea name=filters rows=15 cols=50><?php
  for($xx=0; $xx<count($asi); $xx++)
  {
    $word = $asi[$xx];
    echo "$word \n"; 
  }
 ?>
 </textarea>
</td></tr>

<tr><td colspan=2 align=right>
<input type=hidden value=write name=what>
<input type='submit' value="create"> </td></tr>
<td colspan=2>Note: You wont get the messages Containig these Words </td>
</form>
</table>
</body>
</html>

<?php
}
?>

<!-- (c) copyright 2004, HIOX INDIA 		    -->
<!-- This  is  a free tool provided by hscripts.com -->
<!-- Please get in touch with us for using          -->
<!-- this product in a commercial site.             -->
Return current item: HIOX GuestBook