什么也不说,直接上代码,学习使用cms/ target=_blank class=infotextkey>帝国cms的灵动标签。
代码如下:
复制代码 代码示例:
[e:loop={'select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid in ($class_r[$GLOBALS[navclassid]][bclassid]) order by `classid` desc limit
10',10,24,0}]
//取得父栏目下的子栏目
<?php
$commbook=$empire->fetch1("select title,titlepic,smalltext,titleurl,keyboard,groupid,classid,newspath,filename,id from {$dbtbpre}数据表 where classid =
'".$bqr[classid]."' and isgood = '1' limit 1");
$commbookurl=sys_ReturnBqTitleLink($commbook);
//这里是取得该分类下的推荐数据
?>
<div class="bookcontent">
<h3><strong><?=$bqr[classname]?></strong><a href="<?=$public_r[newsurl].$bqr[classpath]?>/">更多</a></h3>
<dl>
<dd class="img">
<a href="<?=$commbookurl?>"><img src="<?=$public_r[newsurl].$commbook[titlepic]?>" alt="<?=$commbook[title]?>" /></a>
</dd>
<dt><a href="<?=$commbookurl?>"><?=$commbook[title]?></a></dt>
<dd class="intro"><?=esub($commbook[smalltext],84)?></dd>
</dl>
<ul>
<?php
$newbook=$empire->query("select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from {$dbtbpre}数据表 where classid =
'".$bqr[classid]."' order by newstime desc limit 6");
//取得该分类下的最新数据
while($r=$empire->fetch($newbook)) {
?>
<li><a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>"><?=<?=$r[title]?></a></li>
<?php
}
//显示6条
?>
</ul>
</div>
[/e:loop]