<!--<?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);
}
?>-->