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

📄 forummanagement.jsp

📁 easy to use, easy to setup bulletin board (forum)
💻 JSP
字号:
<%
/*
 * Copyright (C) 2002 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 errorPage="/mvnplugin/mvnforum/error.jsp"%>
<%@ page import="net.myvietnam.mvnplugin.mvnforum.db.*" %>
<%@ page import="java.util.ArrayList" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
    <title>Forum/Category management</title>
<%@ include file="/mvnplugin/mvnforum/meta.jsp"%>
</head>
<link href="<%=request.getContextPath()%>/mvnplugin/mvnforum/css/style.css" rel=stylesheet type=text/css>
<body leftmargin=0 topmargin=0>

<%@ include file="/mvnplugin/mvnforum/admin/header.jsp"%>
<p>
<table width="95%" align="center">
<tr class="nav">
    <td><img src="<%=request.getContextPath()%>/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="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/icon/up.gif" border="0">
    to move it up, or click <img src="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/icon/down.gif" border="0">
    to bring 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="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/icon/edit.gif" border="0">).
    <br>Choose below tasks to continue:<br>
    <a href="addcategory" class="messageTextBoldBlue">Add new Category</a><br>
    <a href="addforum" class="messageTextBoldBlue">Add new Forum</a><br>
    </td>
</tr>
</table>
<p>
<%
CategoryCache categoryCache = CategoryCache.getInstance();
ForumCache forumCache = ForumCache.getInstance();
ArrayList categoryBeans = categoryCache.getBeans();
ArrayList forumBeans = forumCache.getBeans();
int maxCat = categoryBeans.size();
int maxForum = forumBeans.size();
%>
<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">
<%--<tr bgColor="#ffcc99">--%>
    <td colspan="2" class="messageTextBold">
        <%=categoryBean.getCategoryName()%><br>
        <font class="messageText"><%=categoryBean.getCategoryDesc()%></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="<%=request.getContextPath()%>/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="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/icon/down.gif" border="0" alt="Move Down"></a></td>
        </tr>
        </table>
    </td>
    <td align="center" class="messageText"><%=categoryBean.getCategoryCreationDate()%></td>
    <td align="center"><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="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/icon/edit.gif" border="0" alt="Edit category: <%=categoryBean.getCategoryName()%>"></a></td>
    <td align="center"></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="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/icon/forumicon.gif" border="0"></td>
    <td class="messageTextBold">
        <%=forumBean.getForumName()%><br>
        <font class="messageText"><%=forumBean.getForumDesc()%></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="<%=request.getContextPath()%>/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="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/icon/down.gif" border="0" alt="Move Down"></a></td>
        </tr>
        </table>
    </td>
    <td align="center" class="messageText"><%=forumBean.getForumCreationDate()%></td>
    <td align="center"></td>
    <td align="center"><!--<a href="editforumpermission?forum=<%=forumBean.getForumID()%>"></a>--><img src="<%=request.getContextPath()%>/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="<%=request.getContextPath()%>/mvnplugin/mvnforum/images/icon/edit.gif" border="0" alt="Edit forum: <%=forumBean.getForumName()%>"></a></td>
    <td align="center"></td>
</tr>
<%
        }//if
    } //for forumIndex
    if (forumCountInCurrentCategory == 0) {
%>
<tr bgColor="White">
  <td colspan="8" align="center" class="messageText">There is 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 is not any categories.</td>
</tr>
<%
}// if no category
%>
</table>

<p>
&nbsp;

<%@ include file="/mvnplugin/mvnforum/admin/footer.jsp"%>

</body>
</html>

⌨️ 快捷键说明

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