<%@language=vbscript codepage=936 %> <% option explicit response.buffer=true dim conn,connstr dim master Set Conn=Server.CreateObject("ADODB.Connection") 'Connstr="DBQ="+server.mappath("db/ly.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;ImplicitCommitSync=Yes;MaxBufferSize=512;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes;" 'connstr="DBQ=" & server.mapPath("db/global.asa") & ";DRIVER={Microsoft Access Driver (*.mdb)};" connstr ="Provider = Microsoft.Jet.OLEDB.4.0; Data Source ="& Server.MapPath("db/global.asa") Conn.Open connstr sub connclose conn.close set conn=nothing end sub sub rsclose rs.close set rs=nothing end sub function encodestr(str) dim i str=trim(str) str=replace(str,"<","<") str=replace(str,">",">") str=replace(str,"'","""") str=replace(str,vbCrLf&vbCrlf,"

") str=replace(str,vbCrLf,"
") encodestr=replace(str," ","กก") end function master=getMaster function getMaster() dim rs, sql,str,LF LF=chr(10) sql="select name from blyh where bz=1" set rs=conn.execute(sql) if not (rs.eof and rs.bof ) then str=rs(0) rs.movenext do until rs.eof str=str & LF & rs(0) rs.movenext loop end if rs.close set rs=nothing getMaster=split(str,LF) 'response.write str end function function isMaster(name) dim i isMaster=false for i=0 to ubound(master) if master(i)=name then isMaster=true exit function end if next end function class users dim name,pass,reged,master,male,face,email,qq,url private sub class_initialize() dim rs,sql name=request.cookies("gbook")("username") pass=request.cookies("gbook")("password") if name="" or pass="" then reged=false master=false male=true else sql="select top 1 * from blyh where name='"&name&"' and pass='"&pass&"' " set rs=conn.execute(sql) if rs.eof and rs.bof then reged=false master=false male=true else reged=true male=rs("male") face=rs("face") email=rs("email") qq=rs("qq") url=rs("url") if rs("bz")=1 then master=true end if end if rs.close set rs=nothing end if end sub end class dim theUser set theUser=new users %>