<div id="subforum" class="main cl list">
	<div class="titlebar xg2">
		<span class="y">
		<%if {forum.moderators}!=""%>
			分类版主: {forum.moderators}
		<%/if%>
		<img id="category_{forum.fid}_img"  src="{imagedir}/collapsed_no.gif" alt="展开/收起" onclick="toggle_collapse('category_{forum.Fid}');" class="cursor"/>
		</span>
		<h2>子版块</h2>
	</div>
	<div id="category_{forum.fid}"  class="fi" summary="category_{forum.fid}">
	<table cellspacing="0" cellpadding="0">
	<tbody>	
	<%if {forum.colcount}==1%>
		<%loop (IndexPageForumInfo) subforum subforumlist%>
			<tr>
				<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({subforum.fid},0)%>
				<th <%if {config.Shownewposticon}==1 %>class="notopic <%if {subforum.havenew}=="new" %>new<%/if%>"<%/if%>>
					<h2>						
						<%if {subforum.redirect}==""%>
							<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({subforum.fid},0,{subforum.rewritename})%>
							<a href="{forumurl}{aspxrewriteurl}">
						<%else%>
							<a href="{subforum.redirect}" target="_blank">
						<%/if%>
                        <%if {subforum.icon}!=""%>
							<img src="{subforum.icon}" border="0" align="left" hspace="5" alt="{subforum.name}"/>
						<%/if%>
						{subforum.name}</a><%if {subforum.todayposts}>0%><span class="today">(今日:<strong>{subforum.todayposts}</strong>)</span><%/if%>
					</h2>
					<%if {subforum.description}!=""%><p>{subforum.description}</p><%/if%>
					<%if {subforum.moderators}!=""%><p class="moderators">版主:{subforum.moderators}</p><%/if%>
				</th>
				<td class="nums"><em>{subforum.topics}</em> / {subforum.posts}</td>
				<td class="lastpost">
					<%if {subforum.status}==-1%>
						<p>私密论坛</p>
					<%else%>
						<%if {subforum.lasttid}!=0%>
						<p>
							<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({subforum.lasttid},0)%>
							<a href="{forumurl}{aspxrewriteurl}"><%getsubstring({subforum.lasttitle,35,"..."})%></a>
						</p>
						<div class="topicbackwriter">by
							<%if {subforum.lastposter}!=""%>
								<%if {subforum.lastposterid}==-1%>
									游客
								<%else%>
									<%set {aspxrewriteurl} = this.UserInfoAspxRewrite({subforum.lastposterid})%>
									<a href="{forumurl}{aspxrewriteurl}" target="_blank">{subforum.lastposter}</a>
								<%/if%>
							<%else%>
								匿名
							<%/if%>
							<%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({subforum.lasttid},0)%>
                            <%set (string){sublastdatetime} = ForumUtils.ConvertDateTime({subforum.lastpost})%>
						- 	<a href="{forumurl}showtopic.aspx?topicid={subforum.lasttid}&page=end#lastpost" title="{subforum.lasttitle}"><span>{sublastdatetime}</span></a>
						</div>
						<%else%>
							从未
						<%/if%>
					<%/if%>
				</td>
			  </tr>
		<%/loop%>
<%else%>
		<%set (int) {subforumindex}=0%>
		<%set (double){colwidth} = 99.6 / {forum.colcount} %>
		<%loop (IndexPageForumInfo) subforum subforumlist%>		
		<%set {subforumindex}={subforumindex}+1%>
		<%if {subforumindex}==1%>
			<tr>
		<%/if%>
				<th style="width:{colwidth}%;" <%if {config.Shownewposticon}==1 %>class="notopic <%if {subforum.havenew}=="new" %>new<%/if%>"<%/if%>>
				<h2>				
				<%if {forum.redirect}==""%>
					<%set {aspxrewriteurl} = this.ShowForumAspxRewrite({subforum.fid},0,{subforum.rewritename})%>
					<a href="{forumurl}{aspxrewriteurl}">
				<%else%>
					<a href="{subforum.redirect}" target="_blank">
				<%/if%>
                <%if {subforum.icon}!=""%>
					<img src="{subforum.icon}" alt="{subforum.name}" hspace="5" />
				<%/if%>
				{subforum.name}</a>
				<%if {subforum.todayposts}>0%>
				<span class="time">(今日:<strong>{subforum.todayposts}</strong>)</span>
				<%/if%>
				</h2>
				<p>主题:{subforum.topics}, 帖数:{subforum.posts}</p>
				<%if {subforum.status}==-1%>
				<p>私密版块</p>
				<%else%>
					<%if {subforum.lasttid}!=0%>
                        <%set (string){sublastdatetime} = ForumUtils.ConvertDateTime({subforum.lastpost})%>
						<p>最后: <a href="{forumurl}showtopic.aspx?topicid={subforum.lasttid}&page=end#lastpost" title="{subforum.lasttitle}"><span>{sublastdatetime}</span></a> by 
							<%if {subforum.lastposter}!=""%>
								<%if {subforum.lastposterid}==-1%>
									游客
								<%else%>
								   <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({subforum.lastposterid})%>
									<a href="{forumurl}{aspxrewriteurl}" target="_blank">{subforum.lastposter}</a>
								<%/if%>
							<%else%>
								匿名
							<%/if%>
						</p>
					<%/if%>				
				<%/if%>
				 </th>
		<%if {subforumindex}=={forum.colcount}%>
			</tr>
			<%set {subforumindex}=0%>
		<%/if%>
		<%/loop%>
		<%if {subforumindex}!=0%>
			<%repeat("<td>&nbsp;</td>", {forum.colcount}-{subforumindex})%>
			</tr>
		<%/if%>
<%/if%>
	</tbody>
	</table>
	</div>
</div>