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

2018-03-26 02:36:38 围观 :

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?
        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>';
?>

 

    匿名评论
  • 评论
人参与,条评论

相关文章

    无相关信息
网站分类