コード例 #1
0
ファイル: payView.aspx.cs プロジェクト: radtek/GitKB288
    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 + " and types=0";
        if (ptype == 1)
        {
            strWhere += "and p_active<>0";
        }
        // 开始读取竞猜
        IList <TPR.Model.guess.BaPay> listBaPay = new TPR.BLL.guess.BaPay().GetBaPayViews(pageIndex, pageSize, strWhere, ptype, out recordCount);

        if (listBaPay.Count > 0)
        {
            int k = 1;
            foreach (TPR.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}" + ub.Get("SiteBz") + ",共{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}" + ub.Get("SiteBz") + ",返{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 />"));
    }
コード例 #2
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*$", "会员ID无效"));

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

            builder.Append("<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, "结束时间填写无效");
            }

            int      pageSize = 10;
            int      pageIndex;
            int      recordCount;
            string[] pageValUrl = { "UsID", "Ptype", "Ltype", "Xtype", "Ttype", "sTime", "oTime", "iTset", "ac" };
            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 <TPR.Model.guess.BaPay> listBaPay = new TPR.BLL.guess.BaPay().GetBaPays(pageIndex, pageSize, strWhere, out recordCount);
            if (listBaPay.Count > 0)
            {
                builder.Append(Out.Tab("<div class=\"text\">", "<br />"));
                builder.Append("共有" + recordCount + "条结果");
                builder.Append(Out.Tab("</div>", "<br />"));
                int k = 1;
                foreach (TPR.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 (UsID == 0)
                    {
                        builder.Append("<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + n.payusid + "&amp;backurl=" + Utils.PostPage(1) + "") + "\">" + n.payusname + "(" + n.payusid + ")</a>:");
                    }

                    builder.AppendFormat("{0}<br />时间:{1}", Out.SysUBB(n.payview), 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 />"));
    }
コード例 #3
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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.BLL.guess.BaPay().GetBaPayCount("ptype=" + ptype + " and   Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_active<>0");

            bmwinNum = new TPR.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 TPR.BLL.guess.BaPay().GetBaPaypayCent("ptype=" + ptype + " and  Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_active<>0");

            bmwinCent = new TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.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 TPR.BLL.guess.BaList().GetBaListCount("p_type=" + ptype + " and p_active<>0");

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

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

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

            winCent = new TPR.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>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append(Out.waplink(Utils.getUrl("stats.aspx?showtype=1"), "&gt;串串数据分析"));
            builder.Append(Out.Tab("</div>", ""));
        }
        else if (showtype == 1)
        {
            //统计今天
            int  todayzsNum2, todaywinNum2;
            long todayzsCent2, todaywinCent2;

            todayzsNum2 = new TPR.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + DateTime.Now.Year + " AND Month(AddTime) = " + DateTime.Now.Month + " and Day(AddTime) = " + DateTime.Now.Day + "  and Status<>0");

            todaywinNum2 = new TPR.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + DateTime.Now.Year + " AND Month(AddTime) = " + DateTime.Now.Month + " and Day(AddTime) = " + DateTime.Now.Day + "  and getMoney>0 and Status<>0");

            todayzsCent2 = new TPR.BLL.guess.Super().GetSuperpayCent("Year(AddTime) = " + DateTime.Now.Year + " AND Month(AddTime) = " + DateTime.Now.Month + " and Day(AddTime) = " + DateTime.Now.Day + " and Status<>0");

            todaywinCent2 = new TPR.BLL.guess.Super().GetSupergetMoney("Year(AddTime) = " + DateTime.Now.Year + " AND Month(AddTime) = " + DateTime.Now.Month + " and Day(AddTime) = " + DateTime.Now.Day + "  and getMoney>0 and Status<>0");

            //统计昨天
            int  yestzsNum2, yestwinNum2;
            long yestzsCent2, yestwinCent2;

            yestzsNum2 = new TPR.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + DateTime.Now.AddDays(-1).Year + " AND Month(AddTime) = " + DateTime.Now.AddDays(-1).Month + " and Day(AddTime) = " + DateTime.Now.AddDays(-1).Day + "  and Status<>0");

            yestwinNum2 = new TPR.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + DateTime.Now.AddDays(-1).Year + " AND Month(AddTime) = " + DateTime.Now.AddDays(-1).Month + " and Day(AddTime) = " + DateTime.Now.AddDays(-1).Day + "  and getMoney>0 and Status<>0");

            yestzsCent2 = new TPR.BLL.guess.Super().GetSuperpayCent("Year(AddTime) = " + DateTime.Now.AddDays(-1).Year + " AND Month(AddTime) = " + DateTime.Now.AddDays(-1).Month + " and Day(AddTime) = " + DateTime.Now.AddDays(-1).Day + " and Status<>0");

            yestwinCent2 = new TPR.BLL.guess.Super().GetSupergetMoney("Year(AddTime) = " + DateTime.Now.AddDays(-1).Year + " AND Month(AddTime) = " + DateTime.Now.AddDays(-1).Month + " and Day(AddTime) = " + DateTime.Now.AddDays(-1).Day + "  and getMoney>0 and Status<>0");

            //统计本月
            int  bmzsNum2, bmwinNum2;
            long bmzsCent2, bmwinCent2;

            bmzsNum2 = new TPR.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and Status<>0");

            bmwinNum2 = new TPR.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and getMoney>0 and Status<>0");

            bmzsCent2 = new TPR.BLL.guess.Super().GetSuperpayCent("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and Status<>0");

            bmwinCent2 = new TPR.BLL.guess.Super().GetSupergetMoney("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and getMoney>0 and Status<>0");

            //统计上月
            int  smzsNum2, smwinNum2;
            long smzsCent2, smwinCent2;

            smzsNum2 = new TPR.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(AddTime) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and Status<>0");

            smwinNum2 = new TPR.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(AddTime) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and getMoney>0 and Status<>0");

            smzsCent2 = new TPR.BLL.guess.Super().GetSuperpayCent("Year(AddTime) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(AddTime) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and Status<>0");

            smwinCent2 = new TPR.BLL.guess.Super().GetSupergetMoney("Year(AddTime) = " + (DateTime.Now.Year - DateTime.Now.Day) + " AND Month(AddTime) = " + (DateTime.Now.Month - DateTime.Now.Day) + " and getMoney>0 and Status<>0");

            //总计
            int  zsNum2, winNum2;
            long zsCent2, winCent2;

            zsNum2 = new TPR.BLL.guess.Super().GetSuperCount("Status<>0");

            winNum2 = new TPR.BLL.guess.Super().GetSuperCount("getMoney>0 and Status<>0");

            zsCent2 = new TPR.BLL.guess.Super().GetSuperpayCent("Status<>0");

            winCent2 = new TPR.BLL.guess.Super().GetSupergetMoney("getMoney>0 and Status<>0");

            builder.Append(Out.Tab("<div class=\"title\">", ""));
            builder.Append("完场串串数据分析");
            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>下注数</td><td>下注额</td><td>用户赢注数</td><td>用户赢金额</td><td>本站盈利</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>今天</td><td>" + todayzsNum2 + "</td><td>" + todayzsCent2 + "</td><td>" + todaywinNum2 + "</td><td>" + todaywinCent2 + "</td><td>" + (todayzsCent2 - todaywinCent2) + "</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>昨天</td><td>" + yestzsNum2 + "</td><td>" + yestzsCent2 + "</td><td>" + yestwinNum2 + "</td><td>" + yestwinCent2 + "</td><td>" + (yestzsCent2 - yestwinCent2) + "</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>本月</td><td>" + bmzsNum2 + "</td><td>" + bmzsCent2 + "</td><td>" + bmwinNum2 + "</td><td>" + bmwinCent2 + "</td><td>" + (bmzsCent2 - bmwinCent2) + "</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>上月</td><td>" + smzsNum2 + "</td><td>" + smzsCent2 + "</td><td>" + smwinNum2 + "</td><td>" + smwinCent2 + "</td><td>" + (smzsCent2 - smwinCent2) + "</td>");
            builder.Append("</tr>");
            builder.Append("<tr>");
            builder.Append("<td>总计</td><td>" + zsNum2 + "</td><td>" + zsCent2 + "</td><td>" + winNum2 + "</td><td>" + winCent2 + "</td><td>" + (zsCent2 - winCent2) + "</td>");
            builder.Append("</tr>");
            builder.Append("</table>");
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));
            builder.Append(Out.waplink(Utils.getUrl("stats.aspx"), "&gt;普通数据分析"));
            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 TPR.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 TPR.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 />"));
    }
