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

📄 adminboard.asp

📁 程序网络论坛HigroupBBS v4.00 默认管理员帐号密码都是Marcos
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312">
<title>系统版块管理</title>
<!--#include file="MarcosCB.asp"-->
<style>
<%=skinCss%>
</style>
<%
	getConn()
	dim i,boardId,maxOrder,topBoardId,fromBoardId,toBoardId
	dim url,theAct,boardName,boardManagerList,boardDescription,theOrder,byOrder,topBoardName

	isIn()
	isAdmin()

	topBoardId=getPost("topBoardId")
	if topBoardId="" then topBoardId=0
	if topBoardId=0 then
		byOrder="bigOrder"
	 else
		byOrder="smallOrder"
	end if

	theAct=getPost("theAct")
	boardId=getPost("boardId")
	boardName=getPost("boardName")
	toBoardId=getPost("toBoardId")
	fromBoardId=getPost("fromBoardId")
	boardDescription=getPost("boardDescription")
	boardManagerList=getPost("boardManagerList")
	theOrder=getPost(byOrder)
	
	if topBoardId<>0 then
		sql="select boardName from Marcos_Board where boardId=" & topBoardId
		set rs_sys=conn.execute(sql)
		topBoardName=" (在"&rs_sys(0)&"中)<a href=adminBoard.asp>返回上级</a>"
	end if

	main()

	select case theAct
		case "update"
			for i=1 to request.form("boardId").count
				sql="select boardName,boardManagerList,"&byOrder&" from Marcos_Board where boardId=" & request.form("boardId")(i)
				rs.open sql,conn,1,3
				rs(0)=request.form("boardName")(i)
				rs(1)=getAvilableUser(request.form("boardManagerList")(i))
				rs(2)=request.form(byOrder)(i)
				rs.update
				rs.close
			next
			delPageIndex()
			locate("adminBoard.asp?topBoardId=" & topBoardId)
		case "new"
			sql="Marcos_Board"
			rs.open sql,conn,1,3
			rs.addnew
				rs("boardName")=boardName
				rs("topBoardId")=topBoardId
				rs("boardManagerList")=getAvilableUser(boardManagerList)
				rs("boardDescription")=boardDescription
				rs(byOrder)=theOrder
			rs.update
			rs.close
			delPageIndex()
			locate("adminBoard.asp?topBoardId=" & topBoardId)
		case "del"
			if topBoardId=0 then
				sql="select boardId from Marcos_Board where topBoardId=" & boardId
				set rs_sys=conn.execute(sql)
				do until rs_sys.eof
					sql="delete from Marcos_Reply where topicId in(select topicId from Marcos_Topic where boardId="&rs_sys(0)&")"
					conn.execute(sql)
					sql="delete from Marcos_Topic where boardId=" & rs_sys(0)
					conn.execute(sql)
					rs_sys.movenext
				loop
				sql="delete from Marcos_Board where topBoardId=" & boardId
				conn.execute(sql)
				sql="update Marcos_Board set bigOrder=bigOrder-1 where bigOrder>(select bigOrder from Marcos_Board where boardId=" & boardId & ")"
				conn.execute(sql)
				sql="delete from Marcos_Board where boardId=" & boardId
				conn.execute(sql)
			 else
				sql="delete from Marcos_Reply where topicId in(select topicId from Marcos_Topic where boardId=" & boardId & ")"
				conn.execute(sql)
				sql="delete from Marcos_Topic where boardId=" & boardId
				conn.execute(sql)
				sql="update Marcos_Board set smallOrder=smallOrder-1 where topBoardId=" & topBoardId & _
					" and smallOrder>(select smallOrder from Marcos_Board where boardId=" & boardId & ")"
				conn.execute(sql)
				sql="delete from Marcos_Board where boardId=" & boardId
				conn.execute(sql)
			end if
			delPageIndex()
			locate("adminBoard.asp?topBoardId=" & topBoardId)
		case "modify"
			sql="select boardName,boardManagerList,boardDescription from Marcos_Board where boardId=" & boardId
			rs.open sql,conn,1,3
			rs(0)=boardName
			rs(1)=getAvilableUser(boardManagerList)
			rs(2)=boardDescription
			rs.update
			rs.close
			if getPost("topBoardIdE")<>topBoardId then
				sql="update Marcos_Board set smallOrder=smallOrder-1 where topBoardId=" & topBoardId & _
					" and smallOrder>(select smallOrder from Marcos_Board where boardId=" & boardId & ")"
				conn.execute(sql)
				sql="select max(smallOrder) from Marcos_Board where topBoardId=" & getPost("topBoardIdE")
				set rs_sys=conn.execute(sql)
				maxOrder=rs_sys(0)
				if not isNumeric(maxOrder) then
					maxOrder=0
				end if
				sql="update Marcos_Board set smallOrder=" & maxOrder & "+1,topBoardId=" & getPost("topBoardIdE") & " where boardId=" & boardId
				conn.execute(sql)
				topBoardId=getPost("topBoardIdE")
			end if
			url="adminBoard.asp?theAct=edit&topBoardId=" & topBoardId & "&boardId=" & boardId
			echo "<script language=javascript>alert('修改成功!');location.href='" & url & "';</script>"
			delPageIndex()
			closeConn()
			response.end
		case "combin"
			dim fromBoardIdE,toBoardIdE
			if not (isNumeric(fromBoardId) and isNumeric(toBoardId)) then
				echo "<script>alert('对不起,两个操作ID都只可能是数字!');history.back();</script>"
				response.end
			end if
			sql="select topBoardId from Marcos_Board where boardId=" & fromBoardId
			set rs_sys=conn.execute(sql)
			if rs_sys.eof then
				echo "<script>alert('对不起,操作ID为" & fromBoardId & "的版块不存在!');history.back();</script>"
				closeConn()
				response.end
			 else
				fromBoardIdE=rs_sys(0)
			end if
			sql="select topBoardId from Marcos_Board where boardId=" & toBoardId
			set rs_sys=conn.execute(sql)
			if rs_sys.eof then
				echo "<script>alert('对不起,操作ID为" & toBoardId & "的版块不存在!');history.back();</script>"
				closeConn()
				response.end
			 else
				toBoardIdE=rs_sys(0)
			end if

			if toBoardIdE=0 and fromBoardIdE=0 then
				sql="select max(smallOrder) from Marcos_Board where topBoardId=" & toBoardId
				set rs_sys=conn.execute(sql)
				maxOrder=rs_sys(0)
				if not isNumeric(maxOrder) then maxOrder=0
				sql="update Marcos_Board set smallOrder=" & maxOrder & "+1 where topBoardId=" & toBoardId
				conn.execute(sql)				
				sql="update Marcos_Board set topBoardId=" & toBoardId & " where topBoardId=" & fromBoardId
				conn.execute(sql)
				sql="delete from Marcos_Board where boardId=" & fromBoardId
				conn.execute(sql)
			 else
				if toBoardIdE<>0 and fromBoardIdE<>0 then
					dim topicNum,replyNum
					sql="select count(topicId) from Marcos_Topic where boardId=" & fromBoardId
					set rs_sys=conn.execute(sql)
					topicNum=rs_sys(0)
					sql="select count(replyId) from Marcos_Reply where topicId in(select topicId from Marcos_Topic where boardId=" & fromBoardId & ")"
					set rs_sys=conn.execute(sql)
					replyNum=rs_sys(0)
					sql="update Marcos_Topic set boardId=" & toBoardId & " where boardId=" & fromBoardId
					conn.execute(sql)
					sql="update Marcos_Board set topicCount=topicCount+" & topicNum & ",replyCount=replyCount+" & replyNum & " where boardId=" & toBoardId
					conn.execute(sql)
					sql="delete from Marcos_Board where boardId=" & fromBoardId
					conn.execute(sql)
				 else
					echo "<script>alert('对不起,该操作只能在同级别分类间进行!');history.back();</script>"
				end if
			end if
			delPageIndex()
			locate "adminBoard.asp"
		case ""
			newBoard()
		case "edit"
			editBoard()
		case "join"
			joinBoard()
	end select
	
	closeConn()
%>
</head>
<body>
<%sub main()%>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="<%=borderColor%>" bgcolor="#FFFFFF">
  <form method="post" onsubmit="this.Submit.disabled=true;">
  <tr align="center"> 
    <td height="25" colspan="5" class="tr">系统版块管理<%=topBoardName%></td>
  </tr>
  <tr align="center" class="td"> 

⌨️ 快捷键说明

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