📄 selectr1.asp
字号:
<!--#include file="../db.asp"-->
<%
objConn.Open strConnection
Set objRS = Server.CreateObject ("ADODB.Recordset")
Set rs= Server.CreateObject ("ADODB.Recordset")
Set rs1= Server.CreateObject ("ADODB.Recordset")
Set rs2= Server.CreateObject ("ADODB.Recordset")
' 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")
objRS.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(5)
txlist(0)=CInt(rs("dxCount"))
txlist(1)=CInt(rs("duCount"))
txlist(2)=CInt(rs("pdCount"))
txlist(3)=CInt(rs("tkCount"))
txlist(4)=CInt(rs("fxCount"))
dim knowlist(100)
for i=0 to b
knowlist(i)=""
next
for i=0 to b
rr=0
while rr=0
Randomize
itemid=Int((500*Rnd)+1)
mm=0
s1="Select KnowledgeID From ZSD_ST where ItemID="&itemid&" and CourseID="&Session("course_id")
rs1.Open s1,objConn
if not rs1.EOF then
temp=""
while not rs1.EOF
temp=temp&CStr(rs1("KnowledgeID"))&" "
rs1.MoveNext
wend
for j=0 to j<=i
if knowlist(j)=temp then
mm=1
end if
next
else
mm=1
end if
rs1.Close
mm1=0
if mm=0 then
s2="select * from ItemTable where ItemID="&itemid
rs1.Open s2,objConn
' if rs1("Difficulty")=0.5 then
' a=0
' else
' mm1=1
' end if
' if rs1("Division")<>0.5 then
' mm1=1
' end if
if txlist(CInt(rs1("Itemtype")))<=0 then
mm1=1
end if
if mm1=0 then
PaperItemID=Session("PaperItemArray")
tx=CInt(rs1("Itemtype"))
FF=1
do while FF<=50 and PaperItemID(tx,FF)<>""
FF=FF+1
loop
K=FF
PaperItemID(tx,K)=itemid
knowlist(i)=temp
rr=1
end if
end if
wend
next
Session("PaperItemArray")=PaperItemID
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -