<%
Dim dtStartTime, dtEndTime
dtStartTime = Timer()
Dim g_SiteName, g_SiteDomain, g_BodyTag, g_DBString, g_ErrFile, g_ScriptName
g_SiteName = Application("SiteName") '配置站点名称
g_SiteDomain = Application("SiteDomain")  '配置站点域名
g_BodyTag = Application("BodyTag")
g_DBString = Application("DBString")
g_ErrFile = Application("ErrFile")
g_ScriptName = Request.ServerVariables("SCRIPT_NAME")

Sub err(sErr)
	Response.Write "<html>" & _
			"<head>" & _
			"<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"">" & _
			"<link rel=""stylesheet"" href=""site.css"" type=""text/css"">" & _
			"</head>"
	Response.Write "<body " & g_BodyTag & " style=""color:red;font-size:10.5pt"">"
	Response.Write sErr & _
			"</body>" & _
			"</html>"
	Response.End
End Sub

Sub CheckAdminLogin()
	If Request.Cookies("AdminLoged") <> "True" Then
		Response.Redirect "m_login.asp?URL=" & g_ScriptName & "?" & Request.ServerVariables("QUERY_STRING")
	End If
End Sub

Sub RunTime()
	dtEndtime = Timer()
	Response.Write "页面执行时间：" & FormatNumber((dtEndTime-dtStartTime)*1000,3) & "毫秒"
End Sub

Function ConvertHTML(content)
	'content = Server.HTMLEncode(Content)'对文本段进行HTML编码
	content = Replace(Content," ","&nbsp;")'将空格转为HTML
	content = Replace(Content,chr(10),"<br>")'将换行转为HTML
	content = Replace(Content,chr(9),"&nbsp;&nbsp;&nbsp;&nbsp;")'将Tab转为空格
	convertHTML = content
End Function
%>