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

📄 forumcontent.jsp

📁 jive3.1.4破解版(非源码)
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%/** *	$RCSfile: forumContent.jsp,v $ *	$Revision: 1.5.12.2 $ *	$Date: 2003/07/25 03:29:45 $ */%><%@ page import="java.util.*,                 java.text.SimpleDateFormat,                 com.jivesoftware.forum.*,                 com.jivesoftware.forum.util.*,                 com.jivesoftware.util.*"    errorPage="error.jsp"%><%!	// Global variables, methods, etc    // More methods at the bottom of the page    // default range & starting point for the thread iterators	private final static int START = 0;	private final static int RANGE = 20;%><%@ include file="global.jsp" %><%	// Permission check    if (!isSystemAdmin && !isCatAdmin && !isForumAdmin && !isModerator) {        throw new UnauthorizedException("You don't have admin privileges to perform this operation.");    }    // Get parameters    boolean move = request.getParameter("move") != null;    boolean delete = request.getParameter("delete") != null;    boolean lock = request.getParameter("lock") != null;    long[] threadIDs = ParamUtils.getLongParameters(request, "thread", -1L);	long forumID = ParamUtils.getLongParameter(request,"forum",-1L);	long threadID = ParamUtils.getLongParameter(request,"thread",-1L);	boolean deleteThread = ParamUtils.getBooleanParameter(request,"deleteThread");	int start = ParamUtils.getIntParameter(request,"start",0);	int range = ParamUtils.getIntParameter(request,"range",RANGE);    // Get the Forum    Forum forum = null;    if (forumID != -1) {        forum = forumFactory.getForum(forumID);    }    // Move threads:    if (move || delete || lock) {        StringBuffer buf = new StringBuffer();        if (move) {            buf.append("forumContent_move.jsp?");        }        else if (lock) {            buf.append("forumContent_lock.jsp?");        }        else { // else if delete            buf.append("forumContent_delete.jsp?");        }        buf.append("forum=").append(forumID);        for (int i=0; i<threadIDs.length; i++) {            buf.append("&thread=").append(threadIDs[i]);        }        response.sendRedirect(buf.toString());        return;    }    // Indicates if we're showing a listing of the forums or of the threads    boolean showForumList = (forumID == -1L);    boolean showThreadList = !showForumList;    if (showThreadList) {        // If start was not passed in, check the session for the start value.        if (request.getParameter("start") == null) {            try {                start = ((Integer)session.getAttribute("admin.forumContent."+forumID+".start")).intValue();            }            catch (Exception ignored) {}        }        else {            // Put the start value in the session            session.setAttribute("admin.forumContent."+forumID+".start", new Integer(start));        }        // Put the forum in the session (is needed by the sidebar)        session.setAttribute("admin.sidebar.forums.currentForumID", ""+forumID);    }    else {        // Remove the forum in the session (if we come to this page, the sidebar        // shouldn't show the specific forum options).        session.removeAttribute("admin.sidebar.forums.currentForumID");    }    // Optionally load the thread we're working with    ForumThread thread = null;    if (threadID != -1L) {        thread = forum.getThread(threadID);    }    // An iterator of forums in the system    Iterator forums = null;    if (showForumList) {        forums = forumFactory.getRootForumCategory().getRecursiveForums();    }    // An iterator of threads in this forum    Iterator threads = null;    if (showThreadList) {        ResultFilter filter = new ResultFilter();        filter.setStartIndex(start);        filter.setNumResults(range);        threads = forum.getThreads(filter);    }    // Get a user manager to get user objects	UserManager manager = forumFactory.getUserManager();    // Delete a thread if necessary	if (deleteThread) {		forum.deleteThread(thread);		response.sendRedirect("forumContent.jsp?forum="+forumID);		return;	}%><%  // special onload command to load the sidebar    onload = " onload=\"parent.frames['sidebar'].location.href='sidebar.jsp?sidebar=forum';\"";%><%@ include file="header.jsp" %><p><%  // Title of this page and breadcrumbs    String title = "Manage Content";    String[][] breadcrumbs = null;    if (showForumList && !isSystemAdmin && !isCatAdmin && !isForumAdmin && isModerator) {        breadcrumbs = new String[][] {            {"Main", "main.jsp"},            {"Categories &amp; Forums", "forumContent.jsp"},            {"Manage Content", "forumContent.jsp"}        };    }    else if (showForumList) {        breadcrumbs = new String[][] {            {"Main", "main.jsp"},            {"Categories &amp; Forums", "forums.jsp"},            {"Edit Forum", "editForum.jsp?forum="+forumID},            {"Manage Content", "forumContent.jsp"}        };    }    else if (!isSystemAdmin && !isCatAdmin && !isForumAdmin && isModerator) {        breadcrumbs = new String[][] {            {"Main", "main.jsp"},            {"Categories &amp; Forums", "forumContent.jsp"},            {"Manage Content", "forumContent.jsp?forum="+forumID}        };    }    else {        breadcrumbs = new String[][] {            {"Main", "main.jsp"},            {"Categories &amp; Forums", "forums.jsp?cat=" + forum.getForumCategory().getID()},            {"Edit Forum", "editForum.jsp?forum="+forumID},            {"Manage Content", "forumContent.jsp?forum="+forumID}        };    }%><%@ include file="title.jsp" %><%  if (showForumList) { %>    <font size="-1">    Manage a forum's content by clicking on the name of a forum below.    </font>    <p>    <table bgcolor="<%= tblBorderColor %>" cellpadding="0" cellspacing="0" border="0" width="100%">    <tr><td>    <table bgcolor="<%= tblBorderColor %>" cellpadding="3" cellspacing="1" border="0" width="100%">    <tr bgcolor="#eeeeee">        <td align="center"><font size="-2" face="verdana"><b>FORUM</b></font></td>        <td align="center"><font size="-2" face="verdana"><b>CATEGORY</b></font></td>        <td align="center"><font size="-2" face="verdana"><b>THREADS</b></font></td>        <td align="center"><font size="-2" face="verdana"><b>MESSAGES</b></font></td>        <td align="center"><font size="-2" face="verdana"><b>LAST MODIFIED</b></font></td>    </tr>    <%  while (forums.hasNext()) {            Forum f = (Forum)forums.next();            String description = f.getDescription();            int threadCount = f.getThreadCount();            int messageCount = f.getMessageCount();            boolean canEdit = f.isAuthorized(Permissions.SYSTEM_ADMIN | ForumPermissions.FORUM_ADMIN | ForumPermissions.MODERATOR);    %>    <tr bgcolor="#ffffff">        <td width="96%">        <%  if (canEdit) { %>            <font size="-1"><b><a href="forumContent.jsp?forum=<%= f.getID() %>"><%= f.getName() %></a></b></font>        <%  } else { %>            <font size="-1"><b><%= f.getName() %></b></font>        <%  } %>            <%  if (description != null) { %>            <font size="-2"><br><%= f.getDescription() %></font>            <%  } %>        </td>        <td width="1%" align="center"><font size="-2"><%= f.getForumCategory().getName() %></font></td>        <td width="1%" align="center"><font size="-1"><%= LocaleUtils.getLocalizedNumber(threadCount,JiveGlobals.getLocale()) %></font></td>        <td width="1%" align="center"><font size="-1"><%= LocaleUtils.getLocalizedNumber(messageCount,JiveGlobals.getLocale()) %></font></td>        <td width="1%" nowrap><font size="-1"><%= SkinUtils.formatDate(request,pageUser,f.getModificationDate()) %></font></td>    </tr>    <%  } %>    </table>    </td></tr>    </table><%  } else { // showThreadList %>    <%  if (isSystemAdmin || forum.isAuthorized(ForumPermissions.FORUM_CATEGORY_ADMIN | ForumPermissions.FORUM_ADMIN)) { %>

⌨️ 快捷键说明

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