📄 delete.php
字号:
<?php session_start(); include("../conn.php"); $furl=getenv("http_referer");
if($sc=="发件箱"){
$id=$_GET['id'];
$quer="select * from hw_dxx where id='$id'";
$result=mysql_query($quer);
echo mysql_error();
$myrow=mysql_fetch_array($result);
if($myrow[ssc]=2){
$query="delete from hw_dxx where id='$id'";
$result=mysql_query($query);
if($result){
echo "<script>alert('删除成功!!');window.location;</script>";
echo "<meta http-equiv=\"Refresh\" content=\"2;url=$furl\">";
}else{echo "删除失败!";}
}
else
{
$update="update hw_dxx set fsc=2 where id='$id'";
$result=mysql_query($update);
if($result){
echo "<script>alert('删除成功!!');window.location;</script>";
echo "<meta http-equiv=\"Refresh\" content=\"2;url=$furl\">";
}else{echo "删除失败!";}
}
}
if($sc=="收件箱"){
$id=$_GET['id'];
$quer="select * from hw_dxx where id='$id'";
$result=mysql_query($quer);
echo mysql_error();
$myrow=mysql_fetch_array($result);
if($myrow[fsc]=2){
$query="delete from hw_dxx where id='$id'";
$result=mysql_query($query);
if($result){
echo "<script>alert('删除成功!!');window.location;</script>";
echo "<meta http-equiv=\"Refresh\" content=\"2;url=$furl\">";
}else{echo "删除失败!";}
}
else
{
$update="update hw_dxx set ssc=2 where id='$id'";
$result=mysql_query($update);
if($result){
echo "<script>alert('删除成功!!');window.location;</script>";
echo "<meta http-equiv=\"Refresh\" content=\"2;url=$furl\">";
}else{echo "删除失败!";}
}
}
if($sc=="草稿箱"){
$id=$_GET['id'];
$query="delete from hw_dxx where id='$id'";
$result=mysql_query($query);
if($result){
echo "<script>alert('删除成功!!');window.location;</script>";
echo "<meta http-equiv=\"refresh\" content=\"2; url=$furl\">"; }
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -