예제 #1
0
    private void BackSavePage()
    {
        int    gid     = Utils.ParseInt(Utils.GetRequest("gid", "post", 2, @"^[0-9]\d*$", "竞猜ID无效"));
        int    id      = Utils.ParseInt(Utils.GetRequest("id", "post", 2, @"^[0-9]\d*$", "ID无效"));
        string Content = Utils.GetRequest("Content", "all", 3, @"^[\s\S]{1,200}$", "原因限200字内,可以留空");

        if (!new TPR3.BLL.guess.BaList().Exists(gid))
        {
            Utils.Error("不存在的记录", "");
        }

        TPR3.Model.guess.BaPay model = new TPR3.BLL.guess.BaPay().GetModelIsCase(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }

        //游戏日志记录
        int ManageId = new BCW.User.Manage().IsManageLogin();

        string[] p_pageArr = { "ac", "gid", "id", "act", "backurl" };
        BCW.User.GameLog.GameLogPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号撤销押注并退回本金" + model.payview + "(" + gid + "_" + id + ")", gid);

        string Msgtxt = string.Empty;

        if (Content == "")
        {
            Msgtxt = model.payview + "竞猜失败已作退回本金处理";
        }
        else
        {
            Msgtxt = model.payview + "竞猜失败已作退回本金处理," + Content + "";
        }

        new BCW.BLL.Guest().Add(Convert.ToInt32(model.payusid), model.payusname, Msgtxt);
        //退本金
        if (model.Types == 0)
        {
            new BCW.BLL.User().UpdateiGold(Convert.ToInt32(model.payusid), model.payusname, Convert.ToInt64(model.payCent), model.payview + "系统撤销押注并退回本金");
        }
        else
        {
            new BCW.BLL.User().UpdateiMoney(Convert.ToInt32(model.payusid), model.payusname, Convert.ToInt64(model.payCent), model.payview + "系统撤销押注并退回本金");
        }

        //删除处理
        new TPR3.BLL.guess.BaPay().Delete(id);
        Utils.Success("撤销押注", "撤销押注并退回本金成功...", Utils.getPage("showguess.aspx?gid=" + gid + ""), "1");
    }
예제 #2
0
    private void BackPage()
    {
        int gid = Utils.ParseInt(Utils.GetRequest("gid", "get", 2, @"^[0-9]\d*$", "竞猜ID无效"));
        int id  = Utils.ParseInt(Utils.GetRequest("id", "get", 2, @"^[0-9]\d*$", "ID无效"));

        if (!new TPR3.BLL.guess.BaList().Exists(gid))
        {
            Utils.Error("不存在的记录", "");
        }

        TPR3.Model.guess.BaPay model = new TPR3.BLL.guess.BaPay().GetModelIsCase(id);
        if (model == null)
        {
            Utils.Error("不存在的记录", "");
        }
        Master.Title = "撤销押注并退回本金";

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("撤销押注并退回本金");
        builder.Append(Out.Tab("</div>", ""));

        string strText = "您的" + Out.SysUBB(model.payview).Replace("/", "/").Replace(",", ",") + "竞猜失败已作退回本金处理,/,,,,";
        string strName = "Content,gid,id,act,backurl";
        string strType = "text,hidden,hidden,hidden,hidden";
        string strValu = "'" + gid + "'" + id + "'backsave'" + Utils.getPage(0) + "";
        string strEmpt = "true,false,false,false,false";
        string strIdea = "/";
        string strOthe = "本条撤销并退本金,plguess.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(Out.waplink(Utils.getPage("showGuess.aspx?gid=" + gid + ""), "返回上一级"));
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
    }
예제 #3
0
    private void ReloadPage()
    {
        int gid = Utils.ParseInt(Utils.GetRequest("gid", "get", 2, @"^[0-9]*$", "竞猜ID无效"));
        int p   = Utils.ParseInt(Utils.GetRequest("p", "get", 2, @"^[1-9]*$", "选择无效"));

        TPR3.BLL.guess.BaList bll = new TPR3.BLL.guess.BaList();

        if (bll.GetModel(gid) == null)
        {
            Utils.Error("不存在的记录", "");
        }
        TPR3.Model.guess.BaList model = bll.GetModel(gid);

        Master.Title = model.p_one + "VS" + model.p_two;

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append(model.p_one + "VS" + model.p_two);
        builder.Append(Out.Tab("</div>", "<br />"));
        builder.Append(Out.Tab("<div class=\"text\">", ""));
        if (p == 1)
        {
            builder.Append("上下盘:<b>上盘</b>下注列表");
        }
        else if (p == 2)
        {
            builder.Append("上下盘:<b>下盘</b>下注列表");
        }
        else if (p == 3)
        {
            builder.Append("大小盘:<b>大</b>下注列表");
        }
        else if (p == 4)
        {
            builder.Append("大小盘:<b>小</b>下注列表");
        }
        else if (p == 5)
        {
            builder.Append("标准盘:<b>主胜</b>下注列表");
        }
        else if (p == 6)
        {
            builder.Append("标准盘:<b>平手</b>下注列表");
        }
        else if (p == 7)
        {
            builder.Append("标准盘:<b>客胜</b>下注列表");
        }
        else if (p == 8)
        {
            builder.Append("单双盘:<b>单</b>下注列表");
        }
        else if (p == 9)
        {
            builder.Append("单双盘:<b>双</b>下注列表");
        }

        builder.Append(Out.Tab("</div>", "<br />"));
        int pageSize = 10;
        int pageIndex;
        int recordCount;

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

        //组合条件
        string strWhere = "";

        strWhere += "itypes=0 and bcid=" + gid + " and PayType=" + p + "";

        // 开始读取竞猜
        IList <TPR3.Model.guess.BaPay> listBaPay = new TPR3.BLL.guess.BaPay().GetBaPays(pageIndex, pageSize, strWhere, out recordCount);

        if (listBaPay.Count > 0)
        {
            int k = 1;
            foreach (TPR3.Model.guess.BaPay n in listBaPay)
            {
                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 />"));
                    }
                }
                string bzType = string.Empty;
                if (n.Types == 0)
                {
                    bzType = ub.Get("SiteBz");
                }
                else
                {
                    bzType = ub.Get("SiteBz2");
                }

                string strState = string.Empty;
                if (n.p_active == 0)
                {
                    strState = "未返";
                }
                else if (n.p_active == 1)
                {
                    if (n.p_getMoney > 0)
                    {
                        strState = "已返" + Convert.ToInt64(n.p_getMoney) + "" + bzType + "";
                    }
                    else
                    {
                        strState = "输" + Convert.ToInt64(n.payCent) + "" + bzType + "";
                    }
                }
                else if (n.p_active == 2)
                {
                    strState = "已平盘";
                }

                if (n.itypes == 1)
                {
                    builder.Append("[串关]");
                }
                builder.Append("[" + strState + "]");

                builder.AppendFormat(Out.waplink(Utils.getUrl("../uinfo.aspx?uid={1}&amp;backurl=" + Utils.PostPage(1) + ""), "{0}({1})") + ":{2}[{3}]", n.payusname, n.payusid, Out.SysUBB(n.payview.Replace("/bbs/guess2/", "")), n.paytimes);
                if (n.itypes == 0)
                {
                    builder.Append(Out.waplink(Utils.getUrl("plguess.aspx?act=back&amp;id=" + n.ID + "&amp;gid=" + gid + "&amp;backurl=" + Utils.PostPage(1) + ""), "[退]"));
                    //builder.Append(Out.waplink(Utils.getUrl("openGuess.aspx?id=" + n.ID + "&amp;gid=" + gid + "&amp;backurl=" + Utils.PostPage(1) + ""), "[返]"));
                }
                builder.Append(Out.Tab("</div>", ""));
                k++;
            }

            // 分页
            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(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "返回上一级"));
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
    }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "完场数据分析";

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

        if (showtype == 0)
        {
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("完场数据分析");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            if (ptype == 1)
            {
                builder.Append("当前统计:足球 " + Out.waplink(Utils.getUrl("stats.aspx?ptype=2"), "切换篮球"));
            }
            else
            {
                builder.Append("当前统计:篮球 " + Out.waplink(Utils.getUrl("stats.aspx?ptype=1"), "切换足球"));
            }
            builder.Append(Out.Tab("</div>", "<br />"));
            //统计今天
            int  todaycsNum, todayzsNum, todaywinNum;
            long todayzsCent, todaywinCent;
            todaycsNum = new TPR3.BLL.guess.BaList().GetBaListCount("p_type=" + ptype + " and  Year(p_addtime)=" + DateTime.Now.Year + " AND Month(p_addtime) = " + DateTime.Now.Month + " and Day(p_addtime) = " + DateTime.Now.Day + " and p_active<>0");

            todayzsNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and   Year(paytimes) = " + DateTime.Now.Year + " AND Month(paytimes) = " + DateTime.Now.Month + " and Day(paytimes) = " + DateTime.Now.Day + "  and p_active<>0");

            todaywinNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and  Year(paytimes) = " + DateTime.Now.Year + " AND Month(paytimes) = " + DateTime.Now.Month + " and Day(paytimes) = " + DateTime.Now.Day + "  and p_getMoney>0 and p_active<>0");

            todayzsCent = new TPR3.BLL.guess.BaPay().GetBaPaypayCent("ptype=" + ptype + " and  Year(paytimes) = " + DateTime.Now.Year + " AND Month(paytimes) = " + DateTime.Now.Month + " and Day(paytimes) = " + DateTime.Now.Day + " and p_active<>0");

            todaywinCent = new TPR3.BLL.guess.BaPay().GetBaPaygetMoney("ptype=" + ptype + " and  Year(paytimes) = " + DateTime.Now.Year + " AND Month(paytimes) = " + DateTime.Now.Month + " and Day(paytimes) = " + DateTime.Now.Day + "  and p_getMoney>0 and p_active<>0");

            //统计昨天
            int  yestcsNum, yestzsNum, yestwinNum;
            long yestzsCent, yestwinCent;
            yestcsNum = new TPR3.BLL.guess.BaList().GetBaListCount("p_type=" + ptype + " and  Year(p_addtime)=" + DateTime.Now.AddDays(-1).Year + " AND Month(p_addtime) = " + DateTime.Now.AddDays(-1).Month + " and Day(p_addtime) = " + DateTime.Now.AddDays(-1).Day + " and p_active<>0");

            yestzsNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and   Year(paytimes) = " + DateTime.Now.AddDays(-1).Year + " AND Month(paytimes) = " + DateTime.Now.AddDays(-1).Month + " and Day(paytimes) = " + DateTime.Now.AddDays(-1).Day + "  and p_active<>0");

            yestwinNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and  Year(paytimes) = " + DateTime.Now.AddDays(-1).Year + " AND Month(paytimes) = " + DateTime.Now.AddDays(-1).Month + " and Day(paytimes) = " + DateTime.Now.AddDays(-1).Day + "  and p_getMoney>0 and p_active<>0");

            yestzsCent = new TPR3.BLL.guess.BaPay().GetBaPaypayCent("ptype=" + ptype + " and  Year(paytimes) = " + DateTime.Now.AddDays(-1).Year + " AND Month(paytimes) = " + DateTime.Now.AddDays(-1).Month + " and Day(paytimes) = " + DateTime.Now.AddDays(-1).Day + " and p_active<>0");

            yestwinCent = new TPR3.BLL.guess.BaPay().GetBaPaygetMoney("ptype=" + ptype + " and  Year(paytimes) = " + DateTime.Now.AddDays(-1).Year + " AND Month(paytimes) = " + DateTime.Now.AddDays(-1).Month + " and Day(paytimes) = " + DateTime.Now.AddDays(-1).Day + "  and p_getMoney>0 and p_active<>0");

            //统计本月
            int  bmcsNum, bmzsNum, bmwinNum;
            long bmzsCent, bmwinCent;
            bmcsNum = new TPR3.BLL.guess.BaList().GetBaListCount("p_type=" + ptype + " and  Year(p_addtime)=" + (DateTime.Now.Year) + " AND Month(p_addtime) = " + (DateTime.Now.Month) + " and p_active<>0");

            bmzsNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and   Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_active<>0");

            bmwinNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and  Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_getMoney>0 and p_active<>0");

            bmzsCent = new TPR3.BLL.guess.BaPay().GetBaPaypayCent("ptype=" + ptype + " and  Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_active<>0");

            bmwinCent = new TPR3.BLL.guess.BaPay().GetBaPaygetMoney("ptype=" + ptype + " and  Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_getMoney>0 and p_active<>0");

            //统计上月
            int  smcsNum, smzsNum, smwinNum;
            long smzsCent, smwinCent;
            smcsNum = new TPR3.BLL.guess.BaList().GetBaListCount("p_type=" + ptype + " and  Year(p_addtime)=" + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(p_addtime) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and p_active<>0");

            smzsNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and   Year(paytimes) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(paytimes) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and p_active<>0");

            smwinNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and  Year(paytimes) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(paytimes) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and p_getMoney>0 and p_active<>0");

            smzsCent = new TPR3.BLL.guess.BaPay().GetBaPaypayCent("ptype=" + ptype + " and  Year(paytimes) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(paytimes) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and p_active<>0");

            smwinCent = new TPR3.BLL.guess.BaPay().GetBaPaygetMoney("ptype=" + ptype + " and  Year(paytimes) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(paytimes) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and p_getMoney>0 and p_active<>0");

            //总计
            int  csNum, zsNum, winNum;
            long zsCent, winCent;
            csNum = new TPR3.BLL.guess.BaList().GetBaListCount("p_type=" + ptype + " and p_active<>0");

            zsNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and p_active<>0");

            winNum = new TPR3.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and p_getMoney>0 and p_active<>0");

            zsCent = new TPR3.BLL.guess.BaPay().GetBaPaypayCent("ptype=" + ptype + " and p_active<>0");

            winCent = new TPR3.BLL.guess.BaPay().GetBaPaygetMoney("ptype=" + ptype + " and p_getMoney>0 and p_active<>0");

            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\">");
            builder.Append("<tr>");
            builder.Append("<td>类别</td><td>场次</td><td>下注数</td><td>下注额</td><td>用户赢注数</td><td>用户赢金额</td><td>本站盈利</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>今天</td><td>" + todaycsNum + "</td><td>" + todayzsNum + "</td><td>" + todayzsCent + "</td><td>" + todaywinNum + "</td><td>" + todaywinCent + "</td><td>" + (todayzsCent - todaywinCent) + "</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>昨天</td><td>" + yestcsNum + "</td><td>" + yestzsNum + "</td><td>" + yestzsCent + "</td><td>" + yestwinNum + "</td><td>" + yestwinCent + "</td><td>" + (yestzsCent - yestwinCent) + "</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>本月</td><td>" + bmcsNum + "</td><td>" + bmzsNum + "</td><td>" + bmzsCent + "</td><td>" + bmwinNum + "</td><td>" + bmwinCent + "</td><td>" + (bmzsCent - bmwinCent) + "</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>上月</td><td>" + smcsNum + "</td><td>" + smzsNum + "</td><td>" + smzsCent + "</td><td>" + smwinNum + "</td><td>" + smwinCent + "</td><td>" + (smzsCent - smwinCent) + "</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>总计</td><td>" + csNum + "</td><td>" + zsNum + "</td><td>" + zsCent + "</td><td>" + winNum + "</td><td>" + winCent + "</td><td>" + (zsCent - winCent) + "</td>");
            builder.Append("</tr>");
            builder.Append("</table>");
            builder.Append(Out.Tab("</div>", ""));
        }

        else if (showtype > 1)
        {
            Master.Title = "未场数据分析";
            DataSet ds = null;
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            if (showtype == 2)
            {
                builder.Append("未结束赛事下注数TOP10");
                ds = new TPR3.BLL.guess.BaPay().GetBaPayList("top 10 bcid,count(bcid) as payCount", "p_active=0 group by bcid", "count(bcid) desc");
            }
            else
            {
                builder.Append("未结束赛事下注额TOP10");
                ds = new TPR3.BLL.guess.BaPay().GetBaPayList("top 10 bcid,sum(payCent) as payCount", "p_active=0 group by bcid", "sum(payCent) desc");
            }
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("<table border=\"1\" cellpadding=\"3\" cellspacing=\"0\">");
            builder.Append("<tr>");
            builder.Append("<td>名次</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>赛事ID</td>");
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                builder.Append("<td>" + Out.waplink(Utils.getUrl("ShowGuess.aspx?gid=" + ds.Tables[0].Rows[i]["bcid"].ToString()), ds.Tables[0].Rows[i]["bcid"].ToString()) + "</td>");
            }
            if (ds.Tables[0].Rows.Count < 10)
            {
                for (int i = 0; i < 10 - ds.Tables[0].Rows.Count; i++)
                {
                    builder.Append("<td>0</td>");
                }
            }
            builder.Append("</tr>");
            builder.Append("<tr>");
            if (showtype == 2)
            {
                builder.Append("<td>下注数</td>");
            }
            else
            {
                builder.Append("<td>下注额</td>");
            }

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                builder.Append("<td>" + Convert.ToDouble(ds.Tables[0].Rows[i]["payCount"]) + "</td>");
            }
            if (ds.Tables[0].Rows.Count < 10)
            {
                for (int i = 0; i < 10 - ds.Tables[0].Rows.Count; i++)
                {
                    builder.Append("<td>0</td>");
                }
            }
            builder.Append("</tr>");
            builder.Append("</table>");
            builder.Append(Out.Tab("</div>", ""));

            builder.Append(Out.Tab("<div>", ""));
            if (showtype == 2)
            {
                builder.Append(Out.waplink(Utils.getUrl("stats.aspx?showtype=3"), "&gt;未结束赛事下注额TOP10"));
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("stats.aspx?showtype=2"), "&gt;未结束赛事下注数TOP10"));
            }
            builder.Append(Out.Tab("</div>", ""));
        }

        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "返回上一级"));
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
    }
예제 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "清空记录";
        string act = Utils.GetRequest("act", "all", 1, "", "");

        if (act == "actopok")
        {
            int ManageId = new BCW.User.Manage().IsManageLogin();
            if (ManageId != 1 && ManageId != 11)
            {
                Utils.Error("你的权限不足", "");
            }
            DateTime sTime    = Utils.ParseTime(Utils.GetRequest("sTime", "post", 2, DT.RegexTime, "开始时间填写无效"));
            DateTime oTime    = Utils.ParseTime(Utils.GetRequest("oTime", "post", 2, DT.RegexTime, "结束时间填写无效"));
            int      iTar     = Utils.ParseInt(Utils.GetRequest("iTar", "post", 2, @"^[0-9]\d*$", "返负千分比填写错误"));
            int      iPrice   = Utils.ParseInt(Utils.GetRequest("iPrice", "post", 2, @"^[0-9]\d*$", "至少输多少币才返填写错误"));
            int      MaxCount = Utils.ParseInt(Utils.GetRequest("MaxCount", "post", 2, @"^[0-9]\d*$", "返负人数填写错误"));
            string   Msgtxt   = Utils.GetRequest("Msgtxt", "post", 3, @"^[\s\S]{1,300}$", "消息内容限300字内");

            string TopWhe = "";
            if (MaxCount > 0)
            {
                TopWhe = " TOP " + MaxCount + " ";
            }

            DataSet ds = new TPR3.BLL.guess.BaPay().GetBaPayList("" + TopWhe + "payusid,sum(p_getMoney-payCent) as payCents", "paytimes>='" + sTime + "'and paytimes<'" + oTime + "' and Types=0 group by payusid");
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                long Cents = Convert.ToInt64(ds.Tables[0].Rows[i]["payCents"]);
                if (Cents < 0 && Cents < (-iPrice))
                {
                    int  usid = Convert.ToInt32(ds.Tables[0].Rows[i]["payusid"]);
                    long cent = Convert.ToInt64((-Cents) * (iTar * 0.001));
                    new BCW.BLL.User().UpdateiGold(usid, cent, "竞猜返负");
                    //发内线
                    string strLog = "根据你上期竞猜排行榜上的亏损情况,系统自动返还了" + cent + "" + ub.Get("SiteBz") + "[url=/bbs/guess2/default.aspx]进入球彩竞猜[/url]";
                    if (Msgtxt != "")
                    {
                        strLog = Msgtxt;
                    }

                    new BCW.BLL.Guest().Add(0, usid, new BCW.BLL.User().GetUsName(usid), strLog);
                }
            }

            Utils.Success("返负操作", "返负操作成功", Utils.getUrl("clear.aspx"), "1");
        }
        else if (act == "actopok2")
        {
            int ManageId = new BCW.User.Manage().IsManageLogin();
            if (ManageId != 1 && ManageId != 11)
            {
                Utils.Error("你的权限不足", "");
            }
            DateTime sTime    = Utils.ParseTime(Utils.GetRequest("sTime", "post", 2, DT.RegexTime, "开始时间填写无效"));
            DateTime oTime    = Utils.ParseTime(Utils.GetRequest("oTime", "post", 2, DT.RegexTime, "结束时间填写无效"));
            int      iTar     = Utils.ParseInt(Utils.GetRequest("iTar", "post", 2, @"^[0-9]\d*$", "返赢千分比填写错误"));
            int      iPrice   = Utils.ParseInt(Utils.GetRequest("iPrice", "post", 2, @"^[0-9]\d*$", "至少赢多少币才返填写错误"));
            int      MaxCount = Utils.ParseInt(Utils.GetRequest("MaxCount", "post", 2, @"^[0-9]\d*$", "返赢人数填写错误"));
            string   Msgtxt   = Utils.GetRequest("Msgtxt", "post", 3, @"^[\s\S]{1,300}$", "消息内容限300字内");

            string TopWhe = "";
            if (MaxCount > 0)
            {
                TopWhe = " TOP " + MaxCount + " ";
            }

            DataSet ds = new TPR3.BLL.guess.BaPay().GetBaPayList("" + TopWhe + "payusid,sum(p_getMoney-payCent) as payCents", "paytimes>='" + sTime + "'and paytimes<'" + oTime + "' and Types=0 group by payusid");
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                long Cents = Convert.ToInt64(ds.Tables[0].Rows[i]["payCents"]);
                if (Cents > 0 && Cents >= iPrice)
                {
                    int  usid = Convert.ToInt32(ds.Tables[0].Rows[i]["payusid"]);
                    long cent = Convert.ToInt64(Cents * (iTar * 0.001));
                    new BCW.BLL.User().UpdateiGold(usid, cent, "竞猜返赢");
                    //发内线
                    string strLog = "根据你上期竞猜排行榜上的赢利情况,系统自动返还了" + cent + "" + ub.Get("SiteBz") + "[url=/bbs/guess2/default.aspx]进入球彩竞猜[/url]";
                    if (Msgtxt != "")
                    {
                        strLog = Msgtxt;
                    }

                    new BCW.BLL.Guest().Add(0, usid, new BCW.BLL.User().GetUsName(usid), strLog);
                }
            }

            Utils.Success("返赢操作", "返赢操作成功", Utils.getUrl("clear.aspx"), "1");
        }
        else if (act == "actspaceguess")//清空已截止的、无投注记录的赛事
        {
            int     k  = 0;
            DataSet ds = BCW.Data.SqlHelper.Query("select ID from tb_zbalist where p_TPRTime<'" + DateTime.Now + "' and p_active=0");
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    int ID = int.Parse(ds.Tables[0].Rows[i]["ID"].ToString());

                    int pCount = new TPR3.BLL.guess.BaPay().GetBaPayCount("bcid=" + ID + "");
                    if (pCount == 0)
                    {
                        new TPR3.BLL.guess.BaList().Delete(ID);
                        k++;
                    }
                }
            }
            Utils.Success("清空记录", "清空无投注赛事成功", Utils.getUrl("default.aspx"), "1");
        }
        else
        {
            string ac   = Utils.GetRequest("ac", "post", 1, "", "");
            string Info = Utils.GetRequest("Info", "post", 1, "", "");
            if (ac == "清空记录" || ac == Utils.ToTChinese("清空记录"))
            {
                int    Ptype, Ltype, Ttype, iTset;
                string sTime = "";
                string oTime = "";
                Ptype = Utils.ParseInt(Utils.GetRequest("Ptype", "post", 2, @"^[0-2]$", "球类选择无效"));
                Ltype = Utils.ParseInt(Utils.GetRequest("Ltype", "post", 2, @"^[1-9]$", "类型选择无效"));
                Ttype = Utils.ParseInt(Utils.GetRequest("Ttype", "post", 2, @"^[1-5]+$", "限制选择无效"));
                iTset = Utils.ParseInt(Utils.GetRequest("iTset", "post", 2, @"^[1-3]+$", "局域选择无效"));
                if (Ttype == 4)
                {
                    sTime = Utils.GetRequest("sTime", "post", 2, DT.RegexTime, "开始时间填写无效");
                    oTime = Utils.GetRequest("oTime", "post", 2, DT.RegexTime, "结束时间填写无效");
                }

                if (Info == "ok")
                {
                    string cText = string.Empty;
                    if (Ltype == 1)
                    {
                        cText = "清空竞猜排行榜";
                    }
                    else if (Ltype == 2)
                    {
                        cText = "清空竞猜投注记录";
                    }
                    else if (Ltype == 3)
                    {
                        cText = "清空竞猜赛事记录";
                    }
                    //游戏日志记录
                    int      ManageId  = new BCW.User.Manage().IsManageLogin();
                    int      gid       = new TPR3.BLL.guess.BaList().GetMaxId();
                    string[] p_pageArr = { "ac", "Ltype", "Ptype", "Ttype", "sTime", "oTime", "iTset", "Info" };
                    BCW.User.GameLog.GameLogPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号" + cText + "", gid);

                    //组合条件查询
                    string strWhere = "";

                    if (Ltype == 1)//排行榜记录
                    {
                        ////------------------------返负彩
                        //if (Convert.ToInt32(ub.GetSub("SiteLostPrice", xmlPath)) > 0)
                        //{
                        //    DataSet ds = new TPR3.BLL.guess.BaOrder().GetBaOrderList("orderusid,orderusname,orderjbnum", "Orderjbnum < 0 and Orderjbnum <= " + (-Convert.ToInt32(ub.GetSub("SiteLostPrice", xmlPath))) + "");
                        //    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        //    {
                        //        int cent = Convert.ToInt32((-Convert.ToInt32(ds.Tables[0].Rows[i]["orderjbnum"])) * (Convert.ToDouble(ub.GetSub("SiteLostPL", xmlPath)) * 0.01));

                        //        //操作币
                        //        new BCW.BLL.User().UpdateiGold(Convert.ToInt32(ds.Tables[0].Rows[i]["orderusid"]), cent, "");
                        //        //发内线
                        //        string strLog = "根据你上期竞猜排行榜上的盈利情况,系统自动返还了" + cent + "" + ub.Get("SiteBz") + "[url=/bbs/guess/default.aspx]进入球彩竞猜[/url]";

                        //        new BCW.BLL.Guest().Add(0, Convert.ToInt32(ds.Tables[0].Rows[i]["orderusid"]), ds.Tables[0].Rows[i]["orderusname"].ToString(), strLog);
                        //    }
                        //}
                        ////------------------------返负彩
                        new TPR3.BLL.guess.BaOrder().DeleteStr();
                    }
                    else if (Ltype == 2)//投注记录
                    {
                        if (Ptype != 0)
                        {
                            strWhere += "pType=" + Ptype + " ";
                        }
                        else
                        {
                            strWhere += "pType>0 ";
                        }

                        if (Ttype == 1)
                        {
                            strWhere += "and paytimes='" + DateTime.Now.ToLongDateString() + "'";
                        }
                        else if (Ttype == 2)
                        {
                            strWhere += "and paytimes>='" + DateTime.Now.AddDays(-7) + "'";
                        }
                        else if (Ttype == 3)
                        {
                            strWhere += "and paytimes>='" + DateTime.Now.AddDays(-30) + "'";
                        }
                        else if (Ttype == 4)
                        {
                            if (iTset == 1)
                            {
                                strWhere += "and paytimes>='" + sTime + "' and paytimes<='" + oTime + "'";
                            }
                            else if (iTset == 2)
                            {
                                strWhere += "and paytimes>'" + sTime + "' and paytimes<'" + oTime + "'";
                            }
                            else if (iTset == 3)
                            {
                                strWhere += "and paytimes NOT BETWEEN '" + sTime + "' and '" + oTime + "'";
                            }
                        }
                        new TPR3.BLL.guess.BaPay().DeleteStr(strWhere);
                    }
                    else if (Ltype == 3)//赛事记录
                    {
                        if (Ptype != 0)
                        {
                            strWhere += "p_type=" + Ptype + " ";
                        }
                        else
                        {
                            strWhere += "p_type>0 ";
                        }

                        if (Ttype == 1)
                        {
                            strWhere += "and p_addtime='" + DateTime.Now.ToLongDateString() + "'";
                        }
                        else if (Ttype == 2)
                        {
                            strWhere += "and p_addtime>='" + DateTime.Now.AddDays(-7) + "'";
                        }
                        else if (Ttype == 3)
                        {
                            strWhere += "and p_addtime>='" + DateTime.Now.AddDays(-30) + "'";
                        }
                        else if (Ttype == 4)
                        {
                            if (iTset == 1)
                            {
                                strWhere += "and p_addtime>='" + sTime + "' and p_addtime<='" + oTime + "'";
                            }
                            else if (iTset == 2)
                            {
                                strWhere += "and p_addtime>'" + sTime + "' and p_addtime<'" + oTime + "'";
                            }
                            else if (iTset == 3)
                            {
                                strWhere += "and p_addtime NOT BETWEEN '" + sTime + "' and '" + oTime + "'";
                            }
                        }

                        new TPR3.BLL.guess.BaList().DeleteStr(strWhere);
                    }
                    Utils.Success("清空记录", "清空记录成功", Utils.getUrl("clear.aspx"), "1");
                }
                else
                {
                    builder.Append(Out.Tab("<div class=\"title\">", ""));
                    if (Ltype == 1)
                    {
                        builder.Append("请确认清空排行榜,清空的同时将返负彩,负彩相关设置请在系统参数中配置");
                    }
                    else if (Ltype == 2)
                    {
                        builder.Append("请确认清空投注记录");
                    }
                    else if (Ltype == 3)
                    {
                        builder.Append("请确认清空赛事记录");
                    }

                    builder.Append(Out.Tab("</div>", "<br />"));
                    string strName = "Ltype,Ptype,Ttype,sTime,oTime,iTset,Info";
                    string strValu = "" + Ltype + "'" + Ptype + "'" + Ttype + "'" + sTime + "'" + oTime + "'" + iTset + "'ok";
                    string strOthe = "清空记录,clear.aspx,post,1,red";

                    builder.Append(Out.wapform(strName, strValu, strOthe));
                    builder.Append(Out.Tab("<div>", "<br />"));
                    builder.Append(Out.waplink(Utils.getUrl("clear.aspx"), "先留着吧.."));
                    builder.Append(Out.Tab("</div>", "<br />"));
                }
            }
            else if (act == "actop")
            {
                Master.Title = "返负点";
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("返负点操作");
                builder.Append(Out.Tab("</div>", ""));
                string strText = "开始时间:,结束时间:,返负千分比:,至少输多少才返:,返负人数(填0则不限):,消息通知:,";
                string strName = "sTime,oTime,iTar,iPrice,MaxCount,Msgtxt,act";
                string strType = "date,date,num,num,num,textarea,hidden";
                string strValu = "" + DT.FormatDate(DateTime.Now.AddDays(-10), 0) + "'" + DT.FormatDate(DateTime.Now, 0) + "'''0''actopok";
                string strEmpt = "false,false,false,false,false,false,false";
                string strIdea = "/";
                string strOthe = "马上返负,clear.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(Out.waplink(Utils.getUrl("default.aspx"), "返回上一级"));
                builder.Append(Out.Tab("</div>", ""));
                builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            else if (act == "actop2")
            {
                Master.Title = "返赢点";
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("返赢点操作");
                builder.Append(Out.Tab("</div>", ""));
                string strText = "开始时间:,结束时间:,返赢千分比:,至少赢多少才返:,返赢人数(填0则不限):,消息通知:,";
                string strName = "sTime,oTime,iTar,iPrice,MaxCount,Msgtxt,act";
                string strType = "date,date,num,num,num,textarea,hidden";
                string strValu = "" + DT.FormatDate(DateTime.Now.AddDays(-10), 0) + "'" + DT.FormatDate(DateTime.Now, 0) + "'''0''actopok2";
                string strEmpt = "false,false,false,false,false,false,false";
                string strIdea = "/";
                string strOthe = "马上返赢,clear.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(Out.waplink(Utils.getUrl("default.aspx"), "返回上一级"));
                builder.Append(Out.Tab("</div>", ""));
                builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            else
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("清空历史记录");
                builder.Append(Out.Tab("</div>", ""));
                string strText = "*选择清空内容:/,球类:,限制:,开始时间:,结束时间:,时间局域:";
                string strName = "Ltype,Ptype,Ttype,sTime,oTime,iTset";
                string strType = "select,select,select,date,date,select";
                string strValu = "1'0'5'" + DT.FormatDate(DateTime.Now.AddDays(-10), 0) + "'" + DT.FormatDate(DateTime.Now, 0) + "'1";
                string strEmpt = "2|投注记录|3|赛事记录,0|全部|1|足球|2|篮球,1|今天所有|2|一个星期|3|一个月内|4|指定时间|5|所有时间,true,true,1|=&lt;&gt;=两者之间|2|&lt;&gt;介负于两者|3|=&gt;&lt;=两者之外";
                string strIdea = "/温馨提示:选择限定时间需填写时间类型;/排行榜记录不用选择时间限制;/闲聊、消费记录不用选择球类/";
                string strOthe = "清空记录,clear.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(Out.waplink(Utils.getUrl("default.aspx"), "返回上一级"));
                builder.Append(Out.Tab("</div>", ""));
                builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
                builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
                builder.Append(Out.Tab("</div>", "<br />"));
            }
        }
    }
