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

📄 search.asp

📁 树型ASP论坛下载
💻 ASP
📖 第 1 页 / 共 2 页
字号:
            <td width="67%"><marquee align="middle" width="400" onMouseOver="stop()" onMouseOut="start()" scrolldelay="100" scrollamount="3">
              <%
			   sql="select top 1 * from bbs_marquee where subid="&request("suboard")&" order by datetime desc"
			   set rscust=Server.Createobject("ADODB.Recordset")
               rscust.open sql,conn,1,3%>
              <%do while not rscust.eof%>
              <font color="#FF0000"><%= rscust("marquee") %></font> 
              <% rscust.movenext 
				  loop
				  set rscust=nothing%>
              </marquee>&nbsp;</td>
            <td width="22%" align="right"><a href="javascript:history.go(0);"><font color="#CC0000">[刷新本页]</font></a> 
              <a href="jinghua.asp?board=<%= request("board") %>"><font color="#CC0000">[本版精华]</font></a></td>
          </tr>
        </table>
        <%'查询
		if request("condition")="标题" then
		sql="select indexid,userid,nickname,newflag,time,visit,renum,classid,title,email,sex,area from yfindex where title like '%" &trim(request("keyword"))&"%' and suboard="&request("suboard")&" order by time desc"
		end if
		if request("condition")="作者" then
		sql="select indexid,userid,nickname,newflag,time,visit,renum,classid,title,email,sex,area from yfindex where nickname='"&trim(request("keyword"))&"' and  suboard="&request("suboard")&" order by time desc"		
		end if
			   set rscust=Server.Createobject("ADODB.Recordset")
               rscust.open sql,conn,1,3
               if rscust.recordcount=0 then%> <br> <br> <br> <br> <br>
        没有你要找的内容! <br> <br> <br> <br> <br> 
			  <% else%>
			   <%
              rscust.pagesize=20
              if request("page_code")="" then
                page=0
              else
                page=clng(request("page_code"))
              end if
              if page<1 then page=1
              if page>rscust.pagecount then page=rscust.pagecount
              rscust.AbsolutePage=page
              %> 
        <table width="97%" border="0" bgcolor="#D3EAFE">
          <tr> 
            <td width="23%" height="19"> <% If stopflag<>true or adm="3" or bz=1 Then '如版块已经锁定,就不能发表%> <a href="writebbs.asp?board=<%=request("board")%>&suboard=<%=request("suboard")%>" ><b><font color="#FF0000"><img src="images/newthread.gif" width="104" height="22" border="0"></font></b></a> 
              <%'= stopflag %> <% End If %> </td>
            <td width="38%" align="center">
			<table width="99%" border="0">
                <form name="form_search" method="post" action="search.asp" onSubmit="return searchkey()" target="_blank">
                  <tr> 
                    <td width="23%" align="right"><img src="images/search.gif" width="16" height="16"></td>
                    <td width="44%" align="center"><input name="keyword" type="text" class="input" onFocus="if (this.value=='请输入关键字') this.value='';" value="请输入关键字" size="14" maxlength="20"></td>
                    <td width="33%" align="center"><select name="condition" id="condition">
                        <option value="标题" selected>标题</option>
                        <option value="作者">作者</option>
                      </select></td>
                    <td width="33%"><input name="imageField" type="image" src="images/earch.gif" width="45" height="18" border="0">
                      <input name="board" type="hidden" id="board" value="<%=request("board")%>">
                      <input name="suboard" type="hidden" id="suboard" value="<%=request("suboard")%>"></td>
                  </tr>
                </form>
              </table>
			</td>
            <td width="27%" align="right">共有<font color="#669900"><%=rscust.recordcount%></font>首贴 第<font color="#669900"><%=page%>/<%=rscust.pagecount%></font>页</td>
            <td width="12%" align="right"> <% if page<>1 then %> <a href=main.asp?board=<%= request("board")%>&suboard=<%= request("suboard") %>&page_code=<%=(page-1)%>>上一页</a> 
              <%end if%> <% if page<>rscust.pagecount then %> <a href=main.asp?board=<%= request("board") %>&suboard=<%= request("suboard") %>&page_code=<%=(page+1)%>>下一页</a> 
              <%end if%> </td>
          </tr>
        </table>
              <%if adm="3" or bz=1 then%> <form method="post" action="main.asp">
                <%end if%>
                <table width="97%" border="0" align="center" cellpadding="5" cellspacing="0" bordercolor="#0099FF">
                  <tr class="10t"> 
                    <td width="6%" align="center" background="images/title_bg.gif"><font color="#000099">回复</font> 
                    </td>
                    <td width="6%" align="center" background="images/title_bg.gif">&nbsp;</td>
                    <td width="50%" align="center" background="images/title_bg.gif"> <font color="#000099">标 
                      题</font> </td>
                    <td width="15%" align="center" background="images/title_bg.gif"> <font color="#000099">作者</font> 
                    </td>
                    <td width="9%" align="center" background="images/title_bg.gif"><font color="#000099">人气</font></td>
                    <td width="14%" align="center" background="images/title_bg.gif"> <font color="#000099">发表时间</font></td>
                  </tr>
                  <%a=2			
			for ipage=1 to rscust.pagesize 
			bg=a mod 2
			  if bg=0 then
			bgcolor="#E2F2FF"
			else
			  bgcolor="#D3EAFE"
			end if%>
                  <tr bgcolor="<%= bgcolor %>" onMouseOut="mOut(this,'<%= bgcolor %>');" onMouseOver="mOvr(this,'#EBFFBB');"> 
                    <td align="center"><%=rscust("renum")%></td>
                    <td align="center"> <img src="images/<%=trim(rscust("classid"))%>.gif"></td>
                    <td> <%if adm="3" or bz=1 then%>
                <input type="checkbox" name="del_update" value="<%=rscust("indexid")%>"> 
                <%end if%>
					   <a href="showbbs.asp?indexid=<%=rscust("indexid")%>&page_code=<%=page%>&board=<%=request("board")%>&suboard=<%=request("suboard")%>"><%=(rscust("title"))%> </a>
					  <%if rscust("newflag")=0 and now()-rscust("time")<3  then %> 
					  <font color="#FF0000">New!</font>
					   <% End If %> </td>
                    <td align="center"> <a href="user.asp?userid=<%=rscust("userid")%>"  title=<%=rscust("area")%><%=rscust("nickname")%><%if rscust("sex")=true then%>先生<%else%>小姐/女士<%end if%>:<%=rscust("email")%>><%=rscust("nickname")%> </a></td>
                    <td align="center"><%=rscust("visit")%></td>
                    <td> <%=year(rscust("time"))&"-"&(month(rscust("time"))&"-"&day(rscust("time"))&" "&hour(rscust("time"))&":"&minute(rscust("time")))%> </td>
                  </tr>
                  <% a=a+1
                  rscust.movenext
                  if rscust.eof then exit for
                 next
                 %>
                </table>
           <%'查询回复
		if request("condition")="作者" then
		  sql2="select * from yfrep where nickname='"&trim(request("keyword"))&"' order by time desc"		
		   set rscust2=Server.Createobject("ADODB.Recordset")
           rscust2.open sql2,conn,1,3
           if rscust2.recordcount>0 then
		   %>
          <br>
          <table width="97%" border="0" align="center" cellpadding="5" cellspacing="0" bordercolor="#0099FF">
            <%a=2			
			do while not rscust2.eof 
			bg=a mod 2
			  if bg=0 then
			bgcolor="#E2F2FF"
			else
			  bgcolor="#D3EAFE"
			end if
			%><%set rs=Server.Createobject("ADODB.Recordset")
               rs.open "select title,suboard from yfindex where indexid="&rscust2("indexid")&"",conn,1,3
			   if cint(rs("suboard"))=cint(request("suboard")) then
			   'Response.Write rs("suboard")&","&request("suboard")
		       'Response.end%>
            <tr bgcolor="<%= bgcolor %>" onMouseOut="mOut(this,'<%= bgcolor %>');" onMouseOver="mOvr(this,'#EBFFBB');"> 
              <td width="6%" align="center">&nbsp;</td>
              <td width="6%" align="center"> <img src="images/<%=trim(rscust2("classid"))%>.gif"></td>
              <td width="50%">			  
			  <a href="showbbs.asp?indexid=<%=rscust2("indexid")%>&page_code=<%=page%>&board=<%=request("board")%>&suboard=<%=request("suboard")%>">回复: <%=(rs("title"))%> </a></td>
              <td width="15%" align="center"> <a href="user.asp?userid=<%=rscust2("userid")%>"><%=rscust2("nickname")%> </a></td>
              <td width="9%" align="center">&nbsp;</td>
              <td width="14%"> <%=year(rscust2("time"))&"-"&(month(rscust2("time"))&"-"&day(rscust2("time"))&" "&hour(rscust2("time"))&":"&minute(rscust2("time")))%> </td>
            </tr>
            <%
			 a=a+1
			 end if
              rscust2.movenext
              loop
              %>
          </table>
          <%if adm="3" or bz=1 then
          end if
		  end if%>
		  <br>
          在标题前选择后: 
          <input type="hidden" name="page_code" value="<%= page %>">
		   <input type="hidden" name="board" value="<%= request("board") %>"> 
		   <input type="hidden" name="suboard" value="<%= request("suboard") %>"> 
           <input type="submit" name="Submit" value="删除文章" class="9t">
              
          <input type="submit" name="Submit" value="精华帖子" class="9t">
              
          <input name="Submit" type="submit" value="转移到">
          本大版: 
          <select name="move_suboard" class="input">
				 <% 
				sqlstr="select * from bbs_suboard where bid="&request("board")&" order by subid"
				set rssub=Server.Createobject("ADODB.Recordset")
        		 rssub.open sqlstr,conn,1,3
    			do while not rssub.eof
				 %>  
                      <option value="<%= rssub("subid") %>"><%= rssub("suboard")%></option>
                     <% rssub.movenext
	                 loop
	                 set rssub=nothing
                     %>
                    </select>
        </form>
              <%end if%> <table width="97%" border="0">
                <tr> 
                  <td align="right"> 
				  <% if page<>1 then 
                response.write "<a href=main.asp?board="&request("board")&"&suboard="&request("suboard")&"&page_code=1>第一页</a>"
                response.write "<a href=main.asp?board="&request("board")&"&suboard="&request("suboard")&"&page_code="&(page-1)&">上一页</a>"
              end if
              if page<>rscust.pagecount then 
                response.write "<a href=main.asp?board="&request("board")&"&suboard="&request("suboard")&"&page_code="&(page+1)&">下一页</a> "
                response.write "<a href=main.asp?board="&request("board")&"&suboard="&request("suboard")&"&page_code="&rscust.pagecount&">最后一页</a>"
              end if %> </td>
                </tr>
              </table>
              <br> <%
 rscust.Close
 set rscust=nothing
 'rs1.Close
 'set rs1=nothing
 conn.close
 end if%>
      </td>
          </tr>
        </table>
</div>
</body>
</html>

⌨️ 快捷键说明

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