コード例 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Master.Title = "清空记录";
        string act = Utils.GetRequest("act", "all", 1, "", "");

        if (act == "actopok")
        {
            if (Utils.GetDomain().Contains("kubao") || Utils.GetDomain().Contains("tuhao") || Utils.GetDomain().Contains("th") || Utils.GetDomain().Contains("kb288") || Utils.GetDomain().Contains("127.0.0.6"))
            {
                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*$", "至少输多少币才返填写错误"));

                DataSet ds = new TPR.BLL.guess.BaPay().GetBaPayList("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/guess/default.aspx]进入球彩竞猜[/url]";
                        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")
        {
            if (Utils.GetDomain().Contains("kubao") || Utils.GetDomain().Contains("tuhao") || Utils.GetDomain().Contains("th") || Utils.GetDomain().Contains("kb288") || Utils.GetDomain().Contains("127.0.0.6"))
            {
                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*$", "至少赢多少币才返填写错误"));

                DataSet ds = new TPR.BLL.guess.BaPay().GetBaPayList("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/guess/default.aspx]进入球彩竞猜[/url]";

                        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_balist 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 TPR.BLL.guess.BaPay().GetBaPayCount("bcid=" + ID + "");
                    if (pCount == 0)
                    {
                        new TPR.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 = "清空竞猜赛事记录";
                    }
                    else if (Ltype == 4)
                    {
                        cText = "清空竞猜串串记录";
                    }
                    else if (Ltype == 5)
                    {
                        cText = "清空竞猜串串排行榜";
                    }
                    //游戏日志记录
                    int      ManageId  = new BCW.User.Manage().IsManageLogin();
                    int      gid       = new TPR.BLL.guess.BaList().GetMaxId();
                    string[] p_pageArr = { "ac", "Ltype", "Ptype", "Ttype", "sTime", "oTime", "iTset", "Info" };
                    BCW.User.GameLog.GameLogPage(Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号" + cText + "", gid);

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

                    if (Ltype == 1)//排行榜记录
                    {
                        //------------------------返负彩
                        if (Convert.ToInt32(ub.GetSub("SiteLostPrice", xmlPath)) > 0)
                        {
                            DataSet ds = new TPR.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 TPR.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 TPR.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 TPR.BLL.guess.BaList().DeleteStr(strWhere);
                    }
                    else if (Ltype == 4)//串串记录
                    {
                        if (Ttype == 1)
                        {
                            strWhere += "AddTime='" + DateTime.Now.ToLongDateString() + "'";
                        }
                        else if (Ttype == 2)
                        {
                            strWhere += "AddTime>='" + DateTime.Now.AddDays(-7) + "'";
                        }
                        else if (Ttype == 3)
                        {
                            strWhere += "AddTime>='" + DateTime.Now.AddDays(-30) + "'";
                        }
                        else if (Ttype == 4)
                        {
                            if (iTset == 1)
                            {
                                strWhere += "AddTime>='" + sTime + "' and AddTime<='" + oTime + "'";
                            }
                            else if (iTset == 2)
                            {
                                strWhere += "AddTime>'" + sTime + "' and AddTime<'" + oTime + "'";
                            }
                            else if (iTset == 3)
                            {
                                strWhere += "AddTime NOT BETWEEN '" + sTime + "' and '" + oTime + "'";
                            }
                        }
                        new TPR.BLL.guess.Super().DeleteStr(strWhere);
                    }

                    else if (Ltype == 5)//串串排行榜
                    {
                        new TPR.BLL.guess.SuperOrder().DeleteStr();
                    }
                    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("请确认清空赛事记录");
                    }
                    else if (Ltype == 4)
                    {
                        builder.Append("请确认清空串串记录");
                    }
                    else if (Ltype == 5)
                    {
                        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")
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("返负点操作");
                builder.Append(Out.Tab("</div>", ""));
                string strText = "开始时间:,结束时间:,返负千分比:,至少输多少才返:,";
                string strName = "sTime,oTime,iTar,iPrice,act";
                string strType = "date,date,num,num,hidden";
                string strValu = "" + DT.FormatDate(DateTime.Now.AddDays(-10), 0) + "'" + DT.FormatDate(DateTime.Now, 0) + "'''actopok";
                string strEmpt = "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")
            {
                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("返赢点操作");
                builder.Append(Out.Tab("</div>", ""));
                string strText = "开始时间:,结束时间:,返赢千分比:,至少赢多少才返:,";
                string strName = "sTime,oTime,iTar,iPrice,act";
                string strType = "date,date,num,num,hidden";
                string strValu = "" + DT.FormatDate(DateTime.Now.AddDays(-10), 0) + "'" + DT.FormatDate(DateTime.Now, 0) + "'''actopok2";
                string strEmpt = "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 = "1|排行榜记录|2|投注记录|3|赛事记录|4|串串记录|5|串串排行榜,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>", ""));
                if (Utils.GetDomain().Contains("kubao") || Utils.GetDomain().Contains("tuhao") || Utils.GetDomain().Contains("th") || Utils.GetDomain().Contains("kb288") || Utils.GetDomain().Contains("127.0.0.6"))
                {
                    builder.Append("<a href=\"" + Utils.getUrl("clear.aspx?act=actop") + "\">返负点操作</a><br />");
                    builder.Append("<a href=\"" + Utils.getUrl("clear.aspx?act=actop2") + "\">返赢点操作</a><br />");
                }
                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
ファイル: openGuess.aspx.cs プロジェクト: radtek/GitKB288
    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, "", "");

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

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

        if (Utils.ToSChinese(ac) == "确定开奖" || Utils.ToSChinese(ac) == "确定重开奖")
        {
            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(Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号重新开奖" + model.p_one + "VS" + model.p_two + "(" + gid + "),比分" + resultone + ":" + resulttwo + "", gid);
                }
                else
                {
                    BCW.User.GameLog.GameLogPage(Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号开奖" + model.p_one + "VS" + model.p_two + "(" + gid + "),比分" + resultone + ":" + resulttwo + "", gid);
                }

                //重开奖处理:
                if (model.p_result_one != null && model.p_result_two != null)
                {
                    DataSet ds = new TPR.BLL.guess.BaPay().GetBaPayList("pType,payview,payusid,payusname,payCent,p_getMoney,types", "bcid=" + gid + " and p_case=1 and itypes=0 ");
                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                        {
                            int    pType      = int.Parse(ds.Tables[0].Rows[i]["pType"].ToString());
                            string payview    = ds.Tables[0].Rows[i]["payview"].ToString();
                            int    payusid    = int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString());
                            string payusname  = ds.Tables[0].Rows[i]["payusname"].ToString();
                            long   payCent    = Convert.ToInt64(Convert.ToDecimal(ds.Tables[0].Rows[i]["payCent"].ToString()));
                            long   p_getMoney = Convert.ToInt64(Convert.ToDecimal(ds.Tables[0].Rows[i]["p_getMoney"].ToString()));
                            int    bzType     = int.Parse(ds.Tables[0].Rows[i]["types"].ToString());
                            long   gold       = 0;
                            long   cMoney     = 0; //差多少
                            long   sMoney     = 0; //实扣
                            if (bzType == 0)
                            {
                                gold = new BCW.BLL.User().GetGold(payusid);
                            }
                            else
                            {
                                gold = new BCW.BLL.User().GetMoney(payusid);
                            }

                            if (p_getMoney > gold)
                            {
                                cMoney = p_getMoney - gold;
                                sMoney = gold;
                            }
                            else
                            {
                                sMoney = p_getMoney;
                            }

                            //重开奖的在本场没兑奖时就没显示在欠币日志,

                            //操作币并内线通知
                            if (bzType == 0)
                            {
                                new BCW.BLL.User().UpdateiGold(payusid, payusname, -sMoney, "球彩重开奖,扣除已兑奖" + ub.Get("SiteBz") + "");
                                //发送内线
                                string strGuess = "球彩重开奖,你欠下系统的" + p_getMoney + "" + ub.Get("SiteBz") + ".[br]根据您的帐户数额,实扣" + sMoney + "" + ub.Get("SiteBz") + ".[br]如果您的" + ub.Get("SiteBz") + "不足,系统将您帐户冻结,直到成功扣除为止。[br]" + payview + "(原开奖" + model.p_result_one + ":" + model.p_result_two + "|新开奖" + resultone + ":" + resulttwo + ")";
                                new BCW.BLL.Guest().Add(1, payusid, payusname, strGuess);
                            }
                            else
                            {
                                new BCW.BLL.User().UpdateiMoney(payusid, payusname, -sMoney, "球彩重开奖,扣除已兑奖" + ub.Get("SiteBz2") + "");
                                //发送内线
                                string strGuess = "球彩重开奖,你欠下系统的" + p_getMoney + "" + ub.Get("SiteBz2") + ".[br]根据您的帐户数额,实扣" + sMoney + "" + ub.Get("SiteBz2") + ".[br]如果您的" + ub.Get("SiteBz2") + "不足,系统将您帐户冻结,直到成功扣除为止。[br]" + payview + "(原开奖" + model.p_result_one + ":" + model.p_result_two + "|新开奖" + resultone + ":" + resulttwo + ")";
                                new BCW.BLL.Guest().Add(1, payusid, payusname, strGuess);
                            }
                            //如果币不够扣则记录日志并冻结IsFreeze
                            if (cMoney > 0)
                            {
                                BCW.Model.Gameowe owe = new BCW.Model.Gameowe();
                                owe.Types   = 0;
                                owe.UsID    = payusid;
                                owe.UsName  = payusname;
                                owe.Content = "" + payview + "(原开奖" + model.p_result_one + ":" + model.p_result_two + "|新开奖" + resultone + ":" + resulttwo + ")";
                                owe.OweCent = cMoney;
                                owe.BzType  = bzType;
                                owe.EnId    = gid;
                                owe.AddTime = DateTime.Now;
                                new BCW.BLL.Gameowe().Add(owe);

                                new BCW.BLL.User().UpdateIsFreeze(payusid, 1);
                            }

                            //取消得到的排行
                            TPR.Model.guess.BaOrder objBaOrder = new TPR.Model.guess.BaOrder();
                            objBaOrder.Orderusid   = payusid;
                            objBaOrder.Orderusname = payusname;
                            objBaOrder.Orderfanum  = 0;
                            objBaOrder.Orderjbnum  = -(p_getMoney - payCent);
                            objBaOrder.Orderbanum  = -1;
                            objBaOrder.Orderstats  = pType;
                            new TPR.BLL.guess.BaOrder().UpdateOrder(objBaOrder);
                        }
                    }
                }

                int OnceMin = Convert.ToInt32(ub.GetSub("SiteOnce", xmlPath));//走地时间限制

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

                //取得比分时间段

                string stronce = string.Empty;
                if (ison == 1)
                {
                    stronce = onceTime;

                    if (string.IsNullOrEmpty(stronce))
                    {
                        stronce      = footonce(Convert.ToInt32(model.p_id), Convert.ToDateTime(model.p_TPRtime));
                        model.ID     = gid;
                        model.p_once = stronce;
                        new TPR.BLL.guess.BaList().UpdateOnce(model);
                    }
                    stronce = stronce.Replace("#", "|");
                }


                //更新比分
                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 + "";
                strWhere   = "bcid=" + gid + "";
                if (iType == 2)
                {
                    strWhere   += "and paytimes<='" + oTime + "'";
                    strppWhere += "and paytimes>'" + oTime + "'";
                }


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

                    // 开始查询并更新之
                    IList <TPR.Model.guess.BaPay> listBaPay = new TPR.BLL.guess.BaPay().GetBaPays(1, 8000, strWhere, out recordCount);
                    if (listBaPay.Count > 0)
                    {
                        foreach (TPR.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 (n.PayType <= 4)
                                {
                                    if (!string.IsNullOrEmpty(stronce))
                                    {
                                        string[] Sonce = stronce.Split("|".ToCharArray());

                                        for (int i = 0; i < Sonce.Length; i++)
                                        {
                                            if (Convert.ToDateTime(Sonce[i]).AddSeconds(OnceMin) > Convert.ToDateTime(n.paytimes) && Convert.ToDateTime(Sonce[i]).AddSeconds(-OnceMin) < Convert.ToDateTime(n.paytimes))
                                            {
                                                Iszd = 2;//平盘标识
                                            }
                                        }
                                    }
                                }
                                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 TPR.BLL.guess.BaPay().UpdateCase(n, p_strVal, out p_intDuVal, out p_intWin);
                                        Iszd = 1;//走地模式
                                    }
                                    else if (n.PayType == 3 || n.PayType == 4)
                                    {
                                        new TPR.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqdxCase(n), out p_intDuVal, out p_intWin);
                                    }
                                    else
                                    {
                                        new TPR.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqbzCase(n), out p_intDuVal, out p_intWin);
                                    }
                                }
                            }
                            else
                            {
                                if (n.PayType == 1 || n.PayType == 2)
                                {
                                    new TPR.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqsxCase(n), out p_intDuVal, out p_intWin);
                                }
                                else
                                {
                                    new TPR.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqdxCase(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 TPR.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/guess/caseGuess.aspx]马上兑奖[/url]";
                                        }
                                        else
                                        {
                                            strLog = "" + n.payview + "[br]结果:" + resultone + ":" + resulttwo + ",系统返" + Convert.ToDouble(p_intDuVal) + "" + bzTypes + "[url=/bbs/guess/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 TPR.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 TPR.BLL.guess.BaPay().UpdatePPCase(n);
                                //发送内线
                                if (Convert.ToInt32(n.itypes) == 0)
                                {
                                    //发送内线
                                    string strLog = "" + n.payview + "[br]结果平盘,原因:走地赛事,系统将比分变动前后" + OnceMin + "秒钟的下注作平盘处理,返还" + Convert.ToDouble(n.payCent) + "" + bzTypes + "[url=/bbs/guess/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 <TPR.Model.guess.BaPay> listBaPay = new TPR.BLL.guess.BaPay().GetBaPays(1, 8000, strppWhere, out recordCount);
                    if (listBaPay.Count > 0)
                    {
                        foreach (TPR.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 TPR.BLL.guess.BaPay().UpdatePPCase(n);

                            //发送内线
                            if (Convert.ToInt32(n.itypes) == 0)
                            {
                                //发送内线
                                string strLog = "" + n.payview + "[br]结果平盘,原因:" + pSms + ",系统返还" + Convert.ToDouble(n.payCent) + "" + bzTypes + "[url=/bbs/guess/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_Balist 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 = "";
            if (model.p_result_one != null && model.p_result_two != null)
            {
                strOthe = "确定重开奖,openGuess.aspx,post,1,red";
            }
            else
            {
                strOthe = "确定开奖,openGuess.aspx,post,1,red";
            }

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

            if (model.p_result_one != null && model.p_result_two != null)
            {
                builder.Append(Out.Tab("<div>", "<br />"));
                builder.Append("重要:重开奖系统自动扣回已经兑奖的币并进行新一轮的开奖,如果币不够扣,即自动禁该会员的金融系统并记录<a href=\"" + Utils.getUrl("../default.aspx") + "\">欠币日志</a>");
                builder.Append(Out.Tab("</div>", ""));
            }

            builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr()));
            builder.Append(Out.Tab("<div>", ""));
            if (Utils.GetTopDomain() == "tl88.cc" || Utils.GetTopDomain() == "168yy.cc")
            {
                string stronce = new TPR.BLL.guess.BaList().Getp_temptimes(gid);
                if (stronce != "")
                {
                    builder.Append("走地比分参考:<br />" + stronce.Replace("|", "<br />") + "");
                }
            }
            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 />"));
        }
    }
コード例 #6
0
ファイル: showGuess.aspx.cs プロジェクト: radtek/GitKB288
    protected void Page_Load(object sender, EventArgs e)
    {
        int    ManageId = new BCW.User.Manage().IsManageLogin();
        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, "", "");

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


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

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

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

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

        //删除赛事
        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(Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号删除赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")", gid);

                new TPR.BLL.guess.BaList().Delete(gid);
                if (act == "delok2")
                {
                    TPR.BLL.guess.BaPay bll2 = new TPR.BLL.guess.BaPay();
                    new TPR.BLL.guess.BaPay().Deletebcid(gid);
                }
                Utils.Success("删除赛事", "删除赛事成功..", Utils.getUrl("default.aspx"), "1");
            }
        }

        //转换成走地模式
        else if (act == "once" || act == "onceok")
        {
            if (!Utils.GetDomain().Contains("tl88") && !Utils.GetDomain().Contains("168yy"))
            {
                Utils.Error("不存在的页面", "");
            }

            if (act == "once")
            {
                string p_oncetime = string.Empty;
                if (string.IsNullOrEmpty(model.p_oncetime.ToString()))
                {
                    p_oncetime = DT.FormatDate(Convert.ToDateTime(model.p_TPRtime).AddMinutes(100), 0);
                }
                else
                {
                    p_oncetime = DT.FormatDate(Convert.ToDateTime(model.p_oncetime), 0);
                }

                builder.Append(Out.Tab("<div class=\"title\">", ""));
                builder.Append("确定要转换成走地下注模式吗");
                builder.Append(Out.Tab("</div>", ""));
                string strText = "封盘时间,,";
                string strName = "oncetime,gid,act";
                string strType = "date,hidden,hidden";
                string strValu = "" + p_oncetime + "'" + gid + "'onceok";
                string strEmpt = "false,false,false";
                string strIdea = "/";
                string strOthe = "转换,showGuess.aspx,post,1,red";

                builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe));
                builder.Append(Out.Tab("<div>", " "));
                builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "取消"));
                builder.Append(Out.Tab("</div>", "<br />"));
            }
            else
            {
                DateTime oncetime = Utils.ParseTime(Utils.GetRequest("oncetime", "post", 2, DT.RegexTime, "请正确填写封盘时间"));

                if (Convert.ToDateTime(model.p_TPRtime) > oncetime)
                {
                    Utils.Error("封盘时间应大于开赛时间", "");
                }
                //游戏日志记录
                string[] p_pageArr = { "oncetime", "act", "gid" };
                BCW.User.GameLog.GameLogGetPage(Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号编辑赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")成为走地", gid);

                new TPR.BLL.guess.BaList().FootOnceType(gid, oncetime);
                Utils.Success("转移走地", "转换成功..", Utils.getUrl("showguess.aspx?gid=" + gid + ""), "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
            {
                builder.Append("<br />即时比分:" + model.p_result_temp1 + ":" + model.p_result_temp2 + "");
            }

            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div class=\"text\">", ""));
            builder.Append("〓让球盘〓");
            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 TPR.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 TPR.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 2));
            if (model.p_big_lu != 0)
            {
                builder.Append("<br />〓大小盘〓");
                builder.AppendFormat("<br />" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=3"), "{0}注") + "{1}", new TPR.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 TPR.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 4));
            }
            if (model.p_bzs_lu != 0)
            {
                builder.Append("<br />〓标准盘〓");
                builder.AppendFormat("<br />{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&amp;p=5"), "{1}注"), "主胜(" + Convert.ToDouble(model.p_bzs_lu) + ")", new TPR.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 TPR.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 TPR.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 7));
            }
            builder.Append(Out.Tab("</div>", "<br />"));
            builder.Append(Out.Tab("<div>", ""));

            long PayCents = new TPR.BLL.guess.BaPay().GetBaPayCent(model.ID, Convert.ToInt32(model.p_type));
            builder.Append("" + ub.Get("SiteBz") + "统计:<br />总注数:" + new TPR.BLL.guess.BaPay().GetBaPayNum(model.ID, Convert.ToInt32(model.p_type)) + "/下注额:" + PayCents + "");
            if (model.p_result_one != null && model.p_result_two != null)
            {
                long WinMoney = new TPR.BLL.guess.BaPay().GetBaPaygetMoney("bcid=" + gid + " and Types=0");

                builder.Append("<br />总返彩:" + WinMoney + "/盈利额:" + (PayCents - WinMoney) + "");
            }

            builder.Append("<br />〓管理〓");
            if (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"), "开启抓取"));
            }

            builder.Append("球探网ID:" + model.p_id + "<br />");


            if (model.p_type == 1)
            {
                if (Utils.GetDomain().Contains("tl88") || Utils.GetDomain().Contains("168yy"))
                {
                    if (model.p_ison == 1)
                    {
                        builder.Append("<br />走地状态:走地");
                    }
                    else
                    {
                        builder.Append("<br />走地状态:非走地");
                    }

                    builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&amp;act=once"), "编辑"));
                }
            }
            if (Utils.GetDomain().Contains("kubao") || Utils.GetDomain().Contains("tuhao") || Utils.GetDomain().Contains("th") || Utils.GetDomain().Contains("kb288") || Utils.GetDomain().Contains("127.0.0.6"))
            {
                builder.Append("<br />" + Out.waplink(Utils.getUrl("../forumlog.aspx?act=gamelog&amp;gid=" + gid + "&amp;backurl=" + Utils.PostPage(1) + ""), "操作日志"));
                builder.Append("<br />" + Out.waplink(Utils.getUrl("../forumlog.aspx?act=gameowe&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 />"));
        }
    }