<!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>
	<title>后台管理</title>
	<meta http-equiv="X-UA-Compatible" content="IE=Edge">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" href="{skin:css/admin.css}" />
	<meta name="robots" content="noindex,nofollow">
	<link rel="shortcut icon" href="{webroot:favicon.ico}" />
	{js:jquery}
	{js:dialog}
	{js:form}
	{js:validate}
	{js:artTemplate}
	<script type='text/javascript' src="{theme:javascript/admin.js}"></script>
	<script type='text/javascript' src="{webroot:public/javascript/public.js}"></script>
</head>
<body>
	<div class="container">
		<div id="header">
			<div class="logo">
				<a href="{url:/system/default}"><img src="{skin:images/admin/logo.png}" width="303" height="43" /></a>
			</div>
			<div id="menu">
				<ul name="topMenu">
					{set:$menuData=menu::init($this->admin['role_id']);}
					{foreach:items=menu::getTopMenu($menuData)}
					<li>
						<a hidefocus="true" href="{url:$item}">{$key}</a>
					</li>
					{/foreach}
				</ul>
			</div>
			<p><a href="{url:/systemadmin/logout}">退出管理</a> <a href="{url:/system/admin_repwd}">修改密码</a> <a href="{url:/system/default}">后台首页</a> <a href="{url:}" target='_blank'>商城首页</a> <span>您好 <label class='bold'>{$this->admin['admin_name']}</label>，当前身份 <label class='bold'>{$this->admin['admin_role_name']}</label></span></p>
		</div>
		<div id="info_bar">
			<label class="navindex"><a href="{url:/system/navigation}">快速导航管理</a></label>
			<span class="nav_sec">
			{query:name=quick_naviga where=admin_id eq $this->admin['admin_id'] and is_del eq 0}
			<a href="{$item['url']}" class="selected">{$item['naviga_name']}</a>
			{/query}
			</span>
		</div>

		<div id="admin_left">
			<ul class="submenu">
				{set:$leftMenu=menu::get($menuData,IWeb::$app->getController()->getId().'/'.IWeb::$app->getController()->getAction()->getId())}
				{foreach:items=current($leftMenu)}
				<li>
					<span>{$key}</span>
					<ul name="leftMenu">
						{foreach:items=$item key=$leftKey item=$leftValue}
						<li><a href="javascript:void(0);" onclick="{if:stripos($leftKey,'/') === 0}window.location.href='{url:$leftKey}'{else:}{$leftKey}{/if}">{$leftValue}</a></li>
						{/foreach}
					</ul>
				</li>
				{/foreach}
			</ul>
			<div id="copyright"></div>
		</div>

		<div id="admin_right">
			{viewcontent}
		</div>
	</div>

	<script type='text/javascript'>
	//隔行换色
	$(".list_table tr:nth-child(even)").addClass('even');
	$(".list_table tr").hover(
		function () {
			$(this).addClass("sel");
		},
		function () {
			$(this).removeClass("sel");
		}
	);

	//按钮高亮
	var topItem  = "{echo:key($leftMenu)}";
	$("ul[name='topMenu']>li:contains('"+topItem+"')").addClass("selected");

	var leftItem = "{echo:IUrl::getUri()}";
	$("ul[name='leftMenu']>li a[href^='"+leftItem+"']").parent().addClass("selected");
	</script>
</body>
</html>
