?? index.jsp
字號:
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(" by <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(" by <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> </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> - 共 <EM><%= appCtx.getSessionCount() %></EM> 人在線,其中會員 <EM><%= appCtx.getSessions().size() %></EM> 人 - 最高記錄是 <EM><%= appCtx.getTopOnlines() %></EM> 于 <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 + -