📄 forumcontent_thread.jsp
字号:
<%
/**
* $RCSfile: forumContent_thread.jsp,v $
* $Revision: 1.1.1.1 $
* $Date: 2002/09/09 13:50:27 $
*/
%>
<%@ page import="java.util.*,
java.text.SimpleDateFormat,
com.jivesoftware.forum.*,
com.jivesoftware.forum.util.*"
errorPage="error.jsp"
%>
<%@ include file="include/global.jsp" %>
<% // Get parameters
long forumID = ParamUtils.getLongParameter(request,"forum",-1L);
long threadID = ParamUtils.getLongParameter(request,"thread",-1L);
long messageID = ParamUtils.getLongParameter(request,"message",-1L);
int start = ParamUtils.getIntParameter(request,"start",0);
int range = ParamUtils.getIntParameter(request,"range",20);
boolean delete = ParamUtils.getBooleanParameter(request,"delete");
// Load the forum we're working with
Forum forum = forumFactory.getForum(forumID);
// Optionally load the thread we're working with
ForumThread thread = null;
if (threadID != -1L) {
thread = forum.getThread(threadID);
}
// Optionally load the thread we're working with
ForumMessage message = null;
if (messageID != -1L) {
message = thread.getMessage(messageID);
}
// Number of replies to this thread
int replyCount = thread.getMessageCount()-1;
%>
<% // 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 Thread";
String[][] breadcrumbs = {
{"Main", "main.jsp"},
{"Forums", "forums.jsp"},
{"Edit Forum", "editForum.jsp?forum="+forumID},
{"Manage Content", "forumContent.jsp?forum="+forumID},
{title, "forumContent_thread.jsp?forum="+forumID+"&thread="+threadID+"&message="+messageID}
};
%>
<%@ include file="include/title.jsp" %>
<font size="-1">
Manage the content of individual threads.
</font>
<p>
<b><%= thread.getName() %></b></font>
<br>
<font size="-1">
<%= replyCount %> <%= (replyCount==1)?"reply":"replies" %> to this thread.
</font>
<p>
<% // loop through all threads in the forum
ResultFilter filter = new ResultFilter();
filter.setStartIndex(start);
filter.setNumResults(range);
filter.setSortOrder(ResultFilter.ASCENDING);
Iterator messages = thread.messages(filter);
while (messages.hasNext()) {
ForumMessage theMessage = (ForumMessage)messages.next();
%>
<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>
<td bgcolor="#eeeeee">
<table cellspacing="2" cellpadding="0" border="0" width="100%">
<tr>
<td width="99%">
<font size="-1">
<b><%= theMessage.getSubject() %></b>
<br>
<%= JiveGlobals.formatDateTime(theMessage.getCreationDate()) %>
</font>
</td>
<td width="1%" nowrap>
<!--<img src="images/button_edit.gif" width="17" height="17" alt="" border="0">-->
<a href="forumContent_delete.jsp?forum=<%= forumID %>&thread=<%= theMessage.getForumThread().getID() %>&message=<%= theMessage.getID() %>"
><img src="images/button_delete.gif" width="17" height="17" alt="Click to delete this message and its replies" border="0"
></a>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#ffffff">
<td>
<font size="-1">
<%= theMessage.getBody() %>
</font>
</td>
</tr>
</table>
</td></tr>
</table>
<br>
<% } %>
<p>
<jsp:include page="include/footer.jsp" flush="true"/>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -