帝国cms二级导航

<!--头部开始-->

<div class="header">
<div class="warp relative_box"> <a href="index.html" class="logo"><img src="[!--news.url--]skin/ihotel/images/logo.png" /></a>
<ul class="main_menu">
<li style="border-bottom:3px solid #82BD49; "><a href="index.html" >网站首页</a></li>
[e:loop={"select classid,wburl,classname,islast,sonclass from {$dbtbpre}enewsclass where bclassid='0' order by myorder,classid ASC limit 11",0,24,0}]
<?php
$classurl=sys_ReturnBqClassname($bqr,9); //取得栏目地址
$tbname=$class_r[$bqr[classid]][tbname]; //取得表名


//值为0时显示二级,值为1时不显示二级

//终极栏目Start
if(!$bqr[islast])
{
//判断是否有子栏目Start
if($bqr[sonclass])
{
echo '<li class="relative_box"><a href="javascript:;">'.$bqr[classname].'</a><ul class="sub_menu">';
//循环栏目下的子栏目Start
$newsclass=$empire->query("select classid,classname from ".$dbtbpre."enewsclass where bclassid=".$bqr[classid]." order by myorder,classid desc limit 10");
while($classr=$empire->fetch($newsclass)) {
$classrurl=sys_ReturnBqClassname($classr,9); //取得子栏目地址
?>
<li><a href="<?=$classrurl?>">
<?=$classr[classname]?>
</a></li>
<?php
}
//循环栏目下的子栏目End
echo '</ul></li>';
}else{
echo '<li ><a href="'.$bqr[wburl].'" >'.$bqr[classname].'</a></li>';
}

}
//判断是否有子栏目End
else{
?>
<li><a href="<?=$classurl?>" target="_blank"><span>
<?=$bqr[classname]?>
</span></a>
<?php
}
?>
</li>
[/e:loop]
</ul>
<div class="other_info">
<div class="weibo">
<label>关注我们:</label>
<a href="javascript:if(confirm('http://t.qq.com/iHotel--greencloud \n\n Teleport Ultra , · \n\n?'))window.location='http://t.qq.com/iHotel--greencloud'" target="_blank" rel="bookmark" class="qq_weibo"></a><a href="javascript:if(confirm('http://e.weibo.com/greencloud960 \n\n Teleport Ultra , · \n\n?'))window.location='http://e.weibo.com/greencloud960'" target="_blank" rel="bookmark" class="sin_weibo"></a></div>
<div class="kefu">
<label>在线客服:</label>
<a target="_blank" href="javascript:if(confirm('http://wpa.qq.com/msgrd?v=3&uin=2464385582&site=qq&menu=yes \n\n Teleport Ultra , · \n\n?'))window.location='http://wpa.qq.com/msgrd?v=3&uin=2464385582&site=qq&menu=yes'" ><img border="0" src="[!--news.url--]skin/ihotel/images/button_11.gif" alt="点击这里给我发消息" title="点击这里给我发消息"/></a> <a target="_blank" href="javascript:if(confirm('http://wpa.qq.com/msgrd?v=3&uin=397143761&site=qq&menu=yes \n\n Teleport Ultra , · \n\n?'))window.location='http://wpa.qq.com/msgrd?v=3&uin=397143761&site=qq&menu=yes'" ><img border="0" src="[!--news.url--]skin/ihotel/images/button_11.gif" alt="点击这里给我发消息" title="点击这里给我发消息"/></a> </div>
</div>
</div>
</div>
<!--头部结束-->
<script type="text/javascript">
jQuery(document).ready(function () {
//--导航二级菜单--//
$(".main_menu li").mouseenter(function(){
$(this).children(".sub_menu").slideDown(150);
}).mouseleave(function(){
$(this).children(".sub_menu").hide();
})
$(".sub_menu li").mouseenter(function(){
$(this).parent().show();
}).mouseleave(function(){
$(this).parent().hide();
})

$(".main_menu > li").each(function(){
alert( $(this).firstChild.href);
});

});
</script>

posted @ 2015-10-16 15:53  文艺流浪汉  阅读(1944)  评论(0编辑  收藏  举报