帝国cms循环子栏目数据(2层栏目,不确定具体栏目几级)如何实现下图效果

<head id=”head”><meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″></head>
<ul id=Pro_category>
<?php
$mesql=$empire->query(“select bclassid,classname,classid,sonclass,classpath from {$dbtbpre}enewsclass where classid in (1,2,3,4,5,6,7,8,9,10)”);
while($proMenu=$empire->fetch($mesql)){
echo “<li>”.$proMenu[classname];
if($proMenu[sonclass]){
$mesql_sub=$empire->query(“select classname,classid,sonclass,classpath from {$dbtbpre}enewsclass where bclassid=”.$proMenu[classid]);
echo “<ul>”;
while($proMenu_sub=$empire->fetch($mesql_sub)){
echo “<li>”.$proMenu_sub[classname].”<ul>”;
$mesql_arti=$empire->query(“select * from {$dbtbpre}ecms_shop where classid=”.$proMenu_sub[classid]);
while($proMenu_arti=$empire->fetch($mesql_arti)){
echo “<li>”.$proMenu_arti[title].”</li>”;
}
echo “</ul>”;
}
echo “</ul>”;
echo “</li>”;
}else{
echo “<ul>”;
$mesql_arti=$empire->query(“select * from {$dbtbpre}ecms_shop where classid=”.$proMenu[classid]);
while($proMenu_arti=$empire->fetch($mesql_arti)){
echo “<li>”.$proMenu_arti[title].”</li>”;
}
echo “</ul>”;
}
}
?></ul>

人吐槽 人点赞

猜你喜欢

发表评论

用户名: 密码:
验证码: 匿名发表

你可以使用这些语言

查看评论:帝国cms循环子栏目数据(2层栏目,不确定具体栏目几级)如何实现下图效果