$bclassid=$GLOBALS[navclassid];//取得本欄目id
//取得本欄目下的子欄目
?>
[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' order by `classid` desc ",7,24,0}]
<dl class="lbox">
<?php
//這里是取得該分類下的有圖片的最新數(shù)據(jù)
$commbook=$empire->fetch1("select title,titlepic,smalltext,titleurl,keyboard,groupid,classid,newspath,filename,id from {$dbtbpre}ecms_news where classid = ".$bqr[classid]." and titlepic!='' order by newstime desc limit 1");
$commbookurl=sys_ReturnBqTitleLink($commbook);
?>
<dt>
<h5><a href="<?=$public_r[newsurl].$bqr[classpath]?>"><?=$bqr[classname]?></a></h5>
<span class="more"><a href="<?=$public_r[newsurl].$bqr[classpath]?>">更多</a></span></dt>
<dd>
<ul class="list">
<li class="p1"><a href="<?=$commbookurl?>" target="_blank"><img src="<?=$commbook[titlepic]?>"></a><a href="<?=$commbookurl?>" target="_blank"><?=esub($commbook[title],28)?></a>
<p><?=esub($commbook[smalltext],64)?>...</p>
</li>
<?php
//取得該分類下的最新數(shù)據(jù)
$newbook=$empire->query("select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from {$dbtbpre}ecms_news where classid =".$bqr[classid]." order by newstime desc limit 5");
while($r=$empire->fetch($newbook)) {
?>
<li><a href="<?=sys_ReturnBqTitleLink($r)?>" title="<?=$r[title]?>"><?=$r[title]?></a><span><?=date('Y-m-d',$r[newstime])?></span></li>
<?php
}
//顯示5條
?>
</ul>
</dd>
</dl>
[/e:loop]</pre>
文章轉(zhuǎn)自:黎青松SEO博客
來源地址:http://www.alitaohuo.com/CMSjiaocheng/diguojiaocheng/1855.html
申請創(chuàng)業(yè)報道,分享創(chuàng)業(yè)好點子。點擊此處,共同探討創(chuàng)業(yè)新機遇!