📄 showblog.jsp
字号:
<TBODY>
<TR height=100%>
<TD height="22" class="showblog_td_title"><B><span class="text_title"><lt:Label res="res.label.forum.showtopic" key="topic"/><%=msgdb.getTitle()%></span></B></TD>
<TD width="34%" class="showblog_td_title"><lt:Label res="res.label.forum.showblog" key="add_date"/><%=lydate%> </TD>
</TR>
<TR>
<TD colSpan=2 class="blog_td_spacer_down"></TD>
</TR>
<TR>
<TD class="showblog_td_author"><lt:Label res="res.label.forum.showblog" key="author"/><%=user.getNick()%>
<%
OnlineUserDb ou = new OnlineUserDb();
ou = ou.getOnlineUserDb(user.getName());
if (ou.isLoaded())
out.print(SkinUtil.LoadString(request,"res.label.forum.showblog","online"));
else
out.print(SkinUtil.LoadString(request,"res.label.forum.showblog","offline"));
%></TD>
<TD class="showblog_td_author"><%=SkinUtil.LoadString(request, "res.label.forum.showtopic", "reply")%><%=totalmsg-1%> <lt:Label res="res.label.forum.showblog" key="view"/><%=msgdb.getHit()%></TD>
</TR>
<TR vAlign=top>
<TD colSpan=2><%
MsgPollDb mpd = null;
mpd = render.RenderVote(request, msgdb);
if (type==1 && mpd!=null) {%>
<table width="100%" border="1" cellpadding="4" cellspacing="0" borderColor="#edeced">
<%
String ctlType = "radio";
if (mpd.getInt("max_choice")>1)
ctlType = "checkbox";
Vector options = mpd.getOptions(msgdb.getId());
int len = options.size();
int[] re = new int[len];
int[] bfb = new int[len];
int total = 0;
int k = 0;
for (k=0; k<len; k++) {
MsgPollOptionDb opt = (MsgPollOptionDb)options.elementAt(k);
re[k] = opt.getInt("vote_count");
total += re[k];
}
if (total!=0) {
for (k=0; k<len; k++) {
bfb[k] = (int)Math.round((double)re[k]/total*100);
}
}
%>
<form action="vote.jsp?privurl=<%=privurl%>" name=formvote method="post">
<tr>
<td colspan="2" bgcolor="#EBECED"><b>
<lt:Label res="res.label.forum.showtopic" key="vote"/>
<%
java.util.Date epDate = mpd.getDate("expire_date");
if (epDate!=null) {%>
<lt:Label res="res.label.forum.showtopic" key="vote_expire_date"/>
<%=ForumSkin.formatDate(request, epDate)%>
<%}%>
<%if (mpd.getInt("max_choice")==1) {%>
<lt:Label res="res.label.forum.showtopic" key="vote_type_single"/>
<%}else{%>
<lt:Label res="res.label.forum.showtopic" key="vote_type_multiple"/>
<%=mpd.getInt("max_choice")%>
<%}%>
</b></td>
</tr>
<tr>
<%
int barId = 0;
String showVoteUser = ParamUtil.get(request, "showVoteUser");
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;
UserMgr um2 = new UserMgr();
String userNames = "";
for (int n=0; n<userLen; n++) {
UserDb ud = um2.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%>&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 name="submit" type="submit" value="<lt:Label res="res.label.forum.showtopic" key="vote"/>">
<%}else{%>
<b>
<lt:Label res="res.label.forum.showtopic" key="vote_end"/>
</b>
<%}
}else{%>
<input name="submit" type="submit" value="<lt:Label res="res.label.forum.showtopic" key="vote"/>">
<%}%>
<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>
<%}%>
<span name="content<%=i%>"><br>
<%
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);
if (!att.equals(""))
out.print("<BR>" + att);
//}
%>
</span></TD>
</TR>
<TR vAlign=top>
<TD colspan="2" height=1 background="../blog/skin/default/images/dot.gif"></TD>
</TR>
<TR vAlign=top height=20>
<TD height="26" colspan="2" valign="middle" class="blog_td_seperate"><lt:Label res="res.label.forum.showblog" key="link"/><%=Global.getRootPath()%>/blog/showblog.jsp?rootid=<%=rootid%></TD>
</TR>
</TBODY>
</TABLE>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
<table width="100%" border="0" class="table_main_text">
<tr>
<td colspan="2" class="showblog_td_title"> <lt:Label res="res.label.forum.showblog" key="comments"/></td>
</tr>
<tr>
<td width="1"></td>
<td><%
if (irmsg.hasNext() && curpage==1) {
irmsg.next(); // 跳过root贴子
}
while (irmsg.hasNext()) {
msgdb = (MsgDb)irmsg.next();
lydate = DateUtil.format(msgdb.getAddDate(), "yy-MM-dd HH:mm");
if (lydate.length()>=19)
lydate = lydate.substring(0,19);
%>
<table width="80%" border="0" cellpadding="5">
<tr>
<td width="20%" align="right">─ <lt:Label res="res.label.forum.showblog" key="commenter"/><a name="#<%=msgdb.getId()%>"></a></td>
<td width="80%"><%=um.getUser(msgdb.getName()).getNick()%> <%=lydate%> </td>
</tr>
<tr>
<td> </td>
<td><%
out.print(render.RenderContent(request, msgdb));
%></td>
</tr>
<tr>
<td class="blog_td_spacer_down"></td>
<td height=1 class="blog_td_spacer_down"></td>
</tr>
</table>
<%}%>
<%
}
if (paginator.getCurPage()==1) {
rootMsgDb.increaseHit();
}
%>
<%
if (!op.equals("allcomm")) {%>
<table width="98%" border="0" cellspacing="1" cellpadding="3" align="center" class="9black">
<tr>
<td width="2%" height="23"> </td>
<td width="76%" valign="baseline" height="23"><div align="right">
<%
String querystr = "&rootid="+rootid;
out.print(paginator.getCurPageBlock("?boardcode=" + boardcode + querystr));
%>
</div></td>
<td width="22%" height="23"> </td>
</tr>
</table>
<%}%>
<%if (!privilege.isUserLogin(request)) {%>
<table width="100%" border="0">
<tr>
<td align="right">>> <lt:Label res="res.label.forum.showblog" key="please"/><a href="../door.jsp"><lt:Label res="res.label.forum.showblog" key="login"/></a><lt:Label res="res.label.forum.showblog" key="msg"/><a href="../regist.jsp"><lt:Label res="res.label.forum.showblog" key="reg"/></a>? </td>
</tr>
</table>
<%}else{%>
<table style="BORDER-COLLAPSE: collapse" bordercolor=#d3d3d3 height=120
cellspacing=0 cellpadding=5 width="98%" align=center border=1>
<form name="frmAnnounce" onSubmit="return formCheck()" action="addquickreplytodb.jsp?privurl=<%=privurl%>" method=post>
<tbody>
<tr>
<td height=26 colspan="2" align="center" class="td_comment_bar">
<a name="comment"></a>
<lt:Label res="res.label.forum.showblog" key="comment"/></td>
</tr>
<tr bgcolor=#ffffff>
<td height=20> <lt:Label res="res.label.forum.showtopic" key="quick_reply_title"/></td>
<td width="354" height=20><input name="topic" value="<%="Re:"+roottopic%>" size="40">
<input type=hidden name="replyid" value="<%=rootid%>">
<input type=hidden name="boardcode" value="<%=boardcode%>">
<input type=hidden name="isWebedit" value="1">
<input type=hidden name="expression" value="25">
<%
if (cfg1.getBooleanProperty("forum.addUseValidateCode")) {
%>
<br>
<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">
<%}%>
</td>
</tr>
<tr bgcolor=#ffffff>
<td width=67>
<lt:Label res="res.label.forum.showblog" key="content"/><br></td>
<td valign=top><div align=left>
<%
String rpath = request.getContextPath();
%>
<textarea id="Content" name="Content" style="display:none"></textarea>
<link rel="stylesheet" href="<%=rpath%>/editor/edit.css">
<script src="<%=rpath%>/editor/DhtmlEdit.js"></script>
<script src="<%=rpath%>/editor/editjs.jsp"></script>
<script src="<%=rpath%>/editor/editor_s.jsp"></script>
<script>
setHtml(form1.boardRule);
</script>
<br>
<input tabindex=4 type=submit value="<lt:Label res="res.label.forum.showblog" key="comment"/>" 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>
</div></td>
</tr>
</form>
</tbody>
</table>
<%}%></td>
</tr>
</table>
</td>
</tr>
</table>
<%@ include file="../blog/footer.jsp"%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -