所有一级栏目遍历,如果有子栏目的话,遍历出来

遍历所有栏目,如果有二级栏目的话显示
[e:loop={"select classid,classname,islast,bname from {$dbtbpre}enewsclass where bclassid='0' order by myorder,classid ASC limit 11",0,24,0}]
      <?php $classurl=sys_ReturnBqClassname($bqr,9);?>
      <li <?php if($GLOBALS[navclassid] == $bqr[classid]) {echo  "class='addactive nLi'";}  ?> class="nLi">
        <a href="<?=$classurl?>"><?=$bqr[classname]?></a>
        <?php if(!$bqr[islast]) {?>
        <div class="navhide">
          <?php $newsclass=$empire->query("select classid,classname from ".$dbtbpre."enewsclass where bclassid=".$bqr[classid]." order by myorder,classid desc limit 11");while($classr=$empire->fetch($newsclass))    {  $classrurl=sys_ReturnBqClassname($classr,9);?>
          <a href="<?=$classrurl?>"><?=$classr[classname]?></a>
          <?php } ?>
        </div>
        <?php } ?>
      </li>
      [/e:loop]
12-29 14:49