📄 postsearch.php
字号:
<?php
include'include/begin.php';
include'include/p_begin.php';
include language();
$pagename_m = $_pagename[20];
$tpl_html = 'postsearch';
include 'include/main.php';
$author = $_GET['author'];
userp1();
if (!$userp1[7]) {
echoerror(58);
}
if ($_GET['type'] == 'post' && $userp2[4]) {
while (list(, $val) = @each($_POST["del"])) {
if ($val) {
$result = mysql_query("select * from {$db_prefix}title where cid='$val'", $myconn);
if ($row = mysql_fetch_array($result)) {
mysql_query("update {$db_prefix}title set state='0' where cid='$val'", $myconn);
} else {
@mysql_query("update {$db_prefix}posts set state='0' where id='$val'", $myconn);
}
}
}
if (!empty($_POST['checkbox']) && ($_POST['select'] == 1 || $_POST['select'] == 2 || $_POST['select'] == 3)) {
$_POST['select2'] = (int)$_POST['select2'];
$_POST['textfield'] = (int)$_POST['textfield'];
$_POST['radiobutton'] = (int)$_POST['radiobutton'];
$sql = "fid='$_POST[select2]' && ";
if ($_POST['select2'] == 0)
$sql = "" ;
$timeso = $time - $_POST['textfield'] * $_POST['radiobutton'];
if ($_POST["select"] == 1 || $_POST["select"] == 2) {
@mysql_query("update {$db_prefix}title set state='0' where $sql author='$_POST[author]' && state>'0' && posttime>'$timeso'" , $myconn);
@unlink('./cache/new.twt');
}
if ($_POST['select'] == 1 || $_POST['select'] == 3) {
$result = mysql_query("select * from {$db_prefix}posts where author='$_POST[author]' && state>'0' && posttime>'$timeso'" , $myconn);
while ($row = mysql_fetch_array($result)) {
if ($row['id'] != $row['tid']) {
if ($sql == '') {
mysql_query("update {$db_prefix}posts set state='0' where id='$row[id]'", $myconn);
} else {
$result2 = mysql_query("select * from {$db_prefix}title where $sql cid='$row[tid]'", $myconn);
if (mysql_fetch_array($result2)) {
mysql_query("update {$db_prefix}posts set state='0' where id='$row[id]'", $myconn);
}
}
}
}
}
}
echoioy(23);
}
$_GET['page'] = (int)$_GET['page'];
$_GET['page'] = $_GET['page'] > 0?$_GET['page']: 1;
$list_l = ($_GET['page']-1) * $treadnum;
$treadtl = 2 * $treadnum + 1;
$result = mysql_query("select * from {$db_prefix}posts where author='$author' ORDER BY posttime DESC LIMIT $list_l,$treadtl", $myconn);
if ($numpage = mysql_num_rows($result)) {
if ($numpage > $treadnum * 2) {
$pagenum = $_GET['page'] + 2;
} else if ($numpage > $treadnum) {
$pagenum = $_GET['page'] + 1;
} else {
$pagenum = $_GET['page'];
}
$pagelist = p_page();
$clear = $userp2[4]?'' : 'disabled="disabled"';
for($i = 0;$i < $treadnum && $row = mysql_fetch_array($result);$i++) {
$cid = $row['id'] == $row['tid']?$row['id']: $row['tid'];
$result2 = mysql_query("select * from {$db_prefix}title where cid='$cid'", $myconn);
$trow = mysql_fetch_array($result2);
$row['content'] = substrs(Chop($row['content']), 30);
$_type = $row['id'] == $row['tid']?$_p_p_tread[0]: $_p_p_tread[1];
if ($row['id'] != $row['tid']) {
if ($row['state'] == 0) {
$_type .= '[' . $_p_p_tread[2] . ']';
}
} else {
if ($trow['state'] == 0) {
$_type .= '[' . $_p_p_tread[2] . ']';
}
}
$tread = array('m' => $i + 1, '_title' => $trow['html']?$trow['title']: htmlspecialchars($trow['title']), '_type' => $_type, 'cid' => $trow['cid'], 'content' => $row['content'], 'author' => $trow['author'], 'posttime' => echotime($row['posttime']),);
$jjx1 .= tpl_fun_jjx1(array($tread, 'forumname' => $forumnames[$trow['fid']], 'id' => $row['id'], 'clear' => $clear));
}
}
if ($userp2[4]) {
while (list(, $val) = @each($aup)) {
if ($val) {
while (list(, $val2) = @each($bup[$val])) {
$_list .= '<option value="' . $val2 . '">' . $forumnames[$val2] . '</option>';
if ($val2) {
while (list(, $val3) = @each($cup[$val2])) {
if ($val3) {
$_list .= '<option value="' . $val3 . '">鈹
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -