📄 cover2.asp
字号:
if rs22.eof then
rs00.addnew
rs00("username")=username
rs00("tmid")=cint(rs15("tmid"))
rs00("ans")=rs15("ans")
rs00("paperno")=paperno
rs00.update
else
i=i-1
end if
end if
next
'-------
Set rscheck15=Server.CreateObject("Adodb.RecordSet")
sqlcheck15="select distinct userdata.tmid from userdata,tbtk where userdata.tmid=tbtk.tmid and userdata.username='"&username&"' and tbtk.kao=1 and tbtk.category=5 and tbtk.kcid="&kcid&" and (tbtk.chapter Between "&schap&" And "&echap&") and userdata.paperno="&paperno&" order by userdata.tmid"
rscheck15.open sqlcheck15,conn,3,2
if rscheck15.RecordCount < rsno5("datano") then
wrong5=rsno5("datano")-rscheck15.RecordCount
' response.write "<br>wrong5="&wrong5
' response.write rscheck15.RecordCount&"<"& rsno5("datano")
rs15.movefirst
for k5=1 to wrong5
you5=0
if not rscheck15.eof then
rscheck15.movefirst
do while not rscheck15.eof
' response.write "<br>rs15="&rs15("tmid")
' response.write "==rscheck15="&rscheck15("tmid")
if cint(rs15("tmid"))=cint(rscheck15("tmid")) then
you5=1
end if
rscheck15.movenext
loop
end if
' response.write "<br>---you5="&you5
if you5=1 then
if not rs15.eof then
rs15.movenext
end if
k5=k5-1
' response.write "<br>k5="&k5&"下一个<br>"
else
rs00.addnew
rs00("username")=username
rs00("tmid")=cint(rs15("tmid"))
rs00("ans")=rs15("ans")
rs00("paperno")=paperno
rs00.update
if not rs15.eof then
rs15.movenext
end if
' response.write "<br>k5="&k5&"加入一个<br>"
end if
next
end if
'----------
end if
'-----------------------随机选5题简答题,防止漏选
Set rs16=Server.CreateObject("Adodb.RecordSet")
sql16="select * from tbtk where kao=1 and category=6 and kcid="&kcid&" and (chapter Between "&schap&" And "&echap&")"
rs16.open sql16,conn,3,2
if not rs16.eof then
Set rsno6=Server.CreateObject("Adodb.RecordSet")
sqlno6="select * from tbkcconfig where kcid="&kcid&" and category=6 and paperno="&paperno
rsno6.open sqlno6,conn,3,2
randomize
i=1
for i=1 to rsno6("datano")
a=int((rs16.RecordCount-0)*rnd+0)
if ( a>0 and a<(rs16.RecordCount+1)) then
rs16.absoluteposition=a
set rs22=conn.execute("select * from userdata where username='"&username&"' and tmid="&rs16("tmid")&" and paperno="&paperno)
if rs22.eof then
rs00.addnew
rs00("username")=username
rs00("tmid")=cint(rs16("tmid"))
rs00("ans")=rs16("ans")
rs00("paperno")=paperno
rs00.update
else
i=i-1
end if
end if
next
'-------
Set rscheck16=Server.CreateObject("Adodb.RecordSet")
sqlcheck16="select distinct userdata.tmid from userdata,tbtk where userdata.tmid=tbtk.tmid and userdata.username='"&username&"' and tbtk.kao=1 and tbtk.category=6 and tbtk.kcid="&kcid&" and (tbtk.chapter Between "&schap&" And "&echap&") and userdata.paperno="&paperno&" order by userdata.tmid"
rscheck16.open sqlcheck16,conn,3,2
if rscheck16.RecordCount < rsno6("datano") then
wrong6=rsno6("datano")-rscheck16.RecordCount
response.write "<br>wrong6="&wrong6&"|"
response.write rscheck16.RecordCount&"<"& rsno6("datano")
rs16.movefirst
for k6=1 to wrong6
you6=0
if not rscheck16.eof then
rscheck16.movefirst
do while not rscheck16.eof
' response.write "<br>rs16="&rs16("tmid")
' response.write "==rscheck16="&rscheck16("tmid")
if cint(rs16("tmid"))=cint(rscheck16("tmid")) then
you6=1
end if
rscheck16.movenext
loop
end if
' response.write "<br>---you6="&you6
if you6=1 then
if not rs16.eof then
rs16.movenext
end if
k6=k6-1
' response.write "<br>k6="&k6&"下一个<br>"
else
rs00.addnew
rs00("username")=username
rs00("tmid")=cint(rs16("tmid"))
rs00("ans")=rs16("ans")
rs00("paperno")=paperno
rs00.update
if not rs16.eof then
rs16.movenext
end if
' response.write "<br>k6="&k6&"加入一个<br>"
end if
next
end if
'----------
end if
'-------------随机选3题论述题,防止漏选
Set rs17=Server.CreateObject("Adodb.RecordSet")
sql17="select * from tbtk where kao=1 and category=7 and kcid="&kcid&" and (chapter Between "&schap&" And "&echap&")"
rs17.open sql17,conn,3,2
if not rs17.eof then
Set rsno7=Server.CreateObject("Adodb.RecordSet")
sqlno7="select * from tbkcconfig where kcid="&kcid&" and category=7 and paperno="&paperno
rsno7.open sqlno7,conn,3,2
randomize
i=1
for i=1 to rsno7("datano")
a=int((rs17.RecordCount-0)*rnd+0)
if ( a>0 and a<(rs17.RecordCount+1)) then
rs17.absoluteposition=a
set rs22=conn.execute("select * from userdata where username='"&username&"' and tmid="&rs17("tmid")&" and paperno="&paperno)
if rs22.eof then
rs00.addnew
rs00("username")=username
rs00("tmid")=cint(rs17("tmid"))
rs00("ans")=rs17("ans")
rs00("paperno")=paperno
rs00.update
else
i=i-1
end if
end if
next
'-------
Set rscheck17=Server.CreateObject("Adodb.RecordSet")
sqlcheck17="select distinct userdata.tmid from userdata,tbtk where userdata.tmid=tbtk.tmid and userdata.username='"&username&"' and tbtk.kao=1 and tbtk.category=7 and tbtk.kcid="&kcid&" and (tbtk.chapter Between "&schap&" And "&echap&") and userdata.paperno="&paperno&" order by userdata.tmid"
rscheck17.open sqlcheck17,conn,3,2
if rscheck17.RecordCount < rsno7("datano") then
wrong7=rsno7("datano")-rscheck17.RecordCount
' response.write "<br>wrong7="&wrong7
' response.write rscheck17.RecordCount&"<"& rsno7("datano")
rs17.movefirst
for k7=1 to wrong7
you7=0
if not rscheck17.eof then
rscheck17.movefirst
do while not rscheck17.eof
' response.write "<br>rs17="&rs17("tmid")
' response.write "==rscheck17="&rscheck17("tmid")
if cint(rs17("tmid"))=cint(rscheck17("tmid")) then
you7=1
end if
rscheck17.movenext
loop
end if
' response.write "<br>---you7="&you7
if you7=1 then
if not rs17.eof then
rs17.movenext
end if
k7=k7-1
' response.write "<br>k7="&k7&"下一个<br>"
else
rs00.addnew
rs00("username")=username
rs00("tmid")=cint(rs17("tmid"))
rs00("ans")=rs17("ans")
rs00("paperno")=paperno
rs00.update
if not rs17.eof then
rs17.movenext
end if
' response.write "<br>k7="&k7&"加入一个<br>"
end if
next
end if
'----------
end if
'--------------------------------------
'-------------随机选阅读理解题,防止漏选
Set rs18=Server.CreateObject("Adodb.RecordSet")
sql18="select * from tbtk where kao=1 and category=8 and kcid="&kcid&" and (chapter Between "&schap&" And "&echap&")"
rs18.open sql18,conn,3,2
if not rs18.eof then
Set rsno8=Server.CreateObject("Adodb.RecordSet")
sqlno8="select * from tbkcconfig where kcid="&kcid&" and category=8 and paperno="&paperno
rsno8.open sqlno8,conn,3,2
randomize
i=1
for i=1 to rsno8("datano")
a=int((rs18.RecordCount-0)*rnd+0)
if ( a>0 and a<(rs18.RecordCount+1)) then
rs18.absoluteposition=a
set rs22=conn.execute("select * from userdata where username='"&username&"' and tmid="&rs18("tmid")&" and paperno="&paperno)
if rs22.eof then
rs00.addnew
rs00("username")=username
rs00("tmid")=cint(rs18("tmid"))
rs00("ans")=rs18("ans")
rs00("paperno")=paperno
rs00("isread")=rs18("isread")
rs00.update
'--------------------------阅读题肢
if rs18("isread")=1 then
sqlkaoshi0="select * from tbread where tmid="&rs18("tmid")
set rskaoshi0=server.createobject("adodb.recordset")
rskaoshi0.open sqlkaoshi0,conn,3,2
do while not rskaoshi0.eof
sqlkaoshi1="select * from userdataread where username='"&username&"' and paperno<>0 and tmid="&rs18("tmid")
set rskaoshi1=server.createobject("adodb.recordset")
rskaoshi1.open sqlkaoshi1,conn,3,2
sqldatashi1="select top 1 * from userdata where username='"&username&"' and paperno="&paperno&" and tmid="&rs18("tmid")&" order by dataid desc"
set rsdatashi1=server.createobject("adodb.recordset")
rsdatashi1.open sqldatashi1,conn,3,2
rskaoshi1.addnew
rskaoshi1("username")=username
rskaoshi1("dataid")=rsdatashi1("dataid")
rskaoshi1("tmid")=rskaoshi0("tmid")
rskaoshi1("noid")=rskaoshi0("noid")
rskaoshi1("paperno")=paperno
rskaoshi1("readno")=rskaoshi0("readno")
rskaoshi1("rans")=rskaoshi0("readans")
rskaoshi1("fen")=0
rskaoshi1.update
rskaoshi0.movenext
loop
end if
'--------------------------阅读题肢
else
i=i-1
end if
end if
next
'-------
Set rscheck18=Server.CreateObject("Adodb.RecordSet")
sqlcheck18="select distinct userdata.tmid from userdata,tbtk where userdata.tmid=tbtk.tmid and userdata.username='"&username&"' and tbtk.kao=1 and tbtk.category=8 and tbtk.kcid="&kcid&" and (tbtk.chapter Between "&schap&" And "&echap&") and userdata.paperno="&paperno&" order by userdata.tmid"
rscheck18.open sqlcheck18,conn,3,2
if rscheck18.RecordCount < rsno8("datano") then
wrong8=rsno8("datano")-rscheck18.RecordCount
' response.write "<br>wrong8="&wrong8
' response.write rscheck18.RecordCount&"<"& rsno8("datano")
rs18.movefirst
for k8=1 to wrong8
you8=0
if not rscheck18.eof then
rscheck18.movefirst
do while not rscheck18.eof
' response.write "<br>rs18="&rs18("tmid")
' response.write "==rscheck18="&rscheck18("tmid")
if cint(rs18("tmid"))=cint(rscheck18("tmid")) then
you8=1
end if
rscheck18.movenext
loop
end if
' response.write "<br>---you8="&you8
if you8=1 then
if not rs18.eof then
rs18.movenext
end if
k8=k8-1
' response.write "<br>k8="&k8&"下一个<br>"
else
rs00.addnew
rs00("username")=username
rs00("tmid")=cint(rs18("tmid"))
rs00("ans")=rs18("ans")
rs00("paperno")=paperno
rs00("isread")=rs18("isread")
rs00.update
'--------------------------阅读题肢
if rs18("isread")=1 then
sqlkaoshi0="select * from tbread where tmid="&rs18("tmid")
set rskaoshi0=server.createobject("adodb.recordset")
rskaoshi0.open sqlkaoshi0,conn,3,2
do while not rskaoshi0.eof
sqlkaoshi1="select * from userdataread where username='"&username&"' and paperno<>0 and tmid="&rs18("tmid")
set rskaoshi1=server.createobject("adodb.recordset")
rskaoshi1.open sqlkaoshi1,conn,3,2
sqldatashi1="select top 1 * from userdata where username='"&username&"' and paperno="&paperno&" and tmid="&rs18("tmid")&" order by dataid desc"
set rsdatashi1=server.c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -