<!--#include file="../siteconfig/conn.asp"-->
<%
if session("adminlogin")<>sessionvar then
Response.Write("<script language=javascript>alert('你尚未登录，或者超时了！请重新登录');this.location.href='login.asp';</script>")
Response.End
End if
set rs=server.createobject("adodb.recordset")
set rss=server.createobject("adodb.recordset")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>好251网址之家后台管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<meta content="Comsenz Inc." name="Copyright" />
<link rel="stylesheet" href="images/admincp/admincp.css" type="text/css" media="all" />
<script src="js/common.js" type="text/javascript"></script>
</head>
<body style="margin: 0px" scroll="no">
<div id="append_parent"></div>
<table cellpadding="0" cellspacing="0" width="100%" height="100%">
<tr>
<td colspan="2" height="90">
<div class="mainhd">
<div class="logo">好251网址之家后台管理系统</div>
<div class="uinfo">
<p>您好, <em><%=session("Admin_UserName")%></em> [ <a href="logout.asp" target="_top">退出</a> ]</p>
<p class="btnlink"><a href="../" target="_blank">网站首页</a></p>
</div>
<div class="navbg"></div>
<div class="nav">
<ul id="topmenu">
<li><em><a href="#" id="header_index" onClick="toggleMenu('index', 'welcome.asp');">首页</a></em></li><li><em><a href="#" id="header_global" onClick="toggleMenu('global', 'Admin_ConFig.asp');">全局</a></em></li><li><em><a href="#" id="header_Class" onClick="toggleMenu('Class', 'Admin_Class.asp');">分类</a></em></li><li><em><a href="#" id="header_Url" onClick="toggleMenu('Url', 'Admin_Url.asp');">网址</a></em></li><li><em><a href="#" id="header_Skin" onClick="toggleMenu('Skin', 'Admin_SkinClass.asp');">模板</a></em></li><li><em><a href="#" id="header_Html" onClick="toggleMenu('Html', 'Admin_HtmlClassSkin.asp');">生成</a></em></li><li><em><a href="#" id="header_Ad" onClick="toggleMenu('Ad', 'Admin_Ad_Index.asp');">广告</a></em></li><li><em><a href="#" id="header_Data" onClick="toggleMenu('Data', 'Admin_Data.asp');">数据库</a></em></li><li><em><a href="#" id="header_Admin" onClick="toggleMenu('Admin', 'Admin_Manage.asp');">用户管理</a></em></li><li><em><a href="#" class="diffcolor" onClick="window.open('http://bbs.itmop.com/')">交流论坛</a></em></li>
</ul>
<div class="currentloca">
<p id="admincpnav"></p>
</div>
<div class="navbd"></div>
<div class="sitemapbtn">
	<span id="add2custom"></span>
	<a href="###" id="cpmap" onClick="showMap();return false;"><img src="images/admincp/btn_map.gif" title="后台导航" width="72" height="18" /></a>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td valign="top" width="160" class="menutd">
<div id="leftmenu" class="menu">
<ul id="menu_global" style="display: none"><li><a href="Admin_ConFig.asp" target="main">站点信息</a></li></ul>
<ul id="menu_Class" style="display: none"><li><a href="Admin_Class.asp" target="main">分类管理</a></li><li><a href="Admin_Class_Search.asp" target="main">分类搜索</a></li></ul>
<ul id="menu_Url" style="display: none"><li><a href="Admin_Url.asp" target="main">网站管理</a></li><li><a href="Admin_Url_Search.asp" target="main">网站搜索</a></li><li><a href="Admin_Url_Yn_Search.asp" target="main">网站审查</a></li></ul>
<ul id="menu_Skin" style="display: none"><li><a href="Admin_SkinClass.asp" target="main">模板管理</a></li>
<%rs.open"select * from SkinClass",conn,1,3
dim SkinClassCount
SkinClassCount = int(rs.recordcount)
redim SkinClassArray(SkinClassCount,1)
dim j,i
j=1
while not rs.eof and not rs.bof
   SkinClassArray(j,0)=rs("SkinClass_Id")
   SkinClassArray(j,1)=rs("SkinClass_Name")
   j=j+1
rs.movenext
wend
rs.close
for i=1 to SkinClassCount%>
<li><a href="Admin_Skin.asp?Skin_SkinClassId=<%=SkinClassArray(i,0)%>" target="main"><%=SkinClassArray(i,1)%></a></li>
<%next%></ul>
<ul id="menu_Html" style="display: none"><li><a href="Admin_HtmlClassSkin.asp" target="main">分类HTML</a></li>
<%rs.open"select * from SkinClass",conn,1,3
dim SkinClassHtmlCount
SkinClassHtmlCount = int(rs.recordcount)
redim SkinClassHtmlArray(SkinClassHtmlCount,1)
j=1
while not rs.eof and not rs.bof
   SkinClassHtmlArray(j,0)=rs("SkinClass_Id")
   SkinClassHtmlArray(j,1)=rs("SkinClass_Name")
   j=j+1
rs.movenext
wend
rs.close
for i=1 to SkinClassHtmlCount%>
<li><a href="Admin_HtmlSkin.asp?Skin_SkinClassId=<%=SkinClassHtmlArray(i,0)%>" target="main"><%=SkinClassHtmlArray(i,1)%></a></li><%next%></ul>
<ul id="menu_Ad" style="display: none"><li><a href="Admin_Ad_Index.asp" target="main">首页广告</a></li><li><a href="Admin_Ad_Class.asp" target="main">分类广告</a></li></ul>
<ul id="menu_Data" style="display: none"><li><a href="Admin_Data.asp" target="main">数据库管理</a></li></ul>
<ul id="menu_Admin" style="display: none"><li><a href="Admin_Manage.asp" target="main">网站用户管理</a></li></ul>
<ul id="menu_index" style="display: none"><li><a href="Admin_ConFig.asp" target="main">全局</a></li><li><a href="Admin_Url_Yn_Search.asp" target="main">网站审查</a></li><li><a href="Admin_Class_Search.asp" target="main">分类搜索</a></li><li><a href="Admin_Url_Search.asp" target="main">网站搜索</a></li></ul>
</div>
</td>
<td valign="top" width="100%"class="mask"><iframe src="welcome.asp" name="main" width="100%" height="100%" frameborder="0"scrolling="yes" style="overflow: visible;"></iframe></td>
</tr>
</table>

<div class="copyright">
	<p>Powered by <a href="http://www.hao251.com/" target="_blank">好251网址之家</a> 3.1.0</p>
	<p>&copy; 2008-2010, <a href="http://bbs.itmop.com/" target="_blank">hao251 Inc.</a></p>
</div>

<div id="cpmap_menu" class="custom" style="display:none">
	<div class="cside">
		<h3><span class="ctitle1">常用操作</span><a href="#" onClick="toggleMenu('misc', 'misc&operation=custommenu');hideMenu();" class="cadmin">管理</a></h3>
		<ul class="cslist" id="custommenu"></ul>
	</div>
	<div class="cmain" id="cmain"></div>
	<div class="cfixbd"></div>
</div>

