这是check里面校验代码,我想把它改为输入任何用户名和密码都能进入主菜单,怎么改啊???
<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<%
UserName=Request.Form("Name")
Password_0=Request.Form("Password")
Password_1=md5(Password_0,32)
Password_2=md5(Password_1,32)
CheckCode=Request("CheckCode")
%>
<% if CheckCode<>CStr(session("CheckCode")) then
response.write "<script language=javascript>alert('您没有输入验证码或者验证码错误!');history.back(-1)</script>"
response.write"<meta http-equiv='refresh' content='2;URL=index.asp'>"
Response.End
End If
%>
<%
'定义变量,打开记录集
exec="select * from Admin_List where UserName='"&UserName&"'"
set LoginRS=server.createobject("adodb.recordset")
LoginRS.open exec,conn,1,1
'下面进行帐号的合法检验,如果记录集LoginRS 没有记录,那么将页面重定向到
'login.asp.如果帐号的信息赋值给变量Sesion,并且将页面定向到main.asp.
IF LoginRS.Eof then
response.write "<script language=javascript>alert('用户名不对!');history.back(-1)</script>"
response.write"<meta http-equiv='refresh' content='2;URL=index.asp'>"
Response.End
Else
IF Password_2=LoginRS("Password")Then
Session("User")=LoginRS("UserName")
Response.Redirect("main.asp")
End IF
if LoginRS("Password")<>Password_2 then
response.write "<script language=javascript>alert('密码不对!');history.back(-1)</script>"
response.write"<meta http-equiv='refresh' content='2;URL=index.asp'>"
Response.End
End If
End IF
'释放对象
Set RS=Nothing
%>
这是check里面校验代码,我想把它改为输入任何用户名和密码都能进入主菜单,怎么改啊???
[ 此贴被pioneer在2007-10-03 11:47重新编辑 ]