% if session("UserLogin")<>"AsaiUser" then if Request("Type")="Login" then if Trim(Request("Code"))=Session("UserCode") then set rs=server.createobject("adodb.recordset") sql="select Id,User,Head,Pic,Editor,Vip,LoginCount,LastTime,Ip from User where User='"&trim(request("User"))&"'" '查找用户信息 rs.open sql,cnn,3,2 if not rs.eof then if rs("Password")=md5(trim(request("Password"))) then '判断密码是否正确 session("UserLogin")="AsaiUser" session("Id")=rs("Id") session("User")=rs("User") session("Head")=rs("Head") session("Editor")=rs("Editor") session("Vip")=rs("Vip") rs("LoginCount")=rs("LoginCount")+1 rs("LastTime")=trim(request("LastTime")) rs("Ip")=request.ServerVariables("remote_host") rs.update Response.Redirect "Login.asp" else Response.Write "" end if else Response.Write "" end if set rs=nothing '关闭纪录集,释放所占资源 cnn.close '关闭连结对象 set cnn=nothing '释放所占资源 else Response.Write "" end if end if %>
<% else set rs9=server.createobject("adodb.recordset") '创建纪录集 sql9="select * from User where id="&Session("Id")&"" '查找用户信息 rs9.open sql9,cnn,1,2 %>尊敬的<%=rs9("User")%>您好!
<%=ad5%> <%=ad6%> 安全退出
<% set rs9=nothing end if %>