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

📄 selectsubject.asp

📁 这是个考试系统哦 想学的人可以看看哦
💻 ASP
字号:
<%
Dim userid : userid = request.cookies("userid")
If userid = "" Then 
	response.write "<h2 style='font-size: 18px; color: #f30;'>您还没有登录! <a href='logindefault.asp' target='_top'>点击这里登录系统</a></h2>"
	response.End
End If 
%>
<!--#include file="conn.inc"-->
<html>

<head>
<title>选择科目</title>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css.css">
</head>

<body>

<table border="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  <tr>
    <td width="100%" height="30" style="border-left-style: solid; border-left-width: 0; border-right-style: solid; border-right-width: 0; border-top-style: solid; border-top-width: 0; border-bottom: 1px solid #000000">
    <img border="0" src="images/selectsubject.jpg"></td>
  </tr>
</table>
<%
response.cookies("downloadok")=""
sql1="select * from exam_testuser where havetest=0 and userid="& userid
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,2
if rs1.eof then
%>
<table border="0" cellspacing="0" bordercolor="#111111" width="480">
  <tr>
    <td width="100%" height="30">&nbsp;现在您还没有需要参加考试的科目! </td>
  </tr>
</table>
<%
else
i=1
%>
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#C0C0C0" id="AutoNumber2" width="480" cellpadding="0">
  <tr>
    <td height="22" width="20" bgcolor="#E1E1E1"></td>
    <td bgcolor="#E1E1E1">&nbsp;<b>科目名称</b></td>
    <td bgcolor="#E1E1E1" width="80">
    <p align="center"><b>考试时间</b></td>
    <td bgcolor="#E1E1E1" width="80">
    <p align="center"><b>操作</b></td>
  </tr>
  <%
do while not rs1.eof
sql="select * from exam_test where date() between starttime and endtime and not passuserid is null and testid="& rs1("testid")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
if not rs.eof then
%>
  <tr>
    <td align="center" height="20" width="20" bgcolor="#E1E1E1"><%=i%></td>
    <td bgcolor="#FFFFFF">
    <p align="left">&nbsp;<%=rs("subject")%></td>
    <td bgcolor="#FFFFFF">
    <p align="center">&nbsp;<%=rs("testtime")%>小时</td>
    <td bgcolor="#FFFFFF">
    <p align="center"><a href="paper.asp?testid=<%=rs1("testid")%>">进入考场</a></td>
  </tr>
  <%
end if
rs1.movenext
i=i+1
loop
%>
</table>
<%
end if
%>

</body>

</html>

⌨️ 快捷键说明

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