帝国cms左侧分类显示子分类
作者:小鱼的互联网观察 发布时间:March 24, 2016 分类:互联网观察
帝国cms左侧分类选中状态下显示子分类,
<?php
$_bclassid=$class_r[$GLOBALS[navclassid]][bclassid];
if($_bclassid===0)
{$_bclassid=$GLOBALS[navclassid];}
if($class_r[$_bclassid][classname]==="产品中心")
{$_bclassid=$class_r[$_bclassid][bclassid];}
?>
[e:loop={'select * from phome_enewsclass where bclassid='.$_bclassid.' and showclass=0 order by myorder asc',20,24,0}]
<?php if($bqr['classid']==$GLOBALS[navclassid]){?>
<li class="onml"><a href="/<?=$bqr['classpath']?>"><?=$bqr['classname']?></a>
<div style="
/* display: inherit; */
display: block;
">
<ul>
<?php
$sqlstr='select * from phome_enewsclass where bclassid='.$bqr[classid].' and showclass=0 order by myorder asc';
$bqrrquery=$empire->query($sqlstr);
while($bqrr=$empire->fetch($bqrrquery))
{
?>
<li class="nulli" style="
/* text-align: right; */
color: #999;
"><a style="" href="/<?=$bqrr['classpath']?>"><?=$bqrr['classname']?></a></li>
<?
}
?>
</ul></div>
</li>
<?}else {?>
<li><a href="/<?=$bqr['classpath']?>"><?=$bqr['classname']?></a>
<div style="
/* display: inherit; */
display: block;
">
<ul>
<?php
$sqlstr='select * from phome_enewsclass where bclassid='.$bqr[classid].' and showclass=0 order by myorder asc';
$bqrrquery=$empire->query($sqlstr);
while($bqrr=$empire->fetch($bqrrquery))
{
?>
<li class="nulli <?php echo ($bqrr['classid']==$GLOBALS[navclassid])?'nullionml':' '?>" style="
/* text-align: right; */
color: #999;
"><a style="" href="/<?=$bqrr['classpath']?>"><?=$bqrr['classname']?></a></li>
<?
}
?>
</ul></div>
</li>
<?}?>
[/e:loop]
相关文章
文档信息
- 版权声明:自由转载-非商用-非衍生-保持署名 | Creative Commons BY-NC-ND 3.0
- 原文网址:https://tianmeng.org/archives/424/
- 最后修改时间:2016年03月24日 15:03:02
当前暂无评论 »