www.gusucode.com > 超文本多用户论坛程序 1.1 > bbs/searchs.asp
<!--#include file="conn.asp"--> <!--#include file="gyhs.asp"--> <head> <title><%=request.cookies("mc")%> - 搜索结果</title> <meta name="keywords" content="<%=request.cookies("gjz")%>"> </head> <body topmargin=0> <!--#include file="gyym.asp"--> <table class="a2" cellSpacing="1" cellPadding="4" width="97%" align="center" border="0"> <tr class="a3"> <td height="25"> <img src="imgs/Forum_nav.gif" width="9" height="9"> <a href="index.asp?ltbh=<%=ltbh%>"><%=request.cookies("mc")%></a> >> 搜索结果 </td> </tr> </table> <br> <SCRIPT>valigntop()</SCRIPT> <table class="a2" cellSpacing="1" cellPadding="0" width="97%" align="center" border="0"> <tr id="TableTitleLink" height="25"> <td class="a1" width="3%"> </td> <td class="a1" width="3%"> </td> <td class="a1" align="middle" width="45%" height="24"> 主题</td> <td class="a1" align="middle" width="9%" height="24"> 作者</td> <td class="a1" align="middle" width="6%" height="24"> 回复</td> <td class="a1" align="middle" width="7%" height="24"> 点击</td> <td class="a1" align="middle" width="20%" height="24"> 最后更新时间</td> </tr> <%sub tsxx%> <table class="a2" cellSpacing="0" cellPadding="0" width="97%" align="center" border="0"> <tr> <td height="106"> <table cellSpacing="1" cellPadding="6" width="100%" border="0"> <tr bgColor="#ffffff"> <td vAlign="top" align="left" colSpan="2" height="122"><b> </b> <table cellSpacing="0" cellPadding="5" width="100%" border="0"> <tr> <td vAlign="top" width="83%"><b>操作不成功的可能原因:</b> <ul> <li>对不起,没有找到您要查询的内容</li> </ul> </td> <td width="17%"> <img height="97" src="imgs/err.gif" width="95"></td> </tr> </table> </td> </tr> <tr align="middle" bgColor="#ffffff"> <td vAlign="center" colSpan="2" height="2"> <input onclick="history.back(-1)" type="submit" value=" << 返 回 上 一 页 " name="Submit"> </td> </tr> </table> </td> </tr> </table> <%end sub%> <% '判断登陆 if dlhs=true then %> <script language=vbscript> <!-- window.alert"对不起!你还没有登陆" window.location="index.asp?ltbh=<%=ltbh%>" --> </script> <%end if%> <% wbfz search=request("search") menu=request("menu") gjzs=Fsql(request("gjzs")) searchxm=request("searchxm")'主题作者 searchxm2=request("searchxm2")'标题,内容 %> <% set rs=server.createobject("adodb.recordset") rs.activeconnection=conn dim Ym Ym="searchs.asp?ltbh="<bh&"&gjzs="&gjzs&"&searchxm="&searchxm&"&searchxm2="&searchxm2&"&search="&search&"&" '设置本程序页的名称 if menu<>empty then searchxm2="cntitle" end if '设置sql if searchxm<>empty and search=author then sql="select * from zwtizi where cnuser='"&gjzs&"' and ltbh='"<bh&"'" rs.cursortype=3 '设置静态指针常用与寻找和建立记录 rs.open sql else sql="select * from zwtizi where "&searchxm2&" like '%"&gjzs&"%' and ltbh='"<bh&"'" rs.cursortype=3 '设置静态指针常用与寻找和建立记录 rs.open sql end if rs.pagesize=20 '每页记录条数 %> <% page=clng(request.QueryString("page")) '接收页码 '判断接受的页码是否小于第一页,是就设置成1 if page<1 then page=1 end if '判断接受的页码是否大于总页数,是就为最后一页 if page>rs.pagecount then page=rs.pagecount end if on error resume next rs.absolutepage=page '将接收的页码当前记录所在页 '循环显示 if rs.eof then tsxx end if for i=1 to rs.pagesize if rs.eof then exit for else %> <tr height="25"> <td class="a4" align="middle" width="3%"> <%if rs("cnzd")=true then%> <img src="imgs/f_top.gif" border="0"> <%elseif rs("cnjh")=true then%> <img src="imgs/topicgood.gif" border="0"> <%elseif rs("cndjs")>10 then%> <img src="imgs/f_hot.gif" border="0"> <%else%> <img src="imgs/f_norm.gif" border="0"> <%end if%> </td> <td class="a3" align="middle" width="3%"> <% username=Request.Cookies("username") a=rs("cnuser") if username=a then %> <img src="imgs/my.gif"> <%end if%> </td> <td class="a4" width="45%"> <a href="ShowPost.asp?ltbh=<%=ltbh%>&ids=<%=rs("id")%>&id=<%=rs("cnbkid")%>&bt=<%=rs("cntitle")%>"><%=rs("cntitle")%></a> </td> <td class="a3" align="middle" width="9%"> <%=rs("cnuser")%></td> <td class="a4" align="middle" width="6%"><%=rs("cnhfzs")%></td> <td class="a3" align="middle" width="7%"><%=rs("cndjs")%></td> <td class="a4" width="27%"> <p align="center"><%=rs("cnzhgx")%></td> </tr> <% end if rs.movenext next %> </table> <SCRIPT>valignbottom()</SCRIPT> <table cellSpacing="1" cellPadding="1" width="97%" align="center" border="0"> <tr height="25"> <td width="100%" height="2"> <table cellSpacing="0" cellPadding="3" width="100%" border="0"> <tr> <td height="2"> <p align="center"><a href="<%=Ym%>page=1"><span style="font-size: 12px"><strong> <font color="#000000"><span style="text-decoration: none">首页</span></font></strong></span></a><span style="font-size: 12px"><strong> <% if page<=1 then %> <font color="#C0C0C0">上一页</font> <%else%> <a href="<%=Ym%>page=<%=(page-1)%>"><font color="#000000"> <span style="text-decoration: none">上一页</span></font></a> <%end if%> <% if page>=rs.pagecount then %> <font color="#C0C0C0">下一页</font> <%else%> <a href="<%=Ym%>page=<%=(page+1)%>"><font color="#000000"> <span style="text-decoration: none">下一页</span></font></a> </strong></span> <%end if%> <a href="<%=Ym%>page=<%=rs.pagecount%>"><font color="#000000"> <span style="font-size: 12px; text-decoration: none"><strong>尾页</strong></span></font></a> <% rs.close set rs=nothing %> </td> </tr> </table> </td> </tr> </table> <table cellSpacing="4" cellPadding="0" width="80%" align="center" border="0"> <tr> <td noWrap width="25%"> <img alt="" src="imgs/f_hot.gif" border="0" width="17" height="15"> 热门主题</td> <td noWrap width="25%"> <img alt="" src="imgs/f_top.gif" border="0"> 置顶主题</td> <td noWrap width="25%"> <img src="imgs/topicgood.gif"> 精华主题</td> <td noWrap width="25%"> <img src="imgs/my.gif"> 自己发表的主题</td> </tr> </table> </br> <% call bq dbjl.close set dbjl=nothing %> <%dbclose%>