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

📄 bbs_search.asp

📁 该资料包含大量网络开发的案例和源代码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../include/datatransfer.asp"-->
<!--#include file="../include/functionjs.asp"-->
<!--#include file="../include/functionvb.asp" -->
<!--#include file="../include/header.asp" -->
<!--#include file="../include/dbconn.inc" -->
<!--#include file="../include/refresh.asp"-->
<link href="../include/main.css" rel="stylesheet" type="text/css">
<%
if UserName=empty then
	response.Redirect("../common/showerr.asp?ErrType=1")
end if
%>
<table width="710" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#BDBABD"  >
        <tr>
          <td background="../resource/images/bbs/bg.gif" bgcolor="#FFFFFF" class="tablehead"><img src="../resource/images/bbs/li.gif" width="9" height="9"><a href="../blog/main.asp">56Blog</a>→<a href="bbs_main.asp">论坛</a>→<a href="bbs_search.asp">论坛搜索</a></td>
        </tr>
</table>
  <form name="form1" method="post" action="bbs_search_list.asp"  onSubmit="return checkin(this)">
<table width="710" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#BDBABD" >
  <tr bgcolor="#FFFFFF">
    <td  colspan="2"align="center" background="../resource/images/bbs/bg.gif" class="tablehead">论坛搜索</td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#FFFFFF"><b>搜索说明</b>:<br>
      <ul>
        <li>      关键字字符长度不能小于 <b>2</b> 大于 <b>20</b> 字节,<a 
title="~,!,@,#,$,%,^,&amp;,*,(,),_,+,=,`,[,],{,},;,:,,',,,<,>,.,/,\,|,?,_,about&#13;&#10;1,2,3,4,5,6,7,8,9,0,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z&#13;&#10;after,all,also,an,and,another,any,are,as,at,be,because,been,before,being,between&#13;&#10;both,but,by,came,can,come,could,did,do,each,for,from,get,got,had&#13;&#10;has,have,he,her,here,him,himself,his,how,if,in,into,is,it,like,make,many&#13;&#10;me,might,more,most,much,must,my,never,now,of,on,only,or,other,our&#13;&#10;out,over,said,same,see,should,since,some,still,such,take,than,that,the,their&#13;&#10;them,then,there,these,they,this,those,through,to,too,under,up,very,was&#13;&#10;way,we,well,were,what,where,which,while,who,with,would,you,your&#13;&#10;的,一,不,在,人,有,是,为,以,于,上,他,而,后,之,来,及,了,因,下,可&#13;&#10;到,由,这,与,也,此,但,并,个,其,已,无,小,我,们,起,最,再&#13;&#10;今,去,好,只,又,或,很,亦,某,把,那,你,乃,它">在这里看搜索被限的字符</a>
        <li> 按 用户名 查询为精确查询,必须输入用户名的全称            
      </ul></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td colspan="2" align="center"><b>搜索选项</b> </td>
  </tr>
  <tr>
    <td colspan="2" align="center" bgcolor="#FFFFFF">
	请输入关键字:
      <input size=40 name=keyword>
搜索论坛:
<select size=1 name=boardid>
  <option value="0" selected>所有论坛</option>
  <%
		strSQL="select * from bbs_board "
		objrs.open strsql,objconn,1,1		
		do while not objrs.eof%>
  <option value="<%=objrs("board_id")%>" <%if boardid=objrs("board_id") then response.Write("selected")%>>§<%=objrs("board_name")%>§</option>
  <%
		  objrs.movenext
		  loop%>
</select></td>
  </tr>
  <tr bordercolor="#4C4C4C" bgcolor="#FFFFFF">
    <td width="348" align="right" bordercolor="#4C4C4C"><b>作者搜索</b>
      <input type=radio value=1 name=sType></td>
    <td width="348" bordercolor="#4C4C4C" >
	<select name=nSearch>
      <option value=1 selected>搜索主题作者
        
    </select></td>
  </tr>
  <tr bordercolor="#4C4C4C" bgcolor="#FFFFFF">
    <td align="right"><b>关键字搜索</b>
      <input type=radio checked value=2 name=sType></td>
    <td><select name=PSearch>
      <option value=1 selected>在主题中搜索关键字
        <option value=2>在贴子内容中搜索关键字</option>
    </select></td>
  </tr>
  <tr bordercolor="#4C4C4C" bgcolor="#FFFFFF">
    <td align="right"><b>日期范围</b></td>
    <td><select name=SearchDate>
      <option value=0 selected>所有日期
        <option value=1>昨天以来
        <option value=5>5天以来
        <option value=10>10天以来
        <option value=30>30天以来</option>
    </select></td>
  </tr>
  <tr>
    <td colspan="2" align="center" bordercolor="#4C4C4C" background="../resource/images/bj2.gif" bgcolor="#FFFFFF">
      <input name="submit" type="submit" value="开始搜索" class="input">
    </td>
  </tr>
</table>
  </form>	
 <script language="vbscript">
Function checkin(myform)
checkin=true
if (trim(myform.keyword.value)="") then
  msgbox ("请填写查询内容!") 
  checkin= false
  exit function
end if

dim strforbid,arrforbid
strforbid="~,!,@,#,$,%,^,&amp;,*,(,),_,+,=,`,[,],{,},;,:,,',,,<,>,.,/,\,|,?,_,about&#13;&#10;1,2,3,4,5,6,7,8,9,0,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z&#13;&#10;after,all,also,an,and,another,any,are,as,at,be,because,been,before,being,between&#13;&#10;both,but,by,came,can,come,could,did,do,each,for,from,get,got,had&#13;&#10;has,have,he,her,here,him,himself,his,how,if,in,into,is,it,like,make,many&#13;&#10;me,might,more,most,much,must,my,never,now,of,on,only,or,other,our&#13;&#10;out,over,said,same,see,should,since,some,still,such,take,than,that,the,their&#13;&#10;them,then,there,these,they,this,those,through,to,too,under,up,very,was&#13;&#10;way,we,well,were,what,where,which,while,who,with,would,you,your&#13;&#10;的,一,不,在,人,有,是,为,以,于,上,他,而,后,之,来,及,了,因,下,可&#13;&#10;到,由,这,与,也,此,但,并,个,其,已,无,小,我,们,起,最,再&#13;&#10;今,去,好,只,又,或,很,亦,某,把,那,你,乃,它"
arrforbid=split(strforbid,",")
for each i in arrforbid
		if i=trim(myform.keyword.value) then 
		  msgbox ("您输入非法查询字符,请重新输入!") 
  checkin= false
  exit function
		end if
next
end Function
</script>
<!--#include file="../include/endconn.inc" -->
<!--#include file="../include/footer.asp" -->

⌨️ 快捷键说明

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