📄 selectr3.asp
字号:
<!--#include file="../db.asp"-->
<%
objConn.Open strConnection
Set objRS1 = Server.CreateObject ("ADODB.Recordset")
Set objRS = Server.CreateObject ("ADODB.Recordset")
Set rs= Server.CreateObject ("ADODB.Recordset")
Set rs1= Server.CreateObject ("ADODB.Recordset")
Set rs2= Server.CreateObject ("ADODB.Recordset")
dim PaperItemID(5,50)
' sql="select MAX(KnowledgeID) as max from knowledge where CourseID=1"
' objRS.Open sql,objConn
' max=objRS("max")
' objRS.Close
sql="select * from TestPaper where PaperID="&Request.QueryString ("id")
objRS1.Open sql,objConn
sql2="select * from RandomPara where PaperID="&Request.QueryString ("id")
rs.Open sql2,objConn
b=0
b=b+Clng(rs("dxCount"))
b=b+Clng(rs("duCount"))
b=b+Clng(rs("pdCount"))
b=b+Clng(rs("tkCount"))
b=b+Clng(rs("fxCount"))
' r=b/max
dim txlist(6)
txlist(1)=CInt(rs("dxCount"))
txlist(2)=CInt(rs("duCount"))
txlist(3)=CInt(rs("pdCount"))
txlist(4)=CInt(rs("tkCount"))
txlist(5)=CInt(rs("fxCount"))
dim knowlist(100)
dim st(50)
for i=0 to b
knowlist(i)=""
next
base=0
for i=1 to 5
FF=1
for jj=1 to 30
st(jj)=0
next
Randomize
while FF<=txlist(i)
kk=0
qq=0
tt=1
mm=0
s2="Select * from ItemTable where Itemtype="&i&" and CourseID="&Session("course_id")
rs2.Open s2,objConn
Do
itemid=Int((40 *Rnd)+1)
NotFound=True
for jj=1 to FF-1
if st(jj)=itemid then
NotFound=False
Exit For
end if
next
Loop Until NotFound
while not rs2.EOF
kk=kk+1
if kk=itemid then
tt=rs2("ItemID")
mm=0
else
mm=1
end if
rs2.MoveNext ()
wend
' rs2.AbsolutePosition = 5
' s1="Select KnowledgeID From ZSD_ST where ItemID="&tt
' rs1.Open s1,objConn
' if not rs1.EOF then
' temp=""
' while not rs1.EOF
' temp=temp&CStr(rs1("KnowledgeID"))&" "
' rs1.MoveNext
' wend
'if base<>0 then
' for j=0 to base-1
' if knowlist(j)=temp then
' mm=1
' end if
' next
'end if
' else
' mm=1
' end if
'rs1.Close
' if mm=0 then
K=FF
PaperItemID(i,K)=tt
'knowlist(base)=temp
st(FF)=itemid
base=base+1
FF=FF+1
' end if
rs2.Close
wend
next
%>
<% for k=1 to 5
for kk=1 to 10
%><%=PaperItemID(k,kk)%>
<% next
next%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -