<!-- #include file=../inc/BBSsetup.asp -->
<!-- #include file=../inc/Board_Popfun.asp -->
<!-- #include file=../inc/Limit_Fun.asp -->
<!-- #include file=inc/EBoard_fun.asp -->
<!--#include file="xgcity_community_head.asp" -->
<%
dim BoardID_id,Assort_id
BoardID_id=htmlencode(request("BoardID"))
if isNumeric (""&BoardID_id&"") then
select case ""&BoardID_id&""
	case 100,101,102,103,104,105,106,107,108,109
		Assort_id=1
	case 201,202,203,204,205,206
		Assort_id=2
	case 301,303,304,305
		Assort_id=3		
	case 401,402,403
		Assort_id=4
	case 501,502,503,504,505
		Assort_id=5
	case 601,602,444
		Assort_id=6
end select
end if
%>
<script>
if(self!=top){top.location=self.location;}
function switchSysBar(){
if (switchPoint.innerText==3){
switchPoint.innerText=4
document.all("frmTitle").style.display="none"
}else{
switchPoint.innerText=3
document.all("frmTitle").style.display=""
}}
</script>
<table border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
<tbody>
  <tr>
    <td height="100%" align="left" vAlign="top" noWrap id="frmTitle">
    <iframe frameBorder="0" id="carnoc" name="carnoc" scrolling="no" src="../left.asp?Assort_id=<%=Assort_id%>" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 92px; Z-INDEX: 2">
    </iframe>    </td>
    <td style="WIDTH: 9pt" class=a2>
    <table border="0" cellPadding="0" cellSpacing="0" height="100%">
	<tbody>
      <tr>
        <td style="HEIGHT: 100%" onclick="switchSysBar()" background="../images/left/bg.gif" style=CURSOR:hand; title=开启/关闭左边导航栏>
<font style=COLOR:#ffffff;CURSOR:hand;FONT-FAMILY:Webdings;FONT-SIZE:9pt;>
<SPAN id=switchPoint>3</SPAN></font></td>
      </tr>
	  </tbody>
    </table>
    </td>
    <td align="left" valign="top" style="WIDTH: 100%">
<%
DEF_PubMessageEnable = 1
DEF_BBS_HomeUrl = "../"

Dim EFlag,EString,EUrlString,EID,EName,ENumber,EIndex
ENumber = 0
EIndex = 0
If Request.QueryString("E") = "1" Then
	EFlag = 1
	EString = "专题区"
	EUrlString = "&E=1"
Else
	EFlag = 0
	EString = "精华区"
	EUrlString = ""
End If

Function DisplayBoardMastList(MasterList,Num)

	If MasterList = "" Then
		Response.Write "无"
		Exit function
	ElseIf MasterList = "?LeadBBS?" Then
		Response.Write "全体版主"
		Exit function		
	End If
	Dim temp,n,I
	Temp = split(MasterList,",")
	I = Ubound(temp,1)
	For N = 0 to I
		If N >= Num Then
			'Response.Write "..."
			Exit For
		End If
		Response.Write " <a href=" & DEF_BBS_HomeUrl & "user/LookUserInfo.asp?name=" & urlencode(temp(N)) & ">" & htmlencode(temp(n)) & "</a>"
	Next

	If N >= Num and N <= I Then
		Response.Write "<span style=""cursor:hand"" title=""更多版主: " & temp(N)
		N = N + 1
		For N = N to I
			Response.Write " " & temp(N)
		Next
		Response.Write """>...</span>"
	End If

End Function

Function LoginAccuessFul

	GBL_CHK_TempStr = ""
	If GBL_board_ID = 0 Then
		Response.Write "<table width=" & DEF_BBS_ScreenWidth & " class=TBBG9 align=center>&nbsp;社区不存在此版面，请重新选择或需要添加新社区。</td></tr></table>" & VbCrLf
		Exit Function
	End If
	If GBL_CHK_TempStr<>"" then
		Response.Write GBL_CHK_TempStr
	Else
		DisplayAnnouncesSplitPages
	End If

End Function

Sub Main

	GBL_CHK_PWdFlag = 0
	GBL_CHK_GuestFlag = 0
	initDatabase

	EID = Left(Request.QueryString("EID"),14)
	If isNumeric(EID) = 0 Then EID = 0
	EID = Fix(cCur(EID))
	If EID < 1 Then EID = 0
	If EID > 0 Then EName = GetEName(EID)
	If EName = "" Then EID = 0
	If EID > 0 Then EString = "<a href=EBoard.asp?BoardID=" & GBL_Board_ID & "&E=1><span class=NavColor>专题区</span></a> &gt;&gt; " & EName

	CheckisBoardMaster
	GBL_CHK_TempStr = ""
	BBS_SiteHead DEF_SiteNameString & " " & DEF_BBS_Name,GBL_board_ID," &gt;&gt; " & EString
	UpdateOnlineUserAtInfo GBL_board_ID,GBL_Board_BoardName & "→" & EString
	CheckAccessLimit

	If GBL_CHK_TempStr = "" Then
		UpdateOnlineUserAtInfo GBL_board_ID,GBL_Board_BoardName
	%>
	<table width=<%=DEF_BBS_ScreenWidth%> border=0 cellspacing=1 cellpadding=0 align="center" bgcolor=<%=DEF_BBS_DarkColor%> class=<%If GBL_TableHeadString = "" Then
		Response.Write "TBone"
	Else
		Response.Write "TBthree"
	End If%>><tr><td>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<!--<tr bgcolor=<%=DEF_BBS_Color%> class=TBthree><td colspan=2><img src=<%=DEF_BBS_HomeUrl%>images/null.gif width=2 height=2></td></tr> -->
	<tr bgcolor=<%=DEF_BBS_Color%> class=TBthree>
		<td height=25><%If GBL_TableHeadString = "" Then Response.Write "&nbsp;"%><a href=../Announce/Announce2.asp?BoardID=<%=GBL_board_ID%>><img src=../images/<%=GBL_DefineImage%>newanc.gif width=60 height=17 border=0 align=absmiddle alt=新帖></a>
			<a href=../Announce/Announce2.asp?BoardID=<%=GBL_board_ID%>&VoteFlag=yes><img src=../images/<%=GBL_DefineImage%>newpoll.gif width=60 height=17 border=0 align=absmiddle alt=新投票></a>
			<a href=Board.asp?BoardID=<%=GBL_board_ID%>>讨论区</a>
			<%If DEF_EnableTreeView = 1 Then Response.Write " <a href=Board2.asp?BoardID=" & GBL_board_ID & ">树型版面</a>"
			If EFlag = 1 Then
				If GBL_Board_GoodNum > 0 Then Response.Write "<a href=EBoard.asp?BoardID=" & GBL_board_ID & ">精华区</a>"
				Response.Write " <font color=gray class=GrayFont>专题区</font>"
			Else
				Response.Write " <font color=gray class=GrayFont>精华区</font>"
				If isArray(Application(DEF_MasterCookies & "BoardInfo" & GBL_Board_ID & "_TI")) Then Response.Write " <a href=EBoard.asp?BoardID=" & GBL_board_ID & "&E=1>专题区</a>"
			End If%></a>
		</td>
		<td align=right>
			&nbsp;版主：<%DisplayBoardMastList GBL_Board_MasterList,5 %>&nbsp;
		</td>
	</tr>
	</table>
	</td></tr></table>
	<img src=../images/blank.gif width=2 height=2><br>
			<%
			If EFlag = 1 Then DisplayTopicAssort
			LoginAccuessFul
	Else
		%>
	<br>
	<table width="<%=DEF_BBS_ScreenWidth%>" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td>
			<font color=ff0000 class=RedFont><b><%=GBL_CHK_TempStr%></b></font>[<a href=../User/help/help.asp#lmt>说明</a>]</td>
	</tr>
	</table>
	<%
	End If
	closeDataBase
	If GBL_CHK_TempStr <> "" Then
		Response.Write "<hr size=1 align=center width=" & DEF_BBS_ScreenWidth & " class=TBtwofont>"
		If GBL_ShowBottomSure = 0 Then GBL_SiteBottomString = ""
	End If
	SiteBottom
	If GBL_SiteBottomString <> "" Then Response.Write GBL_SiteBottomString

End Sub

Sub DisplayTopicAssort

	Dim TArray,N,Num
	TArray = Application(DEF_MasterCookies & "BoardInfo" & GBL_Board_ID & "_TI")
	If isArray(TArray) = False Then Exit Sub
	Num = Ubound(TArray,2)
	If GBL_TableHeadString <> "" Then%><table width=<%=DEF_BBS_ScreenWidth%> border=0 cellspacing=0 cellpadding=0 align=center><tr><td><%=GBL_TableHeadString%></td></tr></table><%End If%>
	<table width="<%=DEF_BBS_ScreenWidth%>" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="<%=DEF_BBS_DarkColor%>" class=TBone>
	<tr><td>
	<table width="100%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="<%=DEF_BBS_LightColor%>" class=TBBG1>
	<%For N = 0 To Num
		Response.Write "<tr height=20 bgcolor=" & DEF_BBS_LightestColor & " class=TBBG9 height=25>" & VbCrLf
		Response.Write "<td width=25% >&nbsp;<a href=EBoard.asp?BoardID=" & GBL_Board_ID & "&E=1&EID=" & TArray(0,N) & "><img src=../images/folder.gif width=16 height=16 align=absmiddle border=0>" & TArray(1,N) & "</a></td>" & VbCrLf
		N = N + 1
		If N <= Num Then
			Response.Write "<td width=25% >&nbsp;<a href=EBoard.asp?BoardID=" & GBL_Board_ID & "&E=1&EID=" & TArray(0,N) & "><img src=../images/folder.gif width=16 height=16 align=absmiddle border=0>" & TArray(1,N) & "</a></td>" & VbCrLf
		Else
			Response.Write "<td width=25% > &nbsp;</td>" & VbCrLf
		End If
		N = N + 1
		If N <= Num Then
			Response.Write "<td width=25% >&nbsp;<a href=EBoard.asp?BoardID=" & GBL_Board_ID & "&E=1&EID=" & TArray(0,N) & "><img src=../images/folder.gif width=16 height=16 align=absmiddle border=0>" & TArray(1,N) & "</a></td>" & VbCrLf
		Else
			Response.Write "<td width=25% > &nbsp;</td>" & VbCrLf
		End If
		N = N + 1
		If N <= Num Then
			Response.Write "<td width=25% >&nbsp;<a href=EBoard.asp?BoardID=" & GBL_Board_ID & "&E=1&EID=" & TArray(0,N) & "><img src=../images/folder.gif width=16 height=16 align=absmiddle border=0>" & TArray(1,N) & "</a></td>" & VbCrLf
		Else
			Response.Write "<td width=25% > &nbsp;</td>" & VbCrLf
		End If
		Response.Write "</tr>" & VbCrLf
	Next%>
	</td></tr></table>
	</table>
	<%If GBL_TableBottomString <> "" Then
		%><table width=<%=DEF_BBS_ScreenWidth%> border=0 cellspacing=0 cellpadding=0 align=center><tr><td><%=GBL_TableBottomString%></td></tr></table><%
	End If%>
	<img src=../images/blank.gif width=2 height=2><br>
	<%

End Sub

Function GetEName(ID)

	Dim TArray,N,Num
	TArray = Application(DEF_MasterCookies & "BoardInfo" & GBL_Board_ID & "_TI")
	If isArray(TArray) = False Then
		ReloadTopicAssort(GBL_Board_ID)
		Exit Function
	End If
	Num = Ubound(TArray,2)
	For N = 0 To Num
		If ID = cCur(TArray(0,N)) Then
			EIndex = N
			EName = TArray(1,n)
			GetEName = EName
			ENumber = cCur(TArray(2,n))
			Exit For
		End If
	Next

End Function

Sub ReloadTopicAssort(BoardID)

	Dim Rs
	Set Rs = Con.ExeCute("select ID,AssortName,0,0,0 from LeadBBS_GoodAssort where BoardID=" & BoardID & " Order by BoardID,OrderID")
	If Not Rs.Eof Then
		Application.Lock
		Application(DEF_MasterCookies & "BoardInfo" & BoardID & "_TI") = Rs.GetRows(-1)
		Application.UnLock
	Else
		Application.Lock
		Set Application(DEF_MasterCookies & "BoardInfo" & BoardID & "_TI") = Nothing
		Application(DEF_MasterCookies & "BoardInfo" & BoardID & "_TI") = "yes"
		Application.UnLock
	End If
	Rs.Close
	Set Rs = Nothing

End Sub

Main
%>
 </td>
  </tr>
  </tbody>
</table>
<script>
if(window.screen.width<'1024'){switchSysBar()}
</script>
<!--#include file="../stat.asp" -->
