📄 editforum.jsp
字号:
<%
/**
* $RCSfile: editForum.jsp,v $
* $Revision: 1.1.1.1 $
* $Date: 2002/09/09 13:50:26 $
*/
%>
<%@ page import="java.util.*,
java.text.*,
com.jivesoftware.forum.*,
com.jivesoftware.forum.util.*"%>
<%@ include file="include/global.jsp" %>
<%! // Global vars, methods, etc...
// Date formatter for creation date/modified date
SimpleDateFormat dateFormatter = new SimpleDateFormat("");
%>
<% // Get parameters
int forumID = ParamUtils.getIntParameter(request,"forum",-1);
String name = ParamUtils.getParameter(request,"name");
String description = ParamUtils.getParameter(request,"description",true);
boolean saveName = ParamUtils.getBooleanParameter(request,"saveName");
// Load up the forum specified
Forum forum = forumFactory.getForum(forumID);
// Put the forum in the session (is needed by the sidebar)
session.setAttribute("admin.sidebar.forums.currentForum", forum);
// save the name & description if requested
if (saveName) {
if (name != null) {
forum.setName(name);
}
if (description != null) {
forum.setDescription(description);
}
setOneTimeMessage(session,"message","Changes saved.");
response.sendRedirect("editForum.jsp?forum="+forumID);
return;
}
name = forum.getName();
description = forum.getDescription();
%>
<% // 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 = "Edit Forum Properties";
String[][] breadcrumbs = {
{"Main", "main.jsp"},
{"Forums", "forums.jsp"},
{"Edit Forum", "editForum.jsp?forum="+forumID}
};
%>
<%@ include file="include/title.jsp" %>
<font size="-1">
Set the name and description of a forum below.
</font>
<p>
<font size="-1"><b>Edit Name and Description</b></font>
<ul>
<font size="-1">
Change the name or description of this forum using the forum below.
</font>
<p>
<% String message = getOneTimeMessage(session,"message");
if (message != null) {
%>
<font size="-1" color="<%= messageColor %>"><b><i><%= message %></i></b></font>
<p>
<% } %>
<form action="editForum.jsp">
<input type="hidden" name="saveName" value="true">
<input type="hidden" name="forum" value="<%= forumID %>">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td><font size="-1">Name:</font></td>
<td><input type="text" name="name" size="40" maxlength="100" value="<%= (name!=null)?name:"" %>"></td>
</tr>
<tr>
<td valign="top"><font size="-1">Description:</font></td>
<td><textarea name="description" cols="40" rows="5" wrap="virtual"><%= (description!=null)?description:"" %></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" value="Save Changes"></td>
</tr>
</table>
</form>
</ul>
<font size="-1"><b>General Information</b></font>
<ul>
<table bgcolor="<%= tableBorderColor %>" cellpadding="0" cellspacing="0" border="0" width="">
<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>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>CREATED ON</b></font></td>
<td align="center"><font size="-2" face="verdana"><b>LAST MODIFIED</b></font></td>
</tr>
<tr bgcolor="#ffffff">
<td align="center"><font size="-1"><%= forum.getThreadCount() %></font></td>
<td align="center"><font size="-1"><%= forum.getMessageCount() %></font></td>
<td align="center"><font size="-1"> <%= JiveGlobals.formatDateTime(forum.getCreationDate()) %> </font></td>
<td align="center"><font size="-1"> <%= JiveGlobals.formatDateTime(forum.getModifiedDate()) %> </font></td>
</tr>
</table>
</td></tr>
</table>
</ul>
<form action="forums.jsp">
<br><hr size="1">
<center>
<input type="submit" value="Back to Forum Listing">
</center>
</form>
<p>
<jsp:include page="include/footer.jsp" flush="true"/>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -