ksjl1.asp
来自「网络考试系统最终备份」· ASP 代码 · 共 122 行
ASP
122 行
<!--#include file="conn.inc"-->
<%
set rs=createobject("adodb.recordset")
sql="select * from exam_score where userid='" & request("testid") & "' and testtime='"& request("D2") &"'"
rs.open sql,conn,3,2
if rs.eof then
response.write "没有记录"
else
testnmr=rs("score")
%>
<p> 总分数:<%=testnmr%></p>
<%
end if
%>
<%
set rs=createobject("adodb.recordset")
sql="select * from jlcx where userid='"& request("testid") &"' and starttime='"& request("D2") &"'"
rs.open sql,conn,3,2
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="105">
<tr>
<td width="6%" height="16">单选题</td>
<td width="11%" height="16">问题</td>
<td width="12%" height="16">选择1</td>
<td width="12%" height="16">选择2</td>
<td width="12%" height="16">选择3</td>
<td width="12%" height="16">选择4</td>
<td width="12%" height="16">选择5</td>
<td width="12%" height="16">选择6</td>
<td width="181%" height="16">你选择的答案</td>
</tr>
<%
do while not rs.eof
if rs("type")="单选题" then
j=j+1
%>
<tr>
<td width="6%" height="16"><%=j%></td>
<td width="11%" height="16"><%=rs("question")%></td>
<td width="12%" height="16"><%=rs("text1")%></td>
<td width="12%" height="16"><%=rs("text2")%></td>
<td width="12%" height="16"><%=rs("text3")%></td>
<td width="12%" height="16"><%=rs("text4")%></td>
<td width="12%" height="16"><%=rs("text5")%></td>
<td width="12%" height="16"><%=rs("text6")%></td>
<td width="181%" height="16"><%=rs("answer")%></td>
</tr>
<%
end if
rs.movenext
loop
rs.close
%>
<tr>
<td width="6%" height="16">多选题</td>
<td width="11%" height="16">问题</td>
<td width="12%" height="16">选择1</td>
<td width="12%" height="16">选择2</td>
<td width="12%" height="16">选择3</td>
<td width="12%" height="16">选择4</td>
<td width="12%" height="16">选择5</td>
<td width="12%" height="16">选择6</td>
<td width="181%" height="16">你选择的答案</td>
</tr>
<%
set rs=createobject("adodb.recordset")
sql="select * from jlcx where userid='"& request("testid") &"' and starttime='"& request("D2") &"'"
rs.open sql,conn,3,2
do while not rs.eof
if rs("type")="多选题" then
k=k+1
%>
<tr>
<td width="6%" height="16"><%=k%></td>
<td width="11%" height="16"><%=rs("question")%></td>
<td width="12%" height="16"><%=rs("text1")%></td>
<td width="12%" height="16"><%=rs("text2")%></td>
<td width="12%" height="16"><%=rs("text3")%></td>
<td width="12%" height="16"><%=rs("text4")%></td>
<td width="12%" height="16"><%=rs("text5")%></td>
<td width="12%" height="16"><%=rs("text6")%></td>
<td width="181%" height="16"><%=rs("answer")%></td>
</tr>
<%
end if
rs.movenext
loop
rs.close
%>
<tr>
<td width="6%" height="20">判断题</td>
<td width="83%" colspan="7" height="20"> 问题</td>
<td width="181%" height="20">你选择的答案</td>
</tr>
<%
set rs=createobject("adodb.recordset")
sql="select * from jlcx where userid='"& request("testid") &"' and starttime='"& request("D2") &"'"
rs.open sql,conn,3,2
do while not rs.eof
if rs("type")="判断题" then
l=l+1
%>
<tr>
<td width="6%" height="16"><%=l%></td>
<td width="83%" height="16" colspan="7"><%=rs("question")%></td>
<td width="181%" height="16"><%=rs("yn")%></td>
</tr>
<%
end if
rs.movenext
loop
rs.close
%>
</table>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?