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

📄 cxresult3.asp

📁 这是用asp做的一个网上考试题库系统
💻 ASP
字号:
<!--#include file="../db.asp"-->
 
<%
  objConn.Open strConnection
  Set objRS = Server.CreateObject ("ADODB.Recordset")
  Set objRS.ActiveConnection = objConn
  strQ="Select Itemtype,CognizeClass,Difficulty,Division,SelectDegree,WriteSubjectID,WriteSubjectTime,ItemID from ItemTable where "
  Set rs = Server.CreateObject ("ADODB.Recordset")
if Request.Form("sczt")=1 then
  strQ=strQ&"ExistID=1 and CourseID="&Session("course_id")&" and "
else
  strQ=strQ&"ExistID=0 and CourseID="&Session("course_id")&" and "
   end if
if Request.Form("xx").Count<>0 then 
for intl=0 to Request.Form ("xx").Count-1
 Select case  Request.Form ("xx")(intl+1)
   case 1:strQ=strQ&"Difficulty"&trim(Request.Form ("ndjb"))&trim(Request.Form ("ndvalue"))
           if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
          else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
            end if 
         end if
        
   case 2:strQ=strQ&"Division"&trim(Request.Form ("qfdjb"))&trim(Request.Form ("qfdvalue"))&" "
          if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
          else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
            end if 
         end if
   case 3:strQ=strQ&"Itemtype="&Request.Form("tx")
          if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
          else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
          end if 
         end if
   case 4:  if Request.Form("xx").Count=1 then
                strQ="Select Itemtype,CognizeClass,Difficulty,Division,SelectDegree,WriteSubjectID,WriteSubjectTime,ItemID from ItemTable where "
                if Request.Form("sczt")=1 then
                   strQ=strQ&"ExistID=1"
                else
                  strQ=strQ&"ExistID=0"
                end if

            end if
            zsdlist=1
          
   case 5: strQ=strQ&"CognizeClass="&trim(Request.Form("rzhvalue"))
           if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
           else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
           end if 
           end if
   case 6: strQ=strQ&"ItemID="&trim(Request.Form("id"))
            if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
          else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
            end if 
           end if
   case 7: strQ=strQ&"WriteSubjectID='"&Request.Form("ctr")&"'"
            if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
           else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
            end if 
           end if

   case 8:strQ=strQ&"WriteSubjectTime"&Request.Form("ctsj")&"'"&Request.Form("year")&"-"&Request.Form("month")&"-"&Request.Form("day")&"'"
        if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
          else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
            end if 
         end if
   
   case 9: strQ=strQ&"SelectDegree"&trim(Request.Form ("sycs"))&trim(Request.Form ("sycsvalue"))
          if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
          else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
            end if 
         end if
   case 10: strQ=strQ&"SuggestScore"&trim(Request.Form ("jyfs"))&trim(Request.Form ("jyfsvalue"))
          if( Request.Form ("xx")(Request.Form ("xx").Count)=4) then
            if(intl<> Request.Form ("xx").Count-2) then 
              strQ=strQ&" and "
            end if 
          else
            if(intl<> Request.Form ("xx").Count-1) then 
              strQ=strQ&" and "
            end if 
         end if
          
  end select
 next


  objRS.Open strQ
 else
  Response.redirect("chaxun.asp")
 end if  
%>
<html>

