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

📄 listforums2.jsp

📁 解觖java技术中后台无法上传数给的情况
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/user/listforums.jsp,v 1.78 2006/04/14 18:04:00 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.78 $
 - $Date: 2006/04/14 18:04:00 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2006 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.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.MyUtil" %>
<%@ page import="com.mvnforum.auth.OnlineUserAction" %>
<%@ page import="com.mvnforum.MVNForumConstant" %>
<%@ page import="com.mvnforum.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<fmt:bundle basename="mvnForum_i18n">
<html <fmt:message key="mvnforum.common.i18n.html_dir"/>>
<head>
  <title><fmt:message key="mvnforum.common.forum.title_name"/> - <fmt:message key="mvnforum.user.listforums.title"/></title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=onlineUser.getCssPath()%>" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%@ 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="98%" align="center">
  <tr class="nav">
    <td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
    <td width="100%" 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"/>
    </td>
  </tr>
</table>
<br/>
<%
CategoryCache categoryCache = CategoryCache.getInstance();
ForumCache forumCache = ForumCache.getInstance();
Collection categoryBeans = categoryCache.getBeans();
Collection forumBeans = forumCache.getBeans();

if (MVNForumConfig.getEnableMostActiveThreads()) {
  boolean hasSticky = false;
  boolean hasAnnouncement = false;
  boolean hasGlobalAnnouncement = false;
%>
<table width="98%" align="center">
  <tr>
    <td class="highlight"><fmt:message key="mvnforum.common.most_active_threads_since_last_week"/></td>
  </tr>
</table>
<table class="tborder" width="98%" 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>
<%int rowIndex = 0;
  Collection mostActiveThreads = (Collection)request.getAttribute("MostActiveThreads");
  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);
     int postCount = thread.getLastPostCount(); 
     String color = ((rowIndex++)%2 == 0 ? "portlet-section-body" : "portlet-section-alternate");

%>

  <tr class="<%=color%>">
    <td width="16"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=threadIcon%>" border="0"></td>
    <td width="16"><%=EnableEmotionFilter.filter(thread.getIcon(), ParamUtil.getContextPath() + MVNForumGlobal.EMOTION_DIR)%></td>
    <td>
     <% String typeImage = "";
         switch (thread.getThreadType()) {
           case ThreadBean.THREAD_TYPE_STICKY: typeImage = "sticky.gif"; hasSticky = true; break;
           case ThreadBean.THREAD_TYPE_FORUM_ANNOUNCEMENT: typeImage = "announce.gif"; hasAnnouncement = true; break;
           case ThreadBean.THREAD_TYPE_GLOBAL_ANNOUNCEMENT: typeImage = "global_announce.gif"; hasGlobalAnnouncement = true; break;
           default:break;
         } %>
      <% if ( thread.getThreadType() != ThreadBean.THREAD_TYPE_DEFAULT) { %>
        <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/<%=typeImage%>"/>
      <% }%>
      <% if ( thread.getAttachCount() > 0) {%>
         <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"/><%}%>"/>
      <% } %>
      <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() + "&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="portlet-section-body">
    <td colspan="8" align="center"><fmt:message key="mvnforum.common.no_active_threads"/></td>
  </tr>
<% }// if no active threads %>
</table>
<br/>
<%} // end of enable most active threads %>
<%
int numberOfThreads = MyUtil.getViewableThreads(forumBeans, permission);
int numberOfPosts = MyUtil.getViewablePosts(forumBeans, permission);

//Copy code from listonlineusers.jsp
Collection onlineUserActions = (Collection)request.getAttribute("OnlineUserActions");
int guestCount = 0;
int memberCount = 0;
int invisibleMemberCount = 0;
boolean enableInvisible = MVNForumConfig.getEnableInvisibleUsers();
for (Iterator countIterator = onlineUserActions.iterator(); countIterator.hasNext(); ) {
    OnlineUserAction onlineUserAction = (OnlineUserAction)countIterator.next();
    boolean invisible = onlineUserAction.isInvisibleMember();
    int mID = onlineUserAction.getMemberID();
    if ( (mID==0) || (mID==MVNForumConstant.MEMBER_ID_OF_GUEST) ) {
        guestCount++;
    } else if (enableInvisible) {
        if ( invisible ) {
           invisibleMemberCount++;
        } else {
           memberCount++;

⌨️ 快捷键说明

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