请问AND t.displayorder>=0加在index.php哪里?
我的代码是这样的
复制内容到剪贴板
代码:
/////////////////////////////////////////////////////////////首页热门贴
//今日发贴排行
$tomonth=date(n);
$todate=date(j);
$toyear=date(Y);
$time=mktime(0,0,0,$tomonth,$todate,$toyear);
$query=$db->query("select count(pid) as num,authorid,author from $tablepre"."posts where dateline>=$time group by authorid order by num desc limit 0,11");
while($result=$db->fetch_array($query)){
$poststar.="<a href=viewpro.php?uid=".$result[authorid].">".$result[author]."</a> (<font color=red>".$result[num]."</font>)<br>";
}
//今日发贴排行
$hack_subject_len=80; //每个标题最多显示得字数
$hack_subject_num=10; //需要显示记录数
$hack_newthreads_threadlist = array();
$thread = array();
//最新贴
$query = $db->query("SELECT dateline,tid,subject,author,views,replies,lastpost,lastposter FROM {$tablepre}threads WHERE fid ORDER BY dateline DESC LIMIT 0, $hack_subject_num");
while($thread = $db->fetch_array($query)) {
$thread['forumname'] = $thread['name'];
$thread['date']= gmdate("$dateformat $timeformat", $thread['dateline'] + $timeoffset * 3600);
$thread['lastreplytime']= gmdate("$dateformat $timeformat", $thread[lastpost] + ($timeoffset * 3600));
$thread[subject0]=$thread[subject];
$thread['subject'] = cutstr($thread['subject'], $hack_subject_len);
$hack_newthreads_threadlist[] = $thread;
}
//最新贴
$threadview = $threadreply = array();
//最新回复
$query = $db->query("SELECT dateline,tid,subject,author,views,replies,lastpost,lastposter FROM {$tablepre}threads WHERE fid AND replies ORDER BY lastpost DESC LIMIT 0, $hack_subject_num");
while($thread = $db->fetch_array($query)) {
$thread[subject0]=$thread[subject];
$thread['forumname'] = $thread['name'];
$thread['date']= gmdate("$dateformat $timeformat", $thread['dateline'] + $timeoffset * 3600);
$thread['lastreplytime']= gmdate("$dateformat $timeformat", $thread[lastpost] + ($timeoffset * 3600));
$thread[subject] = cutstr($thread[subject], $hack_subject_len);
$threadreply[] = $thread;
}
//最新回复
///////////////////////////////////////////////////////////////////首页热门贴