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

📄 search.asp

📁 管理登录system 管理员:admin 密码:admin888 数据库链接文件: conn.asp 内容数据库前台链接文件 systemconn.asp 内容数据库后台链接文件 sy
💻 ASP
字号:
<!--#include file="SiteInfo.asp"-->
<%
'☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆
'★                                                                  ★
'☆                万博中小企业网站管理系统(NWEB)                    ☆
'★                                                                  ★
'☆  版权所有 Nweb.cn                                                ☆
'★                                                                  ★
'☆  程序制作 万博工作室                                             ☆
'★           Add:四川省彭州市西大街228号/611930                     ★
'☆           Tel:028-88079088  Fax:83708850                         ☆
'★           E-m:duolaimi-123@163.com                               ★
'☆           Q Q:59309100                                           ☆
'★                                                                  ★
'☆  相关网址 [产品介绍]http://www.Nweb.cn                           ☆
'★           [支持论坛]http://www.Nweb.cn/bbs                       ★
'☆                                                                  ☆
'★  演示网址 http://www.Nweb.cn                                     ★
'☆                                                                  ☆
'★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
%>
<%
if trim(request.QueryString("Search"))="" then
   if trim(request.Form("Area"))="" then
      Search="None"
   else
      Search=trim(request.Form("Area"))
   end if
else
   Search=trim(request.QueryString("Search"))
end if
KeyWord=trim(request.Form("KeyWord"))
select case Search
   case "None" 
      response.write "<script language=javascript> alert('您没有选择检索范围,点击返回!');history.back(-1);</script>"
      response.end
   case "Pro"
      Locality="检索产品&nbsp;>>&nbsp;关键字:"&KeyWord
	  SQL = "SELECT id,LName,LAddtime FROM Products where LName like '%"&KeyWord&"%' or LKeyWord like '%"&KeyWord&"%' and  LPutout=true ORDER BY id DESC"
   case "News"
      Locality="检索新闻&nbsp;>>&nbsp;关键字:"&KeyWord
      SQL= "SELECT id,NewTitle,AddTime FROM News where NewTitle like '%"&KeyWord&"%' and Putout=true ORDER BY id DESC"
   case "Down"
      Locality="检索下载&nbsp;>>&nbsp;关键字:"&KeyWord
      SQL= "SELECT * FROM Nweb_DFile where FileName like '%"&KeyWord&"%' and Putout=true ORDER BY id DESC"
   case "Require"
      Locality="检索需求&nbsp;>>&nbsp;关键字:"&KeyWord
      SQL= "SELECT * FROM Nweb_Require where Title like '%"&KeyWord&"%' and Putout=true ORDER BY id DESC"
   case "Feedback"
      Locality="检索留言&nbsp;>>&nbsp;关键字:"&KeyWord
      SQL= "SELECT * FROM Feedback where Title like '%"&KeyWord&"%' and Outpub=true ORDER BY id DESC"
end select
'===========================
%>
<%
dim i,intPage,page,pre,last,filepath
set RsP = server.createobject("adodb.recordset")
PSQL=SQL
RsP.PageSize = 20  '这里设定每页显示的记录数
RsP.CursorLocation = 3
RsP.Open PSQL,conn,0,2,1  
pre = true
last = true
page = trim(Request.QueryString("page"))
if len(page) = 0 then
   intpage = 1
   pre = false
else
   if cint(page) =< 1 then
      intpage = 1
      pre = false
   else
      if cint(page)>=RsP.PageCount then
         intpage = RsP.PageCount
         last = false
      else
         intpage = cint(page)
      end if
   end if
end if
if not RsP.eof then
   RsP.AbsolutePage = intpage
end if

if RsP.Bof or RsP.EOF then ContentList="还没有相关内容!"

for i=1 to RsP.PageSize
  if RsP.EOF or RsP.BOF then  exit for
  select case Search
     case "Pro"
	    ContentList=ContentList&"<tr><td height='22' Class='News-01'>&nbsp;<img src='Images/Arrow-Title.gif' width='4' height='7'>&nbsp;<a  target='_blank' href='ProductsView.asp?id="&RsP("id")&"'>"&RsP("LName")&"</a></td><td width='80px' Class='News-02'>"&RsP("LAddtime")&"</td></tr>"
     case "News"
	    ContentList=ContentList&"<tr><td height='22' Class='News-01'>&nbsp;<img src='Images/Arrow-Title.gif' width='4' height='7'>&nbsp;<a target='_blank' href='NewsView.asp?id="&RsP("id")&"'>"&RsP("Newtitle")&"</a></td><td width='80px' Class='News-02'>"&RsP("addtime")&"</td></tr>"
     case "Down"
	    ContentList=ContentList&"<tr><td height='22' Class='News-01'>&nbsp;<img src='Images/Arrow-Title.gif' width='4' height='7'>&nbsp;<a target='_blank' href='DownFileView.asp?id="&RsP("id")&"'>"&RsP("FileName")&"</a></td><td width='80px' Class='News-02'>"&RsP("AddTime")&"</td></tr>"
     case "Require"
	    ContentList=ContentList&"<tr><td height='22' Class='News-01'>&nbsp;<img src='Images/Arrow-Title.gif' width='4' height='7'>&nbsp;<a target='_blank' href='RequireView.asp?id="&RsP("id")&"'>"&RsP("Title")&"</a></td><td width='80px' Class='News-02'>"&RsP("AddTime")&"</td></tr>"
     case "Feedback"
	    ContentList=ContentList&"<tr><td height='22' Class='News-01'>&nbsp;<img src='Images/Arrow-Title.gif' width='4' height='7'>&nbsp;<a target='_blank' href='FeedbackView.asp?id="&RsP("id")&"'>"&RsP("Title")&"</a></td><td width='80px' Class='News-02'>"&RsP("AddTime")&"</td></tr>"
  end select
  RsP.movenext
