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

📄 searchok.asp

📁 asp做的论坛
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->
<%
dim keyword,classid
keyword=replace(trim(request.form("keyword")),"'","")

if keyword="" then
	response.write "<SCRIPT language=JavaScript>alert('查询不能为空 或 非法字符!');"
	response.write "this.location.href='vbscript:history.back()';</SCRIPT>"
	response.end
end if

classid=request.form("classid")
set rs=server.createobject("adodb.recordset")
if classid="title" then
sql="select * from gb where title like '%"&keyword&"%' ORDER BY id DESC"
elseif classid="content" then
sql="select * from gb where content like '%"&keyword&"%' ORDER BY id DESC"
else
sql="select * from gb where name like '%"&keyword&"%' ORDER BY id DESC"
end if
rs.open sql,conn,3,1
%>

<html>
<head>
<title>搜索结果</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
body {
	background-image: url(images/bg_001.gif);
	margin-top: 3px;
	margin-bottom: 3px;
}
.style10 {color: #000033}
.style13 {color: #333333}
.style5 {color: #993300}
.style14 {
	font-size: 18px;
	font-weight: bold;
}
-->
</style>
<SCRIPT Language="JScript" SRC="xp_ubbcode.js" Runat=Server></SCRIPT>
</head> 
<body bgcolor="#FFFFFF" text="#000000">
<!--#include file="top.asp"-->
<% 
If rs.eof and rs.bof Then   %>
<table width="600" height="30" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td><div align="center" class="style14">没有找到符合条件的留言。 <a href="search.asp">返回</a></div></td>
  </tr>
</table>                  

<%end if%>

<% Do While Not rs.Eof 
%>
<table width="602" border="0" align="center" cellpadding="0" cellspacing="0" class="biao_bdr">
  <tr>
    <td><img src="images/bgt.gif" width="600" height="12"></td>
  </tr>
</table>
<table width="602" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9E6EA" class="biao_bdr">
  <tr>
    <td width="110"><div align="center" class="style10">用户头像</div></td>
    <td><table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="380"><span class="style5">主题:<%= XP_UBBCode(rs("title").value) %> </span></td>
          <td><img src="images/oicq.gif" alt="QQ:<%=rs("qq")%>" width="16" height="16">&nbsp; <a href="mailto:<%=rs("email")%>"><img src="images/email.gif" alt="邮箱:<%=rs("email")%>" width="16" height="16" border="0"></a> &nbsp;<a href="<%=rs("homepage")%>" target="_blank"><img src="images/homepage.gif" alt="个人主页:<%=rs("homepage")%>" width="16" height="16" border="0"></a> &nbsp;<img src="images/ipinfo.gif" alt="IP:<%=rs("ip")%>" width="16" height="16"></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td><div align="center"><img src="<%=rs("face")%>" alt="【<%=rs("name")%>】的ID为:<%=rs("id")%>" width="64" height="64"></div>
        <div align="center" class="style5"> -<br>
        【<%= XP_UBBCode(rs("name").value) %>】</div></td>
    <td><table width="490" height="90" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="40" colspan="2">&nbsp;&nbsp;<span class="style13"><%= XP_UBBCode(rs("content").value) %></span></td>
        </tr>
        <tr>
          <td colspan="2"><div align="right">留言时间:<%=rs("time")%></div></td>
        </tr>
        <tr>
          <td width="400"><span style="color: #0033CC">版主回复:<%= XP_UBBCode(rs("repcontent").value) %></span></td>
          <td><div align="right"><a href="rep.asp?id=<%=rs("id")%>" target="_self"> </a><a href="rep.asp?id=<%=rs("id")%>" target="_self">
              <%If Session("adminchk")="True" Then%>
              </a><a href="rep.asp?id=<%=rs("id")%>" target="_self"> 回复</a>|<a href="del.asp?id=<%=rs("id")%>">删除</a>
              <%End If%>
          </div></td>
        </tr>
    </table></td>
  </tr>
</table>
<%
	rs.movenext
	loop
%> 
<!--#include file="bottom.asp"-->
</body>
</html>

⌨️ 快捷键说明

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