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

📄 stwh.asp

📁 这是用asp做的一个网上考试题库系统
💻 ASP
字号:
<!--#include file="../db.asp"-->
 
<%
  objConn.Open strConnection
  Set objRS = Server.CreateObject ("ADODB.Recordset")
  Set rs= Server.CreateObject ("ADODB.Recordset")

  if Len(Request.form("del")) then 
   for i=1 to Request("xx").Count
      id=Request("xx")(i)
      strQ="Select * from ItemTable where ItemID='"&id&"'"
      objRS.Open strQ ,objConn,2,3
       if objRS("ExistId")=1 then
      objRS("ExistId")=0
      objRS.Update
      x=1
      else
      objRS.Delete
      strQ1="Select * from ZSD_ST where ItemID='"&id&"'"
      rs.Open strQ1 ,objConn,2,3
      while not rs.EOF
       rs.delete
       rs.movenext()
      Wend 
      rs.close
      x=2
      end if
      objRS.Close
     next
    Set rs=Nothing
  Set objRS=Nothing    
  Set objConn=Nothing 
   response.redirect "cxresult.asp?"&request.QueryString 

   end if
 if Len(Request.form("back")) then
     response.redirect "chaxun.asp"
 end if
 if Len(Request.form("backhome")) then
     response.redirect "../teacherroom.asp"
 end if    
 
 %>
  <html>
  
<table width="57%" border="1" align="center" height="230" bgcolor="#CCCCFF">
  <tr>
    <td height="245"> 
     <%if x=1 then%>
      <table width="75%" border="0" align="center" height="110">
        <tr>
          <td> 
            <div align="center">已成功删除<%=Request.Form ("xx").Count%>项记录,但它们并没有实际</div>
          </td>
        </tr>
        <tr>
          <td>
            <div align="center">删除,若想实际删除或恢复 到查询界面</div>
          </td>
        </tr>
        <tr>
          <td> 
            <div align="center">选择以删除试题 <a href="./chaxun.asp">查询界面</a></div>
          </td>
        </tr>
      </table>
      <%elseif x=2 then%>
       
      <table width="75%" border="0" align="center" height="80">
        <tr>
          <td height="37"> 
            <div align="center">已成功删除<%=Request.Form ("xx").Count%>项记录,这些记录不能再被</div>
          </td>
        </tr>
        <tr>
          <td height="31"> 
            <div align="center">恢复,返回到查询界面<a href="./chaxun.asp">查询界面</a></div>
          </td>
        </tr>
       
      </table>
      <%end if%>
    </td>
  </tr>
</table>
<p>&nbsp; 
</html>



⌨️ 快捷键说明

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