<!--#include file="conn.asp"-->
<!-- #include file="../inc.asp" -->
<!-- #include file="../ydzq1.asp" -->
<%


call ling()
call head()
Call saycarda("查看示爱")
'-------A登录信息
if myid=0 then
Response.write "欢迎您:<a href='login.asp?saytk="&saytk&"'>登陆/注册</a><br/>----------<br/>"& chr(13)
else

'检查有几条新示爱
dim newguest
newguest = 0
IF myid > 0 THEN
  newguest = ForNewGuest(myid)
END IF
if newguest > 0 then
Response.write "<a href='bbs/msgview.asp?sid="&sid&"&amp;saytk="&saytk&"'>您有"&newguest&"条新消息</a><br/>"& chr(13)
end if
end if
'---------------------------
dim ids,id,cid,pa,TP
ids=Trim(request.QueryString("class"))
TP=Trim(request.QueryString("TP"))
cid=Trim(request.QueryString("cid"))


id=Trim(request.QueryString("id"))
if id="" or IsNumeric(id)=False then
  Call Error("ID无效！")
  end if


pa=Trim(request.QueryString("pa"))



if saytk=>2 then
Response.write "<form name=""form"" method=""post"" action=""yfpin.asp?id="&id&"&amp;pa="&pa&"&amp;TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"
end if%>
<input type="text" name="pin" title="输入内容" value="" maxlength="50"/><br/>
<%if saytk=>2 then
response.write "<input type=""submit"" name=""Submit"" value=""发表示爱""></form><br/>"
else%>
<anchor title="确定">发表示爱
<go method="post" href="yfpin.asp?id=<%=id%>&amp;pa=<%=pa%>&amp;TP=<%=TP%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>">
<postfield name="pin" value="$(pin)"/>
</go></anchor><br/><% 
end If










set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from yfpin where fileid="&id&" order by id desc",connyf,1,2
If Not rs.eof Then
	Dim PageSize,i
	PageSize=5
							
	Dim Count,page,pagecount,gopage			
	gopage="pilist.asp?id="&id&"&amp;cid="&cid&"&amp;class="&ids&"&amp;pa="&pa&"&amp;TP="&TP&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=conn.execute("Select count(ID) from xzpin where smsid="&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 "["&i+(page-1)*PageSize&"楼]."
if rs("uid")=0 then
response.write""&ubb(rs("ip"))&"说:<br/>"    
else
response.write"<a href=""bbs/uinfo.asp?id="&rs("uid")&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(rs("ip"))&"</a>说:<br/>"
end if
response.write ""&rs("pin")&"("&fordate(rs("pltime"))&")<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"<input name=""page"" format=""*N"" value="""&page&""" type=""text"" maxlength=""5"" emptyok=""true"" size=""3""/><a href="""&gopage&"page=$(page)"">[GO]</a><br/>"
end if
Else
response.write"暂时没有示爱！<br/>"
end If

rs.close
set rs=nothing
conn.close
set conn=nothing
%><br/>
<%response.write "-----------------<br/><a href='/bbs/lmyf/lmyf.asp?saytk="&saytk&"&amp;sid="&sid&"&amp;id="&id&"'>返回上级</a><br/>-----------------"
call headsay()%>