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

📄 search.asp

📁 网站代码
💻 ASP
字号:
<!--#include file="head.asp" -->
<%
'* 个人版价格:500元 商业版价格:700元
'* 演示:http://Demo.wenday.com
'* 版本:Engine_WenDay网站信息系统 Ver 2.0 演示版
'* 版权所有: 一奔网络工作室(Wenday.Com)
'* 联系QQ: 42367091
'* Email :wenday@21cn.com
'* 程序开发: Wenday
%>
<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
        <TR> 
          <TD width="100%"> <TABLE cellSpacing=0 cellPadding=0 width=778 align=center border=0>
              <TBODY>
                <TR bgColor=#ffffff> 
                  <TD colSpan=3 height=2></TD>
                </TR>
                <TR> 
                  <TD width="19" height=22 align=right><img src="Img/02_1.gif" width="12" height="9"></TD>
                  
<TD width="748"><FONT color=#333333>&nbsp;您的位置:&nbsp;</FONT>网站的首页</TD>
                  <TD width="11">&nbsp;</TD>
                </TR>
              </TBODY>
            </TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width=778 border=0>
        <TBODY>
        <TR>
          <TD vAlign=top colSpan=2>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center 
            border=0>
                      <TBODY>
                        <TR bgColor=#cccccc> 
                          <TD colSpan=2 height=1></TD>
                        </TR>
                        <TR> 
                          <TD colSpan=2 height=2></TD>
                        </TR>
                        <TR> 
                          <TD width=62 bgColor=#eeeeee height=22></TD>
                          <TD bgColor=#eeeeee> <% Call Marquee()%></TD>
                        </TR>
                        <TR> 
                          <TD bgColor=#cccccc colSpan=2 
        height=3></TD>
                        </TR>
                      </TBODY>
                    </TABLE></TD></TR>
        <TR>
          <TD style="BORDER-RIGHT: #d8d8d8 1px solid;BORDER-left: #d8d8d8 1px solid" vAlign=top width=185 
          bgColor=#f6f6f6>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                  <TBODY>
                    <TR> 
                      <TD background=""> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                            <TR> 
                              <TD height=34 background="Img/homedhbg.gif"><IMG 
                    src="Img/hydl.gif"></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD height=40><TABLE width=95% height="100" border=0  align=center cellPadding=0 cellSpacing=1 bgColor=#e8e8e8>
                          <TBODY>
                            <TR> 
                              <TD height="53" bgColor=#f9f9f9> <% Call UserLogin() %> </TD>
                            </TR>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD></TD>
                    </TR>
                    <TR> 
                      <TD></TD>
                    </TR>
                    <TR> 
                      <TD background=Img/homedhbg.gif> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                            <TR> 
                              <TD height=34><div align="center"><strong>热 门 信 
                                  息</strong></div></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD vAlign=top><TABLE cellSpacing=0 cellPadding=5 width=99% align=center bgColor=#e8e8e8 border=0>
                          <TBODY>
                            <TR> 
                              <TD width="100%" bgColor=#f9f9f9> <% Call Ew_ShowInfo(1,8) %> </TD>
                            </TR>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD></TD>
                    </TR>
                    <TR> 
                      <TD background=Img/homedhbg.gif> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                            <TR> 
                              <TD height=34><div align="center"><strong>网 站 调 
                                  查</strong></div></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD vAlign=top><TABLE style="WORD-BREAK: break-all" height="100%" cellPadding=4 width="100%" border=0>
                          <TBODY>
                            <TR> 
                              <TD vAlign=top height=80> <TABLE width=99% height="100%" border=0 align=center cellPadding=0 cellSpacing=1 bgColor=#e8e8e8>
                                  <TBODY>
                                    <TR> 
                                      <TD width="100%" height="52" bgColor=#f9f9f9> 
                                        <% Call Ew_FlashVote() %>
                                      </TD>
                                    </TR>
                                </TABLE></TD>
                            </TR>
                          </TBODY>
                        </TABLE></TD>
                    </TR>
                    <TR> 
                      <TD></TD>
                    </TR>
                    <TR> 
                      <TD></TD>
                    </TR>
                    <TR> 
                      <TD></TD>
                    </TR>
                  </TBODY>
                </TABLE></TD>         
<TD vAlign=top align=left width=593 style="BORDER-RIGHT: #d8d8d8 1px solid">
      <%
   	const MaxPerPage=20
   	dim totalPut
   	dim CurrentPage
   	dim TotalPages
   	dim i,j
   	dim idlist
   	dim title

	title=request("txtitle")
	session("search")=request("txtitle")
   	if not isempty(request("page")) then
      		currentPage=cint(request("page"))
   	else
      		currentPage=1
   	end if
  	if not isempty(request("selAnnounce")) then
     		idlist=request("selAnnounce")
     		if instr(idlist,",")>0 then
			dim idarr
			idArr=split(idlist)
			dim id
		for i = 0 to ubound(idarr)
	       		id=clng(idarr(i))
	       		call deleteannounce(id)
		next
     		else
			call deleteannounce(clng(idlist))
     		end if
  	end if 
   	dim sql
   	dim rs
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr> 
<td width="100%" align="center"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form method=Post action="search.asp"><tr>     
<td> <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR> 
<TD align=middle width=55 background=Img/homedhbg.gif height=34><img src="Img/tp.gif" width="55" height="34"></TD>
<TD width="535" background=Img/homedhbg.gif> &nbsp;&nbsp; 查找关键字: 
<input name="txtitle" type="text" class=smallInput value="<%=session("search")%>" size="13"> &nbsp; <input type="submit" value="查 询" name="title" class="buttonface"> 
</TD>
</TR>
</TBODY>
</TABLE>
<%
	SortID=Request("SortId")
	if title<>"" then
	sql="select * from Info where title like '%"&trim(title)&"%' or content like '%"&trim(title)&"%' order by ID desc"
	end if
	if title="" then
	sql="select * from Info order by ID desc"
	end if
	Set rs= Server.CreateObject("ADODB.Recordset")
	rs.open sql,conn,1,1

  	if rs.eof and rs.bof then
       		response.write "<br><br><p align='center'>没有找到任何文章...</p>"
   	else
      		totalPut=rs.recordcount
      		if currentpage<1 then
          		currentpage=1
      		end if
      		if (currentpage-1)*MaxPerPage>totalput then
	   		if (totalPut mod MaxPerPage)=0 then
	     			currentpage= totalPut \ MaxPerPage
	  		else
	      			currentpage= totalPut \ MaxPerPage + 1
	   		end if

      		end if
       		if currentPage=1 then
           		showpage totalput,MaxPerPage,"Search.asp"
            		showContent
            		showpage totalput,MaxPerPage,"Search.asp"
       		else
          		if (currentPage-1)*MaxPerPage<totalPut then
            			rs.move  (currentPage-1)*MaxPerPage
            			dim bookmark
            			bookmark=rs.bookmark
           			showpage totalput,MaxPerPage,"Search.asp"
            			showContent
             			showpage totalput,MaxPerPage,"Search.asp"
        		else
	        		currentPage=1
           			showpage totalput,MaxPerPage,"Search.asp"
           			showContent
           			showpage totalput,MaxPerPage,"Search.asp"
	      		end if
	   	end if
   	rs.close
   	end if
	        
   	set rs=nothing  
   	conn.close
   	set conn=nothing
  
   	sub showContent
       	dim i
	   i=0
%>
<br>
<br>
<table width="94%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#cccccc" bordercolordark="#FFFFFF" bgcolor="#CCCCCC">
<tr bgcolor="#EAEAEA"> 
<td width="66" height="22" align="center">ID</td>
<td width="486" align="center">信 息 标 题</td>
</tr>
<%do while not rs.eof%>
<tr bgcolor="#FFFFFF"> 
<td width="66" height="22"> 
<p align="center"><%=rs("ID")%></td>
<td> <p align="left">&nbsp;&nbsp;<a href="ViewInfo.asp?id=<%=rs(0)%>"><%=rs("title")%></a></td>
</tr>
<%
	i=i+1
	      if i>=MaxPerPage then exit do
	      rs.movenext
	loop
%>
<tr bgcolor="#EAEAEA"> 
<td height="19" colspan="2"> 
<div align="right"> </div></td>
</tr>
</table>
              <%
   end sub 

function showpage(totalnumber,maxperpage,filename)
  dim n
  if totalnumber mod maxperpage=0 then
     n= totalnumber \ maxperpage
  else
     n= totalnumber \ maxperpage+1
  end if
  response.write "<p align='center'>&nbsp;"
  if CurrentPage<2 then
    response.write "首页 上一页&nbsp;"
  else
    response.write "<a href="&filename&"?SortID="&SortID&"&page=1>首页</a>&nbsp;"
    response.write "<a href="&filename&"?SortID="&SortID&"&page="&CurrentPage-1&">上一页</a>&nbsp;"
  end if
  if n-currentpage<1 then
    response.write "下一页 尾页"
  else
    response.write "<a href="&filename&"?SortID="&SortID&"&page="&(CurrentPage+1)&">"
    response.write "下一页</a> <a href="&filename&"?SortID="&SortID&"&page="&n&">尾页</a>"
  end if
   response.write "&nbsp;页次:<strong>"&CurrentPage&"/"&n&"</strong>页"
   response.write "&nbsp;共<b>"&totalnumber&"</b>篇文章 <b>"&maxperpage&"</b>篇文章/页"
       
end function

%>
            </td>
        </tr></form>
      </table> </td>
  </tr>
</table>
</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="Bottom.asp" -->
</BODY></HTML>

⌨️ 快捷键说明

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