Example #1
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>", ""));
    }
Example #2
0
    private void ReloadPage()
    {
        Master.Title = ub.GetSub("AppleName", xmlPath);
        int    meid = new BCW.User.Users().GetUsId();
        string Logo = ub.GetSub("AppleLogo", xmlPath);

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

        if (Notes != "")
        {
            builder.Append(Out.Tab("<div>", ""));
            builder.Append(Out.SysUBB(Notes) + "");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
        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>", ""));
        builder.Append("你目前自带" + Utils.ConvertGold(new BCW.BLL.User().GetGold(meid)) + "" + ub.Get("SiteBz") + "<br />");
        if (IsOpen() == true)
        {
            new BCW.User.Apple().ApplePage();
            BCW.Model.Game.Applelist apple = new BCW.BLL.Game.Applelist().GetApplelistBQ(0);
            if (apple.ID == 0)
            {
                //第一期开始
                int Minutes = Utils.ParseInt(ub.GetSub("AppleMinutes", xmlPath));
                apple.OpenText = "";
                apple.EndTime  = DateTime.Now.AddMinutes(Minutes);
                apple.State    = 0;
                apple.ID       = new BCW.BLL.Game.Applelist().Add(apple);
            }

            if (apple.EndTime.AddSeconds(-10) > DateTime.Now)
            {
                builder.Append("还有" + DT.DateDiff(apple.EndTime, DateTime.Now) + "开动");
            }
            else
            {
                builder.Append("苹果机正在转动。。。");
            }

            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx") + "\">刷新</a>");

            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("【我要下注】<a href=\"" + Utils.getUrl("apple.aspx?act=case") + "\">兑奖</a><br />");
            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=pay&amp;ptype=1&amp;id=" + apple.ID + "") + "\">下注</a>苹果×" + ub.GetSub("AppleOdds1", xmlPath) + " (" + apple.PingGuo + "注)<br />");
            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=pay&amp;ptype=2&amp;id=" + apple.ID + "") + "\">下注</a>木瓜×" + ub.GetSub("AppleOdds2", xmlPath) + "|小木×" + ub.GetSub("AppleOddsSmall", xmlPath) + " (" + apple.MuGua + "注)<br />");
            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=pay&amp;ptype=3&amp;id=" + apple.ID + "") + "\">下注</a>西瓜×" + ub.GetSub("AppleOdds3", xmlPath) + "|小西×" + ub.GetSub("AppleOddsSmall", xmlPath) + " (" + apple.XiGua + "注)<br />");
            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=pay&amp;ptype=4&amp;id=" + apple.ID + "") + "\">下注</a>芒果×" + ub.GetSub("AppleOdds4", xmlPath) + "|小芒×" + ub.GetSub("AppleOddsSmall", xmlPath) + " (" + apple.MangGuo + "注)<br />");
            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=pay&amp;ptype=5&amp;id=" + apple.ID + "") + "\">下注</a>双星×" + ub.GetSub("AppleOdds5", xmlPath) + "|小星×" + ub.GetSub("AppleOddsSmall", xmlPath) + " (" + apple.ShuangXing + "注)<br />");
            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=pay&amp;ptype=6&amp;id=" + apple.ID + "") + "\">下注</a>金钟×" + ub.GetSub("AppleOdds6", xmlPath) + "|小钟×" + ub.GetSub("AppleOddsSmall", xmlPath) + " (" + apple.JinZhong + "注)<br />");
            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=pay&amp;ptype=7&amp;id=" + apple.ID + "") + "\">下注</a>双七×" + ub.GetSub("AppleOdds7", xmlPath) + "|小七×" + ub.GetSub("AppleOddsSmall", xmlPath) + " (" + apple.ShuangQi + "注)<br />");
            builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=pay&amp;ptype=8&amp;id=" + apple.ID + "") + "\">下注</a>元宝×" + ub.GetSub("AppleOdds8", xmlPath) + " (" + apple.YuanBao + "注)");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            //本期下注
            int PayCount   = 0;
            int BfPayCount = 0;
            if (meid > 0)
            {
                PayCount = new BCW.BLL.Game.Applepay().GetCount(meid, apple.ID);
            }
            if (PayCount > 0)
            {
                builder.Append("本期您已下注<a href=\"" + Utils.getUrl("apple.aspx?act=mylist&amp;ptype=1") + "\">" + PayCount + "</a>注");
            }
            else
            {
                builder.Append("本期您还没有下注哦.");
            }

            //上期下注
            BfPayCount = new BCW.BLL.Game.Applepay().GetCount(meid, (apple.ID - 1));
            if (BfPayCount > 0)
            {
                builder.Append("<br /><a href=\"" + Utils.getUrl("apple.aspx?act=again&amp;id=" + apple.ID + "") + "\">重压上期投注(" + BfPayCount + "注)</a>");
            }
        }
        BCW.Model.Game.Applelist bfapple = new BCW.BLL.Game.Applelist().GetApplelistBQ(1);
        if (bfapple.OpenText != "")
        {
            builder.Append("<br />上期第" + bfapple.ID + "期开" + bfapple.OpenText + ",<a href=\"" + Utils.getUrl("apple.aspx?act=win&amp;id=" + bfapple.ID + "") + "\">赢家" + bfapple.WinCount + "人</a>获" + bfapple.WinCent + "" + ub.Get("SiteBz") + "");
        }
        builder.Append(Out.Tab("</div>", ""));
        //闲聊显示
        builder.Append(Out.SysUBB(BCW.User.Users.ShowSpeak(17, "apple.aspx", 5, 0)));
        builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
        builder.Append("【下注记录】<br />");
        builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=mylist&amp;ptype=1") + "\">未开下注</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=mylist&amp;ptype=2") + "\">历史下注</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=list") + "\">历史查询</a>|");
        builder.Append("<a href=\"" + Utils.getUrl("apple.aspx?act=help") + "\">游戏规则</a>");
        builder.Append(Out.Tab("</div>", ""));
        //游戏底部Ubb
        string Foot = ub.GetSub("AppleFoot", 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>", ""));
    }
Example #3
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>", ""));
    }
Example #4
0
    /// <summary>
    /// 系统动作记录
    /// </summary>
    private void MsgPage()
    {
        int    id     = int.Parse(Utils.GetRequest("id", "all", 1, @"^[0-9]\d*$", "0"));
        string StName = string.Empty;

        if (id != 0)
        {
            if (!new BCW.BLL.Game.Stone().Exists(id))
            {
                Utils.Error("不存在的记录", "");
            }
            StName = new BCW.BLL.Game.Stone().GetStName(id);
        }

        Master.Title = "" + StName + "系统动作记录";
        builder.Append(Out.Tab("<div class=\"title\">" + StName + "系统动作记录</div>", ""));

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

        string[] pageValUrl = { "id", "act" };
        pageIndex = Utils.ParseInt(Request.QueryString["page"]);
        if (pageIndex == 0)
        {
            pageIndex = 1;
        }
        //查询条件
        if (id != 0)
        {
            strWhere = "Types=1 and NodeId=" + id + "";
        }
        else
        {
            strWhere = "Types=1";
        }

        // 开始读取列表
        IList <BCW.Model.Action> listAction = new BCW.BLL.Action().GetActions(pageIndex, pageSize, strWhere, out recordCount);

        if (listAction.Count > 0)
        {
            int k = 1;
            foreach (BCW.Model.Action n in listAction)
            {
                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("{0}{1}({2}前)", "系统:", n.Notes, DT.DateDiff(DateTime.Now, n.AddTime));
                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("stone.aspx?act=clearmsg&amp;id=" + id + "") + "\">清空动作</a><br />");
        builder.Append("<a href=\"" + Utils.getUrl("stone.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 />"));
    }
Example #5
0
    /// <summary>
    /// 跑马自动游戏程序
    /// </summary>
    /// <param name="HorseId">局数ID</param>
    /// <param name="dt">截止时间</param>
    private void ChangePalyHorse()
    {
        BCW.Model.Game.Horselist horse = null;
        new BCW.User.Game.Horse().HorsePage();
        horse = new BCW.BLL.Game.Horselist().GetHorselist();
        int  HorseId = horse.ID;
        long Sec     = DT.DateDiff(horse.EndTime, DateTime.Now, 4);

        if (HorseId > 0)
        {
            int UsIDNum = new BCW.BLL.Game.Horsepay().GetCount(HorseId);//当期下注ID数

            //如果小于15个则自在不同秒数中自动出动1个ID来下注
            if (UsIDNum < 5)
            {
                bool IsPlay = false;
                Sec = 480 - Sec;

                int ZD = 0;
                if (Sec > 5 && Sec <= 30 && Utils.ParseInt(ub.GetSub("HorseZD1", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 1;
                }
                if (Sec > 30 && Sec <= 60 && Utils.ParseInt(ub.GetSub("HorseZD2", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 2;
                }
                else if (Sec > 60 && Sec <= 90 && Utils.ParseInt(ub.GetSub("HorseZD3", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 3;
                }
                else if (Sec > 90 && Sec <= 120 && Utils.ParseInt(ub.GetSub("HorseZD4", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 4;
                }
                else if (Sec > 120 && Sec <= 150 && Utils.ParseInt(ub.GetSub("HorseZD5", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 5;
                }
                else if (Sec > 150 && Sec <= 180 && Utils.ParseInt(ub.GetSub("HorseZD6", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 6;
                }
                else if (Sec > 180 && Sec <= 210 && Utils.ParseInt(ub.GetSub("HorseZD7", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 7;
                }
                else if (Sec > 210 && Sec <= 240 && Utils.ParseInt(ub.GetSub("HorseZD8", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 8;
                }
                else if (Sec > 240 && Sec <= 270 && Utils.ParseInt(ub.GetSub("HorseZD9", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 9;
                }
                else if (Sec > 270 && Sec <= 300 && Utils.ParseInt(ub.GetSub("HorseZD10", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 10;
                }
                else if (Sec > 300 && Sec <= 330 && Utils.ParseInt(ub.GetSub("HorseZD11", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 11;
                }
                else if (Sec > 330 && Sec <= 360 && Utils.ParseInt(ub.GetSub("HorseZD12", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 12;
                }
                else if (Sec > 360 && Sec <= 390 && Utils.ParseInt(ub.GetSub("HorseZD13", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 13;
                }
                else if (Sec > 390 && Sec <= 420 && Utils.ParseInt(ub.GetSub("HorseZD14", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 14;
                }
                else if (Sec > 420 && Sec <= 450 && Utils.ParseInt(ub.GetSub("HorseZD15", xmlPath)) == 0)
                {
                    IsPlay = true;
                    ZD     = 15;
                }

                if (IsPlay)
                {
                    //更新某分钟已出动过
                    ub xml = new ub();
                    xml.ReloadSub(xmlPath); //加载配置
                    xml.dss["HorseZD" + ZD + ""] = 1;

                    System.IO.File.WriteAllText(HttpContext.Current.Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8);
                    //进行自动下注
                    PlayHorse(HorseId);
                }
            }
        }
    }
Example #6
0
    public void Open()
    {
        if (new BCW.Baccarat.BLL.BJL_Play().Exists())
        {
            //派奖
            DataSet ds = new BCW.Baccarat.BLL.BJL_Play().GetList("*", "HunterPoint='' AND type=0 ORDER BY ID ASC");
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                #region
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    int RoomID     = int.Parse(ds.Tables[0].Rows[i]["RoomID"].ToString());
                    int Play_Table = int.Parse(ds.Tables[0].Rows[i]["Play_Table"].ToString());
                    int ID         = int.Parse(ds.Tables[0].Rows[i]["ID"].ToString());

                    //查询是否已开奖
                    BCW.Baccarat.Model.BJL_Play aa = new BCW.Baccarat.BLL.BJL_Play().GetBJL_Play2(ID);
                    if (aa.type == 0)
                    {
                        //根据房间的桌面查第一个下注的时间
                        DateTime Oldbettime = new BCW.Baccarat.BLL.BJL_Play().GetMinBetTime(RoomID, (Play_Table));
                        if (Oldbettime.AddSeconds((Times + 8)) < DateTime.Now)
                        {
                            BCW.Baccarat.Model.BJL_Card card = new BCW.Baccarat.BLL.BJL_Card().GetCardMessage(RoomID, Play_Table);
                            new BCW.Baccarat.BLL.BJL_Play().update_zd("BankerPoker='" + card.BankerPoker + "',HunterPoker='" + card.HunterPoker + "',BankerPoint=" + card.BankerPoint + ",HunterPoint=" + card.HunterPoint + "", "RoomID=" + RoomID + " and Play_Table=" + (Play_Table) + "");
                            //派奖
                            _price(RoomID, Play_Table);
                            Response.Write("已开奖第" + RoomID + "桌第" + Play_Table + "个房间.ok1<br/>");
                        }
                        else
                        {
                            Response.Write("请等待开奖:第" + RoomID + "桌第" + Play_Table + "个房间准备开奖.还有" + DT.DateDiff(Oldbettime.AddSeconds(Times + 8), DateTime.Now, 4) + "秒.ok1<br/>");
                        }
                    }
                }
                #endregion
            }

            //判断最低下注是否低于彩池,如果是,则封庄
            DataSet ds1 = new BCW.Baccarat.BLL.BJL_Room().GetList("*", "Total_Now<LowTotal and state=0");
            if (ds1 != null && ds1.Tables[0].Rows.Count > 0)
            {
                #region
                for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
                {
                    int  ID        = int.Parse(ds1.Tables[0].Rows[i]["ID"].ToString());
                    int  UsID      = int.Parse(ds1.Tables[0].Rows[i]["UsID"].ToString());
                    long LowTotal  = Convert.ToInt64(ds1.Tables[0].Rows[i]["LowTotal"].ToString());
                    long Total_Now = Convert.ToInt64(ds1.Tables[0].Rows[i]["Total_Now"].ToString());
                    if (Total_Now < LowTotal)
                    {
                        new BCW.Baccarat.BLL.BJL_Room().update_zd("state=1", "ID=" + ID + "");
                        if (Total_Now > 0)//退回给庄家
                        {
                            new BCW.BLL.User().UpdateiGold(UsID, new BCW.BLL.User().GetUsName(UsID), Total_Now, "你在" + GameName + "第" + ID + "桌系统自动封庄,系统退还剩余彩池" + Total_Now + ub.Get("SiteBz") + "-标识房间ID" + ID + "");
                            new BCW.BLL.Guest().Add(1, UsID, new BCW.BLL.User().GetUsName(UsID), "你在" + GameName + "第" + ID + "桌系统自动封庄,系统退还剩余彩池" + Total_Now + ub.Get("SiteBz") + ".[url=/bbs/game/bjl.aspx]进入" + GameName + "[/url]");
                        }
                        else
                        {
                            if ((new BCW.BLL.User().GetGold(UsID) + Total_Now) > 0)//够钱扣
                            {
                                new BCW.BLL.User().UpdateiGold(UsID, new BCW.BLL.User().GetUsName(UsID), -Total_Now, "你在" + GameName + "第" + ID + "桌的彩池已低于0,系统自动补扣" + Total_Now + "-标识房间ID" + ID + "");
                                new BCW.BLL.Guest().Add(1, UsID, new BCW.BLL.User().GetUsName(UsID), "你在" + GameName + "第" + ID + "桌的彩池已低于0,系统自动从你账户补扣" + Total_Now + ub.Get("SiteBz") + ".[url=/bbs/game/bjl.aspx]进入" + GameName + "[/url]");
                            }
                            else
                            {
                                BCW.Model.Gameowe owe = new BCW.Model.Gameowe();
                                owe.Types   = 1;
                                owe.UsID    = UsID;
                                owe.UsName  = new BCW.BLL.User().GetUsName(UsID);
                                owe.Content = "你在" + GameName + "第" + ID + "桌的彩池已低于0,你欠下系统的" + (Total_Now + new BCW.BLL.User().GetGold(UsID)) + "" + ub.Get("SiteBz") + ".";
                                owe.OweCent = Total_Now + new BCW.BLL.User().GetGold(UsID);
                                owe.BzType  = 12;//百家乐封庄记录type的id
                                owe.EnId    = ID;
                                owe.AddTime = DateTime.Now;
                                new BCW.BLL.Gameowe().Add(owe);
                                new BCW.BLL.User().UpdateIsFreeze(UsID, 1);

                                //发送内线
                                string strGuess = "你在" + GameName + "第" + ID + "桌的彩池已低于0,你欠下系统的" + (Total_Now + new BCW.BLL.User().GetGold(UsID)) + "" + ub.Get("SiteBz") + ".[br]根据您的帐户数额,实扣" + new BCW.BLL.User().GetGold(UsID) + "" + ub.Get("SiteBz") + ".[br]您的" + ub.Get("SiteBz") + "不足,系统将您帐户冻结。";
                                new BCW.BLL.Guest().Add(1, UsID, new BCW.BLL.User().GetUsName(UsID), strGuess);
                                string bb = "" + new BCW.BLL.User().GetUsName(UsID) + "(" + UsID + ")在" + GameName + "第" + ID + "桌的彩池已低于0,欠下系统" + Total_Now + new BCW.BLL.User().GetGold(UsID) + "" + ub.Get("SiteBz") + ",系统已自动冻结TA的帐户.";
                                new BCW.BLL.Guest().Add(1, 10086, new BCW.BLL.User().GetUsName(10086), bb);
                            }
                        }
                    }
                }
                #endregion
            }

            //超过玩的局数
            DataSet ds2 = new BCW.Baccarat.BLL.BJL_Room().GetList2("*", "a LEFT JOIN tb_BJL_Play b ON a.UsID=b.UsID AND b.Play_Table>=" + RoomTime2 + " AND a.state=0");
            if (ds2 != null && ds2.Tables[0].Rows.Count > 0)
            {
                #region
                for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
                {
                    int  ID        = int.Parse(ds2.Tables[0].Rows[i]["ID"].ToString());
                    int  UsID      = int.Parse(ds2.Tables[0].Rows[i]["UsID"].ToString());
                    long LowTotal  = Convert.ToInt64(ds2.Tables[0].Rows[i]["LowTotal"].ToString());
                    long Total_Now = Convert.ToInt64(ds2.Tables[0].Rows[i]["Total_Now"].ToString());

                    new BCW.Baccarat.BLL.BJL_Room().update_zd("state=1", "ID=" + ID + "");
                    if (Total_Now > 0)//退回给庄家
                    {
                        new BCW.BLL.User().UpdateiGold(UsID, new BCW.BLL.User().GetUsName(UsID), Total_Now, "你在" + GameName + "第" + ID + "桌的已达到最高局数,系统自动封庄,退还" + Total_Now + "-标识房间ID" + ID + "");
                        new BCW.BLL.Guest().Add(1, UsID, new BCW.BLL.User().GetUsName(UsID), "你在" + GameName + "第" + ID + "桌的已达到最高局数,系统自动封庄,退还" + Total_Now + ub.Get("SiteBz") + ".[url=/bbs/game/bjl.aspx]进入" + GameName + "[/url]");
                    }
                }
                #endregion
            }
        }
        else
        {
            Response.Write("暂无房间需要开奖.ok1");
        }
    }
Example #7
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>", ""));
    }
Example #8
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>", ""));
    }
Example #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>", ""));
    }
Example #10
0
        /// <summary>
        /// 取得足球半场即时比分
        /// </summary>
        /// <param name="p_TPRtime">联赛时间</param>
        /// <param name="p_id">比赛ID</param>
        /// <returns></returns>
        public string HalfBf(int Types, DateTime p_TPRtime, int p_id)
        {
            string bfstat = "未";

            if (p_TPRtime < DateTime.Now)
            {
                bfstat = "0:0";
            }

            //取即时比分接口

            string bf           = new TPR3.Collec.TempFootBf().GetFootBfOnce();
            string strpatternbf = @"A\[1\]\=""([\s\S]+)B\[1\]\=";
            Match  mtitlebf     = Regex.Match(bf, strpatternbf, RegexOptions.IgnoreCase);

            if (mtitlebf.Success)
            {
                string p_str = mtitlebf.Groups[1].Value;
                p_str = Regex.Replace(p_str, @"A\[\d*\]\=""", "");
                string[] Temp = Regex.Split(p_str, @"\.split\('\^'\);");
                for (int i = 0; i < Temp.Length; i++)
                {
                    string[] temp = Regex.Split(Temp[i], @"\^");
                    try
                    {
                        if (Utils.ParseInt(temp[0].Replace("\r\n", "")) == p_id)
                        {
                            //取开场时间(用来计算进行了多少分钟/(上半场时为开上半场的时间,下半场时为开下半场的时间))
                            string stime = temp[12];
                            //取比赛状态
                            string state = OutState(temp[13]);

                            string[] dTemp  = stime.Split(',');
                            string   dt     = dTemp[0] + "-" + (Convert.ToInt32(dTemp[1]) + 1) + "-" + dTemp[2] + " " + dTemp[3] + ":" + dTemp[4] + ":" + dTemp[5];
                            DateTime vtime  = Convert.ToDateTime(dt);
                            string   strmin = "";
                            if (state == "上半场")
                            {
                                strmin = DT.DateDiff(DateTime.Now, vtime, 3) + "'";
                            }
                            else if (state == "下半场")
                            {
                                long Minute = DT.DateDiff(DateTime.Now, vtime, 3) + 45;
                                if (Minute > 90)
                                {
                                    strmin = "90+'";
                                }
                                else
                                {
                                    strmin = "" + Minute.ToString() + "'";
                                }
                            }
                            else
                            {
                                strmin = state;
                            }

                            //取主队比分
                            string hbf = temp[14];
                            //取客队比分
                            string gbf = temp[15];
                            //取主队上半场比分
                            string hbf2 = temp[16];
                            //取客队上半场比分
                            string gbf2 = temp[17];
                            if (Types == 1)
                            {
                                if (hbf2 != "" && gbf2 != "")
                                {
                                    bfstat = "" + hbf2 + "-" + gbf2 + "#" + strmin;
                                }
                                else
                                {
                                    bfstat = "" + hbf + "-" + gbf + "#" + strmin;
                                }
                            }
                            else
                            {
                                if (hbf != "" && gbf != "")
                                {
                                    bfstat = "" + hbf + "-" + gbf + "#" + strmin;
                                }
                                else
                                {
                                    bfstat = "" + hbf2 + "-" + gbf2 + "#" + strmin;
                                }
                            }

                            break;
                        }
                    }
                    catch { }
                }
            }
            if (bfstat == "-")
            {
                bfstat = "未";
            }

            return(bfstat);
        }
Example #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "后台管理";
        string ac = Utils.GetRequest("ac", "all", 1, "", "");

        if (Utils.ToSChinese(ac) == "登录后台")
        {
            string           userName = Utils.GetRequest("userName", "post", 2, @"^[A-Za-z0-9]+$", "请正确输入用户名");
            string           userPass = Utils.GetRequest("userPass", "post", 2, @"^[A-Za-z0-9]+$", "请正确输入密码");
            BCW.Model.Manage model    = new BCW.Model.Manage();
            model.sUser = userName;
            model.sPwd  = Utils.MD5(userPass);
            BCW.BLL.Manage bll = new BCW.BLL.Manage();
            if (bll.GetManageRow(model) > 0)
            {
                BCW.Model.Manage modelManage = bll.GetModelByModel(model.sUser, model.sPwd);
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("登录成功");
                builder.Append(Out.Tab("</div>", "<br />"));
                builder.Append(Out.Tab("<div>", ""));
                builder.Append("上次登录:" + DT.DateDiff(DateTime.Now, Convert.ToDateTime(modelManage.sTime)) + "前");
                string VE  = ConfigHelper.GetConfigString("VE");
                string SID = ConfigHelper.GetConfigString("SID");
                builder.Append("<br /><a href=\"Default.aspx?" + VE + "=" + Utils.getstrVe() + "&amp;" + SID + "=" + modelManage.sKeys + new Rand().RandNume(4) + "\">马上进入后台</a>");
                //更新登录时间
                modelManage.sTime = DateTime.Now;
                bll.UpdateTimeIP(modelManage);
            }
            else
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("登录失败");
                builder.Append(Out.Tab("</div>", ""));
                builder.Append(Out.Tab("<div>", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("login.aspx") + "\">返回继续</a>");
            }
            builder.Append(Out.Tab("</div>", ""));
        }
        else if (ac == "exit")
        {
            string AdminPath = ConfigHelper.GetConfigString("AdminPath");
            //后台管理员权限判断
            int ManageId = new BCW.User.Manage().IsManageLogin();
            if (ManageId == 0)
            {
                Response.Redirect("/" + AdminPath + "/login.aspx");
                Response.End();
            }
            //更新Keys
            BCW.Model.Manage modelkeys = new BCW.Model.Manage();
            modelkeys.ID    = BCW.User.Users.GetIDByKeys(Utils.getstrU());
            modelkeys.sKeys = BCW.User.Users.SetUserKeys(modelkeys.ID, "", new Rand().RandNum(10));
            modelkeys.sKeys = Utils.Mid(modelkeys.sKeys, 0, modelkeys.sKeys.Length - 4);
            new BCW.BLL.Manage().UpdateKeys(modelkeys);

            builder.Append(Out.Tab("<div>", ""));
            builder.Append("退出成功<br />");
            builder.Append("<a href=\"" + Utils.getUrl("login.aspx") + "\">继续登录</a>");
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("欢迎您进入管理后台");
            builder.Append(Out.Tab("</div>", ""));
            string strText = "用户,密码";
            string strName = "userName,userPass";
            string strType = "text,password";
            string strValu = "''";
            string strEmpt = "false,false";
            string strIdea = "/";
            string strOthe = "登录后台|reset,login.aspx,post,0,red|blue";
            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        }
    }