回旧版

我爱导航网_我爱网址导航_网站酷站免费导航,尽在我爱导航!

帝国cms php代码实现无限级导航带数量显示

<?
        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>';
?>

1439921832.png

文章来自:我爱导航,未经允许不得转载!:首页 > 教程收藏 > 建站经验 » 帝国cms php代码实现无限级导航带数量显示

感觉不错,很赞哦! ( )

相关推荐