<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%call head()
%>
<%call Fortxtmsg
dim Action
Action=Request.QueryString("Action")
IF  Action="view" Then
	call msgfvview
else

	call msgfv
end if

sub msgfv
call saycardd("收藏箱")

dim rs1,username
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from guest where sdel=0 and book=1 and sid="&myid&" order by ftm desc",conn,1,1
If Not rs.eof	Then
	Dim PageSize,i
	PageSize=10						
	Dim Count,page,pagecount,gopage			
	gopage="msgfv.asp?sid="&sid&"&amp;saytk="&saytk&"&amp;"
	Count=rs.recordcount	
	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	
Response.write ""&i+(page-1)*PageSize&".<a href='msgfv.asp?Action=view&amp;id="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>"&ubb(username)&":"&ubb(rs("fnr"))&"</a><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&"页,共"&Count&"条<br/>"
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)"">跳到该页</a><br/>"
end if
Else
Response.write "暂时没有！<br/>"
end if
rs.close
set rs=nothing
end sub
sub msgfvview
call saycardd("查看收藏")
dim id
id=request("id")
if id="" or Isnumeric(id)=False then id=0

set rs=Server.CreateObject("ADODB.Recordset")
  rs.open"select id,fnr,fid,sid,tou,ftm from guest where book=1 and  sdel=0 and id="&ID&" and sid="&myid&" order by ID desc",conn,1,1
if rs.eof then
response.write "没有信息了<br/>"
else
dim ids,sendtxt,ftm,guestid
guestid=rs("ID")
sendtxt=rs("fnr")
biao=rs("tou")
ids=rs("fid")
ftm=rs("ftm")
rs.close
set rs=nothing
dim username
set rs=Server.CreateObject("ADODB.Recordset")
  rs.open"select id,name from Users where id="&ids,conn,1,1
if rs.eof then
username="游客"
Else
username=rs("name")
rs.close
set rs=nothing
end if
conn.Execute("update guest set fzt=1 where id="&guestid)
response.write "内容："
if biao<>0 then
response.write "<img src='face/"&biao&".gif' alt=''/>"
end if
response.write ubb2(sendtxt)

if username<>"" then
response.write "<br/>作者："

response.write "<a href=""uinfo.asp?id="&ids&"&amp;sid="&sid&"&amp;saytk="&saytk&""">"&ubb(username)&"</a>(ID:"&ids&")"

response.write "<br/>时间："&ftm&""
if saytk>1 then
Response.write "<form name=""form"" method=""post"" action=""msgaddsave.asp?sid="&sid&"&amp;saytk="&saytk&""">"
end if
response.write "<br/><select title='表情' name='face' value='0'>"&chr(13)
response.write "<option title='表情' value='0'>表情</option>"&chr(13)
response.write "<option title='微笑' value='1'>微笑</option>"&chr(13)
response.write "<option title='哭泣' value='2'>哭泣</option>"&chr(13)
response.write "<option title='调皮' value='3'>调皮</option>"&chr(13)
response.write "<option title='脸红' value='4'>脸红</option>"&chr(13)
response.write "<option title='害羞' value='5'>害羞</option>"&chr(13)
response.write "<option title='生气' value='6'>生气</option>"&chr(13)
response.write "<option title='偷笑' value='7'>偷笑</option>"&chr(13)
response.write "<option title='流汗' value='8'>流汗</option>"&chr(13)
response.write "<option title='我倒' value='9'>我倒</option>"&chr(13)
response.write "<option title='得意' value='10'>得意</option>"&chr(13)
response.write "<option title='眦牙' value='11'>眦牙</option>"&chr(13)
response.write "<option title='疑问' value='12'>疑问</option>"&chr(13)
response.write "<option title='睡觉' value='13'>睡觉</option>"&chr(13)
response.write "<option title='好色' value='14'>好色</option>"&chr(13)
response.write "<option title='口水' value='15'>口水</option>"&chr(13)
response.write "<option title='敲头' value='16'>敲头</option>"&chr(13)
response.write "<option title='可爱' value='17'>可爱</option>"&chr(13)
response.write "<option title='猪头' value='18'>猪头</option>"&chr(13)
response.write "<option title='YEAH' value='19'>YEAH</option>"&chr(13)
response.write "<option title='玫瑰' value='20'>玫瑰</option>"&chr(13)
response.write "</select>"&chr(13)
response.write "<input name='txt' title='内容' type='text' format='*M' emptyok='true' maxlength='500' value=''/><br/>"
if saytk>1 then
response.write "<input type=""hidden"" name=""txt"" value="""&txt&"""/>"
response.write "<input type=""hidden"" name=""lid"" value="""&ubb(ids)&"""/>"
response.write "<input type=""submit"" name=""Submit"" value=""快速回复""></form><br/>"
else
response.write "<anchor>快速回复"
response.write "<go href='msgaddsave.asp?sid="&sid&"&amp;saytk="&saytk&"' method='post' accept-charset='utf-8'>"
response.write "<postfield name=""txt"" value=""$(txt)""/>"
response.write "<postfield name=""lid"" value="""&ubb(ids)&"""/>"
response.write "<postfield name=""face"" value=""$(face)""/>"
response.write "</go></anchor>"
end if
response.write "<a href=""msglist.asp?fid="&ids&"&amp;sid="&sid&"&amp;saytk="&saytk&""">记录</a>"&chr(13)
response.write "<a href=""msgfvsave.asp?action=del&amp;id="&id&"&amp;sid="&sid&"&amp;saytk="&saytk&""">删除</a><br/>"&chr(13)
end if
end if
end sub
conn.close
set conn=nothing
Response.write "<a href=""mymsg.asp?sid="&sid&"&amp;saytk="&saytk&""">我的信箱</a>"%>
<!--#include file="fanhui.asp"-->
<%call head1()%>