📄 bbs_search_list.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="../include/datatransfer.asp"-->
<!--#include file="../include/functionjs.asp"-->
<!--#include file="../include/functionvb.asp" -->
<!--#include file="../include/dbconn.inc" -->
<!--#include file="../include/refresh.asp"-->
<!--#include file="../include/header.asp" -->
<link href="../include/main.css" rel="stylesheet" type="text/css">
<%
if UserName=empty then
response.Redirect("../common/showerr.asp?ErrType=1")
end if
%>
<%
dim KeyWord,NSearch,PSearch,SearchDate
keyword=trim(request("keyword"))
if request("boardid")=0 then boardid="" else boardid=" and bbs_topic.board_id="&request("boardid")
NSearch=trim(request.form("NSearch"))
if request("PSearch")=1 then Psearch="title" else psearch="content"
if request.Form("SearchDate")<>0 then SearchDate=" and #"& now() &"#-bbs_topic.pubtime<"&request.Form("SearchDate")
if request("sType")=1 then
strsql="select * from user_info where user_name='"&keyword&"'"
objRS.open strSQL,objConn,1,1
if objrs.eof and objrs.bof then response.Redirect("../common/showerr.asp?ErrType=5")
objrs.close
strSQL="select bbs_topic.*,bbs_board.board_name from bbs_topic,bbs_board where bbs_topic.board_id=bbs_board.board_id and user_name='"&keyword&"' "& boardid &" "& SearchDate &""&" order by pubtime desc"
else
strSQL="select bbs_topic.*,bbs_board.board_name from bbs_topic,bbs_board where bbs_topic.board_id=bbs_board.board_id and "&psearch &" like '%"&keyword&"%' "& boardid &" "&SearchDate&" order by pubtime desc"
end if
objRS.open strSQL,objConn,1,1
%>
<table width="710" border="0" cellspacing="0" cellpadding="0" align="center" class="tablestyle">
<tr>
<td>
<table width="710" border="0" cellpadding="2" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#BDBABD">
<tr>
<td background="../resource/images/bbs/bg.gif" bgcolor="#FFFFFF" class="tablehead"><a href="../blog/main.asp">56Blog</a>→<a href="bbs_main.asp">论坛</a>→论坛搜索结果</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="50%"><a href="bbs_search.asp"><b>搜索文章</b></a></td>
<td width="50%" >搜索符合条件文章共<%=objrs.recordcount%>篇 </td>
</tr>
</table>
<table width="710" border="0" cellpadding="4" cellspacing="1" bgcolor="#BDBABD">
<tr align="center">
<td background="../resource/images/bbs/bg.gif" bgcolor="#FFFFFF" class="tablehead">
<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
<tr>
<td width="5%" align="center">表情</td>
<td width="23%" align="center">标题</td>
<td width="10%" align="center">作者</td>
<td width="17%" align="center">发表时间</td>
<td width="10%" align="center" >板块</td>
<td width="5%" align="center">回复</td>
<td width="5% align="center"" >人气</td>
<td width="25%" align="center">最后更新</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#BDBABD">
<%
dim MouseOverTitle
do while not objRS.eof
MouseOverTitle="《"&objrs("title")& "》By:"& objrs("user_name")
%>
<tr align="center" bgcolor="#FFFFFF">
<td width="5%" height="46"><img src="../resource/images/emimage/<%=objRs("EmImage") %>.gif" height="30" width="30"></td>
<td width="23%" align="left" title=<%=MouseOverTitle%>><a href="bbs_show.asp?BoardID=<%=boardid%>&TopicID=<%=objRS("topic_id")%>" title=<%=MouseOverTitle%>>
<%if len(objRs("title"))>12 then response.Write(left(objRs("title"),12)&"...") else response.Write(objRs("title"))%>
</a></td>
<td width="10%"><a href="../common/userinfo.asp?userid=<%=objRs("user_id") %>"><%=objRs("user_name") %></a></td>
<td width="17%"><%=objRs("pubtime") %></td>
<td width="10%"><a href="bbs_list.asp?BoardID=<%=objrs("board_id")%>"><%=objrs("board_name")%></a></td>
<td width="5%"><%=objRs("replycount") %></td>
<td width="5%"><%=objRs("ReadCount") %></td>
<td width="25%"><a href="../common/userinfo.asp"><%=objRs("lastreplyusername") %></a>|<%=objRs("lastreplytime") %></td>
</tr>
<%
objRs.movenext
loop%>
</table>
</td>
</tr>
</table>
<!--#include file="../include/endconn.inc" -->
<!--#include file="../include/footer.asp" -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -