<?php $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]
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 帝國cms靈動(dòng)標(biāo)簽實(shí)現(xiàn)循環(huán)子欄目數(shù)據(jù)