📄 verifylogin.asp
字号:
<!--#include file="CONN.INC"-->
<%
UserName=Request("UserName")
PW=Request("Password")
set rs=Conn.Execute("Select * from UserInfo where UserName='"&UserName&"' and Password='"&PW&"'")
if rs.Eof then
Response.write "<Script>window.alert(""用户名或密码错误,请重试,或联系管理员"")</script>"
URL="login.asp"
else
if Rs("UserType")=1 then
Response.write "<Script>window.alert(""Administrator, welcome to login"")</script>"
URL="admin/main.asp"
end if
if Rs("UserType")=2 then
Response.write "<Script>window.alert(""Driver , welcome to login"")</script>"
URL="driver/main.asp"
set DriRs=conn.execute("select * from DriverInfo where UserID="&rs("UserID"))
if DriRs.Eof then
URL=""
else
Session("DriverID")=DriRs("DriverID")
session("DriverName")=DriRs("DriverName")
end if
set DriRS=nothing
end if
if Rs("UserType")=3 then
Response.write "<Script>window.alert(""Normal Account, welcome to login"")</script>"
URL="User/main.asp"
end if
if URL="" then
Response.write "<Script>window.alert(""用户数据出错,请联系管理员"")</script>"
URL="login.asp"
else
session("UserID")=rs("UserID")
session("UserType")=rs("UserType")
session("UserName")=rs("RealName")
end if
end if
set rs=nothing
conn.close
set conn=nothing
%>
<form name=reDirectURL action=<%=URL%> method=post></form>
<script language="javascript">
document.reDirectURL.submit();
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -