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

📄 auctionviewlistthread.java

📁 源码/软件简介: 云网论坛1.1RC国际版是采用JSP开发的集论坛、CMS(网站内容管理系统)、博客、聊天室、商城、交友、语音灌水等于一体的门户式社区。拥有CWBBS ( Cloud Web BBS
💻 JAVA
字号:
package com.redmoon.forum.plugin.auction;

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 cn.js.fan.web.Global;

public class AuctionViewListThread implements IPluginViewListThread {
    HttpServletRequest request;

    public AuctionViewListThread(HttpServletRequest request, String boardCode) {
        this.request = request;
        this.boardCode = boardCode;
    }

    public String render(int position) {
        String str = "";
        switch (position) {
        case UIListThread.POS_RULE:
            str += StrUtil.ubb(request, getBoardRule(), true) + getHelpLink() + getBoardNote();
            AuctionShopDb as = new AuctionShopDb();
            com.redmoon.forum.Privilege privilege = new com.redmoon.forum.Privilege();
            as = as.getAuctionShopDb(privilege.getUser(request));
            if (as.isLoaded()) {
                // 进入我的店
                String str1 = AuctionSkin.LoadString(request, "shop_entermine");
                str1 = str1.replaceFirst("\\#userName", StrUtil.UrlEncode(privilege.getUser(request)));
                str += str1;
                str += "( " + as.getShopName() +  " )";
                str1 = AuctionSkin.LoadString(request, "link_manager");
                str1 = str1.replaceFirst("\\#userName", StrUtil.UrlEncode(privilege.getUser(request)));
                str += str1;
            }
            else { // 我要开店
                str += AuctionSkin.LoadString(request, "shop_apply");
            }
            // 查看订单
            String stro = "";
            if (privilege.isUserLogin(request)) {
                stro = AuctionSkin.LoadString(request, "show_myorder");
                stro = stro.replaceAll("\\#userName", StrUtil.UrlEncode(privilege.getUser(request)));
            }
            str += stro;
            // 所有店铺列表
            String sql = "select userName from " + as.getTableName() + " where IS_RECOMMANDED=1 order by openDate desc";

            str += AuctionSkin.LoadString(request, "LABEL_ALLSHOP");
            java.util.Vector v = as.list(sql);
            java.util.Iterator ir = v.iterator();
            str += "<table width=100% align=center>";
            int k = 0;
            while (ir.hasNext()) {
                as = (AuctionShopDb) ir.next();
                if (k==0)
                    str += "<tr>";
                String logo = StrUtil.getNullStr(as.getLogo());
                if (!logo.equals(""))
                    str += "<td height=54 width=17%><a title='" + as.getUserName() +"' href='plugin/auction/shop.jsp?userName=" + StrUtil.UrlEncode(as.getUserName()) + "' title='" + as.getShopName() + "'><img border=0 width=98 height=52 src='" + Global.getRootPath() + "/" + as.getLogo() + "'></a></td>";
                else
                    str += "<td height=54 width=17%><a title='" + as.getUserName() +"' href='plugin/auction/shop.jsp?userName=" + StrUtil.UrlEncode(as.getUserName()) + "' title='" + as.getShopName() + "'>" + as.getShopName() + "</a></td>";

                k ++;
                if (k==6) {
                    str += "</tr>";
                    k = 0;
                }
            }
            if (k!=6)
                str += "</tr>";
            str += "</table>";
            break;
        default:
            break;
        }
        return str;
    }

    public String getHelpLink() {
        return AuctionSkin.LoadString(request, "helpLink");
    }

    public void setBoardCode(String boardCode) {
        this.boardCode = boardCode;
    }

    public String getBoardCode() {
        return boardCode;
    }

    public String getBoardRule() {
        AuctionBoardDb sb = new AuctionBoardDb();
        sb = (AuctionBoardDb)sb.getObjectDb(boardCode);
        return sb.getAuctionRule();
    }

    public String getBoardNote() {
        // 快速通道
        String quickGate = "";

        return quickGate;
    }

    public boolean IsPluginBoard() {
        AuctionBoardDb sb = new AuctionBoardDb();
        return sb.isPluginBoard(boardCode);
    }

    private String boardCode;
}

⌨️ 快捷键说明

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