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

📄 searchscore.asp

📁 基于ASP的网上考试系统源码
💻 ASP
字号:
<% @language="vbscript" %>
<%
response.buffer=true
Response.Expires=1
%>

<!-- #include file="connect.asp" -->
<html>
<head><title>考生成绩查询结果</title>
<LINK href="style.css" rel=stylesheet>
</head><body>

<%
id=request.querystring("id")
  'response.write id
if id=1 then
	StudentID=request("StudentID")
	Subject=request("Subject")
	rs.Open "Select * From 成绩表 where StudentID='" &StudentID&"' and 试卷名称='"&Subject&"'" , conn, 3,3
	%>
	<% if rs.eof or rs.bof then%>
	<script language="vbscript">
	MsgBox "没有考生的任何资料!该考生还没有参加这门考试!"
	location.href="javascript:history.back()"
	</script>
	<%else%>
       <table align=center border="1" cellspacing="0" cellpadding="0" align="center" width="350" height="129" bordercolorlight="#33CCFF" bordercolordark="#FFFFFF"><tr><td width="340" bgcolor="#33CCFF" height="16">
				<b>考生信息:<b></td></tr> 
				<tr><td width="340" height="101" bgcolor="#F9F8F7"><b>考生准考证号:<b><%=StudentID%><br>
				<b>考生姓名:<b><%=rs("Name")%><br>
				<%=Subject%>考试成绩为: 
				<b><%=rs("成绩")%><p align="center"><input type="button" onclick="javascript:history.back()" value="返回"></p>
				</td></tr></table>

		<%     
		
            
	end if
	rs.close %>
<%elseif id=2 then
       Subject=request("Subject")
       direction=request("direction")
       'response.write direction
       if direction=1 then
       rs.open "select * from 成绩表 where 试卷名称='"&Subject&"' order by 成绩",conn,3,3
       else 
       rs.open "select * from 成绩表 where 试卷名称='"&Subject&"' order by 成绩 desc",conn,3,3  
       end if
       if rs.eof or rs.bof then%>
       <script language="vbscript">
	   MsgBox "没有考生的任何资料!"
	   location.href="javascript:history.back()"
	   </script>
       <%else %>
       
       <div align="center"><table border="1" width="70%" bordercolorlight="#33CCFF" cellspacing="0" cellpadding="0" bordercolordark="#F9F8F7">
       <tr><td bgcolor="#33CCFF">准考证号</td><td bgcolor="#33CCFF">姓名</td><td bgcolor="#33CCFF">成绩</td><td bgcolor="#33CCFF">考试时间</td></tr>
       <%while not rs.eof %>
        <tr><td bgcolor="#F9F8F7"><%=rs("StudentID")%></td><td bgcolor="#F9F8F7"><%=rs("Name")%></td><td bgcolor="#F9F8F7"><%=rs("成绩")%></td><td bgcolor="#F9F8F7"><%=rs("考试时间")%></td></tr>
                                  
      <%rs.movenext
       wend%>
       </table></div>
       <%end if
       rs.close%>
<%elseif id=3 then
       
       Subject=request("Subject")
       limit=request("limit")
       if limit="" then 
       limit=0
       end if
       'response.write "limit="&limit
       rs.open "select * from 成绩表 where 试卷名称='"&Subject&"' and 成绩 >" &limit& " order by 成绩",conn,3,3
       if rs.eof or rs.bof then%>
       <script language="vbscript">
	   MsgBox "没有符合条件的考生的任何资料!"
	   location.href="javascript:history.back()"
	   </script>
       <%else%>
	   <div align="center"><table border=1 width="70%" bordercolor="#33CCFF" cellspacing="0" cellpadding="0" bordercolorlight="#33CCFF" bordercolordark="#F9F8F7">
       <tr><td bgcolor="#33CCFF">准考证号</td><td bgcolor="#33CCFF">姓名</td><td bgcolor="#33CCFF">成绩</td><td bgcolor="#33CCFF">考试时间</td></tr>
       <%while not rs.eof %>
        <tr><td bgcolor="#F9F8F7"><%=rs("StudentID")%></td><td bgcolor="#F9F8F7"><%=rs("Name")%></td><td bgcolor="#F9F8F7"><%=rs("成绩")%></td><td bgcolor="#F9F8F7"><%=rs("考试时间")%></td></tr>
                                  
      <%rs.movenext
       wend%>
       </table>
       <%end if
       rs.close
       
end if%>






</body>
</html>

⌨️ 快捷键说明

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