📄 showtopic_tree.jsp
字号:
<lt:Label res="res.label.forum.showtopic" key="vote_type_multiple"/><%=mpd.getInt("max_choice")%>
<%}%>
</b></td>
</tr>
<tr>
<%
int barId = 0;
for (k=0; k<len; k++) {
MsgPollOptionDb opt = (MsgPollOptionDb)options.elementAt(k);
%>
<td width="46%">
<%=k+1%>.
<input type="<%=ctlType%>" name=votesel value="<%=k%>">
<%=opt.getString("content")%></td>
<td width="54%"><img src=images/vote/bar<%=barId%>.gif width="<%=bfb[k]-8%>%" height=10> <strong><%=re[k]%>
<lt:Label res="res.label.forum.showtopic" key="vote_unit"/>
</strong> <%=bfb[k]%>%
<%
if (showVoteUser.equals("1")) {
String[] userAry = StrUtil.split(opt.getString("vote_user"), ",");
if (userAry!=null) {
int userLen = userAry.length;
String userNames = "";
for (int n=0; n<userLen; n++) {
UserDb ud = um.getUser(userAry[n]);
if (userNames.equals(""))
userNames = ud.getNick();
else
userNames += ", " + ud.getNick();
}
out.print(userNames);
}
}
%>
</td>
</tr>
<%
barId ++;
if (barId==10)
barId = 0;
}%>
<tr><td colspan="2" align="center"><input name="button" type="button" onClick="window.location.href='?rootid=<%=rootid%>&showid=<%=showid%>&showVoteUser=1'" value="<lt:Label res="res.label.forum.showtopic" key="vote_show_user"/>">
<%
if (epDate!=null) {
if (DateUtil.compare(epDate, new java.util.Date()) == 1) {
%>
<input value="<lt:Label res="res.label.forum.showtopic" key="vote"/>" type="submit">
<%}else{%>
<b>
<lt:Label res="res.label.forum.showtopic" key="vote_end"/>
</b>
<%}
}else{%>
<input value="<lt:Label res="res.label.forum.showtopic" key="vote"/>" type="submit">
<%}%>
<input type=hidden name=boardcode value="<%=boardcode%>">
<input type=hidden name=boardname value="<%=boardname%>">
<input type=hidden name=voteid value="<%=id%>">
</td>
</tr>
</form>
</table>
<%}%>
<%if (msgdb.isRootMsg()) {%>
<ad:AdTag type="<%=AdDb.TYPE_TOPIC_RIGHT%>" boardCode="<%=boardcode%>"></ad:AdTag>
<%}%>
<div class="topic_content" id="topiccontent" name="topiccontent">
<%
if (!msgdb.getPlugin2Code().equals("")) {
Plugin2Mgr p2m = new Plugin2Mgr();
Plugin2Unit p2u = p2m.getPlugin2Unit(msgdb.getPlugin2Code());
out.print(p2u.getUnit().getRender().rend(request, msgdb));
}
out.print(render.RenderContent(request, msgdb));
// if (msgdb.getIsWebedit()==msgdb.WEBEDIT_REDMOON) {
String att = render.RenderAttachment(request, msgdb);
out.print(att);
// }
%>
</div></td>
</tr>
</table>
<span name="topiccontent"> </span>
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><%
if (!sign.equals("")) {
out.print("<font color=#777777>----------------------------------------------</font><BR>");
sign = StrUtil.toHtml(sign);
if (cfg1.getBooleanProperty("forum.sign_ubb"))
out.print(StrUtil.ubb(request, sign, true));
else
out.print(sign);
}
%> </td>
</tr>
</table></td>
</tr>
</tbody>
</table></td>
</tr>
<tr bgcolor=#ffffff>
<td align="center"><%
String ip = "";
if (privilege.isMasterLogin(request))
ip=msgdb.getIp();
else
ip = SkinUtil.LoadString(request, "res.label.forum.showtopic", "ip_view_not"); // "您无权察看";
%>
<img src="images/system.gif" alt="IP:<%=ip%>" align="absmiddle"> <%=lydate%></td>
<td align=right>
<hr width="100%" color="<%=skin.getTableBorderClr()%>" size=1>
<%if (privilege.isMasterLogin(request)) {%>
IP: <%=msgdb.getIp()%>
<%}%>
<%
String editpage = "edittopic_new.jsp";
if (iswebedit==MsgDb.WEBEDIT_UBB) {
editpage = "edittopic.jsp";
} else if (iswebedit==MsgDb.WEBEDIT_REDMOON) {
editpage = "edittopic_we.jsp";
}
String mstr = "<a href='addfriend.jsp?friend=" + StrUtil.UrlEncode(name) + "'>" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "add_friend") + "</a>";
mstr += "<a href='myfavoriate.jsp?op=add&privurl=" + privurl + "&id=" + rootid + "'>" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "add_favoriate") + "</a>";
mstr += "<a href=" + editpage + "?boardcode=" + StrUtil.UrlEncode(boardcode) + "&editid=" + id + "&privurl=" + privurl + ">" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "topic_edit") + "</a>";
mstr += "<a onClick=checkclick('" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "topic_del_confirm") + "') href=deltopic.jsp?" + "boardcode=" + StrUtil.UrlEncode(boardcode) + "&delid=" + id + "&privurl=" + privurl + ">" + SkinUtil.LoadString(request, "res.label.forum.showtopic", "topic_del") + "</a>";
%>
<a class="nav" href='#' onMouseOver="showmenu(event, "<%=mstr%>", 0)"><img src="images/edit.gif" border=0 align="absmiddle"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<%
if (showid==rootid) {
rootMsgDb.increaseHit();
}
String sql = "";
// sql = "select id from sq_message where rootid=" + rootid + " ORDER BY orders";
sql = SQLBuilder.getShowtopictreeSql(rootid);
long totalMsg = msgdb.getMsgCount(sql, boardcode, rootid);
MsgBlockIterator irmsg = msgdb.getMsgs(sql, boardcode, rootid, 0, totalMsg);
int layer = 1;
int i = 1;
if (irmsg.hasNext())
{
// 写根贴
MsgDb md = (MsgDb) irmsg.next();
id = md.getId();
topic = md.getTitle();
hit = md.getHit();
%>
<script language="JavaScript">
spanhit.innerHTML = '<%=hit%>';
</script>
<table bordercolor=#edeced cellspacing=0 cellpadding=1 width="98%" align=center border=1>
<tbody>
<tr>
<td noWrap align=left bgcolor=#f8f8f8 height="21" width="3%">
<img src="images/1.gif" border=0>
</td>
<td noWrap align=left bgcolor=#f8f8f8 height="21" width="97%">
<a name=#<%=id%>></a>
<% if (id!=showid) { %>
<a href="<%=ForumPage.getShowTopicPage(request, 1, rootid, id, 1, "")%>"><%=StrUtil.toHtml(topic)%></a></td>
<% } else { %>
<font color=red><%=StrUtil.toHtml(topic)%></font>
<% }%>
</tr>
</tbody>
</table>
<%
}
// 写跟贴
while (irmsg.hasNext())
{
i++;
MsgDb md = (MsgDb) irmsg.next();
id = md.getId();
name = md.getName();
layer = md.getLayer();
topic = md.getTitle();
content = md.getContent();
lydate = com.redmoon.forum.ForumSkin.formatDateTime(request, md.getAddDate());
%>
<table cellspacing=0 cellpadding=0 width="98%" align=center
border=0>
<tbody>
<tr>
<td noWrap align=left bgcolor=#f8f8f8 height="13" width="3%"> </td>
<td noWrap align=left bgcolor=#f8f8f8 height="13" width="97%">
<%
layer = layer-1;
for (int k=1; k<=layer-1; k++)
{ %>
<img src="" width=18 height=1>
<% }%>
<img src="images/join.gif" width="18" height="16">
<%
if (id!=showid) { %>
<a href="<%=ForumPage.getShowTopicPage(request, 1, rootid, id, 1, "")%>"><%=StrUtil.toHtml(topic)%></a>
<a target="_blank" href="../userinfo.jsp?username=<%=StrUtil.UrlEncode(md.getName())%>"><%=um.getUser(md.getName()).getNick()%></a> [<%=lydate%>]
<% } else { %>
<font color=red><%=StrUtil.toHtml(topic)%></font><a name="#<%=showid%>"></a>
<a href="#content<%=showid%>"><lt:Label res="res.label.forum.showtopic" key="go_topic"/></a>
<%}%>
</td>
</tr>
</tbody>
</table>
<%
}
%>
<%if (privilege.isUserLogin(request)) {
if (privilege.canUserDo(request, boardcode, "reply_topic")) {
%>
<FORM id="frmAnnounce" name="frmAnnounce" onSubmit="return formCheck()" action="addquickreplytodb.jsp?privurl=<%=privurl%>" method=post>
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#d3d3d3 height=120
cellSpacing=0 cellPadding=5 width="98%" align=center border=1>
<TBODY>
<TR>
<TD width=158 background="<%=skinPath%>/images/bg1.gif" height=20 class="text_title">
<lt:Label res="res.label.forum.showtopic" key="quick_reply"/></TD>
<TD background="<%=skinPath%>/images/bg1.gif"><B><FONT color=#ffffff>
</FONT></B> </TD></TR>
<TR>
<TD height=20 colspan="2"><%
if (vplugin.size()>0) {
Iterator irplugin = vplugin.iterator();
while (irplugin.hasNext()) {
PluginUnit pu = (PluginUnit)irplugin.next();
IPluginUI ipu = pu.getUI(request, response, out);
IPluginViewShowMsg pv = ipu.getViewShowMsg(boardcode, msgdb);
if (pv.IsPluginBoard()) {
boolean isShow = false;
if (pu.getType().equals(pu.TYPE_BOARD))
isShow = true;
else if (pu.getType().equals(pu.TYPE_TOPIC)) {
if (pu.getUnit().isPluginMsg(rootMsgDb.getId()))
isShow = true;
}
if (isShow) {
if (!pu.getAddReplyPage().equals("")) {
%>
<jsp:include page="<%=pu.getAddReplyPage()%>" flush="true">
<jsp:param name="msgRootId" value="<%=rootid%>" />
<jsp:param name="isQuickReply" value="true" />
</jsp:include>
<% }
else {
out.print(pu.getName(request) + " " + pv.render(UIShowMsg.POS_QUICK_REPLY_NOTE) + "<BR>");
out.print(pv.render(UIShowMsg.POS_QUICK_REPLY_ELEMENT) + "<BR>");
}
}
}
}
}
%></TD>
</TR>
<TR bgColor=#ffffff>
<TD height=20>
<lt:Label res="res.label.forum.showtopic" key="quick_reply_title"/> </TD>
<TD height=20><input name="topic" value="<%=SkinUtil.LoadString(request, "res.label.forum.showtopic", "reply") + StrUtil.toHtml(showtopic)%>" size="40">
<input type=hidden name="replyid" value="<%=rootid%>">
<input type=hidden name="boardcode" value="<%=boardcode%>">
<%
if (cfg1.getBooleanProperty("forum.addUseValidateCode")) {
%>
<lt:Label res="res.label.forum.showtopic" key="input_validatecode"/>
<input name="validateCode" type="text" size="1">
<img src='../validatecode.jsp' border=0 align="absmiddle" style="cursor:hand" onClick="this.src='../validatecode.jsp'" alt="<lt:Label res="res.label.forum.index" key="refresh_validatecode"/>">
<%}%> </TD>
</TR>
<TR bgColor=#ffffff>
<TD width=158 rowspan="3"><iframe src="iframe_browlist.jsp" height="120" width="98%" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes"></iframe>
<input type="hidden" name="expression" value="25">
<BR>
<input type=checkbox value=0 name=show_ubbcode>
<lt:Label res="res.label.forum.showtopic" key="forbid_ubb"/>
<BR>
<INPUT type=checkbox
value=0 name=show_smile>
<lt:Label res="res.label.forum.showtopic" key="forbid_emote"/></TD>
<TD vAlign=top align=left>
<TEXTAREA onkeydown=presskey() id=Content name=Content rows=6 cols=79 style="width:615"></TEXTAREA>
<BR> </TD></TR>
<TR bgColor=#ffffff>
<TD vAlign=top align=left><iframe src="iframe_emotequick.jsp" height="38" width="615" marginwidth="0" marginheight="0" frameborder="0" scrolling="yes"></iframe></TD>
</TR>
<TR bgColor=#ffffff>
<TD vAlign=top align=left><input tabindex=4 type=submit value="Ctrl+Enter <lt:Label res="res.label.forum.showtopic" key="reply_topic"/>" name=submit1>
<input onClick="checkclick('<lt:Label res="res.label.forum.showtopic" key="confirm_clear_content"/>')" type=reset value="<lt:Label res="res.label.forum.showtopic" key="re_write"/>" name=reset></TD>
</TR>
</TBODY></TABLE>
<table cellspacing=0 width="98%" align=center bgcolor=#d3d3d3 border=0>
<tbody>
<tr>
<td height=1></td>
</tr>
</tbody>
</table>
</FORM>
<%}
}%>
<%@ include file="inc/footer.jsp"%>
</BODY>
<script>
function setBrow(brow) {
frmAnnounce.expression.value = brow
}
</script>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -