Ejemplo n.º 1
0
    private void EditPage()
    {
        int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "竞拍ID错误"));

        Master.Title = "编辑竞拍";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("编辑竞拍");
        builder.Append(Out.Tab("</div>", ""));
        BCW.Model.Game.Race model = new BCW.BLL.Game.Race().GetRace(id);
        if (model == null)
        {
            Utils.Error("不存在的竞拍记录", "");
        }
        string strText = "竞拍标题:/,竞拍描述:/,物品截图(可空):/,保密内容(管理员和竞拍得主可见):/,用户ID:/,用户昵称:/,币种类型:/,起拍价:/,截止时间:/,发布时间:/,最高价:/,最高价用户ID:/,最高价用户昵称:/,竞拍状态:/,,,";
        string strName = "Title,Content,FileUrl,PContent,UserID,UserName,Types,Price,Totime,Writetime,topPrice,WinID,WinName,State,id,act,backurl";
        string strType = "text,textarea,text,text,num,text,select,num,date,date,num,num,text,select,hidden,hidden,hidden";
        string strValu = "" + model.title + "'" + model.content + "'" + model.fileurl + "'" + model.pcontent + "'" + model.userid + "'" + model.username + "'" + model.Types + "'" + model.price + "'" + DT.FormatDate(model.totime, 0) + "'" + DT.FormatDate(model.writetime, 0) + "'" + model.topPrice + "'" + model.winID + "'" + model.winName + "'" + model.paytype + "'" + id + "'editsave'" + Utils.getPage(0) + "";
        string strEmpt = "false,false,true,false,false,false,0|" + ub.Get("SiteBz") + "|1|" + ub.Get("SiteBz2") + ",false,false,false,false,false,true,0|未审核|1|进行中|2|已结束,false,false,false";
        string strIdea = "/";
        string strOthe = "编辑竞拍|reset,race.aspx,post,1,red|blue";

        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getPage("race.aspx") + "\">返回上一级</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=del&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">删除此竞拍</a><br />");
        builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
        builder.Append(Out.Tab("</div>", "<br />"));
    }
Ejemplo n.º 2
0
    private void ReloadPage()
    {
        Master.Title = "竞拍管理";
        int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[0-3]$", "3"));

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏</a>&gt;");
        builder.Append("竞拍");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        if (ptype == 3)
        {
            builder.Append("待确认|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("race.aspx?ptype=3") + "\">待确认</a>|");
        }

        if (ptype == 0)
        {
            builder.Append("未审核|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("race.aspx?ptype=0") + "\">未审核</a>|");
        }

        if (ptype == 1)
        {
            builder.Append("进行中|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("race.aspx?ptype=1") + "\">进行中</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("已结束");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("race.aspx?ptype=2") + "\">已结束</a>");
        }

        builder.Append(Out.Tab("</div>", "<br />"));

        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = "";

        string[] pageValUrl = { "ptype", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        //查询条件
        if (ptype == 1)
        {
            strWhere = "paytype=1 and totime>'" + DateTime.Now + "'";
        }
        else if (ptype == 3)
        {
            strWhere = "paytype=1 and totime<'" + DateTime.Now + "'";
        }
        else
        {
            strWhere = "paytype=" + ptype + "";
        }

        // 开始读取列表
        IList <BCW.Model.Game.Race> listRace = new BCW.BLL.Game.Race().GetRaces(pageIndex, pageSize, strWhere, out recordCount);

        if (listRace.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Race n in listRace)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                }
                else
                {
                    if (k == 1)
                    {
                        builder.Append(Out.Tab("<div>", ""));
                    }
                    else
                    {
                        builder.Append(Out.Tab("<div>", "<br />"));
                    }
                }
                builder.AppendFormat("<a href=\"" + Utils.getUrl("race.aspx?act=edit&amp;id={0}&amp;backurl=" + Utils.PostPage(1) + "") + "\">[管理]&gt;</a>{1}.<a href=\"" + Utils.getUrl("/bbs/game/race.aspx?act=view&amp;id={0}&amp;backurl=" + Utils.PostPage(1) + "") + "\">{2}</a>", n.ID, (pageIndex - 1) * pageSize + k, n.title);
                if (ptype == 0)
                {
                    builder.Append("[<a href=\"" + Utils.getUrl("race.aspx?act=pass&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">审核</a>]");
                }
                else if (ptype == 1 || ptype == 3)
                {
                    builder.Append("[<a href=\"" + Utils.getUrl("race.aspx?act=over&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">确定结果</a>]");
                }
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("<a href=\"" + Utils.getUrl("../xml/raceset.aspx?backurl=" + Utils.PostPage(1) + "") + "\">游戏配置</a><br />");
        builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
        builder.Append(Out.Tab("</div>", "<br />"));
    }
Ejemplo n.º 3
0
    private void OverPage()
    {
        string info = Utils.GetRequest("info", "all", 1, "", "");
        int    id   = int.Parse(Utils.GetRequest("id", "all", 2, @"^[1-9]\d*$", "ID错误"));

        BCW.Model.Game.Race model = new BCW.BLL.Game.Race().GetRace(id);
        if (model == null)
        {
            Utils.Error("不存在的竞拍记录", "");
        }
        string bzText = string.Empty;

        if (model.Types == 0)
        {
            bzText = ub.Get("SiteBz");
        }
        else
        {
            bzText = ub.Get("SiteBz2");
        }

        if (info == "")
        {
            Master.Title = "确认竞拍结果";
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("确认结果后,最高价数量的" + bzText + "将会转入发布竞拍者的帐上并内线");
            builder.Append(Out.Tab("</div>", ""));

            string strText = "最高价:/,最高价用户ID:/,最高价用户昵称:/,,,,";
            string strName = "topPrice,WinID,WinName,id,act,info,backurl";
            string strType = "num,num,text,hidden,hidden,hidden,hidden";
            string strValu = "" + model.topPrice + "'" + model.winID + "'" + model.winName + "'" + id + "'over'ok'" + Utils.getPage(0) + "";
            string strEmpt = "false,false,false,false,false,false,false";
            string strIdea = "/";
            string strOthe = "确认结果并结束竞拍,race.aspx,post,1,red";

            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));

            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<a href=\"" + Utils.getPage("race.aspx") + "\">返回上一级</a><br />");
            builder.Append(Out.Tab("</div><div class=\"title\"><a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>", "<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"));
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        else
        {
            if (!new BCW.BLL.Game.Race().Exists(id))
            {
                Utils.Error("不存在的记录", "");
            }
            long   topPrice = Int64.Parse(Utils.GetRequest("topPrice", "post", 4, @"^[0-9]\d*$", "最高价错误"));
            int    WinID    = int.Parse(Utils.GetRequest("WinID", "post", 2, @"^[0-9]\d*$", "最高价用户ID错误"));
            string WinName  = Utils.GetRequest("WinName", "post", 2, @"^[\s\S]{1,10}$", "最高价用户昵称错误");
            if (!new BCW.BLL.User().Exists(WinID))
            {
                Utils.Error("不存在的会员", "");
            }
            new BCW.BLL.Game.Race().UpdatetopPrice(id, topPrice, WinID, WinName, 2);
            //转入币
            //手续费
            long Tax     = Convert.ToInt64(Utils.ParseInt(ub.GetSub("RaceTax", "/Controls/race.xml")) * 0.01 * topPrice);
            long payCent = Convert.ToInt64(topPrice - Tax);
            if (model.Types == 0)
            {
                new BCW.BLL.User().UpdateiGold(model.userid, model.username, payCent, "竞拍物品获得");
            }
            else
            {
                new BCW.BLL.User().UpdateiMoney(model.userid, model.username, payCent, "竞拍物品获得");
            }

            //发内线给发布竞拍者
            new BCW.BLL.Guest().Add(model.userid, model.username, "[URL=/bbs/uinfo.aspx?uid=" + WinID + "]" + WinName + "[/URL]以" + topPrice + "" + bzText + "成功竞拍您的[URL=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + model.title + "[/URL],竞拍" + topPrice + "" + bzText + "(不含手续费)已转入您的帐上");
            Utils.Success("确认结束竞拍", "确认结束竞拍成功,系统已发送内线至发布竞拍者..", Utils.getPage("race.aspx"), "1");
        }
    }
Ejemplo n.º 4
0
    private void MorePage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-2]$", "1"));

        Master.Title = "查看竞拍";
        builder.Append(Out.Tab("<div class=\"title\">查看竞拍</div>", ""));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        if (ptype == 1)
        {
            builder.Append("正在竞拍|<a href=\"" + Utils.getUrl("race.aspx?act=more&amp;ptype=2") + "\">历史竞拍</a>");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=more&amp;ptype=1") + "\">正在竞拍</a>|历史竞拍");
        }

        builder.Append(Out.Tab("</div>", "<br />"));
        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = string.Empty;

        strWhere = "paytype=" + ptype + "";
        string[] pageValUrl = { "act", "ptype", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        // 开始读取列表
        IList <BCW.Model.Game.Race> listRace = new BCW.BLL.Game.Race().GetRaces(pageIndex, pageSize, strWhere, out recordCount);

        if (listRace.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Race n in listRace)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", Out.Hr()));
                }
                else
                {
                    if (k == 1)
                    {
                        builder.Append(Out.Tab("<div>", ""));
                    }
                    else
                    {
                        builder.Append(Out.Tab("<div>", Out.Hr()));
                    }
                }
                string bzText = string.Empty;
                if (n.Types == 0)
                {
                    bzText = ub.Get("SiteBz");
                }
                else
                {
                    bzText = ub.Get("SiteBz2");
                }

                builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=view&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.title + "(起拍价" + n.price + "" + bzText + ")</a>");
                if (ptype == 0)
                {
                    builder.Append("未审核");
                }
                else if (ptype == 1)
                {
                    if (n.totime < DateTime.Now)
                    {
                        builder.Append("<br />剩余时间:竞拍已截止");
                    }
                    else
                    {
                        builder.Append("<br />剩余时间:" + DT.DateDiff(DateTime.Now, n.totime) + "");
                    }
                }
                else
                {
                    builder.Append("<br />竞拍得主:<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + n.winID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.winName + "</a>");
                }
                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏大厅</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx") + "\">竞拍</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Ejemplo n.º 5
0
    private void WinPage()
    {
        Master.Title = "竞拍得主名单";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("竞拍得主名单");
        builder.Append(Out.Tab("</div>", "<br />"));
        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = string.Empty;

        strWhere = "paytype=2 and winID>0";
        string[] pageValUrl = { "act", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        // 开始读取列表
        IList <BCW.Model.Game.Race> listRace = new BCW.BLL.Game.Race().GetRaces(pageIndex, pageSize, strWhere, out recordCount);

        if (listRace.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Race n in listRace)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", Out.Hr()));
                }
                else
                {
                    if (k == 1)
                    {
                        builder.Append(Out.Tab("<div>", ""));
                    }
                    else
                    {
                        builder.Append(Out.Tab("<div>", Out.Hr()));
                    }
                }
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + n.winID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">[" + DT.FormatDate(n.totime, 4) + "]" + n.winName + "拍得" + n.title + "</a>");

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div class=\"title\">", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏大厅</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx") + "\">竞拍</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Ejemplo n.º 6
0
    private void ReloadPage()
    {
        Master.Title = ub.GetSub("RaceName", xmlPath);
        string Logo = ub.GetSub("RaceLogo", xmlPath);

        if (Logo != "")
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<img src=\"" + Logo + "\" alt=\"load\"/>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("/bbs/game/default.aspx") + "\">游戏大厅</a>&gt;竞拍");
        builder.Append(Out.Tab("</div>", "<br />"));

        builder.Append(Out.Tab("<div>", ""));
        string Notes = ub.GetSub("RaceNotes", xmlPath);

        if (Notes != "")
        {
            builder.Append(Out.SysUBB(Notes) + "<br />");
        }

        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=add") + "\">发布竞拍</a>.");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=my") + "\">我的竞拍</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("正在进行的竞拍");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div>", ""));
        IList <BCW.Model.Game.Race> listRace = new BCW.BLL.Game.Race().GetRaces(5, "paytype=1");

        if (listRace.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Race n in listRace)
            {
                if (k == 1)
                {
                    builder.Append(Out.Tab("<div>", ""));
                }
                else
                {
                    builder.Append(Out.Tab("<div>", Out.Hr()));
                }

                builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=view&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + k + "." + n.title + "(" + n.payCount + "人竞拍中)</a>");
                if (n.totime > DateTime.Now)
                {
                    builder.Append("<br />剩余时间:" + DT.DateDiff(DateTime.Now, n.totime) + "");
                }
                else
                {
                    builder.Append("<br />剩余时间:已截止");
                }
                if (!string.IsNullOrEmpty(n.fileurl))
                {
                    builder.Append("<br /><img src=\"" + n.fileurl + "\" alt=\"load\"/>");
                }

                builder.Append(Out.Tab("</div>", ""));
                k++;
            }
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=more&amp;backurl=" + Utils.PostPage(1) + "") + "\">&gt;&gt;查看更多竞拍</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("</div>", ""));

        //闲聊显示
        builder.Append(Out.SysUBB(BCW.User.Users.ShowSpeak(4, "race.aspx", 5, 0)));

        builder.Append(Out.Tab("<div>", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=more&amp;ptype=2") + "\">历史竞拍</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=rule") + "\">竞拍规则</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=win") + "\">竞拍历史得主</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏大厅</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Ejemplo n.º 7
