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

📄 listforums.jsp

📁 免费的java企业级论坛可执行程序
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/user/listforums.jsp,v 1.141 2007/11/26 07:31:17 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.141 $
 - $Date: 2007/11/26 07:31:17 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2007 by MyVietnam.net
 -
 - All copyright notices regarding mvnForum MUST remain 
 - intact in the scripts and in the outputted HTML.
 - The "powered by" text/logo with a link back to
 - http://www.mvnForum.com and http://www.MyVietnam.net in 
 - the footer of the pages MUST remain visible when the pages
 - are viewed on the internet or intranet.
 -
 - This program is free software; you can redistribute it and/or modify
 - it under the terms of the GNU General Public License as published by
 - the Free Software Foundation; either version 2 of the License, or
 - any later version.
 -
 - This program is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - GNU General Public License for more details.
 -
 - You should have received a copy of the GNU General Public License
 - along with this program; if not, write to the Free Software
 - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 -
 - Support can be obtained from support forums at:
 - http://www.mvnForum.com/mvnforum/index
 -
 - Correspondence and Marketing Questions can be sent to:
 - info at MyVietnam net
 -
 - @author: Minh Nguyen  
 - @author: Mai  Nguyen  
 --%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="net.myvietnam.mvncore.filter.EnableEmotionFilter" %>
<%@ page import="net.myvietnam.mvncore.security.Encoder" %>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.common.*" %>
<%@ page import="com.mvnforum.auth.OnlineUserAction" %>
<%@ page import="com.mvnforum.MVNForumConstant" %>
<%@ page import="com.mvnforum.*" %>

<%@ include file="inc_common.jsp"%>
<%@ include file="inc_doctype.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<mvn:html locale="${currentLocale}">
<mvn:head>
  <mvn:title><fmt:message key="mvnforum.common.forum.title_name"/> - <fmt:message key="mvnforum.user.listforums.title"/></mvn:title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css" />
<script src="<%=contextPath%>/mvnplugin/mvnforum/js/listforums.js" type="text/javascript"></script>
<script type="text/javascript" language="JavaScript">
function start() {
  <% if (request.getAttribute("id") != null ) { %>
    execute1("<%=request.getAttribute("id")%>");
  <% } else { %>
    <%if (MVNForumConfig.getEnableExpanseCategoryTree() == false) { %>
      init();
    <%}%>  
  <%}%>  
}
</script>
</mvn:head>
<mvn:body onload="start();">
<%@ include file="header.jsp"%>
<br/>
<script type="text/javascript">
function showhide(category) {
  var category = document.getElementById(category);
  if (category == null) return;
  if ( category.style.display == 'none' ) {
    category.style.display = '';
  } else if ( category.style.display == '' ) {
    category.style.display = 'none';
  }
}
</script>

<table width="95%" align="center">
  <tr class="nav">
    <td><%--<img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif" alt="" />--%></td>
    <td width="100%" nowrap="nowrap">
    <%--
    <a class="nav" href="<%=urlResolver.encodeURL(request, response, "index")%>"><fmt:message key="mvnforum.common.nav.index"/></a>&nbsp;&raquo;&nbsp;
    <fmt:message key="mvnforum.user.listforums.title"/>
    --%>
    <%
    out.println(request.getAttribute("tree"));
    %>
    </td>
  </tr>
</table>
<br/>
<%
CategoryCache categoryCache = CategoryCache.getInstance();
ForumCache forumCache = ForumCache.getInstance();
Collection categoryBeans = categoryCache.getBeans();
Collection forumBeans = forumCache.getBeans();
ThreadIconLegend threadIconLegend = new ThreadIconLegend();