next
ContentList="<table width='100%'  border='0' cellpadding='0' cellspacing='0' >"&ContentList&"</table>"
'===========================
%>
<%
Sub Pagination()
    response.write"<table width='100%' border='0' cellpadding='0' cellspacing='0' class='Pagination'><tr valign='middle'>"
    if RsP.pagecount>0 then 
	   response.write"     <td  height='24' align='center'>当前页"&intpage&"/"&RsP.PageCount&"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    else 
       response.write"     <td  height='24' align='center'>当前页0/0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
    end if
    response.write"共有"&RsP.recordcount&"条信息&nbsp;&nbsp;每页"&RsP.PageSize&"条&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='Search.asp?page=1&Search="&Search&"'>首页</a>&nbsp;|&nbsp;"
    if pre then
       response.write"<a href='Search.asp?page="&intpage -1&"&Search="&Search&"'>上页</a>&nbsp;|&nbsp;"
    end if
    if last then
       response.write"<a href='Search.asp?page="&intpage +1&"&Search="&Search&"'>下页</a>&nbsp;|&nbsp;"
    end if
    response.write"<a href='Search.asp?page="&RsP.PageCount&"&Search="&Search&"'>尾页</a>&nbsp;|&nbsp;转到第"
    response.write"<select name='sel_page' onChange='javascript:location=this.options[this.selectedIndex].value;'>"
    for i = 1 to RsP.PageCount
       if i = intpage then 
          response.write"<option value='Search.asp?page="&i&"&Search="&Search&"' selected>"&i&"</option>"
       else
          response.write"<option value='Search.asp?page="&i&"&Search="&Search&"'>"&i&"</option>"
       end if
    next
    response.write"</select>页</td></tr></table>"
	RsP.Close
    set RsP=nothing
End Sub
'===========================
%>
<HTML>
<HEAD>
<TITLE>首页-信息检索|<%=SiteName%></TITLE>
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="copyright" CONTENT="Copyright 2004-2005 - NWEB.CN-STUDIO-多来米">
<META NAME="Author" CONTENT="万博网络技术工作室,www.Nweb.cn">
<META NAME="Robots" CONTENT="all">
<META NAME="Keywords" CONTENT="<%=Keywords%>">
<META NAME="Description" CONTENT="<%=Description%>">
<link href="Images/CSS.css" type=text/css rel=stylesheet>
</HEAD>
<BODY >
<!--#include file="Top.asp" -->
<table width="868" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="190" height="96" valign="top" bgcolor="#F2F2F2" ><!--#include file="LeftNav.asp" -->
        <!--#include file="SearchLeft.asp" -->
    </td>
    <td width="5"></td>
    <td width="673" valign="top" class="Index-Center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <!--DWLayoutTable-->
      <tr>
        <td height="180" colspan="2" bgcolor="#FFFFFF"><img src="Images/Banner_01.jpg" alt="万博中小企业网站系统" width="499" height="180"></td>
        <td width="172" align="right" bgcolor="#FFFFFF"><img src="Images/Banner_02.jpg" alt="万博中小企业网站系统" width="171" height="180"></td>
      </tr>
      <tr>
        <td width="93" height="5" bgcolor="#FFFFFF"></td>
        <td width="408" bgcolor="#FFFFFF"></td>
        <td bgcolor="#FFFFFF"></td>
      </tr>
      <tr>
        <td height="30" align="right" bgcolor="#F2F2F2"><strong><font color="#1c529b"><img src="Images/Arrow-locality.gif" width="14" height="12" align="absmiddle"> 当前位置:</font></strong></td>
        <td colspan="2" bgcolor="#F2F2F2" class="locality"><a href="index.asp" >首 页</a> &gt;&gt; <a href="NewsList.asp"></a><%=Locality%></td>
      </tr>
      <tr>
        <td height="5" align="center" bgcolor="#FFFFFF"></td>
        <td colspan="2" align="center" bgcolor="#FFFFFF"></td>
      </tr>
    </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" >
          <tr>
            <td height="12">&nbsp;</td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td width="20" height="30">&nbsp;</td>
            <td><%=ContentList%></td>
            <td width="20"></td>
          </tr>

          <tr>
            <td height="40">&nbsp;</td>
            <td valign="bottom"><% Call Pagination() %></td>
            <td></td>
          </tr>
          <tr>
            <td height="30">&nbsp;</td>
            <td></td>
            <td></td>
          </tr>
      </table></td>
  </tr>
</table>
</TD>
    </TR>
</TABLE>
<!--#include file="Bot.asp" -->
</BODY>
</HTML>

⌨️ 快捷键说明

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