帝国cms首页循环调用子栏目文章
帝国cms首页循环调用子栏目文章
[e:loop={"select classid, classname, classpath from phome_enewsclass where bclassid='$bclassid' order by classid desc",21,24,0}]
<div class="partwrap" <?php $i++;if($i%3==0){echo 'id="mlr10"';} ?>>
<div class="p-title"><b><a href="<?=$public_r[newsurl].$bqr[classpath]?>"><?=$bqr[classname]?></a></b><a href="<?=$public_r[newsurl].$bqr[classpath]?>">更多>></a></div>
<dl>
<?php
//取得该分类下有图片的最新数据
$newbook=$empire->query("select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from phome_ecms_news where classid =".$bqr[classid]." and ispic!='' order by newstime desc limit 1");
while($r=$empire->fetch($newbook)) {
?>
<dt><img src="<?=$r[titlepic]?>" alt="<?=$r[title]?>" width="80" height="63" /><b><a href="<?=sys_ReturnBqTitleLink($r)?>"><?=esub($r[title],26)?></a></b><p><?=esub($r[smalltext],54)?>...<a href="<?=sys_ReturnBqTitleLink($r)?>">[详细]</a></p>
</dt>
<?php
}
?>
<?php
//取得该分类下的最新数据
$newbook=$empire->query("select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from phome_ecms_news where classid =".$bqr[classid]." order by newstime desc limit 1,5");
while($r=$empire->fetch($newbook)) {
?>
<dd><a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>"><?=esub($r[title],40)?></a></dd>
<?php
}
?>
</dl>
</div>
[/e:loop]
嗯 下载看看
fuzhou评论Re:帝国cms首页循环调用子栏目文章
希望这个是我要的 否则回来骂你
pangzig评论Re:帝国cms首页循环调用子栏目文章