D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home5
/
rakcha
/
www
/
control
/
includes
/
Filename :
delete.php
back
Copy
<?php include("database.php"); //delete group details if (isset($_GET['news_id'])) { $news_id = $_GET['news_id']; $delete_query_news = "delete from notification where notification_id = '$news_id'"; if (mysqli_query($con,$delete_query_news)) { echo "<script>alert('Notification has been deleted')</script>"; echo "<script>window.open('../notification.php', '_self')</script>"; } } //delete group details //delete gallery_id if (isset($_GET['gallery_id'])) { $gallery = $_GET['gallery_id']; $select_query_gallery = "select * from gallery where gallery_id='$gallery'"; $run_gallery = mysqli_query($con,$select_query_gallery); while ($row_gallery = mysqli_fetch_array($run_gallery)) { $gallery_image = $row_gallery['image']; } $delete_query_gallery = "delete from gallery where gallery_id = '$gallery'"; if (mysqli_query($con,$delete_query_gallery)) { unlink($_SERVER['DOCUMENT_ROOT'] . "/gallery/$gallery_image"); echo "<script>alert('Gallery has been deleted')</script>"; echo "<script>window.open('../gallery.php', '_self')</script>"; } } //delete gallery_id if (isset($_GET['bond_id'])) { $gallery = $_GET['bond_id']; $select_query_gallery = "select * from bond_details where bond_id='$gallery'"; $run_gallery = mysqli_query($con,$select_query_gallery); while ($row_gallery = mysqli_fetch_array($run_gallery)) { $gallery_image = $row_gallery['bond']; } $delete_query_gallery = "delete from bond_details where bond_id = '$gallery'"; if (mysqli_query($con,$delete_query_gallery)) { unlink($_SERVER['DOCUMENT_ROOT'] . "/bond/$gallery_image"); echo "<script>alert('Bond has been deleted')</script>"; echo "<script>window.open('../bond_documents.php', '_self')</script>"; } } ?>