📄 _showtopic__jsp.java
字号:
com.redmoon.forum.security.IPMonitor ipm = new com.redmoon.forum.security.IPMonitor();
String rootpath = request.getContextPath(); // \u5f53\u8fd0\u7528\u4e8ehopenWin\u4e2d\u65f6\uff0crootpath\u4f1a\u4e3a\u7a7a\u5b57\u7b26\u4e32
if (!ipm.isIPCanVisit(request.getRemoteAddr())) {
// \u9632\u6b62\u8fdb\u5165info.jsp\u9875\u9762\u65f6\u53cd\u590dredirect
if (hUrl.indexOf("/info.jsp")==-1) {
response.sendRedirect(rootpath + "/info.jsp?info=" + StrUtil.UrlEncode(SkinUtil.LoadString(request, "res.label.forum.inc.header", "ipvisitlist")));
return;
}
}
TimeConfig tc = new TimeConfig();
if (tc.isVisitForbidden(request)) {
if (hUrl.indexOf("/info.jsp")==-1) {
String str = SkinUtil.LoadString(request, "res.label.forum.inc.header", "time_visit_forbid");
str = StrUtil.format(str, new Object[] {tc.getProperty("forbidVisitTime1"), tc.getProperty("forbidVisitTime2")});
response.sendRedirect(rootpath + "/info.jsp?info=" + StrUtil.UrlEncode(str));
return;
}
}
// String rootpath = Global.getRootPath(); // "http://" + Global.server + ":" + Global.port + "/" + Global.virtualPath; // "http://www.zjrj.cn";
String hboardcode,hboardname;
hboardcode = ParamUtil.get(request, "boardcode");
hboardname = ParamUtil.get(request, "boardname");
if (hboardcode==null)
hboardcode = "";
if (hboardname == null)
hboardname = "";
hboardname = cn.js.fan.util.StrUtil.UrlEncode(hboardname);
String hSessionBoardCode = UserSession.getBoardCode(request);
ThemeMgr tm = new ThemeMgr();
Theme hTheme = tm.getTheme("default");
if (!hSessionBoardCode.equals("")) {
Leaf hleaf = new Leaf();
hleaf = hleaf.getLeaf(hSessionBoardCode);
String theme = "";
if (hleaf!=null)
theme = hleaf.getTheme();
if (theme==null || theme.equals(""))
;
else {
Theme t = tm.getTheme(theme);
if (t!=null) {
hTheme = t;
}
}
}
out.write(_jsp_string25, 0, _jsp_string25.length);
out.print((rootpath));
out.write(_jsp_string26, 0, _jsp_string26.length);
out.print((hTheme.getHeight()));
out.write(_jsp_string27, 0, _jsp_string27.length);
out.print((rootpath));
out.print((hTheme.getPath() + "/" + hTheme.getBanner()));
out.write(_jsp_string28, 0, _jsp_string28.length);
if (_jsp_AdTag_1 == null) {
_jsp_AdTag_1 = new com.redmoon.forum.ad.AdTag();
_jsp_AdTag_1.setPageContext(pageContext);
_jsp_AdTag_1.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_AdTag_1.setType(AdDb.TYPE_HEADER);
_jsp_AdTag_1.setBoardCode(hSessionBoardCode);
_jsp_AdTag_1.doEndTag();
out.write(_jsp_string29, 0, _jsp_string29.length);
com.redmoon.forum.ui.menu.LeafChildrenCacheMgr dlcmHe = new com.redmoon.forum.ui.menu.LeafChildrenCacheMgr("root");
java.util.Vector vtHe = dlcmHe.getChildren();
Iterator irHe = vtHe.iterator();
int headCt = 0;
int navpos = vtHe.size() - 2;
int lastpos = vtHe.size() - 1;
while (irHe.hasNext()) {
com.redmoon.forum.ui.menu.Leaf menuleaf = (com.redmoon.forum.ui.menu.Leaf) irHe.next();
out.print("<li>");
String menuItem = "";
if (menuleaf.getType()==com.redmoon.forum.ui.menu.Leaf.TYPE_LINK) {
out.write(_jsp_string30, 0, _jsp_string30.length);
out.print((menuleaf.getTarget()));
out.write(_jsp_string31, 0, _jsp_string31.length);
out.print((menuleaf.getLink(request)));
out.write(_jsp_string32, 0, _jsp_string32.length);
out.print((menuleaf.getWidth()-15));
out.write(_jsp_string33, 0, _jsp_string33.length);
out.print((menuleaf.getWidth()));
out.write(_jsp_string34, 0, _jsp_string34.length);
out.print((menuleaf.getName(request)));
out.write(_jsp_string35, 0, _jsp_string35.length);
}
else {
menuItem = com.redmoon.forum.ui.menu.PresetLeaf.getMenuItem(request, menuleaf);
out.print(menuItem);
}
com.redmoon.forum.ui.menu.LeafChildrenCacheMgr dl = new com.redmoon.forum.ui.menu.LeafChildrenCacheMgr(menuleaf.getCode());
java.util.Vector headv = dl.getChildren();
Iterator headir1 = headv.iterator();
if (headv.size()>0)
out.print("<ul>");
while (headir1.hasNext()) {
com.redmoon.forum.ui.menu.Leaf menulf = (com.redmoon.forum.ui.menu.Leaf) headir1.next();
out.write(_jsp_string36, 0, _jsp_string36.length);
out.print((menulf.getTarget()));
out.write(_jsp_string31, 0, _jsp_string31.length);
out.print((menulf.getLink(request)));
out.write(_jsp_string32, 0, _jsp_string32.length);
out.print((menulf.getWidth()));
out.write(_jsp_string34, 0, _jsp_string34.length);
out.print((menulf.getName(request)));
out.write(_jsp_string37, 0, _jsp_string37.length);
com.redmoon.forum.ui.menu.LeafChildrenCacheMgr dl2 = new com.redmoon.forum.ui.menu.LeafChildrenCacheMgr(menulf.getCode());
java.util.Vector v2 = dl2.getChildren();
Iterator ir2 = v2.iterator();
if (v2.size()>0)
out.print("<ul>");
while (ir2.hasNext()) {
com.redmoon.forum.ui.menu.Leaf menulf2 = (com.redmoon.forum.ui.menu.Leaf) ir2.next();
out.write(_jsp_string38, 0, _jsp_string38.length);
out.print((menulf2.getTarget()));
out.write(_jsp_string31, 0, _jsp_string31.length);
out.print((menulf2.getLink(request)));
out.write(_jsp_string32, 0, _jsp_string32.length);
out.print((menulf2.getWidth()));
out.write(_jsp_string34, 0, _jsp_string34.length);
out.print((menulf2.getName(request)));
out.write(_jsp_string39, 0, _jsp_string39.length);
}
if (v2.size()>0)
out.print("</ul>");
out.print("</li>");
}
if (headv.size()>0)
out.print("</ul>");
out.print("</li>");
// \u6700\u540e\u4e00\u9879\u4e0d\u5199\u5206\u9694\u7ebf
if (headCt!=lastpos) {
if (menuleaf.getType()==com.redmoon.forum.ui.menu.Leaf.TYPE_PRESET && menuItem.equals(""))
;
else
out.print("<li class='menuDiv'></li>");
}
// \u5728\u5012\u6570\u7b2c\u4e8c\u9879\u5199\u63d2\u4ef6\u7684\u83dc\u5355\u9879
if (headCt==navpos) {
com.redmoon.forum.plugin.PluginMgr headerPm = new com.redmoon.forum.plugin.PluginMgr();
Iterator irHeaderPlugin = headerPm.getAllPlugin().iterator();
while (irHeaderPlugin.hasNext()) {
com.redmoon.forum.plugin.PluginUnit pu = (com.redmoon.forum.plugin.PluginUnit)irHeaderPlugin.next();
com.redmoon.forum.plugin.base.IPluginUI ipu = pu.getUI(request, response, out);
com.redmoon.forum.plugin.base.IPluginViewCommon pvc = ipu.getViewCommon();
if (pvc!=null) {
String hnavstr = pvc.render(com.redmoon.forum.plugin.base.IPluginViewCommon.POS_NAV_BAR);
if (!hnavstr.equals("")) {
out.print("<li>" + hnavstr + "</li>");
out.print("<li class='menuDiv'></li>");
}
}
}
}
headCt++;
}
out.write(_jsp_string40, 0, _jsp_string40.length);
pageContext.include("inc/position.jsp", "boardcode=" + com.caucho.el.Expr.toString(StrUtil.UrlEncode(boardcode), null), true);
out.write(_jsp_string1, 0, _jsp_string1.length);
if (_jsp_AdTag_1 == null) {
_jsp_AdTag_1 = new com.redmoon.forum.ad.AdTag();
_jsp_AdTag_1.setPageContext(pageContext);
_jsp_AdTag_1.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_AdTag_1.setType(AdDb.TYPE_TEXT);
_jsp_AdTag_1.setBoardCode(boardcode);
_jsp_AdTag_1.doEndTag();
out.write(_jsp_string1, 0, _jsp_string1.length);
if (_jsp_AdTag_1 == null) {
_jsp_AdTag_1 = new com.redmoon.forum.ad.AdTag();
_jsp_AdTag_1.setPageContext(pageContext);
_jsp_AdTag_1.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_AdTag_1.setType(AdDb.TYPE_FLOAT);
_jsp_AdTag_1.setBoardCode(boardcode);
_jsp_AdTag_1.doEndTag();
out.write(_jsp_string1, 0, _jsp_string1.length);
if (_jsp_AdTag_1 == null) {
_jsp_AdTag_1 = new com.redmoon.forum.ad.AdTag();
_jsp_AdTag_1.setPageContext(pageContext);
_jsp_AdTag_1.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_AdTag_1.setType(AdDb.TYPE_COUPLE);
_jsp_AdTag_1.setBoardCode(boardcode);
_jsp_AdTag_1.doEndTag();
out.write(_jsp_string1, 0, _jsp_string1.length);
cn.js.fan.util.StrUtil StrUtil;
StrUtil = (cn.js.fan.util.StrUtil) pageContext.getAttribute("StrUtil");
if (StrUtil == null) {
StrUtil = new cn.js.fan.util.StrUtil();
pageContext.setAttribute("StrUtil", StrUtil);
}
out.write(_jsp_string1, 0, _jsp_string1.length);
com.redmoon.forum.person.userservice userservice;
userservice = (com.redmoon.forum.person.userservice) pageContext.getAttribute("userservice");
if (userservice == null) {
userservice = new com.redmoon.forum.person.userservice();
pageContext.setAttribute("userservice", userservice);
}
out.write(_jsp_string1, 0, _jsp_string1.length);
// \u5237\u65b0\u5728\u7ebf\u65f6\u95f4
userservice.refreshStayTime(request, response);
String sqlt = "select id from sq_thread where boardcode=" + StrUtil.sqlstr(boardcode)+" ORDER BY msg_level desc,redate desc";
ThreadBlockIterator irthread = msgdb.getThreads(sqlt, boardcode, 0, 200);
irthread.setIndex(msgdb);
UserMgr um = new UserMgr();
PluginMgr pmnote = new PluginMgr();
Vector vplugin = pmnote.getAllPluginUnitOfBoard(boardcode);
if (vplugin.size()>0) {
Iterator irpluginnote = vplugin.iterator();
while (irpluginnote.hasNext()) {
PluginUnit pu = (PluginUnit)irpluginnote.next();
IPluginUI ipu = pu.getUI(request, response, out);
IPluginViewShowMsg pv = ipu.getViewShowMsg(boardcode, msgdb);
String note = pv.render(UIShowMsg.POS_NOTE);
if (!note.equals("")) {
out.write(_jsp_string41, 0, _jsp_string41.length);
out.print((skin.getTableBorderClr()));
out.write(_jsp_string42, 0, _jsp_string42.length);
out.print(pu.getName(request) + " " + note + "<BR>");
out.write(_jsp_string43, 0, _jsp_string43.length);
}
boolean isShow = false;
if (pu.getType().equals(pu.TYPE_BOARD))
isShow = true;
else if (pu.getType().equals(pu.TYPE_TOPIC)) {
if (pu.getUnit().isPluginMsg(msgdb.getId()))
isShow = true;
}
if (isShow)
pv.render(UIShowMsg.POS_AFTER_NOTE);
}
}
out.write(_jsp_string1, 0, _jsp_string1.length);
String showUserName = ParamUtil.get(request, "showUserName");
String sql = SQLBuilder.getShowtopicSql(request, response, out, rootMsgDb, showUserName); // "select id from sq_message where rootid=" + rootid + " ORDER BY lydate asc"; //orders"; \u8fd9\u6837\u4f1a\u4f7f\u5f97\u987a\u5e8f\u4e0a\u4e0d\u6309\u65f6\u95f4\uff0c\u5e73\u677f\u5f0f\u65f6\u4f1a\u8ba9\u4eba\u89c9\u5f97\u5947\u602a
int pagesize = cfg1.getIntProperty("forum.showTopicPageSize");
long totalmsg = msgdb.getMsgCount(sql, boardcode, rootid);
ForumPaginator paginator = new ForumPaginator(request, totalmsg, pagesize);
int curpage = paginator.getCPage(request);
//\u8bbe\u7f6e\u5f53\u524d\u9875\u6570\u548c\u603b\u9875\u6570
int totalpages = paginator.getTotalPages();
if (totalpages==0) {
curpage = 1;
totalpages = 1;
}
int start = (curpage-1)*pagesize;
int end = curpage*pagesize;
MsgBlockIterator irmsg = msgdb.getMsgs(sql, boardcode, rootid, start, end);
out.write(_jsp_string44, 0, _jsp_string44.length);
out.print(paginator.getShowTopicCurPageBlock(request, rootid, "up"));
out.write(_jsp_string45, 0, _jsp_string45.length);
String addpage = "addtopic_new.jsp";
String replypage = "addreply_new.jsp";
if (cfg1.getBooleanProperty("forum.isWebeditTopicEnabled") && msgLeaf.getWebeditAllowType()==Leaf.WEBEDIT_ALLOW_TYPE_REDMOON_FIRST) {
addpage = "addtopic_we.jsp";
replypage = "addreply_we.jsp";
}
out.write(_jsp_string46, 0, _jsp_string46.length);
out.print((addpage));
out.write(_jsp_string47, 0, _jsp_string47.length);
out.print((boardcode));
out.write(_jsp_string48, 0, _jsp_string48.length);
out.print((privurl));
out.write(_jsp_string49, 0, _jsp_string49.length);
out.print((skinPath));
out.write(_jsp_string50, 0, _jsp_string50.length);
out.print((SkinUtil.getLocale(request)));
out.write(_jsp_string51, 0, _jsp_string51.length);
if (_jsp_LabelTag_0 == null) {
_jsp_LabelTag_0 = new com.redmoon.forum.ui.LabelTag();
_jsp_LabelTag_0.setPageContext(pageContext);
_jsp_LabelTag_0.setParent((javax.servlet.jsp.tagext.Tag) null);
}
_jsp_LabelTag_0.setRes("res.label.forum.showtopic");
_jsp_LabelTag_0.setKey("addtopic");
_jsp_LabelTag_0.doEndTag();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -