⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chkuser.asp

📁 一个php原码 相关的还有1个将在下次传上来 这个是设备参数说明在线管理系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="func.asp"-->
<%
dim username,UserPassword,comeurl,passcode
username=FormatSQL(replace(trim(request.form("username")),"'",""))
UserPassword=md5(FormatSQL(replace(trim(request.Form("UserPassword")),"'","")))
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"))
comeurl=request.servervariables("HTTP_REFERER")
if comeurl="" then
comeurl="index.asp"
end if
if username="" or UserPassword="" 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>"
conn.Close
set conn=nothing
response.end
end if

set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from [user] where UserPassword='"&UserPassword&"' and username='"&username&"' " ,conn,1,3
if not(rs.bof and rs.eof) then

if UserPassword=rs("UserPassword") and passcode=Session("GetCode") then
response.Cookies("timesshop")("username")=trim(request.form("username"))
Response.Cookies("timesshop").Expires = Now()+1
rs("LastLogin")=now()
rs("UserLogins")=rs("UserLogins")+1
rs.Update
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.redirect comeurl
else
response.write "<script LANGUAGE='javascript'>alert('登录失败,请检查您的登录名和密码!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if

else
response.write "<script LANGUAGE='javascript'>alert('登录失败!请检查您的登录名和密码!');history.go(-1);</script>"
rs.Close
set rs=nothing
conn.Close
set conn=nothing
response.end
end if
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -