<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Config.asp"-->
<!--#include file="Function.asp"-->
<%	
	dim conn,connstr,db
	dim admintable

	tbname="Angel_asp" '数据表前缀

	db=SitePath&"Data/"&DataName
	on error resume next
	Set conn = Server.CreateObject("ADODB.Connection")
	connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
	conn.Open connstr
	If Err Then
	err.Clear
	Set Conn = Nothing
	Response.Write "<div style='margin:100px;font-size:14px;text-align:center'>数据库连接出错，请检查Inc/Config.Asp里的数据库名称及路径是否正确。</div>"
	Response.End
	End If
	
	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 "&tbname&"_User where id="& Angel_aspRequest(Angel_aspID) &" and PassWord='"&CheckStr(Angel_aspPass)&"' and UserName='"&CheckStr(Angel_aspName)&"'"
	on error resume next
	rs4.open sql,conn,1,1
	mymoney=rs4("UserMoney")
	username=rs4("UserName")
	dengjipic=rs4("dengjipic")
	dengji=rs4("dengji")
	UserPass=rs4("PassWord")
	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
	
Sub ShowAD(ID)
	set rsad=conn.execute("select * from "&tbname&"_AD Where ID = "&ID&"")
	If Not rsad.Eof Then
	If rsad("yn")=1 then
	Response.Write(angel_asp(rsad("Content")))
	End if
	End if
	rsad.close
	set rsad=nothing
End Sub
'请保留我们的版权信息，否则不能为您提供技术支持服务
'再次感谢您的支持和关心
'这里不影响您的使用
Sub Label(ID)
	set rsLabel=conn.execute("select * from "&tbname&"_Label Where ID = "&ID&"")
	If ID=2 then
	Response.Write("<li><font color=#CCCCCC>技术支持：</font><a href=""http://ww"&"w.ang"&"el"&"asp.com/""  target=""_blank""><font color=#B9B9B9>Angel工作室</font></a></li>"&rsLabel("Content")&"")
	else
	Response.Write(rsLabel("Content"))
	End if
	rsLabel.close
	set rsLabel=nothing
End Sub
%>