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

📄 forummanagement.jsp

📁 java servlet著名论坛源代码
💻 JSP
字号:
<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/forummanagement.jsp,v 1.36 2004/03/07 14:40:58 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.36 $
 - $Date: 2004/03/07 14:40:58 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002-2004 by MyVietnam.net
 -
 - 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.
 -
 - 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 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@MyVietnam.net
 -
 - @author: Minh Nguyen  minhnn@MyVietnam.net
 - @author: Mai  Nguyen  mai.nh@MyVietnam.net
 --%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ page errorPage="fatalerror.jsp"%>
<%@ page import="java.util.*" %>
<%@ page import="com.mvnforum.db.*" %>
<%@ page import="com.mvnforum.MyUtil" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ include file="inc_common.jsp"%>
<html>
<head>
  <title>mvnForum - Forum/Category Management</title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
<link href="<%=contextPath%>/mvnplugin/mvnforum/css/style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<%@ include file="header.jsp"%>
<br/>

<table width="95%" align="center">
  <tr class="nav">
    <td><img src="<%=contextPath%>/mvnplugin/mvnforum/images/nav.gif"></td>
    <td width="100%" nowrap>
    <a class="nav" href="<%=indexUrl%>">mvnForum</a>&nbsp;&raquo;&nbsp;
    <a class="nav" href="index">Admin CP</a>&nbsp;&raquo;&nbsp;
    Forum/Category Management
    </td>
  </tr>
</table>
<br/>

