📄 _showtopic__jsp.java
字号:
/*
* JSP generated by Resin-3.1.0 (built Fri, 22 Dec 2006 07:00:35 PST)
*/
package _jsp._forum;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.http.*;
import com.redmoon.forum.ui.*;
import cn.js.fan.db.*;
import cn.js.fan.util.*;
import com.redmoon.forum.*;
import com.redmoon.forum.person.*;
import java.util.*;
import com.redmoon.forum.plugin.*;
import com.redmoon.forum.plugin2.*;
import com.redmoon.forum.plugin.base.*;
import cn.js.fan.web.*;
import java.util.Vector;
import java.util.Iterator;
import com.redmoon.forum.ad.*;
import com.redmoon.forum.security.*;
import com.redmoon.forum.Leaf;
import java.io.File;
import cn.js.fan.util.ErrMsgException;
import cn.js.fan.web.SkinUtil;
import com.redmoon.forum.music.*;
public class _showtopic__jsp extends com.caucho.jsp.JavaPage
{
private final java.util.HashMap<String,java.lang.reflect.Method> _jsp_functionMap = new java.util.HashMap<String,java.lang.reflect.Method>();
private boolean _caucho_isDead;
public void
_jspService(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException
{
javax.servlet.http.HttpSession session = request.getSession(true);
com.caucho.server.webapp.WebApp _jsp_application = _caucho_getApplication();
javax.servlet.ServletContext application = _jsp_application;
com.caucho.jsp.PageContextImpl pageContext = com.caucho.jsp.QJspFactory.allocatePageContext(this, _jsp_application, request, response, null, session, 8192, true, false);
javax.servlet.jsp.JspWriter out = pageContext.getOut();
final javax.el.ELContext _jsp_env = pageContext.getELContext();
javax.servlet.ServletConfig config = getServletConfig();
javax.servlet.Servlet page = this;
response.setContentType("text/html;charset=utf-8");
request.setCharacterEncoding("UTF-8");
com.redmoon.forum.ui.LabelTag _jsp_LabelTag_0 = null;
com.redmoon.forum.ad.AdTag _jsp_AdTag_1 = null;
try {
out.write(_jsp_string0, 0, _jsp_string0.length);
com.redmoon.forum.Privilege privilege;
privilege = (com.redmoon.forum.Privilege) pageContext.getAttribute("privilege");
if (privilege == null) {
privilege = new com.redmoon.forum.Privilege();
pageContext.setAttribute("privilege", privilege);
}
out.write(_jsp_string1, 0, _jsp_string1.length);
long pageBeginTime = System.currentTimeMillis();
String querystring = StrUtil.getNullString(request.getQueryString());
String privurl = request.getRequestURL()+"?"+StrUtil.UrlEncode(querystring);
if (!privilege.isUserLogin(request)) {
if (!ForumDb.getInstance().canGuestSeeTopic()) {
response.sendRedirect(request.getContextPath() + "/info.jsp?op=login&info=" + StrUtil.UrlEncode(SkinUtil.LoadString(request, "info_please_login")) + "&privurl=" + privurl);
return;
}
}
long rootid;
try {
rootid = ParamUtil.getLong(request, "rootid");
}
catch (Exception e) {
response.sendRedirect(request.getContextPath() + "/info.jsp?info= " + StrUtil.UrlEncode(SkinUtil.LoadString(request, SkinUtil.ERR_ID))); // \u6807\u8bc6\u975e\u6cd5\uff01
return;
}
MsgDb msgdb = new MsgDb();
msgdb = msgdb.getMsgDb(rootid);
if (msgdb.getCheckStatus()==MsgDb.CHECK_STATUS_NOT && !privilege.isMasterLogin(request)) {
response.sendRedirect(request.getContextPath() + "/info.jsp?info=" + StrUtil.UrlEncode(SkinUtil.LoadString(request, "res.label.forum.showtopic", "check_not")) + "&privurl=" + privurl);
return;
}
// \u4fdd\u5b58\u4e0b\u6765\uff0c\u4ee5\u7528\u4e8e\u5feb\u901f\u56de\u590d\u533a\u7684\u63d2\u4ef6\u63d0\u793a
MsgDb rootMsgDb = msgdb;
if (!msgdb.isLoaded()) {
response.sendRedirect(request.getContextPath() + "/info.jsp?info=" + StrUtil.UrlEncode(SkinUtil.LoadString(request, "res.label.forum.showtopic", "topic_lost"))); // "\u8be5\u8d34\u5df2\u4e0d\u5b58\u5728\uff01"));
return;
}
String boardcode = msgdb.getboardcode();
try {
privilege.checkCanEnterBoard(request, boardcode);
}
catch (ErrMsgException e) {
response.sendRedirect(request.getContextPath() + "/info.jsp?info=" + StrUtil.UrlEncode(e.getMessage()));
return;
}
if (!privilege.canUserDo(request, boardcode, "view_topic")) {
response.sendRedirect(request.getContextPath() + "/info.jsp?info= " + StrUtil.UrlEncode(SkinUtil.LoadString(request, "pvg_invalid")));
return;
}
if (msgdb.getCheckStatus()==msgdb.CHECK_STATUS_DUSTBIN) {
if (!privilege.isMasterLogin(request)) {
response.sendRedirect(request.getContextPath() + "/info.jsp?info= " + StrUtil.UrlEncode(SkinUtil.LoadString(request, "res.label.forum.showtopic", "check_dustbin")));
return;
}
else {
response.sendRedirect("showtopic_tree.jsp?rootid=" + rootid);
return;
}
}
Leaf msgLeaf = new Leaf();
msgLeaf = msgLeaf.getLeaf(boardcode);
String boardname = msgLeaf.getName();
UserSession.setBoardCode(request, boardcode);
// \u53d6\u5f97\u76ae\u80a4\u8def\u5f84
String skincode = msgLeaf.getSkin();
if (skincode.equals("") || skincode.equals(UserSet.defaultSkin)) {
skincode = UserSet.getSkin(request);
if (skincode==null || skincode.equals(""))
skincode = UserSet.defaultSkin;
}
SkinMgr skm = new SkinMgr();
Skin skin = skm.getSkin(skincode);
String skinPath = skin.getPath();
com.redmoon.forum.Config cfg1 = com.redmoon.forum.Config.getInstance();
int msgTitleLengthMin = cfg1.getIntProperty("forum.msgTitleLengthMin");
int msgTitleLengthMax = cfg1.getIntProperty("forum.msgTitleLengthMax");
int msgLengthMin = cfg1.getIntProperty("forum.msgLengthMin");
int msgLengthMax = cfg1.getIntProperty("forum.msgLengthMax");
int maxAttachmentCount = cfg1.getIntProperty("forum.maxAttachmentCount");
int maxAttachmentSize = cfg1.getIntProperty("forum.maxAttachmentSize");
com.redmoon.forum.util.SeoConfig scfg = new com.redmoon.forum.util.SeoConfig();
String seoTitle = scfg.getProperty("seotitle");
String seoKeywords = scfg.getProperty("seokeywords");
String seoHead = scfg.getProperty("seohead");
String seoDescription = StrUtil.left(msgdb.getContent(),100);
out.write(_jsp_string2, 0, _jsp_string2.length);
out.print((StrUtil.toHtml(msgdb.getTitle())));
out.write(_jsp_string3, 0, _jsp_string3.length);
out.print((Global.AppName));
out.write(' ');
out.print((seoTitle));
out.write(_jsp_string4, 0, _jsp_string4.length);
out.print((seoHead));
out.write(_jsp_string5, 0, _jsp_string5.length);
out.print((seoKeywords));
out.write(_jsp_string6, 0, _jsp_string6.length);
out.print((StrUtil.toHtml(seoDescription)));
out.write(_jsp_string7, 0, _jsp_string7.length);
out.print((skinPath));
out.write(_jsp_string8, 0, _jsp_string8.length);
out.print((cfg1.getIntProperty("forum.waterMarkCodeLen")));
out.write(_jsp_string9, 0, _jsp_string9.length);
out.print((Global.AppName));
out.write(_jsp_string10, 0, _jsp_string10.length);
out.print((Global.getRootPath()));
out.write(_jsp_string11, 0, _jsp_string11.length);
out.print((Global.getRootPath()));
out.write(_jsp_string12, 0, _jsp_string12.length);
out.print((msgTitleLengthMin));
out.write(_jsp_string13, 0, _jsp_string13.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.forum.MsgDb");
_jsp_LabelTag_0.setKey("err_too_short_title");
_jsp_LabelTag_0.doEndTag();
out.print((msgTitleLengthMin));
out.write(_jsp_string14, 0, _jsp_string14.length);
out.print((msgTitleLengthMax));
out.write(_jsp_string13, 0, _jsp_string13.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.forum.MsgDb");
_jsp_LabelTag_0.setKey("err_too_large_title");
_jsp_LabelTag_0.doEndTag();
out.print((msgTitleLengthMax));
out.write(_jsp_string15, 0, _jsp_string15.length);
out.print((msgLengthMin));
out.write(_jsp_string13, 0, _jsp_string13.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.forum.MsgDb");
_jsp_LabelTag_0.setKey("err_too_short_content");
_jsp_LabelTag_0.doEndTag();
out.print((msgLengthMin));
out.write(_jsp_string16, 0, _jsp_string16.length);
out.print((msgLengthMax));
out.write(_jsp_string13, 0, _jsp_string13.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.forum.MsgDb");
_jsp_LabelTag_0.setKey("err_too_large_content");
_jsp_LabelTag_0.doEndTag();
out.print((msgLengthMax));
out.write(_jsp_string17, 0, _jsp_string17.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.addtopic");
_jsp_LabelTag_0.setKey("content_cur_count");
_jsp_LabelTag_0.doEndTag();
out.write(_jsp_string18, 0, _jsp_string18.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.addtopic");
_jsp_LabelTag_0.setKey("content_count_limit");
_jsp_LabelTag_0.doEndTag();
out.print((msgLengthMin));
out.write(_jsp_string3, 0, _jsp_string3.length);
out.print((msgLengthMax));
out.write(_jsp_string19, 0, _jsp_string19.length);
out.print((msgLengthMin));
out.write(_jsp_string20, 0, _jsp_string20.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.forum.MsgDb");
_jsp_LabelTag_0.setKey("err_too_short_content");
_jsp_LabelTag_0.doEndTag();
out.print((msgLengthMin));
out.write(_jsp_string21, 0, _jsp_string21.length);
out.print((msgLengthMax));
out.write(_jsp_string20, 0, _jsp_string20.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.forum.MsgDb");
_jsp_LabelTag_0.setKey("err_too_large_content");
_jsp_LabelTag_0.doEndTag();
out.print((msgLengthMax));
out.write(_jsp_string22, 0, _jsp_string22.length);
String hUrl = StrUtil.getUrl(request);
// \u8fdb\u5165info.jsp\u9875\u9762\u65f6\u4e0d\u68c0\u6d4b\u5237\u65b0
if (hUrl.indexOf("/info.jsp")==-1) {
if (!ActionMonitor.canVisit(request, response)) {
String fastStr = SkinUtil.LoadString(request, "res.label.forum.inc.header", "visit_too_fast");
fastStr = StrUtil.format(fastStr, new Object[] {new Integer(com.redmoon.forum.Config.getInstance().getVisitInterval()/1000)});
out.print(SkinUtil.makeErrMsg(request, fastStr));
return;
}
}
if (ForumDb.getInstance().getStatus()==ForumDb.STATUS_STOP) {
// \u9632\u6b62\u8fdb\u5165info.jsp\u9875\u9762\u65f6\u53cd\u590dredirect
if (hUrl.indexOf("/info.jsp")==-1) {
response.sendRedirect(request.getContextPath() + "/info.jsp?info=" + cn.js.fan.util.StrUtil.UrlEncode(ForumDb.getInstance().getReason()));
return;
}
}
if (!com.redmoon.forum.Privilege.isUserLogin(request)) {
// \u9632\u6b62\u8fdb\u5165info.jsp\u9875\u9762\u65f6\u53cd\u590dredirect
if (hUrl.indexOf("/info.jsp")==-1) {
if (!ForumDb.getInstance().canGuestEnterIntoForum()) {
response.sendRedirect(request.getContextPath() + "/info.jsp?op=login&info=" + StrUtil.UrlEncode(SkinUtil.LoadString(request, "info_please_login")));
return;
}
}
}
out.write(_jsp_string23, 0, _jsp_string23.length);
out.print((request.getContextPath()));
out.write(_jsp_string24, 0, _jsp_string24.length);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -