在ASP后台管理中,验证码如何去掉
已经删除default.asp中的值:<tdwidth="29%">验证码:<br><inputname=passcodetype=textclass="input_sr...
已经删除default.asp中的值:
<td width="29%">验证码:<br>
<input name=passcode type=text class="input_sr" id=passcode size="5" maxlength="4">
<img src="code.asp">
文件b2b_cadmin.asp中,源码如下:
<!--#include file="conn.asp"-->
<!--#include file="b2bsys.asp"-->
<%dim admin,UserPassword,passcode
admin=FormatSQL(replace(trim(request.form("admin")),"'",""))
UserPassword=md5(FormatSQL(replace(trim(request.Form("UserPassword")),"'","")))
if admin="" or UserPassword="" then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!请检查您的登录名和密码!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
passcode=Cint(request.form("passcode"))
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where UserPassword='"&UserPassword&"' and admin='"&admin&"' " ,conn,1,1
if rs.bof and rs.eof then
response.write "<script LANGUAGE='javascript'>alert('你的用户名或者密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
else
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
if UserPassword=rs("UserPassword") and admin=rs("admin") then
session("admin")=trim(rs("admin"))
session("rank")=int(rs("rank"))
session.Timeout=300
response.Cookies("Buy2Buy")("admin")=trim(request.form("admin"))
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.Redirect "main.asp"
else
response.write "<script LANGUAGE='javascript'>alert('你的密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
end if
end if
%>
请问要去掉哪些项才可以正常使用? 展开
<td width="29%">验证码:<br>
<input name=passcode type=text class="input_sr" id=passcode size="5" maxlength="4">
<img src="code.asp">
文件b2b_cadmin.asp中,源码如下:
<!--#include file="conn.asp"-->
<!--#include file="b2bsys.asp"-->
<%dim admin,UserPassword,passcode
admin=FormatSQL(replace(trim(request.form("admin")),"'",""))
UserPassword=md5(FormatSQL(replace(trim(request.Form("UserPassword")),"'","")))
if admin="" or UserPassword="" then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!请检查您的登录名和密码!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
passcode=Cint(request.form("passcode"))
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where UserPassword='"&UserPassword&"' and admin='"&admin&"' " ,conn,1,1
if rs.bof and rs.eof then
response.write "<script LANGUAGE='javascript'>alert('你的用户名或者密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
else
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
if UserPassword=rs("UserPassword") and admin=rs("admin") then
session("admin")=trim(rs("admin"))
session("rank")=int(rs("rank"))
session.Timeout=300
response.Cookies("Buy2Buy")("admin")=trim(request.form("admin"))
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.Redirect "main.asp"
else
response.write "<script LANGUAGE='javascript'>alert('你的密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
end if
end if
%>
请问要去掉哪些项才可以正常使用? 展开
5个回答
展开全部
去掉
<td width="29%">验证码:<br>
<input name=passcode type=text class="input_sr" id=passcode size="5" maxlength="4">
<img src="code.asp">
还有这几句:
passcode=Cint(request.form("passcode"))
else
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
<td width="29%">验证码:<br>
<input name=passcode type=text class="input_sr" id=passcode size="5" maxlength="4">
<img src="code.asp">
还有这几句:
passcode=Cint(request.form("passcode"))
else
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
展开全部
删除
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
去掉
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
passcode=Cint(request.form("passcode"))
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
passcode=Cint(request.form("passcode"))
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
if not isnumeric(request.form("passcode")) then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
passcode=Cint(request.form("passcode"))
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where UserPassword='"&UserPassword&"' and admin='"&admin&"' " ,conn,1,1
if rs.bof and rs.eof then
response.write "<script LANGUAGE='javascript'>alert('你的用户名或者密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
else
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
改成
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where UserPassword='"&UserPassword&"' and admin='"&admin&"' " ,conn,1,1
if rs.bof and rs.eof then
response.write "<script LANGUAGE='javascript'>alert('你的用户名或者密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
else
response.Write "<script LANGUAGE='javascript'>alert('登录成功');</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码必须是数字,请正确填写!');history.go(-1);</script>"
conn.Close
set conn=nothing
response.end
end if
passcode=Cint(request.form("passcode"))
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where UserPassword='"&UserPassword&"' and admin='"&admin&"' " ,conn,1,1
if rs.bof and rs.eof then
response.write "<script LANGUAGE='javascript'>alert('你的用户名或者密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
else
if passcode<>Session("GetCode") then
response.Write "<script LANGUAGE='javascript'>alert('登录失败!验证码错误!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
改成
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [admin] where UserPassword='"&UserPassword&"' and admin='"&admin&"' " ,conn,1,1
if rs.bof and rs.eof then
response.write "<script LANGUAGE='javascript'>alert('你的用户名或者密码错误,登录失败!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
else
response.Write "<script LANGUAGE='javascript'>alert('登录成功');</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这都不会?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询