📄 searchresult.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/const1.asp"-->
<!--#include file="inc/const2.asp"-->
<!--#include file="inc/char.asp"-->
<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Jimmy中文站留言簿 Version 1.06 '
' http://WWW.LUNJI.COM '
' Powered by BlueSailor '
' QQ:428140 E-MAIL: bluesailor@etang.com '
''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>
<html>
<head>
<title>搜索结果--<%=lybtitle%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="css.asp"--></head>
</head>
<body topmargin="1" bgcolor="<%=bodybgcolor%>" alink=<%=alink%> vlink=<%=vlink%> link=<%=link%> >
<!--#include file="top.asp"--><br>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="650" align="center">
<tr>
<td width="100%"><font color="#800000">查询结果:</font><br>
</td>
</tr>
</table>
<%
dim keyword
keyword=trim(request("keyword"))
classid=request("classid")
set rs=server.createobject("adodb.recordset")
if classid="留言内容" then
sql="select * from guest where guestcontent like '%"&keyword&"%'"
else
sql="select * from guest where guestname like '%"&keyword&"%'"
end if
rs.open sql,conn,1,3
Rs.pagesize=listnum
page=Request("page")
if (page-Rs.pagecount) > 0 then
page=Rs.pagecount
elseif page = "" or page < 1 then
page = 1
end if
%>
<%
if rs.eof or rs.bof then
%>
<script language="javascript">
alert ("没有符合条件的记录")
history.go(-1)
</script>
<%end if%>
<%
Rs.absolutepage=page
i=0
do while not rs.eof and i<listnum
%>
<br>
<table width="650" bgcolor="<%=tablebgcolor%>" cellspacing="0" cellpadding="0" border="1" style="border-collapse: collapse" cellpadding="0" bordercolor="<%=bordercolor%>" align="center">
<tr>
<td bgcolor="<%=namebg%>" valign="top" rowspan="3" width="110" height="1" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="164" bgcolor="<%=tablebgcolor%>" align=center>
<tr>
<td height="164" valign="top" bgcolor="<%=namebg%>"><br>
<%if rs("guestname")=admin_name then%>
<img src="pic/teammo.gif">
<%end if%>
<span STYLE="position:relative; width:105; height:25; filter:glow(Color=<%=bordercolor%>,Strength=4); margin-left:2px">
<p align="center"><font color="#FFFFFF"><%=rs("guestname")%></font></p>
</span>
<p align="center"><img src="images/image<%=rs("face")%>.gif"> </p>
<% if rs("from")<>"" then %>
<p align="center"> 來自:<%=rs("from")%></p><%end if%>
</td>
</tr>
</table>
</td>
<td height="18" bgcolor="<%=infobg%>"> <img src="pic/posttime.gif"> 发表于:<%=rs("guestdate")%>
<%if rs("email")<>"" then %>
<a href="mailto:<%=rs("email")%>"> <img src="pic/email.gif" border="0">E-MAIL</a>
<%else%><img src="pic/email1.gif" border="0">E-MAIL<%end if%>
<%if rs("homepage")<>"" then%>
<a href="<%=rs("homepage")%>" target="blank">
<img src="pic/home.gif" border="0">主页</a><%else%>
<img src="pic/home1.gif" border="0">主页<%end if%>
<% if rs("oicq")<>"" then%>
<a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=<%=rs("oicq")%>" target="blank" title="<%=rs("oicq")%>"><img src="pic/qq.gif" border="0"></a>Q Q
<%else%><img src="pic/qq1.gif" border="0"></a>Q Q <%end if%>
<%if session.sessionid=rs("sessionid") then%>
<a href="edit.asp?id=<%=rs("id")%>"><img src="pic/edit.gif" border="0">编辑</a><%else%><img src="pic/edit1.gif" border="0">编辑<%end if%> </td>
</tr>
<tr>
<td valign="top">
<table width="500" align="center" height="124" cellspacing="0" cellpadding="0">
<tr>
<td style="padding-left:4px;MARGIN-TOP:2px;MARGIN-BOTTOM:2px;MARGIN-LEFT:2px;MARGIN-RIGHT:2px; word-break: break-all; font-size: 10pt" width="511" height="71" bgcolor="<%=tablebgcolor%>" valign="top">
<p style="class="font">
<%
secretly=trim(rs("secretly"))
if secretly<>"" then
%>
<br>
<img src="images/hidden.gif"><font color="#800000">此留言为悄悄话,版主请进入管理后查看</font>
<br>
<%else%>
<%
guestcontent=ubbcode(rs("guestcontent"))
guestcontent=replace(guestcontent,chr(13),"<br>")
%>
<br>
<%if classid="留言内容" then%>
<%
guestcontent=replace(guestcontent,""&keyword&"","<font color=red>"&keyword&"</font>")
%>
<%end if%>
<%=guestcontent%>
<br>
</p>
<%end if%>
<%if rs("guestreply")<>"" then %><hr noshade size="1" color="<%=bordercolor%>">
<img border="0" src="images/Replynow.gif"><font color="#FF0000">回复:</font><p class="font"><%=ubbcode(rs("guestreply"))%> </p>
<p><font color="#666666"> 回复时间:<%=rs("redate")%></font></p>
<%end if%></td></tr>
</table>
</td>
</tr>
<tr>
<td height="1" valign="bottom" bgcolor="<%=infobg%>">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="537" bordercolorlight="#183EAD" bordercolordark="#183EAD">
<tr>
<td width="516" height="18"><img src="images/ip.GIF" width="15" height="13">IP:<%=ip%>
</td>
<td width="15">
<p align="right"><a title="返回网页顶部" href="#top"><img src="images/gotop.gif" border="0" ></a></td>
</tr>
</table>
</td>
</tr>
</table>
<%
Rs.movenext
i=i+1
loop
%>
<table width="650" border="0" cellspacing="0" cellpadding="0" align="center">
<tr align="center">
<td colspan="2"><br><table border=0 cellpadding=0 cellspacing=1 width=100%>
<tr><td>查找留言<%=Rs.recordcount%>条 共有<%=page%>/<%=Rs.pagecount%>页 跳到第
<% for go=1 to Rs.pagecount
%>
[<a href=searchresult.asp?page=<%=go%>&keyword=<%=keyword%>&classid=<%=classid%>><%=go%></a>]
<%next%>页 <% if page=1 then %> <%else%><a href=searchresult.asp?page=<%=page-1%>&keyword=<%=keyword%>&classid=<%=classid%>>上一页</a> <%end if%><% if Rs.pagecount-page <> 0 then %><a href=searchresult.asp?page=<%=page+1%>&keyword=<%=keyword%>&classid=<%=classid%>>下一页</a> <%else%> <%end if%></td></tr></table><br><!--#include file="bottom.asp"-->
<%
rsclose()
connclose()
%>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -