?? check.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 + -