<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>管理中心</title> 
<link href="<{$__APP__}>public/css/common.css?v=<{$js_version}>" rel="stylesheet" type="text/css" />  
<style type="text/css"> 
body{ min-width:1400px; margin:0; height:100%; padding:0; background:#fff; margin:0; float:left; } 
.top{ width:0 auto; background:#fff; border-bottom:1px solid #ddd; height:50px; } 
.top span{ width:179px; height:40px; text-align:center; font-size:22px; padding:7px 0 0 0; float:left; } 
.top span img{ height:25px; } 
.top h3{ margin:15px 15px 0 0; float:right; color:#fff; }
.top h3 a{ font-size:14px; color:#000; font-weight:100; float:left;}
.top h3 em{ font-weight:100; color:#666; margin:2px 10px 0 10px; font-style:inherit; font-size:12px; float:left;}

.left{ width:229px; border-right:1px solid #ddd; top:51px; bottom:0; position:absolute; background:#fefefe; }
.left_box{ display:none; } 

.menu1{ width:79px; height:100%; border-right:1px solid #ddd; background:#f8f8f8; float:left; }
.menu1 ul{ padding:5px 0 0 0; float:left; width:100%; }
.menu1 ul li{ width:100%; float:left; }
.menu1 ul li a{ width:100%; font-size:16px; padding:10px 20px; box-sizing: border-box; float:left; }
.menu1 ul li a.ch{ background:#eee; }

.menu2{ width:149px; height:100%; left:80px; position:absolute; background:#fff; float:left; }
.menu2 .title{ width:100%; height:100%; bottom:0; padding:4px 0; float:left;   }
.menu2 .title a.lname{ width:150px; padding:8px 0 6px; left:0; color:#333; float:left; }
.menu2 .title a.lname:first-child{ margin-top:1px; }
.menu2 .title a.lname i.arrow{ width:30px; height:27px; margin:3px 0 0 0; float: left; }
.menu2 .title a.lname span{ width:90px; font-size:14px; color:#333; text-align:center; padding:2px 0 0; float:left; }
.menu2 .title a.ch{ background:#eee; }
.runtime{ display:none; }

/*右侧菜单*/
.right{ left:230px; width:auto; top:51px; bottom:0; right:0; position:absolute; } 
.login_main{ width:100%; min-width:1200px; left:0px; width:auto; top:0; bottom:0; right:0; padding:0; margin:0; position:absolute; }
.login_main iframe{ margin:0; padding:0; float:left; height:100%; width:100%; }
</style>
</head>
<body>
	<div class="top">
		<span><a href="javascript:;" data-code="index/panel"><img src="<{$__APP__}>public/images/admin_logo.png"></a></span> 
		<{if $stock_status == '1'}>
			<!--<a href="stock.php" target="_blank">进销存</a>-->
		<{/if}> 
		<h3>
			<a href="javascript:;" onClick="clear_cache()">清空缓冲</a><em>|</em>
			<a href="http://www.uqcms.com/" target="_blank">系统官方</a><em>|</em>
			<a href="<{$__URI__}>index/index" target="_blank">网站首页</a><em>|</em>
			<a href="<{$__ADMIN__}>index/logout">退出登录</a>
		</h3>
	</div>
	<div class="left">
		<div class="menu1"> 
			<ul>
				<{foreach from=$menu item=i key=k}>
					<li><a href="javascript:;" parent-id="<{$i.id}>"<{if $k == 0}> class="ch"<{else}><{/if}>><{$i.name}></a></li>
				<{/foreach}>	
			</ul> 
		</div>
		<div class="menu2"> 
			<{foreach item=i from=$menu}>
				<div class="left_box" id="menu2_<{$i.id}>"> 
					<div class="title"> 
						<{foreach item=ii from=$i.p_menu}> 
							<a class="lname" href="javascript:;" url="<{$__ADMIN__}><{$ii.url}>" data-id="<{$ii.id}>">
								<i class="arrow">&nbsp;</i>
								<span><{$ii.name}></span>
							</a> 
						<{/foreach}> 
					</div>
				</div>	
			<{/foreach}>
		</div>
		
	</div> 
	<div class="right"> 
		<div class="login_main">
			<iframe name="content" id="content" src="<{$__ADMIN__}>index/panel" frameborder="0" scrolling="auto"></iframe>
		</div>
	</div> 
	<div id="ajax_box"></div>
<{import file="index/index_footer.html"}> 
<script type="text/javascript"> 
$(function(){
	win_h = $(window).height(); 
	function change_window(){
		win_w = $(window).width();
		if(win_w < 1200){
			$('body').css('width',1200+'px'); 
		}else{
			$('body').css('width',100+'%'); 
		}
	}
	change_window();
	$(window).resize(function(){ 
		win_w = $(window).width(); 
		if(win_w < 1200){
			$('body').css('width',1200+'px');
		}else{
			$('body').css('width',100+'%'); 
		} 
	}); 
	$(".left_box:first").show();  
	//------------//
	$(".left_box .title a:first").addClass('ch');  
	
	//顶部操作
	$(".menu1 ul a").click(function(){
		$this = $(this);
		$this.addClass("ch").parent('li').siblings().find('a').removeClass("ch");
		top_id = $this.attr('parent-id'); 
		$("#menu2_"+top_id).show().siblings().hide();
	 	// 访问地址
		url = $("#menu2_"+top_id+" .ch").attr('url');
		if(url == '' || url == undefined){
			url = $("#menu2_"+top_id+" a:first").attr('url');
			$("#menu2_"+top_id+" a:first").addClass('ch');
		} 
		$("#content").attr('src', url);
	});
	
	// 左侧大标
	$(".left_box .title a.lname").click(function(){
		id = $(this).attr('data-id'); 
		$(this).siblings().removeClass('ch');
		$(this).addClass("ch"); 
		url = $(this).attr('url');  
		$("#content").attr('src',url); 
	}); 
});

function clear_cache(){
	$.get(ADMIN+"config/temp_clear?path=all&v="+new Date().getTime(), function(result){ 
		data = jQuery.parseJSON(result);
		if(data.error == '0'){
			$.alert('清空成功');
		}else{
			$.alert(data.msg);
		}
	});
}
</script>