⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _addtopic_0new__jsp.java

📁 CMS 1、增加子站点功能
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
/*
 * 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 cn.js.fan.util.*;
import com.redmoon.forum.person.*;
import com.redmoon.forum.plugin2.*;
import com.redmoon.forum.plugin.*;
import com.redmoon.forum.plugin.base.*;
import com.redmoon.blog.*;
import java.util.*;
import cn.js.fan.web.*;
import java.util.Vector;
import java.util.Iterator;
import com.redmoon.forum.ad.*;
import com.redmoon.forum.ui.*;
import com.redmoon.forum.security.*;
import com.redmoon.forum.*;
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 _addtopic_0new__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;
    com.redmoon.forum.ui.LabelTag _jsp_LabelTag_2 = 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);
      }
      
/*
String targeturl = StrUtil.getUrl(request);
if (!privilege.isUserLogin(request)) {
	response.sendRedirect("../door.jsp?targeturl="+targeturl);
	return;
}
*/

String boardcode = ParamUtil.get(request, "boardcode");
String userName = privilege.getUser(request);
if (!privilege.canUserDo(request, boardcode, "add_topic")) {
	response.sendRedirect("../info.jsp?info= " + StrUtil.UrlEncode(SkinUtil.LoadString(request, "pvg_invalid")));
	return;
}

Leaf curleaf = new Leaf();
curleaf = curleaf.getLeaf(boardcode);

if (curleaf==null || !curleaf.isLoaded()) {
	out.print(SkinUtil.makeErrMsg(request, SkinUtil.LoadString(request, "res.label.forum.addtopic", "board_none"))); // "\u7248\u5757\u4e0d\u5b58\u5728"));
	return;
}

String boardname = curleaf.getName();
String blogUserDir = ParamUtil.get(request, "blogUserDir");
if (blogUserDir.equals(""))
	blogUserDir = UserDirDb.DEFAULT;
	
// \u53d6\u5f97\u76ae\u80a4\u8def\u5f84
String skincode = curleaf.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");

// \u5982\u679c\u7528\u6237\u4e0d\u662f\u6e38\u5ba2
if (privilege.isUserLogin(request)) {
    UserPrivDb upd = new UserPrivDb();
    upd = upd.getUserPrivDb(privilege.getUser(request));
    if (upd.getInt("is_default")==0) {
		maxAttachmentSize = upd.getInt("attach_size");
	}
}

      out.write(_jsp_string1, 0, _jsp_string1.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("addtopic");
      _jsp_LabelTag_0.doEndTag();
      out.write(_jsp_string2, 0, _jsp_string2.length);
      out.print((Global.AppName));
      out.write(_jsp_string3, 0, _jsp_string3.length);
      out.print((skinPath));
      out.write(_jsp_string4, 0, _jsp_string4.length);
      out.print((cn.js.fan.web.SkinUtil.LoadString(request, "res.cn.js.fan.util.StrUtil", "click_open_win")));
      out.write(_jsp_string5, 0, _jsp_string5.length);
      out.print((maxAttachmentCount));
      out.write(_jsp_string6, 0, _jsp_string6.length);
      out.print((msgTitleLengthMin));
      out.write(_jsp_string7, 0, _jsp_string7.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_string8, 0, _jsp_string8.length);
      out.print((msgTitleLengthMax));
      out.write(_jsp_string7, 0, _jsp_string7.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_string9, 0, _jsp_string9.length);
      out.print((msgLengthMin));
      out.write(_jsp_string7, 0, _jsp_string7.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_string10, 0, _jsp_string10.length);
      out.print((msgLengthMax));
      out.write(_jsp_string7, 0, _jsp_string7.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_string11, 0, _jsp_string11.length);
      out.print((maxAttachmentCount));
      out.write(_jsp_string12, 0, _jsp_string12.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("topic_max_attach");
      _jsp_LabelTag_0.doEndTag();
      out.print((maxAttachmentCount));
      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.label.forum.addtopic");
      _jsp_LabelTag_0.setKey("file");
      _jsp_LabelTag_0.doEndTag();
      out.write(_jsp_string14, 0, _jsp_string14.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_string15, 0, _jsp_string15.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_string16, 0, _jsp_string16.length);
      out.print((msgLengthMax));
      out.write(_jsp_string17, 0, _jsp_string17.length);
      out.print((msgLengthMin));
      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.forum.MsgDb");
      _jsp_LabelTag_0.setKey("err_too_short_content");
      _jsp_LabelTag_0.doEndTag();
      out.print((msgLengthMin));
      out.write(_jsp_string19, 0, _jsp_string19.length);
      out.print((msgLengthMax));
      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.forum.MsgDb");
      _jsp_LabelTag_0.setKey("err_too_large_content");
      _jsp_LabelTag_0.doEndTag();
      out.print((msgLengthMax));
      out.write(_jsp_string20, 0, _jsp_string20.length);
      
String addFlag = ParamUtil.get(request, "addFlag");
if (addFlag.equals("") && !boardcode.equals(Leaf.CODE_BLOG)) {
      out.write(_jsp_string21, 0, _jsp_string21.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_string22, 0, _jsp_string22.length);
      out.print((request.getContextPath()));
      out.write(_jsp_string23, 0, _jsp_string23.length);
      
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")));

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -