⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cover2.asp

📁 这是一个校园考试系统
💻 ASP
📖 第 1 页 / 共 5 页
字号:
            if not  rs12.eof then
            rs12.movenext
            end if 
            k2=k2-1
        '    response.write  "<br>k2="&k2&"下一个<br>"
          else   
            
            rs00.addnew
     		rs00("username")=username
     		rs00("tmid")=cint(rs12("tmid"))
     		rs00("ans")=rs12("ans")
     		rs00("paperno")=paperno
            rs00.update
              
            if not rs12.eof then
            rs12.movenext
            end if 
    '         response.write  "<br>k2="&k2&"加入一个<br>"
          
          end if
                   
        next
      end if 
      
   '---------- 
end if
 
         
 
'--------------------------------随机选11题判断题,防止漏选

  Set rs13=Server.CreateObject("Adodb.RecordSet")
         sql13="select * from tbtk where kao=1 and category=3 and kcid="&kcid&" and (chapter Between "&schap&" And "&echap&")"
         rs13.open sql13,conn,3,2
   
 if not rs13.eof then  
 
 Set rsno3=Server.CreateObject("Adodb.RecordSet")
    sqlno3="select * from tbkcconfig where kcid="&kcid&" and category=3  and paperno="&paperno
   rsno3.open sqlno3,conn,3,2
   
    randomize
    i=1
    
   for i=1 to rsno3("datano") 


    a=int((rs13.RecordCount-0)*rnd+0)

    if ( a>0 and a<(rs13.RecordCount+1)) then 
       rs13.absoluteposition=a
    
    	set rs22=conn.execute("select * from userdata where username='"&username&"' and tmid="&rs13("tmid")&" and paperno="&paperno)

 	
     	 if  rs22.eof  then
	   
     rs00.addnew
     rs00("username")=username
     rs00("tmid")=cint(rs13("tmid"))
     rs00("ans")=rs13("ans")
  rs00("paperno")=paperno
     rs00.update
     
     else
     
     i=i-1
          
          end if 
    end if 
     next

   '-------
    Set rscheck13=Server.CreateObject("Adodb.RecordSet")
    sqlcheck13="select distinct userdata.tmid from userdata,tbtk  where  userdata.tmid=tbtk.tmid and  userdata.username='"&username&"' and  tbtk.kao=1 and tbtk.category=3 and tbtk.kcid="&kcid&" and (tbtk.chapter Between "&schap&" And "&echap&")  and userdata.paperno="&paperno&" order by userdata.tmid"
    rscheck13.open sqlcheck13,conn,3,2
      

      if rscheck13.RecordCount < rsno3("datano")  then
      wrong3=rsno3("datano")-rscheck13.RecordCount
    ' response.write  "<br>wrong3="&wrong3
    '  response.write rscheck13.RecordCount&"<"& rsno3("datano")
      rs13.movefirst
        for k3=1 to wrong3
          you3=0
 
   if not rscheck13.eof then
         rscheck13.movefirst
          
         do while not rscheck13.eof  
     '    response.write  "<br>rs13="&rs13("tmid")
     '    response.write  "==rscheck13="&rscheck13("tmid")
          
            if  cint(rs13("tmid"))=cint(rscheck13("tmid")) then
              you3=1
            end if            
          rscheck13.movenext
          loop      
  end if
 '        response.write "<br>---you3="&you1
           
          if you3=1 then
            if not  rs13.eof then
            rs13.movenext
            end if 
            k3=k3-1
    '       response.write  "<br>k3="&k3&"下一个<br>"
          else   
            
            rs00.addnew
     		rs00("username")=username
     		rs00("tmid")=cint(rs13("tmid"))
     		rs00("ans")=rs13("ans")
     		rs00("paperno")=paperno
            rs00.update
              
            if not rs13.eof then
            rs13.movenext
            end if 
      '      response.write  "<br>k3="&k3&"加入一个<br>"
          
          end if
                   
        next
      end if 
      
   '---------- 
   
 end if
 '---------------------------随机选11题单选题,防止漏选

     Set rs14=Server.CreateObject("Adodb.RecordSet")
         sql14="select * from tbtk where kao=1 and category=4 and kcid="&kcid&" and (chapter Between "&schap&" And "&echap&")"
         rs14.open sql14,conn,3,2
   
 if not rs14.eof then  
 
   Set rsno4=Server.CreateObject("Adodb.RecordSet")
    sqlno4="select * from tbkcconfig where kcid="&kcid&" and category=4  and paperno="&paperno
   rsno4.open sqlno4,conn,3,2
   
    randomize
    i=1
    
   for i=1 to rsno4("datano") 

    a=int((rs14.RecordCount-0)*rnd+0)

    if ( a>0 and a<(rs14.RecordCount+1)) then 
       rs14.absoluteposition=a
    
    	set rs22=conn.execute("select * from userdata where username='"&username&"' and  tmid="&rs14("tmid")&" and paperno="&paperno)
 	
     	 if  rs22.eof  then
	   
     rs00.addnew
     rs00("username")=username
     rs00("tmid")=cint(rs14("tmid"))
     rs00("ans")=rs14("ans")
      rs00("paperno")=paperno
 
     rs00.update
     
     else
     
     i=i-1
          
          end if 
    end if 
     next
     
        '-------
    Set rscheck14=Server.CreateObject("Adodb.RecordSet")
    sqlcheck14="select distinct userdata.tmid from userdata,tbtk  where userdata.tmid=tbtk.tmid and  userdata.username='"&username&"' and  tbtk.kao=1 and tbtk.category=4 and tbtk.kcid="&kcid&" and (tbtk.chapter Between "&schap&" And "&echap&")  and userdata.paperno="&paperno&" order by userdata.tmid"
    rscheck14.open sqlcheck14,conn,3,2
       

      if rscheck14.RecordCount < rsno4("datano")  then
     wrong4=rsno4("datano")-rscheck14.RecordCount
     'response.write  "<br>wrong4="&wrong4
     ' response.write rscheck14.RecordCount&"<"& rsno4("datano")
      rs14.movefirst
        for k4=1 to wrong4
          you4=0
          
     if not rscheck14.eof then
          rscheck14.movefirst
         do while not rscheck14.eof  
     '    response.write  "<br>rs14="&rs14("tmid")
     '    response.write  "==rscheck14="&rscheck14("tmid")
          
            if  cint(rs14("tmid"))=cint(rscheck14("tmid")) then
              you4=1
            end if            
          rscheck14.movenext
          loop      
     end if
     
     
    '     response.write "<br>---you4="&you4
           
          if you4=1 then
            if not  rs14.eof then
            rs14.movenext
            end if 
            k4=k4-1
    '        response.write  "<br>k4="&k4&"下一个<br>"
          else   
            
            rs00.addnew
     		rs00("username")=username
     		rs00("tmid")=cint(rs14("tmid"))
     		rs00("ans")=rs14("ans")
     		rs00("paperno")=paperno
            rs00.update
              
            if not rs14.eof then
            rs14.movenext
            end if 
    '         response.write  "<br>k4="&k4&"加入一个<br>"
          
          end if
                   
        next
      end if 
      
   '---------- 
end if
 '------------------------------随机选6题多选题,防止漏选

 
  Set rs15=Server.CreateObject("Adodb.RecordSet")
         sql15="select * from tbtk where kao=1 and category=5 and kcid="&kcid&" and (chapter Between "&schap&" And "&echap&")"
         rs15.open sql15,conn,3,2
         
if not rs15.eof then   
     Set rsno5=Server.CreateObject("Adodb.RecordSet")
    sqlno5="select * from tbkcconfig where kcid="&kcid&" and category=5  and paperno="&paperno
   rsno5.open sqlno5,conn,3,2
   
    randomize
    i=1
    
   for i=1 to rsno5("datano") 

    a=int((rs15.RecordCount-0)*rnd+0)

    if ( a>0 and a<(rs15.RecordCount+1)) then 
       rs15.absoluteposition=a
    
    	set rs22=conn.execute("select * from userdata where username='"&username&"' and  tmid="&rs15("tmid")&" and paperno="&paperno)
 	
     	 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -