<!--<?php print <<<EOT
--> <!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>{$db_bbsname} - powered by phpwind.net</title>
<meta http-equiv="Content-Type" content="text/html; charset=$db_charset" />
<meta http-equiv="expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<base />
<link rel="stylesheet" type="text/css" href="images/admin/style.css" />
<script src="js/desktop/core.js"></script>
<script src="js/desktop/Cookie.js"></script>
<script src="js/desktop/list.js"></script>
<script src="js/desktop/drag.js"></script>
<script src="js/desktop/window.js"></script>
<script src="js/desktop/menu.js"></script>
<script src="js/desktop/pwmenu.js"></script>
<script src="js/desktop/panel.js"></script>
<script src="js/desktop/wpanel.js"></script>
<script src="js/desktop/startmenu.js"></script>
<!-- <script src="js/desktop/settingsmenu.js"></script> -->
<script src="js/desktop/button.js"></script>
<script src="js/desktop/taskbutton.js"></script>
<script src="js/desktop/dialog.js"></script>
<script src="js/desktop/resize.js"></script>
<script src="js/desktop/adminnav.js"></script>
<script type="text/javascript">
	SETTING = {};/*初始化设置对象*/
	USUALL = $diyjsstr; /*常用的功能模块*/
<!--
EOT;
if(If_manager){print <<<EOT
-->
	USUALL = [{name:'常用选项定制',url:'$admin_file?adminjob=diyoption',id:'diyoption'}].concat('-',USUALL);
<!--
EOT;
}print <<<EOT
-->
    TEMP   = $hotjsstr;
	USUALL = USUALL.concat('-',[{name:'最近操作',disabled:true}],'-',TEMP);
	ISMAXED = true;
	MAIN_BLOCK = $headjsstr;/*主菜单区*/
	SUBMENU_CONFIG = $allmenu;/*子菜单区*/
	var mainnavs = $headjsstr;/*复制一份组装菜单*/
	var menunavs = $allmenu;
	CONTEXTMENU = {};
	SETTING.cascade = 0;
	~function(){/*加载图片*/
		var imgs=["admin_icon.png","admin_logo.png","admin_menubar.png","bianicion.gif","adv_nav_bg.png"];
		for (var i=0,len=imgs.length; i<len; i++)
		{
			new Image().src="$imgpath/admin/"+imgs[i];
		}
		if (top.location != self.location) {top.location=self.location;}
	}();
	function minAllWindows(){
		for (var i in PW.Window.all){
			PW.Window.all[i].min?PW.Window.all[i].min():0;
		}
	}

	function setCookie(name, value, expires, path, domain, secure) {
		if (!expires) {
			expires = new Date();
			expires.setTime(expires.getTime()+31536000000);
		}
		document.cookie = name + '=' + escape(value) +
			( (expires) ? ';expires=' + expires.toGMTString() : '') +
			'path=' + ( (path) ? path : '/') +
			( (domain)  ? ';domain=' + domain : '') +
			( (secure)  ? ';secure' : '');
	}

	var adminSearchClass = {
		obj : null,
		defaultValue : "全站搜索",
		init : function(){
			 this.obj = document.getElementById("keyword");
		},
		focus : function(){
			this.init();
			if(this.obj.value == this.defaultValue){
				this.obj.value = "";
			}
			this.obj.className = "s-input";
		},
		blur : function(){
			this.init();
			if(this.obj.value == ""){

				this.obj.className = "s-input gray";
				this.obj.value = this.defaultValue;
			}
		},
		keyup : function(evt){
			var keycode = window.event ? window.event.keyCode : evt.which;
			if(keycode == 13 ){
				this.search();
			}
		},
		search : function(){
			if (times == 2){
				times = 0;
			}
			var keyword = getObj('keyword').value;
			if (keyword.length > 1) {
				PW.Dialog({
					id: "search",
					name: '搜索结果',
					url: "$admin_file?adminjob=search&keyword=" + encodeURI(keyword)
				}).loadIframe("$admin_file?adminjob=search&keyword=" + encodeURI(keyword)).ifr.style.display='';//;
			} else {
				if (times <1){
					alert('至少输入两个字节');
				}
				times++;
			}
		}
	}
