[e:loop={"select classid,classname,islast from {$dbtbpre}enewsclass where bclassid='0' and showclass=0 order by myorder,classid asc limit 11",0,24,0}]
query("select classid,classname,sonclass,featherclass,islast from {$dbtbpre}enewsclass");
while($arr2=$empire->fetch($arr1)){
$arr[]=$arr2['featherclass'];
}
$arr=implode(",",$arr); //获取所有父栏目的id
$zi='|'.$bqr[classid].'|'; //当前栏目id
if(strstr($arr,$zi)){ //判断当前栏目id如果属于父栏目数组,那么当前栏目就有子栏目
?>
query("select classid,classname from ".$dbtbpre."enewsclass where bclassid=".$bqr[classid]." and showclass=0 order by myorder,classid asc limit 11");
while($classr=$empire->fetch($newsclass))
{
$classrurl=sys_ReturnBqClassname($classr,9); //取得子栏目地址
?>
[e:loop={"select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid='$bclassid' and showclass=0 order by myorder,classid asc limit 11",5,24,0,0,0}]