⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 movethread.asp

📁 BBS论坛的开发和设计
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="admin/BBSConfig.asp"-->
<!--#include file="INC/online.asp"-->
<!--#include file="INC/ShowMsg.asp"-->
<!--#include file="INC/header.asp"-->
<!--#include file="INC/Board_Config.asp"-->
<%
'****************************************************************
'*  joinboard BBS Ver2.3.0/友盟论坛 Ver2.3.0
'*
'*  版权所有: JoinBoard V2.3
'*
'*  程序制作: 友盟工作室
'*           
'*  主页地址: http://joinboard.com    友盟论坛
'*
'*  论坛地址: http://bbs.joinboard.com/、http://youmeng.com
'*	                 
'****************************************************************
'*  Powered by: JoinBoard V2.3
'* Copyright 2003-2004.  - All Rights Reserved.
'*  JoinBoard is a trademark of YouMeng Studio.
'****************************************************************

threadid = trim(request.QueryString("threadid"))
if Not(IsNumeric(threadid)) or threadid = "0" then
	response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='0; URL="&BBSHomeUrl&"'>")
	response.End()
End if
	set rs = Conn.ExeCute("select thread_title,pollid,postuserid,Board_ID From JBB_thread where threadID="&threadID)
	if Not rs.eof then
		thread_title = rtrim(rs("thread_title"))
		pollid = trim(rs("pollid"))
		postuserid = trim(rs("postuserid"))
		BoardID = rs("Board_ID")
		Board_info BoardID
		Board_Config = Application(JBBMasterCookies&"Board_Config"&BoardID)
		title = Board_Config(2)
		if Board_Config(6)=true then styleid = Board_Config(5)
	else
%>
		<!--#include file="INC/style.asp"-->
<%
		set rs = Nothing
		response.Write("<html><head><title>"& BBS_Config(0) &" - 错误信息"&"</title><link href="&Css_path&" rel=""stylesheet"" type=""text/css""></head><body  leftmargin=""0"" topmargin=""0"">")
		Call top()
		ShowMsg "该文章不存在或者已经删除!~请点击 <a href=""javascript:history.back()"">这里</a> 返回"
		Call bottom()
		response.End()		
	End if
	set rs = Nothing
