帝国cms调用最新评论 带原文章标题链接
2020-04-10 站长 站长日志
帝国cms调用最新评论代码
首先调用最新10条评论,在调用当前信息的标题和链接<?php
$sql2
=
$empire
->query(
"select * from {$dbtbpre}enewspl_1 order by saytime desc limit 10"
);
while
(
$r2
=
$empire
->fetch(
$sql2
)){
$t2
=
$empire
->fetch1(
"select * from {$dbtbpre}ecms_news where id='$r2[id]' and classid='$r2[classid]'"
);
?>
<ul id=
"dt_list"
class
=
"dt_list"
>
<li><span><?=
date
(
'Y-m-d H:i:s'
,
$r2
[saytime])?></span><a
class
=
"link"
href=
"[!--news.url--]e/space/?userid=<?=$t2[userid]?>"
target=
"_blank"
><?=
$t2
[username]?></a> 回复了文章 <a
class
=
"key_word"
href=
"<?=$t2[titleurl]?>"
target=
"_blank"
><?=
$t2
[title]?></a></li>
</ul>
<?php
}
?>
上一篇:帝国CMS内容页调用当前发布会员
下一篇:帝国cms调用好友动态信息