Location: PHPKode > scripts > Create Your Own Directory > cms/admin/block.php
<?php
include "authheader.php";

if($block != true)
{
?>

<!-- Welcome to the scripts database of HIOX INDIA      -->
<!-- This tool is developed and a copyright             -->
<!-- product of HIOX INDIA.				        -->
<!-- For more information visit http://www.hscripts.com -->

<html>
<head>
<style>
.ta{background-color: ffff44;}
.rad{color:red; font-weight:bold; background-color: ffff44;}
.head{font-size: 17px; color: white; font-family: verdana, arial, san-serif;}
.links{font-size: 13px; color: white; font-family: verdana, arial, san-serif; text-decoration:none;}
.maintext{font-size: 13px; color: #fefefe; font-family: verdana, arial, san-serif; padding:20px;}
 .txt{font-size:13px; color:#000000; font-famil:verdana,arial,san-serif; padding:5px}
</style>
</head>
<body style="margin: 0px;">
<?php  include "heade.php"; ?>
<table width=790 height=100% cellpadding=0 cellspacing=0 align=center>
<tr><td align=center>

<tr valign=center border=0><td class=maintext valign=top>
<?php
include "r-header.php";
?>
<br><br>
<div align=center style="color: 000000">
<table width=45% bgcolor=#e8eefa>

<?php
 $wrd = $_POST['bllkk'];
 $todo = $_POST['todo'];
 $toto = $_GET['tdo'];
 $oldwrd  = $_GET['filter'];

 if($wrd == 'blkwrd'){
   $blk = $_POST['wrd'];  
     
        if($blk == "")
	{
                echo "<font color=red>Empty Values Not allowed</font><br>";
	}
        else{
                $result1 = mysql_query("insert into filter values('',NULL,'$blk')",$link);
                if($result1)
                        echo "<font color=green><b>$blk Successfully added</b></font><br>";
                else
                        echo "<font color=red><b>Unable to add the data.</b></font><br>";
        }
 }
?>

<form nemw=block method=post action=<?php echo "$PHP_SELF"; ?>>
<tr><td class=txt align=center>Add IP Address</td></tr>
<tr><td align=center><input type=text name=wrd size=25></td></tr>
<tr><td align=center><input name=bllkk type=hidden value=blkwrd>
<input type=submit value=Block></td></tr>
</form>
<tr><td class=txt>Enter IP Address of user you'd not like to receive any message from them</td></tr>
</table>
<br><br>

<?php
 if($toto=='delete'){
   $delname = $_GET['delname'];   
   $result = mysql_query("delete from filter where ip='$delname'",$link);
     if($result)
       echo "<font color=Green><b>$delname Deleted</b></font><br>";
 }
 
 elseif($todo=='update'){
   $newwrd = $_POST['newwrd'];
   if($newwrd == ""){
     echo "<font color=Red>Empty values Not allowed</font>";
   }
   else{
     $result = mysql_query("update filter set ip='$newwrd' where ip='$oldwrd'",$link);
     if($result)
       echo "<font color=Green><b>IP Address Successfully Updated</b></font><br>";
     else
       echo "<font color=red><b>IP Address not Updated</b></font><br>";
   }
 }

?>

<table width=40% style='border: 1px solid grey'  class="txt">
<tr align=center><td colspan=3><b>You will not Receive any Message from Following IP Address</b></td></tr>
<?php

$result = mysql_query("select ip from filter where ip IS NOT NULL",$link);
 while($line=@mysql_fetch_array($result,MYSQL_ASSOC))
   {
     if($vv === true){
       $col = '#e8eefa';
       $vv = false;
     }
     else{
       $col = '#f5f5f5';
       $vv = true;
     }

     $word = $line['ip'];
     echo "<form id=$word method=post action='block.php?filter=$word'><tr bgcolor=$col>";
     echo "<td width=25%><input name=newwrd value=$word size=20></td>";
     echo "<td width=5%><input type=hidden name=todo value=update>";
     echo "<input type=submit value=Update style=\"border:0px solid; color:green; background-color:$col;cursor:pointer;text-decoration:none;\"></td>";
     echo "</td></form>";
     echo "<td width=10%><a style=\"text-decoration: none; color:red;\" href=\"$PHP_SELF?tdo=delete&delname=$word\">Delete</a></td>\n";
     echo "</tr>";
   }

?>
</table>
</div>
</td></tr>
<!-- content row -->

<tr><td width=100% align=right>
a product by &copy; <a href="http://www.hscripts.com" 
style="font-size: 14px; color: 347777; text-decoration:none;">hscripts.com</a> 
&nbsp; &nbsp; &nbsp; &nbsp;
</td></tr>
</table>
<!-- main table -->

</td></tr>
</table>
<tr><td height=20 bgcolor=white>
</td></tr></table>

</body>
</html>

<!-- Welcome to the scripts database of HIOX INDIA      -->
<!-- This tool is developed and a copyright             -->
<!-- product of HIOX INDIA.				        -->
<!-- For more information visit http://www.hscripts.com -->

<?php
}
?>
Return current item: Create Your Own Directory