예제 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int    gid      = Utils.ParseInt(Utils.GetRequest("gid", "all", 2, @"^[0-9]*$", "竞猜ID无效"));
        string act      = Utils.GetRequest("act", "all", 1, "", "");
        string jc       = Utils.GetRequest("jc", "get", 1, "", "");
        int    ManageId = new BCW.User.Manage().IsManageLogin();

        TPR3.BLL.guess.BaList bll = new TPR3.BLL.guess.BaList();

        TPR3.Model.guess.BaList st = bll.GetModel(gid);
        if (st == null)
        {
            Utils.Error("不存在的记录", "");
        }

        //载入页面更新足球上半场
        if (st.p_type == 1 && st.p_active == 0)
        {
            if (st.p_ison == 1)
            {
                new TPR2.Collec.Footbo().GetBoView(Convert.ToInt32(st.p_id), true);
                new TPR3.Collec.FootFalf().FootFalfPageHtml(Convert.ToInt32(st.p_id), true);
            }
            else
            {
                new TPR3.Collec.FootFalf().FootFalfPageHtml(Convert.ToInt32(st.p_id), false);
            }
        }

        TPR3.Model.guess.BaList model = bll.GetModel(gid);


        Master.Title = model.p_one + "VS" + model.p_two;

        //更新隐藏与显示
        if (act == "yes")
        {
            //游戏日志记录
            string[] p_pageArr = { "act", "gid" };
            BCW.User.GameLog.GameLogGetPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")开放显示", gid);
            model.p_del = 0;
            new TPR3.BLL.guess.BaList().Updatep_del(model);
        }
        else if (act == "no")
        {
            //游戏日志记录
            string[] p_pageArr = { "act", "gid" };
            BCW.User.GameLog.GameLogGetPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")隐藏显示", gid);
            model.p_del = 1;
            new TPR3.BLL.guess.BaList().Updatep_del(model);
        }

        //更新抓取与不抓取
        if (jc == "yes")
        {
            //游戏日志记录
            string[] p_pageArr = { "jc", "gid" };
            BCW.User.GameLog.GameLogGetPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")开启抓取", gid);
            model.p_jc = 0;
            new TPR3.BLL.guess.BaList().Updatep_jc(model);
        }
        else if (jc == "no")
        {
            //游戏日志记录
            string[] p_pageArr = { "jc", "gid" };
            BCW.User.GameLog.GameLogGetPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")关闭抓取", gid);
            model.p_jc = 1;
            new TPR3.BLL.guess.BaList().Updatep_jc(model);
        }

        //删除赛事
        if (act == "del" || act == "delok1" || act == "delok2")
        {
            if (act == "del")
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("确定删除此赛事吗");
                builder.Append(Out.Tab("</div>", "<br />"));
                builder.Append(Out.Tab("<div>", ""));
                builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&amp;act=delok1"), "删除,不包含下注记录") + "<br />");
                builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&amp;act=delok2"), "删除,包含下注记录") + "<br />");
                builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "先留着吧.."));
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            else
            {
                //游戏日志记录
                string[] p_pageArr = { "act", "gid" };
                BCW.User.GameLog.GameLogGetPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号删除赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")", gid);

                new TPR3.BLL.guess.BaList().Delete(gid);
                if (act == "delok2")
                {
                    TPR3.BLL.guess.BaPay bll2 = new TPR3.BLL.guess.BaPay();
                    new TPR3.BLL.guess.BaPay().Deletebcid(gid);
                }
                Utils.Success("删除赛事", "删除赛事成功..", Utils.getUrl("default.aspx"), "1");
            }
        }
        else
        {
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append(model.p_one + "VS" + model.p_two);
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append(Out.waplink(Utils.getUrl("default.aspx?ptype=4&amp;fly=" + model.p_title + ""), model.p_title) + ":" + model.p_one + "VS" + model.p_two);
            builder.Append("<br />开赛:" + DT.FormatDate(Convert.ToDateTime(model.p_TPRtime), 0));

            if (model.p_result_one != null && model.p_result_two != null)
            {
                builder.Append("<br />上半场比分:" + model.p_result_one + ":" + model.p_result_two + "");
            }
            else
            {
                if (model.p_TPRtime > DateTime.Now)
                {
                    builder.Append("<br />参考比分:未");
                }
                else
                {
                    if (model.p_type == 1)
                    {
                        builder.Append("<br />比赛状态:" + model.p_once + "");
                        builder.Append("<br />即时比分:" + model.p_result_temp1 + ":" + model.p_result_temp2 + "");
                    }
                    else
                    {
                        builder.Append("<br />比赛状态:进行中");
                    }
                }
            }
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("〓上下盘〓");
            if (model.p_ison == 1 && model.p_isluckone == 1 && model.p_active == 0)
            {
                builder.Append("<b>(封)</b>");
            }

            builder.AppendFormat("<br />{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=1"), "{1}注"), model.p_one + "(" + Convert.ToDouble(model.p_one_lu) + ")", new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 1));

            if (model.p_type == 1)
            {
                builder.Append("<br />" + GCK.getZqPn(Convert.ToInt32(model.p_pn)) + "" + GCK.getPkName(Convert.ToInt32(model.p_pk)) + "");
            }
            else
            {
                builder.Append("<br />" + Convert.ToDouble(model.p_pk) + "");
            }

            builder.AppendFormat("<br />{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=2"), "{1}注"), model.p_two + "(" + Convert.ToDouble(model.p_two_lu) + ")", new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 2));
            if (model.p_big_lu != 0)
            {
                builder.Append("<br />〓大小盘〓");
                if (model.p_ison == 1 && model.p_islucktwo == 1 && model.p_active == 0)
                {
                    builder.Append("<b>(封)</b>");
                }

                builder.AppendFormat("<br />" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=3"), "{0}注") + "{1}", new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 3), "大(" + Convert.ToDouble(model.p_big_lu) + ")");

                if (model.p_type == 1)
                {
                    builder.Append(GCK.getDxPkName(Convert.ToInt32(model.p_dx_pk)));
                }
                else
                {
                    builder.Append(Convert.ToDouble(model.p_dx_pk));
                }

                builder.AppendFormat("{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=4"), "{1}注"), "小(" + Convert.ToDouble(model.p_small_lu) + ")", new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 4));
            }
            if (model.p_bzs_lu != 0)
            {
                builder.Append("<br />〓标准盘〓");
                if (model.p_ison == 1 && model.p_isluckthr == 1 && model.p_active == 0)
                {
                    builder.Append("<b>(封)</b>");
                }

                builder.AppendFormat("<br />{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=5"), "{1}注"), "主胜(" + Convert.ToDouble(model.p_bzs_lu) + ")", new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 5));
                builder.AppendFormat("<br />{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=6"), "{1}注"), "平手(" + Convert.ToDouble(model.p_bzp_lu) + ")", new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 6));
                builder.AppendFormat("<br />{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=7"), "{1}注"), "客胜(" + Convert.ToDouble(model.p_bzx_lu) + ")", new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 7));
            }
            if (model.p_d_lu != 0 && model.p_d_lu != -1)
            {
                builder.Append("<br />〓单双盘〓");
                builder.Append("<br />" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=8"), "" + new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 8) + "注") + "单(" + Convert.ToDouble(model.p_d_lu) + ")");
                builder.Append("/双(" + Convert.ToDouble(model.p_s_lu) + ")" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=9"), "" + new TPR3.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 9) + "注") + "");
            }
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append("当前总下注" + new TPR3.BLL.guess.BaPay().GetBaPayNum(model.ID, Convert.ToInt32(model.p_type)) + "注,下注额" + new TPR3.BLL.guess.BaPay().GetBaPayCent(model.ID, Convert.ToInt32(model.p_type)) + "币");

            builder.Append("<br />〓管理〓");
            if (model.p_active > 0 && model.p_result_one != null && model.p_result_two != null)
            {
                builder.Append("<br />" + Out.waplink(Utils.getUrl("openGuess.aspx?gid=" + gid + ""), "重开奖"));
            }
            else
            {
                builder.Append("<br />" + Out.waplink(Utils.getUrl("openGuess.aspx?gid=" + gid + ""), "开奖"));
            }

            builder.Append(" " + Out.waplink(Utils.getUrl("editGuess.aspx?gid=" + gid + ""), "修改"));
            builder.Append(" " + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&amp;act=del"), "删除"));

            builder.Append(" " + Out.waplink(Utils.getUrl("payView.aspx?gid=" + gid + ""), "记录"));

            if (model.p_del == 0)
            {
                builder.Append(" " + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&amp;act=no"), "隐藏"));
            }
            else
            {
                builder.Append(" " + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&amp;act=yes"), "显示"));
            }

            if (model.p_jc == 0)
            {
                builder.Append("<br />抓取状态:正常抓取<br />" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&amp;jc=no"), "关闭抓取"));
            }
            else
            {
                builder.Append("<br />抓取状态:停止抓取<br />" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&amp;jc=yes"), "开启抓取"));
            }

            if (model.p_ison == 1)
            {
                builder.Append("<br />" + ub.Get("SiteGqText") + "状态:" + ub.Get("SiteGqText") + "");
            }
            else
            {
                builder.Append("<br />" + ub.Get("SiteGqText") + "状态:非" + ub.Get("SiteGqText") + "");
            }

            if (model.p_type == 1)
            {
                builder.Append("<br />8波ID:" + model.p_id + "");
            }
            else
            {
                builder.Append("<br />球探ID:" + model.p_id + "");
            }

            builder.Append("<br />" + Out.waplink(Utils.getUrl("../forumlog.aspx?act=gamelog&amp;ptype=8&amp;gid=" + gid + "&amp;backurl=" + Utils.PostPage(1) + ""), "操作日志"));
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append(Out.waplink(Utils.getPage("default.aspx"), "返回上一级"));
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
            builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
    }
예제 #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "下注详细记录";
        int gid   = Utils.ParseInt(Utils.GetRequest("gid", "get", 2, @"^[0-9]\d*$", "竞猜ID无效"));
        int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "get", 1, @"^[0-9]\d*$", "0"));

        builder.Append(Out.Tab("<div class=\"title\">", ""));
        if (ptype == 0)
        {
            builder.Append("下注记录|" + Out.waplink(Utils.getUrl("payView.aspx?gid=" + gid + "&amp;ptype=1"), "赢输记录"));
        }
        else
        {
            builder.Append(Out.waplink(Utils.getUrl("payView.aspx?gid=" + gid + "&amp;ptype=0"), "下注记录") + "|赢输记录");
        }
        builder.Append(Out.Tab("</div>", "<br />"));
        int pageSize = 10;
        int pageIndex;
        int recordCount;

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

        //组合条件
        string strWhere = "";

        strWhere += "bcid=" + gid + "";
        if (ptype == 1)
        {
            strWhere += "and p_active<>0";
        }
        // 开始读取竞猜
        IList <TPR3.Model.guess.BaPay> listBaPay = new TPR3.BLL.guess.BaPay().GetBaPayViews(pageIndex, pageSize, strWhere, ptype, out recordCount);

        if (listBaPay.Count > 0)
        {
            int k = 1;
            foreach (TPR3.Model.guess.BaPay n in listBaPay)
            {
                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 />"));
                    }
                }
                if (ptype == 0)
                {
                    builder.AppendFormat("<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + n.payusid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">{0}({1})</a>下注{2}币,共{3}注", n.payusname, n.payusid, Convert.ToDouble(n.payCents), n.payCount);
                }
                else
                {
                    builder.AppendFormat("<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + n.payusid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">{0}({1})</a>下注{2}币,返{3},盈利{4}", n.payusname, n.payusid, Convert.ToDouble(n.payCents), Convert.ToDouble(n.payCount), Convert.ToDouble(n.payCount - n.payCents));
                }
                builder.Append(Out.Tab("</div>", ""));
                k++;
            }

            // 分页
            builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
        }
        else
        {
            if (ptype == 0)
            {
                builder.Append(Out.Div("div", "没有相关记录.."));
            }
            else
            {
                builder.Append(Out.Div("div", "没有记录或赛事并没有结束.."));
            }
        }

        builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
        builder.Append(Out.Tab("<div>", ""));
        builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "返回上一级"));
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
    }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string act = Utils.GetRequest("act", "get", 1, "", "");

        if (act == "seach")
        {
            Master.Title = "搜索排行榜";
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("搜索排行榜");
            builder.Append(Out.Tab("</div>", ""));

            string strText = "球类:,类型:,开始时间:,结束时间:,";
            string strName = "p_type,ptype,StartTime,OverTime,act";
            string strType = "select,select,date,date,hidden";
            string strValu = "0'0'" + DT.FormatDate(DateTime.Now.AddDays(-10), 0) + "'" + DT.FormatDate(DateTime.Now, 0) + "'seachok";
            string strEmpt = "0|全部|1|足球|2|篮球,1|赌神榜|2|狂人榜,false,false,false";
            string strIdea = "/";
            string strOthe = "搜索排行,topguess.aspx,get,1,red";

            builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
        }
        else
        {
            int      p_type    = Utils.ParseInt(Utils.GetRequest("p_type", "get", 1, @"^[0-2]$", "0"));
            int      ptype     = Utils.ParseInt(Utils.GetRequest("ptype", "get", 1, @"^[1-2]$", "1"));
            int      showtype  = Utils.ParseInt(Utils.GetRequest("showtype", "get", 1, @"^[0-2]$", "0"));
            DateTime StartTime = DateTime.Now;
            DateTime OverTime  = DateTime.Now;
            if (act == "seachok")
            {
                StartTime = Utils.ParseTime(Utils.GetRequest("StartTime", "get", 2, DT.RegexTime, "开始时间格式填写出错,正确格式如" + DateTime.Now.ToString("yyy-MM-dd HH:mm:ss") + ""));
                OverTime  = Utils.ParseTime(Utils.GetRequest("OverTime", "get", 2, DT.RegexTime, "结束时间格式填写出错,正确格式如" + DateTime.Now.ToString("yyy-MM-dd HH:mm:ss") + ""));
            }
            Master.Title = "竞猜排行榜";
            builder.Append(Out.Tab("<div class=\"title\">", ""));

            if (showtype == 0)
            {
                builder.Append("全部日期 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?showtype=0"), "全部日期") + " ");
            }


            if (showtype == 1)
            {
                builder.Append("本周 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?showtype=1"), "本周") + " ");
            }


            if (showtype == 2)
            {
                builder.Append("本月 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?showtype=2"), "本月") + " ");
            }

            builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?act=seach"), "更多") + " ");

            builder.Append("<br />榜:");
            if (p_type == 0)
            {
                builder.Append("总榜 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=0&amp;ptype=" + ptype + "&amp;showtype=" + showtype + ""), "总榜") + " ");
            }
            if (p_type == 1)
            {
                builder.Append("足球 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=1&amp;ptype=" + ptype + "&amp;showtype=" + showtype + ""), "足球") + " ");
            }

            if (p_type == 2)
            {
                builder.Append("篮球 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=2&amp;ptype=" + ptype + "&amp;showtype=" + showtype + ""), "篮球") + " ");
            }

            builder.Append("<br />单:");

            if (ptype == 1)
            {
                builder.Append("赌神榜 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=" + p_type + "&amp;ptype=1&amp;showtype=" + showtype + ""), "赌神榜") + " ");
            }
            if (ptype == 2)
            {
                builder.Append("狂人榜 ");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=" + p_type + "&amp;ptype=2&amp;showtype=" + showtype + ""), "狂人榜") + " ");
            }

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

            //组件查询条件
            string strWhere = "";

            if (p_type > 0)
            {
                strWhere += "pType=" + p_type + " and ";
            }

            strWhere += " p_active>0 and types = 0 and itypes=0";

            if (showtype == 1)
            {
                string dt3 = Convert.ToDateTime(DT.GetWeekStart()).AddDays(-1).AddHours(12).ToString();
                string dt4 = Convert.ToDateTime(DT.GetWeekOver()).AddHours(12).ToString();

                strWhere += " and p_TPRtime>='" + dt3 + "'and p_TPRtime<='" + dt4 + "' ";
            }
            else if (showtype == 2)
            {
                strWhere += " and Year(p_TPRtime) = " + (DateTime.Now.Year) + " AND Month(p_TPRtime) = " + (DateTime.Now.Month) + "";
            }
            else
            {
                if (act == "seachok")
                {
                    strWhere += " and p_TPRtime>='" + StartTime + "'and p_TPRtime<'" + OverTime + "' ";
                }
            }
            int      pageSize = 10;
            int      pageIndex;
            int      recordCount;
            string[] pageValUrl = { "act", "p_type", "ptype", "showtype", "StartTime", "OverTime" };
            pageIndex = Utils.ParseInt(Request.QueryString["page"]);
            if (pageIndex == 0)
            {
                pageIndex = 1;
            }

            // 开始读取排行榜
            IList <TPR3.Model.guess.BaPay> listBaPay = new TPR3.BLL.guess.BaPay().GetBaPayTop2(pageIndex, pageSize, strWhere, ptype, out recordCount);
            if (listBaPay.Count > 0)
            {
                int k = 1;
                foreach (TPR3.Model.guess.BaPay n in listBaPay)
                {
                    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 />"));
                        }
                    }

                    if (ptype == 1)
                    {
                        builder.AppendFormat("[第{0}名]" + Out.waplink(Utils.getUrl("../uinfo.aspx?uid={1}&amp;backurl=" + Utils.PostPage(1)) + "", "{2}(" + n.payusid + ")") + "盈利{3}币", (pageIndex - 1) * 10 + k, n.payusid, new BCW.BLL.User().GetUsName(Convert.ToInt32(n.payusid)), Convert.ToDouble(n.payCount));
                    }
                    else if (ptype == 2)
                    {
                        builder.AppendFormat("[第{0}名]" + Out.waplink(Utils.getUrl("../uinfo.aspx?uid={1}&amp;backurl=" + Utils.PostPage(1)) + "", "{2}(" + n.payusid + ")") + "净胜{3}场", (pageIndex - 1) * 10 + k, n.payusid, new BCW.BLL.User().GetUsName(Convert.ToInt32(n.payusid)), Convert.ToDouble(n.payCount));
                    }

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

                    k++;
                }

                // 分页
                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(Out.waplink(Utils.getUrl("default.aspx"), "返回上一级"));
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
    }
