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

📄 _listtopic__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 com.redmoon.forum.err.*;
import com.redmoon.forum.person.*;
import com.redmoon.forum.ui.*;
import org.jdom.*;
import java.util.*;
import org.jdom.output.*;
import org.jdom.input.*;
import com.redmoon.forum.*;
import cn.js.fan.db.*;
import cn.js.fan.util.*;
import cn.js.fan.web.*;
import com.redmoon.forum.plugin.*;
import com.redmoon.forum.plugin.base.*;
import cn.js.fan.security.*;
import cn.js.fan.module.pvg.*;
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.*;
import java.sql.*;

public class _listtopic__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, "/forum/inc/", 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);
      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.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 boardcode = ParamUtil.get(request, "boardcode");
if (boardcode.equals("")) {
	out.print(StrUtil.Alert_Back(cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.listtopic", "need_board")));
	return;
}

Leaf curleaf = new Leaf();
curleaf = curleaf.getLeaf(boardcode);
if (curleaf==null || !curleaf.isLoaded()) {
	out.print(SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "res.label.forum.listtopic", "no_board")));
	return;
}

if (curleaf.getType()==Leaf.TYPE_DOMAIN) {
	if (curleaf.getCode().equals(Leaf.CODE_ROOT))
		response.sendRedirect("index.jsp");
	else
		response.sendRedirect("index.jsp?boardField=" + StrUtil.UrlEncode(boardcode));
	return;
}

try {
	privilege.checkCanEnterBoard(request, boardcode);
}
catch (ErrMsgException e) {
	response.sendRedirect("../info.jsp?info=" + StrUtil.UrlEncode(e.getMessage()));
	// e.printStackTrace();
	return;
}

boolean isManager = privilege.isManager(request, boardcode);

String boardname = curleaf.getName();

int threadType = StrUtil.toInt(ParamUtil.get(request, "threadType"), ThreadTypeDb.THREAD_TYPE_NONE);

UserSession.setBoardCode(request, boardcode);

String username = privilege.getUser(request);

// \u7f6e\u7528\u6237\u6240\u5728\u7248\u5757
if (username!=null && !username.equals("")) {
	OnlineUserDb ou = new OnlineUserDb();
	ou = ou.getOnlineUserDb(username);
	ou.setUserInBoard(boardcode);
}
// \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();

String op = StrUtil.getNullString(request.getParameter("op"));

//seo
com.redmoon.forum.util.SeoConfig scfg = new com.redmoon.forum.util.SeoConfig();
String seoTitle = scfg.getProperty("seotitle");
String seoKeywords = scfg.getProperty("seokeywords");
String seoDescription = scfg.getProperty("seodescription");
String seoHead = scfg.getProperty("seohead");

      out.write(_jsp_string2, 0, _jsp_string2.length);
      out.print((boardname));
      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((seoDescription));
      out.write(_jsp_string7, 0, _jsp_string7.length);
      out.print((skinPath));
      out.write(_jsp_string8, 0, _jsp_string8.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.listtopic");
      _jsp_LabelTag_0.setKey("close_online");
      _jsp_LabelTag_0.doEndTag();
      out.write(_jsp_string9, 0, _jsp_string9.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.listtopic");
      _jsp_LabelTag_0.setKey("show_online");
      _jsp_LabelTag_0.doEndTag();
      out.write(_jsp_string10, 0, _jsp_string10.length);
      out.print((skinPath));
      out.write(_jsp_string11, 0, _jsp_string11.length);
      out.print((skinPath));
      out.write(_jsp_string12, 0, _jsp_string12.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_string13, 0, _jsp_string13.length);
      out.print((request.getContextPath()));
      out.write(_jsp_string14, 0, _jsp_string14.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")));
		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_string15, 0, _jsp_string15.length);
      out.print((rootpath));
      out.write(_jsp_string16, 0, _jsp_string16.length);
      out.print((hTheme.getHeight()));
      out.write(_jsp_string17, 0, _jsp_string17.length);
      out.print((rootpath));
      out.print((hTheme.getPath() + "/" + hTheme.getBanner()));
      out.write(_jsp_string18, 0, _jsp_string18.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_string19, 0, _jsp_string19.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_string20, 0, _jsp_string20.length);
      out.print((menuleaf.getTarget()));
      out.write(_jsp_string21, 0, _jsp_string21.length);
      out.print((menuleaf.getLink(request)));
      out.write(_jsp_string22, 0, _jsp_string22.length);
      out.print((menuleaf.getWidth()-15));
      out.write(_jsp_string23, 0, _jsp_string23.length);
      out.print((menuleaf.getWidth()));
      out.write(_jsp_string24, 0, _jsp_string24.length);
      out.print((menuleaf.getName(request)));
      out.write(_jsp_string25, 0, _jsp_string25.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_string26, 0, _jsp_string26.length);

⌨️ 快捷键说明

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