<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->
<!-- #include file="../Inc/char.asp" -->

<%
call head()
Call saycarda("会员动态")

'lonline为会员离线时间
if dateSQL="0" then
conn.Execute("delete from online where times <= '"&DateAdd("n", lonline, Now())&"'")

conn.Execute("delete from sqdt where shijian <= '"&DateAdd("n", "-300", Now())&"'")
else
conn.Execute("delete from online where DATEDIFF('s', times, now()) > 60*60")
conn.Execute("delete from sqdt where DATEDIFF('s', shijian, now()) > 60*300")
end If

dim dongtainum1
    dongtainum1=conn.execute("Select count(ID) from [sqdt]")(0)

 Response.write "会员动态共"&dongtainum1&"条<br/>"
 Response.write "--------------<br/>"
 set rs = server.createobject("adodb.recordset")
 rs.open"select * from sqdt order by shijian desc",conn,1,1
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="/bbs/dongtai.asp?saytk="&saytk&"&amp;sid="&sid&"&amp;"
	Count=rs.recordcount	
	If saytk=1 then
	page=int(request.QueryString ("page"))
	Else
	page=Request.form("page")
	End if
	

	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
        if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))
	For i=1 To PageSize     						
	If rs.eof Then Exit For
dz=rs("dz")
Response.write""&i&"."
response.write""&ubb2(rs("dz"))&"["
			   response.write date_dongtai(rs("shijian"))
			   response.write"前]<br/>"
	rs.moveNext
 	Next
	if page-pagecount<0 then response.write "<a href="""&gopage&"page="&page+1&""">下页</a>"
	if page>1 then response.write "<a href="""&gopage&"page="&page-1&""">上页</a>"

	if pagecount>1 then 
	
	response.write "<br/><b>"&page&"</b>/"&pagecount&"页"

	      if saytk<>1 then
	      Response.write "<form name=""form"" method=""post"" action="""&gopage&"a"">"
          end if
    response.write "<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/>"
          if saytk<>1 Then

		  %><input type="submit" name="Submit" value="跳转"></form><br/><%
          Else
          
          response.write"<a href="""&gopage&"page=$(page)"">跳转</a><br/>"
		  End if

	End if



Else
   Response.write "暂无相关记录！<br/>"
end if
if keys=1 then
Response.write"<a href='/bbs/shanchudongtai.asp?sid="&sid&"'>删除全部动态记录</a><br/>"
end if
rs.close
set rs=Nothing
Response.write"-------------<br/>"

Call onlineCoun11()


if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;saytk="&saytk&"&sid=[sid]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"查看了:(url=/bbs/dongtai.asp?saytk="&saytk&"&sid=[sid])会员动态(/url)')")

response.write "<br/>"
response.write "<a href=""ip.asp?saytk="&saytk&"&amp;sid="&sid&""">全站流量统计</a>"
conn.close
set conn=nothing
%>

<!--#include file="fanhui.asp"-->
<%
call headsay()
%>