<head>
<style>
  .bodyStyle {font-family: "Verdana", "Arial";
              font-size: 10pt;
              color:  #00309c}

  .bodyStyle2 {margin-left:12pt;
              background-image:  url('../djst/share/blue_gradient.jpg');
              background-attachment: fixed;
              color:  #00309c;
              width:532px; font-style:normal; font-variant:normal; font-weight:normal; font-size:10pt; font-family:Verdana, Arial}

  A:HOVER {
           text-decoration: none }

  A:LINK { text-decoration: none }

  A:ACTIVE { 
             text-decoration: none }

  A:VISITED { text-decoration: none }

  TABLE   {margin-right: 20pt;
           font-size: 10pt;
           font-family: "Verdana", "Arial"}

  .active  {font-weight: bold;
            color: #00309c}
  .active2 {font-weight: bold;
            color: #405040}
  .visited {font-weight: normal;
            color: #405040 }

  .1      {margin-left: 0pt}
  .2      {margin-left: 16pt;
           width: 100pt}
  .3      {margin-left: 32pt;
           width: 90pt}
  .4      {margin-left: 45pt;
           width: 50pt}

</style>


</head>


<body class=bodyStyle2>
<form method="post" action="./stwh.asp" name="form1" >
  <p align="center"><b><font size="+2" color="#FF0000">查询结果</font></b></p>
 
 <table width="100%" border="1" cellspacing="0" bordercolorlight="#99CCFF" align="center">
    <tr> 
      <td width="5%" nowrap align="center"> </td>
      <td width="10%" nowrap align="center"> 
        <div align="center"><font color="#FF0000">题型</font></div>
      </td>
      <td width="20%" nowrap align="center"> 
        <div align="center"><font color="#FF0000"><font color="#FF0000">知识点</font></font></div>
      </td>
      <td width="10%" nowrap align="center"> 
        <div align="center"><font color="#FF0000">认知分类</font></div>
      </td>
      <td width="5%" nowrap align="center"> 
        <div align="center"><font color="#FF0000">难度</font></div>
      </td>
      <td width="7%" nowrap align="center"> 
        <div align="center"><font color="#FF0000">区分度</font></div>
      </td>
      <td width="10%" nowrap align="center"> 
        <div align="center"><font color="#FF0000">使用次数</font></div>
      </td>
      <td width="13%" nowrap align="center"> 
        <div align="center"><font color="#FF0000">用途</font></div>
      </td>
      <td width="7%" nowrap align="center"> 
        <div align="center"><font color="#FF0000">出题人</font></div>
      </td>
      <td width="15%" nowrap align="center"> 
        <div align="center"><font color="#FF0000">出题时间</font></div>
      </td>
      <td width="6%" nowrap> 
        <div align="center"><font color="#FF0000">试题&nbsp;ID</font></div>
      </td>
    </tr>
    <%while not objRS.EOF 
    
      strQ="select Knowledge.KnowledgeObject as KnowledgeObject,Knowledge.KnowledgeID as KnowledgeID from Knowledge,ZSD_ST where ZSD_ST.KnowledgeID=Knowledge.KnowledgeID and "
      strQ=strQ&"ZSD_ST.ItemID="&objRS("ItemID")
      rs.Open strQ,objConn,2,3
      M=1
      match=1
      if zsdlist=1 then
           match=0
           if not rs.BOF then 
	        	rs.MoveFirst  
	       end if 
          KID=Request.Form("KID")
          

          begin=instr(KID,";")
          if begin=0 then
               do while not rs.EOF  
	  	         if trim(rs("KnowledgeObject"))=trim(KID) then 
		           match=1
		         end if 
	           rs.MoveNext  
	           loop 
	      
	      else
	        match=1
	        while begin<>0 
	       	   KnowledgeID=left(KID,begin-1)
	           LENKID=Len(KID)
	           KID=Right(KID,(LENKID-Begin))
	           begin=instr(KID,";")
               if not rs.BOF then 
	        	  rs.MoveFirst  
	           end if 
               n=1
               do while not rs.EOF
                if n=1 then 
	  	         if trim(rs("KnowledgeObject"))<>trim(KnowledgeID) then 
		             match=0 
                 else
                     match=1	
                     n=0        
		         end if 
		       end if  
	             rs.MoveNext  
	          loop          
	          if match=0 then
	            M=0
	            
	          end if  
	       wend
 
          end if
       end if   
      %>
     <% if M<>1 then
           rs.Close
        else   %>
    <tr> 
      <td width="4%" height="23"> 
        <%if trim(objRS("WriteSubjectID"))=trim(Session("Username")) then
        count=1
        %>
        <div align="center"> 
          <input type="checkbox" name="xx" value="<%=objRS("ItemID")%>">
        </div>
        <% end if%>
      </td>
      <td width="6%" height="23"nowrap> <%
       select Case trim(objRS("Itemtype"))
       Case 1:typename1="单选题"
       Case 2:typename1="多选题"
       Case 3:typename1="填空题"
       Case 4:typename1="判断题"
       Case 5:typename1="分析题"
       end select
      %> <%=typename1%> </td>
      <td width="17%" height="23"> 
        <select name="menu1" size=1 >
          <%
           if not rs.BOF then 
	        	rs.MoveFirst  
	       end if 

          do while not rs.EOF  %> 
          <option value=''><%=rs("KnowledgeObject")%></option>
          <% rs.MoveNext%>
           <% loop   %>
           <%rs.Close%> 
        </select>
      </td>
      <td width="10%" height="23"><%Select case objRS("CognizeClass")
       case 1:rzname="知道"
       case 2:rzname="领会"
       case 3:rzname="评价"
       case 4:rzname="运用"
       case 5:rzname="综合"
       case 6:rzname="分析"
       end select%> <%=rzname%> </td>
      <td width="5%" height="23"> <%Select case trim(objRS("Difficulty"))
       case 0.9:difname="难"
       case 0.7:difname="较难"
       case 0.5:difname="中"
       case 0.3:difname="较易"
       case 0.1:difname="易"
       end select%> <%=difname%></td>
      <td width="7%" height="23"><%Select case trim(objRS("Division"))
       case 0.9:divname="很好"
       case 0.7:divname="较好"
       case 0.5:divname="中"
       case 0.3:divname="较差"
       case 0.1:divname="很差"
       end select%> <%=divname%></td>
      <td width="10%" height="23"><%=objRS("SelectDegree")%></td>
      <td width="12%" height="23">用于考试</td>
      <td width="7%" height="23"><%=objRS("WriteSubjectID")%></td>
      <td width="14%" height="23"><%=objRS("WriteSubjectTime")%></td>
      <% if trim(objRS("WriteSubjectID"))=trim(Session("Username")) then%>
      <td width="6%" height="23"> <a href=ShowItem.asp?id=<%=objRS("ItemID")%>&type=<%=trim(objRS("Itemtype"))%> target='_blank'><%=objRS("ItemID")%></a></td>
      <%else%>
        <td width="6%" height="23"> <a href=ShowItem.asp?id=<%=objRS("ItemID")%>&type=<%=trim(objRS("Itemtype"))%>&m=1 target='_blank'><%=objRS("ItemID")%></a></td>
      <%end if%>
 </tr>
    <%display=2%>
    <%end if%>
    <%objRS.MoveNext%> <%wend%> 
  </table>
       
  <%  objRS.Close
      objConn.Close 
      Set rs=Nothing
      Set objRS= Nothing
      Set objConn = Nothing
      %> 
  <%if display=2 then%>
    <%if count=1 then%>
   <p> </p><table width="75%" border="0" align="center">
    <tr>
    
      <td width="47%"> 
        <div align="right">
          <input type="submit" name="del" value="删除试题">
        </div>
      </td>
      <td width="18%"> 
        <div align="center">
          <input type="reset" name="Submit3" value="重新选择">
        </div>
      </td>
      <td width="35%"> </td>
    </tr>
  </table>
  <%end if%>
 <% end if%> 
</form>
</body>
</html>

⌨️ 快捷键说明

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