www.gusucode.com > ASP毕业设计在线考试管理系统源码 > ASP毕业设计在线考试管理系统源码\code\user\subject.asp

    <!--#include file="db.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>在线考试系统</title>
<link href="../Style.css" rel="stylesheet" type="text/css">
</head>

<body>

<table width="100%" height="10" border="0" cellspacing="0" id="AutoNumber1">
  <tr>
    <td width="100%" height="30" > 在线考试系统 -&gt; 考试科目选择<br><hr></td>
  </tr>
</table>
<%
sql="select * from test_record where tested=0 and userid="& request.cookies("userid")
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="200" height="10" border="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="480" border="0" align="center" cellpadding="4" cellspacing="1"  bgcolor="#5A8BCE" >
  <tr bgcolor="#E6F7FF">
    <td height="22" width="20"></td>
    <td bgcolor="#E6F7FF">&nbsp;<b>科目名称</b></td>
    <td width="140">
    <p align="center"><b>考试时间(单位:小时)</b></td>
    <td width="80">
    <p align="center"><b>操作</b></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="20" align="center" bgcolor="#E6F7FF"><%=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>