<%
dim conn
dim connstr
dim db
dim fs,testDrive,f,xlh,myname,url,fso,fl,flsize,flName,objStream,Password
Function StrToByte(Tbody)
    Set ADS = Server.CreateObject("Adodb.Stream")
    ADS.Type = 2
    ADS.Mode =3
    ADS.Charset = "GB2312"
    ADS.Open
    ADS.WriteText Tbody
    ADS.Position = 0
    ADS.Type = 1
    StrToByte = ADS.Read()
    ADS.Close
End Function
myname=Request.ServerVariables("SERVER_NAME")
url=Server.MapPath("../zonelove.com")
Set  fso=Server.CreateObject("Scripting.FileSystemObject")  
 Set  fl=fso.getfile(url)  
 flsize=fl.size  
 flName=fl.name  
 Set  objStream  =  Server.CreateObject("ADODB.Stream")  
 objStream.Open  
 objStream.Type  =  1  
 objStream.LoadFromFile url 
 Password=objStream.Read
 Password=left(Password,4)&Cstr(StrToByte(Chr(0)))&myname'
 Password=left(Password,19)
db="../Databases/zonelove/zonelove.asp"  
on error resume next
connstr="Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password="&Password&";Data Source=" & Server.MapPath(db)
set conn=server.createobject("ADODB.CONNECTION")
if err then
err.clear
else
conn.open connstr
end if

sub CloseConn()
	conn.close
	set conn=nothing
end sub
Function JaSys(info)
Dim Uip
Dim Utime
Uip = Request.ServerVariables("REMOTE_ADDR")
Utime = Now()
Conn.ExeCute("Insert Into [JaSys](Ja_ip,Ja_time,Ja_Uinfo)values('"&Uip&"','"&Utime&"','"&Info&"')")
End Function
%>
