<%Session("eWebEditor_User") = session("admin")

If Session("eWebEditor_User") = "" Then
  		response.write"<script>window.open('"&application("cityurl")&application("cityadmin")&"index.asp','_parent')</script>"
End If

dim fla,fla14
fla=split(session("adminflag"),",")
fla14=fla(14)

if fla14<>1 then
response.write "<script>alert('操作权限出错，您没有权限操作些功能');history.go(-1);</Script>"
Response.End 
end if

' 执行每天只需处理一次的事件
Call BrandNewDay()

' 初始化数据库连接
Call DBConnBegin()

' 公用变量
Dim sAction, sPosition
sAction = UCase(Trim(Request.QueryString("action")))
sPosition = " "

' ********************************************
' 以下为页面公用区函数
' ********************************************
' ============================================
' 输出每页公用的顶部内容
' ============================================
Sub Header()
	Response.Write "<html><head>"
	Response.Write "<link rel='stylesheet' type='text/css' href='admin/style.css'>"
	Response.Write "<script language='javaScript' SRC='admin/private.js'></SCRIPT>"
	Response.Write "</head>"
	Response.Write "<body style=""margin:10"">"
	
	Response.Write "<a name=top></a>"
	

	' 页面左边内容
	Response.Write "<table border=0 width=100% cellpadding=0 cellspacing=5 align=center style=""border:1px #00639C solid""><tr valign=top><td>" & _
		"<table border=0 cellpadding=0 cellspacing=0 width='100%'><tr><td>" & sPosition & "</td></tr></table>"

End Sub

' ============================================
' 输出每页公用的底部内容
' ============================================
Sub Footer()
	' 释放数据连接对象
	Call DBConnEnd()
	Response.Write "</td></tr></table>"
	Response.Write "</body></html>"
End Sub
' ===============================================
' 初始化下拉框
'	s_FieldName	: 返回的下拉框名	
'	a_Name		: 定值名数组
'	a_Value		: 定值值数组
'	v_InitValue	: 初始值
'	s_Sql		: 从数据库中取值时,select name,value from table
'	s_AllName	: 空值的名称,如:"全部","所有","默认"
' ===============================================
Function InitSelect(s_FieldName, a_Name, a_Value, v_InitValue, s_Sql, s_AllName)
	Dim i
	InitSelect = "<select name='" & s_FieldName & "' size=1>"
	If s_AllName <> "" Then
		InitSelect = InitSelect & "<option value=''>" & s_AllName & "</option>"
	End If
	If s_Sql <> "" Then
		oRs.Open s_Sql, oConn, 1, 1
		Do While Not oRs.Eof
			InitSelect = InitSelect & "<option value=""" & inHTML(oRs(1)) & """"
			If oRs(1) = v_InitValue Then
				InitSelect = InitSelect & " selected"
			End If
			InitSelect = InitSelect & ">" & outHTML(oRs(0)) & "</option>"
			oRs.MoveNext
		Loop
		oRs.Close
	Else
		For i = 0 To UBound(a_Name)
			InitSelect = InitSelect & "<option value=""" & inHTML(a_Value(i)) & """"
			If a_Value(i) = v_InitValue Then
				InitSelect = InitSelect & " selected"
			End If
			InitSelect = InitSelect & ">" & outHTML(a_Name(i)) & "</option>"
		Next
	End If
	InitSelect = InitSelect & "</select>"
End Function


%>