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

<%
call head()

Call saycarda("专题")


dim id,bbsid,Action,newid
id=trim(request.querystring("id"))
newid=trim(request.form("newid"))
Action=trim(request.form("Action"))
if id="" or IsNumeric(id)=False then
  Call Error("ID无效！")
  end if
  bbsid=trim(request.querystring("bbsid"))
if bbsid="" or IsNumeric(bbsid)=False then
  Call Error("ID无效！")
  end if
  if keys=1 or skey=abs(bbsid) or keys=2 or adminzone=abs(bbsid) then
else
Call Error("权限不足!")
End if
  
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select id from sell where bbsid="&bbsid&" and id="&id,conn,1,1
if rs.eof then
  Call Error("贴子不存在！")
  end if
rs.close
set rs=nothing
if Action="ok" then

if newid="" or IsNumeric(newid)=False then
  Call Error("ID无效！")
  end if
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select id,ztid from sell where bbsid="&bbsid&" and id="&id,conn,1,2
if rs.eof then
  Call Error("贴子不存在！")
  end if
  rs("ztid")=newid
  rs.update
rs.close
set rs=nothing
response.write "移动专题成功!<br/>"
Response.write "<br/><a href=""ztlist.asp?id="&newid&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">进入专题</a>"
ELSE
response.write "请选择要移动到的专题<br/>"
set rs=server.createobject("ADODB.Recordset")
rs.open"select id,title from bbszt where bbsid="&bbsid&" order by pid asc",conn,1,1
if rs.eof then
  Call Error("该论坛还没有添加专题！")
  end if
  call xlanlj("ztmove.asp?id="&id&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&"")
response.write "<select name='newid'><option value='0'>=选择专题=</option>"
dim j
j=1
do while not rs.eof
Response.write "<option value="""&rs("id")&""">"&ubb(rs("title"))&"</option>"
j=j+1
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.write "</select>"
if saytk>1 then
call xltjlj("action","ok")
call xlanlj1("确定转移")
else
response.write "<br/><anchor>确定转移<go href=""ztmove.asp?id="&id&"&amp;bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""" method=""post"">"
response.write "<postfield name=""newid"" value=""$(newid)""/>"
response.write "<postfield name=""Action"" value=""ok""/>"
response.write "</go></anchor>"
end if
end if
Response.write "<br/><a href=""topic.asp?tid="&id&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回帖子</a>"
Response.write "<br/><a href=""bbszt.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">本版专题</a>"
Response.write "<br/><a href=""board.asp?bbsid="&bbsid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">返回本版</a>"

Call headsay()%>
