<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->
<%
call head()
'统一时间
Function fordatebook(riqi)
if IsDate(riqi) = True then
   fordatebook =""
  fordatebook = fordatebook&month(riqi) & "-"
  fordatebook = fordatebook&day(riqi)&""
end if
End Function
dim ids
ids=request("ids")
if ids="" or isnumeric(ids)=False then
ids=myid
end if
dim username
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "SELECT name from Users where ID = " & IDs,conn,1,1
if rs.eof then
  rs.close
  set rs=Nothing
  Call Error("没有这个会员！")
end if
username=rs("name")
rs.close
set rs=nothing
if myid<>0 then
mz="[url=/bbs/uinfo.asp?id="&myid&"&amp;[标识]]"&myni&"[/url]"
else
mz="游客"
end if
conn.execute("insert into sqdt(shijian,dz)values('"&now&"','"&mz&"看了"&username&"的(url=/bbs/myread.asp?ids="&ids&"&amp;[标识])空间留言板(/url)')")
Call saycarda(""&username&"的留言板")

If saytk>1 Then Response.Write "<div class=""path red"">"
Response.Write "<a href='myreadadd.asp?ids="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>编写留言</a><br/>"
If saytk>1 Then Response.Write "</div>"
set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from [usbook] where usid="&ids&" order by num,id desc"
rs.open sql,conn,1,1
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="myread.asp?ids="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;"
	Count=conn.execute("Select count(ID) from [usbook] where usid="&ids)(0)	
	page=int(request.QueryString ("page"))
	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	
If saytk>1 Then
  If Is_odd(i+(page-1)*PageSize)=False Then 
  Response.write "<div class=""ade"">"
  Else
  Response.write "<div class=""add"">"
  End If
End if
Response.write ""&i+(page-1)*PageSize&"."
if rs("num")=1 then
Response.write "[顶]"
end if
Response.write "<a href=""uinfo.asp?id="&rs("fid")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"&usb(rs("fname"))&"</a>"
Response.write "说:"&ubb2(rs("content"))&"("&fordatebook(rs("ftime"))&")"
dim usid
usid=rs("usid")
if usid=abs(myid) then
Response.write "[<a href=""readdel.asp?TP=del&amp;id="&rs("id")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">删除</a>]" 
end if
Response.write "<br/>"
If saytk>1 Then Response.write "</div>"

	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/>"&page&"/"&pagecount&"页,共"&Count&"条<br/><input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">跳到该页</a><br/>"
	
Else
Response.write "暂时没有留言！<br/>"
end if

rs.close
set rs=Nothing

conn.close
set conn=Nothing
If saytk>1 Then Response.Write "<div class=""path"">"
response.write"<a href='uinfo.asp?id="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>返回"&username&"空间</a><br/>"
If saytk>1 Then Response.Write "</div>"
response.write"<a href='show.asp?saytk="&saytk&"&amp;sid="&sid&"'>我的空间</a>"
%><!--#include file="fanhui.asp"-->
<%
call headsay()
%>
