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

📄 forums.jsp

📁 Jive(J道版) Jive(J道版)是在Jive 2.1版本基础上改编而成
💻 JSP
字号:

<%
/**
 *	$RCSfile: forums.jsp,v $
 *	$Revision: 1.1.1.1 $
 *	$Date: 2002/09/09 13:50:28 $
 */
%>

<%@ page import="java.util.*,
                 com.jivesoftware.forum.*,
				 com.jivesoftware.forum.util.*" %>

<%@ include file="include/global.jsp" %>

<%	// Get parameters
	int start = ParamUtils.getIntParameter(request,"start",0);
	int range = ParamUtils.getIntParameter(request,"range",10);

    // if the start isn't passed in as a parameter, look for it in the session
    if (request.getParameter("start") == null) {
        try {
            start = Integer.parseInt((String)session.getAttribute("admin.forums.start"));
        } catch (Exception e) {}
    }
    else {
        session.setAttribute("admin.forums.start",start+"");
    }

    // Iterator of forums
    Iterator forums = forumFactory.forums();

    // Total number of forums
    int forumCount = forumFactory.getForumCount();

    // 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.currentForum");
%>

<%  // special onload command to load the sidebar
    onload = " onload=\"parent.frames['sidebar'].location.href='sidebar.jsp?sidebar=forum';\"";
%>
<%@ include file="include/header.jsp" %>

<p>

<%  // Title of this page and breadcrumbs
    String title = "Forums Summary";
    String[][] breadcrumbs = {
        {"Main", "main.jsp"},
        {"Forums", "forums.jsp"}
    };
%>
<%@ include file="include/title.jsp" %>

<font size="-1">
<%= forumCount %> total forum<%= (forumCount==1)?"":"s" %> (<%= range %> displayed per page).
You can <a href="createForum.jsp">create a new forum</a>.
</font>

<p>

<table bgcolor="<%= tableBorderColor %>" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td>
<table bgcolor="<%= tableBorderColor %>" cellpadding="3" cellspacing="1" border="0" width="100%">
<tr bgcolor="#eeeeee">
    <td align="center"><font size="-2" face="verdana"><b>NAME / DESCRIPTION</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>EDIT</b></font></td>
    <td align="center"><font size="-2" face="verdana"><b>DELETE</b></font></td>
</tr>
<%  if (!forums.hasNext()) { %>

<%  }
    // skip the first 0->start forums
    int i=0;
    while (i++ < start && forums.hasNext()) {
        forums.next();
    }
    // show "range" number of forums
    i=0;
    while (i++ < range && forums.hasNext()) {
        Forum forum = (Forum)forums.next();
        String description = forum.getDescription();
        long id = forum.getID();
%>
<tr bgcolor="#ffffff">
    <td><font size="-1"><a href="editForum.jsp?forum=<%= id %>" title="Click to edit all forum properties"><%= forum.getName() %></a><br><%= (description!=null)?description:"" %></font></td>
    <td align="center"><font size="-1"><%= forum.getThreadCount() %></font></td>
    <td align="center"><font size="-1"><%= forum.getMessageCount() %></font></td>
    <td align="center"><a href="editForum.jsp?forum=<%= id %>"><img src="images/button_edit.gif" width="17" height="17" alt="Click to edit all forum properties" border="0"></a></td>
    <td align="center"><a href="removeForum.jsp?forum=<%= id %>"><img src="images/button_delete.gif" width="17" height="17" alt="Confirm that you want to delete this forum..." border="0"></a></td>
</tr>
<%  } %>
</table>
</td></tr>
</table>

<p>

<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<%  if (start > 0) { %>
	<td width="1%" nowrap><font size="-1"><a href="forums.jsp?start=<%= start-range %>">Previous <%= range %> forums</a></font></td>
<%  } else { %>
	<td width="1%" nowrap><font size="-1">&nbsp;</font></td>
<%  } %>

<%  if (start > 0) { %>
	<td width="98%" align="center"><font size="-1"><a href="forums.jsp?start=0">Front Page</a></font></td>
<%  } else { %>
	<td width="98%" nowrap><font size="-1">&nbsp;</font></td>
<%  } %>

<%  if (start+range < forumCount) { %>
	<td width="1%" nowrap><font size="-1"><a href="forums.jsp?start=<%= start+range %>">Next <%= range %> forums</a></font></td>
<%  } else { %>
	<td width="1%" nowrap><font size="-1">&nbsp;</font></td>
<%  } %>
</tr>
</table>



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

⌨️ 快捷键说明

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