帝国cms调用二级导航
以下为本站使用的二级导航调用方式
####帝国cms导航调用二级栏目 start####
<?
$classid=$GLOBALS[navclassid];
$bclassid=$class_r[$GLOBALS[navclassid]][bclassid];
if (!$bclassid){$bclassid=$classid;}
?>……
以下为本站使用的二级导航调用方式
####帝国cms导航调用二级栏目 start####
<?
$classid=$GLOBALS[navclassid];
$bclassid=$class_r[$GLOBALS[navclassid]][bclassid];
if (!$bclassid){$bclassid=$classid;}
?>
<ul id="starlist" class="navbar">
<li class="current-menu-item"><a href="[!--news.url--]">首页</a></li>
[e:loop={"select classid,classname,classpath,classimg from [!db.pre!]enewsclass where bclassid='0' and showclass=0 order by myorder asc,classid asc",0,24,0}]
<?
$cr=$empire->fetch1("select classid from {$dbtbpre}enewsclass where bclassid = '".$bqr[classid]."' limit 1");
if ($cr[classid]){
?>
<li class="menu <?if ($bqr[classid]==$bclassid){?> current-menu-item<?}?>"><a href="<?=$public_r[newsurl].$bqr[classpath]?>/" title="<?=$bqr[classname]?>"><?=$bqr[classname]?></a>
<ul class="sub">
<?php
$newbook=$empire->query("select classid,classname,classpath from {$dbtbpre}enewsclass where bclassid = '".$bqr[classid]."' and showclass=0 order by myorder asc,classid asc");
while($r=$empire->fetch($newbook)) {
?>
<li><a href="<?=$public_r[newsurl].$r[classpath]?>/"><?=$r[classname]?></a> </li>
<?php
}
?>
</ul>
</li>
<?}else{?>
<li <?if ($bqr[classid]==$bclassid){?> class="current-menu-item"<?}?>><a href="<?=$public_r[newsurl].$bqr[classpath]?>/" title="<?=$bqr[classname]?>"><?=$bqr[classname]?></a></li>
<?}?>
[/e:loop]
</ul>
####帝国cms导航调用二级栏目 end####
####帝国cms导航调用二级栏目 start####
<?
$classid=$GLOBALS[navclassid];
$bclassid=$class_r[$GLOBALS[navclassid]][bclassid];
if (!$bclassid){$bclassid=$classid;}
?>
<ul id="starlist" class="navbar">
<li class="current-menu-item"><a href="[!--news.url--]">首页</a></li>
[e:loop={"select classid,classname,classpath,classimg from [!db.pre!]enewsclass where bclassid='0' and showclass=0 order by myorder asc,classid asc",0,24,0}]
<?
$cr=$empire->fetch1("select classid from {$dbtbpre}enewsclass where bclassid = '".$bqr[classid]."' limit 1");
if ($cr[classid]){
?>
<li class="menu <?if ($bqr[classid]==$bclassid){?> current-menu-item<?}?>"><a href="<?=$public_r[newsurl].$bqr[classpath]?>/" title="<?=$bqr[classname]?>"><?=$bqr[classname]?></a>
<ul class="sub">
<?php
$newbook=$empire->query("select classid,classname,classpath from {$dbtbpre}enewsclass where bclassid = '".$bqr[classid]."' and showclass=0 order by myorder asc,classid asc");
while($r=$empire->fetch($newbook)) {
?>
<li><a href="<?=$public_r[newsurl].$r[classpath]?>/"><?=$r[classname]?></a> </li>
<?php
}
?>
</ul>
</li>
<?}else{?>
<li <?if ($bqr[classid]==$bclassid){?> class="current-menu-item"<?}?>><a href="<?=$public_r[newsurl].$bqr[classpath]?>/" title="<?=$bqr[classname]?>"><?=$bqr[classname]?></a></li>
<?}?>
[/e:loop]
</ul>
####帝国cms导航调用二级栏目 end####