<?
$sql=$empire->query("select classid,classname,infos from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,classid asc");
$bqno=0;
while($bqr=$empire->fetch($sql)){
$bqsr=sys_ReturnEcmsLoopStext($bqr);
$bqno++;
?>
<!-- 大栏目名 -->
<?=$bqr[classname]?>
<!-- 大栏目信息数 -->
<?=$bqr[infos]?>
<?
$sql2=$empire->query("select classid,classname,infos from {$dbtbpre}enewsclass where bclassid=$bqr[classid] and showclass=0 order by myorder,classid asc");
while($bqr2=$empire->fetch($sql2)){
$bqsr2=sys_ReturnEcmsLoopStext($bqr2);
?>
<!-- 小栏目名 -->
<?=$bqr2[classname]?>
<!-- 小栏目信息数 -->
<?=$bqr2[infos]?>
<!-- 子栏目信息列表,不需要就删除 -->
<ul>
<?
$sql3=$empire->query("select title,titleurl,newstime from {$dbtbpre}ecms_news where classid=$bqr2[classid] order by id desc limit 10");
while($bqr3=$empire->fetch($sql3)){
$bqsr3=sys_ReturnEcmsLoopStext($bqr3);
?>
<span><?=date('m-d',$bqr3[newstime])?></span><a href="<?=$bqr3[titleurl]?>" target="_blank" title="<?=$bqr3[title]?>"><?=esub($bqr3[title],36)?>...</a>
<?
}
?>
</ul>
<?
}
?>
<!-- 子栏目信息列表,不需要就删除 -->
<?
}
?>
可以显示指定表名,如news表
select classid,classname,infos from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 and tbname='news' order by myorder,classid asc