<!--#include file="Inc.asp"-->
<!--#include file="ydzq1.asp"-->
<%
call head()
If saytk=100 Then
%>
<style type="text/css">
.fbarb { clear: both; border-top: 1px solid #A9CBEE; background: #f6f9fe; height: 18px; padding: 3px 6px; line-height: 18px; }
.mframe { float: left; margin: 2px 0; text-align: left; border: 1px solid #A9CBEE;}
.mframe td.lf { width: 162px; background: #E4EEF8; padding: 20px 10px 13px 15px; border-right: 1px solid #A9CBEE; vertical-align: top; }
.mframe td.rb { vertical-align: bottom; }
.tit { border: 1px solid #2C6189; background: url(http://c.csdn.net/bbs/t/5/i/pic_titbg02.gif) #347ea1 repeat-x; width: 948px; padding: 3px 5px; }
.tit h1 { font-size: 14px; color: #fff; margin: 0; padding: 3px 0 0; }
.tit h1 em { font: bold 14px simsun; font-style: normal; color: #F00; margin: 0 0 0 3px; }
.tit h1 cite { float: right; }
.tit dfn a, .tit dfn a:visited { margin: -3px 0 0 5px; text-indent: -1000em; font-style: normal; font-size: 12px; float: right; display: block; background: url(http://c.csdn.net/bbs/t/5/i/bbsbtn_fav.gif) no-repeat; width: 52px; height: 22px; }
.tit code a, .tit code a:visited { margin: -3px 0 0 5px; text-indent: -1000em; font-style: normal; font-size: 12px; float: right; display: block; background: url(http://c.csdn.net/bbs/t/5/i/bbsbtn_share.gif) no-repeat; width: 52px; height: 22px; }

/****table frame test****/
</style>
<%
End if
Call saycarda("查看回复")
%>
<!--#INCLUDE file="sy1.asp"-->
<%
dim tid,bbsid,ptype
tid=request.QueryString("tid")
bbsid=request.QueryString("bbsid")
ptype=request.QueryString("ptype")

if ptype="" or Isnumeric(ptype)=False then ptype=1

if tid="" or Isnumeric(tid)=False then
  Call Error("ID无效！")
  end if

if bbsid="" or Isnumeric(bbsid)=False then
  Call Error("ID无效！")
  end if


response.write "<a href=""topic.asp?tid="&tid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">主帖</a>-"
response.write "<a href=""relist.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">刷新</a>-"
response.write "<a href='board.asp?bbsid="&bbsid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>返回本版</a><br/>"

if ptype=2 then
response.write "<a href=""relist.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;ptype=1&amp;sid="&sid&"&amp;saytk="&saytk&""">按最新回复排</a><br/>"&chr(13)
else
response.write "<a href=""relist.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;ptype=2&amp;sid="&sid&"&amp;saytk="&saytk&""">按回复顺序排</a><br/>"&chr(13)
end if


set rs=Server.CreateObject("ADODB.Recordset")
if ptype=1 then
rs.open"select id,biao,nr,htm,fid,fni from relist where tid="&tid&" order by htm desc",conn,1,1
else
rs.open"select id,biao,nr,htm,fid,fni from relist where tid="&tid&" order by htm asc",conn,1,1
end If



set rs1=Server.CreateObject("ADODB.Recordset")
rs1.open"select id,biao,nr,htm,fid,fni,ding from relist where tid="&tid&" and abs(ding)=1 order by htm desc",conn,1,1



for i=1 to rs1.recordcount
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.Open "select * from Users where ID="&rs1("fid"),conn,1,1
newmyjb2=rs2("myjy")
newphoto2=rs2("photo")
newsex2=rs2("sex")
Userkeys5=rs2("keys")
rs2.close
set rs2=Nothing
'====================
If saytk=100 Then
%>  <table border=0 cellSpacing=0 cellPadding=0 width=100% class="mframe">
<tr><td rowspan="2" class="lf"><%

if len(newphoto2)>10 then
Response.write "<img src="""&ubb(newphoto2)&""" alt="".""/><br/>"
else
if newsex2=1 then
Response.write "<img src=""/img/boy.gif"" alt="".""/><br/>"
Else
if newsex2=2 then
Response.write "<img src=""/img/girl.gif"" alt="".""/><br/>"
else
Response.write "<img src=""/img/photo.gif"" alt="".""/><br/>"
end if
end If
end if

End If

'====================

response.write vipshow(rs1("fid"))
response.write"<a href='uinfo.asp?id="&ubb(rs1("fid"))&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"
response.write""&ubb(rs1("fni"))&"(ID:"&ubb(rs1("fid"))&")</a>"

set rs5=server.CreateObject("ADODB.RecordSet")
If datesql=0 then
 rs5.Open "select ID from Users where tjj >= '"&DateAdd("n", lonline, Now())&"' and id="&rs1("fid"),conn,1,1
 Else
 rs5.Open "select ID from Users where DATEDIFF('s', tjj, now())<60*60 and id="&rs1("fid"),conn,1,1
 End if
if not rs5.eof then
response.write "<img src=""/img/on1.gif"" alt='在线'/>"
else
response.write "<img src=""/img/off1.gif"" alt='离线'/>"
end if
rs5.close
set rs5=nothing

if  Userkeys5=1 then
response.write"<img src='"&adminlogo&"' alt='社区管理员'/>"
end If
If saytk=100 then
response.write "<br/>等级:"&getLvl(newmyjb2)&""
response.write " 头衔:"&getHandle(newmyjb2)&"<br/>"
%></td><td class="rw"><%
End If

'=====================
If saytk=100 Then response.write "<div style=""padding: 3px 6px; border-bottom: 1px solid #A9CBEE; height: 18px; line-height: 18px;"">"
response.write "("&rs1("htm")&")"

If saytk=100 Then response.write "</div>"

'=====================
If saytk=100 Then 
%>
<table cellspacing="0" cellpadding="0"><tr><td>
<%End If

If rs1("fydz")<>0 Then
response.write""&ubb(rs1("fydz"))&""
End If
if rs1("biao")<>0 then
Response.Write"<img src=""face/"&rs1("biao")&".gif"" alt='img'/>"
end If
response.write ubb3(rs1("nr"))

If saytk=100 Then
%></td></tr></table></td></tr><tr><td class="rb"><%
End if
If saytk=100 Then response.write "<div class=""fbarb"">"
If saytk=100 Then response.write "<div style='float: right;'>"


'=====================

response.write "<a href='/saytkcom/bbshf/index.asp?ffid="&rs1("fid")&"&amp;id="&rs1("id")&"&amp;k="&k&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;tid="&tid&"&amp;bbsid="&bbsid&"'>回复</a><b>置顶:</b>"
if keys=1 or skey=abs(bbsid) or adminzone=abs(bbsid) or fid=myid then
response.write"<a href='topiczd.asp?ding=1&amp;id="&rs1("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;tid="&tid&"&amp;bbsid="&bbsid&"'>去顶</a>"
end If

If saytk=100 Then
%></div></div></td></tr></table><%
End if
rs1.movenext
response.write "<br/>"
If saytk=100 Then Response.write "</div>"
next
rs1.close
If saytk=100 Then
%></div><div class="clear"></div><%
End If


If Not rs.eof	Then
	Dim PageSize,i
	PageSize=relistnum			
	Dim Count,page,pagecount,gopage			
        gopage="relist.asp?sid=" & sid & "&amp;bbsid=" & bbsid & "&amp;tid=" & tid & "&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	
	
set rs2=server.CreateObject("ADODB.RecordSet")
rs2.Open "select * from Users where ID="&rs("fid"),conn,1,1
newmyjb2=rs2("myjy")
newphoto2=rs2("photo")
newsex2=rs2("sex")
Userkeys5=rs2("keys")
rs2.close
set rs2=Nothing


If saytk=100 Then
%>  <table border=0 cellSpacing=0 cellPadding=0 width=100% class="mframe">
<tr><td rowspan="2" class="lf"><%

if len(newphoto2)>10 then
Response.write "<img src="""&ubb(newphoto2)&""" alt="".""/><br/>"
else
if newsex2=1 then
Response.write "<img src=""/img/boy.gif"" alt="".""/><br/>"
Else
if newsex2=2 then
Response.write "<img src=""/img/girl.gif"" alt="".""/><br/>"
else
Response.write "<img src=""/img/photo.gif"" alt="".""/><br/>"
end if
end If
end if

End If
 response.write vipshow(rs("fid"))
 Response.Write"<a href='uinfo.asp?id="&rs("fid")&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>"&ubb(rs("fni"))&"(ID:"&ubb(rs("fid"))&")</a>"
 

set rs5=server.CreateObject("ADODB.RecordSet")
If datesql=0 then
 rs5.Open "select ID from Users where tjj >= '"&DateAdd("n", lonline, Now())&"' and id="&rs("fid"),conn,1,1
 Else
 rs5.Open "select ID from Users where DATEDIFF('s', tjj, now())<60*60 and id="&rs("fid"),conn,1,1
 End if
if not rs5.eof then
response.write "<img src=""/img/on1.gif"" alt='在线'/>"
else
response.write "<img src=""/img/off1.gif"" alt='离线'/>"
end if
rs5.close
set rs5=nothing

if  Userkeys5=1 then
response.write"<img src='"&adminlogo&"' alt='社区管理员'/>"
end If

If saytk=100 Then
response.write "<br/>等级:"&getLvl(newmyjb2)&""
response.write " 头衔:"&getHandle(newmyjb2)&"<br/>"
%></td><td class="rw"><%
End if

'===========================
If saytk=100 Then response.write "<div style=""padding: 3px 6px; border-bottom: 1px solid #A9CBEE; height: 18px; line-height: 18px;"">"
response.write "("&rs("htm")&")"
If saytk=100 Then response.write "<div style='float: right;'>#"


 'Response.Write"<a href='"&replace(r_url,"@@","&amp;")&"#'>TOP</a>"

If saytk=100 Then
response.write "</div></div>"
%>
<table cellspacing="0" cellpadding="0"><tr><td>
<%End If

if rs("biao")<>0 then
Response.Write"<img src=""face/"&rs("biao")&".gif"" alt='img'/>"
end if
'Response.Write ubb3(rs("nr"))&fordate(rs("htm"))


Response.Write ubb3(rs("nr"))



If saytk=100 Then
%></td></tr></table></td></tr><tr><td class="rb"><%
End if
If saytk=100 Then
response.write "<div class=""fbarb"">"
response.write "<div style='float: right;'>"
End if
response.write "<a href='/saytkcom/bbshf/index.asp?ffid="&rs("fid")&"&amp;id="&rs("id")&"&amp;k="&k&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;tid="&tid&"&amp;bbsid="&bbsid&"'>回复</a>"

if keys=1 or skey=abs(bbsid) or adminzone=abs(bbsid) then
 Response.Write"|<a href='bbsdel.asp?id="&rs("id")&"&amp;tid="&tid&"&amp;&amp;saytk="&saytk&"&amp;bbsid="&bbsid&"&amp;sid="&sid&"'>删除</a>|"
response.write"<a href='topiczd.asp?ding="&tid&"&amp;id="&rs("id")&"&amp;sid="&sid&"&amp;saytk="&saytk&"&amp;tid="&tid&"&amp;bbsid="&bbsid&"'>置顶</a>"
end if
dim newmyjb
set rs1=server.CreateObject("ADODB.RecordSet")
rs1.Open "select myjy from Users where ID="&rs("fid"),conn,1,1
newmyjb=rs1("myjy")
rs1.close
set rs1=nothing


 
Response.Write "<br/>"

If saytk=100 Then
%></div></div></td></tr></table><%
End if
	rs.moveNext
        Count=Count-1
	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
if saytk>1 then
	Response.write "<form name=""form"" method=""post"" action=""bbsresave.asp?tid="&tid&"&amp;ppage="&ppage&"&amp;sid="&sid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&""">"
end if
response.write "<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)
if saytk=>2then
Response.Write "<input name=""reContent"" maxlength=""300"" size=""10"" value=""""/><br/>"
else
response.write "<input type=""text"" name=""reContent"&minute(now)&second(now)&""" title=""输入内容"" value="""" maxlength=""300""/><br/>"
end if
if myid=0 then
response.write"<a href='login.asp?url="&Replace(Replace(R_url(),"sid=","sidoo="),"sid=","sidoo=")&"'>请先登陆</a><br/>"
else
if saytk>1 then

%>

<input type="submit" name="Submit" value="确定回复"></form><br/><%
else
response.write "<anchor>确定回复"
response.write "<go method=""post"" href=""bbsresave.asp?tid="&tid&"&amp;ppage="&ppage&"&amp;sid="&sid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&""">"
response.write "<postfield name=""reContent"" value=""$(reContent"&minute(now)&second(now)&")""/>"
response.write "<postfield name=""face"" value=""$(face)""/>"
response.write "</go></anchor>"
end if
end if
response.write "<br/><a href='file.asp?tid="&tid&"&amp;up=2&amp;bbsid="&bbsid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>图铃</a>"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "-<a href=""topic.asp?tid="&tid&"&amp;sid="&sid&"&amp;saytk="&saytk&""">主帖</a>"
response.write "-<a href='board.asp?bbsid="&bbsid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>返回本版</a>"%>
<!--#include file="fanhui.asp"-->
<%call headsay()%>