📄 login.asp
字号:
<%@ language=VBScript%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<%
dim conn,connstr
connstr="Driver={sql server};UID=sa;PWD=sa;database=zikao;server=BILLGATES"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
set rs=Server.CreateObject("ADODB.Recordset")
id=trim(request.Form("Txt_UserName"))
pass=trim(request.form("Txt_Password"))
session("idstr")=id
midstr=session("mid")
midchar=trim(request.form("Txt_Mid"))
if midstr<>midchar or midchar="" then
response.write "附加码错误<a href='index.asp'>返回</a>"
else
if request("checktype")="tec" then
sql="select * from teclog where tecid ='"&id&"' and tecpass='"&pass&"'"
rs.open sql,conn,3
if rs.eof then
response.write "用户名或密码错误<a href='index.asp'>返回</a>"
else
response.redirect "teacher/teacher.htm"
end if
end if
if request("checktype")="stu" then
sql="select * from stulog where stuid ='"&id&"' and stupass='"&pass&"'"
rs.open sql,conn,3
if rs.eof then
response.write "用户名或密码错误<a href='index.asp'>返回</a>"
else
response.redirect "student/student.htm"
end if
end if
end if
'rs.close
'set rs=nothing
'conn.close
'set rs=nothing
%>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -