/bbs/soucl.asp代码页
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><?xml version="1.0" encoding="utf-8"?>
<%response.buffer=true%>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> 
<!--#include file="conn.inc"-->
<!--#include file="cnscucsb.asp"-->
<wml>
<head><%
'====================================================================
' 请你保留这段说明,这并不会影响你的速度.   电脑交流:http://www.cnscu.cn
' 程序制作:横云			  掌上校园收倾心整理收集于互联网,感谢你的支持!
' 升级时间: 2008-2-5  		主页地址:HTTP://wap.cnscu.cn
' E-Mail: cnscu@126.com   	客服QQ:554904632 QQ群:30493504 QQ群2:46659883
'====================================================================
%> <meta http-equiv='Cache-Control' content='no-cache'/>
</head>
<%
'---接收数据----
pp=request.QueryString("pp")
ltid=request.QueryString("ltid")
'---结束接收----
title=utf8(Request("title"))
	IF title<>"" then%>
<card id="index" title="搜索结果"><p>
<%set brs=Server.CreateObject("ADODB.Recordset")
ssql="select name,ltid,yc,id,hhsj,tm from [lttz] where ltid="&ltid&" and yc<>1 and name like '%"&title&"%'"
brs.open ssql,conn,1,1
if brs.eof then
   Response.write "没有您要找的帖子<br/>"
Else
Response.write "共找到相关帖子"&brs.RecordCount&"个<br/>"
page=cint(request("page"))
if page="" or page<1 then page=1
maxpage=int((brs.recordcount-1)/15)+1
if page>maxpage then page=maxpage

brs.Move((page-1)*15)
dim j
j=1
do while ((not brs.EOF) and j <=cint(15))
    spmc=left(brs("name"),8)
   if len(brs("name"))>8 then
    spmc=spmc+"。。"
   End if
    Response.write ""&(j+page*15)-15&".<a href='lt_view.asp?tid=" & brs("id") & "&amp;cnscu="&cnscu&"'>" & ubb(spmc) & "</a><br/>"
brs.Movenext  
j=j+1
loop

if page*15<brs.recordcount then response.write("[<a href='soucl.asp?cnscu=" & cnscu & "&amp;ltid=" & ltid & "&amp;title=" & title & "&amp;page=" & page+1 & "'>下一页</a>]")
if page>1 then response.write("[<a href='soucl.asp?cnscu=" & cnscu & "&amp;ltid=" & ltid & "&amp;title=" & title & "&amp;page=" & page-1 & "'>上一页</a>]")

		if bRs.PageCount>2 then%>
		<br/><input name="Page" format="*N" size="3"/>
		<anchor>跳页
		<go href="soucl.asp?ltid=<%=ltid%>&amp;cnscu=<%=cnscu%>" method="post">
        	<postfield name="Page" value="$(Page)"/>
        	<postfield name="title" value="$(title)"/>
    		</go>
		</anchor>共[<%=Page%>/<%=maxpage%>]页
		<%end if
end if
brs.close
set brs=nothing
else%>
<card id="index" title="出错了"><p>
搜索内容不能为空。<br/>
<%end if%>
<%
conn.close
set conn=nothing%>
<br/><!--#include file="w.asp"-->
</p></card>
</wml>
字母检索
回到顶部