D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
grandhou
/
www
/
album
/
album-admin
/
Filename :
delete-user.php
back
Copy
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>GRAND HOUSE | Admin</title> </head> <body oncontextmenu="return false;"> <script> document.onkeydown = function(e) { if(event.keyCode == 123) { return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)){ return false; } if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)){ return false; } if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)){ return false; } } </script> <?php include("include/configpage.php"); $id=$_GET['Id']; $sql = "select bookimage from user where id='".$id."'"; $res=mysqli_query($dbhandle,$sql); $row=mysqli_fetch_array($res); $sql1 = "select * from albumlist where userid='".$id."'"; $res1=mysqli_query($dbhandle,$sql1); while($row1=mysqli_fetch_array($res1)) { $albumid=$row1['id']; $sql2 = "select * from album where userid='".$id."' and albumlistid='".$albumid."'"; $res2=mysqli_query($dbhandle,$sql2); while($row2=mysqli_fetch_array($res2)) { unlink("upload/".$row2['file_name']); } $sql3 = "delete from album where userid='".$id."' and albumlistid='".$albumid."'"; mysqli_query ($dbhandle,$sql3); } $sql4= "delete from albumlist where userid='".$id."'"; mysqli_query ($dbhandle,$sql4); $sql5 = "delete from user where id='".$id."'"; // execute query mysqli_query ($dbhandle,$sql5); unlink("upload/".$row['bookimage']); echo '<script type="text/javascript">alert("User Deleted Succesfully");window.location=\'manage-user.php\';</script>'; ?> </body> </html>