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

📄 index.jsp

📁 论坛系统EasyJForum 是一个基于 Java 技术的免费社区论坛软件系统
💻 JSP
📖 第 1 页 / 共 2 页
字号:
		for (int i=0; i<sections.size(); i++)	
		{
			aSection = (SectionVO)sections.get(i);
			if (currentSection != null)
			{
				if (aSection != currentSection) continue;
			}
			if (aSection.boardList == null) continue;
%>
<DIV class="mainbox forumlist">
	<SPAN class=headactions><IMG id=section_<%= i %>_img title="收起/展开" onClick="toggle_collapse('section_<%= i %>');"
		alt="收起/展开" src="styles/<%= forumStyle %>/images/collapsed_no.gif"></SPAN>
	<H3><A href="./index.jsp?sid=<%= aSection.sectionID %>"><%= aSection.sectionName %></A></H3>
<TABLE id="section_<%= i %>" cellSpacing=0 cellPadding=0>
<%
			if (aSection.cols < 2) 
			{
%>
  <THEAD class=category>
  <TR>
    <TH>版块</TH>
    <TD class=nums>主题</TD>
    <TD class=nums>帖数</TD>
    <TD class=lastpost>最后发表</TD></TR></THEAD>
<%
				for (int j=0; j<aSection.boardList.size(); j++)
				{
					aBoard = (BoardVO)aSection.boardList.get(j);
					if (aBoard.state == 'I' && !isModerator) continue;
					
					sbuf.setLength(0);
					sbuf.append("./forum-").append(aSection.sectionID).append("-").append(aBoard.boardID).append("-1.html");
					forumUrl = sbuf.toString();
					
					if (aBoard.allowGroups == null || aBoard.allowGroups.indexOf('G') < 0)
					{
						lastPostInfo = "私密版块";
					}
					else if (aBoard.lastTopicID != null)
					{
						sbuf.setLength(0);
						sbuf.append("./topic-").append(aBoard.lastTopicID).append("-999.html");
						topicUrl = sbuf.toString();

						lastNickname = (aBoard.lastNickname==null 
								|| aBoard.lastNickname.length()==0)	? aBoard.lastTopicUser : aBoard.lastNickname;
						lastNickname = lastNickname.length()==0?"游客":lastNickname;
								
						sbuf.setLength(0);
						sbuf.append("<A href='").append(topicUrl).append("'>").append(aBoard.lastTopicTitle).append("</A>")
						    .append("<CITE>").append(aBoard.lastTopicTime).append("&nbsp; by &nbsp;<A href='uspace.jsp?uid=")
							.append(aBoard.lastTopicUser).append("' target='_blank'>").append(lastNickname).append("</A></CITE>");
						lastPostInfo = sbuf.toString();
					}
					else
					{
						lastPostInfo = "无";
					}
					moderators = PageUtils.getModerators(aSection, aBoard);
					moderatorLink = PageUtils.getModeratorLink(moderators);
					
					if (aBoard.highColor != null && aBoard.highColor.length() > 0)
					{
						sbuf.setLength(0);
						sbuf.append("<font color='#").append(aBoard.highColor).append("'>")
							.append(aBoard.boardName).append("</font>");
						displayName = sbuf.toString();
					}
					else
						displayName = aBoard.boardName;
%>	
  <TBODY>
  <TR>
    <TH<%= aBoard.todayPosts>0?" class=new":"" %>>
      <H2><A href='<%= forumUrl %>'><%= displayName %></A>
	  	  <%= aBoard.todayPosts>0?"<em> (今日: " + aBoard.todayPosts + ")</em>":"" %></H2>
      <P><%= aBoard.brief==null?"":aBoard.brief %></P>
	  <p class="moderators">版主: <%= moderatorLink==null?"空缺中":moderatorLink %></p></TH>
    <TD class=nums><%= aBoard.topics %></TD>
    <TD class=nums><%= aBoard.posts %></TD>
    <TD class=lastpost><%= lastPostInfo %></TD></TR></TBODY>
<%
				}
			}
			else // cols >= 2
			{
				String colWidth = String.valueOf(100 / aSection.cols) + "%";
				int boardCount =  aSection.boardList.size();
				int visibleCount = 0;
				for (int j=0; j<boardCount; j++)
				{
					aBoard = (BoardVO)aSection.boardList.get(j);
					if (aBoard.state == 'I' && !isModerator) continue;
					
					sbuf.setLength(0);
					sbuf.append("./forum-").append(aSection.sectionID).append("-").append(aBoard.boardID).append("-1.html");
					forumUrl = sbuf.toString();
					
					if (aBoard.allowGroups == null || aBoard.allowGroups.indexOf('G') < 0)
					{
						lastPostInfo = "私密版块";
					}
					else if (aBoard.lastTopicID != null)
					{
						lastNickname = (aBoard.lastNickname==null 
								|| aBoard.lastNickname.length()==0)	? aBoard.lastTopicUser : aBoard.lastNickname;
						lastNickname = lastNickname.length()==0?"游客":lastNickname;
					
						sbuf.setLength(0);
						sbuf.append("<A href='").append(topicUrl).append("'>").append(aBoard.lastTopicTime).append("</A>")
							.append("&nbsp; by &nbsp;<A href='uspace.jsp?uid=")
						    .append(aBoard.lastTopicUser).append("' target='_blank'>").append(lastNickname).append("</A>");
						lastPostInfo = sbuf.toString();
					}
					else
					{
						lastPostInfo = "无";
					}

					if (aBoard.highColor != null && aBoard.highColor.length() > 0)
					{
						sbuf.setLength(0);
						sbuf.append("<font color='#").append(aBoard.highColor).append("'>")
							.append(aBoard.boardName).append("</font>");
						displayName = sbuf.toString();
					}
					else
						displayName = aBoard.boardName;
					
					if (visibleCount % aSection.cols == 0)
						out.write("<TBODY><TR>\n");
%>
    <TH<%= aBoard.todayPosts>0?" class=new":"" %> width="<%= colWidth %>" valign="top">
      <H2><A href="<%= forumUrl %>"><%= displayName %></A>
	  	  <%= aBoard.todayPosts>0?"<em> (今日: " + aBoard.todayPosts + ")</em>":"" %></H2>
      <P>主题: <%= aBoard.topics %>, 帖数: <%= aBoard.posts %></P>
      <P>最后发表: <%= lastPostInfo %></P></TH>
<%
					if ((visibleCount+1) % aSection.cols == 0)
						out.write("</TR></TBODY>\n");
					visibleCount++;
				}
				int blankCount = aSection.cols - visibleCount % aSection.cols;
				if (blankCount < aSection.cols)
				{
					for (int j=0; j<blankCount; j++)
					{
						out.write("<TD>&nbsp;</TD>\n");
					}
					out.write("</TR></TBODY>\n");
				}
			}
%>
</TABLE></DIV>
<%
		}
	}
	String showUnion = setting.getString(ForumSetting.DISPLAY, "showUnion");
	if (showUnion.equals("yes")) {
%>
<DIV class=box><SPAN class=headactions><IMG id=forumlinks_img 
onclick="toggle_collapse('forumlinks');" src="styles/<%= forumStyle %>/images/collapsed_no.gif"></SPAN> 
<H4>论坛联盟</H4>
<TABLE id=forumlinks cellSpacing=0 cellPadding=0 class="forumlinks">
  <TBODY>
  <TR>
    <TD><img src="http://www.wisol.net.cn/images/wisol_120x50.gif" alt="万维网简RSS浏览器" style="FLOAT: right"/>
	    <h5><A href="http://www.wisol.net.cn/" target=_blank>万维网简</A></h5>
		<p>信息聚合、网络导航、高效快捷的RSS阅读和浏览器、轻松自然的冲浪感觉</p> 
  </TD></TR>
  <TR>
    <TD>
	    <h5><A href="http://www.21focus.cn/" target=_blank>21焦点网</A></h5>
		<p>为中小网站提供最好的免费论坛、留言板以及免费调查服务</p> 
  </TD></TR>
  </TBODY></TABLE></DIV>
<%
	}
	String showOnlineUsers = setting.getString(ForumSetting.DISPLAY, "showOnlineUsers");
	if (showOnlineUsers.equals("yes")) {
%>  
<DIV class=box id=online>
<H4><strong>在线会员</strong>&nbsp;&nbsp;-&nbsp;&nbsp;共&nbsp;<EM><%= appCtx.getSessionCount() %></EM> 人在线,其中会员&nbsp;<EM><%= appCtx.getSessions().size() %></EM> 人&nbsp;-&nbsp;&nbsp;最高记录是&nbsp;<EM><%= appCtx.getTopOnlines() %></EM>&nbsp; 于&nbsp;<EM><%= appCtx.getTopOnlineTime() %></EM>
</H4></DIV>
<%
	}
%>
<DIV class=legend><LABEL><IMG alt=有新帖的版块 align="absmiddle" 
src="styles/<%= forumStyle %>/images/forum_new.gif">有新帖的版块</LABEL> <LABEL><IMG alt=无新帖的版块 align="absmiddle" 
src="styles/<%= forumStyle %>/images/forum.gif">无新帖的版块</LABEL> </DIV>
</DIV>
<%= menus[1]==null?"":menus[1] %>
<%= menus[2]==null?"":menus[2] %>
<%= PageUtils.getFootAdBanner(request, null) %>
<%= PageUtils.getFooter(request, forumStyle) %>
</BODY></HTML>

⌨️ 快捷键说明

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