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

<%

Call head()

dim TP,ids,Action,tid,bbsid,tzname,id,ding
Action=Request.QueryString("Action")
tid=usb(request("tid"))
id=usb(request("id"))
ding=request("ding")
bbsid=usb(request("bbsid"))
TP=usb(request("TP"))

if TP<>"" then
if id="" or Isnumeric(id)=False then
  Call Error("<card title=""出错了""><p>ID无效！")
  end if
if tid="" or Isnumeric(tid)=False then
  Call Error("<card title=""出错了""><p>ID无效！")
  end if
  if bbsid="" or Isnumeric(bbsid)=False then
  Call Error("<card title=""出错了""><p>ID无效！")
 end if

rs.close


dim fid
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select fid from [relist] where id="&id,conn,1,1
if rs.eof then
  Call Error("<card title=""出错了""><p>不存在的回复！")
  end if
fid=rs("fid")

rs.close

Call cardz3("回复置顶","topic.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;sid="&sid&"&amp;saytk="&saytk&"")
rs.open "select [ding] from [relist] where id="&id,conn,1,2
rs("ding")=0
rs.update
rs.close
Response.Write "成功去顶！正在返回.."
 Response.Write "<br/><a href='topic.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>查看主帖</a>"

else

Call saycardd("回复置顶")
 Response.Write "确认去顶该回复？<br/>"
 Response.Write "<a href='topicnozd.asp?ding=1&amp;id="&id&"&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;sid="&sid&"&amp;TP=1&amp;saytk="&saytk&"'>是的</a><br/>"
 Response.Write "<a href='topic.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;sid="&sid&"&amp;saytk="&saytk&"'>取消</a>"

end if

call head1()

%>