<!--#include file="conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="../webconfig.asp"-->
<!--#include file="../fuction.asp"-->

<!--#include file="../webtop.asp"-->

<table width="1000" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td valign="bottom"><img src="<%=weburl%>images/arrow01.gif" width="11" height="11" /> Your present position: <a href="<%=weburl%>"><%=webname%></a> -> <span class="table-shangxia"><span class="b14"><a href=index.asp><%=bbsname%></a> → 精华帖子 </span></span></td>
    <td valign="bottom"></td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<!--#include file="top.asp"-->
<% 
 bid	=	Request.querystring("bid")
 class1	=	Request.querystring("class1")
 class2	=	Request.querystring("class2")
 class3	=	Request.querystring("class3")
  if class1 <> "" then
 bid = class1
 end if
 if bid <> "" then
 bid = cint(nosql(bid))
 else
 response.Write  ("参数错误！")
 response.End()
 end if
 if class2 <> "" then
 class2 = cint(nosql(class2))
 end if
 if class3 <> "" then
	  class3 = cint(nosql(class3))
 end if
  
	sql="select * from board where bid=" & bid
	Set Rs=Conn.Execute(sql)
	bidname=rs("bidname")
	'---------------djj add 200602150004
	if class2 <> "" then
		sql2="select * from bbs_class2 where  class2_class1_id =" & bid & "  and  class2_id="& class2 
		Set Rs2=Conn.Execute(sql2)
		class2_name = rs2("class2_class2_name")
		class2_id	= rs2("class2_id")
		'-----预计增加分类连接  
		class_link = "<a href=class2.asp?class1="& bid& " > "& bidname & "</a>" 
		bidname = class_link & " - " & class2_name
		if class3<> "" then 
			sql3="select * from bbs_class3 where  class3_class1_id =" & bid & "  and  class3_class2_id="& class2 & "and class3_id = " & class3 
			Set Rs3=Conn.Execute(sql3)
			class3_name = rs3("class3_class3_name")
			class3_id	= rs3("class3_id")
			class_link = class_link & " → <a href=class3_list.asp?class1="& bid&"&class2="&class2_id &" > "& class2_name & "</a>"
					bidname = class_link & " - " & class3_name
		end if
	end if
	'---------------200602150004 end

rs.close
sub banzhu1()
dim str
sql="select * from shop_user where manbid=" &bid                      
Set rebman=Conn.Execute(sql)                                         
if rebman.eof and rebman.bof then
str=str&"本版诚聘版主"
else
do while not rebman.eof
str=str&" <a href=Userlist_data.asp?username="&rebman("username")&">["&rebman("username")&"]</a>"
rebman.movenext   
response.write str                                                   
loop                                                                   
end if 
rebman.close
set rebman=nothing 
end sub 
%>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td>
      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
         
          <td valign="top">
            <TABLE width=100% border=0 align="center" cellPadding=0  cellSpacing=0>
              <TBODY>
                <%Set mm= Server.CreateObject("ADODB.Recordset")                              
sql="select top 5 * from smallpaper where bid="&bid&" order by ID desc"                              
mm.open sql,conn,1,1                              
%>
                <TR>
                 
                  <TD height=20 align=middle class=searchdown>
                    <marquee onmouseover='this.stop()' onmouseout='this.start()' scrollAmount='1'   width='100%' height='20' align="bottom" scrolldelay="60">社区广播：
                    <% do while not mm.eof %>
                    <a href=Userlist_data.asp?username=<%=mm("username")%>>[<%=mm("username")%>]</a>：<a href="#" onClick="MM_openBrWindow('viewpaper.asp?id=<%=mm("id")%>','','width=500,height=400')"><%=mm("title")%></a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <%                             
mm.movenext                                              
loop %>
                  </marquee>                 </TD>
                </TR>
                <TR>
                  <TD height=20 align=left class=searchdown> 斑竹:  
                  <%call banzhu1%></TD>
                </TR>
              </TBODY>
            </TABLE>
             <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="999999">
              <tr bgcolor="#CCCCCC">
                <td width="7%" class="norightbuttonborder2">
                <div align="center">状态</div></td>
                <td width="49%" class="norightbuttonborder2">
                <div align="center">主题</div></td>
                <td width="12%" class="norightbuttonborder2">
                <div align="center"> 作者</div></td>
				<td width="9%" class="norightbuttonborder2">
                <div align="center"> 回复</div></td>
                <td width="9%" class="norightbuttonborder2">
                <div align="center"> 点击</div></td>
                <td width="23%" height="20" class="norightbuttonborder2">
                <div align="center"> 最后更新</div></td>
              </tr>
              <%Set rs = Server.CreateObject("ADODB.Recordset")  
			  
			  if class2 <> ""  then
			  this_sql = " and bbs_book_class2_id=" & class2	
				  if class3 <> ""  then
				  this_sql = " and bbs_book_class3_id=" & class3	
				  
				  end if		                                             
			  end if		                                             
topsql="where  bid="&bid & this_sql  & " and type=0 and good=1"   
                                              
if findstr<>"" then                                                                                                                              
sql="select * from book where (title like '%" &findstr& "%' or username like '%" &findstr& "%' or body like '%" &findstr& "%') and type=0 and bid=" &bid & this_sql &  " order by ldate desc"                                                   
else                                                                                                                                                  
sql = "SELECT * FROM book  "&topsql&"   order by ldate desc"                                                     
end if                                                                                                                                                 
rs.open sql, conn, 1, 3                                                                    
shownum=20                                                                                                                                                     
totalrecord=rs.recordcount                                                                                                                                                     
rs.pagesize=shownum                                                                                                                                                     
maxpage=rs.pagecount                                                                                                                      
requestpage=clng(request.querystring("page"))                                                                                             
if requestpage="" or requestpage=0 then                                                                                                                                                     
   requestpage=1                                                                                                                                                     
end if                                                                                                                                                     
if resquestpage>maxpage then                                                                                                                                                     
    resquestpage=maxpage                                                                                                                                                     
end if                                                                                                                                    
if not requestpage=1 then                                                                                                                                                     
rs.move (requestpage-1)*rs.pagesize                                                                                                                                                     
end if                                                                                                                                                     
for i=1 to rs.pagesize and not rs.bof %><tr  bgcolor="#ffffff" onMouseOver='JavaScript:this.style.backgroundColor="#F7FEFF"' onMouseOut='JavaScript:this.style.backgroundColor="ffffff"'>
              <script>bbslist("<%=rs("id")%>","<%=rs("faceimg")%>","<%=rs("title")%>","<%=rs("username")%>","<%=rs("reply")%>","<%=rs("hits")%>","<%=rs("ldate")%>","<%=rs("lastname")%>","<%=rs("gd")%>","<%=rs("good")%>","<%=rs("lock")%>");</script>
             </tr><%                                                                                                                                                  
rs.movenext                                                                                                                                                  
if rs.eof then exit for                                                                                                                                                  
next   
%>
            </table>
            <table width="100%" height="60" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td width="50%"></td>
                <td width="50%"></td>
              </tr>
              <tr>
                <td width="50%">页次：
                    <%if request.querystring("page")="" then %>
                    1
                    <%else%>
                    <%=request.querystring("page")%>
                    <%end if%>
      / <%=maxpage%>页 每页：<%=shownum%> 主题数：<%=totalrecord%></td>
                <td width="50%">
                  <p align="right">
                    <%                                                                                                                                               
if requestpage-1 mod 10=0 then                                                                                                                                               
 p=(requestpage-1) \ 10                                                                                                                                               
else                                                                                                                                               
 p=(requestpage-1) \ 10                                                                                                                                               
