<%
cid=1
table_name="bbs"
url_title=request("url_title")
if url_title<>"" then b=" and url_title='"&url_title&"'"
num=8
'分页
pagesize=10
Page = Cint(Request("Page"))
If Page < 1 Then Page = 1
num=cint((page-1)*pagesize )
if num="" then num=pagesize
num1=num+pagesize
'需要审核
bz="1"
'搜索
find_name=request("find_name")
find_type=request("find_type")
if find_name<>"" then
find_str=" and "&find_type&" like '%"&find_name&"%' "
find_message=" 搜索 "&find_name&" 结果如下"
else
find_str=" "
end if
if session("bbs_username")<>"" then
bz=" "
else
bz=" and bz ='"&bz&"'"
end if
sql3="select top "&num1&" id,username,topic,child,xl,bz from "&table_name&" where cid="&cid&b&" and len(xl)<=5 "&bz&" "&find_str&" order by xl "
set rs3=conn.execute(sql3)
sql2="select count(*) from " &table_name&" where cid="&cid&b&" and len(xl)<=5 "&bz &find_str
set rs2=conn.execute(sql2)
page_num=rs2(0)
count2=round(rs2(0)/pagesize+0.4)
if count2=0 then count2=1
rs2.close
set rs2=nothing
pagecount=16
if p_begin="" then
p_begin=0
end if
if rs3.eof and rs3.bof then
response.write "