<!--#include file="../inc/conn.asp"-->
<%
PostID=clng(Request.QueryString("PostID"))
page=Cint(Request.QueryString("pagenav"))
hits=Request.QueryString("hits")
sql="select top 1 * from bbstitle where ID="&PostID&" "
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3

FileName=rs("htmfilename")
htmfilename=replace(FileName,".htm","")
call FTBBS_HTML_MB
ipagesize=Application("FTBBSMB")(6,0)
k=rs("rep")/ipagesize

If page<=1 and hits=1 then
    rs("hit")=rs("hit")+1
end if
rs.Update
rs.Close
set rs=nothing
conn.close

if int(k)=k and int(k)<>0 then
   PageNum=k
else
   PageNum=int(k)+1
end if

   strcode="当前是第<font color=#FF0000>"&page&"</font>页/共"&PageNum&"页 "&ipagesize&"条/页" 
   strcode=strcode&"&nbsp;<a href=../../html/"&htmfilename&".htm>首页</a>&nbsp;" 
        if page>1 then
		  if page=2 then
		  strcode=strcode&"<a href=../../html/"&htmfilename&".htm>上一页</a>&nbsp;"
		  else
          strcode=strcode&"<a href=../../html/"&htmfilename&"_"&page-1&".htm>上一页</a>&nbsp;" 
          end if
        else
        strcode=strcode&"上一页&nbsp;" 
        end if
        if page<PageNum then
        strcode=strcode&"<a href=../../html/"&htmfilename&"_"&page+1&".htm>下一页</a>&nbsp;" 
        else
        strcode=strcode&"下一页&nbsp;" 
        end if
        if page<PageNum then
        strcode=strcode&"<a href=../../html/"&htmfilename&"_"&PageNum&".htm>尾页</a>"
        else
        strcode=strcode&"尾页" 
        end if
   strcode=strcode& "&nbsp;"
   linkstr=strcode
Response.Write "document.write ("""&linkstr&""");"
%>