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


<%call head()
Call saycarda("管理帖子")
dim bbsid,tid
bbsid=request("bbsid")
tid=request("tid")
if tid="" or Isnumeric(tid)=False then
  Call Error("ID无效！")
  end if
if bbsid=0 then
  Call Error("权限不足1！")
  end if
if bbsid="" or Isnumeric(bbsid)=False then
  Call Error("ID无效！")
  end if
if keys<>1 and skey<>abs(bbsid) and adminzone<>abs(bbsid) and keys<>2 then
  Call Error("权限不足2！")
  end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from sell where id=" & tid,conn,1,1
if rs.eof then 
 rs.close
set rs=nothing
  Call Error("不存在的记录！")
  end if

response.write"<a href=""topic.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">回到帖子</a>"
response.write"<br/>---------"
'-----------会员操作权限
if myid=rs("fid") then

response.write"<br/><a href=""editbbs.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;act=1"">续写帖子</a>"
end if

'----------共同权限
if myid=rs("fid") or keys=1 or adminzone=abs(bbsid) or keys=2 then

response.write"<br/><a href=""editbbs.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"&amp;act=2"">编辑帖子</a>"
end if

if myid=rs("fid") or keys=1 or skey=abs(bbsid) or adminzone=abs(bbsid) or keys=2 then

response.write"<br/><a href='bbsdel.asp?Action=t&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>删除帖子</a>"
end if

'-----------版主和管理员操作权限

if keys=1 or skey=abs(bbsid) or adminzone=abs(bbsid) or keys=2 then
dim jjname
if rs("jj")=0 then
jjname="加为精华"
else
jjname="解除精华"
end if

response.write"<br/><a href='bbscase.asp?info=j&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"&jjname&"</a>"

dim ddmame
if rs("num")<>10 then
ddmame="帖子去顶"
else
ddmame="帖子置顶"
end if

response.write"<br/><a href='bbscase.asp?info=d&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"&ddmame&"</a>"

dim ggname
if rs("num")<>20 then
ggname="帖子固底"
else
ggname="帖子解固"
end if
response.write"<br/><a href='bbscase.asp?info=g&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"&ggname&"</a>"

dim stname
if rs("st")=0 then
stname="帖子锁定"
else
stname="帖子解锁"
end if

response.write"<br/><a href='bbscase.asp?info=s&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"&stname&"</a>"


dim topname
if rs("topsell")=0 then
topname="设置滚动"
else
topname="取消滚动"
end if

response.write"<br/><a href='bbscase.asp?info=l&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>"&topname&"</a>"

response.write"<br/><a href='bbsmove.asp?tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>转移帖子</a>"
if rs("ztid")>0 then
response.write"<br/><a href='bbscase.asp?info=z&amp;tid="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>去掉专题</a>"
else
response.write"<br/><a href='ztmove.asp?id="&tid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"'>移到专题</a>"
end if

end if
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"<br/>---------"
%><br/><a href='board.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;bbsid=<%=bbsid%>&amp;page=1'>返回本版</a><!--#include file="fanhui.asp"-->
<%call headsay()%>