帝国cms教程:帝国cms php代码实现无限级导航

 00H网页模板,帝国cms模板,网站模板免费下载,做网站首选站长魔吧

 帝国cms php代码实现无限级导航00H网页模板,帝国cms模板,网站模板免费下载,做网站首选站长魔吧

<?
        function daohang($bclassid=0)
        {
                global $empire,$dbtbpre,$public_r;
                      $sql=$empire->query("select * from  {$dbtbpre}enewsclass where bclassid=$bclassid order by myorder,classid");
                while($r=$empire->fetch($sql))
                {
                        $jclassURL=@sys_ReturnBqClassname($r,9);
                        $num = @ReturnClassInfoNum($r);            
                        if(empty($r['islast']))
                        {
                                echo '<ul>'.'<a href="'.$jclassURL.'">'.$r['classname'].'</a>'.'('.$num.')'.'</ul>';
                                daohang($r['classid']);
                         }
                        else
                                echo '<li>'.'<a href="'.$jclassURL.'">'.$r['classname'].'</a>'.'('.$num.')'.'</li>';
                }
        }
        echo '<ul>';
        daohang(0);
        echo '</ul>';
?>