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

📄 chklogin.asp

📁 基于ASP的网上考试系统源码
💻 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 + -