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

📄 subject.asp

📁 这是一个用ASP写的在线考试系统.特别一点 就是考试试卷有两种考法,一种为系统自动出卷,另一种是老师出卷考试.前者的实现是参考网上代码.总的来说还是很值得参考的.
💻 ASP
字号:
<!--#include file="conn2.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body><table width="100%" height="96" border="0" cellspacing="0" id="AutoNumber1">
  <tr>
    <td width="100%" height="96" > 请选择考试科目:<br>
      <hr></td>
  </tr>
</table>
<%
sql="select * from test_rec where tested=0 and stu_num="& request.cookies("stu_num")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if rs.eof then
%>
<table width="480" border="0" align="center" cellspacing="0" bordercolor="#111111">
  <tr>
    <td width="100%" height="30">&nbsp;现在您还没得需要参加考试的科目! </td>
  </tr>
</table>
<%
else
i=0
%>
<table width="480" border="0" align="center" cellpadding="4" cellspacing="1"  bgcolor="#5A8BCE" >
  <tr bgcolor="#FFFFFF" background="../img/backt.gif"> 
    <td width="20" height="21"></td>
    <td width="152">&nbsp;科目名称</td>
    <td width="191"> 
      <p align="center">考试时间(单位:小时)</td>
    <td width="80" background="../img/backt.gif"> 
      <p align="center">操作</td>
  </tr>
  <%
do while not rs.eof
sql1="select * from test where date() between starttime and endtime and testid="& rs("testid")
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,2
if not rs1.eof then
%>
  <tr>
    <td width="20" height="26" align="center" bgcolor="#FFFFFF"><%=i%></td>
    <td bgcolor="#FFFFFF">
    <p align="left">&nbsp;<%=rs1("subject")%></td>
    <td bgcolor="#FFFFFF">    <p align="center">&nbsp;<%=rs1("testtime")%></td>
    <td bgcolor="#FFFFFF">
    <p align="center"><a href="paper.asp?testid=<%=rs1("testid")%>">进入</a></td>
  </tr>
  <%
end if
rs.movenext
i=i+1
loop
%>
</table>
<%
end if
%>
</body>
</html>

⌨️ 快捷键说明

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