?? chklogin.asp
字號:
<%
'程序名稱:網上考試系統
'程序作者:韓波(bobby)
'OICQ:40274856 E-mail:bobbyhan@163.com
%>
<%
StudentID=Request("StudentID")
Name=Request("Name")
Subject=Request("Subject")
if StudentID="" then %>
<script language=vbscript>
MsgBox "錯誤:請輸入你的學號!"
location.href = "javascript:history.back()"
</script>
<%
end if
if Name="" then%><script language=vbscript>
MsgBox "錯誤:請輸入你的姓名!"
location.href = "javascript:history.back()"
</script> <%
end if%>
<!-- #include file="connect.asp" -->
<%
rs.Open "Select * From 學生信息 where StudentID='"& StudentID &"'", conn,1,1%>
<%if rs.bof then %>
<script language=vbscript>
MsgBox "錯誤:此學號不存在!"
location.href = "javascript:history.back()"
</script>
<%
elseif Name<>rs("Name") then%>
<script language=vbscript>
MsgBox "錯誤:你的學號和你的姓名不一致,請查正!"
location.href = "javascript:history.back()"
</script>
<%end if
rs.close
rs.open "select * from 成績表 where StudentID='"&StudentID&"' and 試卷名稱='"&Subject&"'",conn,1,1
if not rs.eof then%>
<script language=vbscript>
MsgBox "錯誤:你已經參加過這一門的考試了!"
location.href = "javascript:history.back()"
</script>
<%else
session("logstatus")=1 '記錄登陸狀態
response.redirect "testpaper.asp?"&Request.QueryString
end if
conn.close
set rs=nothing%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -