📄 wread.php
字号:
<?php
include'include/begin.php';
include'include/wread.php';
$tp3 = array(20,21);
$tpl_html = 'wread';
$wid = (int)$_GET['wid'];
$k = 0;
if (isset($whype[$wid])) {
$menufile = 'wmenu' . $wid;
wstyle($t4[$wid]);
include language();
include'include/main.php';
$pagename_n = $wname[$wid];
$pagename_m = $_pagename[10];
$webnav=$wups[$wid]>0?$wname[$wups[$wid]]:$wname[$wid];
} else {
echoerror(70);
}
$lmenu_t = $wups[$wid]>0?$wups[$wid]:$wid;
$_GET['page']=(int)$_GET['page'];
if ($_GET['page']<1) $_GET['page']=1;
if (!file_exists("cache/wtitlec_$wid.php"
)) {
$result = mysql_query("SELECT COUNT(1) FROM {$db_prefix}title WHERE wid='$wid' && state>0 ", $myconn);
$row = mysql_fetch_array($result);
$num = $row[0];
$fp = fopen('cache/wtitlec_' . $wid . '.php', 'w');
fwrite($fp, "<?php\n\$wtitlenum='$num';\n\$wtitletime='$time';\n
?>");
fclose($fp);
clearstatcache();
}
include"cache/wtitlec_$wid.php";
$pagelist = wreadpage();
$list_l = ($_GET['page']-1) * $treadnum;
$titlenum = $treadnum + 1;
$result = mysql_query("select *,{$db_prefix}posts.html as phtml from {$db_prefix}title,{$db_prefix}posts where {$db_prefix}title.wid='$wid' && {$db_prefix}title.state>0 && {$db_prefix}title.cid={$db_prefix}posts.id ORDER BY {$db_prefix}title.posttimeup DESC LIMIT $list_l,$titlenum", $myconn);
$k = 0;
$m = $wtitlenum - ($_GET['page']-1) * $treadnum;
while ($row = mysql_fetch_array($result)) {
if ($k == $treadnum) {
if ($_GET['page'] == $numpage) {
@unlink('cache/wtitlec_$wid.php');
jumpurl("wread.php?wid=$wid&page=$_GET[page]");
}
break;
}
$k++;
$title = $row['html']?strip_tags($row['title']):$row['title'];
$titlea = array(
'id' => $row['cid'],
'title' => $title,
'thumbh'=>$row['thumb']>0?'':'display: none;',
'thumb' => $softdir . '/thumbs/' . floor($row['cid'] / 10000) . '/' . $row['cid'] . '.jpg',
'author' => $row['author'],
'wauthor' => $row['wauthor'],
'wadmin' => $row['wadmin'],
'posttimeup' => echotime($row['posttimeup']),
'posttime' => echotime($row['posttime']),
'hits' => $row['hits'],
'wtitle' => preg_replace("/\[ax([0-9]+)\]/i", $_p_wread[0], substrs(content($row['content']), 200)),
);
$jjx3 .= tpl_fun_jjx3($titlea);
}
if ($k != $m) {
@unlink('cache/wtitlec_' . $wid . '.php');
jumpurl("wread.php?wid=$wid&page=$_GET[page]");
}
$fid = '';
$pecho=$userp2[9]?'':'display: none;';
$pageh = $numpage > 1?'' : 'display: none;';
include_once './cache/template/m_' . $style_id . '_' . $tpl_html . '.php';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -