<!--#include file="conn.asp"-->
<%bid=request.querystring("bid")

 if bid="" or  not isnumeric(bid) then
response.write"错误的请求"
response.end 
end if  
  %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=bbsinfo("bbsname")%></title>
<LINK 
href="css.css" type=text/css rel=stylesheet>
</head>
<body>
<!--#include file="top.asp"-->
<script language="JavaScript" type="text/JavaScript">
	

	function MM_openBrWindow(theURL,winName,features)
	{
	  window.open(theURL,winName,features);
	}
</script>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="8" background="images/left.gif">&nbsp;</td>
    <td valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr> 
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td height=6></td>
              </tr>
            </table>
            <table width="754" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width=6 height=6><img src="images/index_2.gif" width="6" height="6"></td>
                      <td width="742" background="images/index_3.gif"></td>
                      <td width=6> <div align="right"><img src="images/index_1.gif" width="6" height="6"></div></td>
                    </tr>
                  </table><%set rs2=conn.execute("select  * from board where bid="&bid&" ")%>
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr> 
                      <td width=1 bgcolor="C6C3C4"></td>
                      <td height=6 bgcolor="FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="8">
                          <tr>
                            <td><img src="images/Order_26.gif" width="10" height="10"> 
                              <a href=index.asp><%=bbsinfo("bbsname")%></a> → <a href=list.asp?bid=<%=request.querystring("bid")%>>                                              
<%=rs2("bidname")%></a> →&nbsp;<% if request.querystring("good")<>"" then%>本版精华<%else%>帖子列表<%end if%></td>                                                                 
                            <td>            
                              <p align="right"><img src="images/Order_8.gif" width="29" height="11" align="absmiddle">                                                                   
<%username=Request.Cookies("esung")("username")            
mailnewno=conn.execute("select count(tname) from sms where tname='"&username&"' and isnew='0'")(0)             
if mailnewno>0 then             
tishi="<a href=mysms.asp?id=0>你有新的消息</a>"             
mailnewno=""&mailnewno&""             
end if%><B><%=tishi%></B>                                                                
                              </p>            
 </td>                                                               
                          </tr>                                                               
                        </table></td>                                                                                           
                      <td width=1 bgcolor="C6C3C4"></td>                                                                                           
                    </tr>                                                                                           
                  </table>                                                                                           
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                           
                    <tr>                                                                                            
                      <td width=5 height=5><img src="images/left_data_4.gif" width="5" height="5"></td>                                                                                           
                      <td width="742" background="images/left_data_6.gif"></td>                                                                                           
                      <td width=5> <div align="right"><img src="images/left_data_5.gif" width="5" height="5"></div></td>                                                                                           
                    </tr>                                                                                           
                  </table></td>                                                                                           
              </tr>                                                                                           
            </table>                                                                                           
            <br> <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                           
              <tr>                                                                                            
                <td width="10%"><div align="center"><a href="post.asp?bid=<%=bid%>&bidname=<%=rs2("bidname")%> "><img src="images/list_bottom1.gif" width="72" height="17" border="0"></a></div></td>                                                                                          
                <td width="10%"><div align="center"><img src="images/list_bottom2.gif" width="72" height="17"></div></td>                                                                                          
                <td width="10%"><div align="center"><a href="list.asp?bid=<%=bid%>&amp;good=1"><img src="images/list_bottom3.gif" width="72" height="17" border="0"></a></div></td>                                                                                          
                <td width="9%"><div align="center"><a href="smallpaper.asp?bid=<%=bid%>&amp;bidname=<%=rs2("bidname")%>"><img src="images/list_bottom4.gif" width="60" height="17" border="0"></a></div></td>                                                                                        
                <td width="60%"><div align="right"></div></td>                                                                                        
                <td width="1%">&nbsp;</td>                                                                                        
              </tr>                                                                                        
            </table>                                                                                        
            <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                        
              <tr>                                                                                         
                <td width="55%"><table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                        
                    <tr>                                                                                         
                      <td width=1 height="25" bgcolor="494949" ></td>                                                                                        
                      <td width="103" background="images/list_bg.gif"><div align="center"><img src="images/Order_12.gif" width="19" height="10">                                                                                         
                          社区广播：</div></td>                                                                                             
                      <td width=9 valign="top" background="images/list_bg2.gif">                                                                                              
                        <img src="images/list_top1.gif" width="9" height="25"></td>                                                                                             
                      <td width="283" valign="bottom" background="images/list_bg2.gif">                         
                      <%Set mm= Server.CreateObject("ADODB.Recordset")                          