0
    private void ListPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int id = int.Parse(Utils.GetRequest("id", "all", 2, @"^[1-9]\d*$", "ID错误"));

        BCW.Model.Game.Race model = new BCW.BLL.Game.Race().GetRace(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        if (model.paytype < 1)
        {
            Utils.Error("此竞拍还没有通过审核", "");
        }
        string bzText = string.Empty;

        if (model.Types == 0)
        {
            bzText = ub.Get("SiteBz");
        }
        else
        {
            bzText = ub.Get("SiteBz2");
        }

        Master.Title = "查看出价记录";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=view&amp;id=" + id + "") + "\">返回上一级</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        int    pageIndex;
        int    recordCount;
        int    pageSize = Convert.ToInt32(ub.Get("SiteListNo"));
        string strWhere = string.Empty;

        strWhere = "raceid=" + id + "";
        string[] pageValUrl = { "act", "id", "backurl" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }

        // 开始读取列表
        IList <BCW.Model.Game.Racelist> listRacelist = new BCW.BLL.Game.Racelist().GetRacelists(pageIndex, pageSize, strWhere, out recordCount);

        if (listRacelist.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Racelist n in listRacelist)
            {
                if (k % 2 == 0)
                {
                    builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                }
                else
                {
                    if (k == 1)
                    {
                        builder.Append(Out.Tab("<div>", ""));
                    }
                    else
                    {
                        builder.Append(Out.Tab("<div>", "<br />"));
                    }
                }

                builder.Append("<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + n.payusid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">[" + DT.FormatDate(n.paytime, 6) + "]" + n.payname + "</a>(出价" + n.payCent + "" + bzText + ")");

                k++;
                builder.Append(Out.Tab("</div>", ""));
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div>", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=view&amp;id=" + id + "") + "\">返回查看竞拍</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏大厅</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx") + "\">竞拍</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Ejemplo n.º 8
0
    private void PayPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        int  id      = int.Parse(Utils.GetRequest("id", "post", 2, @"^[1-9]\d*$", "ID错误"));
        long payCent = Int64.Parse(Utils.GetRequest("payCent", "post", 4, @"^[1-9]\d*$", "出价错误"));

        BCW.Model.Game.Race model = new BCW.BLL.Game.Race().GetRace(id);
        if (model.userid == meid)
        {
            Utils.Error("不能竞拍自己的物品", "");
        }
        if (model.paytype != 1)
        {
            Utils.Error("此竞拍未通过审核或已结束", "");
        }
        if (model.totime < DateTime.Now)
        {
            Utils.Error("竞拍已经结束", "");
        }
        string bzText = string.Empty;

        if (model.Types == 0)
        {
            bzText = ub.Get("SiteBz");
        }
        else
        {
            bzText = ub.Get("SiteBz2");
        }

        long payCents = 0;

        if (model.Types == 0)
        {
            payCents = model.topPrice + Utils.ParseInt64(ub.GetSub("RaceZfPrice", xmlPath));
        }
        else
        {
            payCents = model.topPrice + Utils.ParseInt64(ub.GetSub("RaceZfPrice2", xmlPath));
        }

        if (payCent < payCents)
        {
            Utils.Error("出价至少" + payCents + "" + bzText + "", "");
        }
        long gold = 0;

        if (model.Types == 0)
        {
            gold = new BCW.BLL.User().GetGold(meid);
        }
        else
        {
            gold = new BCW.BLL.User().GetMoney(meid);
        }

        if (gold < Convert.ToInt64(payCent))
        {
            Utils.Error("你的" + bzText + "不足", "");
        }
        if (model.winID == meid)
        {
            Utils.Error("你已成功出价", "");
        }
        string mename = new BCW.BLL.User().GetUsName(meid);

        if (model.Types == 0)
        {
            //支付安全提示
            string[] p_pageArr = { "act", "id", "payCent" };
            BCW.User.PaySafe.PaySafePage(meid, Utils.getPageUrl(), p_pageArr);
            //扣币
            new BCW.BLL.User().UpdateiGold(meid, mename, -payCent, "竞拍物品");

            //退回上个会员ID的币
            if (model.winID > 0 && model.topPrice > 0)
            {
                new BCW.BLL.User().UpdateiGold(model.winID, model.winName, model.topPrice, "竞拍退回");
                //发内线提示上一个会员ID
                new BCW.BLL.Guest().Add(1, model.winID, model.winName, "[URL=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/URL]以" + payCent + "" + bzText + "竞拍[URL=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + model.title + "[/URL],系统将您之前竞拍的" + model.topPrice + "" + bzText + "退回到您的帐上");
            }
        }
        else
        {
            //扣币
            new BCW.BLL.User().UpdateiMoney(meid, mename, -payCent, "竞拍物品");

            //退回上个会员ID的币
            if (model.winID > 0 && model.topPrice > 0)
            {
                new BCW.BLL.User().UpdateiMoney(model.winID, model.winName, model.topPrice, "竞拍退回");
                //发内线提示上一个会员ID
                new BCW.BLL.Guest().Add(1, model.winID, model.winName, "[URL=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/URL]以" + payCent + "" + bzText + "竞拍[URL=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + model.title + "[/URL],系统将您之前竞拍的" + model.topPrice + "" + bzText + "退回到您的帐上");
            }
        }
        //写入购买记录
        BCW.Model.Game.Racelist paymodel = new BCW.Model.Game.Racelist();
        paymodel.payname = mename;
        paymodel.payusid = meid;
        paymodel.payCent = payCent;
        paymodel.paytime = DateTime.Now;
        paymodel.raceid  = id;
        paymodel.paytype = 0;
        new BCW.BLL.Game.Racelist().Add(paymodel);
        //更新最新报价和会员ID
        new BCW.BLL.Game.Race().UpdatetopPrice(id, payCent, meid, mename, 1);

        //检查结束时间是否少于5分钟
        string   sText = string.Empty;
        DateTime stime = model.totime.AddMinutes(5);//加5分钟

        if (DateTime.Now > model.totime.AddMinutes(-5))
        {
            new BCW.BLL.Game.Race().Updatetotime(id, stime);
            sText = "为公平起见,竞拍结束时间延长5分钟";
        }
        string wText = "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]以" + payCent + "" + bzText + "竞拍[url=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + model.title + "[/url]";

        new BCW.BLL.Action().Add(4, id, 0, "", wText);
        //活跃抽奖入口_20160621姚志光
        try
        {
            //表中存在记录
            if (new BCW.BLL.tb_WinnersGame().ExistsGameName("欢乐竞拍"))
            {
                //投注是否大于设定的限额,是则有抽奖机会
                if (payCent > new BCW.BLL.tb_WinnersGame().GetPrice("欢乐竞拍"))
                {
                    string TextForUbb       = (ub.GetSub("TextForUbb", "/Controls/winners.xml"));       //设置内线提示的文字
                    string WinnersGuessOpen = (ub.GetSub("WinnersGuessOpen", "/Controls/winners.xml")); //1发内线2不发内线
                    int    hit = new BCW.winners.winners().CheckActionForAll(1, 1, meid, mename, "竞拍", 3);
                    if (hit == 1)
                    {
                        //内线开关 1开
                        if (WinnersGuessOpen == "1")
                        {
                            //发内线到该ID
                            new BCW.BLL.Guest().Add(0, meid, mename, TextForUbb);
                        }
                    }
                }
            }
        }
        catch { }
        Utils.Success("出价竞拍", "出价成功!" + sText + "", Utils.getUrl("race.aspx?act=view&amp;id=" + id + ""), "1");
    }
Ejemplo n.º 9
0
    private void ViewPage()
    {
        int meid = new BCW.User.Users().GetUsId();

        int id = int.Parse(Utils.GetRequest("id", "all", 2, @"^[1-9]\d*$", "ID错误"));

        BCW.Model.Game.Race model = new BCW.BLL.Game.Race().GetRace(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        string bzText = string.Empty;

        if (model.Types == 0)
        {
            bzText = ub.Get("SiteBz");
        }
        else
        {
            bzText = ub.Get("SiteBz2");
        }

        Master.Title = "查看竞拍";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append(model.title);
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append("" + Out.SysUBB(model.content) + "");
        if (meid > 0)
        {
            if (model.paytype == 2 && model.winID == meid)
            {
                builder.Append("<br />=保密内容=<br />" + model.pcontent + "");
            }
        }
        builder.Append(Out.Tab("</div>", "<br />"));
        if (!string.IsNullOrEmpty(model.fileurl))
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<img src=\"" + model.fileurl + "\" alt=\"load\"/>");
            builder.Append("<br /><a href=\"" + Utils.getUrl(model.fileurl) + "\">下载截图</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }

        builder.Append(Out.Tab("<div>", ""));
        builder.Append("发布时间:" + model.writetime + "");
        if (model.totime < DateTime.Now)
        {
            builder.Append("<br />剩余时间:已截止");
        }
        else
        {
            builder.Append("<br />剩余时间:" + DT.DateDiff(DateTime.Now, model.totime) + "");
        }
        builder.Append("<br />截止时间:" + model.totime + "");
        builder.Append("<br />起拍价:" + model.price + "" + bzText + "");
        builder.Append("<br />发布会员:<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + model.userid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + model.username + "</a>");
        if (meid > 0)
        {
            if (model.payCount == 0 && model.userid == meid)
            {
                builder.Append("<br /><a href=\"" + Utils.getUrl("race.aspx?act=del&amp;id=" + id + "") + "\">删除竞拍</a>");
            }
        }
        if (model.paytype == 2 && model.winID != 0)
        {
            builder.Append("<br /><b>竞拍最后得主:</b><a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + model.winID + "") + "\">" + model.winName + "</a>");
        }
        else
        {
            if (model.winID > 0)
            {
                builder.Append("<br /><b>当前最高价:</b>" + model.topPrice + "" + bzText + ",<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + model.winID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + model.winName + "</a>");
            }
        }
        builder.Append(Out.Tab("</div>", "<br />"));
        if (model.paytype > 0)
        {
            if (model.paytype == 1 && model.totime > DateTime.Now)
            {
                //增幅
                long paycents = 0;
                if (model.Types == 0)
                {
                    paycents = model.topPrice + Convert.ToInt64(ub.GetSub("RaceZfPrice", xmlPath));
                }
                else
                {
                    paycents = model.topPrice + Convert.ToInt64(ub.GetSub("RaceZfPrice2", xmlPath));
                }

                builder.Append(Out.Tab("<div>", ""));
                long gold  = new BCW.BLL.User().GetGold(meid);
                long money = new BCW.BLL.User().GetMoney(meid);
                builder.Append("您目前共有" + Utils.ConvertGold(gold) + "" + ub.Get("SiteBz") + "/" + Utils.ConvertGold(money) + "" + ub.Get("SiteBz2") + "");
                builder.Append(Out.Tab("</div>", "<br />"));
                strText = "出价(须高于最高价和起拍价):/,,";
                strName = "payCent,id,act";
                strType = "stext,hidden,hidden";
                strValu = "" + paycents + "'" + id + "'pay";
                strEmpt = "false,false,false";
                strIdea = "";
                strOthe = "我拍,race.aspx,post,3,red";
                builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                builder.Append(Out.Tab("<div>", "<br />"));
                builder.Append("增幅至少" + (paycents - model.topPrice) + "" + bzText + ",即" + paycents + "" + bzText + "");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("=最新出价=");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            IList <BCW.Model.Game.Racelist> listRacelist = new BCW.BLL.Game.Racelist().GetRacelists(5, "raceid=" + id + "");
            if (listRacelist.Count > 0)
            {
                foreach (BCW.Model.Game.Racelist n in listRacelist)
                {
                    builder.Append("<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + n.payusid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.payname + "出价" + n.payCent + "" + bzText + "</a>" + DT.DateDiff(DateTime.Now, n.paytime) + "前<br />");
                }
                builder.Append("<a href=\"" + Utils.getUrl("race.aspx?act=list&amp;id=" + id + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">&gt;&gt;更多出价记录</a>");
            }
            else
            {
                builder.Append("没有出价记录..");
            }
            builder.Append(Out.Tab("</div>", ""));
            //显示闲聊
            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
            builder.Append("=最新留言=");
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(BCW.User.Users.ShowSpeak(4, "race.aspx", 5, meid, "view", id));
            builder.Append(Out.Tab("", "<br />"));
        }
        builder.Append(Out.Tab("<div>", Out.RHr()));
        builder.Append("<a href=\"" + Utils.getPage("race.aspx?act=my") + "\">返回上一级</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">游戏大厅</a>-");
        builder.Append("<a href=\"" + Utils.getUrl("race.aspx") + "\">竞拍</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
Ejemplo n.º 10
0
    private void SavePage()
    {
        int meid = new BCW.User.Users().GetUsId();

        if (meid == 0)
        {
            Utils.Login();
        }

        string   Title    = Utils.GetRequest("Title", "post", 2, @"^[\s\S]{1,20}$", "标题限1-20字");
        string   Content  = Utils.GetRequest("Content", "post", 2, @"^[\s\S]{1,1000}$", "物品描述限1-1000字");
        string   FileUrl  = Utils.GetRequest("FileUrl", "post", 3, @"^[\s\S]{1,100}$", "截图地址长度限100字符,可留空");
        string   PContent = Utils.GetRequest("PContent", "post", 2, @"^[\s\S]{1,300}$", "保密内容限1-300字");
        int      Types    = int.Parse(Utils.GetRequest("Types", "post", 2, @"^[0-1]$", "币种类型错误"));
        int      Price    = int.Parse(Utils.GetRequest("Price", "post", 2, @"^[0-9]\d*$", "起拍价填写错误"));
        DateTime Totime   = Utils.ParseTime(Utils.GetRequest("Totime", "post", 2, DT.RegexTime, "截止时间格式填写出错,正确格式如" + DT.FormatDate(DateTime.Now, 0) + ""));

        if (Types == 0)
        {
            int Startlow  = Utils.ParseInt(ub.GetSub("RaceStartlow", xmlPath));
            int Starthigh = Utils.ParseInt(ub.GetSub("RaceStarthigh", xmlPath));
            if (Price < Startlow || Price > Starthigh)
            {
                Utils.Error("起拍价限" + Startlow + "-" + Starthigh + "" + ub.Get("SiteBz") + "", "");
            }
        }
        else
        {
            int Startlow  = Utils.ParseInt(ub.GetSub("RaceStartlow2", xmlPath));
            int Starthigh = Utils.ParseInt(ub.GetSub("RaceStarthigh2", xmlPath));
            if (Price < Startlow || Price > Starthigh)
            {
                Utils.Error("起拍价限" + Startlow + "-" + Starthigh + "" + ub.Get("SiteBz2") + "", "");
            }
        }
        if (Totime < DateTime.Now)
        {
            Utils.Error("截止时间必须大于当时时间", "");
        }
        int DayNum   = Utils.ParseInt(ub.GetSub("RaceDayNum", xmlPath));
        int MyDayNum = new BCW.BLL.Game.Race().GetTodayCount(meid);

        if (MyDayNum >= DayNum)
        {
            Utils.Error("每天每ID只可以发布" + DayNum + "个竞拍", "");
        }
        BCW.Model.Game.Race model = new BCW.Model.Game.Race();
        string mename             = new BCW.BLL.User().GetUsName(meid);

        model.title     = Title;
        model.content   = Content;
        model.fileurl   = FileUrl;
        model.pcontent  = PContent;
        model.price     = Price;
        model.topPrice  = Price;
        model.totime    = Totime;
        model.userid    = meid;
        model.username  = mename;
        model.writetime = DateTime.Now;
        model.writedate = DateTime.Parse(DateTime.Now.ToLongDateString());
        model.Types     = Types;
        model.paytype   = 0;
        int id = new BCW.BLL.Game.Race().Add(model);

        string wText = "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]发布竞拍[url=/bbs/game/race.aspx?act=view&amp;id=" + id + "]" + Title + "[/url]";

        new BCW.BLL.Action().Add(4, id, 0, "", wText);
        Utils.Success("发布竞拍", "发布成功,请等待管理员审核才会显示出来..", Utils.getUrl("race.aspx"), "1");
    }