📄 logon.asp
字号:
<!--#include file="conn.asp"-->
<%
Name=Request.Form("Name")
Password=Request.Form("Password")
%>
<%
SQL="SELECT ID,username,password,lastvst,Lastdeng,loginnum,class,online FROM [user] WHERE username='"& Name &"'"
Set LogonRS=server.Createobject("ADODB.Recordset")
LogonRS.Open SQL,Conn,3,2
IF LogonRS.Eof Then
Response.Redirect "index.asp"
Else
IF Password=LogonRS("password") Then
LogonRS("Lastdeng")=Now()
LogonRS("lastvst")=Now()
LogonRS("loginnum")=LogonRS("loginnum")+1
LogonRS("online")="线上"
LogonRS.Update
Session("User")=Name
Application("User")=Name
SQL="Select * From class Where ID=" & Int(LogonRS("class"))
Set RS1=Server.CreateObject("ADODB.Recordset")
RS1.Open SQL,Connstr,1,1
IF Not RS1.Eof Then
IF RS1("admin")=LogonRS("ID") Then
Session("Administrator1")=RS1("ID")
End IF
End IF
Response.Redirect "index.asp"
Else
Response.Redirect "index.asp"
End IF
End IF
Set RS=Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -