📄 pm_del.php
字号:
<?/* [BBWPS!] (C)2006-2010 小蜜蜂版权所有. This is NOT a freeware, use is subject to license terms*/error_reporting(0);if(!function_exists("checkRequire")){ exit("Forbidden");}$p=new Template("./template/member");$db=new DB($hostname,$username,$password,$database);$action = $_GET['act'];if($action=="del"){ //删除收件箱 if($_POST['deltime']==null||$_POST['deltime']==""){ print("<script> alert('时间不能为空'); window.history.go(-1);</script>"); exit; } $delTime = time()-($_POST['deltime'])*86400; $countSql = "select count(pbid) from ".$prefix."pmbox where posttime<$delTime"; $countRes = $db->query($countSql,true); $countRow = $db->fetch_array($countRes); $delSql = "delete from ".$prefix."pmbox where posttime<$delTime"; if($db->update($delSql)){ unset($db,$delSql); print("<script> alert('成功删除收件箱中".$countRow['count(pbid)']."条信息'); window.history.go(-1);</script>"); exit; }else { print("<script> alert('删除失败'); window.history.go(-1);</script>"); exit; }}else if($action=="del1"){ //删除草稿箱 if($_POST['deltime1']==null||$_POST['deltime1']==""){ print("<script> alert('时间不能为空'); window.history.go(-1);</script>"); exit; } $delTime = time()-($_POST['deltime1'])*86400; $countSql = "select count(pid) from ".$prefix."pm where `posttime`<$delTime and `frombox`=2"; $countRes = $db->query($countSql,true); $countRow = $db->fetch_array($countRes); $delSql = "delete from ".$prefix."pm where posttime<$delTime and `frombox`=2"; if($db->update($delSql)){ unset($db,$delSql); print("<script> alert('成功删除草稿箱中".$countRow['count(pid)']."条信息'); window.history.go(-1);</script>"); exit; }else { print("<script> alert('删除失败'); window.history.go(-1);</script>"); exit; }}else if($action=="del2"){ //删除发件箱 if($_POST['deltime2']==null||$_POST['deltime2']==""){ print("<script> alert('时间不能为空'); window.history.go(-1);</script>"); exit; } $delTime = time()-($_POST['deltime2'])*86400; $countSql = "select count(pid) from ".$prefix."pm where posttime<$delTime and `frombox`=1"; $countRes = $db->query($countSql,true); $countRow = $db->fetch_array($countRes); $delSql = "delete from ".$prefix."pm where posttime<$delTime and `frombox`=1"; if($db->update($delSql)){ unset($db,$delSql); print("<script> alert('成功删除发件箱中".$countRow['count(pid)']."条信息'); window.history.go(-1);</script>"); exit; }else { print("<script> alert('删除失败'); window.history.go(-1);</script>"); exit; }}else if($action=="del3"){ //删除垃圾箱 if($_POST['deltime3']==null||$_POST['deltime3']==""){ print("<script> alert('时间不能为空'); window.history.go(-1);</script>"); exit; } $delTime = time()-($_POST['deltime3'])*86400; $countSql = "select count(pid) from ".$prefix."pm where posttime<$delTime and `frombox`=3"; $countRes = $db->query($countSql,true); $countRow = $db->fetch_array($countRes); $delSql = "delete from ".$prefix."pm where posttime<$delTime and `frombox`=3"; if($db->update($delSql)){ unset($db,$delSql); print("<script> alert('成功删除垃圾箱中".$countRow['count(pid)']."条信息'); window.history.go(-1);</script>"); exit; }else { print("<script> alert('删除失败'); window.history.go(-1);</script>"); exit; }}else{ $templatePath=$installPath."/template/default"; $p->set_file("file1","pm_del.html"); $p->parse("out","file1"); $p->p("out"); unset($p);}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -