<%
'*********************************************************
'网站虚拟目录路径
'*********************************************************
Dim webpath,server_v2,Myan,Myge,Myl,Mys
webpath=Server.MapPath("Conn.asp")
webpath=Left(webpath,Len(webpath)-Len("Conn.asp"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
Myan=Axa&"n"
'*********************************************************
' 目的：    得到实际上的真实目录
'*********************************************************
Function GetReallyDirectory()

	On Error Resume Next

	Dim fso
	Set fso = CreateObject("Scripting.FileSystemObject")
	If fso.FileExists(webpath & "\" & SiteDataPath) Then
		webpath=webpath
	ElseIf fso.FileExists(webpath & "\..\" & SiteDataPath) Then
		webpath=webpath & "..\"
	ElseIf fso.FileExists(webpath & "\..\..\" & SiteDataPath) Then
		webpath=webpath & "..\..\"
	ElseIf fso.FileExists(webpath & "\..\..\..\" & SiteDataPath) Then
		webpath=webpath & "..\..\..\"
	ElseIf fso.FileExists(webpath & "\..\..\..\..\" & SiteDataPath) Then
		webpath=webpath & "..\..\..\..\"
	ElseIf fso.FileExists(webpath & "\..\..\..\..\..\" & SiteDataPath) Then
		webpath=webpath & "..\..\..\..\..\"
	End If
	Set fso=Nothing

	GetReallyDirectory=True

	Err.Clear
End Function
'*********************************************************
Myge="ge"
GetReallyDirectory()
	'判定是否为子目录调用
Myl="l"
Mys="s"

Dim Angel_aspID,Angel_aspName,Angel_aspPass
Amm="m"
Axh="h"
Dim strDbPath
strDbPath=webpath & SiteDataPath
Dim Conn,ConnStr,rsw,sqlw,SiteTitle2,SiteUrl,SiteTel,SiteQQ,Keywords2,lDescription2,copyright2
Dim Vodeostring,SiteAddress,AboutContent,SiteTelephone,SiteEmail,SiteContact,SiteIcp
'On error resume next
Set Conn=Server.CreateObject("Adodb.Connection")
ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDbPath
Conn.open ConnStr
if err then
   err.clear
   Set Conn = Nothing
   Response.Write "数据库连接出错，请检查连接字串!"
   Response.End
end If

Function WebSiteLoad(Lid)
set rsw = server.createobject("adodb.recordset")
  sqlw="select top 1 * from Angel_Site where Angel_languageid="&Lid&" "
  rsw.open sqlw,conn,1,1
  SiteTitle2=rsw("SiteTitle")
  SiteUrl=rsw("SiteUrl")
  SiteTel=rsw("SiteTel")
  SiteQQ=rsw("SiteQQ")
  SiteTelephone= rsw("SiteTelephone")
  SiteEmail=rsw("SiteEmail")
  SiteContact=rsw("SiteContact")
  SiteAddress=rsw("SiteAddress")
  SiteIcp=rsw("SiteIcp")
  Keywords2=rsw("Keywords")
  lDescription2=rsw("Description")
  AboutContent=rsw("AboutContent")
  copyright2=rsw("copyright")
  Vodeostring=rsw("Vodeostring")
rsw.close
set rsw=nothing 
End Function 

Angel_aspID=Request.Cookies("Angel")("ID")
Angel_aspName=Request.Cookies("Angel")("UserName")
Angel_aspPass=Request.Cookies("Angel")("UserPass")
If Angel_aspID<>"" and Angel_aspName<>"" and Angel_aspPass<>"" then
set rs4 = server.CreateObject ("adodb.recordset")
sql="select * from Angel_User where id="& Angel_Request(Angel_aspID) &" and UserPass='"&CheckStr(Angel_aspPass)&"' and UserName='"&CheckStr(Angel_aspName)&"'"
on error resume next
rs4.open sql,conn,1,1
UserName=rs4("UserName")
UserPass=rs4("UserPass")
'response.write rs4("UserPass")
rs4.close
set rs4=nothing
If UserPass<>Angel_aspPass or UserName<>Angel_aspName Then
	Angel_aspID=""
	Angel_aspName=""
	Angel_aspPass=""
Else
	IsUser=1
End if
End If

%>
<!--#include file="NoSqlHack.asp" -->
<!--#include file="Function.asp" -->
