📄 testing.asp
字号:
<tr>
<td align="center">
姓名:<%=request.cookies("aoyi")("studentname")%> 总分:<%=intTotalMark%> 考试时间:<%=intLimitTime%>分钟
</td>
</tr>
<tr>
<td><hr size="1" width="95%" color="#CCCCCC"></td>
</tr>
<%
'显示单项选择题
strSqlTest = "select P_P.id,P_P.answer,P_P.orderid,S.content,S.option1,S.option2,S.option3,S.option4,S.option5,S.option6 from prj_process P_P,subject S where S.type=1 and P_P.subid=S.id and P_P.studentid=" & intStudentID & " and P_P.prjid=" & intPrjID & " order by P_P.orderid"
rsTest.open strSqlTest,G_CONN,1,1
if not rsTest.bof and not rsTest.eof then
%>
<tr>
<td height="30">
<font size=3><strong>单项选择题部分 (共<%=intSSCount%>题 每题1分 共<%=intSSMark%>分)</strong></font>
</td>
</tr>
<%
while not rsTest.eof
%>
<tr>
<td>
<strong><%=rsTest("orderid")%>. </strong>
<%=rsTest("content")%>
</td>
</tr>
<tr>
<td>
<%
if rsTest("option1") <> "" then
response.write " A <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 1) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='radio' value='1'> " & rsTest("option1")
response.write "<br>"
end if
if rsTest("option2") <> "" then
response.write " B <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 2) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='radio' value='2'> " & rsTest("option2")
response.write "<br>"
end if
if rsTest("option3") <> "" then
response.write " C <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 4) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='radio' value='4'> " & rsTest("option3")
response.write "<br>"
end if
if rsTest("option4") <> "" then
response.write " D <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 8) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='radio' value='8'> " & rsTest("option4")
response.write "<br>"
end if
if rsTest("option5") <> "" then
response.write " E <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 16) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='radio' value='16'> " & rsTest("option5")
response.write "<br>"
end if
if rsTest("option6") <> "" then
response.write " F <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 32) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write" onClick='saveAnswer(this);' type='radio' value='32'> " & rsTest("option6")
response.write "<br>"
end if
%>
</td>
</tr>
<%
rsTest.movenext
wend
end if
rsTest.close
'显示多项选择题
strSqlTest = "select P_P.id,P_P.answer,P_P.orderid,S.content,S.option1,S.option2,S.option3,S.option4,S.option5,S.option6 from prj_process P_P,subject S where S.type=2 and P_P.subid=S.id and P_P.studentid=" & intStudentID & " and P_P.prjid=" & intPrjID & " order by P_P.orderid"
rsTest.open strSqlTest,G_CONN,1,1
if not rsTest.bof and not rsTest.eof then
%>
<tr>
<td height="30">
<font size=3><strong>多项选择题部分 (共<%=intMSCount%>题 每题2分 共<%=intMSMark%>分)</strong></font>
</td>
</tr>
<%
while not rsTest.eof
%>
<tr>
<td>
<strong><%=rsTest("orderid")%>. </strong>
<%=rsTest("content")%>
</td>
</tr>
<tr>
<td>
<%
if rsTest("option1") <> "" then
response.write " A <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 1) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='checkbox' value='1'> " & rsTest("option1")
response.write "<br>"
end if
if rsTest("option2") <> "" then
response.write " B <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 2) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='checkbox' value='2'> " & rsTest("option2")
response.write "<br>"
end if
if rsTest("option3") <> "" then
response.write " C <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 4) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='checkbox' value='4'> " & rsTest("option3")
response.write "<br>"
end if
if rsTest("option4") <> "" then
response.write " D <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 8) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='checkbox' value='8'> " & rsTest("option4")
response.write "<br>"
end if
if rsTest("option5") <> "" then
response.write " E <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 16) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='checkbox' value='16'> " & rsTest("option5")
response.write "<br>"
end if
if rsTest("option6") <> "" then
response.write " F <input name='" & rsTest("id") & "' "
if (rsTest("answer") and 32) > 0 and rsTest("answer") >= 0 then
response.write "checked"
end if
response.write " onClick='saveAnswer(this);' type='checkbox' value='32'> " & rsTest("option6")
response.write "<br>"
end if
%>
</td>
</tr>
<%
rsTest.movenext
wend
end if
rsTest.close
'显示是非题
strSqlTest = "select P_P.id,P_P.answer,P_P.orderid,S.content from prj_process P_P,subject S where S.type=3 and P_P.subid=S.id and P_P.studentid=" & intStudentID & " and P_P.prjid=" & intPrjID & " order by P_P.orderid"
rsTest.open strSqlTest,G_CONN,1,1
if not rsTest.bof and not rsTest.eof then
%>
<tr>
<td height="30">
<font size=3><strong>是非题部分 (共<%=intBCount%>题 每题1分 共<%=intBMark%>分)</strong></font>
</td>
</tr>
<%
while not rsTest.eof
%>
<tr>
<td>
<strong><%=rsTest("orderid")%>. </strong>
<%=rsTest("content")%>
</td>
</tr>
<tr>
<td>
<input name="<%=rsTest("id")%>"
<%
if rsTest("answer") = 1 then
response.write "checked"
end if
%>
onClick="saveAnswer(this);" type="radio" value="1"> 是
<input name="<%=rsTest("id")%>"
<%
if rsTest("answer") = 0 then
response.write "checked"
end if
%>
onClick="saveAnswer(this);" type="radio" value="0"> 否
</td>
</tr>
<%
rsTest.movenext
wend
end if
rsTest.close
set rsTest = nothing
call closeConn()
%>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -