示例#1
0
    private void OpenPage()
    {
        int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "疯狂彩球ID错误"));

        Master.Title = "疯狂彩球开奖";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("第" + id + "期疯狂彩球开奖");
        builder.Append(Out.Tab("</div>", ""));
        BCW.Model.Game.Balllist model = new BCW.BLL.Game.Balllist().GetBalllist(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        if (model.State == 1)
        {
            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
            builder.Append("本期已开奖,要重新开奖吗");
            builder.Append(Out.Tab("</div>", ""));
        }
        string strText = "开出数字:/,,,";
        string strName = "WinNum,id,act,backurl";
        string strType = "num,hidden,hidden,hidden";
        string strValu = "" + model.WinNum + "'" + id + "'opensave'" + Utils.getPage(0) + "";
        string strEmpt = "false,false,false,false";
        string strIdea = "/";
        string strOthe = "确定开奖|reset,ball.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("ball.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 />"));
    }
示例#2
0
    private void PayPage()
    {
        if (IsOpen() == false)
        {
            Utils.Error("游戏开放时间:" + ub.GetSub("BallOnTime", xmlPath) + "", "");
        }

        int meid = new BCW.User.Users().GetUsId();

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

        Master.Title = "我要下注";
        BCW.Model.Game.Balllist ball = new BCW.BLL.Game.Balllist().GetBalllist();
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("疯狂彩球 第" + ball.ID + "期");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div>", ""));
        if (ball.EndTime < DateTime.Now)
        {
            builder.Append("系统正在开奖。。。");
        }
        else
        {
            builder.Append("距离开奖还有" + DT.DateDiff(DateTime.Now, ball.EndTime) + "");
        }

        long gold = new BCW.BLL.User().GetGold(meid);

        builder.Append("<br />您目前自带" + Utils.ConvertGold(gold) + "" + ub.Get("SiteBz") + "");
        builder.Append(Out.Tab("</div>", ""));
        strText = "下注数字(1-" + ub.GetSub("BallSysNum", xmlPath) + "):/,押多少份:/,";
        strName = "BuyNum,BuyCount,act";
        strType = "num,num,hidden";
        strValu = "''payok";
        strEmpt = "false,false,false";
        strIdea = "/每份" + ball.iCent + "" + ub.Get("SiteBz") + ",每人限购" + ub.GetSub("BallOutIDNum", xmlPath) + "份/";
        strOthe = "确定下注,ball.aspx,post,1,red";
        builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        builder.Append(Out.Tab("<div>", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx") + "\">返回疯狂彩球</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("ball.aspx") + "\">彩球</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
示例#3
0
    private void EditPage()
    {
        int ManageId = new BCW.User.Manage().IsManageLogin();

        if (ManageId != 1 && ManageId != 9)
        {
            Utils.Error("权限不足", "");
        }
        int id = int.Parse(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "疯狂彩球ID错误"));

        Master.Title = "编辑疯狂彩球";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("编辑第" + id + "期疯狂彩球");
        builder.Append(Out.Tab("</div>", ""));
        BCW.Model.Game.Balllist model = new BCW.BLL.Game.Balllist().GetBalllist(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        if (model.State == 0)
        {
            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
            builder.Append("当开出数字非0时,开奖时则使用该数字作为开奖结果");
            builder.Append(Out.Tab("</div>", ""));
        }
        string strText = "开出数字:/,开盘时间:/,开奖时间:/,本期可购买份数:/,已购买份数:/,每份价格:/,本期赔率:/,奖池额:/,上期奖池额:/,,,";
        string strName = "WinNum,BeginTime,EndTime,OutNum,AddNum,iCent,Odds,Pool,BeforePool,id,act,backurl";
        string strType = "num,date,date,num,num,num,num,num,num,hidden,hidden,hidden";
        string strValu = "" + model.WinNum + "'" + model.BeginTime + "'" + model.EndTime + "'" + model.OutNum + "'" + model.AddNum + "'" + model.iCent + "'" + model.Odds + "'" + model.Pool + "'" + model.BeforePool + "'" + id + "'editsave'" + Utils.getPage(0) + "";
        string strEmpt = "false,false,false,false,false,false,false,false,false,false,false,false";
        string strIdea = "/";
        string strOthe = "确定编辑|reset,ball.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("ball.aspx") + "\">返回上一级</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("ball.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 />"));
    }
示例#4
0
    private void ReloadPage()
    {
        Master.Title = ub.GetSub("BallName", xmlPath);
        int    meid = new BCW.User.Users().GetUsId();
        string Logo = ub.GetSub("BallLogo", 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 />"));

        string Notes = ub.GetSub("BallNotes", xmlPath);

        if (Notes != "")
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append(Out.SysUBB(Notes) + "");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        if (IsOpen() == true)
        {
            new BCW.User.Ball().BallPage(0, 0);
            BCW.Model.Game.Balllist ball = null;
            ball = new BCW.BLL.Game.Balllist().GetBalllist();
            if (ball.ID == 0)
            {
                //第一期开始
                ball.WinNum = 0;
                ball.OutNum = Utils.ParseInt(ub.GetSub("BallOutNum", xmlPath));
                ball.iCent  = Utils.ParseInt(ub.GetSub("BalliCent", xmlPath));
                ball.AddNum = 0;
                ball.Odds   = Utils.ParseInt(ub.GetSub("BallOdds", xmlPath));
                //系统投入币
                int SysCent = Utils.ParseInt(ub.GetSub("BallSysPay", xmlPath));
                //开奖周期分钟
                int CycleMin = Utils.ParseInt(ub.GetSub("BallCycleMin", xmlPath));
                ball.Pool       = Convert.ToInt64(SysCent);
                ball.BeforePool = Convert.ToInt64(SysCent);
                ball.BeginTime  = DateTime.Now;
                ball.EndTime    = DateTime.Now.AddMinutes(Convert.ToDouble(CycleMin));
                ball.ID         = new BCW.BLL.Game.Balllist().Add(ball);
            }
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("欢迎进入疯狂彩球第" + ball.ID + "期");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            if (ball.EndTime < DateTime.Now)
            {
                builder.Append("系统正在开奖。。。");
            }
            else
            {
                builder.Append("距离开奖还有" + DT.DateDiff(DateTime.Now, ball.EndTime) + "");
            }

            builder.Append("<br />每份下注:" + Utils.ConvertGold(Convert.ToInt64(ball.iCent)) + "" + ub.Get("SiteBz") + "/赔率1:" + ball.Odds + "");
            builder.Append("<br />奖池:" + Utils.ConvertGold(ball.Pool) + "" + ub.Get("SiteBz") + "<br />");
            if (ball.BeforePool > 0)
            {
                builder.Append("上期落下奖池:" + Utils.ConvertGold(ball.BeforePool) + "" + ub.Get("SiteBz") + "<br />");
            }
            builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=pay") + "\">立即投注</a> ");
        }
        else
        {
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("欢迎进入疯狂彩球游戏");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("游戏开放时间:" + ub.GetSub("BallOnTime", xmlPath) + "");
            builder.Append("<br />目前还没到开放时间哦!");
            builder.Append("<br /><a href=\"" + Utils.getUrl("ball.aspx?act=list&amp;backurl=" + Utils.PostPage(1) + "") + "\">历史开奖</a> ");
        }
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=case") + "\">兑奖</a> ");
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx") + "\">刷新</a><br />");
        builder.Append("你目前自带" + Utils.ConvertGold(new BCW.BLL.User().GetGold(meid)) + "" + ub.Get("SiteBz") + "");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=mylist&amp;ptype=1") + "\">未开投注</a> ");
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=mylist&amp;ptype=2") + "\">历史投注</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=top") + "\">排行榜单</a> ");
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=help") + "\">游戏帮助</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("【往期开奖记录】");
        builder.Append(Out.Tab("</div>", "<br />"));
        IList <BCW.Model.Game.Balllist> listBalllist = new BCW.BLL.Game.Balllist().GetBalllists(3, "State=1");

        if (listBalllist.Count > 0)
        {
            builder.Append(Out.Tab("<div>", ""));
            int k = 1;
            foreach (BCW.Model.Game.Balllist n in listBalllist)
            {
                builder.Append("第" + n.ID + "期开出号码:<a href=\"" + Utils.getUrl("ball.aspx?act=listview&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\"><b>" + n.WinNum + "</b></a><br />");

                k++;
            }
            builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=list&amp;backurl=" + Utils.PostPage(1) + "") + "\">&gt;&gt;查看历史开奖</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            builder.Append(Out.Div("div", "没有相关记录.."));
        }

        //闲聊显示
        builder.Append(Out.SysUBB(BCW.User.Users.ShowSpeak(8, "ball.aspx", 0, 0)));
        builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
        builder.Append("【游戏动态记录】");
        builder.Append(Out.Tab("</div>", ""));
        // 开始读取动态列表
        int    SizeNum  = 3;
        string strWhere = "Types=8";
        IList <BCW.Model.Action> listAction = new BCW.BLL.Action().GetActions(SizeNum, strWhere);

        if (listAction.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Action n in listAction)
            {
                builder.Append(Out.Tab("<div>", "<br />"));
                string ForNotes = Regex.Replace(n.Notes, @"\[url=\/bbs\/game\/([\s\S]+?)\]([\s\S]+?)\[\/url\]", "$2", RegexOptions.IgnoreCase);
                ForNotes = ForNotes.Replace("疯狂彩球", "");
                builder.AppendFormat("{0}前{1}", DT.DateDiff2(DateTime.Now, n.AddTime), Out.SysUBB(ForNotes));
                builder.Append(Out.Tab("</div>", ""));
                k++;
            }
            if (k > SizeNum)
            {
                builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/action.aspx?ptype=8&amp;backurl=" + Utils.PostPage(1) + "") + "\">更多游戏动态</a>");
                builder.Append(Out.Tab("</div>", ""));
            }
        }
        //游戏底部Ubb
        string Foot = ub.GetSub("BallFoot", xmlPath);

        if (Foot != "")
        {
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append(BCW.User.AdminCall.AdminUBB(Out.SysUBB(Foot)));
            builder.Append(Out.Tab("</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(Out.Tab("</div>", ""));
    }
示例#5
0
    private void ListViewPage()
    {
        int id = Utils.ParseInt(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "ID错误"));

        BCW.Model.Game.Balllist model = new BCW.BLL.Game.Balllist().GetBalllist(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        Master.Title = "第" + id + "期疯狂彩球";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("<a href=\"" + Utils.getPage("ball.aspx?act=list") + "\">返回上一级</a>");
        builder.Append(Out.Tab("</div>", "<br />"));

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

        strWhere += "BallId=" + id + " and WinCent>0";

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

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

        if (listBallpay.Count > 0)
        {
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("第" + id + "期开出号码:<b>" + model.WinNum + "</b>");
            builder.Append("<br />共" + recordCount + "注中奖");
            builder.Append(Out.Tab("</div>", "<br />"));

            int k = 1;
            foreach (BCW.Model.Game.Ballpay n in listBallpay)
            {
                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("" + ((pageIndex - 1) * pageSize + k) + ".");
                builder.Append("<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + n.UsID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a>获得" + n.WinCent + "" + ub.Get("SiteBz") + "");

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

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("第" + id + "期开出号码:<b>" + model.WinNum + "</b>");
            builder.Append("<br />共0注中奖");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Div("div", "没有相关记录.."));
        }
        builder.Append(Out.Tab("<div>", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=mylist&amp;ptype=1") + "\">未开投注</a> ");
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=mylist&amp;ptype=2") + "\">历史投注</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("ball.aspx") + "\">彩球</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
示例#6
0
    private void ListPage()
    {
        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 = "State=1";

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

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

        if (listBalllist.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Balllist n in listBalllist)
            {
                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("第" + n.ID + "期开出号码:<a href=\"" + Utils.getUrl("ball.aspx?act=listview&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\"><b>" + n.WinNum + "</b></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>", Out.Hr()));
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=mylist&amp;ptype=1") + "\">未开投注</a> ");
        builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=mylist&amp;ptype=2") + "\">历史投注</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("ball.aspx") + "\">彩球</a>");
        builder.Append(Out.Tab("</div>", ""));
    }
示例#7
0
    private void PayOkPage()
    {
        if (IsOpen() == false)
        {
            Utils.Error("游戏开放时间:" + ub.GetSub("BallOnTime", xmlPath) + "", "");
        }

        int meid = new BCW.User.Users().GetUsId();

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

        int BuyNum   = int.Parse(Utils.GetRequest("BuyNum", "post", 2, @"^[1-9]$|^[1-4]([0-9])?$", "下注数字限1-" + ub.GetSub("BallSysNum", xmlPath) + ""));
        int BuyCount = int.Parse(Utils.GetRequest("BuyCount", "post", 2, @"^[1-9]\d*$", "下注份数填写错误"));

        if (BuyNum < 1 || BuyNum > Utils.ParseInt(ub.GetSub("BallSysNum", xmlPath)))
        {
            Utils.Error("下注数字限1-" + ub.GetSub("BallSysNum", xmlPath) + "", "");
        }
        //是否刷屏
        string appName = "LIGHT_BALL";
        int    Expir   = Utils.ParseInt(ub.GetSub("BallExpir", xmlPath));

        BCW.User.Users.IsFresh(appName, Expir);

        BCW.Model.Game.Balllist ball = new BCW.BLL.Game.Balllist().GetBalllist();
        //每期每ID限下注份数
        int BuyCounts = new BCW.BLL.Game.Ballpay().GetBuyCount(ball.ID, meid);

        if (BuyCount + BuyCounts > Utils.ParseInt(ub.GetSub("BallOutIDNum", xmlPath)))
        {
            if (BuyCounts >= Utils.ParseInt(ub.GetSub("BallOutIDNum", xmlPath)))
            {
                Utils.Error("系统限制每期每人下注" + Utils.ParseInt(ub.GetSub("BallOutIDNum", xmlPath)) + "份,欢迎在下期下注", "");
            }
            else
            {
                Utils.Error("系统限制每期每人下注" + Utils.ParseInt(ub.GetSub("BallOutIDNum", xmlPath)) + "份,你现在最多可以下注" + (Utils.ParseInt(ub.GetSub("BallOutIDNum", xmlPath)) - BuyCounts) + "份", "");
            }
        }
        Application.Lock();
        //每期下注限份数
        if ((ball.OutNum - ball.AddNum) < BuyCount)
        {
            if (ball.OutNum == 0)
            {
                Utils.Error("系统每期限购" + ball.OutNum + "份,欢迎在下期下注", "");
            }
            else
            {
                Utils.Error("系统每期限购" + ball.OutNum + "份,您还可以购买" + ((ball.OutNum - ball.AddNum) - BuyCount) + "份", "");
            }
        }
        if (Convert.ToInt64(BuyCount * ball.iCent) > new BCW.BLL.User().GetGold(meid))
        {
            Utils.Error("需花费" + Convert.ToInt64(BuyCount * ball.iCent) + "" + ub.Get("SiteBz") + ",你身上" + ub.Get("SiteBz") + "不足", "");
        }

        //支付安全提示
        string[] p_pageArr = { "act", "BuyNum", "BuyCount" };
        BCW.User.PaySafe.PaySafePage(meid, Utils.getPageUrl(), p_pageArr);

        BCW.Model.Game.Ballpay model = new BCW.Model.Game.Ballpay();
        int    id     = 0;
        string mename = new BCW.BLL.User().GetUsName(meid);

        model.BallId   = ball.ID;
        model.UsID     = meid;
        model.UsName   = mename;
        model.BuyCent  = Convert.ToInt64(BuyCount * ball.iCent);
        model.BuyNum   = BuyNum;
        model.BuyCount = BuyCount;
        model.State    = 0;
        model.WinCent  = 0;
        model.AddTime  = DateTime.Now;
        if (!new BCW.BLL.Game.Ballpay().ExistsBuyNum(ball.ID, BuyNum, meid))
        {
            id = new BCW.BLL.Game.Ballpay().Add(model);
        }
        else
        {
            new BCW.BLL.Game.Ballpay().Update(model);
        }
        //加奖池基金并减购买份数
        new BCW.BLL.Game.Balllist().UpdatePool(ball.ID, Convert.ToInt64(BuyCount * ball.iCent), BuyCount);



        //扣币
        new BCW.BLL.User().UpdateiGold(meid, mename, -Convert.ToInt64(BuyCount * ball.iCent), 6);
        string wText = "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]在[url=/bbs/game/ball.aspx]疯狂彩球第" + ball.ID + "期[/url]下注" + Convert.ToInt64(BuyCount * ball.iCent) + "" + ub.Get("SiteBz") + "";

        new BCW.BLL.Action().Add(8, id, 0, "", wText);
        Utils.Success("下注", "下注成功,花费了" + Convert.ToInt64(BuyCount * ball.iCent) + "" + ub.Get("SiteBz") + "<br /><a href=\"" + Utils.getUrl("ball.aspx?act=pay") + "\">&gt;继续下注</a>", Utils.getUrl("ball.aspx"), "2");
        Application.UnLock();
    }
示例#8
0
    private void ReloadPage()
    {
        Master.Title = "疯狂彩球管理";
        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 />"));

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

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

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

        if (listBalllist.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Game.Balllist n in listBalllist)
            {
                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("ball.aspx?act=edit&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">[管理]&gt;</a>");

                if (n.State == 0)
                {
                    builder.Append("第" + n.ID + "期开出号码:<a href=\"" + Utils.getUrl("ball.aspx?act=view&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">未开</a> <a href=\"" + Utils.getUrl("ball.aspx?act=open&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">开奖</a>");
                }
                else
                {
                    builder.Append("第" + n.ID + "期开出号码:<a href=\"" + Utils.getUrl("ball.aspx?act=view&amp;id=" + n.ID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.WinNum + "</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("ball.aspx?act=reset") + "\">重置游戏</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("../xml/ballset.aspx?backurl=" + Utils.PostPage(1) + "") + "\">游戏配置</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("../toplist.aspx?act=top&amp;ptype=6&amp;backurl=" + Utils.PostPage(1) + "") + "\">排行榜单</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(Out.Tab("</div>", "<br />"));
    }
示例#9
0
    private void ViewPage()
    {
        int id    = int.Parse(Utils.GetRequest("id", "get", 2, @"^[1-9]\d*$", "ID错误"));
        int ptype = int.Parse(Utils.GetRequest("ptype", "get", 1, @"^[1-2]\d*$", "1"));

        BCW.Model.Game.Balllist model = new BCW.BLL.Game.Balllist().GetBalllist(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        Master.Title = "第" + id + "期疯狂彩球";
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("查看下注/开奖记录");
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        builder.Append("查看:");
        if (ptype == 1)
        {
            builder.Append("下注|");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=view&amp;ptype=1&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">下注</a>|");
        }

        if (ptype == 2)
        {
            builder.Append("中奖");
        }
        else
        {
            builder.Append("<a href=\"" + Utils.getUrl("ball.aspx?act=view&amp;ptype=2&amp;id=" + id + "&amp;backurl=" + Utils.getPage(0) + "") + "\">中奖</a>");
        }

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

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

        if (ptype == 1)
        {
            strWhere += "BallId=" + id + "";
        }
        else
        {
            strWhere += "BallId=" + id + " and state>0 and winCent>0";
        }

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

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

        if (listBallpay.Count > 0)
        {
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("第" + id + "期开出号码:<b>" + model.WinNum + "</b>");
            if (ptype == 1)
            {
                builder.Append("<br />共" + recordCount + "注下注");
            }
            else
            {
                builder.Append("<br />共" + recordCount + "注中奖");
            }

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

            int k = 1;
            foreach (BCW.Model.Game.Ballpay n in listBallpay)
            {
                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("" + ((pageIndex - 1) * pageSize + k) + ".<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + n.UsID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.UsName + "</a>");
                if (n.State == 0)
                {
                    builder.Append("买" + n.BuyNum + ",共押" + n.BuyCount + "份/花费" + n.BuyCent + "" + ub.Get("SiteBz") + "[" + DT.FormatDate(n.AddTime, 13) + "]");
                }
                else if (n.State == 1)
                {
                    builder.Append("买" + n.BuyNum + ",共押" + n.BuyCount + "份/花费" + n.BuyCent + "" + ub.Get("SiteBz") + "[" + DT.FormatDate(n.AddTime, 1) + "]");
                    if (n.WinCent > 0)
                    {
                        builder.Append("赢" + n.WinCent + "" + ub.Get("SiteBz") + "");
                    }
                }
                else
                {
                    builder.Append("买" + n.BuyNum + ",共押" + n.BuyCount + "份/花费" + n.BuyCent + "" + ub.Get("SiteBz") + ",赢" + n.WinCent + "" + ub.Get("SiteBz") + "[" + DT.FormatDate(n.AddTime, 1) + "]");
                }


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

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("第" + id + "期开出号码:<b>" + model.WinNum + "</b>");
            builder.Append("<br />共0注中奖");
            builder.Append(Out.Tab("</div>", "<br />"));
            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.getPage("ball.aspx") + "\">返回上一级</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(Out.Tab("</div>", "<br />"));
    }