예제 #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int    gid = Utils.ParseInt(Utils.GetRequest("gid", "all", 2, @"^[0-9]*$", "竞猜ID无效"));
        string ac  = Utils.GetRequest("ac", "all", 1, "", "");

        TPR3.BLL.guess.BaList bll = new TPR3.BLL.guess.BaList();

        if (bll.GetModel(gid) == null)
        {
            Utils.Error("不存在的记录", "");
        }
        TPR3.Model.guess.BaList model = bll.GetModel(gid);
        Master.Title = "开奖赛事" + model.p_one + "VS" + model.p_two;

        if (ac == "确定开奖" || ac == Utils.ToTChinese("确定开奖"))
        {
            int resultone = Utils.ParseInt(Utils.GetRequest("resultone", "post", 2, @"^[0-9]*$", "请正确输入比分"));
            int resulttwo = Utils.ParseInt(Utils.GetRequest("resulttwo", "post", 2, @"^[0-9]*$", "请正确输入比分"));
            int iType     = Utils.ParseInt(Utils.GetRequest("iType", "post", 2, @"^[1-3]*$", "请正确选择开奖模式"));

            DateTime oTime = DateTime.Now;
            string   pSms  = "";
            if (iType == 2)
            {
                oTime = Utils.ParseTime(Utils.GetRequest("oTime", "post", 2, DT.RegexTime, "请正确填写截止时间"));
                pSms  = Out.UBB(Utils.GetRequest("pSms", "post", 2, @"^[\s\S]{2,20}$", "请输入2-20字的平盘原因"));
            }
            else if (iType == 3)
            {
                pSms = Out.UBB(Utils.GetRequest("pSms", "post", 2, @"^[\s\S]{2,20}$", "请输入2-20字的平盘原因"));
            }

            string Info     = Utils.GetRequest("Info", "post", 1, "", "");
            string onceTime = Utils.GetRequest("onceTime", "post", 1, "", "");
            if (Info == "ok")
            {
                int      ManageId  = new BCW.User.Manage().IsManageLogin();
                string[] p_pageArr = { "ac", "gid", "resultone", "resulttwo", "p_one", "iType", "oTime", "pSms", "Info", "onceTime" };
                if (model.p_result_one != null && model.p_result_two != null)
                {
                    BCW.User.GameLog.GameLogPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号重新开奖" + model.p_one + "VS" + model.p_two + "(" + gid + "),比分" + resultone + ":" + resulttwo + "", gid);
                }
                else
                {
                    BCW.User.GameLog.GameLogPage(8, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号开奖" + model.p_one + "VS" + model.p_two + "(" + gid + "),比分" + resultone + ":" + resulttwo + "", gid);
                }


                int OnceMin = 0;//走地时间限制

                //是否走地赛事
                int ison = Convert.ToInt32(model.p_ison);

                //取得比分时间段

                string stronce = string.Empty;

                //更新比分
                model.p_result_one = resultone;
                model.p_result_two = resulttwo;

                if (iType == 3)
                {
                    model.p_active = 2;//平盘标识
                }
                else
                {
                    model.p_active = 1;
                }

                bll.UpdateResult(model);

                int     recordCount = 0;
                int     p_intWin    = 0;
                decimal p_intDuVal  = 0;
                //组合查询条件
                string strppWhere = "";
                string strWhere   = "";
                strppWhere = "bcid=" + gid + " and state=0";
                strWhere   = "bcid=" + gid + " and state=0";
                if (iType == 2)
                {
                    strWhere   += "and paytimes<='" + oTime + "'";
                    strppWhere += "and paytimes>'" + oTime + "'";
                }


                if (iType < 3)
                {
                    TPR3.Model.guess.BaOrder objBaOrder = new TPR3.Model.guess.BaOrder();

                    // 开始查询并更新之
                    IList <TPR3.Model.guess.BaPay> listBaPay = new TPR3.BLL.guess.BaPay().GetBaPays(1, 8000, strWhere, out recordCount);
                    if (listBaPay.Count > 0)
                    {
                        foreach (TPR3.Model.guess.BaPay n in listBaPay)
                        {
                            int Iszd = 0;
                            n.p_result_one = resultone;
                            n.p_result_two = resulttwo;
                            n.p_active     = 1;
                            //币种
                            string bzTypes = string.Empty;
                            if (n.Types == 0)
                            {
                                bzTypes = ub.Get("SiteBz");
                            }
                            else
                            {
                                bzTypes = ub.Get("SiteBz2");
                            }

                            if (model.p_type == 1)
                            {
                                if (Iszd == 0)
                                {
                                    if (n.PayType == 1 || n.PayType == 2)
                                    {
                                        string p_strVal = string.Empty;
                                        if (ison == 1)//如果是走地模式
                                        {
                                            n.p_result_one = resultone - Convert.ToInt32(n.p_result_temp1);
                                            n.p_result_two = resulttwo - Convert.ToInt32(n.p_result_temp2);
                                            p_strVal       = ZqClass.getZqsxCase(n);
                                            //重新取值
                                            n.p_result_one = resultone;
                                            n.p_result_two = resulttwo;
                                        }
                                        else
                                        {
                                            p_strVal = ZqClass.getZqsxCase(n);
                                        }
                                        new TPR3.BLL.guess.BaPay().UpdateCase(n, p_strVal, out p_intDuVal, out p_intWin);
                                        Iszd = 1;//走地模式
                                    }
                                    else if (n.PayType == 3 || n.PayType == 4)
                                    {
                                        new TPR3.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqdxCase(n), out p_intDuVal, out p_intWin);
                                    }
                                    else if (n.PayType == 5 || n.PayType == 6 || n.PayType == 7)
                                    {
                                        new TPR3.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqbzCase(n), out p_intDuVal, out p_intWin);
                                    }
                                    else
                                    {
                                        new TPR3.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqdsCase(n), out p_intDuVal, out p_intWin);
                                    }
                                }
                            }
                            else
                            {
                                if (n.PayType == 1 || n.PayType == 2)
                                {
                                    new TPR3.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqsxCase(n), out p_intDuVal, out p_intWin);
                                }
                                else if (n.PayType == 3 || n.PayType == 4)
                                {
                                    new TPR3.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqdxCase(n), out p_intDuVal, out p_intWin);
                                }
                                else
                                {
                                    new TPR3.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqdsCase(n), out p_intDuVal, out p_intWin);
                                }
                            }
                            if (Iszd != 2)
                            {
                                if (Convert.ToInt32(n.itypes) == 0)
                                {
                                    if (p_intWin == 1)
                                    {
                                        //更新排行榜:赢

                                        objBaOrder.Orderusid   = n.payusid;
                                        objBaOrder.Orderusname = n.payusname;

                                        if (p_intDuVal == n.payCent)
                                        {
                                            objBaOrder.Orderbanum = 0;
                                            objBaOrder.Orderjbnum = 0;
                                        }
                                        else
                                        {
                                            objBaOrder.Orderbanum = 1;
                                            objBaOrder.Orderjbnum = p_intDuVal - n.payCent;
                                        }
                                        objBaOrder.Orderfanum = 0;

                                        objBaOrder.Orderstats = n.pType;
                                        new TPR3.BLL.guess.BaOrder().UpdateOrder(objBaOrder);
                                        //发送内线
                                        string strLog = string.Empty;
                                        if (Iszd == 1)  //走地的内线提醒
                                        {
                                            strLog = "" + n.payview + "[br]结果:" + resultone + ":" + resulttwo + "(下注" + n.p_result_temp1 + ":" + n.p_result_temp2 + "),赢了" + Convert.ToDouble(p_intDuVal) + "" + bzTypes + "[url=/bbs/guess2/caseGuess.aspx]马上兑奖[/url]";
                                        }
                                        else
                                        {
                                            strLog = "" + n.payview + "[br]结果:" + resultone + ":" + resulttwo + ",赢了" + Convert.ToDouble(p_intDuVal) + "" + bzTypes + "[url=/bbs/guess2/caseGuess.aspx]马上兑奖[/url]";
                                        }

                                        new BCW.BLL.Guest().Add(1, Convert.ToInt32(n.payusid), n.payusname, strLog);
                                    }
                                    else
                                    {
                                        //更新排行榜:输

                                        objBaOrder.Orderusid   = n.payusid;
                                        objBaOrder.Orderusname = n.payusname;
                                        objBaOrder.Orderbanum  = 0;

                                        objBaOrder.Orderfanum = 1;

                                        objBaOrder.Orderjbnum = -n.payCent;
                                        objBaOrder.Orderbanum = 0;

                                        objBaOrder.Orderstats = n.pType;
                                        new TPR3.BLL.guess.BaOrder().UpdateOrder(objBaOrder);
                                    }
                                }
                            }
                            else
                            {
                                //平盘
                                n.p_result_one = resultone;
                                n.p_result_two = resulttwo;
                                n.p_active     = 2;
                                n.p_getMoney   = n.payCent;
                                new TPR3.BLL.guess.BaPay().UpdatePPCase(n);
                                //发送内线
                                if (Convert.ToInt32(n.itypes) == 0)
                                {
                                    //发送内线
                                    string strLog = "" + n.payview + "[br]结果平盘,原因:走地赛事,系统将比分变动前后" + OnceMin + "秒钟的下注作平盘处理,返还" + Convert.ToDouble(n.payCent) + "" + bzTypes + "[url=/bbs/guess2/caseGuess.aspx]马上兑奖[/url][br]本场赛事变动时间如下:[br]" + stronce.Replace("|", "[br]") + "";
                                    new BCW.BLL.Guest().Add(1, Convert.ToInt32(n.payusid), n.payusname, strLog);
                                }
                            }
                        }
                    }
                }
                if (iType == 2 || iType == 3)
                {
                    // 平盘返还
                    IList <TPR3.Model.guess.BaPay> listBaPay = new TPR3.BLL.guess.BaPay().GetBaPays(1, 8000, strppWhere, out recordCount);
                    if (listBaPay.Count > 0)
                    {
                        foreach (TPR3.Model.guess.BaPay n in listBaPay)
                        {
                            n.p_result_one = resultone;
                            n.p_result_two = resulttwo;
                            n.p_active     = 2;
                            n.p_getMoney   = n.payCent;
                            //币种
                            string bzTypes = string.Empty;
                            if (n.Types == 0)
                            {
                                bzTypes = ub.Get("SiteBz");
                            }
                            else
                            {
                                bzTypes = ub.Get("SiteBz2");
                            }

                            new TPR3.BLL.guess.BaPay().UpdatePPCase(n);

                            //发送内线
                            if (Convert.ToInt32(n.itypes) == 0)
                            {
                                //发送内线
                                string strLog = "" + n.payview + "[br]结果平盘,原因:" + pSms + ",返还" + Convert.ToDouble(n.payCent) + "" + bzTypes + "[url=/bbs/guess2/caseGuess.aspx]马上兑奖[/url]";
                                new BCW.BLL.Guest().Add(1, Convert.ToInt32(n.payusid), n.payusname, strLog);
                            }
                        }
                    }
                }

                if (iType == 3)
                {
                    BCW.Data.SqlHelper.ExecuteSql("Update tb_ZBalist set p_id=0 where id=" + gid + "");
                    Utils.Success("开奖", "操作平盘成功..", Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "1");
                }
                else
                {
                    Utils.Success("开奖", "开奖" + resultone + ":" + resulttwo + "成功..", Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "1");
                }
            }
            else
            {
                builder.Append(Out.Tab("<div>", ""));
                if (iType == 1)
                {
                    builder.Append("请确认比分" + resultone + ":" + resulttwo + "");
                }
                else if (iType == 2)
                {
                    builder.Append("请确认比分" + resultone + ":" + resulttwo + "," + DT.FormatDate(oTime, 0) + "");
                }
                else
                {
                    builder.Append("请确认平盘.");
                }
                builder.Append(Out.Tab("</div>", "<br />"));
                string strName = "resultone,resulttwo,iType,oTime,pSms,onceTime,gid,Info";
                string strValu = "" + resultone + "'" + resulttwo + "'" + iType + "'" + DT.FormatDate(oTime, 0) + "'" + pSms + "'" + onceTime + "'" + gid + "'ok";
                string strOthe = "确定开奖,openGuess.aspx,post,0,red";

                builder.Append(Out.wapform(strName, strValu, strOthe));
                builder.Append(Out.Tab("<div>", "<br />"));
                builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "再看看吧.."));
                builder.Append(Out.Tab("</div>", "<br />"));
            }
        }
        else
        {
            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("开奖赛事" + model.p_one + "VS" + model.p_two);
            builder.Append(Out.Tab("</div>", "<br />"));

            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("开赛:" + DT.FormatDate(Convert.ToDateTime(model.p_TPRtime), 0));
            builder.Append(Out.Tab("</div>", ""));

            string strText = string.Empty;
            string strName = string.Empty;
            string strType = string.Empty;
            string strValu = string.Empty;
            string strEmpt = string.Empty;
            if (model.p_ison == 0)
            {
                strText = "*填写比分/,比/,开奖模式,截止时间,操作原因,";
                strName = "resultone,resulttwo,iType,oTime,pSms,gid";
                strType = "num,num,select,date,text,hidden";
                strValu = "0'0'1'" + DT.FormatDate(DateTime.Now.AddHours(-10), 0) + "''" + gid + "";
                strEmpt = "false,false,1|正常模式|2|截时模式|3|平盘模式,true,true,";
            }
            else
            {
                strText = "*填写比分/,比/,开奖模式,截止时间,操作原因,走地比分时间(格式2010-10-7 1:00:00#2010-10-7 1:20:00)/,";
                strName = "resultone,resulttwo,iType,oTime,pSms,onceTime,gid";
                strType = "num,num,select,date,text,textarea,hidden";
                strValu = "0'0'1'" + DT.FormatDate(DateTime.Now.AddHours(-10), 0) + "'''" + gid + "";
                strEmpt = "false,false,1|正常模式|2|截时模式|3|平盘模式,true,true,true,";
            }
            string strIdea = "/提示:非正常模式开奖时请输入操作原因;/当选择截时模式时,即该时间前的作正常开奖,时间后的作平盘返还;/当你选择平盘模式时,比分写成0:0即可/";
            string strOthe = "确定开奖,openGuess.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(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "返回上一级"));
            builder.Append(Out.Tab("</div>", ""));
            builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
            builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
            builder.Append(Out.Tab("</div>", "<br />"));
        }
    }
