<!-- #include file=../../inc/BBSsetup.asp -->
<!-- #include file=../../inc/Board_Popfun.asp -->
<!-- #include file=../inc/bbsmanage_Fun.asp -->
<!-- #include file=inc/ForumCategory_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 * from LeadBBS_Assort order by AssortID",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
%>
<a href=ForumCategoryJoin.asp>点击这里增加分类</a>
<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">
        <tr bgcolor="#eeeeee" class=TBfour>
          <td width="10%">ID</td>
          <td width="40%">分类名称</td>
        </tr>
	<%
	Dim CountN,TempN
	CountN = Ubound(GBL_GetData,2)
	for TempN=0 to CountN
		Response.Write "        <tr bgcolor=" & DEF_BBS_LightColor & " class=TBBG9>" & VbCrLf
		Response.Write "          <td>"
		Response.Write GBL_GetData(0,TempN) & "</td>" & VbCrLf
		Response.Write "          <td>" & GBL_GetData(1,TempN) & " <a href=ForumCategoryModify.asp?GBL_MODIFYID=" & GBL_GetData(0,TempN) & ">修</a> <a href=ForumCategoryDelete.asp?GBL_DELETEID=" & GBL_GetData(0,TempN) & ">删</a></td>" & VbCrLf
		Response.Write "        </tr>" & VbCrLf
	next
	%>
      </table>
    </td>
  </tr>
</table>

    </td>
  </tr>
</table>
    
<%
	End If

End Function%>