?? tread.php
字號:
<?php
include'include/begin.php';
include'include/tread.php';
$tp3 = array(15, 16);
$tpl_html = 'tread';
$fid =$hid= $_GET['fid'];
$_GET['type']=(int)$_GET['type'];
$_GET['tpage'] = (int)$_GET['tpage'];
if ($_GET['tpage']<1) $_GET['tpage']++;
forumpurview();
include language();
$pagename_m = $_pagename[10];
$pagename_n = $forumnames[$fid];
if (!$userp3[14]) {
echoerror(120);
}
unset($down3, $up3, $up, $down, $typename);
if (!file_exists('cache/updown.php')) {
funupdown();
clearstatcache();
}
include'cache/updown.php';
if (!file_exists('cache/forums_c_' . $fid . '.php')) {
forums_c();
clearstatcache();
}
include'cache/forums_c_' . $fid . '.php';
include'include/main.php';
$subcolora = array('', 'skyblue', 'royalblue', 'blue', 'darkblue', 'orange', 'orangered', 'crimson', 'red', 'firebrick', 'darkred', 'green', 'limegreen', 'seagreen', 'teal', 'deeppink', 'tomato', 'coral', 'purple', 'indigo', 'burlywood', 'sandybrown', 'sienna', 'chocolate', 'silver');
if (file_exists('cache/plad_' . $fid . '.php')) {
include 'cache/plad_' . $fid . '.php';
$play = $text;
} else {
$forumresult = mysql_query("select placard from {$db_prefix}forums where fid='$fid'", $myconn);
$forumrow = mysql_fetch_array($forumresult);
$content = $forumrow['placard'];
sj($content, 'plad_' . $fid, $time);
$play = $content;
}
if (SERVER_GHO) $play = str_replace('WEBURL', SERVER_NAME, $play);
if ($play != '') $tpl_pm = $e_play = '';
unset($udlist);
if ($_GET['type']==0) {
if ($_GET['tpage'] == 1) {
$uparray = array_merge((array)$up3, (array)$up[$bbsmessage[0]], (array)$up[$bbsmessage[1]], (array)$up[$fid]);
$downarray = array_merge((array)$down3, (array)$down[$bbsmessage[0]], (array)$down[$bbsmessage[1]], (array)$down[$fid]);
$udarray = array_merge((array)$uparray, (array)$downarray);
while (list(, $postid) = @each($udarray)) {
$postid?$udlist[] = "id='$postid'":null;
}
if (is_array($udlist)) {
$udlist = implode(' || ', $udlist);
}
} else {
unset($uparray, $downarray);
}
$i = 2;
$sqllist = 'updown=0';
$subjectnum = $postsnum_;
unset($urlco);
} else {
if ($_GET['type'] == 1) {
$defselected[1] = 'selected';
$i = 1;
$sqllist = 'elite=1';
$subjectnum = $elite_;
} else if ($_GET['type'] == 3) {
$defselected[0] = 'selected';
$i = 1;
$sqllist = "state=0";
$subjectnum = $state_0;
} else if ($_GET['type'] == 2) {
$defselected[2] = 'selected';
$i = 1;
$sqllist = 'locks=1';
$subjectnum = $state_2;
} else {
echoerror(10);
}
}
$pagelist = thpage();
$list_l = ($_GET['tpage']-1) * $treadnum;
$postnum = $treadnum + 1;
$jjxup = '';
$jjxdown = '';
$jjx = '';
$m = 0;
for(;$i > 0;$i--) {
if ($udlist) {
$result = mysql_query("select * from {$db_prefix}title where $udlist", $myconn);
unset($udlist);
} else {
$result = mysql_query("select * from {$db_prefix}title where fid='$fid' && $sqllist ORDER BY lastposttime DESC LIMIT $list_l,$postnum" , $myconn);
$i = 0;
$mynum = mysql_num_rows($result);
if ((($mynum == 0 && $_GET['tpage'] > 1) || ($_GET['tpage'] == $pagenum && $mynum > $treadnum)) && $time_ + 60 < $time) {
forums_c();
jumpurl('tread.php?fid=' . $fid . '&type=' . $_GET['type']);
exit;
}
}
if ($pagenum < 1) {
$pagenum = 1;
}
$ifm = 0;
while ($row = mysql_fetch_array($result)) {
if ($ifm >= $treadnum) {
break;
}
$ifm++;
$ispage = ceil($row['replies'] / $headnum);
$tread = array('fid'=>$fid,'cid' => $row['cid'], 'ispage' => $ispage, 'page' => $ispage > 1?'' : 'display: none', 'moneyecho' => $row['money']?'' : 'display: none', 'elite' => $row['elite']?'' : 'display: none', 'state' => $row['state'], 'updownecho' => $row['updown']?'' : 'display: none', 'updown' => $row['updown'], '_updown' => $_p_tread[$row['updown']], 'author' => $row['author'], 'url_author' => urlencode($row["author"]), 'replies' => $row['replies'], 'hits' => $row['hits'], 'posttime' => echotime($row['posttime']), 'postnew' => ($time - $row["posttime"] < $tnew)?"" : "display: none", 'money' => $row['money'],);
if ($row['html']) {
$link = tpl_fun_jjx3(array('href' => REWRIT_E?'read-' . $row['cid'] . '-' . $_GET['type'] . '-' . $fid . '-'.$_GET['tpage'] . '-1.html':'read.php?tid='.$row['cid'].'&type='.$_GET['type'].'&hid='.$fid.'&tpage='.$_GET['tpage'], 'title' => $row['title'], 'alt' => htmlspecialchars($row['title']), 'lastcontent' => htmlspecialchars($row['lastcontent']), 'lastposter' => $row['lastposter'], 'lastposttime' => $row['replies']>0?echotime($row['lastposttime']):''));
} else {
$link = tpl_fun_jjx2(array('href' => REWRIT_E?'read-' . $row['cid'] . '-' . $_GET['type'] . '-' . $fid . '-'.$_GET['tpage'] . '-1.html':'read.php?tid='.$row['cid'].'&type='.$_GET['type'].'&hid='.$fid.'&tpage='.$_GET['tpage'], 'title' => '<font color="' . $subcolora[$row['titlefont']] . '">' . substrs($row['title'], $styletitle_l[$style_id] - ($row['updown']?4 : 0)) . '</font>', 'alt' => htmlspecialchars($row['title']), 'lastcontent' => htmlspecialchars($row['lastcontent']), 'lastposter' => $row['lastposter'], 'lastposttime' => $row['replies']>0?echotime($row['lastposttime']):''));
}
if (@in_array($row['id'], $uparray)) {
$code = 'up';
$mt = 0;
} else if (@in_array($row['id'], $downarray)) {
$code = 'down';
$mt = 0;
} else {
$code = '';
$mt = ++$m;
} ;
${jjx.$code} .= tpl_fun_jjx1(array($tread, 'm' => $mt, 'jjx2' => $link, 'templatedir' => $templatedir,'lastposter' => $row['lastposter'],'tpage'=>$_GET['tpage'],'type'=>$_GET['type']));
}
}
$adminlist = '';
while (list(, $val) = each($f_admin)) {
$adminlist .= "<a href=\"showuser.php?username=$val\" title=\"\">$val</a> ";
}
$jjx1 = $jjxup . $jjx . $jjxdown;
$pageh = $pagenum > 1?'' : 'display: none;';
include_once'./cache/template/m_' . $style_id . '_' . $tpl_html . '.php';
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -