asp.txt
来自「企业内部办公管理信息系统 (一个用ASP开发的基于B/S方式的毕业设计)」· 文本 代码 · 共 27 行
TXT
27 行
<%@ Language=VBScript %>
<%
'判断用户是否提交表单
if isempty(Request.Form("Login")) then
Session.abandon
Session("NumAttempts") = 1
TheMessage = "请在下面登录:(缺省管理员用户名:1,密码:1)"
'校验用户提交的用户信息
else
set conn = server.createobject ("adodb.connection")
conn.open "ASPData", "sa", "yourpassword"
TheUsername=Request.Form("Username")
ThePassword=Request.Form("Password")
If Instr(TheUsername, "'")=0 and Instr(ThePassword, "'")=0 and Instr(TheUsername, "'")=0 _
and Instr(ThePassword, "'")=0 then
set RSLogin = conn.Execute("select * from PSLogins where " & "LoginID = '" _
& TheUsername & "' and " & "Password = '" & ThePassword & "'")
if RSLogin.EOF then
Session("NumAttempts") = Session("NumAttempts") + 1
if Application("NumAttempts") = 0 then
TheMessage = "登录不成功,请重试:"
elseif Session("NumAttempts") > Application("NumAttempts") then
TheMessage = "登录不成功,登录次数已满,无法重试"
else
TheTimes=Application("NumAttempts")-Session("NumAttempts")+1
TheMessage = "登录不成功,还有" & TheTimes & "次机会,请重试:"
end if
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?