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

📄 adminthread.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 Board_ID,thread_title,postuserid From JBB_thread where threadID="&threadID)
	if Not rs.eof then
		BoardID = rs("Board_ID")
		Board_info BoardID
		Board_Config = Application(JBBMasterCookies&"Board_Config"&BoardID)
		if Board_Config(6)=true then styleid = Board_Config(5)
		title = Board_Config(2)
		bestCent = Board_Config(16)
		thread_title = rtrim(rs("thread_title"))
		postuserid = trim(rs("postuserid"))
	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 &""">"& title &"</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
	adminthread = true
elseif usergroup = 2 then
	set rs = Conn.ExeCute("select Mod_nameID from JBB_Mod where Mod_nameID="&userid &" and Mod_stop=0")
	if Not rs.eof then
		adminthread = true
	End if
	set rs = nothing
elseif usergroup = 3 then	
	set rs = Conn.ExeCute("select Mod_nameID from JBB_Mod where Mod_nameID="&userid &" and Mod_stop=0 and Mod_BoardID="&BoardID)
	if Not rs.eof then
		adminthread = true
	End if
	set rs = nothing
End if
'-------------------------------------
if user_group(14)=True and userid=postuserid then closepost = true
'response.Write(userid&"_"&postuserid&"_"&usergroup)
'----------------------------------------------
function adminerror()
	ShowMsg "您没有权限执行此操作或者您还没有登录.请点击 <a href=""javascript:history.back()"">这里</a> 返回"
	Call Bottom()
	response.end
End function
'---------------------------------------------
action = trim(request.QueryString("action"))
select case action
	case "close"
		if adminthread = true or closepost = true then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select openpost from JBB_thread where threadid="&threadid,conn,1,3
			if not rs.eof then
				if rs("openpost") then
					Conn.ExeCute("update JBB_thread set openpost=0 where threadID="&threadid)
					backtext = "该主题成功关闭"
				else
					Conn.ExeCute("update JBB_thread set openpost=1 where threadID="&threadid)
					backtext = "该主题成功打开"				
				End if
			end if
			rs.close
			set rs = nothing
		else
			adminerror()
		End if
	case "best"
		if adminthread = true then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select bestpost from JBB_thread where threadid="&threadid,conn,1,1
			if not rs.eof then
				if rs("bestpost") then
					Conn.ExeCute("update JBB_thread set bestpost=0 where threadID="&threadid)
					backtext = "该主题成功取消精华"
				else
					Conn.ExeCute("update JBB_thread set bestpost=1 where threadID="&threadid)
					backtext = "该主题成功设置精华"
					Conn.ExeCute("update JBB_user set Cent=Cent+"& bestCent &" where userid = "&postuserid)				
				End if
			end if
			rs.close
			set rs = nothing
		else
			adminerror()
		End if		
	case "top"
		if adminthread = true then
			set rs = server.CreateObject("adodb.recordset")
			rs.open "select toppost from JBB_thread where threadid="&threadid,conn,1,1
			if not rs.eof then
				if rs("toppost") then
					Conn.ExeCute("update JBB_thread set toppost=0,displayorder=0 where threadID="&threadid)
					backtext = "该主题成功取消置顶"
				else
					Conn.ExeCute("update JBB_thread set toppost=1,displayorder=1 where threadID="&threadid)
					backtext = "该主题成功置顶"
				End if
			end if
			rs.close
			set rs = nothing
		else
			adminerror()
		End if		
	case else
		response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='0; URL="&BBSHomeUrl&"'>")
		response.End()
End select
ShowMsg backtext&",正在返回该主题,如果您不想等待,请点击 <a href=""showthread.asp?threadID="& threadID &""">这里</a>,<br>如果您想返回主题列表,请点击 <a href=""Board.asp?BoardID="& BoardID &""">这里</a>"
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='2; URL=showthread.asp?threadID="& threadID &"'>")
'-----------------------------------------------------------------
Call Bottom()
%>

⌨️ 快捷键说明

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