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

📄 sj1.asp

📁 这是ASP的网上考试系统。 希望大家来分享
💻 ASP
字号:
<!-- #include file="conn.asp" -->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from kstype where id="&request.querystring("id")
rs.open sql,conn,1,1
if not rs.eof then
dim typename
typname=trim(rs("kstype"))
end if
rs.close
set rs=nothing
%>
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="90%" border="0" align="center" cellspacing="0" cellpadding="0">
  <tr>
    <td height="25">
      <div align="center"><b><%=typename%></b>各考生成绩</div>
    </td>
  </tr>
</table>
<br>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from student order by id desc"
rs.open sql,conn,1,1
if not rs.eof then
do while not rs.eof
 set rs1=server.createobject("adodb.recordset")
 sql1="select * from ksa where student='"&trim(rs("student"))&"'"
 rs1.open sql1,conn,1,1
 if not rs1.eof then
 %>
<table width="90%" border="0" align="center">
  <tr> 
    <td height="25" bgcolor="#CCCCCC"><%=trim(rs("student"))%></td>
  </tr>
  <%
  dim x,y
  x=0
  y=0
  do while not rs1.eof
  if rs1("yes")=True then
  x=x+1
  else
  y=y+1
  end if
  %>
  <tr> 
    <td height="25">试题ID:[<%=trim(rs1("ksid"))%>],答案:[<%=trim(rs1("da"))%>],是否正确:[<%=trim(rs1("yes"))%>]</td>
  </tr>
  <%rs1.movenext
   loop
   end if
   rs1.close
   set rs1=nothing
   %>
     <tr>
    <td height="25"><%=trim(rs("student"))%>,对<%=x%>题,错<%=y%>题。</td>
  </tr>
</table>
<%rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>

⌨️ 快捷键说明

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