📄 topic.jsp
字号:
<UL>
<LI class=friend><A href="./member/my_addfriend.jsp?uid=<%= userID %>" target=_blank>加为好友</A></LI>
<LI class=sms><A href="./member/sms_compose.jsp?uid=<%= userID %>" target=_blank>发短消息</A></LI>
</UL></TD>
<TD class=postdetail>
<DIV class=postinfo><STRONG title="ID:<%= aPost.replyID %>"><%= seqno %><SUP>#</SUP></STRONG>
发表于 <%= aPost.createTime %>
<%
if(isModerator && aPost.remoteIP != null){
out.write("IP: "); out.write(aPost.remoteIP); out.write(" ");
}
if (seqno == 0 && aTopic.updateUser != null && aTopic.updateUser.length() > 0) {
out.write(" 更新于 "); out.write(aTopic.updateTime);
out.write(" by "); out.write(aTopic.updateUser); out.write(" ");
}
if (replyID != null && replyID.length() > 0 && replyID.equals(aPost.replyID)) {
out.write("<font color='red'>( 回帖ID: " + replyID + " )</font>");
}
if (aPost.state == 'R') {
out.write("<font color='red'> ( 已删除 )</font>");
}
%>
</DIV>
<DIV class="postcontent">
<%
if (seqno == 0 && aTopic.reward > 0)
{
out.write("<p style='PADDING-BOTTOM: 15px; float: right'><span class='notice'><img src='styles/");
out.write(forumStyle); out.write("/images/reward.gif' border='0' align='absmiddle'/> 积分 ");
out.write(aTopic.reward + "</span></p>\n");
}
if (aPost.isBest == 'T')
out.write("<p style='PADDING-BOTTOM: 15px; float: right'><span class='notice'>"
+ "<img src='images/answer.gif' border='0' align='absmiddle'/> 最佳回复</span></p>\n");
if (aPost.title != null && aPost.title.length() > 0) {
%>
<H2><%= aPost.title %></H2>
<%
}
StringBuilder attaches = null;
if (aPost.attaches > 0 && aTopic.attachList != null)
{
AttachVO aAttach = null;
String attachTitle = null;
int attachCount = 0;
String attachURL = response.encodeURL("attach?aid=");
for (int j=0; j<aTopic.attachList.size(); j++)
{
aAttach = (AttachVO)aTopic.attachList.get(j);
if (!aAttach.replyID.equals(aPost.replyID)) continue;
attachCount++;
if (attachCount == 1)
{
attaches = new StringBuilder("<DIV class='box attachlist'><BR/>\n");
attaches.append("<P class='attach'>附件</P>\n");
if (!PageUtils.isPermitted(aBoard,userGroup,IConstants.PERMIT_DOWNLOAD))
{
attaches.append("<EM style='padding-left:6px'>您所在的用户组无法下载或查看附件</EM>\n");
break;
}
}
if (aAttach.title == null || aAttach.title.length() == 0)
attachTitle = "";
else
attachTitle = "<p>" + aAttach.title + "</p>";
attaches.append("<dl class='p_attachlist'><dt>\n")
.append("<img src='styles/").append(forumStyle)
.append("/images/i_attach.gif' border='0' class='absmiddle'/> \n")
.append("<a href='").append(attachURL).append(aAttach.attachID).append("' class='bold'>")
.append(aAttach.filename).append("</a> <em class='num'>(")
.append(aAttach.filesize*1.0/1000).append(" KB)</em></dt>\n");
attaches.append("<dd><p>").append(aAttach.createTime).append(", 下载次数: <em class='num'>")
.append(aAttach.downloads).append("</em>, 下载所需积分: <em class='num'>")
.append(aAttach.credits).append("</em></p>").append(attachTitle).append("</dd></dl>\n");
} // end for
if (attaches != null && attachCount > 0)
{
attaches.append("</DIV>");
}
}
%>
<DIV id="content_<%= seqno %>" class=contentmsg><%= aPost.content %></DIV>
<% if (attaches != null) { %>
<%= attaches.toString() %>
<% } %>
</DIV></TD></TR>
<TR>
<TD class=postfooter>
<DIV class=postactions><P>
<%
if (userinfo != null && userinfo.userID.equalsIgnoreCase(aPost.u_userID))
isAuthor = true;
else
isAuthor = false;
if (isAuthor)
{
if (userPostIDs == null)
userPostIDs = new StringBuilder();
if (seqno == 0)
userPostIDs.append('t').append(topicID).append(',');
else
userPostIDs.append('r').append(aPost.replyID).append(',');
}
if (seqno == 0 && (isAuthor || userGroup.rights.indexOf(IConstants.PERMIT_MOVE_POST) >= 0)) {
isManager = true;
%>
<a href="javascript:doManage('move', '0');">移动主题</a>
<% }
if (isAuthor || userGroup.rights.indexOf(IConstants.PERMIT_EDIT_POST) >= 0) {
isManager = true;
%>
<a href="javascript:doEdit('<%= aPost.replyID %>');">修改</a>
<%
}
if (userGroup.rights.indexOf(IConstants.PERMIT_DELETE_POST) >= 0 && aPost.state != 'R') {
isManager = true;
%>
<a href="javascript:doManage('delete', '<%= aPost.replyID %>');">删除</a>
<% }
if (aTopic.state != 'C') {
%>
<a href="javascript:doReply('<%= seqno %>','<%= nickname %>');">回复</a>
<% } %>
<a href="javascript:doQuote('<%= seqno %>','<%= nickname %>','<%= aPost.createTime %>');">引用</a>
<a href="javascript:doReport('<%= aPost.replyID %>');">举报</a>
<% if (seqno > 0 && userinfo != null && userinfo.userID.equalsIgnoreCase(aTopic.userID)) {
isManager = true;
%>
<a href="javascript:doManage('setbest', '<%= aPost.replyID %>');">最佳回复</a>
<% } %>
<SPAN title="顶部" class="scrolltop" onclick="scroll(0,0)">TOP</SPAN> </P></DIV></TD></TR></TBODY></TABLE></DIV>
<%
}
if (userPostIDs != null)
session.setAttribute("userPostIDs", userPostIDs.toString());
%>
<DIV class=pages_btns>
<div class="pages"><a href="<%= forumUrl %>" class="next"> ‹‹ 返回主题列表</a></div>
<%
if (aTopic.pageHTML != null)
{
%>
<%= aTopic.pageHTML %>
<%
}
%>
<SPAN class=postbtn id="newtopictmp" onmouseover="$('newtopic').id = 'newtopictmp';this.id = 'newtopic';showMenu(this.id);">
<A href="<%= postUrl %>"><IMG src="styles/<%= forumStyle %>/images/newtopic.gif" border=0></A></SPAN>
<SPAN class=replybtn><A href="javascript:replyTopic();">
<IMG alt="发表回复" src="styles/<%= forumStyle %>/images/reply.gif" border=0></A></SPAN></DIV>
<SCRIPT type=text/javascript>
var replyUrl = "<%= postUrl %>" + "&tid=<%= topicID %>";
var topicUrl = "<%= topicUrl %>";
var reportUrl = "<%= reportUrl %>";
var isClosed = <%= aTopic.state=='C'?"true":(aTopic.replies>=maxReplies?"true":"false") %>;
var isDigest = <%= aTopic.isDigest=='T'?"true":"false" %>;
<%
if (isManager) {
sbuf.setLength(0);
sbuf.append("manage.jsp?sid=").append(sectionID).append("&fid=").append(boardID)
.append("&chkTopicID=").append(topicID).append("&page=").append(pageNo);
%>
var manageUrl = "<%= response.encodeURL(sbuf.toString()) %>";
function doEdit(replyId)
{
<% if (!isModerator) { %>
if (isDigest && replyId == '0')
{
alert('此主题已被加为精华,不能再修改 ');
return;
}
if (isClosed)
{
alert('此主题已经关闭,不能再修改 ');
return;
}
<% } %>
$('frmpost').action = replyUrl + "&rid=" + replyId + "&act=edit&page=<%= pageNo %>";
$('frmpost').subject.value = "";
$('frmpost').content.value = "";
$('frmpost').submit();
}
function doManage(action, replyId)
{
<% if (!isModerator) { %>
if (action == 'move')
{
if (isDigest)
{
alert('此主题已被加为精华,不能再移动 ');
return;
}
if (isClosed)
{
alert('此主题已经关闭,不能再移动 ');
return;
}
}
if (action == 'setbest' && isClosed)
{
alert('此主题已经关闭,不能再设置最佳回复 ');
return;
}
<% } %>
$('frmpost').action = manageUrl + "&rid=" + replyId + "&act=" + action;
$('frmpost').subject.value = "";
$('frmpost').content.value = "";
$('frmpost').submit();
}
<%
}
%>
</SCRIPT>
<DIV class=legend id=footfilter><DIV class=jump_sort><form id="frmsort" name="frmsort" action="<%= forumUrl %>" method="post">
<SELECT onchange="if(this.options[this.selectedIndex].value != ''){window.location = this.options[this.selectedIndex].value;}">
<OPTION value="" selected>版块跳转 ...</OPTION>
<%
if (sections != null)
{
SectionVO tmpSection = null;
BoardVO tmpBoard = null;
String tmpUrl = null;
StringBuilder sb = new StringBuilder();
for (int i=0; i<sections.size(); i++)
{
tmpSection = (SectionVO)sections.get(i);
if (tmpSection.boardList == null) continue;
sb.append("<OPTGROUP label=\"").append(tmpSection.sectionName).append("\">\n");
for (int j=0; j<tmpSection.boardList.size(); j++)
{
tmpBoard = (BoardVO)tmpSection.boardList.get(j);
if (tmpBoard.state == 'I' && !isModerator) continue;
sbuf.setLength(0);
sbuf.append("./forum-").append(tmpSection.sectionID).append("-").append(tmpBoard.boardID).append("-1.html");
tmpUrl = response.encodeURL(sbuf.toString());
sb.append("<OPTION value=\"").append(tmpUrl).append("\"> > ")
.append(tmpBoard.boardName).append("</OPTION>\n");
}
sb.append("</OPTGROUP>");
}
out.write(sb.toString());
}
%>
</SELECT></form>
<form id="frmpost" name="frmpost" action="<%= postUrl %>" method="post">
<INPUT type=hidden value="<%= aTopic.title.replace("\"", """) %>" name="topic">
<INPUT type=hidden value="" name="subject">
<INPUT type=hidden value="" name="content">
</form>
</DIV></DIV></DIV>
<%= menus[1]==null?"":menus[1] %>
<%= menus[2]==null?"":menus[2] %>
<%= PageUtils.getFootAdBanner(request, aBoard) %>
<%= PageUtils.getFooter(request, forumStyle) %>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -