📄 p_delete.php
字号:
<?php
include'include/begin.php';
include'include/p_begin.php';
$tpl_html = 'p_delete';
if (!$username) {
echoerror(62);
}
$id = (int)$_GET['id'];
$wid = (int)$_GET['wid'];
$p_result = mysql_query("select * from {$db_prefix}title where cid='$id'", $myconn);
if ($sub = mysql_fetch_array($p_result)) {
if ($wid>0){
$reurl = 'wread.php?wid='.$sub['wid'];
if (!$userp2[9]) {
echoerror(143);
}
if ($sub['thumb'] > 0) {
@unlink('cache/new.twt');
}
$wid = $sub['wid'];
if (isset($whype[$wid])) {
$menufile = 'wmenu' . $wid;
wstyle($t4[$wid]);
include language();
include'include/main.php';
$pagename_n = $wname[$wid];
$pagename_m = $_pagename[33];
$webnav=$wups[$wid]>0?$wname[$wups[$wid]]:$wname[$wid];
} else {
echoerror(70);
}
if ($sub['state'] > 0) {
$del = 1;
}
if (isset($_GET['post'])) {
$p_result = mysql_query("select * from {$db_prefix}posts where id='$id'", $myconn);
$post = mysql_fetch_array($p_result);
if ($sub['state'] > 0) {
if (isset($_POST["t"])) {
$readsig=$sub['fid']==0?'v':'';
$pmauthor = "[url=".$readsig."read.php?tid=$id]" . $_p_affair[0] . "[/url]:$_p_affair[11];";
message($sub['author'], $pmauthor);
}
if (isset($_POST['d'])) {
encouragement($sub['author'], $dvp, 0);
}
$review = "$time\t\t11|$post[review]";
commentary($id, $review, "");
event(0, 11, $id, "");
mysql_query("update {$db_prefix}title set state='0' where cid='$id'", $myconn);
echoioy(16);
} else {
if (isset($_POST["t"])) {
$readsig=$sub['fid']==0?'v':'';
$pmauthor = "[url=".$readsig."read.php?tid=$id]" . $_p_affair[0] . "[/url]:$_p_affair[12];";
message($sub['author'], $pmauthor);
}
if (isset($_POST["d"])) {
encouragement($sub['author'], $dvp, 1);
}
$review = "$time\t\t12|$post[review]";
commentary($id, $review, '');
event(0, 12, $id, "");
mysql_query("update {$db_prefix}title set state='1' where cid='$id'", $myconn);
echoioy(32);
}
}
}else{
if ($sub['thumb'] > 0) {
@unlink('cache/new.twt');
}
$fid = $sub['fid'];
forumpurview();
include language();
include'include/main.php';
$pagename_m = $_pagename[33];
$userp3[3]?null : echoerror(78);
if ($sub[elite] && !$userp3[21]) {
echoerror(2);
}
if ($sub[locks] && !$userp3[20]) {
echoerror(106);
}
if ($sub["updown"] == 1 && !$userp3[23]) {
echoerror(93);
}
if ($sub["updown"] == 2 && !$userp3[24]) {
echoerror(93);
}
if ($sub["updown"] == 3 && !$userp3[25]) {
echoerror(93);
}
if ($sub["updown"] == 4 && !$userp3[26]) {
echoerror(94);
}
if ($sub["updown"] == 5 && !$userp3[27]) {
echoerror(94);
}
if ($sub['updown'] == 6 && !$userp3[28]) {
echoerror(94);
}
if (!$userp3[18]) {
echoerror(91);
}
if ($sub['state'] > 0) {
$del = 1;
}
if (isset($_GET['post'])) {
$p_result = mysql_query("select * from {$db_prefix}posts where id='$id'", $myconn);
$post = mysql_fetch_array($p_result);
if ($sub["state"] > 0) {
if (isset($_POST["t"])) {
$pmauthor = "[url=read.php?tid=$id]" . $_p_affair[0] . "[/url]:$_p_affair[11];";
message($sub["author"], $pmauthor);
}
if (isset($_POST["d"
])) {
encouragement($sub['author'], $dvp, 0);
}
$review = "$time\t\t11|$post[review]";
commentary($id, $review, "");
event($fid, 11, $id, "");
mysql_query("update {$db_prefix}title set state='0' where cid='$id'", $myconn);
echoioy(16);
} else {
if (isset($_POST["t"])) {
$pmauthor = "[url=read.php?tid=$id]" . $_p_affair[0] . "[/url]:$_p_affair[12];";
message($sub["author"], $pmauthor);
}
if (isset($_POST["d"])) {
encouragement($sub["author"], $dvp, 1);
}
$review = "$time\t\t12|$post[review]";
commentary($id, $review, "");
event($fid, 12, $id, "");
mysql_query("update {$db_prefix}title set state='1' where cid='$id'", $myconn);
echoioy(32);
}
}
}
} else {
$p_result = mysql_query("select * from {$db_prefix}posts where id='$id'", $myconn);
$post = mysql_fetch_array($p_result);
$p_result = mysql_query("select * from {$db_prefix}title where cid='$post[tid]'", $myconn);
$sub = mysql_fetch_array($p_result);
$fid = $sub["fid"];
forumpurview();
include language();
include'include/main.php';
$userp3[3]?null : echoerror(78);
if (!$userp3[18]) {
echoerror(91);
}
if ($post["state"]) {
$del = 1;
}
if (isset($_GET['post'])) {
if ($post['state'] > 0) {
if (isset($_POST["t"])) {
$pmauthor = "[url=read.php?tid=$id]" . $_p_affair[0] . "[/url]:$_p_affair[11];";
message($post["author"], $pmauthor);
}
if (isset($_POST["d"
])) {
encouragement($post['author'], $dvp, 0);
}
$review = "$time\t\t11|$post[review]";
commentary($id, $review, "");
event($fid, 11, $id, "");
mysql_query("update {$db_prefix}posts set state='0' where id='$id'", $myconn);
echoioy(16);
} else {
if (isset($_POST["t"])) {
$pmauthor = "[url=read.php?tid=$id]" . $_p_affair[0] . "[/url]:$_p_affair[12];";
message($post["author"], $pmauthor);
}
if (isset($_POST["d"])) {
encouragement($post["author"], $dvp, 1);
}
$review = "$time\t\t12|$post[review]";
commentary($id, $review, "");
event($fid, 12, $id, "");
mysql_query("update {$db_prefix}posts set state='1' where id='$id'", $myconn);
echoioy(32);
}
}
}
$re = $un = '';
$del?$re = 'display: none;': $un = 'display: none;';
$_GET['type']=0;
$_GET['tpage']=1;
include_once './cache/template/m_' . $style_id . '_' . $tpl_html . '.php';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -