帝国cms无限极栏目导航函数
微wx笑 2019-07-26【帝国CMS】 13 0关键字: 帝国cms
帝国cms无限极栏目导航函数<?phprequire('../class/connect.php');require('../class/db_sql.php');require("../class/q_functions.php");require('..
帝国cms无限极栏目导航函数
<?php require('../class/connect.php'); require('../class/db_sql.php'); require("../class/q_functions.php"); require('../data/dbcache/class.php'); $link=db_connect(); $empire=new mysqlquery(); //获取网站栏目------2014/7/2---by liangguanyu------------------ function user_ListCats($bclassid) { global $empire, $dbtbpre,$class_r; $sql=$empire->query("select classid, classname, bclassid, islast, classpath, classurl,tbname,sonclass,classimg from {$dbtbpre}enewsclass where bclassid='$bclassid' and wburl='' order by myorder,classid"); $num=$empire->num1($sql); if ($num == 0 && $bclassid == 0)//无记录 { echo $GLOBALS['notrecordword']; return ""; } if ($num == 0) { return ''; } $i = 1; while ($r=$empire->fetch($sql)) { // 如果不是终极栏目,显示其子目录 if($_GET['toHtml']){ $url=$_GET['root'].$r['classpath']; }else{ $url=$_GET['root'].'listInfo.php?classid='.$r['classid']; } $select = $_GET['classid']==$r['classid']?'class="mm-selected"':''; if(empty($r[islast]) ) { echo '<li '.$select.'><a href="' .$url. '"><i class="iconfont icon-'.($r['classimg']?$r['classimg']:$r['tbname']).'"></i> ' . $r[classname] . '</a>'; if($r[sonclass]){ echo '<ul>'."\r\n"; user_ListCats($r[classid], $showMore); echo '</ul>'."\r\n"; } echo '</li>'; } else { echo '<li '.$select.'><a href="' . $url . '"><i class="iconfont icon-'.($r['classimg']?$r['classimg']:$r['tbname']).'"></i> ' . $r[classname] . '</a></li>'; } $i += 1; } } echo @user_ListCats(); db_close(); $empire=null; ?>
来源:http://www.520am.com/forum/thread-16-64-0-0.html
本文由 微wx笑 创作,采用 署名-非商业性使用-相同方式共享 4.0 许可协议,转载请附上原文出处链接及本声明。
原文链接:https://www.ivu4e.cn/blog/EmpireCMS/2019-07-26/64.html
上一篇:基于帝国CMS的建站日志