end if                                                                                                                                               
if requestpage=1 then                                                                                                                                               
 response.write "<font face=webdings color=""#FF0000"">9</font>"                                                                                                                                               
else                                                                                                                                               
 response.write "<a href=?bid="&bid&"&findstr="&findstr&"&page=1 title=首页><font face=webdings>9</font></a>"                                                                                                                                               
end if                                                                                                                                               
if p*10>0 then response.write "<a href=?bid="&bid&"&findstr="&findstr&"&page="&p*10&" title=上十页><font face=webdings>7</font></a>"                                                                                                                                               
response.write "<b>"                                                                                                                                               
for ii=p*10+1 to P*10+10                                                                                                                                               
   if ii=requestpage then                                                                                                                                               
  response.write "<font color=""#FF0000"">"&ii&"</font> "                                                                                                                                               
 else
 if  totalrecord>0  then     
  response.write "<a href=?bid="&bid&"&findstr="&findstr&"&page="&ii&">"&ii&"</a>   "
  end if                                                                                                                                               
 end if                                                                                                                                               
 if ii=maxpage then exit for                                                                                                                                               
next                                                                                                                                               
response.write "</b>"                                                                                                                                               
if ii<maxpage then response.write "<a href=?bid="&bid&"&findstr="&findstr&"&page="&ii&" title=下十页><font face=webdings>8</font></a>"                                                                                                                                               
if requestpage=maxpage then                                                                                                                                               
 response.write "<font face=webdings color=""#FF0000"">:</font>   "                                                                                                                                               
else                                                                                                                                               
 response.write "<a href=?bid="&bid&"&findstr="&findstr&"&page="&maxpage&" title=尾页><font face=webdings>:</font></a>"                                                                                                                                               
end if                                                                                                                                               
response.write"    总共有"&maxpage&"页   "                                                                                                                                                
rs.Close                                                                                                                                                           
set rs=nothing                                                                                                                                               
%>
                </td>
              </tr>
              <tr>
                <form method="post" action="list.asp?bid=<%=bid%>&class2=<%=class2%>&class3=<%=class3%>">
                  <td width="50%">快速查找：
                      <input name="findstr" type="text" class="wenbenkuang" size="20">
                      <input name="Submit2" type="submit" class="go-wenbenkuang" value="查 找"></td>
                </form>
                <td width="50%">
                  <p align="right">
                    <select name="select" onChange="if(this.options[this.options.selectedIndex].value!='0')window.location.href='list.asp?bid=' + this.options[this.options.selectedIndex].value ">
                      <option value='0'>论坛跳转至……</option>
                      <%                               
    set rs1=server.createobject("adodb.recordset")                               
    sqlstr="select * from board order by px"                               
    rs1.open sqlstr,conn,1,1     
    do while not rs1.eof                               
    %>
                      <option value='<%=rs1("bid")%>'><%=rs1("bidname")%></option>
                      <%rs1.movenext                                         
loop                        
   rs1.Close                    
set rs1=nothing %>
                    </select>
                </td>
              </tr>
            </table>
            <div align="center"><font color="666666"><br>
              栏目图例&nbsp;<img src="images/Order_16.gif" align="absmiddle" />&nbsp;总固顶主题 ‖<img src="images/top.gif" align="absmiddle" />&nbsp;固顶主题 ‖ <img src="images/Order_18.gif" align="absmiddle" />&nbsp;精华帖子 ‖ <img src="images/Order_19.gif" align="absmiddle" />&nbsp;投票贴子 ‖ <img src="images/Order_15.gif" align="absmiddle" />&nbsp;锁定的主题 ‖ <img src="images/Order_13.gif" align="absmiddle" />&nbsp;开放的主题</font><br>
            </div>            
            <p>&nbsp;</p>
          <p>&nbsp;</p></td>
        </tr>
    </table></td>
  </tr>
</table>
<!--#include file="../copyright.asp"-->                                                                                   
