📄 pg_danx.asp
字号:
<!--#include file="conn.asp"-->
<%
if session("adminname")="" then
response.redirect "relogin.asp"
end if
%>
<%
userid=request("userid")
sql1="SELECT * from tbuser where userid="&userid
set rs1=server.createobject("adodb.recordset")
rs1.open sql1,conn,3,2
username=rs1("username")
kcid=request("kcid")
paperno=request("paperno")
nianji=rs1("nianji")
banji=rs1("banji")
category=request("category")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>批改试卷——单选题</title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body><center><b><%=nianji%>级--<%=banji%>——<%=username%></b></center>
<% sqltm="SELECT * FROM tbkcconfig where kcid="&kcid&" and category=4 and paperno="&paperno
set rstm=server.createobject("adodb.recordset")
rstm.open sqltm,conn,3,2
sqlp="SELECT * FROM tbpaper where paperno="&paperno
set rsp=server.createobject("adodb.recordset")
rsp.open sqlp,conn,3,2
sql="SELECT top "&rstm("datano")&" tbtk.tmid, tbtk.title,tbtk.category, tbkc.kcid, tbkc.kcm, tbtk.chapter,a,b,c,d,e,f,photo FROM tbkc, userdata, tbtk WHERE username='"&username&"' and userdata.tmid=tbtk.tmid and tbtk.kcid=tbkc.kcid and tbkc.kcid="&kcid&" and paperno="&paperno &" and kao=1 and category=4 order by tbtk.tmid;"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
on error resume next
%>当前位置:批改试卷 > <%=rs("kcm")%>——<%=rsp("info")%>
<center><form name="viewdatabase" ACTION="<%=Myself%>" method="post">
<table border="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#799AE1" width="100%" id="AutoNumber1" height="186">
<tr class="trh">
<td width="36" align="center" bgcolor="#799AE1" height="23">
<font color="#FFFFFF"><b>序号</b></font></td>
<td align="center" bgcolor="#799AE1" width="600" height="23">
<p align="center"><font color="#FFFFFF"><b>单项选择题(共<%=rstm("datano")%>题,<%=rstm("datano")*rstm("datavalue")%>分)</b></font></td>
</tr>
<%
rs.PageSize =5
Page = CLng(Request("Page"))
If Page < 1 Then Page = 1
If Page > rs.PageCount Then Page = rs.PageCount
i=page+(page-1)*4
rs.AbsolutePage = Page
For iPage = 1 To rs.PageSize
sql3="SELECT * FROM userdata where username='"&username&"' and tmid="&rs("tmid")&" and paperno="&paperno
set rs3=server.createobject("adodb.recordset")
rs3.open sql3,conn,3,2
%>
<tr class="trh1">
<td align="center" height="35" width="36"><%=i%> </td>
<td align="left" width="600" height="35"><br>试题——<%=htmlencode(rs("title"))%> <br> <% if len(rs("photo")) > 1 then
%> <center>
<img border="0" src="examimage/<%=rs("photo")%>"></center>
<br><% end if %>
标准答案:
<b>
<% if trim(rs3("ans"))="A" then %>A.<%=rs("a")%><%end if%>
<% if trim(rs3("ans"))="B" then %>B.<%=rs("b")%><%end if%>
<% if trim(rs3("ans"))="C" then %>C.<%=rs("c")%><%end if%>
<% if trim(rs3("ans"))="D" then %>D.<%=rs("d")%><%end if%>
<% if trim(rs3("ans"))="E" then %>E.<%=rs("e")%><%end if%>
<% if trim(rs3("ans"))="F" then %>F.<%=rs("f")%><%end if%></b><br>
您的答案:
<%
'--------------------------------
if rs3("uans")="A" then %>
<% if rs3("uans")<>rs3("ans") then
response.write "<font color=red>"%>
A.<%=rs("a")%>
<% response.write "</font>"
else
%>
A.<%=rs("a")%>
<%end if%>
<%end if%>
<% '--------------------------------
if rs3("uans")="B" then %>
<% if rs3("uans")<>rs3("ans") then
response.write "<font color=red>"%>
B.<%=rs("b")%>
<% response.write "</font>"
else
%>
B.<%=rs("b")%>
<%end if%>
<%end if%>
<%'------------------------------------
if rs3("uans")="C" then %>
<% if rs3("uans")<>rs3("ans") then
response.write "<font color=red>"%>
C.<%=rs("c")%>
<% response.write "</font>"
else
%>
C.<%=rs("c")%>
<%end if%>
<%end if%>
<% '-------------------------------------
if rs3("uans")="D" then %>
<% if rs3("uans")<>rs3("ans") then
response.write "<font color=red>"%>
D.<%=rs("d")%>
<% response.write "</font>"
else
%>
D.<%=rs("d")%>
<%end if%><%end if%>
<% '---------------------------------------
if rs3("uans")="E" then %>
<% if rs3("uans")<>rs3("ans") then
response.write "<font color=red>"%>
E.<%=rs("e")%>
<% response.write "</font>"
else
%>
E.<%=rs("e")%>
<%end if%><%end if%>
<% '-----------------------------------
if rs3("uans")="F" then %>
<% if rs3("uans")<>rs3("ans") then
response.write "<font color=red>"%>
F.<%=rs("f")%>
<% response.write "</font>"
else
%>
F.<%=rs("f")%>
<%end if%><%end if%>
<br>
您的得分:
<%if rs3("ans")=rs3("uans") then
response.write rstm("datavalue")&"分"
else
response.write "0分"
end if
%><br></td>
</tr>
<%
rs.MoveNext
If rs.EOF Then Exit For
i=i+1
Next
%>
<tr>
<td align="center" bgcolor="#FFFFFF" height="35" width="640" colspan="2" bordercolor="#FFFFFF">
<input type="button" value="关闭窗口" name="B2" onclick="self.close()" class="s02"><span lang="en-us">
</span> </td>
</tr>
<caption></caption>
</table>
</form>
</center>
<center> <form ACTION="<%=Myself%>" METHOD="GET">
<table style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td width="576">
<p ALIGN="center"><%If Page <> 1 Then ' 如果不是位于第一页%>
<a href="<%=Myself%>?Page=1&kcid=<%=kcid%>&userid=<%=userid%>&category=<%=category%>&paperno=<%=paperno%>">第一页</a>
<a HREF="<%=Myself%>?Page=<%=(Page-1)%>&kcid=<%=kcid%>&userid=<%=userid%>&category=<%=category%>&paperno=<%=paperno%>">上一页</a>
<%
End If
If Page <> rs.PageCount Then ' 如果不是位于最后一页
%> <a HREF="<%=Myself%>?Page=<%=(Page+1)%>&kcid=<%=kcid%>&userid=<%=userid%>&category=<%=category%>&paperno=<%=paperno%>">下一页</a>
<a HREF="<%=Myself%>?Page=<%=rs.PageCount%>&kcid=<%=kcid%>&userid=<%=userid%>&category=<%=category%>&paperno=<%=paperno%>">最后一页</a>
<% End If %>
<font SIZE="2">页次:</font><font COLOR="Red" SIZE="2"><%=Page%>/<%=rs.PageCount%></font></p>
<p> </td>
</tr>
</table>
</form>
</center>
<%
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -