帝国CMS用PHP调用栏目导航标签并高亮简单版

COS、CDN
<?php $sql = $empire->query("select classid,sonclass,classname,islast,islist from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,myorder asc"); while ($s = $empire->fetch($sql)) {     $classurl = sys_ReturnBqClassname($s, 9);     $tclass = "";     $fr = explode('|', $class_r[$GLOBALS['navclassid']]['featherclass']);     $topbclassid = $fr[1] ? $fr[1] : $GLOBALS['navclassid'];     if ($topbclassid == $s['classid']) {         $tclass = 'current-menu-item';     } ?> <li class="<?=$tclass?>">     <a href="<?=$classurl?>"><?=$s['classname']?></a> <?php     if ($s['islast'] == 0) { ?>     <ul class="sub-menu"> <?php         $sql2 = $empire->query("select classid,classname from {$dbtbpre}enewsclass where bclassid={$s['classid']} and showclass=0 order by myorder,myorder asc");         while ($s2 = $empire->fetch($sql2)) {             $classurl2 = sys_ReturnBqClassname($s2, 9); ?>         <li><a href="<?=$classurl2?>"><?=$s2['classname']?></a></li> <?php         } ?>     </ul> <?php     } ?> </li> <?php } ?>

 

COS、CDN
热门