<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
  <tr class="pagedesc">
    <td>
    <strong>Forum/Category Management</strong> is where you can manage all aspects of your forums/categories.
    It is very intuitive and easy to use. To reorder your forums or categories, just
    click <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/up.gif" border="0">
    to bring it up, or click <img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/down.gif" border="0">
    to move it down. (Note that if the order equals 0, you cannot move it up.)
    To add new forum in a category, click the AddForum link in that category. To edit your
    forum/category, just click the Edit picture (<img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/edit.gif" border="0">).
    <br/>Choose below tasks to continue:<br/>
<%
CategoryCache categoryCache = CategoryCache.getInstance();
ForumCache forumCache = ForumCache.getInstance();
Collection categoryBeans = categoryCache.getBeans();
Collection forumBeans = forumCache.getBeans();
%>
<%if ( permission.canAddCategory() ) {%>
    <a href="addcategory" class="command">Add new Category</a><br/>
<%}%>

<%if ( permission.canAddForum() && (categoryBeans.size() > 0) ) {%>
    <a href="addforum" class="command">Add new Forum</a><br/>
<%}%>
    </td>
  </tr>
</table>
<br/>

<table class="tborder" width="95%" cellspacing="1" cellpadding="3" align="center">
  <tr class="theader">
    <td colspan="2">Name/Description</td>
    <td align="center">Order</td>
    <td align="center">Creation Date</td>
    <td align="center">Add Forum</td>
    <td align="center">Group Permission</td>
    <td align="center">Member Permission</td>
    <td align="center">Edit</td>
    <td align="center">Delete</td>
  </tr>
<%
for (Iterator catIterator = categoryBeans.iterator(); catIterator.hasNext(); ) {
    CategoryBean categoryBean = (CategoryBean)catIterator.next();
%>
  <tr class="tcat">
    <td colspan="2">
      <b><%=categoryBean.getCategoryName()%></b><br/>
      <%=MyUtil.filter(categoryBean.getCategoryDesc(), false/*html*/, true/*emotion*/, true/*mvnCode*/, true/*newLine*/, true/*URL*/)%>
    </td>
    <td>
      <table width="100%">
        <tr class="tcat">
          <td width="30%" align="center">
            <% if (categoryBean.getCategoryOrder() > 0) { %>
            <a href="updatecategoryorder?category=<%=categoryBean.getCategoryID()%>&action=up"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/up.gif" border="0" alt="Move Up"></a>
            <% } %>
          </td>
          <td width="40%" align="center"><b><%=categoryBean.getCategoryOrder()%></b></td>
          <td width="30%" align="center"><a href="updatecategoryorder?category=<%=categoryBean.getCategoryID()%>&action=down"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/down.gif" border="0" alt="Move Down"></a></td>
        </tr>
      </table>
    </td>
    <td align="center"><%=onlineUser.getGMTTimestampFormat(categoryBean.getCategoryCreationDate())%></td>
    <td align="center">
<%if ( permission.canAddForum() ) {%>
      <a href="addforum?category=<%=categoryBean.getCategoryID()%>" class="command">Add Forum</a>
<%}%>
    </td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center">
<%if ( permission.canEditCategory() ) {%>
    <a href="editcategory?category=<%=categoryBean.getCategoryID()%>"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/edit.gif" border="0" alt="Edit category: <%=categoryBean.getCategoryName()%>"></a>
<%}%>
    </td>
    <td align="center">
    <%if ( (forumCache.getNumberOfBeans(categoryBean.getCategoryID()) == 0) && (permission.canDeleteCategory()) ) {%>
      <a class="command" href="deletecategory?category=<%=categoryBean.getCategoryID()%>">Delete</a>
    <%}%>
    </td>
  </tr>
<%
    int forumCountInCurrentCategory = 0;
    for (Iterator forumIterator = forumBeans.iterator(); forumIterator.hasNext(); ) {
        ForumBean forumBean = (ForumBean)forumIterator.next();
        if (forumBean.getCategoryID() == categoryBean.getCategoryID()) {
            forumCountInCurrentCategory++;
            String color = (forumCountInCurrentCategory%2 == 1) ? "trow1" : "trow2";
%>
  <tr class="<%=color%>">
    <td width="20" align="center"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/forumicon.gif" border="0"></td>
    <td>
      <b><%=forumBean.getForumName()%></b><br>
      <%=MyUtil.filter(forumBean.getForumDesc(), false/*html*/, true/*emotion*/, true/*mvnCode*/, true/*newLine*/, true/*URL*/)%>
    </td>
    <td>
      <table width="100%">
        <tr class="<%=color%>">
          <td width="30%" align="center">
            <% if (forumBean.getForumOrder() > 0) { %>
            <a href="updateforumorder?forum=<%=forumBean.getForumID()%>&action=up"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/up.gif" border="0" alt="Move Up"></a>
            <% } %>
          </td>
          <td width="40%" align="center"><b><%=forumBean.getForumOrder()%></b></td>
          <td width="30%" align="center"><a href="updateforumorder?forum=<%=forumBean.getForumID()%>&action=down"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/down.gif" border="0" alt="Move Down"></a></td>
        </tr>
      </table>
    </td>
    <td align="center"><%=onlineUser.getGMTTimestampFormat(forumBean.getForumCreationDate())%></td>
    <td align="center"></td>
    <td align="center">
  <%if ( permission.canAssignToForum(forumBean.getForumID()) ) {%>
      <a href="assigngrouptoforum?forum=<%=forumBean.getForumID()%>"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/group.gif" border="0" alt="Edit Group Permissions for forum : <%=forumBean.getForumName()%>"></a>
  <%}%>
    </td>
    <td align="center">
  <%if ( permission.canAssignToForum(forumBean.getForumID()) ) {%>
      <a href="assignmembertoforum?forum=<%=forumBean.getForumID()%>"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/group.gif" border="0" alt="Edit Member Permissions for forum : <%=forumBean.getForumName()%>"></a>
  <%}%>
    </td>
    <td align="center">
  <%if ( permission.canEditForum(forumBean.getForumID()) ) {%>
      <a href="editforum?forum=<%=forumBean.getForumID()%>"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/edit.gif" border="0" alt="Edit forum: <%=forumBean.getForumName()%>"></a>
  <%}%>
    </td>
    <td align="center">
  <%if ( permission.canDeleteForum(forumBean.getForumID()) ) {%>
      <a class="command" href="deleteforum?forum=<%=forumBean.getForumID()%>">Delete</a>
  <%}%>
    </td>
  </tr>
<%
        }//if
    } //for forumIndex
    if (forumCountInCurrentCategory == 0) {
%>
  <tr class="trow1">
    <td colspan="9" align="center"><b>There are no forums in this category. Click AddForum to add one.</b></td>
  </tr>
<%
    }
} //for catIndex
if (categoryBeans.size() == 0) {
%>
  <tr class="trow2">
    <td colspan="9" align="center"><b>There are no categories.</b></td>
  </tr>
<%
}// if no category
%>
</table>

<br/>
<%@ include file="footer.jsp"%>
</body>
</html>

⌨️ 快捷键说明

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