sql="select top 5 * from smallpaper order by ID desc"                          
mm.open sql,conn,1,1                          
%>                                                                                              
                        <table width="100%" height="21" border="0" cellpadding="0" cellspacing="0">                                                                                             
                          <tr>                                                                                              
                            <td ><marquee onmouseover='this.stop()' onmouseout='this.start()' scrollAmount='1' 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>                                                                                             
                        </table></td>                                                                                             
                      <td width="45" valign="top"><img src="images/list_top2.gif" width="45" height="25"></td>                                                                                             
                    </tr>                                                                                             
                  </table></td>                                                                                             
                <td width="45%">                                                   
                <%set rebman=server.createobject("adodb.recordset")                                                                 
		bdstr="select * from member where manbid=" &bid                                                                
		rebman.open bdstr,conn,1,1                                                                
		           %>                                                                 
                  <p align="right"> <img src="images/index_6.gif" width="16" height="12" align="absmiddle">                                                                                             
                    本版版主：<%if rebman.eof and rebman.bof  then%>本版诚聘版主<%else                                                  
                    %><%do while not rebman.eof%>  [<a href=userlist.asp?name=<%=rebman("username")%>><%=rebman("username")%></a>]<%rebman.movenext                                                                 
			  loop                                                                 
			  end if                                                 
			  %></p>                                                               
                </td>                                                                                             
              </tr>                                                                                             
            </table>                                                                                             
            <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="494949" class="listcontents3">                                                                                             
              <tr>                                                                                              
                <td width="7%"> <div align="center"><strong><font color="#FFFFFF">状态</font></strong></div></td>                                                                                             
                <td width="46%"><div align="center"><strong><font color="#FFFFFF">主题</font></strong></div></td>                                                                                             
                <td width="11%"><div align="center"><strong><font color="#FFFFFF">作者</font></strong></div></td>                                                                                             
                <td width="11%"><div align="center"><strong><font color="#FFFFFF">回复/点击</font></strong></div></td>                                                                                             
                <td width="25%"><div align="center"><strong><font color="#FFFFFF">最后更新|回复人</font></strong></div></td>                                                                                             
              </tr>                                                                                          
<% good=request.querystring("good")                                                                        
 findstr=trim(request("findstr"))                                                                                        
Set rs = Server.CreateObject("ADODB.Recordset")                                                                          
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& " order by ldate desc"                                                                        
                                        
elseif good<>"" then                                   
sql = "SELECT * FROM book  where bid=" &bid& " and type=0 and good=1 order by gd desc,ldate desc"                                    
                                   
else                                                                  
sql = "SELECT * FROM book  where bid=" &bid& " and type=0  order by gd desc,ldate desc"                                                                            
end if                                                                                       
rs.open sql, conn, 1, 3                                                                                           
if rs.EOF then                                                                                           
response.write"<center>还没有帖子</center>"                                                                                           
else                                                                           
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="F3F3F3">                                                                              
                                                                           
                <td> <div align="center"><%                                          
    if rs("gd")=2 then                                          
    Response.Write " <img src='images/Order_16.gif' alt='固顶' border='0'>"                                          
                                              
    	elseif rs("good")=1 then                                          
		Response.Write " <img src='images/Order_18.gif' alt='精华' border='0'>"                                          
        	elseif rs("lock")=1 then                                          
			Response.Write " <img src='images/Order_15.gif' alt='锁定' border='0'>"                                          
				else                                          
				Response.Write " <img src='images/Order_13.gif' alt='开放的主题' border='0'>"                                          
	end if	                                          
%>		</div></td>                                                                                             
                <td><img src="images/mood/<%=rs("faceimg")%>.gif"> <a href="show.asp?id=<%=rs("id")%>&bid=<%=rs("bid")%>&name=<%=rs2("bidname")%>"><%=rs("title")%></a></td>                                                                                           
                <td> <div align="center"><a href=Userlist_data.asp?username=<%=rs("username")%>><%=rs("username")%></a></div></td>                                                                                           
                <td> <div align="center"><%=rs("reply")%>/<%=rs("hits")%></div></td>                                                                                          
                <td> <div align="center"><%=rs("ldate")%>|<%set u2=conn.execute("select reply,username from book where fid="&rs("id")&" order by id desc")%><%if rs("reply")=0 then%> ---<%else%><a href=Userlist_data.asp?username=<%=u2("username")%>><%=u2("username")%><%end if                                                                       
                 u2.Close                                                                                     
set u2=nothing  %></a>                                                                             
<img src="images/ " width="9" height="14">                                                                            
                                                                            
</div></td>                                                                                           
              </tr>  <%                                                                           
rs.movenext                                                                           
if rs.eof then exit for                                                                           
next                                                                         
end if                                                                           
%>                                                                                           
            </table>                                                                                           
            <table width="100%" border="0" cellspacing="0" cellpadding="5">                                                                                           
              <tr>                                                                                            
                <td>页次：<%if request.querystring("page")="" then %>1<%else%><%=request.querystring("page")%><%end if%> / <%=maxpage%>页  每页：<%=shownum%> 主题数：<%=totalrecord%>&nbsp;&nbsp;</td>                                                                                             
                <td> <div 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&"&page=1&findstr="&findstr&"&good="&good&" title=首页><font face=webdings>9</font></a>"                                                                           
end if                                                                           
if p*10>0 then response.write "<a href=list.asp?bid="&bid&"&page="&p*10&"&findstr="&findstr&"&good="&good&" 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                                                                           
  response.write "<a href=list.asp?bid="&bid&"&page="&ii&"&findstr="&findstr&"&good="&good&">"&ii&"</a>   "                                                                           
 end if                                                                           
 if ii=maxpage then exit for                                                                           
next                                                                           
response.write "</b>"                                                                           
if ii<maxpage then response.write "<a href=list.asp?bid="&bid&"&page="&ii&"&findstr="&findstr&"&good="&good&" 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&"&page="&maxpage&"&findstr="&findstr&"&good="&good&" title=尾页><font face=webdings>:</font></a>"                                                                           
end if                                                                           
response.write"    总共有"&maxpage&"页   "                                                                            
rs.Close                                                                                       
set rs=nothing                                                                           
%>                                                                           
                                                                         
                  </div></td>                                                                                         
              </tr>                                                                                         
            </table>                                                                                         
            <table width="100%" border="0" cellspacing="0" cellpadding="5">                                                                                         
              <tr>   <form method="post" action="list.asp?bid=<%=bid%>" name="find">                                                                                       
                <td width="51%">快速查找：                                                                                             
                  <input name="findstr" type="text" class="textbox_shiixian_hui" size="20">                                                                        
                  <input type='hidden' name='bid' value=<%=bid%>>                                                                                              
                  <input name="Submit2" type="submit" class="button" value="查 找"></td>                                                                                            
                <td width="49%"><div align="right">                                                                                             
                    <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>                                                                                           
                  </div></td>                                                                                           
              </tr>                                                                                           
            </table>                                                                                           
            <br> <table width="754" border="0" align="center" cellpadding="0" cellspacing="0">                                                                                           
              <tr>                                                                                            
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                           
                    <tr>                                                                                            
                      <td width=6 height=6><img src="images/index_2.gif" width="6" height="6"></td>                                                                                           
                      <td width="742" background="images/index_3.gif"></td>                                                                                           
                      <td width=6> <div align="right"><img src="images/index_1.gif" width="6" height="6"></div></td>                                                                                           
                    </tr>                                                                                           
                  </table>                                                                                           
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                           
                    <tr>                                                                                            
                      <td width=1 bgcolor="C6C3C4"></td>                                                                                           
                      <td height=6 bgcolor="FFFFFF"> <table width="100%" border="0" cellspacing="0" cellpadding="3">                                                                                           
                          <tr>                                                                                            
                            <td>&nbsp;<img src="images/index_7.gif" width="13" height="13" align="absmiddle"><font color="666666">                                                                                            
                              栏目图例</font></td>                                                                                             
                          </tr>                                                                                             
                          <tr>                                                                                              
                            <td>&nbsp; <img src="images/Order_16.gif" width="17" height="17">固顶主题                                                                                              
                              ‖ <img src="images/Order_18.gif" width="11" height="15">精华帖子                                                                                              
                              ‖ <img src="images/Order_19.gif" width="13" height="12">投票贴子                                                                                              
                              ‖ <img src="images/Order_15.gif" >锁定的主题                                          
                              ‖  <img src="images/Order_13.gif" width="26" height="15">开放的主题                                                                              
                            </td>                                                                                             
                          </tr>                                                                                           
                        </table></td>                                                                                           
                      <td width=1 bgcolor="C6C3C4"></td>                                                                                           
                    </tr>                                                                                           
                  </table>                                                                                           
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                                           
                    <tr>                                                                                            
                      <td width=5 height=5><img src="images/left_data_4.gif" width="5" height="5"></td>                                                                                           
                      <td width="742" background="images/left_data_6.gif"></td>                                                                                           
                      <td width=5> <div align="right"><img src="images/left_data_5.gif" width="5" height="5"></div></td>                                                                                           
                    </tr>                                                                                           
                  </table></td>                                                                                           
              </tr>                                                                                           
            </table></td>                                                                                           
        </tr>                                                                                           
      </table>                                                                                            
      <!--#include file="down.asp"-->                                                                                           
    </td>                                                                                           
    <td width="8" background="images/right.gif">&nbsp;</td>                                                                                           
  </tr>                                                                                           
</table>                                                                                           
</body>                                                                                           
</html>                                                                                           
