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

📄 search.asp

📁 一个功能非常强大的新闻发布系统,里面的技术都是采用最新的,支持当前最流行的网站风格,是大家非常值得学习的一个网站.
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--
'----------------------------------------------------------------------
'转发时请保留此声明信息,这段声明不并会影响你的速度!
'*******************     商务链图文发布系统  ***************************
'程序名称:商务链图文发布系统1.0
'程序设计:银杏公子
'电子邮件:bhj0523@163.com
'网站支持:http://www.35lian.com
'Q Q 支持:411655198
'版权所有:商务链 (www.35lian.com)
'版权声明:
'1、未经授权许可,不得将本程序用于盈利或非盈利性的商业用途。
'2、为适应实际的计算机应用环境或者改进其功能、性能,可以进行必要的修改,但不得去除商务链 (www.35lian.com)版权标示;未经终点书面授权许可,不得向任何第三方提供修改后的程序。
'3、使用本程序必须保留商务链的版权声明,将本程序从原有自然语言文字转换成另一自然语言文字的,仍应注明出处。
'**********************************************************************
'----------------------------------------------------------------------
-->
<%
key=request("key")
otype=request("otype")
if key="" then
   response.write "<script>alert('查找字符串不能为空!');history.back();</Script>"
   response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
<title>商务链</title>
</head>
<body topmargin="0"><!--#include file="top.asp"-->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  <tr> 
    <td width="160" height="300" valign="top" bgcolor="efefef"> 
      <!--#include file="left.asp"-->
    </td>
    <td width="600" align="center" valign="top" bgcolor="#FFFFFF">
<table width="100%" height="40" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td>&nbsp;</td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table>
      <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="#9999CC"> 
          <td width="9%" height="25" align="center" bgcolor="#FF0000"><font color="#FFFFFF">ID</font></td>
          <td width="55%" align="center" bgcolor="#FF0000"><font color="#FFFFFF">新闻标题</font></td>
          <td width="15%" align="center" bgcolor="#FF0000"><font color="#FFFFFF">发布者</font></td>
          <td width="21%" align="center" bgcolor="#FF0000"><font color="#FFFFFF">发布日期</font></td>
        </tr>
        <%
i=0
do while not rs.eof
%>
        <tr bgcolor="#FFFFFF"> 
          <td height="22" align="center"><%=rs("id")%></td>
          <td> <a href="html/<%=rs("c_filepath")%>" 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> 
    </td>
  </tr>
</table><!--#include file="bottom.asp"-->
</body>
</html>

⌨️ 快捷键说明

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