Location: PHPKode > scripts > Create Your Own Directory > cms/admin/delcnt.php
<?php
include "authheader.php";
?>
<!-- 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;}
</style>
</head>
<body style="margin: 0px;">
<table width=790 height=100% cellpadding=0 cellspacing=0 align=center>
<tr><td align=center>
<?php include "heade.php" ?>
<!-- content row -->
<tr height=95%><td class=maintext valign=top>
<div align=center style="color: 000000">
<?php
$res = $_POST['res'];
$id = $_GET['id'];
$sub = $_GET['sub'];
$sub1=$_POST['sub1'];
$id1=$_POST['id'];
?>
<?php
	$form = true;
	if( $res != "delete" )
	{
          if($sub=="deluser"){

            $qq="select * from cnt where usrid=$id";
           //echo"$qq";
		$rr=mysql_query($qq,$link);
            $cntt="";
            while ($rrr = @mysql_fetch_array($rr, MYSQL_ASSOC))
		{
                  $cntt="present";
            }
            if($cntt =="present")
                 $msg="<div style='color:red; font-size:13px;'>	Do you want to delete the user, you may loose the added content</div>";

            else
                 $msg="<div style='color:green; font-size:13px;'>Confirm to delete User <br><br>Do you want to delete this user</div>";
            }else if($sub=="delcnt")
            {
			 $msg="<div style='color:green; font-size:13px;'>Confirm to delete content <br><br>
			Do you want to delete this content</div>";


            }
			            
		echo "<table align=center ><tr><td align=center  >
		$msg
		<form name=as method=post action=delcnt.php>
		<input type=hidden name=id value=$id>
		<input type=hidden name=sub1 value=$sub>
		<input type=hidden name=res value=delete
		<input type=submit value=delete>
		</form>
		</td></tr>";
	}
	else
	{	
		if($sub1=='deluser')
		{     $query="select email from user where UserId='$id1'";
			$result1=mysql_query($query,$link);
			while ($line = @mysql_fetch_array($result1, MYSQL_ASSOC))
			{
				$email=$line['email'];
			}
			$quer="delete from user where UserId='$id1'";
			$quer1="delete from cnt where usrid='$id1'";
			//$quer2="delete from mailid where name='$email'";
			$result=mysql_query($quer,$link);
			$result=mysql_query($quer1,$link);
			//$result=mysql_query($quer2,$link);

			if($result){
		echo " <font color=green>This user is deleted</font> ";
		}
		}else if($sub1=='delcnt')
		{
		$quer = "delete from cnt where cntid='$id1'";
		//secho"$quer";
		$result=mysql_query($quer,$link);
		  if($result){
		  echo "<font color=green font-size:13px;> This user content is deleted </font>";
		  }
		}
				
	}
?>

</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>

</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 -->

Return current item: Create Your Own Directory