<script type="text/JavaScript">
	var headers = new Array('index', 'global', 'Class', 'Url', 'Skin', 'Html', 'Ad', 'Data', 'Admin');
	function toggleMenu(key, url) {
		if(key == 'index' && url == 'home') {
			parent.location.href = 'welcome.asp';
			return false;
		}
		for(var k in headers) {
			if($('menu_' + headers[k])) {
				$('menu_' + headers[k]).style.display = headers[k] == key ? '' : 'none';
			}
		}
		var lis = $('topmenu').getElementsByTagName('li');
		for(var i = 0; i < lis.length; i++) {
			if(lis[i].className == 'navon') lis[i].className = '';
		}
		$('header_' + key).parentNode.parentNode.className = 'navon';
		if(url) {
			parent.main.location = url;
			var hrefs = $('menu_' + key).getElementsByTagName('a');
			for(var j = 0; j < hrefs.length; j++) {
				hrefs[j].className = hrefs[j].href.substr(hrefs[j].href.indexOf('') + 19) == url ? 'tabon' : (hrefs[j].className == 'tabon' ? '' : hrefs[j].className);
			}
		}
		return false;
	}
	function initCpMenus(menuContainerid) {
		var key = '';
		var hrefs = $(menuContainerid).getElementsByTagName('a');
		for(var i = 0; i < hrefs.length; i++) {
			if(menuContainerid == 'leftmenu' && !key && hrefs[i].href.substr(hrefs[i].href.indexOf('admincp.php?action=') + 12) == 'action=home') {
				key = hrefs[i].parentNode.parentNode.id.substr(5);
				hrefs[i].className = 'tabon';
			}
			if(!hrefs[i].getAttribute('ajaxtarget')) hrefs[i].onclick = function() {
				if(menuContainerid != 'custommenu') {
					var lis = $(menuContainerid).getElementsByTagName('li');
					for(var k = 0; k < lis.length; k++) {
						if(lis[k].firstChild.className != 'menulink') lis[k].firstChild.className = '';
					}
					if(this.className == '') this.className = menuContainerid == 'leftmenu' ? 'tabon' : 'bold';
				}
				if(menuContainerid != 'leftmenu') {
					var hk, currentkey;
					var leftmenus = $('leftmenu').getElementsByTagName('a');
					for(var j = 0; j < leftmenus.length; j++) {
						hk = leftmenus[j].parentNode.parentNode.id.substr(5);
						if(this.href.indexOf(leftmenus[j].href) != -1) {
							leftmenus[j].className = 'tabon';
							if(hk != 'index') currentkey = hk;
						} else {
							leftmenus[j].className = '';
						}
					}
					if(currentkey) toggleMenu(currentkey);
					hideMenu();
				}
			}
		}
		return key;
	}
	var header_key = initCpMenus('leftmenu');
	toggleMenu(header_key ? header_key : 'index');
	function initCpMap() {
		var ul, hrefs, s;
		s = '<ul class="cnote"><li><img src="images/admincp/btn_map.gif" /></li><li> 按 “ ESC ” 键展开 / 关闭此菜单</li></ul><table class="cmlist" id="mapmenu"><tr>';

		for(var k in headers) {
			if(headers[k] != 'index') {
				s += '<td valign="top"><ul class="cmblock"><li><h4>' + $('header_' + headers[k]).innerHTML + '</h4></li>';
				ul = $('menu_' + headers[k]);
				hrefs = ul.getElementsByTagName('a');
				for(var i = 0; i < hrefs.length; i++) {
					s += '<li><a href="' + hrefs[i].href + '" target="' + hrefs[i].target + '" k="' + headers[k] + '">' + hrefs[i].innerHTML + '</a></li>';
				}
				s += '</ul></td>';
			}
		}
		s += '</tr></table>';
		return s;
	}
	$('cmain').innerHTML = initCpMap();
	initCpMenus('mapmenu');
	var cmcache = false;
	function showMap() {
		showMenu('cpmap', true, 3, 3);
		if(!cmcache) ajaxget('admincp.php?action=misc&operation=custommenu&' + Math.random(), 'custommenu', '');
	}
	function resetEscAndF5(e) {
		e = e ? e : window.event;
		actualCode = e.keyCode ? e.keyCode : e.charCode;
		if(actualCode == 27) {
			if($('cpmap_menu').style.display == 'none') {
				showMap();
			} else {
				hideMenu();
			}
		}
		if(actualCode == 116 && parent.main) {
			parent.main.location.reload();
			if(document.all) {
				e.keyCode = 0;
				e.returnValue = false;
			} else {
				e.cancelBubble = true;
				e.preventDefault();
			}
		}
	}
	_attachEvent(document.documentElement, 'keydown', resetEscAndF5);
</script>

</body>
</html>
