<!--#include file="../inc/config_conn_root.asp" -->
<!--#include file="../inc/class_functions.asp" -->
<!--#include file="../inc/class_template.asp" -->
<!--#include file="../inc/class_system_object.asp" -->
<%
session.Timeout=120

dim MySys
dim rs
dim template
dim object
dim functions

set functions=new sitefunctions
set template=new sitetemplate
set object= new sitesystemobject

set MySys=Server.CreateObject("FB_EM_SQL_Site.SiteSystem")
'set site=Server.CreateObject("FB_EM_Site.SiteRoot")

MySys.GetMySys(MySys)
MySys.GetTemplate(Template)
MySys.GetFunctions(functions)
MySys.GetObject(object)

if notadmincheck<>1 then
	if session("FB_EM_1_SQL_sys_admin_name")<>"" and session("FB_EM_1_SQL_sys_admin_password")<>"" then 
		if not MySys.GetAdminInfo(MySys.CheckAdmin(session("FB_EM_1_SQL_sys_admin_name"),session("FB_EM_1_SQL_sys_admin_password"))) then
		'if not MySys.GetAdminInfo(12) then
		MySys.error.info=MySys.error.info+"用户权限检测出现错误！"
		MySys.error.location="admin/admin_login.asp"
		MySys.error.err
		end if
	else
		MySys.error.info=MySys.error.info+"您还未登录！"
		MySys.error.location="admin/admin_login.asp"
		MySys.error.err
	end if
	

	MySys.CheckFileGrade(MySys.file_request) '请求页面权限检测
		
	set rs=server.createobject("adodb.recordset")
end if


if headdisplay<>1 then
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=MySys.object_request%></title>
<link rel="stylesheet" href="../inc/css/admin_style.css" type="text/css">
</head>
<script  language="javascript">
function openedit(formname,inputname){
	edit_html.c.value=document.getElementById(inputname).value;
	edit_html.formname.value=formname;
	edit_html.inputname.value=inputname;
	edit_html.action='admin_edit_html.asp';
	newwin=window.open('admin_edit_html.asp','admin_edit_html','toolbar=no,location=no,status=no, menubar=no,scrollbars=yes,resizable=no,width=600,height=600');
	edit_html.submit();
	newwin.focus();
	
}
function openedit_template(formname,inputname,cc,id,aa,des,tw){
	edit_template.c.value=document.getElementById(inputname).value;
	if(document.getElementById("label_sql"))edit_template.c_sql.value=document.getElementById("label_sql").value;
	edit_template.formname.value=formname;
	edit_template.inputname.value=inputname;
	if (id!=''){
		edit_template.action='admin_edit_template.asp?tools_word='+tw+'&des='+des+'&mark='+id+'='+aa+'&show='+cc;
		newwin=window.open('admin_edit_template.asp?tools_word='+tw+'&des='+des+'&mark='+id+'='+aa+'&show='+cc ,'admin_edit_template_'+formname+'_'+inputname+'_'+aa ,'toolbar=no,location=no,status=yes, menubar=no,scrollbars=no,resizable=yes,width=800,height=600');
	}else{
		edit_template.action='admin_edit_template.asp?tools_word='+tw+'&des='+des+'&show='+cc;
		newwin=window.open('admin_edit_template.asp?tools_word='+tw+'&des='+des+'&show='+cc ,'admin_edit_template_'+formname+'_'+inputname+'_'+aa ,'toolbar=no,location=no,status=yes, menubar=no,scrollbars=no,resizable=yes,width=800,height=600');
	}
	newwin.moveTo(0,0)
	newwin.resizeTo(screen.availWidth,screen.availHeight)
	edit_template.target='admin_edit_template_'+formname+'_'+inputname+'_'+aa;
	edit_template.submit();
	newwin.focus();
}

function openedit_sql(formname,inputname){
	edit_sql.c.value=document.getElementById(inputname).value;
	edit_sql.formname.value=formname;
	edit_sql.inputname.value=inputname;
	edit_sql.action='admin_edit_sql.asp';
	<%
	if request("target_window")="" then
	target_window="admin_edit_sql_"&year(now())&month(now())&day(now())&hour(now())&minute(now())&second(now())
	else
	target_window=request("target_window")
	end if
	%>
	newwin=window.open('admin_edit_sql.asp','<%=target_window%>','toolbar=no,location=no,status=no, menubar=no,scrollbars=yes,resizable=no,width=800,height=650');
	edit_sql.target='<%=target_window%>';
	edit_sql.submit();
	newwin.focus();
}

</script>
<%
end if

if guidedisplay<>1 then MySys.GuideShow(MySys.GuideList(MySys.file_request))
%>