예제 #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "搜索用户下注";
        builder.Append(Out.Tab("<div class=\"title\">", ""));
        builder.Append("搜索用户下注");
        int UsID = Utils.ParseInt(Utils.GetRequest("UsID", "all", 1, @"^[0-9]\d*$", "0"));

        if (UsID != 0)
        {
            string UsName = new BCW.BLL.User().GetUsName(UsID);
            if (UsName == "")
            {
                UsName = "不存在的用户";
            }

            builder.Append("<br />对象:<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + UsID + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + UsName + "(" + UsID + ")</a>");
        }
        builder.Append(Out.Tab("</div>", ""));
        string ac = Utils.GetRequest("ac", "all", 1, "", "");

        if (ac == "搜索下注" || ac == Utils.ToTChinese("搜索下注"))
        {
            int    Ptype, Ltype, Xtype, Ttype, iTset;
            string sTime = "";
            string oTime = "";
            Ptype = Utils.ParseInt(Utils.GetRequest("Ptype", "all", 2, @"^[0-2]$", "球类选择无效"));
            Ltype = Utils.ParseInt(Utils.GetRequest("Ltype", "all", 2, @"^[0-3]$", "类型选择无效"));
            Xtype = Utils.ParseInt(Utils.GetRequest("Xtype", "all", 2, @"^[0-2]+$", "性质选择无效"));
            Ttype = Utils.ParseInt(Utils.GetRequest("Ttype", "all", 2, @"^[1-5]+$", "限制选择无效"));
            iTset = Utils.ParseInt(Utils.GetRequest("iTset", "all", 2, @"^[1-3]+$", "局域选择无效"));
            if (Ttype == 4)
            {
                sTime = Utils.GetRequest("sTime", "all", 2, DT.RegexTime, "开始时间填写无效");
                oTime = Utils.GetRequest("oTime", "all", 2, DT.RegexTime, "结束时间填写无效");
            }

            builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
            builder.Append("类型:");
            if (Ltype == 3)
            {
                builder.Append("全部|");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("search.aspx?UsID=" + UsID + "&amp;Ptype=" + Ptype + "&amp;Ltype=3&amp;Xtype=" + Xtype + "&amp;Ttype=" + Ttype + "&amp;sTime=" + sTime + "&amp;oTime=" + oTime + "&amp;iTset=" + iTset + "&amp;ac=" + ac + ""), "全部") + "|");
            }

            if (Ltype == 0)
            {
                builder.Append("未返|");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("search.aspx?UsID=" + UsID + "&amp;Ptype=" + Ptype + "&amp;Ltype=0&amp;Xtype=" + Xtype + "&amp;Ttype=" + Ttype + "&amp;sTime=" + sTime + "&amp;oTime=" + oTime + "&amp;iTset=" + iTset + "&amp;ac=" + ac + ""), "未返") + "|");
            }

            if (Ltype == 1)
            {
                builder.Append("已开|");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("search.aspx?UsID=" + UsID + "&amp;Ptype=" + Ptype + "&amp;Ltype=1&amp;Xtype=" + Xtype + "&amp;Ttype=" + Ttype + "&amp;sTime=" + sTime + "&amp;oTime=" + oTime + "&amp;iTset=" + iTset + "&amp;ac=" + ac + ""), "已开") + "|");
            }

            if (Ltype == 2)
            {
                builder.Append("平盘");
            }
            else
            {
                builder.Append(Out.waplink(Utils.getUrl("search.aspx?UsID=" + UsID + "&amp;Ptype=" + Ptype + "&amp;Ltype=2&amp;Xtype=" + Xtype + "&amp;Ttype=" + Ttype + "&amp;sTime=" + sTime + "&amp;oTime=" + oTime + "&amp;iTset=" + iTset + "&amp;ac=" + ac + ""), "平盘"));
            }


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

            int      pageSize = 10;
            int      pageIndex;
            int      recordCount;
            string[] pageValUrl = { "UsID", "Ptype", "Ltype", "Xtype", "Ttype", "sTime", "oTime", "iTset", "ac", "showtype" };
            pageIndex = Utils.ParseInt(Request.QueryString["page"]);
            if (pageIndex == 0)
            {
                pageIndex = 1;
            }

            //组件条件查询
            string strWhere = "";
            if (Ptype != 0)
            {
                strWhere += "ptype=" + Ptype + " and itypes=0";
            }
            else
            {
                strWhere += "itypes=0 ";
            }

            if (UsID != 0)
            {
                strWhere += "and payusid=" + UsID + " ";
            }

            if (Ltype != 3)
            {
                strWhere += " and p_active=" + Ltype + " ";
            }

            if (Xtype == 1)
            {
                strWhere += "and p_getMoney>0 ";
            }
            else if (Xtype == 2)
            {
                strWhere += "and p_getMoney=0 ";
            }
            if (Ttype == 1)
            {
                strWhere += "and paytimes='" + DateTime.Now.ToLongDateString() + "'";
            }
            else if (Ttype == 2)
            {
                strWhere += "and paytimes>='" + DateTime.Now.AddDays(-7) + "'";
            }
            else if (Ttype == 3)
            {
                strWhere += "and paytimes>='" + DateTime.Now.AddDays(-30) + "'";
            }
            else if (Ttype == 4)
            {
                if (iTset == 1)
                {
                    strWhere += "and paytimes>='" + sTime + "' and paytimes<='" + oTime + "'";
                }
                else if (iTset == 2)
                {
                    strWhere += "and paytimes>'" + sTime + "' and paytimes<'" + oTime + "'";
                }
                else if (iTset == 3)
                {
                    strWhere += "and paytimes NOT BETWEEN '" + sTime + "' and '" + oTime + "'";
                }
            }
            // 开始读取竞猜
            IList <TPR3.Model.guess.BaPay> listBaPay = new TPR3.BLL.guess.BaPay().GetBaPays(pageIndex, pageSize, strWhere, out recordCount);
            if (listBaPay.Count > 0)
            {
                builder.Append(Out.Tab("<div class=\"text\">", ""));
                builder.Append("共有" + recordCount + "条结果");
                builder.Append(Out.Tab("</div>", "<br />"));
                int k = 1;
                foreach (TPR3.Model.guess.BaPay n in listBaPay)
                {
                    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 />"));
                        }
                    }

                    string bzType = string.Empty;
                    if (n.Types == 0)
                    {
                        bzType = ub.Get("SiteBz");
                    }
                    else
                    {
                        bzType = ub.Get("SiteBz2");
                    }

                    string strState = string.Empty;
                    if (n.p_active == 0)
                    {
                        strState = "未返";
                    }
                    else if (n.p_active == 1)
                    {
                        if (n.p_getMoney > 0)
                        {
                            strState = "已返" + Convert.ToInt64(n.p_getMoney) + "" + bzType + "";
                        }
                        else
                        {
                            strState = "输" + Convert.ToInt64(n.payCent) + "" + bzType + "";
                        }
                    }
                    else if (n.p_active == 2)
                    {
                        strState = "已平盘";
                    }

                    builder.Append("[" + strState + "]");

                    builder.AppendFormat(Out.waplink(Utils.getUrl("../uinfo.aspx?uid={1}&amp;backurl=" + Utils.PostPage(1) + ""), "{0}({1})") + ":{2}[{3}]", n.payusname, n.payusid, Out.SysUBB(n.payview.Replace("/bbs/guessbc/", "")), n.paytimes);

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

                    k++;
                }

                // 分页
                builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0));
            }
            else
            {
                builder.Append(Out.Div("div", "没有相关记录.."));
            }
            builder.Append(Out.Tab("<div>", "<br />"));
            builder.Append(Out.waplink(Utils.getUrl("search.aspx"), "继续搜索"));
            builder.Append(Out.Tab("</div>", ""));
        }
        else
        {
            string strText = "*输入会员ID:/,球类:,类型:,性质:,限制:,开始时间:,结束时间:,时间局域:";
            string strName = "UsID,Ptype,Ltype,Xtype,Ttype,sTime,oTime,iTset";
            string strType = "text,select,select,select,select,date,date,select";
            string strValu = "0'0'3'0'5'" + DT.FormatDate(DateTime.Now.AddDays(-10), 0) + "'" + DT.FormatDate(DateTime.Now, 0) + "'1";
            string strEmpt = "true,0|全部|1|足球|2|篮球,3|全部下注|0|未开下注|1|已开下注|2|平盘下注,0|全部下注|1|中奖下注|2|未中下注,1|今天所有|2|一个星期|3|一个月内|4|指定时间|5|不限时间,true,true,1|=&lt;&gt;=两者之间|2|&lt;&gt;介负于两者|3|=&gt;&lt;=两者之外";
            string strIdea = "/温馨提示:ID为0时搜索所有用户,选择限定时间需填写时间类型/";
            string strOthe = "搜索下注,search.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(Out.waplink(Utils.getUrl("default.aspx"), "返回上一级"));
        builder.Append(Out.Tab("</div>", ""));
        builder.Append(Out.Tab("<div class=\"title\">", "<br />"));
        builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>");
        builder.Append(Out.Tab("</div>", "<br />"));
    }