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

📄 news_search.asp

📁 钱江水产源代码,钱江水产源代码,钱江水产源代码
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Skin_css.asp"-->
<!--#include file="Inc/config.asp" -->
<%
key=request("key")
otype=request("otype")
if key="" then
   response.write "<script>alert('查找字符串不能为空!');history.back();</Script>"
   response.end
end if
%>
<!-- #include file="Head.asp" --><body topmargin="0">
<table width="100%" height="8"  border="0" cellpadding="0" cellspacing="0" background="Img/contopbg.gif">
  <tr>
    <td><table width="226" height="8" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="209"></td>
          <td width="17" background="Img/contopbg2.gif"></td>
        </tr>
    </table></td>
  </tr>
</table>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="209" align="center" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
        <table border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><img src="Img/newstb.gif" width="193" height="24"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td height="20">
              <div align="center"><a href="News.asp">企 业 新 闻</a></div></td>
          </tr>
          <TR>
            <TD 
                            height=1 colspan="2" 
                            background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif" 
                              width=10></TD>
          </TR>
          <tr>
            <td height="20">
              <div align="center"><a href="yeNews.asp">业 内 资 讯</a></div></td>
          </tr>
          <TR>
            <TD 
                            height=1 colspan="2" 
                            background=img/naSzarym.gif><IMG height=1 src="img/1x1_pix.gif" 
                              width=10></TD>
          </TR>
        </table>
        <!--#include file="left.asp"-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td  height="36" align="center"><div align="left"><a  href="otype.asp?owen1=<%=owen1%>"><font color="#000000"> &nbsp;&nbsp;<%=owen1%></font></a></div></td>
  </tr>
  <%
set rsSmallClass=server.CreateObject("adodb.recordset")
rsSmallClass.open "Select * From SmallClass_New Where BigClassName='" & owen1 & "'",conn,1,1
if not(rsSmallClass.bof and rsSmallClass.eof) then
 do while not rsSmallClass.eof
%>
  <tr onmouseover="this.bgColor='#FFFFFF';" onmouseout="this.bgColor='#EFEFEF';" bgColor=#EFEFEF>
    <td height="28" ><div align="left"><a  href="otype.asp?owen1=<%=owen1%>&owen2=<%=rsSmallClass("SmallClassName")%>">&nbsp;&nbsp;<%=rsSmallClass("SmallClassName")%></a></div></td>
  </tr>
  <%
 rsSmallClass.movenext
 loop
end if
rsSmallClass.close
set rsSmallClass=nothing	
%>
</table></td>
    <td width="17" background="Img/combg.gif">&nbsp;</td>
    <td valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="2"></td>
              </tr>
              <tr>
                <td height="26" class="tt_16">&nbsp; <span >&nbsp;&nbsp;<img src="Img/HaoSc23.png" width="14" height="16" align="absmiddle"> <span class="tt_16">新 闻 搜 索</span></span></td>
              </tr>
              <tr>
                <td height="2" bgcolor="#0086C6" class="tt_16"></td>
              </tr>
          </table></td>
        </tr>
        <TR>
          <TD 
                  height=1>&nbsp; </TD>
        </TR>
      </table>
        <table width="98%"  border="0" align="center" cellpadding="0" cellspacing="5">
          <tr>
            <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
              <% 
Set rs= Server.CreateObject("ADODB.Recordset")
if otype="title" then
sql="select * from NEWS where title Like '%"& key &"%' order by id desc"
elseif otype="msg" then
sql="select * from NEWS where content Like '%"& key &"%' order by id desc"
else
end if
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>对不起,没有找到相关新闻</p>"
else
%>
              <tr bgcolor="#F2F3F0">
                <td width="9%" height="25" align="center">ID</td>
                <td width="55%" align="center">新闻标题</td>
                <td width="15%" align="center">发布者</td>
                <td width="21%" align="center">发布日期</td>
              </tr>
              <%
i=0
do while not rs.eof
%>
              <tr bgcolor="#FFFFFF">
                <td height="22" align="center"><%=rs("id")%></td>
                <td> <a href="shownews.asp?id=<%=rs("id")%>"  target="_blank"><%=rs("title")%></a></td>
                <td align="center"><%=left(rs("user"),5)%></td>
                <td align="center"><%=rs("infotime")%></td>
              </tr>
              <%
rs.movenext
i=i+1                                                         
loop
%>
              <tr bgcolor="#FFFFFF">
                <td height="24" colspan="4">
                  <div align="center">关键字<font color="#FF0000"><strong><%=key%></strong></font>,共为您找到<font color="#FF0000"><%=i%></font>条新闻</div></td>
              </tr>
              <% 
end if
rs.close
set rs=nothing
%>
            </table>
            <table width="95%" border="0" align="center" cellpadding="3" cellspacing="0">
                  <tr>
                    <td align="right"> <img src="images/printer.gif" width="16" height="14" align="absmiddle"> <a href="javascript:window.print()">打印本页</a> | <img src="images/close.gif" width="14" height="14" align="absmiddle"> <a href="javascript:window.close()">关闭窗口</a></td>
                  </tr>
              </table></td>
          </tr>
      </table></td>
  </tr>
</table>
<!--#include file="inc/foot.asp"-->
</body>
</html>

⌨️ 快捷键说明

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