<!-- #include file=../../inc/BBSsetup.asp -->
<!-- #include file=../../inc/Board_Popfun.asp -->
<!-- #include file=../inc/bbsmanage_Fun.asp -->
<!-- #include file=inc/ForumBoard_fun.asp -->
<%
DEF_BBS_HomeUrl = "../../"
Dim GBL_ID
initDatabase
GBL_CHK_TempStr = ""
GBL_ID = checkSupervisorPass

SiteHead(DEF_SiteNameString & " - 管理员")
UserTopicTopInfo
DisplayUserNavigate("社区版面管理")%>
<br><br><%If GBL_CHK_Flag=1 Then
	LoginAccuessFul
Else%>
	<table width=96%>
	<tr>
	<td>
	<%
	If Request("submitflag")="" Then
		Response.Write "<br><b>请先登录</b>"
	Else
		Response.Write "<br><p align=left><font color=ff0000 class=RedFont><b>" & GBL_CHK_TempStr & "</b></font>"
	End If
	DisplayLoginForm
	Response.Write "</p>"%>
	</td>
	</tr>
	</table>
<%End If
UserTopicBottomInfo
closeDataBase
SiteBottom
If GBL_ShowBottomSure = 1 Then Response.Write GBL_SiteBottomString

Function LoginAccuessFul

	GBL_CHK_TempStr = ""
	Dim Rs
	Set Rs = Server.CreateObject("ADODB.RecordSet")
	Rs.Open "Select T1.BoardID,T1.BoardAssort,T1.BoardName,T1.OrderID,T2.AssortName,T1.ParentBoard from LeadBBS_Boards as T1 inner join LeadBBS_Assort as T2 on T1.BoardAssort=T2.AssortID order by T1.BoardAssort,T1.ParentBoard,T1.OrderID",con,1,1
	GBL_DBNum = GBL_DBNum + 1
	If Rs.Eof Then
		Response.Write "还没有任何社区，请先添加吧!"
		Rs.Close
		Set Rs = Nothing
		Exit Function
	Else
		GBL_GetData = Rs.GetRows(-1)
		Rs.Close
		Set Rs = Nothing
	End If
	If GBL_CHK_TempStr<>"" then
		Response.Write GBL_CHK_TempStr
	Else
%>
<script language=javascript>
function opw(f,r,id)
{
	window.open(f+'?BoardID=<%=GBL_board_ID%>&'+r+'='+id,'','width=450,height=37,scrollbars=auto,status=yes');
}
</script>
<a href=ForumBoardJoin.asp>点击这里增加社区</a> <br><font color=red class=Redfont>[<u>删除版面全部帖子</u>或<u>合并版面</u>后请<b>重做社区列表及修复</b>以保证社区帖子数量统计正确]</font>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
    <td>
		<table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="<%=DEF_BBS_LightColor%>" class=TBBG1 align=right>
		<tr>
			<td>
				<table width="100%" border="0" cellspacing="1" cellpadding="5" bgcolor="<%=DEF_BBS_LightColor%>" class=TBBG1>
				<tr bgcolor="#eeeeee" class=TBfour>
					<td width="8%">ID</td>
					<td width="62%">社区名称</td>
					<td width="20%">分类</td>
					<td width="10%">顺序</td>
				</tr>
	<%
	Dim CountN,TempN
	CountN = Ubound(GBL_GetData,2)
	Dim Old_Assort
	Old_Assort = 0
	for TempN=0 to CountN
		If cCur(GBL_GetData(1,TempN)) <> Old_Assort Then
			Response.Write "       <tr bgcolor=" & DEF_BBS_LightColor & " class=TBBG1>" & VbCrLf
			Response.Write "          <td colspan=4><a href=../ForumCategory/ForumCategoryModify.asp?GBL_MODIFYID=" & GBL_GetData(1,TempN) & ">" & GBL_GetData(4,TempN) & "</a></td>" & VbCrLf
			Response.Write "       </td></tr>" & VbCrLf
			Old_Assort = cCur(GBL_GetData(1,TempN))
		End If
		Response.Write "        <tr bgcolor=#FFFFFF class=TBBG9>" & VbCrLf
		Response.Write "          <td>"
		Response.Write GBL_GetData(0,TempN) & "</td>" & VbCrLf
		Response.Write "          <td>"
		If cCur(GBL_GetData(5,TempN)) > 0 and cCur(GBL_GetData(5,TempN)) <> cCur(GBL_GetData(0,TempN)) Then Response.Write "<font color=Red class=RedFont title=""子版面"">├</font>"
		Response.Write GBL_GetData(2,TempN) & " <a href=ForumBoardModify.asp?GBL_MODIFYID=" & GBL_GetData(0,TempN) & ">修改</a> <a href=ForumBoardDelete.asp?GBL_DELETEID=" & GBL_GetData(0,TempN) & " title=彻底删除一个无任何发帖的版面>删版面</a>" & VbCrLf
		Response.Write "          <a href='javascript:opw(""ForumBoardDeleteAnnounce.asp"",""DelBoardID""," & GBL_GetData(0,TempN) & ");' title=清空此版面的所有帖子，不减社员国币>删帖子</a>"
		Response.Write "          <a href='javascript:opw(""BoardMoveAnnounce.asp"",""MoveFromBoardID""," & GBL_GetData(0,TempN) & ");' title=合并(转移)此版全部帖子到其它版面>合并</a>"
		Response.write "			</td>"
		Response.Write "          <td><a href=../ForumCategory/ForumCategoryModify.asp?GBL_MODIFYID=" & GBL_GetData(1,TempN) & ">" & GBL_GetData(4,TempN) & "</a></td>" & VbCrLf
		Response.Write "<td>" & GBL_GetData(3,TempN) & "</td>" & VbCrLf
		Response.Write "        </tr>" & VbCrLf
	next
	%>
				</table>
			</td>
		</tr>
		</table>
	</td>
</tr>
</table>
<%
	End If

End Function%>