
帝国cms任意模板中调用留言,可只调用已审核的留言,也可不限制是否审核
代码如下:
<?
// bid为留言分类的ID,checked='0',0为已审核,1为未审核
$ sql =$empire->query("select * from {$dbtbpre}enewsgbook where bid='1' and checked= '0' order by lyid desc limit 8") ;
where ( $r= $empire -> fetch ($sql) )
{
$ lytext =strip_tags($r[ ‘lytext ’ ]) ;
echo ’<li><a href=‘/ e / tool / gbook /?bid=1 ’ > ‘ . $lytext .’</a></li>’;
}
人吐槽 | 人点赞 |
发表评论