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

📄 news_search.asp

📁 后台默认管理账号密码:admin 后台主要功能如下:一、系统管理:管理员管理
💻 ASP
字号:
<!--#include file="Inc/syscode.asp" -->
<%
'=================================
'   良精科技企业管理系统
'   www.liangjing.net
'  copyright(c)2001-2008 良精科技
'=================================
%>
<%
key=request("key")
otype=request("otype")
if key="" then
   response.write "<script>alert('查找字符串不能为空!');history.back();</Script>"
   response.end
end if
%>
<!-- #include file="inc/Head.asp" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#9DBBD4"><table width="779" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="120" align="right" background="Skins/Default/CnImg/NewsTop.jpg"><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="778" height="120">
          <param name="movie" value="Skins/Default/Cnimg/news.swf">
          <param name="quality" value="High">
          <param name="wmode" value="transparent">
          <embed src="Skins/Default/Cnimg/news.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="778" height="120" quality="High" wmode="transparent"> </embed>
        </object></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30" background="Skins/Default/CnImg/naviBg2.gif"><table   height="30" border="0" cellpadding="0" cellspacing="0" bgcolor="#E2E7ED">
      <tr>
        <td width="180" align="center" background="Skins/Default/CnImg/LeftBg.gif"><table width="172" height="30" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="1" bgcolor="#999999"></td>
            <td width="170" bgcolor="#E7E7E7">&nbsp;</td>
            <td width="1" bgcolor="#999999"></td>
          </tr>
        </table></td>
        <td width="597" align="center"  ><table width="570" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="19" align="left"><img src="Skins/Default/CnImg/FlagLine.gif" width="4" height="21"></td>
            <td width="277" class="12font"><span class="Regester_title">搜索结果</span></td>
            <td width="264" align="right">&nbsp;</td>
          </tr>
        </table></td>
        <td width="1" bgcolor="#CCCCCC"></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" >
  <tr>
    <td width="180" height="259"   valign="top" bgcolor="#F5F5F5"><table width="172" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="1" rowspan="3" bgcolor="#cccccc"></td>
        <td width="142" height="1" bgcolor="#FFFFFF"></td>
        <td width="1" rowspan="3" bgcolor="#cccccc"></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#F9F9F9" ><table width="100%" border="0" cellpadding="0" cellspacing="0" >
          <%
Set rslist = Server.CreateObject("ADODB.Recordset")
sql="select BigClassName from Hover_BigClass_New order by BigClassID"
rslist.open sql,conn,1,3
do while not rslist.eof
%>
          <tr>
            <td height="25">&nbsp;&nbsp;&nbsp;&nbsp;<img src="Skins/Default/CnImg/flag.gif" width="11" height="9" />&nbsp;&nbsp;<a href="News_Class.asp?BigClass=<%=rslist("BigClassName")%>"><%=rslist("BigClassName")%></a></td>
          </tr>
          <tr>
            <td height="1"   background="Skins/Default/Cnimg/1x1_pix.gif"></td>
          </tr>
          <%rslist.movenext 
loop
rslist.close
set rslist=nothing
%>
        </table>
              <br />
              <!--#include file="Left.asp" --></td>
      </tr>
      <tr>
        <td height="1" colspan="3" bgcolor="#cccccc"></td>
      </tr>
    </table>        <table width="172" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="5" bgcolor="#DEDEDE"></td>
          </tr>
      </table></td>
    <td width="597" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%" height="2" bgcolor="#D5DBE3"></td>
      </tr>
    </table>
        <table width="578" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <tr>
            <td width="578" height="27" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="left"><img src="Skins/Default/Cnimg/yytop_top.gif" width="570" height="27" /></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="32" valign="top"><img src="Skins/Default/Cnimg/yytop_left.gif" width="32" height="315" /></td>
                        <td width="506" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td height="10" valign="top"></td>
                            </tr>
                            <tr>
                              <td  ><table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#eeeeee">
                        <% 
Set rs= Server.CreateObject("ADODB.Recordset")
if otype="title" then
sql="select * from Hover_News where title Like '%"& key &"%' order by id desc"
elseif otype="msg" then
sql="select * from Hover_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="#86C2FF">
                          <td width="9%" height="25" align="center" bgcolor="#fcfcfc">ID</td>
                          <td width="55%" align="center" bgcolor="#fcfcfc">新闻标题</td>
                          <td width="15%" align="center" bgcolor="#fcfcfc">发布者</td>
                          <td width="21%" align="center" bgcolor="#fcfcfc">发布日期</td>
                        </tr>
 <%
i=0
do while not rs.eof
%>
                        <tr bgcolor="#FFFFFF">
                          <td height="22" align="center" bgcolor="#FFFFFF"><%=rs("id")%></td>
                          <td bgcolor="#FFFFFF"> <a href="shownews.asp?id=<%=rs("id")%>"  target="_blank"><%=rs("title")%></a></td>
                          <td align="center" bgcolor="#FFFFFF"><%=left(rs("user"),5)%></td>
                          <td align="center" bgcolor="#FFFFFF"><%=rs("infotime")%></td>
                        </tr>
  <%
rs.movenext
i=i+1                                                         
loop
%>
                        <tr bgcolor="#FFFFFF">
                          <td height="24" colspan="4" bgcolor="#FFFFFF" align="center">关键字<font color="#FF0000"><strong><%=key%></strong></font>,共为您找到<font color="#FF0000"><%=i%></font>条新闻</td>
                        </tr>
 <% 
end if
rs.close
set rs=nothing
%>
                      </table></td>
                            </tr>
                          </table>
                            <table width="100%" height="19" border="0" align="center" cellpadding="0" cellspacing="0">
                              <tr  >
                                <td width="68%"  ></td>
                                <td width="32%" align="center"
>【<a href='javascript:window.print()'>打印此页</a>】&nbsp;【<a href='javascript:history.back()'>返回</a>】</td>
                              </tr>
                          </table></td>
                        <td width="40" align="left" valign="top"><img src="Skins/Default/Cnimg/yytop_right.gif" width="32" height="263" /></td>
                      </tr>
                    </table>
                      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td align="center"><img src="Skins/Default/Cnimg/yybottom_bottom.gif" width="570" height="85" /></td>
                        </tr>
                    </table></td>
                </tr>
            </table></td>
          </tr>
      </table></td>
    <td width="1" bgcolor="#CCCCCC"></td>
  </tr>
</table>
<!--#include file="inc/foot.asp"-->
</body>
</html>

⌨️ 快捷键说明

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