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

📄 searchdatabase.asp

📁 一套在线考试系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>在线考试系统</title>
<link rel="stylesheet" type="text/css" href="../DEFAULT.CSS">
<script language="JavaScript1.2" src="../js/lock.js"></script>
</head>

<body bgcolor="#FFFFFF">
<%
Dim page,ipage,myself,param,pagesize
dim subject,subjecttype,id,knowledge,difficulty,distinction,perception,question,starttime,endtime,makeusername,i
subject="%"&request("subject")&"%"
subjecttype="%"&request("subjecttype")&"%"
id="%"&request("id")&"%"
knowledge="%"&request("knowledge")&"%"
difficulty="%"&request("difficulty")&"%"
distinction="%"&request("distinction")&"%"
perception="%"&request("perception")&"%"
question="%"&request("question")&"%"
makeusername="%"&request("makeusername")&"%"
if request("page")="" then
  page=1
else
  page=request("page")
end if
if request("print")="on" then
  pagesize=100000
else
  pagesize=20
end if
if request("starttime")="" then
  starttime="1970-1-1"
else
  starttime=request("starttime")
end if
if request("endtime")="" then
  endtime="2050-1-1"
else
  endtime=request("endtime")
end if
makeusername="%"&request("makeusername")&"%"
%>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#007CD0" width="100%" id="AutoNumber1" height="25">
  <tr>
    <td width="100%">当前位置:题库管理 &gt; <font color="#FF0000">试题检索</font></td>
  </tr>
</table>
<% if request("btnsearch")<>"" or request.querystring("page")<>"" then
response.write param
sql="select * from view_database where havepass=1 and id like '"&id&"' and subject like '"&subject&_
       "' and type like '"&subjecttype&"' and knowledge like '"&knowledge&"' and difficulty like '"&difficulty&_
       "' and distinction like '"&distinction&"'and perception like '"&perception&"' and question like '"&_
       question&"' and makeusername like '"&makeusername&"' and maketime between '"&starttime&"' and '"&endtime&"'"
      rs.open sql,conn,3,2
      if rs.eof then %>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" height="20" class="noborder" bgcolor="#F1F1F1">
  <tr>
    <td width="100%" class="border">
    <p align="center">没有符合条件的试题!</td>
  </tr>
</table>
<% else %>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#007CD0" width="100%" id="AutoNumber4" bgcolor="#F1F1F1">
  <tr>
    <td height="20" class="border_blue" colspan="5">&nbsp;试题检索结果</td>
  </tr>
  <tr>
    <td height="20" colspan="5">&nbsp;共检索到 <%=rs.recordcount%> 条记录</td>
  </tr>
  <tr>
    <td height="20" class="border" align="center" width="40">序号</td>
    <td class="border" align="center">科目名称</td>
    <td class="border" align="center">试题类型</td>
    <td class="border" align="center">试题内容</td>
    <td class="border" align="center">答案</td>
  </tr>
  <% on error resume next
  rs.PageSize = pagesize
  Page = CLng(Request("Page"))
  If Page < 1 Then Page = 1
  If Page > rs.PageCount Then Page = rs.PageCount
  i=page+(page-1)*(pagesize-1)
  rs.AbsolutePage = Page
  For iPage = 1 To rs.PageSize %>
  <tr>
    <td height="20" align="center" width="40"><%=i%> </td>
    <td align="center"><%=rs("subject")%> </td>
    <td align="center"><%=rs("type")%> </td>
    <td><a href="viewdatabase.asp?id=<%=rs("id")%>">&nbsp;<%=left(server.HTMLEncode(rs("question")),24)%></a> </td>
    <td align="center"><%=rs("answer")%> </td>
  </tr>
  <% rs.MoveNext
  If rs.EOF Then Exit For
  i=i+1
  Next
  end if %>
</table>
<%
param="&subject="&server.htmlencode(replace(subject,"%",""))
param=param&"&subjecttype="&server.htmlencode(replace(subjecttype,"%",""))
param=param&"&id="&server.htmlencode(replace(id,"%",""))
param=param&"&difficulty="&server.htmlencode(replace(difficulty,"%",""))
param=param&"&distinction="&server.htmlencode(replace(distinction,"%",""))
param=param&"&knowledge="&server.htmlencode(replace(knowledge,"%",""))
param=param&"&perception="&server.htmlencode(replace(perception,"%",""))
param=param&"&question="&server.htmlencode(replace(question,"%",""))
param=param&"&makeusername="&server.htmlencode(replace(makeusername,"%",""))
param=param&"&starttime="&starttime
param=param&"&endtime="&endtime
if request("print")<>"on" then
%>
<form ACTION="<%=Myself%>" METHOD="GET">
  <div align="right">
    <table cellspacing="0" cellpadding="0" class="withborder" style="border-collapse: collapse" bordercolor="#007CD0" width="100%" bgcolor="#F1F1F1" border="1">
      <tr>
        <td>
        <p align="right"><%If Page <> 1 Then %>
        <a href="<%=myself%>?page=1<%=param%>">第一页</a>
        <a href="<%=myself%>?page=<%=(Page-1)%><%=param%>">上一页</a>
        <% End If 
        If Page <> rs.PageCount Then %>
        <a href="<%=myself%>?page=<%=(Page+1)%><%=param%>">下一页</a>
        <a href="<%=myself%>?page=<%=rs.PageCount%><%=param%>">最后一页</a> <% End If %> 
        输入页次:<input name="Page" size="3" class="s01"> 页次:<font color="Red"><%=Page%>/<%=rs.PageCount%></font>&nbsp;&nbsp;</td>
      </tr>
    </table>
  </div>
</form>
<%
end if
end if
subject=replace(subject,"%","")
subjecttype=replace(subjecttype,"%","")
id=replace(id,"%","")
knowledge=replace(knowledge,"%","")
difficulty=replace(difficulty,"%","")
distinction=replace(distinction,"%","")
perception=replace(perception,"%","")
question=replace(question,"%","")
makeusername=replace(makeusername,"%","")
if request("print")<>"on" then
%><hr color="#FFFFFF" size="1">
<div align="center">
  <form name="searchform" ACTION="searchdatabase.asp" METHOD="post">
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#000000" width="480" id="AutoNumber3" bgcolor="#F1F1F1">
      <tr>
        <td height="25" class="border" colspan="2">&nbsp;试题检索</td>
      </tr>
      <tr>
        <td height="20" colspan="2">&nbsp;请输入关键字,可以用%代表任意字符</td>
      </tr>
      <tr>
        <td width="120" height="20" align="right">科目名称:</td>
        <td>&nbsp;<input type="text" name="subject" size="56" class="s01" vaule="<%=subject%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">试题类型:</td>
        <td>&nbsp;<select size="1" name="subjecttype">
        <option value="<%=subjecttype%>" selected><%=subjecttype%></option>
        <option value="单选题">单选题</option>
        <option value="多选题">多选题</option>
        <option value="判断题">判断题</option>
        </select></td>
      </tr>
      <tr>
        <td height="20" align="right">试题编号:</td>
        <td>&nbsp;<input type="text" name="id" size="56" class="s01" value="<%=id%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">知识点:</td>
        <td>&nbsp;<input type="text" name="knowledge" size="56" class="s01" value="<%=knowledge%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">难度:</td>
        <td>&nbsp;<select size="1" name="difficulty">
        <option value="<%=difficulty%>" selected><%=difficulty%></option>
        <option value="难">难</option>
        <option value="较难">较难</option>
        <option value="中">中</option>
        <option value="较易">较易</option>
        <option value="易">易</option>
        </select></td>
      </tr>
      <tr>
        <td height="20" align="right">区分度:</td>
        <td>&nbsp;<select size="1" name="distinction">
        <option value="<%=distinction%>" selected><%=distinction%></option>
        <option value="优">优</option>
        <option value="良">良</option>
        <option value="中">中</option>
        <option value="较差">较差</option>
        <option value="差">差</option>
        </select></td>
      </tr>
      <tr>
        <td height="20" align="right">认知分类:</td>
        <td>&nbsp;<select size="1" name="perception">
        <option value="<%=perception%>" selected><%=perception%></option>
        <option value="了解">了解</option>
        <option value="理解">理解</option>
        <option value="掌握">掌握</option>
        <option value="熟练掌握">熟练掌握</option>
        </select></td>
      </tr>
      <tr>
        <td height="20" align="right">试题内容:</td>
        <td>&nbsp;<input type="text" name="question" size="56" class="s01" value="<%=question%>"></td>
      </tr>
      <tr>
        <td height="20" align="right">出题时间:</td>
        <td>&nbsp;<input name="starttime" readOnly class="s01" style="TEXT-ALIGN: center" size="16" value="<%=starttime%>"><input onclick="popFrame.fPopCalendar(starttime,starttime,popCal);return false" class="c02" value="▼" size="2" name="1" readonly> 
        <input name="endtime" readOnly class="s01" style="TEXT-ALIGN: center" size="16" value="<%=endtime%>"><input onclick="popFrame.fPopCalendar(endtime,endtime,popCal);return false" class="c02" value="▼" size="2" name="1" readonly></td>
      </tr>
      <tr>
        <td height="20" align="right">出题人:</td>
        <td>&nbsp;<input type="text" name="makeusername" size="20" class="s01" value="<%=makeusername%>"> 
        (注:姓名)</td>
      </tr>
      <tr>
        <td height="20" align="right">其它:</td>
        <td>&nbsp;<input type="checkbox" name="print" value="on">打印模式</td>
      </tr>
      <tr>
        <td colspan="2" height="30" class="border" style="height: 30">
        <p align="center">
        <input type="submit" value="搜 索" name="btnSearch" class="s02">&nbsp;
        <input type="reset" value="重 置" name="B2" class="s02"></td>
      </tr>
    </table>
  </form>
</div>
<%
end if
%>
<!--  put these lines below ahead of you page --->
<div id="popCal" style="POSITION: absolute; VISIBILITY: hidden; WIDTH: 10px">
  <iframe frameBorder="0" height="160" name="popFrame" scrolling="no" width="282" src="popcjs.asp">
  </iframe>
</div>
<script event="onclick()" for="document">popCal.style.visibility = "hidden";
</script>
<!--  put these lines above ahead of you page --->

</body>

</html>

⌨️ 快捷键说明

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