<!--#include file="Inc.asp"-->
<!--#include file="ydzq.asp"-->
<%
call head()
call saycardd("转移贴子")
dim bbsid,tid,newid
bbsid=request("bbsid")
tid=request("tid")
newid=request("newid")
if bbsid="" or IsNumeric(bbsid)=False then
  Call Error("ID无效！")
  end if
if tid="" or IsNumeric(tid)=False then
  Call Error("ID无效！")
  end if
  if request("Action")="ok" then
if newid="" or IsNumeric(newid)=False then
  Call Error("论坛ID无效！")
  end if

dim sellname
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select bbsid,name,yc from sell where id="&tid,conn,1,2
if rs.eof then
  Call Error("贴子不存在！")
  end if
rs("bbsid")=newid
rs("yc")=0
rs.update
sellname=rs("name")
rs.close
set rs=nothing

response.write "贴子转移成功！<br/>"
response.write "<a href=""/bbs/board.asp?bbsid="&newid&"&amp;saytk="&saytk&"&amp;sid="&sid&""">进入所在论坛</a>"
else
dim bbsname
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select name from ydbbs where id="&bbsid,conn,1,1
if rs.eof then
rs.close
set rs=nothing
  Call Error("论坛ID无效！")
  end if
bbsname=rs("name")
rs.close
set rs=nothing
dim selltitle,selltxt
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select name,txt from sell where id="&tid,conn,1,1
if rs.eof then
rs.close
set rs=nothing
  Call Error("贴子不存在！")
  end if
selltitle=rs("name")
selltxt=rs("txt")
rs.close
set rs=nothing
response.write "主题:"&selltitle&"<br/>"
response.write "内容:"&left(selltxt,300)&"..<br/>"

response.write "贴子现在所在的论坛为["&bbsname&"]<br/>"
response.write "请选择要转移到的版块<br/>"
call xlanlj("adminsellmo.asp?saytk="&saytk&"&amp;sid="&sid&"")
response.write "<select name='newid'><option value='0'>=选择版块=</option>"
set rs=server.createobject("ADODB.Recordset")
rs.open"select id,name,pid from ydbbs where lx=1 order by pid asc",conn,1,1
dim j
j=1
do while not rs.eof
 dim names
names=rs("name")
if len(names)>8 then names=left(names,8)
Response.write "<option value="""&rs("id")&""">"&ubb(names)&"</option>"
j=j+1
rs.movenext
loop
rs.close
set rs=nothing
Response.write "</select><br/>"
if saytk>1 then
call xltjlj("tid",""&tid&"")
call xltjlj("bbsid",""&bbsid&"")
call xltjlj("Action","ok")
call xlanlj1("确定转移")
else
response.write "<br/><anchor>确定转移<go href=""adminsellmo.asp?saytk="&saytk&"&amp;sid="&sid&""" method=""post"">"
response.write "<postfield name=""newid"" value=""$(newid)""/>"
response.write "<postfield name=""tid"" value="""&tid&"""/>"
response.write "<postfield name=""bbsid"" value="""&bbsid&"""/>"
response.write "<postfield name=""Action"" value=""ok""/>"
response.write "</go></anchor>"
end if
end if
response.write"<br/><a href=""adminsell.asp?saytk="&saytk&"&amp;sid="&sid&""">[贴子回收]</a>"
response.write"<br/><a href=""admingsell.asp?saytk="&saytk&"&amp;sid="&sid&""">[贴子管理]</a>"
%><!--#include file="fanhui.asp"-->
<%
call headsay()
%>
