<!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" />
<title>网站管理系统</title>
<link href="/admin/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{$baseUrl}static/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="{$baseUrl}static/js/jquery.validate.min.js"></script>
<script language="javascript" src="{$baseUrl}admin/js/script.js"></script>
</head>
<body>
<script type="text/javascript">
var nav = [
{foreach from=$menus item=item}
{ldelim}"id":"{$item.menu.id}","name":"{$item.menu.name}","url":"{$item.menu.url}","menus":[		
		{foreach from=$item.sub item=menu}{ldelim}"url":"{$menu.url}","name":"{$menu.name}"{rdelim}{if not $menu@last},
{/if}
		{/foreach}]
{rdelim}{if not $item@last},
{/if}
{/foreach}
]
</script>
<!--[if !IE]>system menu<![endif]--><div id="topMsg"><span class="msg"></span></div>
<div class="sts_top">
  <div class="float_l sts_logo"><img src="{$adminUrl}images/logo.jpg" /></div>
  <div class="float_r sts_link"><span class="top_user_name">{$smarty.session.adminName}</span><a href="{$adminUrl}?act=content" target="content">管理首页</a> <a href="{$adminUrl}password" target="content">修改密码</a> <a href="{$adminUrl}logout" target="_top" class="top_exit_link">{$lang.user.logout}</a></div>
</div>
<div class="menu_box">
	
</div>
<!--[if !IE]>end system menu<![endif]-->
<script type="text/javascript">
$(function(){
	$.each(nav,function(i,v){
		var b= $('<a href="'+v.url+'" onfocus="this.blur()" class="menu_link menu_link'+v.id+'" target="content"><span><strong><em>'+v.name+'</em></strong></span></a>');
		b.focus(function(){
			this.blur()
		});
		var menu = v.menus;
		b.click(function(){
			window.status=v.name;
			$("h2.left_title",parent.frames["leftFrame"].document).find("span").html(v.name);
			var leftmenu = $("ul.left_menu",parent.frames["leftFrame"].document);
			leftmenu.html("");
			var menuHtml;
			$.each(menu,function(j,val){
				menuHtml = $('<li><a href="'+val.url+'" class="png_bg"  target="content">'+val.name+'</a></li>');
				menuHtml.click(function(){
					$(this).siblings("li").removeClass("active");
					$(this).addClass("active");
				});
				menuHtml.hover(function(){
					window.status= val.name;
				});
				menuHtml.find("a").hover(function(){
					window.status= val.name;
				});
				leftmenu.append(menuHtml);
			});
			return false;
		});
		$(".menu_box").append(b);
	});
	$(".menu_box").find("a").eq(0).trigger("click");
});
</script>
</body>
</html>
