news_search.asp

来自「功能的增加及完善 1.完善了上次不能读写房源编号的错误; 2.增加了不是会员」· ASP 代码 · 共 67 行

ASP
67
字号
<!--#include file="pass.asp"-->
<TABLE width="80%" border=1 align="center" cellPadding=2 cellSpacing=1 borderColor=#ffffff bgColor=#00659c>
  <TR borderColor=#007db5 bgColor=#007db5> 
    <TD vAlign=bottom bgcolor="#007db5"><font color="#FFFFFF">&nbsp;信息搜索:</font></TD>
  </TR>
  <TR borderColor=#ffffff bgColor=#ffffff> 
    <TD><table width="100%" border="0" align="center" cellpadding="2" cellspacing="2" bordercolor="#999999">
        <%
ss=request("ss")
sslb=request("sslb")

set rs=server.createobject("adodb.recordset") 
sql="select * from news where "&sslb&" like '%"&ss&"%' order by id desc"
rs.open sql,conn,1,3

%>
        <tr bgcolor="#FFFFFF"> 
          <td width="39%"><div align="center"><font color="#007db5"><strong>题目</strong></font></div></td>
          <td width="15%"> <div align="center"><font color="#007db5"><strong>所属类别</strong></font></div></td>
          <td width="18%"> <div align="center"><font color="#007db5"><strong>日期</strong></font></div></td>
          <td width="19%"><div align="center"><font color="#007db5"><strong>操作</strong></font></div></td>
        </tr>
        <%
if rs.bof and rs.eof then
response.write "Sorry 没找到您要的内容 !"
else
while not rs.eof
%>
        <tr bgcolor="#FFFFFF"> 
          <td width="39%"> <a href="../open.asp?xiangxi=<% =rs("id") %>" target="_blank">
            <% =rs("bt") %>
            </a> </td>
          <td width="15%"><div align="center"> 
              <% =rs("mytype") %>
            </div></td>
          <td width="18%"><div align="center"> 
              <% =rs("riqi") %>
            </div></td>
          <td><div align="center"><font size="2"> 
              <input onClick="window.location=news_search.asp?XIUGAI=<% =rs("id") %>'"type="button" value="修改" name="Button23">
              <input onClick="window.location='?del=<% =rs("id") %>'"  type="button" value="删除" name="Button222">
              </font></div></td>
        </tr>
        <% 
rs.movenext
wend
end if

%>
      </table></TD>
</TR>
</TABLE>
<TABLE width="80%" border=1 align="center" cellPadding=2 cellSpacing=1 borderColor=#ffffff bgColor=#00659c>
<TBODY>
<TR borderColor=#ededed bgColor=#ededed> 
<TD align=middle height=25><div align="center"> 
          <% 
set tj=conn.execute("Select count(*) as tj1 From news where "&sslb&" like '%"&ss&"%'")
%>
          共搜索到信息〖 
          <% =tj("tj1") %>
          〗条</div></TD>
    </TR>
  </TBODY>
</TABLE>

⌨️ 快捷键说明

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