<?php if (!defined('APP_PATH')) exit;?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="http://127.0.0.5/Magic/Data/Public/css/style.css" rel="stylesheet" type="text/css" />
<title>Magic CMS 后台管理系统 ● 政企版</title>
</head>
<style type="text/css">
html,body{float:left;overflow:hidden;min-width:980px;width:100%;height:100%;}
.content{height:100%;}
.header {min-width:980px;}
.header .nav{min-width:750px;}
</style>
<body>
<div  class="header">
    <div class="topleft"><img src="http://127.0.0.5/Magic/Data/Public/images/logo.png" title="系统首页" /></div>
    <ul class="nav">
		<li><a href="javascript:" class="selected"  onclick="run(this,0)"><img src="http://127.0.0.5/Magic/Data/Public/images/icon0.png" /><h2>工作台</h2></a></li>
		<?php foreach ($node as $key=>$v){?>
		<li><a href="javascript:"  onclick="run(this,<?php echo $key;?>)"><img src="http://127.0.0.5/Magic/Data/Public/images/icon<?php echo $key;?>.png" /><h2><?php echo $v['title'];?></h2></a></li>
		<?php }?>
    </ul>
            
    <div class="topright">    
		<ul>
			<li><a href="../" target="_blank">首页</a></li>
			<li><span><img src="http://127.0.0.5/Magic/Data/Public/images/help.png"  class="helpimg"/></span><a href="http://www.qintech.net" target="_blank">帮助</a></li>
			<li><a href="?r=about" target="rightframe">关于</a></li>
			<li><a href="?r=login-index-logout" target="_parent">退出</a></li>
		</ul>
		<div class="user" id="user-box" >
			<div class=" user-box_show"></div>
			<div class="user-box_nor"></div>
			<div class="user-box"><span><?php echo session('nickname');?></span><i>消息</i><b>0</b></div>
			<div class="user-box_cont">加载中...</div>
		</div>
    </div>
</div>
<div class="content">
	<div class="fleft">
		<div class="lefttop"><span></span>管理面板</div>
		<dl class="leftmenu" style="display:block" id="leftmenu0">
			<dd>
				<div class="title"><span><img src="http://127.0.0.5/Magic/Data/Public/images/leftico01.png" /></span>快捷菜单</div>
				<ul class="menuson">
					<li style="display:none"><a href="?r=index-index-welcome">欢迎页</a></li>
					<?php foreach ($user_panel as $uk=>$uv){?>
					<li><cite></cite><a href="<?php echo $uv['url'];?>" target="rightframe"><?php echo $uv['title'];?></a><i></i></li>	
					<?php }?>
				</ul>     
			</dd>
		</dl>
		<?php foreach ($node as $nk=>$nv){?>
		<dl class="leftmenu" id="leftmenu<?php echo $nk;?>">
			<?php $c=0;?>
			<?php foreach ($nv['_data'] as $ck=>$cv){?>
			<dd>
				<div class="title"><span><img src="http://127.0.0.5/Magic/Data/Public/images/leftico01.png" /></span><?php echo $cv['title'];?></div>
				<ul class="menuson">
					<?php $s=0;?>
					<?php foreach ($cv['_data'] as $sk=>$sv){?>
					<li <?php if($s==0 && $c==0){ ?>class="active"<?php }?>>
					  <div class="header">
						<cite></cite><a href="<?php echo $sv['url'];?>" target="rightframe"><?php echo $sv['title'];?></a><i></i>
					  </div>
						<?php if (!empty($sv['_data'])){ ?>
						<ul class="sub-menus">
							<?php foreach ($sv['_data'] as $tv){?>
							<li><a href="<?php echo $tv['url'];?>"  target="rightframe"><?php echo $tv['title'];?></a></li>
							<?php }?>
						</ul>
						<?php }?>
					</li>
					<?php $s++;?>
					<?php }?>
				</ul>     
			</dd>
			<?php $c++;?>
			<?php }?>
		</dl>
		<?php }?>
	</div>
	<div class="frigth">
		<iframe id="rightframe" name="rightframe" src="?r=index-index-welcome" frameborder="0" class="frame" style="overflow-y:scroll"></iframe>
	</div>
</div>
<script type="text/javascript" src="http://127.0.0.5/Magic/Data/Public/js/jquery.js"></script>
<script type="text/javascript" src="http://127.0.0.5/Magic/Data/Public/js/main.js"></script>
<script src="http://127.0.0.5/Magic/Data/Public/js/layer.js"></script>
<script type="text/javascript">
$(function(){
	//顶部导航切换
	run = function(obj,nid) {
		$(".nav li a.selected").removeClass("selected");
		$(obj).addClass('selected');
		$(".leftmenu").hide();
		url = $("#leftmenu"+nid).show().find('.menuson li a').eq(0).attr('href');
		$("#rightframe").attr('src',url);
	}
	
	//导航切换
	$(".menuson .header").click(function(){
		var $parent = $(this).parent();
		$(".menuson>li.active").not($parent).removeClass("active open").find('.sub-menus').hide();
		$parent.addClass("active");
		if(!!$(this).next('.sub-menus').size()){
			if($parent.hasClass("open")){
				$parent.removeClass("open").find('.sub-menus').hide();
			}else{
				$parent.addClass("open").find('.sub-menus').show();	
			}
		}
	});

	//左侧导航切换
	$('.sub-menus li').click(function(e) {
        $(".sub-menus li.active").removeClass("active")
		$(this).addClass("active");
    });


	$('.title').click(function(){
		var $ul = $(this).next('ul');
		$('dd').find('.menuson').slideUp();
		if($ul.is(':visible')){
			$(this).next('.menuson').slideUp();
		}else{
			$(this).next('.menuson').slideDown();
		}
	});
	$("#rightframe").css({
		"height":($(document.body).height()-90)+"px",
		"width":($(document.body).width()-186)+"px"
	})

	cometMsg(5000,true);
})	

</script>
</body>
</html>
