网站首页
PHPCMS v9在首页调用最新评论及回复
发布时间:2015-03-16 10:20:26编辑:admin阅读()
-
{pc:get sql="SELECT * FROM `lzzit_comment_data_1` c,`lzzit_comment` p WHERE c.commentid=p.commentid ORDER BY c.creat_at,c.reply DESC" num="10"}
<div class="feedback_content">
{loop $data $r}
<dl>
<?php
$r[content] =preg_split('/<[^>]+>/iU',$r[content]);
$str = array_pop($r[content]);
?>
<dd>{$str}</dd>
<dt>来自{$r[username]}对新闻:<strong><a href="{$r[url]}" target="_blank">{$r[title]}</a></strong>的评论</dt>
</dl>
{/loop}
</div>
{/pc}