</script>
</head>
<body>
<div id="admin_header">
	<div class="admin_head" id="admin_head"><table width="100%" style="table-layout:fixed">
		<tr class="vt">
			<td width="145" height="70" style="vertical-align:middle;" class="tac">
				<div class="fl"><a href="$admin_file?adskin=0" style=" position:absolute;left:75px;top:48px;color:#666;">体验新后台</a></div>
				<a href="$admin_file" onClick="PW.Dialog({id:'home',url:'$admin_file?adminjob=admin&job=desktop',name:'后台首页'});return false;"><img src="images/admin/admin_logo.png" /></a>
			</td>
	<td style="vertical-align:bottom;" class="admin_nav_bg">
	<div class="admin_topbar cc">
	<div style="width:750px;" class="fr">
	<div class="fr">
	<a href="$db_bbsurl" target="_blank" class="b">前台首页</a>&nbsp;&nbsp;<span class="blue">┊</span>&nbsp;&nbsp;<a href="$admin_file" onClick="PW.Dialog({id:'home',url:'$admin_file?adminjob=admin&job=desktop',name:'后台首页'});return false;" class="b">后台首页</a>
	<span class="ml20">用户名：$admin_name&nbsp;&nbsp;&nbsp;级别：$admin_level&nbsp;&nbsp;&nbsp;<a href="$admin_file?adminjob=quit">[注销]</a></span></div>
	<div class="admin_search fr">
		<form onSubmit="return false;">
			<input class="s-btn fr" type="button" name="submit" value="&nbsp;" onclick="adminSearchClass.search();" hideFocus="true"/>
			<input class="s-input gray" id="keyword" name="keyword" value="全站搜索" onfocus="adminSearchClass.focus();" onblur="adminSearchClass.blur();" onkeyup="adminSearchClass.keyup(event);"/>
		</form>
	</div></div>
	</div>
	<div class="admin_nav_left" id="navleft"><a href="javascript:;" title="上一个"></a></div>
	<div class="admin_nav_right" id="navright"><a href="javascript:;" title="下一个"></a></div>
	<ul class="admin_nav cc">
		<span id="taskbar"></span>
	</ul>
	</td></tr></table></div>
    <table width="100%" style="table-layout:fixed;"><tr>
    <td id="admin_menubar_top">
    <div class="admin_menubar_top">
    <a href="javascript:;" id="startMenu">常用功能项</a>
	</div></td>
    <td class="breadCrumb">
    <div class="expand fr"><b id="attention" title="新手指南" class="admin_guide fr" onclick="PW.setCurrent();adminguide.step();">新手指南</b><span id="fullscreen" onclick="adminNavClass.fullscreen();"><i class="admin_full">全屏</i></span><a href="javascript:;" onclick="adminNavClass.page(this);" class="toppage"  hidefocus="true">页面设置</a><a id="admin_map" hidefocus="true" href="$admin_file?adminjob=admin&job=shortcut" onClick="PW.Dialog({id:'shortcut',url:'$admin_file?adminjob=admin&job=shortcut',name:'后台菜单地图'});return false;"title="后台菜单地图">后台地图</a><a id="refresh" href="javascript:;" onclick="adminNavClass.refresh();"  hidefocus="true">刷新</a>
    </div>
	<div id="breadCrumb"></div></td>
	</tr></table>
