<%	if ll=0 then
	' 是否会员浏览
		call bbs
   else
     if session("username")="" then
		 response.redirect"login.asp"
     else
	 	call bbs
	end if
end if




%>
<%sub bbs()%>
<%
		sql="select * from bbs_class2 where  class2_class1_id =" & bid  
		Set Rs=Conn.Execute(sql)
		
%>
<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 align="center" valign="middle">
            
                        <table width="100%" height="30"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td>版主:
                <%call banzhu1%>                </td>
                <td width="90" bgcolor="#FFFFFF"><div align="center"><a href="reg.asp" target="_blank"> </a><a href="post.asp?bid=<%=bid%>"><img src="images/fb.gif" width="80" height="20" border="0"></a></div></td>
                <td width="90" bgcolor="#FFFFFF"><div align="center"><span class="table-shangxia"><span class="b14" style="font-weight: bold"><span style="color: #000000"><a href="jinhua.asp?bid=<%=bid%>"><img src="images/jh.gif" width="80" height="20" border="0"></a></span></span></span></div>                  </td>
                <td width="90" bgcolor="#FFFFFF"><div align="center"><span class="table-shangxia"><span class="b14" style="font-weight: bold"><span style="color: #000000"><span class="b14" style="font-weight: bold"><span style="color: #000000"><a href="smallpaper.asp?bid=<%=bid%>"><img src="images/xb.gif" width="80" height="20" border="0"></a></span></span></span></span></span></div>                  </td>
              </tr>
            </table>
            <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="8"></td>
              </tr>
            </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" style="font-weight: bold">状态</div></td>
                <td width="36%" class="norightbuttonborder2">
                &nbsp;<span style="font-weight: bold">主题</span></td>
                <td width="12%" class="norightbuttonborder2">
                <div align="center" style="font-weight: bold"> 作者</div></td>
                <td width="10%" class="norightbuttonborder2">
                <div align="center" style="font-weight: bold"> 回复</div></td>
                <td width="10%" class="norightbuttonborder2"><div align="center" style="font-weight: bold">点击次</div></td>
                <td width="30%" height="20" class="norightbuttonborder2">
                <div align="center" style="font-weight: bold"> 最后更新</div></td>
              </tr>
              <%
Set rs = Server.CreateObject("ADODB.Recordset")                                                     
topsql="where  bid="&bid&" and bbs_book_class2_id  is null "                                                         
sql = "SELECT * FROM book  "&topsql&"   order by gd desc,ldate desc"                                                             
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")%>","<%=rs("vote_title")%>","<%if rs("hits")>=50 and rs("reply")>=10  then
response.Write("1")
else
response.Write("0")
end if%>",<%if datediff("d",rs("wdate"),now)<=3 then
response.Write("1")
else
response.Write("0")
end if%>);</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%">页次：
                    <%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=list.asp?bid="&bid&"&findstr="&findstr&"&page=1 title=首页><font face=webdings>9</font></a>"                                                                                                                                                       
end if                                                                                                                                                       
if p*10>0 then response.write "<a href=list.asp?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=list.asp?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=list.asp?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=list.asp?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 />
            <br />
            </div>
		  </td>
        </tr>
    </table></td>
  </tr>
</table>
<%end sub


sub banzhu1()
dim str
	sql="select * from shop_user where manbid=" &bid   
	Set rebman=Conn.Execute(sql)                                         
	do while not rebman.eof
	str="<a href=Userlist_data.asp?username="&rebman("username")&">["&rebman("username")&"]</a>"
	rebman.movenext   
	response.write str                                                   
	loop                                                                   
	rebman.close
	set rebman=nothing 
end sub 
%>