<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>论坛主题管理 - <%=cf_name%></title>
<link rel="stylesheet" type="text/css" href="images/style.css" />
</head>

<body>
<!--#include file="top.asp"-->
<div class="con bian">
   <div class="bd_l"><!--#include file="left.asp"--></div>
   <div class="bd_r">
      <div class="title">论坛主题</div>
      <form action="cw_bbs.asp?cmd=all" method="post" name="form">
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC" >
            <tr>
        <td width="4%" align="center" bgcolor="#F0F3F5">序号</td>
        <td width="45%" align="center" bgcolor="#F0F3F5">主题</td>
        <td width="13%" align="center" bgcolor="#F0F3F5">版块</td>
		<td width="9%" align="center" bgcolor="#F0F3F5">状态</td>
        </tr>
    <%
		set rs1=server.CreateObject("adodb.recordset")
		sql="select * from cw_bbs where userid="&session("userid")&" order by id desc"
		rs1.open sql,conn,1,1
		if not rs1.eof then
		sj=1'序号
		         page_count=15
  				 if Request("page")="" or Request("page")="0" then
   				  page=1
  				 else
    				 page=cint(Request("page"))
  				 End if 
					 totalcount=rs1.RecordCount
   				  totalpage=int(totalcount/page_count+(page_count-1)/page_count)
  				 if page>totalpage then page=totalpage
  				 if rs1.EOF then    
   				  else
   				  for i = 1 to (page-1)*page_count
    				   rs1.MoveNext
   				  Next
   				  if page<totalpage then
    				   psize=page_count
   				  else
   				    psize=totalcount-(page-1)*page_count
   				  End if
   				  for i = 1 to psize				
		%>
      <tr>
        <td align="center" bgcolor="#FFFFFF"><%=sj%></td>
        <td bgcolor="#FFFFFF">&nbsp;<a href='../bbs/show.asp?id=<%=rs1("id")%>' target="_blank"><%=rs1("title")%></a></td>
        <td align="center" bgcolor="#FFFFFF" ><%=cw_class("title","cw_bbs_class",rs1("classid"))%></td>
		<td align="center" bgcolor="#FFFFFF" ><%if rs1("ispass")=0 then%><span class="ispass">待审核</span><%else%>己审核<%end if%></td>
		</tr>
	      <%
		  sj=sj+1
		 rs1.MoveNext
 		next
		end if
		else
		  response.Write("<td colspan=6 align=center bgcolor=#FFFFFF>Hi,你还没有发表过帖子，<a href='../bbs/'>点此去发布&gt;&gt;</a></td>")
		end if
		rs1.close
		set rs1=nothing
		%>
      <tr >
        <td colspan="4" align="center" bgcolor="#FFFFFF"><!--#include file="cw_page.asp"--></td>
        </tr>
    </table>
	</form>

   </div>
   <div class="clear"></div>
</div>
<div class="line"></div>
<!--#include file="foot.asp"-->
<%
call closes()
%>
</body>
</html>