</div>
<div id="admin_menubar">
		<ul class="menubar_ul cc" id="x-shortcuts">
		<!-- 左侧菜单区 开始 -->
		<script type="text/javascript">
			var db_adminfile = '$db_adminfile';/*后台文件名*/
			var times = 0;
			var mode = {items:[]};/*模式类*/
			for (var i=0,len=MAIN_BLOCK.length; i<len; i++){ /*获取模式部分菜单*/
				MAIN_BLOCK[i].id=="mode" ? (mode=MAIN_BLOCK[i]) & MAIN_BLOCK.splice(i,1) : 0;
			}
			SUB_BLOCK= mode.id ? SUBMENU_CONFIG[mode.id].items : {};
			SUB_BLOCK_ITEM={};
			for (var i=0,len=SUB_BLOCK.length; i<len; i++){
				SUB_BLOCK_ITEM[SUB_BLOCK[i].id]=SUB_BLOCK[i];
			}
			(function(){
				var module = '<li class="{id}" id="{id}-shortcut" text="{name}" value="{url}"><a href="javascript:;" hidefocus="true" aid={id} name={name} onclick="PW.ChildDialog(this);" ><span class="fl"><img src="images/blank.gif" style="background:url(mode/{id}/images/admin_icon.png) center center no-repeat;" /></span>{name}</a></li>';/*左侧菜单模板*/
				var moduleDown = '<li down="1" id="{id}-shortcut" text="{name}" value="{url}"><a class="none" href="javascript:;" hidefocus="true">{name}</a></li>';/*模式部分html代码*/
				document.write(desk.list.simple(MAIN_BLOCK, module, ''));/*生成左侧菜单*/
				//document.write("<li id='admin_hr'></li>");/*中间的分隔线*/
				//document.write(desk.list.simple(SUB_BLOCK, moduleDown, ''));
			})();
			var lastObj;
			window.onReady(function(){

				try {
					document.execCommand('BackgroundImageCache', false, true);
				}
				catch (e) {
				}
				var lastMenu;
				var lastClick;
				var leftMenu=getObj('x-shortcuts').getElementsByTagName("LI");/*获取左侧菜单元素 原来是 * */
				var mouseover=function(evt){
					var ev= evt||event;
					var el = ev.srcElement ? ev.srcElement : ev.target;
					if(el && el.tagName == "A"){/*firefox*/
						el = el.parentNode;
					}

					if(lastObj==el)return;
					lastObj=el;
					if (el && el.tagName == "LI") {
						var c = new PW.PWMenu;/*pw.menu*/
						for (var i in PW.Menu.all) {
							try{
								if( PW.Menu.all[i] && PW.Menu.all[i].id == el.id + "menu"){
									c= PW.Menu.all[i];
								}else{
									PW.Menu.all[i]?PW.Menu.all[i].remove ? PW.Menu.all[i].remove() : 0:0;
								}
							}catch(e){}
						}

						lastClick ? lastClick.clicked = 0 : 0;
						el.clicked = 1;
						lastClick = el;
						lastMenu = c;

						c.width = 207;
						c.ROOT = document.body;
						c.id = el.id + "menu";
						try{
							el.getAttribute("down") ? c.items=SUB_BLOCK_ITEM[el.id.replace("-shortcut", "")].items:c.items = SUBMENU_CONFIG[el.id.replace("-shortcut", "")].items;
						}catch(e){
							return;/*抑制错误,开发时需要调试*/
							//return alert(e.message||e)
						}
						c.body = getObj('x-desktop');
						c.left = this.offsetWidth - c.body.offsetLeft + c.ROOT.scrollLeft-146;/*左边宽度*/
						var st=el.getBoundingClientRect().top;
						c.top =st-71;/*顶部高度 100=60(头高度)+40(箭头高度)*/
						c.render();
						PW.setCurrent(el);
						startPanelShow ? startPanelShow.remove() : 0; /*删除常用功能*/
						if(ev.preventDefault){
							ev.preventDefault();
						}else{
							ev.returnValue = false;
						}
						return false;
					}
				};
				/* 左侧菜单绑定事件 */
				for (var i=0,len=leftMenu.length; i<len; i++){
				   leftMenu[i].onmousedown=function(evt){
					   var e=evt||window.event;
						mouseover(e);
						if(e.preventDefault){
							e.preventDefault();
							e.stopPropagation();
						}else{
							e.cancelBubble=true;
							e.returnValue=false;
						}
						return false;
					};

					leftMenu[i].onclick = function(){

					}
				}
				getObj('x-shortcuts').onmouseover =mouseover;
				killMenu=function(){
					for (var i in PW.Menu.all) {
						PW.Menu.all[i].remove ? PW.Menu.all[i].remove() : 0;
					}
				};
				/*常用功能*/
				STartMenu = new PW.StartMenu({
					items: USUALL
				});
				STartMenu.direct = "down";
				STartMenu.render();
				//Smenu = new PW.SettingsMenu().render();
				//PW.Dialog({id:"home",name:'后台首页',url:"$admin_file?adminjob=admin&job=desktop"});
				PW.openHome();
				Cookie.get('tipOpened')?0:(getObj("searchTip") || document.body).style.display='';
				window.onerror=function(){return true;};
			});
			/*默认页*/
			PW.openHome = function(){
				PW.Dialog({id:"home",name:'后台首页',url:"$admin_file?adminjob=admin&job=desktop"});
			}
			/*设置当前*/
			PW.setCurrent = function(current){
				var elements = getObj("x-shortcuts").getElementsByTagName("li");
				for(var i=0;i<elements.length;i++){
					elements[i].className = "";
				}
				current ? current.className = "current" : 0;
			}

		</script>
		<!--左侧菜单结束-->
		</ul>
</div>
		<div id="admin_contont">
<!--内容开始-->
	<div id="x-desktop" style="height:100%;width:100%;">
		<div id="desktopContainer" style="height:100%;float:left;width:100%;"></div>
	</div>
<!--内容结束-->
</div>
<script type="text/javascript">
function enterkeycode(evt)
{
	evt = evt||window.event;
	if(evt.keyCode==27)
	{
		adminNavClass.fullscreen();
	}
}
</script>
<!--
EOT;
include PrintEot('guide');
print <<<EOT
-->
</body>
</html>
<!--
EOT;
if(!$showafooter){
afooter(true);
}
?>-->