在ASP后台管理中,验证码如何去掉

这是Admin_Login.asp里面的<!--#includefile="Inc.asp"--><!--#includefile="inc/md5.asp"--><!D... 这是 Admin_Login.asp 里面的
<!--#include file="Inc.asp"-->
<!--#include file="inc/md5.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel=stylesheet type=text/css href="Inc/94kk.css" />
<title></title>
</head>
<body>
<%Dim Action
Action=request.querystring("Action")
Select Case Action
Case"exit"
ExitLogin()
Case"login"
CheckLogin()
Case Else
Main()
End select
Set BBS94KK=Nothing

Sub Main()
Response.Write""&_
"<form method=POST action='?action=login'>"&_
"<div class='mian' style='width:400px;margin-top:50px'>"&_
"<div class='top'></div><div class='divtr1' style='height:100px'><div style='height:34px'><br />"&_
"<div style='margin-left:50px'>用户名称:<input name='AdminName' type=text size='22' style='width:120px'></div></div>"&_
"<div style='height:24px'><div style='margin-left:50px'>后台密码:<input name='Password' type=password size='22' style='width:120px'></div></div>"&_
"<div style='height:24px'><div style='margin-left:50px'>验证号码:"&BBS94KK.GetSafeCode&"</div></div></div> "&_
"<div class='bottom'><input type='submit' class='button' value='提 交'></div></div></form></body></html>"
End Sub

Sub CheckLogin()
Dim AdminName,AdminPassword,PassCode,Temp
With BBS94KK
AdminName=.Fun.GetStr("AdminName")
AdminPassword=.Fun.GetStr("Password")
PassCode=.Fun.GetStr("SafeCode")
If PassCode="" or AdminName="" or AdminPassword="" Then .Alert"请输入完整后再提交!","Admin_login.asp"
If not .Fun.CheckName(AdminName) or not .Fun.CheckPassword(AdminPassword) then
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误!","Admin_login.asp"
End if
AdminPassword=Md5(AdminPassword)
If .SafeBuckler(AdminName,.MyIP,0) Then .Alert"BBS安全盾已启动!\n对不起,你尝试登陆错误超过5次,今天不能再登陆后台。\n你的信息已被系统记录!","Index.asp"
If .execute("select name From [KK_admin] where name='"&AdminName&"' And Password='"&AdminPassword&"' And boardID=0").eof Or Session("SafeCode")<>PassCode Then
Session("SafeCode")=Empty
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误或者随机验证码错误!","Admin_login.asp"
Else
.LetMemor "Admin","AdminName",AdminName
.LetMemor "Admin","AdminPassword",AdminPassword
.MyName=AdminName
.NetLog"成功登陆后台"
If .Info(16)="1" Then .execute("delete from [KK_Log] where DATEDIFF('d', LogTime,'"&.NowBBSTime&"')>7")
Session("SafeCode")=Empty
Response.Redirect"Admin_index.asp"
Response.End
End if
End With
End Sub

Sub ExitLogin()
Session(CacheName &"AdminName") = Empty
Response.Cookies(CacheName &"Admin")("AdminName")= Empty
Session(CacheName &"AdminName") = Empty
Response.Cookies(CacheName &"Admin")("AdminPassword")= Empty
'Session.Abandon
Response.redirect"Index.asp"
End Sub
%>
展开
 我来答
北片0
2008-05-21 · TA获得超过152个赞
知道小有建树答主
回答量:252
采纳率:0%
帮助的人:129万
展开全部
SafeCode 把与这个有关的都去掉,就可以了吧

*****************************************
<!--#include file="Inc.asp"-->
<!--#include file="inc/md5.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel=stylesheet type=text/css href="Inc/94kk.css" />
<title></title>
</head>
<body>
<%Dim Action
Action=request.querystring("Action")
Select Case Action
Case"exit"
ExitLogin()
Case"login"
CheckLogin()
Case Else
Main()
End select
Set BBS94KK=Nothing

Sub Main()
Response.Write""&_
"<form method=POST action='?action=login'>"&_
"<div class='mian' style='width:400px;margin-top:50px'>"&_
"<div class='top'></div><div class='divtr1' style='height:100px'><div style='height:34px'><br />"&_
"<div style='margin-left:50px'>用户名称:<input name='AdminName' type=text size='22' style='width:120px'></div></div>"&_
"<div style='height:24px'><div style='margin-left:50px'>后台密码:<input name='Password' type=password size='22' style='width:120px'></div></div>"&_
"<div class='bottom'><input type='submit' class='button' value='提 交'></div></div></form></body></html>"
End Sub

Sub CheckLogin()
Dim AdminName,AdminPassword,PassCode,Temp
With BBS94KK
AdminName=.Fun.GetStr("AdminName")
AdminPassword=.Fun.GetStr("Password")
If AdminName="" or AdminPassword="" Then .Alert"请输入完整后再提交!","Admin_login.asp"
If not .Fun.CheckName(AdminName) or not .Fun.CheckPassword(AdminPassword) then
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误!","Admin_login.asp"
End if
AdminPassword=Md5(AdminPassword)
If .SafeBuckler(AdminName,.MyIP,0) Then .Alert"BBS安全盾已启动!\n对不起,你尝试登陆错误超过5次,今天不能再登陆后台。\n你的信息已被系统记录!","Index.asp"
If .execute("select name From [KK_admin] where name='"&AdminName&"' And Password='"&AdminPassword&"' And boardID=0").eof
then
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误或者随机验证码错误!","Admin_login.asp"
Else
.LetMemor "Admin","AdminName",AdminName
.LetMemor "Admin","AdminPassword",AdminPassword
.MyName=AdminName
.NetLog"成功登陆后台"
If .Info(16)="1" Then .execute("delete from [KK_Log] where DATEDIFF('d', LogTime,'"&.NowBBSTime&"')>7")
Response.Redirect"Admin_index.asp"
Response.End
End if
End With
End Sub

Sub ExitLogin()
Session(CacheName &"AdminName") = Empty
Response.Cookies(CacheName &"Admin")("AdminName")= Empty
Session(CacheName &"AdminName") = Empty
Response.Cookies(CacheName &"Admin")("AdminPassword")= Empty
'Session.Abandon
Response.redirect"Index.asp"
End Sub
%>
六十七返璞归真
推荐于2016-10-19 · TA获得超过1501个赞
知道大有可为答主
回答量:1854
采纳率:0%
帮助的人:1454万
展开全部
<!--#include file="Inc.asp"-->
<!--#include file="inc/md5.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel=stylesheet type=text/css href="Inc/94kk.css" />
<title></title>
</head>
<body>
<%Dim Action
Action=request.querystring("Action")
Select Case Action
Case"exit"
ExitLogin()
Case"login"
CheckLogin()
Case Else
Main()
End select
Set BBS94KK=Nothing

Sub Main()
Response.Write""&_
"<form method=POST action='?action=login'>"&_
"<div class='mian' style='width:400px;margin-top:50px'>"&_
"<div class='top'></div><div class='divtr1' style='height:100px'><div style='height:34px'><br />"&_
"<div style='margin-left:50px'>用户名称:<input name='AdminName' type=text size='22' style='width:120px'></div></div>"&_
"<div style='height:24px'><div style='margin-left:50px'>后台密码:<input name='Password' type=password size='22' style='width:120px'></div></div>"&_
"<div class='bottom'><input type='submit' class='button' value='提 交'></div></div></form></body></html>"
End Sub

Sub CheckLogin()
Dim AdminName,AdminPassword,Temp
With BBS94KK
AdminName=.Fun.GetStr("AdminName")
AdminPassword=.Fun.GetStr("Password")
If AdminName="" or AdminPassword="" Then .Alert"请输入完整后再提交!","Admin_login.asp"
If not .Fun.CheckName(AdminName) or not .Fun.CheckPassword(AdminPassword) then
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误!","Admin_login.asp"
End if
AdminPassword=Md5(AdminPassword)
If .SafeBuckler(AdminName,.MyIP,0) Then .Alert"BBS安全盾已启动!\n对不起,你尝试登陆错误超过5次,今天不能再登陆后台。\n你的信息已被系统记录!","Index.asp"
If .execute("select name From [KK_admin] where name='"&AdminName&"' And Password='"&AdminPassword&"' And boardID=0").eof Then
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误或者随机验证码错误!","Admin_login.asp"
Else
.LetMemor "Admin","AdminName",AdminName
.LetMemor "Admin","AdminPassword",AdminPassword
.MyName=AdminName
.NetLog"成功登陆后台"
If .Info(16)="1" Then .execute("delete from [KK_Log] where DATEDIFF('d', LogTime,'"&.NowBBSTime&"')>7")
Session("SafeCode")=Empty
Response.Redirect"Admin_index.asp"
Response.End
End if
End With
End Sub
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
see7di
2008-05-24 · TA获得超过299个赞
知道小有建树答主
回答量:793
采纳率:0%
帮助的人:372万
展开全部
修改后的代码如下:
<!--#include file="Inc.asp"-->
<!--#include file="inc/md5.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel=stylesheet type=text/css href="Inc/94kk.css" />
<title></title>
</head>
<body>
<%Dim Action
Action=request.querystring("Action")
Select Case Action
Case"exit"
ExitLogin()
Case"login"
CheckLogin()
Case Else
Main()
End select
Set BBS94KK=Nothing

Sub Main()
Response.Write""&_
"<form method=POST action='?action=login'>"&_
"<div class='mian' style='width:400px;margin-top:50px'>"&_
"<div class='top'></div><div class='divtr1' style='height:100px'><div style='height:34px'><br />"&_
"<div style='margin-left:50px'>用户名称:<input name='AdminName' type=text size='22' style='width:120px'></div></div>"&_
"<div style='height:24px'><div style='margin-left:50px'>后台密码:<input name='Password' type=password size='22' style='width:120px'></div></div>"&_
"</div> "&_
"<div class='bottom'><input type='submit' class='button' value='提 交'></div></div></form></body></html>"
End Sub

Sub CheckLogin()
Dim AdminName,AdminPassword,Temp
With BBS94KK
AdminName=.Fun.GetStr("AdminName")
AdminPassword=.Fun.GetStr("Password")
If AdminName="" or AdminPassword="" Then .Alert"请输入完整后再提交!","Admin_login.asp"
If not .Fun.CheckName(AdminName) or not .Fun.CheckPassword(AdminPassword) then
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误!","Admin_login.asp"
End if
AdminPassword=Md5(AdminPassword)
If .SafeBuckler(AdminName,.MyIP,0) Then .Alert"BBS安全盾已启动!\n对不起,你尝试登陆错误超过5次,今天不能再登陆后台。\n你的信息已被系统记录!","Index.asp"
If .execute("select name From [KK_admin] where name='"&AdminName&"' And Password='"&AdminPassword&"' And boardID=0").eof Then
Session("SafeCode")=Empty
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误或者随机验证码错误!","Admin_login.asp"
Else
.LetMemor "Admin","AdminName",AdminName
.LetMemor "Admin","AdminPassword",AdminPassword
.MyName=AdminName
.NetLog"成功登陆后台"
If .Info(16)="1" Then .execute("delete from [KK_Log] where DATEDIFF('d', LogTime,'"&.NowBBSTime&"')>7")
Session("SafeCode")=Empty
Response.Redirect"Admin_index.asp"
Response.End
End if
End With
End Sub

Sub ExitLogin()
Session(CacheName &"AdminName") = Empty
Response.Cookies(CacheName &"Admin")("AdminName")= Empty
Session(CacheName &"AdminName") = Empty
Response.Cookies(CacheName &"Admin")("AdminPassword")= Empty
'Session.Abandon
Response.redirect"Index.asp"
End Sub
%>
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
艾克读书
2008-05-22 · TA获得超过148个赞
知道答主
回答量:212
采纳率:0%
帮助的人:95.6万
展开全部
If .execute("select name From [KK_admin] where name='"&AdminName&"' And Password='"&AdminPassword&"' And boardID=0").eof Or Session("SafeCode")<>PassCode Then
Session("SafeCode")=Empty
.SafeBuckler AdminName,.MyIP,1
.Alert"您输入的用户名不存在或者密码错误或者随机验证码错误!","Admin_login.asp"

上段代码中删除:
Or Session("SafeCode")<>PassCode
Session("SafeCode")=Empty
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式