<!--#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"-->
<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="top">
            <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="8"></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="#CCCCCC">
              <tr bgcolor="f1f1f1">
                <td width="5%" align="center" class="norightbuttonborder2">状态</td>
                <td width="47%" align="center" class="norightbuttonborder2">主题</td>
                <td width="9%" align="center" class="norightbuttonborder2">作者</td>
                <td width="10%" align="center" class="norightbuttonborder2">回复/点击</td>
                <td width="7%" align="center" class="norightbuttonborder2">点击次数</td>
                <td width="22%" height="20" align="center" class="norightbuttonborder2">最后更新</td>
              </tr>
           
              <%username=nosql(session("username"))
action=nosql(request.querystring("action"))
Set rs = Server.CreateObject("ADODB.Recordset")                     
if action="" then                                                                                                                         
sql = "SELECT * FROM book  where username='"&username&"'  and type=0 order by gd desc,ldate desc"
else 
sql="select * from book where id in(select fid from book where username='"&username&"') and type=0 order by gd desc,ldate desc"                              
end if                                                                                                         
rs.open sql, conn, 1, 3 
if rs.eof then
         %>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
     <tr>
       <td align=center><br>
暂无信息!<a href="javascript:history.back(1)">点击返回</a><br>
</td>
     </tr>
   </table>
		 <%
           else 
        rs.PageSize =12 '每页记录条数
		iCount=rs.RecordCount '记录总数
		iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    	per_page=rs.PageSize
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	For i=0 To x-1                                          
%>
<tr  bgcolor="#ffffff" onMouseOver='JavaScript:this.style.backgroundColor="#f1f1f1"' 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
next 
%>
            </table>
            <table width="100%" height="60" border="0" align="center" cellpadding="0" cellspacing="0">
             
              <tr>
                <td width="50%" align="center"><% 
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)
Sub PageControl(iCount,pagecount,page,table_style,font_style,per_page)
'生成上一页下一页链接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
	
    temp=""

    Response.Write("<table " & Table_style & ">" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page='+ this.page.value;return false;""><TR>" & vbCrLf )
    Response.Write("<TD align=right>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    
        
    if page<=1 then
        Response.Write ("首页 " & vbCrLf)        
        Response.Write ("上页 " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page=1>首页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page=" & (Page-1) & ">上页</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下页 " & vbCrLf)
        Response.Write ("尾页 " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page=" & (Page+1) & ">下页</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "web_id="&web_id&"&id="&id&"&Page=" & pagecount & ">尾页</A> " & vbCrLf)            
    end if

    Response.Write(" 页次：" & page & "/" & pageCount & "页" &  vbCrLf)
    Response.Write(" 共有" & iCount & "条/每页"&per_page&"条" &  vbCrLf)
    Response.Write(" 转到 " & "<INPUT TYEP=TEXT NAME=page SIZE=4 Maxlength=8 class=wenbenkuang VALUE=" & page & ">" & " 页"  & vbCrLf & "<input name=go type=submit  value=GO class=go-wenbenkuang>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub


%></td>
              </tr>
              <tr> </tr>
            </table>
			<%end if%>
              <div align="center"><font color="666666">栏目图例&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">开放的主题</font>            </div>
          <p>&nbsp;</p></td>
        </tr>
    </table></td>
  </tr>
</table>
<div align="center">                                                     
<!--#include file="../copyright.asp"-->             </div>                                                     
