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

📄 infoviewlistthread.java

📁 cwbbs 云网论坛源码
💻 JAVA
字号:
package com.redmoon.forum.plugin.info;import com.redmoon.forum.plugin.base.IPluginViewListThread;import com.redmoon.forum.plugin.base.UIListThread;import javax.servlet.http.HttpServletRequest;import cn.js.fan.util.StrUtil;import java.util.Vector;import java.util.Iterator;import javax.servlet.RequestDispatcher;import com.cloudwebsoft.framework.util.LogUtil;import com.cloudwebsoft.framework.servlet.ServletResponseWrapperInclude;import javax.servlet.jsp.JspWriter;import javax.servlet.http.HttpServletResponse;import cn.js.fan.util.ParamUtil;import com.redmoon.forum.MsgDb;import com.redmoon.forum.plugin.BoardDb;public class InfoViewListThread implements IPluginViewListThread {    HttpServletRequest request;    HttpServletResponse response;    JspWriter out;    public InfoViewListThread(HttpServletRequest request, HttpServletResponse response, JspWriter out, String boardCode) {        this.request = request;        this.response = response;        this.out = out;        this.boardCode = boardCode;    }    public String render(int position) {        String str = "";        switch (position) {        case UIListThread.POS_RULE:            str += StrUtil.toHtml(StrUtil.ubb(request, getBoardRule(), true)) + getHelpLink() + getBoardNote();            break;        default:            break;        }        return str;    }    public String render(int position, MsgDb md) {        return "";    }    public String getHelpLink() {        return InfoSkin.LoadString(request, "helpLink");    }    public void setBoardCode(String boardCode) {        this.boardCode = boardCode;    }    public String getBoardCode() {        return boardCode;    }    public String getBoardRule() {        BoardDb sb = new BoardDb();        sb = sb.getBoardDb(InfoUnit.code, boardCode);        return sb.getBoardRule();    }    public String getBoardNote() {                        String relativePath = "plugin/info/inc_slidemenu.jsp?pageUrl=" +                              StrUtil.                              UrlEncode("forum/listtopic.jsp?boardcode=" +                                        StrUtil.UrlEncode(boardCode) +                                        "&pluginCode=" + InfoUnit.code +                                        "&typeCode=");                try {            RequestDispatcher rd = request.getRequestDispatcher(                    relativePath);                        rd.include(request,                       new ServletResponseWrapperInclude(response, out));                                } catch (Exception e) {            LogUtil.getLog(getClass()).error("render:" + e.getMessage());        }        return "";    }    public boolean IsPluginBoard() {        InfoUnit iu = new InfoUnit();        return iu.isPluginBoard(boardCode);    }    public String getListtopicSql(HttpServletRequest request, String boardcode, String op, String timelimit, int threadType) {        String typeCode = ParamUtil.get(request, "typeCode");        if (!typeCode.equals("") && !typeCode.equals(Leaf.CODE_ROOT)) {            String sql = "";            sql = "select t.id from plugin_info w, sq_thread t where w.id=t.id and w.typeCode=" +                  StrUtil.sqlstr(typeCode) + " and t.boardcode=" +                  StrUtil.sqlstr(boardCode) + " and t.check_status=" +                  MsgDb.CHECK_STATUS_PASS +                  " ORDER BY t.msg_level desc,t.redate desc";            return sql;        }        else            return "";    }    private String boardCode;}

⌨️ 快捷键说明

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