原文来自:https://liye5.com/

<?php
    $fcr=explode('|',$class_r[$GLOBALS[navclassid]][featherclass]);
    $bclassid=$fcr[1]?$fcr[1]:$GLOBALS[navclassid];		//取得父栏目id
    $classurl=sys_ReturnBqClassname($r,9);
    ?>
<?php if($GLOBALS[navclassid]==1){$hover="current";}else{$hover="";} ?> //判断栏目ID为1的时候 class高亮
        <li class="<?=$hover?>"><div><a href="/duanzi/">全部</a></div></li>  /全部为父栏目时候高亮显示
        [e:loop={"select * from {$dbtbpre}enewsclass where bclassid='$class' ",0,24,0}]
         <li id="tid_curr_<?=$bqr[classid]?>" <?=($GLOBALS[navclassid]==$bqr[classid])?' class="current"':''?> ><div><a href="<?=$bqsr[classurl]?>"><?=$bqr[classname]?></a></div></li>
        [/e:loop]