%>
<!--#include file="INC/style.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="joinboard,forum,bbs,youmeng,友盟论坛">
<title><%=BBS_Config(0)&" - 移动主题:"&thread_title%></title>
<link href="<%=Css_path%>" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_callJS(jsStr) { //V2.3
  return eval(jsStr)
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0">
<%
Call onlineuser()
call top()

response.Write "<table border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"" class=""path-table"">"
response.Write "<tr><td>"
response.Write "<img src="""& BBS_Skin(3) &"JBB_bullet.gif"">&nbsp;<a href="""&BBSHomeUrl&""">"& BBS_Config(0) &"</a>&nbsp;<img src="""& BBS_Skin(3) &"JBB_bullet.gif"">&nbsp;<a href=""board.asp?BoardID="& BoardID &""">"& Board_Config(2) &"</a>&nbsp;<img src="""& BBS_Skin(3) &"JBB_bullet.gif"">&nbsp;移动主题:<a href=""showthread.asp?threadID="& threadID &"""><strong>"& thread_title &"</strong></a>"
response.Write "</td></tr></table>"

if usergroup = 1 then
	Movepost = true
elseif usergroup = 2 then
	set rs = Conn.ExeCute("select Mod_stop from JBB_Mod where Mod_nameID="&userid &" and Mod_stop=0")
	if Not rs.eof then
		Movepost = true
	End if
	set rs = nothing
elseif usergroup = 3 then	
	set rs = Conn.ExeCute("select Mod_BoardID from JBB_Mod where Mod_nameID="&userid &" and Mod_stop=0 and Mod_BoardID="&BoardID)
	if Not rs.eof then
		Movepost = true
	End if
	set rs = nothing
End if
'----------------------------------------------------------------------
if user_group(13)=True and userid=postuserid then movepost = true
'-----------------------------------------------------------------------
if Movepost <> true then
	ShowMsg "您没有权限移动此贴子或者您还没有登录.请点击 <a href=""javascript:history.back()"">这里</a> 返回"
	Call Bottom()
	response.End()
End if
'----------------------------------------------
action = trim(request.QueryString("action"))
if action = "move" then
	moveR = trim(request.Form("moveR"))
	newBoard = trim(request.Form("newBoard"))
	if newBoard = "0" Or Not(ISNumeric(newBoard)) then
		ShowMsg "请选择一个目标论坛,点击 <a href=""javascript:history.back()"">这里</a> 返回输入."
	elseif moveR = "" then
		ShowMsg "请输入您移动贴子理由,点击 <a href=""javascript:history.back()"">这里</a> 返回输入."
	else
		if trim(request.Form("sign")) = "yes" then
			set rs = server.CreateObject("adodb.recordset")
			sql = "select * from JBB_thread where threadID="&threadID
			rs.open sql,conn,1,1
			if Not(rs.Eof and rs.Bof) then
				set rs1 = server.CreateObject("adodb.recordset")
				sql1 = "select * from JBB_thread"
				rs1.open sql1,conn,1,3
				rs1.addnew
					rs1("thread_title") = "移动:"&rs("thread_title")
					rs1("Board_ID") = rs("Board_ID")
					rs1("posttime") = rs("posttime")
					rs1("pollid") = rs("pollid")
					rs1("displayorder") = rs("displayorder")
					rs1("openpost") = rs("openpost")
					rs1("bestpost") = rs("bestpost")
					rs1("toppost") = 0
					rs1("replycount") = rs("replycount")
					rs1("viewcount") = rs("viewcount")
					rs1("postuserid") = rs("postuserid")
					rs1("postusername") = rs("postusername")
					rs1("lastpost") = rs("lastpost")
					rs1("lastposterid") = rs("lastposterid")
					rs1("lastposter") = rs("lastposter")
					rs1("moveid") = threadid
					rs1("icons") = rs("icons")
				rs1.update
				rs1.close
				set rs1=nothing
			End if
			rs.close
			set rs = nothing
		End if
		Conn.ExeCute("update JBB_thread set Board_ID = "& newBoard &" where threadID="&threadID)
		Conn.ExeCute("update JBB_post set Board_ID = "& newBoard &" where threadID="&threadID)
		Conn.ExeCute("insert into JBB_log(userid,username,reason,logC,logtime,logIP) values("& userid &",'"& username &"','"& MoveR &"','移动主题:"& thread_title &"','"& Now() &"','"& userip &"')")
		ShowMsg "移动主题完毕,系统正在返回主题列表,如果您不想等待,请点击 <a href=""Board.asp?BoardID="& BoardID &""">这里</a>."
		response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='2; URL=Board.asp?BoardID="& BoardID &"'>")
		
	End if
else
%>
<form name="form1" method="post" action="?action=move&threadid=<%=threadid%>">
  <table width="355" border="0" align="center" cellpadding="5" cellspacing="1">
    <tr> 
      <td colspan="2"> <div align="center">以下操作将记录入论坛日志,请输入您移动此主题理由!</div></td>
    </tr>
    <tr> 
      <td width="94"><div align="right"><font color="#FF0000">*</font>移动理由:</div></td>
      <td width="238"> <input name="moveR" type="text" id="moveR" size="30" maxlength="50"> 
      </td>
    </tr>
    <tr>
      <td><div align="right"><font color="#FF0000">*</font>选择目标论坛:</div></td>
      <td><select name="newBoard" id="newBoard">
          <option value="0">选择一个目标论坛</option>
	  		<%
			set rs = server.CreateObject("adodb.recordset")
			sql = "select JBB_Class.Class_name,JBB_Class.Class_ID,JBB_Board.BoardID,JBB_Board.title From JBB_board left join JBB_Class on (JBB_Board.ClassID = JBB_Class.Class_ID) order By JBB_Class.Class_order,JBB_Board.Boardorder asc"
			rs.open sql,conn,1,1
			if Not(rs.Bof and rs.Eof) then
				id = 0
				for board = 1 to rs.recordCount
				if id <> rs("Class_id") then
         			response.Write"<option value=""0"">==="&rtrim(rs("Class_name"))&"===</option>"
					id = rs("Class_id")
				End if
				response.Write"<option value="""& trim(rs("BoardID")) &""">  "&rtrim(rs("title"))&"</option>"
				rs.MoveNext
				Next
			End if
			rs.Close
			set rs = Nothing
			%>
        </select></td>
    </tr>
    <tr> 
      <td><div align="right">选项:</div></td>
      <td><input name="sign" type="checkbox" id="sign" value="yes">
        在原论坛标记? </td>
    </tr>
    <tr> 
      <td>&nbsp;</td>
      <td> <input type="submit" name="Submit" value="确定移动"> &nbsp; <input name="Submit2" type="button" onClick="MM_callJS('history.back()')" value="返回"> 
      </td>
    </tr>
  </table>
</form>
<br>
<br>
<%
End if
Call Bottom()
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -