check.asp

来自「OFFICE办公自动化」· ASP 代码 · 共 36 行

ASP
36
字号

<%
'Response.Buffer=true
'Response.Expires=-1
if trim(request.form("sx"))=1 then
session("sx")=1
else 
session("sx")=0
end if
username=trim(request.form("username"))
username=username&session("sx")
if not(isarray(application("userlist"))) then
dim u()
redim u(0)
u(0)="大家"
application.lock
application("userlist")=u
application.unlock
end if
userlist=application("userlist")
n=ubound(userlist)+1
for i=0 to ubound(userlist)
if left(userlist(i),len(userlist(i))-1)=trim(request.form("username")) then same=true
next
if same=true or username="" then 
    response.redirect "error.asp?id=1"
else
    session("username")=trim(request.form("username"))
    redim preserve userlist(n)
	userlist(n)=username
	application.lock
	application("userlist")=userlist
	application.unlock
    end if
response.redirect "main.asp"
%>

⌨️ 快捷键说明

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