xt_sys_login.asp
来自「用ASP写的电子购物系统」· ASP 代码 · 共 50 行
ASP
50 行
<%@ LANGUAGE = vbscript %>
<!--#INCLUDE FILE = "include/manager.asp" -->
<% REM ##########################################################################%>
<% REM #%>
<% REM XT_sys_login.ASP #%>
<% REM 系统用户登录 #%>
<% REM #%>
<% REM Copyright (c) 1999-2000 Epro Corporation. All rights reserved. #%>
<% REM #%>
<% REM ##########################################################################%>
<%
dim errorList
userid = checklength(request("userid"), 20)
if IsNull(userid) then
errorList=errorList & "用户名必须在1到20位。"
end if
password = checklength(request("password"), 20)
if IsNull(password) then
errorList=errorList & "密码必须在4到20位。"
end if
cmdTemp.CommandText = "select userid from sysuser where userid='" & userid & "' and password='" & password & "'"
Set rsSysUser = Server.CreateObject("ADODB.Recordset")
rsSysUser.Open cmdTemp, , adOpenKeyset, adLockReadOnly
if rsSysUser.RecordCount =0 then
errorList=errorList & "用户名或密码错误。"
else
'insert login log
Session("Sysuser")=userid
end if
rsSysUser.Close
if errorList<>"" then
%>
<!--#INCLUDE FILE="error.asp" -->
<%
else
Response.Redirect "index.asp"
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?