⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check.asp

📁 一个教育系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
id = trim(request("id"))
password = request("password")
verifycode = request("verifycode")

if id = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请输入您的登录名或ID');history.go(-1);</script>"
 response.end
end if
if password = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请输入密码');history.go(-1);</script>"
 response.end
end if


if IsNumeric(id) then
	sql = "select * from teacher where teacherid="&id
else
	sql = "select * from teacher where loginname='"&id&"'"
end if
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
 rs.close
 set rs = nothing
 conn.close
 set conn = nothing
 response.write "<script>alert('登录名或ID输入错误,没有该教师');history.go(-1);</script>"
else
 if password = rs("password") then
  if rs("locked") = 1 then
   rs.close
   set rs = nothing
   conn.close
   set conn = nothing
   response.write "<script>alert('您已被禁止登陆,请与管理员联系');history.go(-1);</script>"
  else
   session("teacherid") = cstr(rs("teacherid"))
   rs.close
   set rs = nothing
   conn.close
   set conn = nothing
   response.redirect "teachermain.asp"
  end if
 else
  rs.close
  set rs = nothing
  conn.close
  set conn = nothing
  session("verifycode") = ""
  response.write "<script>alert('密码错误');window.location.href='login.asp';</script>"
 end if
end if
%>

⌨️ 快捷键说明

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