📄 modpaper3.asp
字号:
<!--#include file="../db.asp"-->
<%
objConn.Open strConnection
Set objRS = Server.CreateObject ("ADODB.Recordset")
if request("back")<>"" then
response.redirect "ModPaper1.asp?PaperID="&request.QueryString("PaperID")
end if
if request("backhome")<>"" then
response.redirect "Paperxg.asp"
end if
if request("del")<>"" then
for i=1 to request("mark").count
sql="Select * from Paper_Item where ItemID="&request("mark")(i)&" and PaperID="&request.QueryString("PaperID")
objRS.open sql,objConn,2,3
order1=objRS("Order1")
order2=objRS("Order2")
objRS.delete
objRS.Close
sql="Select * from Paper_Item where PaperID="&request.QueryString("PaperID")&" and Order1="&order1
objRS.open sql,objConn,2,3
while not objRS.EOF
if clng(objRS("Order2"))>clng(order2) then
objRS("Order2")=objRS("Order2")-1
objRS.Update
end if
objRS.MoveNext
wend
'if m=1 then
' objRS.Update
'end if
objRS.Close
next
sql="Select * from TestPaper where PaperID="&Request.QueryString("PaperID")
objRS.open sql,objConn
dim txfs(5)
txfs(1)=CInt(objRS("selectvalue"))
txfs(2)=CInt(objRS("multivalue"))
txfs(3)=CInt(objRS("tkvalue"))
txfs(4)=CInt(objRS("pdvalue"))
txfs(5)=CInt(objRS("fxvalue"))
objRS.Close
for tx=1 to 5
sql="select * from Paper_Item where Order1="&tx&" and PaperID="&Request.QueryString("PaperID")
objRS.open sql,objConn,1,1
c=objRS.RecordCount
objRS.Close
if c>0 then
t_mark=0
b_mark=CInt(txfs(tx)/c)
count=1
objRS.Open sql,objConn,2,3
while not objRS.EOF
if count=c then
objRS("Score")=txfs(tx)-t_mark
else
objRS("Score")=b_mark
t_mark=t_mark+b_mark
end if
count=count+1
objRS.Update
objRS.MoveNext
wend
objRS.Close
end if
next
response.redirect "ModPaper1.asp?PaperID="&request.QueryString("PaperID")
end if
if request("add")<>"" then%>
<%paperID=request.QueryString("PaperID")%>
<p align="center"><font color='red'>如要添加新试题,请点击下列相应连接</font></p>
<center>
<table border=1 align="center" bordercolor=#ffffff bordercolorlight=#0066cc cellspacing=0 width="750">
<tr align="center">
<td><font color="#FF0000">添加试题到数据库和该试卷</font></td>
<td align="center"><a href="../tjst/Dah.asp?tx=1&Added=<%=paperID%>&BackTo=gdsjStep2.asp">单选题</a></td>
<td align="center"><a href="../tjst/Duh.asp?tx=2&Added=<%=paperID%>&BackTo=gdsjStep2.asp">多选题</a></td>
<td align="center"><a href="../tjst/tiankongh.asp?tx=3&Added=<%=paperID%>&BackTo=gdsjStep2.asp">填空题</a></td>
<td align="center"><a href="../tjst/pdh.asp?tx=4&Added=<%=paperID%>&BackTo=gdjsStep2.asp">判断题</a></td>
<td align="center"><a href="../tjst/fxh.asp?tx=5&Added=<%=paperID%>&BackTo=gdjsStep2.asp">分析题</a></td>
<tr>
<tr align="center">
<td><font color="#FF0000">只是添加试题到该试卷中</font></td>
<td align="center"><a href="selItem.asp?tx=1&mod=<%=paperID%>">单选题</a></td>
<td align="center"><a href="selItem.asp?tx=2&mod=<%=paperID%>">多选题</a></td>
<td align="center"><a href="selItem.asp?tx=3&mod=<%=paperID%>">填空题</a></td>
<td align="center"><a href="selItem.asp?tx=4&mod=<%=paperID%>">判断题</a></td>
<td align="center"><a href="selItem.asp?tx=5&mod=<%=paperID%>">简答题</a></td>
</tr>
</table></center>
<% end if%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -