📄 p_recycle.php
字号:
<?php
include"include/begin.php";
include"include/p_begin.php";
$tpl_html = 'p_recycle';
$reurl='p_recycle.php';
$fid =(int)$_GET['fid'];
if ($fid>0) {
forumpurview();
$reurl='p_recycle.php?fid='.$fid;
if (!$userp3[18] && !$userp2[4]) {
echoerror(55);
}
include language();
$pagename_m = $_pagename[27];
include'include/main.php';
} else {
if (!$userp2[4]) {
echoerror(55);
}
$fid = null;
include language();
$pagename_m = $_pagename[28];
include'include/main.php';
}
if ($_GET['type'] == 'post') {
if ($fid) {
$fidwhere = "fid='$fid' &&";
} else {
$fidwhere = '';
}
$delxml = false;
if (is_array($_POST["re"]) && $_POST["type"] == 1) {
while (list(, $val) = @each($_POST["re"])) {
$result = mysql_query("select wid,fid,title,html from {$db_prefix}title where $fidwhere cid='$val' && state<1" , $myconn);
if ($row = mysql_fetch_array($result)) {
if ($row['thumb'] > 0) {
$defxml = true;
}
mysql_query("update {$db_prefix}title set state='1' where cid='$val'", $myconn);
}
}
event(0, 12, 0, '');
}
if (is_array($_POST["re"]) && $_POST["type"] == 0 && $userp2[4]) {
while (list(, $val) = @each($_POST["re"])) {
$result = mysql_query("select * from {$db_prefix}title where cid='$val' && state=0", $myconn);
if ($row = mysql_fetch_array($result)) {
if ($row['thumb'] > 0) {
$defxml = true;
unthumb($val);
}
$result2 = mysql_query("select sign,annex from {$db_prefix}posts where tid='$val'", $myconn);
while (list($sign, $annex) = mysql_fetch_array($result2)) {
if ($annex) {
$result3 = mysql_query("select * from {$db_prefix}annex where sign='$sign'", $myconn);
while ($annexrow = mysql_fetch_array($result3)) {
if ($annexrow["code"] == "file") {
@unlink("$softdir/uploads/$annexrow[content]");
}
}
mysql_query("delete from {$db_prefix}annex where sign='$sign'", $myconn);
}
}
mysql_query("delete from {$db_prefix}title where cid='$val'", $myconn);
mysql_query("delete from {$db_prefix}posts where tid='$val'", $myconn);
if ($row["updown"]) {
@unlink("./cache/updown.php");
}
}
}
event(0, 20, 0, '');
}
if (!empty($_POST["checkbox"]) && $userp2[4]) {
$result = mysql_query("select * from {$db_prefix}title where state=0", $myconn);
while ($row = mysql_fetch_array($result)) {
$val = $row["cid"];
if ($row['thumb'] > 0) {
$defxml = true;
unthumb($val);
}
$result2 = mysql_query("select sign,annex from {$db_prefix}posts where tid='$val'", $myconn);
while (list($sign, $annex) = mysql_fetch_array($result2)) {
if ($annex) {
$result3 = mysql_query("select * from {$db_prefix}annex where sign='$sign'", $myconn);
while ($annexrow = mysql_fetch_array($result3)) {
if ($annexrow["code"] == "file") {
@unlink("$softdir/uploads/$annexrow[content]");
}
}
mysql_query("delete from {$db_prefix}annex where sign='$sign'", $myconn);
}
}
mysql_query("delete from {$db_prefix}title where cid='$val'", $myconn);
mysql_query("delete from {$db_prefix}posts where tid='$val'", $myconn);
if ($row["updown"]) {
@unlink("./cache/updown.php");
}
}
event(0, 20, 0, '');
}
if (!empty($_POST["checkbox2"]) && $userp2[4]) {
$result = mysql_query("select id,sign,annex from {$db_prefix}posts where state=0", $myconn);
while (list($id, $sign, $annex) = mysql_fetch_array($result)) {
if ($annex) {
$result2 = mysql_query("select * from {$db_prefix}annex where sign='$sign'", $myconn);
while ($annexrow = mysql_fetch_array($result2)) {
if ($annexrow["code"] == "file") {
@unlink("$softdir/uploads/$annexrow[content]");
}
}
mysql_query("delete from {$db_prefix}annex where sign='$sign'", $myconn);
}
mysql_query("delete from {$db_prefix}posts where id='$id'", $myconn);
}
event(0, 21, 0, '');
}
if ($defxml == true) {
@unlink('cache/new.twt');
}
echoioy(20);
}
$swhere = $fid?"fid='$fid' &&" : null;
$result = mysql_query("select * from {$db_prefix}title where $swhere state<1 ORDER BY posttime DESC", $myconn);
if ($numpage = mysql_num_rows($result)) {
$pagenum = ceil($numpage / $treadnum);
$_GET['page'] = is_numeric($_GET['page']) && $_GET['page'] > 0?$_GET['page']: 1;
if ($_GET['page'] > $pagenum) {
$_GET['page'] = $pagenum;
}
$pagelist = p_page();
$seeknum = $_GET['page'] == 1?0 : ($_GET['page']-1) * $treadnum;
mysql_data_seek($result, $seeknum);
for($i = 0;$i < $treadnum && $row = mysql_fetch_array($result);$i++) {
$tread = array('m' => $i + 1, 'cid' => $row['cid'], 'title' => "<a href='".($row['fid']==0?'v':'')."read.php?tid=$row[cid]'>" . substrs($row['title'], $styletitle_l[$style_id]) . '</a>', 'author' => $row['author'], 'forum' => isset($whype[$row['wid']])?$wname[$row['wid']]:$forumnames[$row['fid']], 'replies' => $row['replies'], 'hits' => $row['hits'], 'postdate' => echodate($row['posttime']), 'posttime' => echotime($row['posttime']), 'readonly' => '',);
$jjx1 .= tpl_fun_jjx1(array($tread));
}
}
$recho = $userp2[4]?'' : 'display: none;';
$pageh = $pagenum > 1?'' : '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 + -