<% If RequestQueryStr("action")="LOGOUT" Then session("admin")="" session("role")="" Response.Redirect ("../index.asp") 'Call MessageBox("退出成功","../index.asp") End If Dim MyValue Randomize MyValue = Int((9999 - 1000 + 1) * Rnd + 1000) If RequestFormStr("action")="LOGIN" then admin=RequestFormStr("admin") password=RequestFormStr("password") checkcode=RequestFormNum("checkcode") checkcodeO=RequestFormNum("checkcodeO") If admin="" Then Call MessageBox("用户名不能为空!","") Response.End End If If password="" Then Call MessageBox("密码不能为空!","") Response.End End If If checkcode <> checkcodeO Then Call MessageBox("验证码不正确!","") Response.End End If Set rs=conn.Execute("Select * From admin Where admin='"& admin &"' and password='"& md5(password) &"'") If rs.eof And rs.bof Then Call MessageBox("用户名或密码不正确!","") Response.End Else session("admin")=admin session("role")=rs("role") session.timeOut=60 Response.Redirect("index.asp") End If End If %> 墨默设计V3.0_后台管理



用户名
密   码
验证码  <%=MyValue%>