<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->


<%
call head()
Call saycardd("相片评论")
dim ids,id,p
ids=trim(request.QueryString("ids"))
id=trim(request.QueryString("id"))
if id="" or IsNumeric(id)=False then
  Call Error("ID无效！")
  end if
p=trim(request.QueryString("p"))
if p="" or IsNumeric(p)=False then p=1
response.write"<input type=""text"" name=""pl"" title=""输入内容"" value="""" maxlength=""300""/><br/>"
response.write"<anchor title=""确定"">发表评论"
response.write"<go method=""post"" href=""photobbscl.asp?id="&id&"&amp;ids="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"
response.write"<postfield name=""pl"" value=""$(pl)""/>"
response.write"</go></anchor><br/>"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from photopl where photoid="&id&" order by id desc",conn,1,1
If Not rs.eof Then
	Dim PageSize,i
	PageSize=10				
	Dim Count,page,pagecount,gopage			
	gopage="photobbs.asp?id="&id&"&amp;ids="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;"
	Count=conn.execute("Select count(ID) from [photopl] where photoid="&id&"")(0)	
	page=int(request.QueryString ("page"))
	if page<=0 or page="" then page=1		
	pagecount=(count+pagesize-1)\pagesize	
	rs.move(pagesize*(page-1))					
	For i=1 To PageSize						
	If rs.eof Then Exit For	
response.write "&lt;"&i+(page-1)*PageSize&"."

response.write"<a href=""uinfo.asp?id="&rs("userid")&"&amp;saytk="&saytk&"&amp;sid="&sid&""">"&ubb(rs("pluser"))&"</a>:<br/>"

response.write rs("photopl")&"("&fordate(rs("times"))&")<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/>"&page&"/"&pagecount&"页<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">[GO]</a><br/>"
Else
response.write"没有评论！<br/> "
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
	response.write("--------<br/><a href=""photoview.asp?id="&id&"&amp;ids="&ids&"&amp;saytk="&saytk&"&amp;sid="&sid&""">查看相片</a><br/>")

	Response.write "<a href=""/bbs/show.asp?saytk="&saytk&"&amp;sid="&sid&""">地盘</a>>>"
Response.write "<a href=""/bbs/index.asp?saytk="&saytk&"&amp;sid="&sid&""">社区首页</a>"
Response.write "<br/><a href=""/index.asp?saytk="&saytk&"&amp;sid="&sid&""">网站首页</a>"
'(c) "&Request.ServerVariables("SERVER_NAME")&"["&String(2-Len(hour(now)),"0") & hour(now) &":"&String(2-len(minute(now)),"0") & minute(now)&"]"
response.write"<br/>"&zqfjs&""
Call headsay()
%>