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

📄 forummanagement.jsp

📁 用java 写的论坛
💻 JSP
字号:
<%--
 - $Header: /cvsroot/mvnforum/mvnforum/srcweb/mvnplugin/mvnforum/admin/forummanagement.jsp,v 1.14 2003/05/21 19:17:18 minhnn Exp $
 - $Author: minhnn $
 - $Revision: 1.14 $
 - $Date: 2003/05/21 19:17:18 $
 -
 - ====================================================================
 -
 - Copyright (C) 2002, 2003 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.ArrayList" %>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.db.*" %>
<%@ page import="net.myvietnam.mvnplugin.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"%>
</head>
<link href="<%=contextPath%>/mvnplugin/mvnforum/css/style.css" rel=stylesheet type=text/css>
<body leftmargin=0 topmargin=0>

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

<table width="95%" cellspacing="1" cellpadding="3" align="center" bgcolor="#999999">
<tr bgcolor=#f5f5f5>
    <td class="messageText">
    <strong>Forum/Category Management</strong> is where you can manage all aspects of your forums/categorys.
    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();
ArrayList categoryBeans = categoryCache.getBeans();
ArrayList forumBeans = forumCache.getBeans();
int maxCat = categoryBeans.size();
int maxForum = forumBeans.size();
%>
<%if ( permission.canAddCategory() ) {%>
    <a href="addcategory" class="messageTextBoldBlue">Add new Category</a><br>
<%}%>

<%if ( permission.canAddForum() && (maxCat > 0) ) {%>
    <a href="addforum" class="messageTextBoldBlue">Add new Forum</a><br>
<%}%>
    </td>
</tr>
</table>
<p>
<table width="95%" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#999999">
<tr bgcolor="#666699" class="header">
    <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">Permission</td>
    <td align="center">Edit</td>
    <td align="center">Delete</td>
</tr>
<%
for (int catIndex = 0; catIndex < maxCat; catIndex++) {
    CategoryBean categoryBean = (CategoryBean)categoryBeans.get(catIndex);
%>
<tr bgColor="#eeeeff">
    <td colspan="2" class="messageTextBold">
        <%=categoryBean.getCategoryName()%><br>
        <font class="messageText"><%=MyUtil.filter(categoryBean.getCategoryDesc(), false/*html*/, true/*emotion*/, true/*mvnCode*/, true/*newLine*/, true/*URL*/)%></font>
    </td>
    <td>
        <table width="100%">
        <tr>
            <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" class="messageTextBold"><%=categoryBean.getCategoryOrder()%></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" class="messageText"><%=onlineUser.getGMTTimestampFormat(categoryBean.getCategoryCreationDate())%></td>
    <td align="center">
<%if ( permission.canAddForum() ) {%>
	<a href="addforum?category=<%=categoryBean.getCategoryID()%>" class="messageTextBoldBlue">Add Forum</a>
<%}%>
	</td>
    <td align="center"></td>
    <td align="center"><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="messageTextBoldBlue" href="deletecategory?category=<%=categoryBean.getCategoryID()%>">Delete</a>
	<%}%>
	</td>
</tr>
<%
    int forumCountInCurrentCategory = 0;
    for (int forumIndex = 0; forumIndex < maxForum; forumIndex++) {
        ForumBean forumBean = (ForumBean)forumBeans.get(forumIndex);
        if (forumBean.getCategoryID() == categoryBean.getCategoryID()) {
            forumCountInCurrentCategory++;
            String color;
            if ((forumCountInCurrentCategory%2) != 0) {
                color = "white";
            } else {
                color = "#f5f5f5";
            }
%>
<tr bgColor=<%=color%>>
    <td width="20" align="center"><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/forumicon.gif" border="0"></td>
    <td class="messageTextBold">
        <%=forumBean.getForumName()%><br>
        <font class="messageText"><%=MyUtil.filter(forumBean.getForumDesc(), false/*html*/, true/*emotion*/, true/*mvnCode*/, true/*newLine*/, true/*URL*/)%></font>
    </td>
    <td>
        <table width="100%">
        <tr>
            <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" class="messageTextBold"><%=forumBean.getForumOrder()%></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" class="messageText"><%=onlineUser.getGMTTimestampFormat(forumBean.getForumCreationDate())%></td>
    <td align="center"></td>
    <td align="center"><!--<a href="editforumpermission?forum=<%=forumBean.getForumID()%>"></a>--><img src="<%=contextPath%>/mvnplugin/mvnforum/images/icon/group.gif" border="0" alt="Edit permission for forum : <%=forumBean.getForumName()%>"></td>
    <td align="center"><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() ) {%>
	<a class="messageTextBoldBlue" href="deleteforum?forum=<%=forumBean.getForumID()%>">Delete</a>
<%}%>
	</td>
</tr>
<%
        }//if
    } //for forumIndex
    if (forumCountInCurrentCategory == 0) {
%>
<tr bgColor="White">
  <td colspan="8" align="center" class="messageText">There are not any forums in this category. Click AddForum to add one.</td>
</tr>
<%
    }
} //for catIndex
if (maxCat == 0) {
%>
<tr bgColor="White">
  <td colspan="8" align="center" class="messageText">There are not any categories</td>
</tr>
<%
}// if no category
%>
</table>

<p>
&nbsp;
<%@ include file="footer.jsp"%>
</body>
</html>

⌨️ 快捷键说明

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