<!--BBS几个板块中的置顶贴------------------------------------------>
<br /><b>BBS几个板块中的置顶贴</b><br />
{get dbsource="bbs" sql="SELECT * FROM `cdb_posts` a, `cdb_threads` b WHERE a.tid=b.tid AND b.displayorder=1 AND a.`fid` in (1,2)" rows="10" }
<a href="http://www.sn.la/viewthread.php?tid={$r[tid]}">{$r[subject]}</a><br />
{/get}
{get dbsource="bbs" sql="SELECT * FROM `cdb_posts` a, `cdb_threads` b WHERE a.tid=b.tid AND b.displayorder=2 AND a.`fid` in (1,2)" rows="10" }
<a href="http://www.sn.la/viewthread.php?tid={$r[tid]}">{$r[subject]}</a><br />
{/get}
{get dbsource="bbs" sql="SELECT * FROM `cdb_posts` a, `cdb_threads` b WHERE a.tid=b.tid AND b.displayorder=3 AND a.`fid` in (1,2)" rows="10" }
<a href="http://www.sn.la/viewthread.php?tid={$r[tid]}">{$r[subject]}</a><br />
{/get}
<!--BBS几个板块中有附件的贴子------------------------------------------>
<br /><b>BBS几个板块中有附件的贴子</b><br />
{get dbsource="bbs" sql="SELECT * FROM `cdb_posts` a, `cdb_threads` b, `cdb_attachments` c WHERE a.tid=b.tid AND b.tid=c.tid" rows="10" }
<a href="http://www.sn.la/viewthread.php?tid={$r[tid]}">{$r[subject]}</a><imgsrc="http://www.sn.la/attachments/{$r[attachment]}" ><br />
{/get}
<!--BBS最后10个公告------------------------------------------>
<br /><b>BBS最后10个公告</b><br />
{get dbsource="bbs" sql="SELECT * FROM `cdb_announcements` ORDER BY id DESC" rows="10" }
<a href="http://www.sn.la/announcement.php?id={$r[id]}">{$r[subject]}</a>
{/get}
<!--BBS里一天的回复最多的帖子------------------------------------------>
<br /><b>BBS里一天的回复最多的帖子</b><br />
{php $daytime = time() - (24 * 60 * 60)}
{get dbsource="bbs" sql="SELECT * FROM `cdb_posts` a, `cdb_threads` b WHERE a.tid=b.tid AND b.dateline>$daytime ORDER BY b.replies DESC" rows="10" }
<a href="http://www.sn.la/announcement.php?id={$r[tid]}">{$r[subject]}</a>{date('Y-m-d', $r[dateline])}
{/get}
<!--BBS里三天的回复最多的帖子------------------------------------------>
<b>BBS里三天的回复最多的帖子</b><br />
{php $threetime = time() - (3 * 24 * 60 * 60)}
{get dbsource="bbs" sql="SELECT * FROM `cdb_posts` a, `cdb_threads` b WHERE a.tid=b.tid AND b.dateline>$threetime ORDER BY b.replies DESC" rows="10" }
<a href="http://www.sn.la/announcement.php?id={$r[tid]}">{$r[subject]}</a>{date('Y-m-d', $r[dateline])}
{/get}
<!--BBS里七天的回复最多的帖子------------------------------------------>
<br /><b>BBS里七天的回复最多的帖子</b><br />
{php $weektime = time() - (7 * 24 * 60 * 60)}
{get dbsource="bbs" sql="SELECT * FROM `cdb_posts` a, `cdb_threads` b WHERE a.tid=b.tid AND b.dateline>$weektime ORDER BY b.replies DESC" rows="10" }
<a href="http://www.sn.la/announcement.php?id={$r[tid]}">{$r[subject]}</a>{date('Y-m-d', $r[dateline])}
{/get}
<!--BBS里一个月的回复最多的帖子------------------------------------------>
<br /><b>BBS里七天的回复最多的帖子</b><br />
{php $mouthtime = time() - (30 * 24 * 60 * 60)}
{get dbsource="bbs" sql="SELECT * FROM `cdb_posts` a, `cdb_threads` b WHERE a.tid=b.tid AND b.dateline>$mouthtime ORDER BY b.replies DESC" rows="10" }
<a href="http://www.sn.la/announcement.php?id={$r[tid]}">{$r[subject]}</a>{date('Y-m-d', $r[dateline])}
{/get}
正文
phpcmsV9用get调用论坛帖子方法
声明:本站所有文章均来自网络用户投稿,需要消费、投资的项目请注意识别真伪,本站只负责信息刊登,不提供内容鉴别及纠纷问题。投稿内容若侵犯了您的权益请及时联系客服删除。