📄 post.jsp
字号:
<a href="forum.jsp?forum=<%= forumID %>" title="返回论坛主题列表"
><%= forum.getName() %></a>
</b>
</font>
<p>
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<% if (reply) { %>
在<a href="forum.jsp?forum=<%= forumID %>"><%= forum.getName() %></a>论坛中回应<b><%= parentMessage.getSubject() %></b>消息.
<% } else { %>
在<a href="forum.jsp?forum=<%= forumID %>"><%= forum.getName() %></a>发新帖.
<% } %>
</font>
<p>
</td>
<td valign="top" width="1%" align="center">
<%@ include file="loginbox.jsp" %>
</td>
</tr>
</table>
<p>
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<% if (reply) { %>
请在下面的表格中输入回复此主题的信息,当您输入完毕您可以选择下面“预览”
按钮预览信息。或者可以直接选择“发表”按钮,直接发布信息。 <br>
<% if (isMsgModOn) { %>
<p>
<font color="#cc3300">
<b>请注意</b>:您的回复在批准后才会发布在论坛里!!! <br>
</font>
<% } %>
<% } else { %>
请在下面的表格中输入您想发布的信息,当您输入完毕您可以选择下面“预览”
按钮预览信息。或者可以直接选择“发表”按钮,直接发布信息。 <br>
<% if (isThreadModOn) { %>
<p>
<font color="#cc3300">
<b>请注意</b>:您发布的信息在批准后才会发布在论坛里!!! <br>
</font>
<% } %>
<% } %>
</font>
<p>
<% if (errors) { %>
<font class=p2 color="#990000" face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<i><%= errorMessage %></i>
</font>
<p>
<% } %>
<script language="JavaScript" type="text/javascript">
<!--
var checked = false;
function checkPost() {
if (!checked) {
checked = true;
return true;
}
return false;
}
//-->
</script>
<form action="post.jsp" method="post" name="postForm" onsubmit="return checkPost();">
<input type="hidden" name="doPost" value="true">
<input type="hidden" name="reply" value="<%=reply%>">
<input type="hidden" name="forum" value="<%=forumID%>">
<input type="hidden" name="thread" value="<%=threadID%>">
<input type="hidden" name="message" value="<%=messageID%>">
<% if (!isGuest) { %>
<input type="hidden" name="isLoggedIn" value="true">
<% } %>
<% // Add an "Re: " to the subject if this is a reply
if (reply) {
subject = parentMessage.getSubject();
if (!subject.startsWith("Re: ")) {
subject = "Re: " + subject;
}
}
// Escape any quotes in the subject.
if (subject != null) {
subject = StringUtils.replace(subject, "\"", """);
}
%>
<table cellpadding="4" cellspacing="0" border="0">
<% if (isGuest) { %>
<tr>
<td align="right"><font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">姓名</font></td>
<td><input type="text" name="name" value="<%= ((name!=null)?name:"") %>" size="30" maxlength="75"></td>
</tr>
<tr>
<td align="right"><font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">Email</font></td>
<td><input type="text" name="email" value="<%= ((email!=null)?email:"") %>" size="30" maxlength="75"></td>
</tr>
<% } %>
<tr>
<td align="right"><font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">标题</font></td>
<td><input type="text" name="subject" value="<%= ((subject!=null)?subject:"") %>" size="40" maxlength="75"></td>
</tr>
<% // Display the "Quote Original" button
if (reply) { %>
<tr>
<td> </td>
<td><font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<a href="post.jsp?forum=<%=forumID%>&thread=<%=threadID%>&message=<%=messageID%>&reply=<%=reply%>"e=true"
>[引用原文]</a>
</font>
</td>
</tr>
<% } %>
<script language="JavaScript" type="text/javascript">
<!--
function tag(el, theTag) {
if (theTag == 'b') {
el.value += "[b][/b]";
} else if (theTag == 'i') {
el.value += "[i][/i]";
} else if (theTag == 'u') {
el.value += "[u][/u]";
} else if (theTag == 'code') {
el.value += "\n[code]\n// 在此输入java代码\n[/code]";
} else if (theTag == 'image') {
var url = prompt("请输入一个图片的URL","http://");
if (url != null) {
el.value += "[img]" + url + "[/img]";
}
} else if (theTag == 'url') {
var url = prompt("请输入链接的URL","http://");
var text = prompt("请输入链接文本");
if (url != null) {
if (text != null) {
el.value += "[url=" + url + "]" + text + "[/url]";
} else {
el.value += "[url]" + url + "[/url]";
}
}
}
}
function MM_openBrWindow(theURL,features) { //v2.0
window.open(theURL,"adwin",features);
}
//-->
</script>
<tr>
<td> </td>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr><td>
<a href="#" onclick="tag(document.postForm.body,'b');return false;"
><img src="images/b.gif" width="20" height="22" alt="黑体" border="0"
></a>
</td>
<td><img src="images/blank.gif" width="5" height="1" border="0"></td>
<td>
<a href="#" onclick="tag(document.postForm.body,'i');return false;"
><img src="images/i.gif" width="20" height="22" alt="斜体" border="0"
></a>
</td>
<td><img src="images/blank.gif" width="5" height="1" border="0"></td>
<td>
<a href="#" onclick="tag(document.postForm.body,'u');return false;"
><img src="images/u.gif" width="20" height="22" alt="下划线" border="0"
></a>
</td>
<td><img src="images/blank.gif" width="5" height="1" border="0"></td>
<td>
<a href="#" onclick="MM_openBrWindow('upload.jsp?pic=<%=pageUser.getUsername()%>','width=450,height=400,scrollbars=yes')"
><img src="images/image.gif" width="38" height="22" alt="插入图片" border="0" ></a>
</td>
<td><img src="images/blank.gif" width="5" height="1" border="0"></td>
<td>
<a href="#" onclick="MM_openBrWindow('uploadfile.jsp?pic=<%=pageUser.getUsername()%>','width=450,height=250,scrollbars=yes')"
><img src="images/file.gif" width="46" height="22" alt="插入附件" border="0" ></a>
</td>
<td><img src="images/blank.gif" width="5" height="1" border="0"></td>
<td>
<a href="#" onclick="tag(document.postForm.body,'code');return false;"
><img src="images/code.gif" width="46" height="22" alt="插入Java代码" border="0"
></a>
</td>
<td><img src="images/blank.gif" width="5" height="1" border="0"></td>
<td>
<a href="#" onclick="tag(document.postForm.body,'url');return false;"
><img src="images/link.gif" width="46" height="22" alt="网址链接" border="0"></a>
</td>
<td><img src="images/blank.gif" width="5" height="1" border="0"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" align="right">
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<% if (reply) { %>
您的回复
<% } else { %>
消息
<% } %>
</font>
</td>
<% int textareaCols = 65;
int textareaRows = 15;
if (quote) {
String pBody = parentMessage.getUnfilteredBody();
if (pBody != null) {
body = SkinUtils.quoteOriginal(pBody,"> ",54);
body += "\n";
}
}
%>
<td><textarea name="body" wrap="virtual" cols="<%= textareaCols %>" rows="<%= textareaRows %>"
><%= ((body!=null)?body:"") %></textarea>
</td>
</tr>
<% if (!isGuest) { %>
<tr>
<td> </td>
<% if (reply) { %>
<input type="hidden" name="wasAutoWatchReplies" value="<%= (autoWatchReplies)?"true":"false" %>">
<td><input type="checkbox" name="addWatch"
id="cb"<%= (autoWatchReplies)?" checked":"" %>>
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
><label for="cb">监控此主题</label></font>
</td>
<% } else { %>
<input type="hidden" name="wasAutoWatchNewTopics" value="<%= (autoWatchNewTopics)?"true":"false" %>">
<td><input type="checkbox" name="addWatch"
id="cb"<%= (autoWatchNewTopics)?" checked":"" %>>
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>"
><label for="cb">监控此主题</label></font>
</td>
<% } %>
</tr>
<% } %>
<tr>
<td> </td>
<td>
<input type="submit" value="预 览" name="formButton">
<input type="submit" value="发 表" name="formButton">
</td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
<% if (subject == null) { %>
document.postForm.subject.focus();
<% } else { %>
document.postForm.body.focus();
<% } %>
//-->
</script>
</form>
<p>
<% // Show the original message
if (reply) {
User author = parentMessage.getUser();
long parentForumID = parentMessage.getForumThread().getForum().getID();
long parentThreadID = parentMessage.getForumThread().getID();
long parentID = parentMessage.getID();
%>
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<b>原始信息</b>
</font>
<p>
<table bgcolor="<%= JiveGlobals.getJiveProperty("skin.default.tableBorderColor") %>"
cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td>
<table bgcolor="<%= JiveGlobals.getJiveProperty("skin.default.tableBorderColor") %>"
cellpadding="4" cellspacing="1" border="0" width="100%">
<tr bgcolor="<%= JiveGlobals.getJiveProperty("skin.default.tableRowColor1") %>">
<td width="1%" rowspan="2" valign="top">
<table cellpadding="0" cellspacing="0" border="0" width="140">
<tr><td>
<font size="-1" face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<% if (author == null) {
// Check to see if there is an extended property for name & email
// since the gateway feature imports names and emails as extended
// props.
String guestName = parentMessage.getProperty("name");
String guestEmail = parentMessage.getProperty("email");
String nameAndEmail = myEnv.du.getNameAndEmailDisplay(guestName, guestEmail);
if (nameAndEmail != null) {
%>
<i>客人: <%= nameAndEmail %></i>
<% } else { %>
<i>客人</i>
<% }
} else {
// author != null
String authorName = author.getName();
String userStatus = author.getProperty("status");
%>
<a href="profile.jsp?user=<%= author.getID() %>" title="<%= (authorName!=null)?authorName:"" %>"
><b><%= author.getUsername() %></b></a>
</font>
<font class=p2 face="verdana,arial,sans-serif">
<br><br>
发表文章: <%= userManager.userMessageCount(author) %>
<br>
<% String location = author.getProperty("location");
if (location != null) { %>
来 自: <%= location %><br>
<% } %>
注册时间: <%= myEnv.shortDateFormatter.format(author.getCreationDate()) %>
<br><br>
<% } %>
</font>
</td>
</tr>
</table>
</td>
<td width="97%">
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<b><%= parentMessage.getSubject() %></b>
</font>
</td>
<td width="1%" nowrap>
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
发表时间: <%= SkinUtils.formatDate(request,response,pageUser,parentMessage.getCreationDate()) %>
</font>
</td>
<td width="1%" nowrap align="center">
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td><img src="images/reply.gif" width="17" height="17" alt="回复此消息" hspace="3" border="0"></td>
<td>
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<b>回复</b>
</font>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="<%= JiveGlobals.getJiveProperty("skin.default.tableRowColor1") %>">
<td width="99%" colspan="3" valign="top">
<font class=p2 face="<%= JiveGlobals.getJiveProperty("skin.default.fontFace") %>">
<%= parentMessage.getBody() %>
</font>
<p>
</td>
</tr>
</table>
</td></tr>
</table>
<% } // end if reply %>
<br>
<%@ include file="footer.jsp" %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -