% set Conn=Server.CreateObject ("Adodb.Connection") Conn.ConnectionString = Application("BC_ConnectionString") Conn.Open if request("method")="logout" then session.abandon response.redirect "mainnew.asp" response.end end if y = year(date) m = right("0" & month(date), 2) d = right("0" & day(date), 2) set tuijianrs=Server.CreateObject ("Adodb.Recordset") Sql="Select * from tuijian " tuijianrs.Open Sql,Conn,2,3 if request("method")="add" then if Request.Form("log")<>"" and request.form("password")<>"" and not instr(request.form("nickname"),"'")>0 then set clubrs=Server.CreateObject ("Adodb.Recordset") Sql="select * from club where Nickname='"&trim(Request.Form("nickname"))&"' and Password='"&trim(Request.Form("password"))&"'" clubrs.Open Sql,Conn if clubrs.EOF and clubrs.BOF then Response.Write "" response.write "" Response.End else session("ID")=clubrs("ID") session("cusname")=clubrs("Nickname") session("email")=clubrs("Email") session("author")=clubrs("author") if clubrs("thenday")<>y&m&d then Conn.execute ("update club set tuijian=2 where Id="&(session("ID"))) end if Conn.execute ("update club set thenday="&y&m&d&" where Id="&(session("ID"))) response.write "" end if clubrs.close end if end if %>