-
Notifications
You must be signed in to change notification settings - Fork 1
/
delete.php
74 lines (63 loc) · 1.7 KB
/
delete.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
$name=$_REQUEST['tname'];
$id=$_REQUEST['id'];
include('comman/connect.php');
if($name=="whrs")
{
$con->query("delete from librarytime where timeid='$id'");
//mysql_query("update batch set deleted='Delete' where bid='$id'");
header("location:whr.php");
}
if($name=="account1")
{
$row=mysqli_fetch_array($con->query("select * from registration where userid='$id'"));
$pic=$row['image'];
$con->query("delete from registration where userid='$id'");
unlink("user/$pic");
header("location:showusers.php");
}
if($name=="library")
{
$row=mysql_fetch_array($con->query("select * from assignment where memberid='$id'"));
$pic=$row['pic'];
$con->query("delete from libraryteam where memberid='$id'");
unlink("image/Library-Team/$pic");
header("location:libcomshow.php");
}
if($name=="gallery")
{
$pic=$_REQUEST['pic'];
$con->query("delete from gallery where gid='$id'");
unlink("gallery/$pic");
header("location:galleryshow.php");
}
if($name=="magazine")
{
$pic=$_REQUEST['pic'];
$con->query("delete from newsmagazines where Id='$id'");
unlink("newsMagazines/$pic");
header("location:AdminNewsMagazines.php");
}
if($name=="news")
{
//mysql_query("delete from news where nid='$id'");
$con->query("update news set deleted='Delete' where nid='$id'");
header("location:news.php");
}
if($name=="message")
{
//mysql_query("delete from message where mid='$id'");
$con->query("update message set deleted='Delete' where mid='$id'");
header("location:message.php");
}
if($name=="contact")
{
//mysql_query("delete from contact where c_id='$id'");
header("location:inbox.php");
}
if($name=="contactreply")
{
//mysql_query("delete from contactreply where cr_id='$id'");
header("location:sentmail.php");
}
?>