if (MVNForumConfig.getEnableMostActiveThreads()) {
  boolean hasAnAttachment = false;
  boolean hasPoll = false;

%>
<table width="95%" align="center">
  <tr>
    <td class="highlight"><fmt:message key="mvnforum.common.most_active_threads_since_last_week"/></td>
  </tr>
</table>
<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
  <tr class="portlet-section-header">
    <td colspan="3"><fmt:message key="mvnforum.common.thread"/></td>
    <td><fmt:message key="mvnforum.common.forum"/></td>
    <td align="center"><fmt:message key="mvnforum.common.post.author"/></td>
    <td align="center"><fmt:message key="mvnforum.common.reply_count"/></td>
    <td align="center"><fmt:message key="mvnforum.common.view_count"/></td>
    <td align="center"><fmt:message key="mvnforum.common.last_post"/></td>
  </tr>

<%
  Collection mostActiveThreads = (Collection)request.getAttribute("MostActiveThreads");
%>
<mvn:cssrows>
<%
  for ( Iterator iter = mostActiveThreads.iterator(); iter.hasNext(); ) {
     ActiveThread thread = (ActiveThread)iter.next();
     String threadIcon = MyUtil.getThreadIconName(onlineUser.getLastLogonTimestamp().getTime(), thread.getLastDate().getTime(), thread.getReplyCount()+1, thread.getThreadStatus());
     int postCount = thread.getLastPostCount();
%>
  <tr class="<mvn:cssrow/>">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=threadIcon%>" border="0" alt=""/></td>
    <td width="16"><%=EnableEmotionFilter.filter(thread.getIcon(), contextPath + MVNForumGlobal.EMOTION_DIR)%></td>
    <td>
     <% 
       String typeImage = MyUtil.getThreadTypeIcon(thread.getThreadType());
       threadIconLegend.updateIconLegend(typeImage);
       String threadPriorityIcon = MyUtil.getThreadPriorityIcon(thread.getThreadPriority());
       threadIconLegend.updateIconLegend(threadPriorityIcon);
     %>
      <% if ( thread.getThreadType() != ThreadBean.THREAD_TYPE_DEFAULT) { %>
        <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=typeImage%>"/ alt="" />
      <% } %>
      <% if ( ( (thread.getThreadPriority() == ThreadBean.THREAD_PRIORITY_LOW) && (MVNForumConfig.getEnableLowPriorityIcon() == true) ) || ( (thread.getThreadPriority() == ThreadBean.THREAD_PRIORITY_NORMAL) && (MVNForumConfig.getEnableNormalPriorityIcon() == true)) || ( (thread.getThreadPriority() == ThreadBean.THREAD_PRIORITY_HIGH) && (MVNForumConfig.getEnableHighPriorityIcon() == true) ) ) { %>
        <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=threadPriorityIcon%>" border="0" alt="" />
      <% } %>
      <% if (environmentService.isEnterprise() && MVNForumConfig.getEnablePoll()) {
          if(thread.getPollCount() > 0) {
              hasPoll = true; %>
              <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/poll.gif" alt=""/>
      <%  }
         }
      %>
      <% if ( thread.getAttachCount() > 0) {
           hasAnAttachment = true; %>
         <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/attach.gif" title="<%=thread.getAttachCount()%> <% if (thread.getAttachCount() == 1) {%><fmt:message key="mvnforum.common.attachment"/><% } else {%><fmt:message key="mvnforum.common.attachments"/><%}%>" alt=""/>
      <% } %>
      <a href="<%=urlResolver.encodeURL(request, response, "viewthread?thread=" + thread.getThreadID())%>" class="command"><%=thread.getThreadTopic()%></a><br/>
      (<b><%=postCount%></b> <% if (postCount == 1) {%><fmt:message key="mvnforum.common.new_post"/><% } else { %><fmt:message key="mvnforum.common.new_posts"/><% } %>)
    </td>
    <td>
      <a href="<%=urlResolver.encodeURL(request, response, "listthreads?forum=" + thread.getForumID())%>" class="messageTopic"><%=forumCache.getBean(thread.getForumID()).getForumName()%></a>
    </td>
    <td align="center">
      <% if ((thread.getAuthor()!=null) && (thread.getAuthor().length()>0)) { %>
      <a href="<%=urlResolver.encodeURL(request, response, "viewmember?member=" + Encoder.encodeURL(thread.getAuthor()))%>" class="memberName"><%=thread.getAuthor()%></a>
      <% } %>
    </td>
    <td align="center"><b><%=thread.getReplyCount()%></b></td>
    <td align="center"><b><%=thread.getViewCount()%></b></td>
    <td align="center">
      <%=onlineUser.getGMTTimestampFormat(thread.getLastDate())%><br/>
      <% if ((thread.getLastMember()!=null) && (thread.getLastMember().length()>0)) { %>
      <fmt:message key="mvnforum.common.by"/> <a href="<%=urlResolver.encodeURL(request, response, "viewmember?member=" + Encoder.encodeURL(thread.getLastMember()))%>" class="memberName"><%=thread.getLastMember()%></a>&nbsp;
      <% } %>
      <a href="<%=urlResolver.encodeURL(request, response, "viewthread?thread=" + thread.getThreadID() + "&amp;lastpage=yes#lastpost")%>" class="messageTopic"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/right.gif" border="0" alt="<fmt:message key="mvnforum.common.last"/>" title="<fmt:message key="mvnforum.common.last"/>"/></a>
    </td>
  </tr>
<% } // end for each most active thread%>
<% if (mostActiveThreads.size() == 0) { %>
  <tr class="<mvn:cssrow/>">
    <td colspan="8" align="center"><fmt:message key="mvnforum.common.no_active_threads"/></td>
  </tr>
<% }// if no active threads %>
</mvn:cssrows>
</table>
<br/>
<% if (threadIconLegend.isHasThreadIconLegend() || hasAnAttachment || hasPoll) { %>
  <table width="95%" border="0" align="center">
<% } %>
  <% if(hasPoll) {%>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/poll.gif" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.has_poll"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasGlobalAnnouncement()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_TYPE_GLOBAL_ANNOUNCEMENT %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.global_announcement"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasAnnouncement()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_TYPE_FORUM_ANNOUNCEMENT %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.announcement"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasSticky()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_TYPE_STICKY %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.sticky"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasPriorityHigh()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_PRIORITY_HIGH %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.priority_high"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasPriorityNormal()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_PRIORITY_NORMAL %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.priority_normal"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasPriorityLow()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_PRIORITY_LOW %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.priority_low"/></td>
  </tr>
  <%}%>
  <% if (hasAnAttachment) { %>
  <tr class="portlet-font">
    <td width="16" align="center"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/attach.gif" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.has_attachment"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasHotUnreadActive()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_HOT_UNREAD_ACTIVE %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.hot_unread_active"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasHotReadActive()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_HOT_READ_ACTIVE %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.hot_read_active"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasHotUnreadClosed()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_HOT_UNREAD_CLOSED %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.hot_unread_closed"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasHotReadClosed()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_HOT_READ_CLOSED %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.hot_read_closed"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasHotUnreadLocked()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_HOT_UNREAD_LOCKED %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.hot_unread_locked"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasHotReadLocked()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_HOT_READ_LOCKED %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.hot_read_locked"/></td>
  </tr>
  <%}%>
  <% if (threadIconLegend.isHasColdUnreadActive()) { %>
  <tr class="portlet-font">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=ThreadIconLegend.THREAD_ICON_COLD_UNREAD_ACTIVE %>" border="0" alt=""/></td>
    <td><fmt:message key="mvnforum.common.legend.thread.cold_unread_active"/></td>
  </tr>
  <%}%>

⌨️ 快捷键说明

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