private void PostCase(int meid) { string arrId = ""; arrId = Utils.GetRequest("arrId", "post", 1, "", ""); if (!Utils.IsRegex(arrId.Replace(",", ""), @"^[0-9]\d*$")) { Utils.Error("选择本页兑奖出错", ""); } int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "get", 1, @"^[0-9]\d*$", "0")); string[] strArrId = arrId.Split(",".ToCharArray()); long getwinMoney = 0; long winMoney = 0; for (int i = 0; i < strArrId.Length; i++) { int pid = Convert.ToInt32(strArrId[i]); if (new TPR2.BLL.guess.Super().ExistsIsCase(pid, meid)) { int bcid = new TPR2.BLL.guess.BaPay().Getbcid(pid); new TPR2.BLL.guess.Super().UpdateIsCase(pid); //操作币 winMoney = Convert.ToInt64(new TPR2.BLL.guess.Super().GetgetMoney(pid)); new BCW.BLL.User().UpdateiGold(meid, winMoney, "超级竞猜赛事ID" + bcid + "#记录ID" + pid + "兑奖"); } getwinMoney = getwinMoney + winMoney; } Utils.Success("兑奖", "恭喜,成功兑奖" + getwinMoney + "" + ub.Get("SiteBz") + "", Utils.getUrl("caseGuess.aspx?ptype=" + ptype + ""), "1"); }
private void GetCase(int meid) { int pid = Utils.ParseInt(Utils.GetRequest("pid", "get", 2, @"^[0-9]\d*$", "选择赛事无效")); int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "get", 1, @"^[0-9]\d*$", "0")); if (new TPR2.BLL.guess.BaPay().ExistsIsCase(pid, meid)) { int bcid = new TPR2.BLL.guess.BaPay().Getbcid(pid); new TPR2.BLL.guess.BaPay().UpdateIsCase(pid); //操作币 long win = Convert.ToInt64(new TPR2.BLL.guess.BaPay().Getp_getMoney(pid)); int Types = new TPR2.BLL.guess.BaPay().GetTypes(pid); if (Types == 0) { new BCW.BLL.User().UpdateiGold(meid, win, "竞猜赛事ID" + bcid + "#记录ID" + pid + "兑奖"); Utils.Success("兑奖", "恭喜,成功兑奖" + win + "" + ub.Get("SiteBz") + "", Utils.getUrl("caseGuess.aspx?ptype=" + ptype + ""), "1"); } else { new BCW.BLL.User().UpdateiMoney(meid, win, "竞猜赛事ID" + bcid + "#记录ID" + pid + "兑奖"); Utils.Success("兑奖", "恭喜,成功兑奖" + win + "" + ub.Get("SiteBz2") + "", Utils.getUrl("caseGuess.aspx?ptype=" + ptype + ""), "1"); } } else { Utils.Success("兑奖", "恭喜,重复兑奖或没有可以兑奖的记录", Utils.getUrl("caseGuess.aspx?ptype=" + ptype + ""), "1"); } }
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无效")); if (!new TPR2.BLL.guess.BaList().Exists(gid)) { Utils.Error("不存在的记录", ""); } TPR2.Model.guess.BaPay model = new TPR2.BLL.guess.BaPay().GetModelIsCase(id); if (model == null) { Utils.Error("不存在的记录", ""); } string Content = Utils.GetRequest("Content", "all", 3, @"^[\s\S]{1,200}$", "原因限200字内,可以留空"); 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 TPR2.BLL.guess.BaPay().Delete(id); Utils.Success("撤销押注", "撤销押注并退回本金成功...", Utils.getPage("showguess.aspx?gid=" + gid + ""), "1"); }
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 TPR2.BLL.guess.BaList().Exists(gid)) { Utils.Error("不存在的记录", ""); } TPR2.Model.guess.BaPay model = new TPR2.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 />")); }
private void ReloadPage(int meid) { long gold = new BCW.BLL.User().GetGold(meid); long money = new BCW.BLL.User().GetMoney(meid); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("您现在有" + Utils.ConvertGold(gold) + "" + ub.Get("SiteBz") + "/" + Utils.ConvertGold(money) + "" + ub.Get("SiteBz2") + ""); builder.Append(Out.Tab("</div>", "")); int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "get", 1, @"^[0-2]$", "0")); builder.Append(Out.Tab("<div class=\"text\">", "<br />")); if (ptype == 0) { builder.Append("全部 "); } else { builder.Append(Out.waplink(Utils.getUrl("caseGuess.aspx?ptype=0"), "全部") + " "); } if (ptype == 1) { builder.Append("足球 "); } else { builder.Append(Out.waplink(Utils.getUrl("caseGuess.aspx?ptype=1"), "足球") + " "); } if (ptype == 2) { builder.Append("篮球 "); } else { builder.Append(Out.waplink(Utils.getUrl("caseGuess.aspx?ptype=2"), "篮球") + " "); } builder.Append(Out.Tab("</div>", "<br />")); int pageSize = 10; int pageIndex; int recordCount; string[] pageValUrl = { "ptype" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //组合条件 string strWhere = ""; strWhere += "p_active>0 and itypes=0 "; if (ptype != 0) { strWhere += " and ptype=" + ptype + ""; } strWhere += " and payusid=" + meid + " and p_case=0 and p_getMoney > 0"; // 开始读取竞猜 string arrId = ""; IList <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(pageIndex, pageSize, strWhere, out recordCount); if (listBaPay.Count > 0) { int k = 1; foreach (TPR2.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"); } if (n.p_active == 2) { builder.AppendFormat("{0},平盘<br />时间:{1}", Out.SysUBB(n.payview), n.paytimes); builder.AppendFormat(" 返{0}" + bzType + "," + Out.waplink(Utils.getUrl("caseGuess.aspx?ptype=" + ptype + "&act=get&pid=" + n.ID + ""), "兑奖") + "", Convert.ToDouble(n.p_getMoney)); } else { builder.AppendFormat("{0},结果{1}:{2}<br />时间:{3}", Out.SysUBB(n.payview), n.p_result_one, n.p_result_two, n.paytimes); builder.AppendFormat(" 赢{0}" + bzType + "," + Out.waplink(Utils.getUrl("caseGuess.aspx?ptype=" + ptype + "&act=get&pid=" + n.ID + ""), "兑奖") + "", Convert.ToDouble(n.p_getMoney)); } builder.Append(Out.Tab("</div>", "")); arrId = arrId + " " + n.ID; k++; } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } if (!string.IsNullOrEmpty(arrId)) { builder.Append(Out.Tab("", "<br />")); arrId = arrId.Trim(); arrId = arrId.Replace(" ", ","); string strName = "arrId,act"; string strValu = "" + arrId + "'post"; string strOthe = "本页兑奖,caseGuess.aspx,post,0,red"; builder.Append(Out.wapform(strName, strValu, strOthe)); builder.Append(Out.Tab("", "<br />")); } }
protected void Page_Load(object sender, EventArgs e) { //会员身份页面取会员实体 int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } long gold = new BCW.BLL.User().GetGold(meid); long money = new BCW.BLL.User().GetMoney(meid); int gid = Utils.ParseInt(Utils.GetRequest("gid", "all", 2, @"^[0-9]*$", "竞猜ID无效")); string p = Utils.GetRequest("p", "all", 2, @"^\d\d$|^5z$|^5k$|^ot$", "选择无效"); TPR2.BLL.guess.BaList BaListbll = new TPR2.BLL.guess.BaList(); TPR2.Model.guess.BaList modelBaList = BaListbll.GetModel(gid); if (modelBaList == null) { Utils.Error("不存在的记录", ""); } if (modelBaList.p_del == 1) { Utils.Error("不存在的记录", ""); } //联赛限制显示 string Levens = ""; if (modelBaList.p_type == 1) { Levens = "#" + ub.GetSub("SiteLeven1", xmlPath) + "#" + ub.GetSub("SiteLeven2", xmlPath) + "#" + ub.GetSub("SiteLeven3", xmlPath) + "#" + ub.GetSub("SiteLeven4", xmlPath) + "#"; } else { Levens = "#" + ub.GetSub("SiteLevenb1", xmlPath) + "#" + ub.GetSub("SiteLevenb2", xmlPath) + "#" + ub.GetSub("SiteLevenb3", xmlPath) + "#" + ub.GetSub("SiteLevenb4", xmlPath) + "#"; } if (!Levens.Contains("#" + modelBaList.p_title + "#")) { Utils.Error("联赛“" + modelBaList.p_title + "”尚未设置,请联系<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=10086") + "\">客服</a>申诉,谢谢", ""); } //-------------------------------------------------------------- if (string.IsNullOrEmpty(modelBaList.p_score)) { Utils.Error("不存在的波胆盘或已关闭波胆投注", ""); } //根据P值得到比分和赔率 string bf = ""; string pl = ""; string[] score = modelBaList.p_score.Split(','); for (int i = 0; i < score.Length; i++) { string[] Temp = score[i].Split('|'); if (Temp[0].Replace(":", "") == p) { bf = Temp[0]; pl = Temp[1]; break; } } if (pl == "-1") { Utils.Error("此波胆暂无数据", ""); } //-------------------------------------------------------------- Master.Title = modelBaList.p_one + "VS" + modelBaList.p_two + ""; string ac = Utils.GetRequest("ac", "post", 1, "", ""); if (ac != "") { #region 注确认 //判断金额是否够了 int types = 0; int payCent = 0; string BzText = ""; if (Utils.ToSChinese(ac) == ub.Get("SiteBz2") + "下注") { payCent = Utils.ParseInt(Utils.GetRequest("payCent", "post", 2, @"^[1-9]\d*$", "下注无效")); if (money < Convert.ToInt64(payCent)) { Utils.Error("你的" + ub.Get("SiteBz2") + "不够此次下注", ""); } types = 1; BzText = ub.Get("SiteBz2"); } else { if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { if (Utils.ToSChinese(ac) == "50万") { payCent = 500000; } else if (Utils.ToSChinese(ac) == "100万") { payCent = 1000000; } else if (Utils.ToSChinese(ac) == "200万") { payCent = 2000000; } else if (Utils.ToSChinese(ac) == "500万") { payCent = 5000000; } else { payCent = Utils.ParseInt(Utils.GetRequest("payCent", "post", 2, @"^[1-9]\d*$", "下注无效")); } } else { if (Utils.ToSChinese(ac) == "100万") { payCent = 1000000; } else if (Utils.ToSChinese(ac) == "200万") { payCent = 2000000; } else if (Utils.ToSChinese(ac) == "500万") { payCent = 5000000; } else if (Utils.ToSChinese(ac) == "1000万") { payCent = 10000000; } else { payCent = Utils.ParseInt(Utils.GetRequest("payCent", "post", 2, @"^[1-9]\d*$", "下注无效")); } } if (gold < Convert.ToInt64(payCent)) { Utils.Error("你的" + ub.Get("SiteBz") + "不够此次下注", ""); } types = 0; BzText = ub.Get("SiteBz"); } if (modelBaList.p_TPRtime <= DateTime.Now) { Utils.Error("开赛时间已到,暂停下注", ""); } if (modelBaList.p_result_temp1 != null && modelBaList.p_result_temp2 != null && modelBaList.p_result_temp1 != 0 && modelBaList.p_result_temp2 != 0) { Utils.Error("开赛时间已到,暂停下注!", ""); } if (modelBaList.p_isondel == 1) { Utils.Error("已封盘,暂停下注", ""); } if (types == 1) { if (payCent < Convert.ToInt64(ub.GetSub("SiteSmallPay3", xmlPath)) || payCent > Convert.ToInt64(ub.GetSub("SiteBigPay3", xmlPath))) { Utils.Error("" + ub.Get("SiteBz2") + "金额限" + ub.GetSub("SiteSmallPay3", xmlPath) + "-" + ub.GetSub("SiteBigPay3", xmlPath) + "" + ub.Get("SiteBz2") + "", ""); } //每场每ID下注额 long setPayCents = Utils.ParseInt64(ub.GetSub("SiteIDMaxPay", xmlPath)); if (setPayCents != 0) { long myPayCents = new TPR2.BLL.guess.BaPay().GetBaPaypayCent("bcid=" + gid + " and pType=" + Convert.ToInt32(modelBaList.p_type) + " and payusid=" + meid + " and Types=1"); if (myPayCents + Convert.ToInt64(payCent) > setPayCents) { if (myPayCents >= setPayCents) { Utils.Error("系统限制本场每ID下注上限" + setPayCents + "" + ub.Get("SiteBz2") + ",欢迎在下场下注", ""); } else { Utils.Error("系统限制本场每ID下注上限" + setPayCents + "" + ub.Get("SiteBz2") + ",你现在最多可以下注" + (setPayCents - myPayCents) + "" + ub.Get("SiteBz2") + "", ""); } } } } if (types == 0) { //此波胆还可以下注多少 long MaxCent = Utils.ParseInt64(ub.GetSub("SiteScore" + p + "", xmlPath)); if (MaxCent > 0) { int getp = ScoreType(p); long Cent = new TPR2.BLL.guess.BaPay().GetBaPayCent2(gid, Convert.ToInt32(modelBaList.p_type), getp); if (Cent + Convert.ToInt64(payCent) > MaxCent) { if (Cent >= MaxCent) { Utils.Error("此波胆下注上限" + MaxCent + "" + ub.Get("SiteBz") + ",欢迎在下场下注", ""); } else { Utils.Error("此波胆下注上限" + MaxCent + "" + ub.Get("SiteBz") + ",你现在最多可以下注" + (MaxCent - Cent) + "" + ub.Get("SiteBz") + "", ""); } } } //每场每ID下注额 long setPayCents = Utils.ParseInt64(ub.GetSub("SitePayCent", xmlPath)); if (setPayCents != 0) { long myPayCents = new TPR2.BLL.guess.BaPay().GetBaPayCent(gid, Convert.ToInt32(modelBaList.p_type), meid); if (myPayCents + Convert.ToInt64(payCent) > setPayCents) { if (myPayCents >= setPayCents) { Utils.Error("系统限制本场每ID下注上限" + setPayCents + "" + ub.Get("SiteBz") + ",欢迎在下场下注", ""); } else { Utils.Error("系统限制本场每ID下注上限" + setPayCents + "" + ub.Get("SiteBz") + ",你现在最多可以下注" + (setPayCents - myPayCents) + "" + ub.Get("SiteBz") + "", ""); } } } } //组合显示串 string payview = ""; payview += "[url=/bbs/guess2/showguess.aspx?gid=" + gid + "]" + modelBaList.p_one + "VS" + modelBaList.p_two + "[/url]"; payview += "压波胆" + ScoreType3(bf) + "(" + pl + "倍),投" + payCent + "" + BzText + ""; //支付安全提示 string[] p_pageArr = { "ac", "gid", "payCent", "p" }; BCW.User.PaySafe.PaySafePage(meid, Utils.getPageUrl(), p_pageArr); //是否刷屏 long small = Convert.ToInt64(ub.GetSub("SiteSmallPay", xmlPath)); long big = Convert.ToInt64(ub.GetSub("SiteBigPay", xmlPath)); string appName = "LIGHT_GUESS"; int Expir = Utils.ParseInt(ub.GetSub("SiteExpir", xmlPath)); BCW.User.Users.IsFresh(appName, Expir, Convert.ToInt64(payCent), small, big); //写入bapay string mename = new BCW.BLL.User().GetUsName(meid); TPR2.Model.guess.BaPay model = new TPR2.Model.guess.BaPay(); model.Types = types; model.payview = payview; model.payusid = meid; model.payusname = mename; model.bcid = gid; model.pType = modelBaList.p_type; model.PayType = ScoreType(p); model.payCent = payCent; model.payonLuone = Convert.ToDecimal(pl); model.payonLutwo = 0; model.payonLuthr = 0; model.p_pk = 0; modelBaList.p_dx_pk = 0; model.p_dx_pk = 0; model.p_pn = 0; model.paytimes = DateTime.Now; model.p_result_temp1 = 0; model.p_result_temp2 = 0; model.itypes = 0; model.state = 0; model.p_TPRtime = Convert.ToDateTime(modelBaList.p_TPRtime); model.p_oncetime2 = DateTime.Parse("1990-1-1"); int pid = new TPR2.BLL.guess.BaPay().Add(model); //操作币 if (types == 0) { new BCW.BLL.User().UpdateiGold(meid, -Convert.ToInt64(payCent), "球彩下注记录" + gid + "-" + pid + "|" + payview); } else { new BCW.BLL.User().UpdateiMoney(meid, -Convert.ToInt64(payCent), "球彩下注记录" + gid + "-" + pid + "|" + payview); } // 活跃抽奖入口_20160621姚志光 try { //表中存在虚拟球类记录 if (new BCW.BLL.tb_WinnersGame().ExistsGameName("虚拟球类")) { //投注是否大于设定的限额,是则有抽奖机会 if (payCent > new BCW.BLL.tb_WinnersGame().GetPrice("虚拟球类")) { string TextForUbb = (ub.GetSub("TextForUbb", "/Controls/winners.xml")); //设置内线提示的文字 string WinnersGuessOpen = (ub.GetSub("WinnersGuessOpen", "/Controls/winners.xml")); //1发内线2不发内线 int hit = new BCW.winners.winners().CheckActionForAll(1, pid, meid, mename, "球彩", 3); if (hit == 1) { //内线开关 1开 if (WinnersGuessOpen == "1") { //发内线到该ID new BCW.BLL.Guest().Add(0, meid, mename, TextForUbb); } } } } } catch { } string TzMaxGuest = "#" + ub.GetSub("SiteTzMaxGuest", xmlPath) + "#"; if (!TzMaxGuest.Contains("#" + gid + "#")) { long gidPrices = new TPR2.BLL.guess.BaPay().GetBaPayCent(gid, Convert.ToInt32(modelBaList.p_type)); if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { if (gidPrices >= 5000000) { new BCW.BLL.Guest().Add(10086, "10086", "球赛ID:" + gid + "超5百W,请检查"); ub xml = new ub(); xml.ReloadSub(xmlPath); //加载配置 xml.dss["SiteTzMaxGuest"] = xml.dss["SiteTzMaxGuest"] + "#" + gid; System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8); } } else if (Utils.GetTopDomain().Contains("kb288.net")) { if (gidPrices >= 50000) { new BCW.BLL.Guest().Add(10086, "10086", "球赛ID:" + gid + "超5W,请检查"); new BCW.BLL.Guest().Add(1, "1", "球赛ID:" + gid + "超5W,请检查"); new BCW.BLL.Guest().Add(2, "2", "球赛ID:" + gid + "超5W,请检查"); ub xml = new ub(); xml.ReloadSub(xmlPath); //加载配置 xml.dss["SiteTzMaxGuest"] = xml.dss["SiteTzMaxGuest"] + "#" + gid; System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8); } } else { if (gidPrices >= 2000000) { //new BCW.BLL.Guest().Add(10086, "客服", "[url=/bbs/guess2/showguess.aspx?gid=" + gid + "]" + modelBaList.p_one + "VS" + modelBaList.p_two + "[/url]达200w,请检查"); //new BCW.BLL.Guest().Add(1010, "客服", "[url=/bbs/guess2/showguess.aspx?gid=" + gid + "]" + modelBaList.p_one + "VS" + modelBaList.p_two + "[/url]达200w,请检查"); new BCW.BLL.Guest().Add(10086, "10086", "球赛ID:" + gid + "超2百W,请检查"); //if (!Utils.GetTopDomain().Contains("tuhao") && !Utils.GetTopDomain().Contains("th")) //{ // new BCW.BLL.Guest().Add(1010, "1010", "球赛ID:" + gid + "超2百W,请检查"); //} ub xml = new ub(); xml.ReloadSub(xmlPath); //加载配置 xml.dss["SiteTzMaxGuest"] = xml.dss["SiteTzMaxGuest"] + "#" + gid; System.IO.File.WriteAllText(Server.MapPath(xmlPath), xml.Post(xml.dss), System.Text.Encoding.UTF8); } } } string wText = "[url=/bbs/uinfo.aspx?uid=" + meid + "]" + mename + "[/url]在[url=/bbs/guess2/default.aspx]球彩[/url]:[url=/bbs/guess2/showguess.aspx?gid=" + gid + "]" + modelBaList.p_one + "VS" + modelBaList.p_two + "[/url]下注**" + BzText + ""; new BCW.BLL.Action().Add(5, 0, meid, "", wText); Utils.Success("下注", "恭喜,下注成功..", Utils.getUrl("showGuess.aspx?act=score&gid=" + gid + ""), "1"); #endregion } else { #region 注 builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("波胆盘" + ScoreType3(bf) + "(" + pl + "倍)含本金"); builder.Append(Out.Tab("</div>", "")); string strText = "输入,,"; string strName = "payCent,gid,p"; string strType = "num,hidden,hidden"; string strValu = "'" + gid + "'" + p + ""; string strEmpt = "true,true,true"; string strIdea = "/限" + ub.GetSub("SiteSmallPay", xmlPath) + "-" + ub.GetSub("SiteBigPay", xmlPath) + "" + ub.Get("SiteBz") + "/"; //此波胆还可以下注多少 long MaxCent = Utils.ParseInt64(ub.GetSub("SiteScore" + p + "", xmlPath)); if (MaxCent > 0) { int getp = ScoreType(p); long Cent = new TPR2.BLL.guess.BaPay().GetBaPayCent2(gid, Convert.ToInt32(modelBaList.p_type), getp); strIdea += "提示:此波胆还可以下注" + (MaxCent - Cent) + "" + ub.Get("SiteBz") + "/"; } string strOthe = "" + ub.Get("SiteBz") + "下注|" + ub.Get("SiteBz2") + "下注,payGuess2.aspx,post,0,red|blue"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div>", "<br />")); builder.Append("=" + ub.Get("SiteBz") + "快捷下注="); builder.Append(Out.Tab("</div>", "<br />")); //快捷下注 strText = ",,"; strName = "gid,p"; strType = "hidden,hidden,hidden"; strValu = "" + gid + "'" + p + ""; strEmpt = "true,true"; strIdea = ""; if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { strOthe = "50万|100万|200万|500万,payGuess2.aspx,post,3,other|other|other|other"; } else { strOthe = "100万|200万|500万|1000万,payGuess2.aspx,post,3,other|other|other|other"; } builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); builder.Append(Out.Tab("<div class=\"text\">", "<br />")); builder.Append("您现在有" + Utils.ConvertGold(gold) + "" + ub.Get("SiteBz") + "/" + Utils.ConvertGold(money) + "" + ub.Get("SiteBz2") + "<br />"); builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "取消下注")); builder.Append(Out.Tab("</div>", "")); #endregion } builder.Append(Out.Tab("<div>", Out.Hr())); builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=1"), "未开投注") + " "); builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=2"), "历史投注") + "<br />"); builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "返回球彩首页") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append(Out.waplink(Utils.getUrl("/default.aspx"), "首页") + "-"); builder.Append(Out.waplink(Utils.getPage("default.aspx"), "上级") + "-"); builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "球彩") + ""); builder.Append(Out.Tab("</div>", "")); }
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 TPR2.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 TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPaypayCent("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPaygetMoney("isrobot=0 and 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 TPR2.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 TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPaypayCent("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPaygetMoney("isrobot=0 and 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 TPR2.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 TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and ptype=" + ptype + " and Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_active<>0"); bmwinNum = new TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and ptype=" + ptype + " and Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_getMoney>0 and p_active<>0"); bmzsCent = new TPR2.BLL.guess.BaPay().GetBaPaypayCent("isrobot=0 and ptype=" + ptype + " and Year(paytimes) = " + (DateTime.Now.Year) + " AND Month(paytimes) = " + (DateTime.Now.Month) + " and p_active<>0"); bmwinCent = new TPR2.BLL.guess.BaPay().GetBaPaygetMoney("isrobot=0 and 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 TPR2.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 TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPaypayCent("isrobot=0 and 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 TPR2.BLL.guess.BaPay().GetBaPaygetMoney("isrobot=0 and 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 TPR2.BLL.guess.BaList().GetBaListCount("p_type=" + ptype + " and p_active<>0"); zsNum = new TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and ptype=" + ptype + " and p_active<>0"); winNum = new TPR2.BLL.guess.BaPay().GetBaPayCount("isrobot=0 and ptype=" + ptype + " and p_getMoney>0 and p_active<>0"); zsCent = new TPR2.BLL.guess.BaPay().GetBaPaypayCent("isrobot=0 and ptype=" + ptype + " and p_active<>0"); winCent = new TPR2.BLL.guess.BaPay().GetBaPaygetMoney("isrobot=0 and 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"), ">串串数据分析")); builder.Append(Out.Tab("</div>", "")); } else if (showtype == 1) { //统计今天 int todayzsNum2, todaywinNum2; long todayzsCent2, todaywinCent2; todayzsNum2 = new TPR2.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 TPR2.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 TPR2.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 TPR2.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 TPR2.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 TPR2.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 TPR2.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 TPR2.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 TPR2.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and Status<>0"); bmwinNum2 = new TPR2.BLL.guess.Super().GetSuperCount("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and getMoney>0 and Status<>0"); bmzsCent2 = new TPR2.BLL.guess.Super().GetSuperpayCent("Year(AddTime) = " + (DateTime.Now.Year) + " AND Month(AddTime) = " + (DateTime.Now.Month) + " and Status<>0"); bmwinCent2 = new TPR2.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 TPR2.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 TPR2.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 TPR2.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 TPR2.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 TPR2.BLL.guess.Super().GetSuperCount("Status<>0"); winNum2 = new TPR2.BLL.guess.Super().GetSuperCount("getMoney>0 and Status<>0"); zsCent2 = new TPR2.BLL.guess.Super().GetSuperpayCent("Status<>0"); winCent2 = new TPR2.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"), ">普通数据分析")); 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 TPR2.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 TPR2.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"), ">未结束赛事下注额TOP10")); } else { builder.Append(Out.waplink(Utils.getUrl("stats.aspx?showtype=2"), ">未结束赛事下注数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 />")); }
protected void Page_Load(object sender, EventArgs e) { Master.Title = ub.GetSub("SiteName", xmlPath); DataSet ds = null; int meid = new BCW.User.Users().GetUsId(); int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "get", 1, @"^[0-9]\d*$", "0")); int showtype = Utils.ParseInt(Utils.GetRequest("showtype", "get", 1, @"^[0-1]$", "0")); int sp = Utils.ParseInt(Utils.GetRequest("sp", "get", 1, @"^[0-1]$", "0")); string fly = ""; if (ptype == 4) { fly = Out.UBB(Utils.GetRequest("fly", "get", 2, @"^.+?$", "请选择联赛")); } #region 页面logo if (ub.GetSub("SiteLogo", xmlPath) != "") { builder.Append(Out.Tab("<div>", "")); builder.Append("<img src=\"" + ub.GetSub("SiteLogo", xmlPath) + "\" alt=\"load\"/>"); builder.Append(Out.Tab("</div>", "<br />")); } if (ub.GetSub("Sitevice", xmlPath) != "") { builder.Append(Out.Tab("<div>", "")); builder.Append(Out.SysUBB(ub.GetSub("Sitevice", xmlPath))); builder.Append(Out.Tab("</div>", "<br />")); } #endregion #region 拾物随机 //拾物随机 builder.Append(BCW.User.Game.GiftFlows.ShowGiftFlows(4)); #endregion #region 顶部导航 if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { #region 土豪网的表头导航 builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("/bbs/game/default.aspx") + "\">游戏大厅</a>>球彩"); builder.Append("><a href=\"" + Utils.getUrl("default.aspx") + "\">半单</a>"); builder.Append(Out.Tab("</div>", "<br />")); long gold = new BCW.BLL.User().GetGold(meid); builder.Append(Out.Tab("<div>", "")); builder.Append("您现在有" + Utils.ConvertGold(gold) + "" + ub.Get("SiteBz") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("【全场赛事】<a href=\"" + Utils.getUrl("default.aspx?ptype=" + ptype + "&fly=" + fly + "") + "\">刷新</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append(""); builder.Append("<b><a href=\"" + Utils.getUrl("default.aspx?showtype=1") + "\">全场</a></b>:"); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=1") + "\">足球</a>."); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=2") + "\">篮球</a>."); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=3") + "\">联赛</a>."); builder.Append("<a href=\"" + Utils.getUrl("kzlist.aspx") + "\">个庄</a>."); builder.Append("<a href=\"" + Utils.getUrl("caseGuess.aspx") + "\">兑奖</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=5") + "\">" + ub.Get("SiteGqText") + "</a>."); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=6") + "\">波胆</a>."); builder.Append("<a href=\"" + Utils.getUrl("betsuper.aspx") + "\">串关</a>."); builder.Append("<a href=\"" + Utils.getUrl("live.aspx") + "\">赛果</a>."); builder.Append("<a href=\"" + Utils.getUrl("live.aspx?act=16") + "\">NBA直播</a> "); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<b><a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=7") + "\">半单</a></b>:"); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=8") + "\">足半</a>."); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=9") + "\">篮半</a>."); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=10") + "\">篮单</a>."); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=3") + "\">联赛</a>."); builder.Append("<a href=\"" + Utils.getUrl("caseGuess.aspx") + "\">兑奖</a>"); builder.Append(Out.Tab("</div>", "")); #endregion } else { #region 表头导航 builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("/bbs/game/default.aspx") + "\">游戏大厅</a>>"); builder.Append("<a href=\"" + Utils.getUrl("/bbs/guess2/default.aspx") + "\">全场</a>>"); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=7") + "\">半单</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<b>体育球彩全场竞猜</b>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">全部</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=1") + "\">足球</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=2") + "\">篮球</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=5") + "\">" + ub.Get("SiteGqText") + "</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?ptype=" + ptype + "&fly=" + fly + "") + "\">刷新</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=6") + "\">波胆</a> "); builder.Append("<a href=\"" + Utils.getUrl("betsuper.aspx") + "\">串关</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=3") + "\">联赛</a> "); //builder.Append("<a href=\"" + Utils.getUrl("/default.aspx?id=13088") + "\">资讯</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=7") + "\">半单</a> "); builder.Append("<a href=\"" + Utils.getUrl("caseGuess.aspx") + "\">兑奖</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("kzlist.aspx") + "\">个人庄</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?sp=1") + "\">NBA</a> "); //builder.Append("<a href=\"" + Utils.getUrl("live.aspx") + "\">即时比分</a> "); builder.Append("<a href=\"" + Utils.getUrl("live.aspx?act=16") + "\">NBA直播</a> "); builder.Append(Out.Tab("</div>", "")); #endregion } #endregion #region 分页参数 暂未知 p_ison=1 and p_isondel=0的意思 int pageSize = 0; if (showtype == 1) { pageSize = Convert.ToInt32(ub.Get("SiteListNo")); } else { if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { pageSize = 6; } else { pageSize = 5; } } int pageIndex; int recordCount; string strDay = ""; string strWhere = ""; string strOrder = ""; string[] pageValUrl = { "showtype", "ptype", "fly" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } #endregion #region 读取循环 暂未知 p_ison=1 and p_isondel=0的意思 默认的分类 ptype == 0 && showtype==0 //默认的分类 ptype == 0 && showtype==0 if (ptype == 0 && showtype == 0) { #region 土豪的竞猜连接顶部 if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); builder.Append("" + ub.Get("SiteGqText") + "赛事--"); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=5") + "\">更多>></a>"); builder.Append(Out.Tab("</div>", "")); } #endregion #region SQL //读取的SQL strWhere = "p_active=0 and p_del=0 and p_ison=1 and p_isondel=0 and p_basketve=0"; if (sp == 1) { strWhere += " AND p_title LIKE '%NBA%'"; } strOrder = "p_TPRtime ASC,ID ASC"; #endregion #region 开始读取竞猜表 // 开始读取竞猜表 tb_TBaList 按 p_TPRtime 时间排列 IList <TPR2.Model.guess.BaList> listBaList = new TPR2.BLL.guess.BaList().GetBaLists(pageIndex, pageSize, strWhere, strOrder, out recordCount); if (listBaList.Count > 0) { #region 循环 int k = 1; foreach (TPR2.Model.guess.BaList n in listBaList) { if (k % 2 == 0) { builder.Append(Out.Tab("<div>", "<br />")); } else { builder.Append(Out.Tab("<div>", "<br />")); } if (DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日").ToString() != strDay.ToString()) { builder.Append(DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日") + "<br />"); } string Sonce = string.Empty; string VS = "VS"; string hp_one = ""; string hp_two = ""; if (n.p_ison == 1) { Sonce = "(" + ub.Get("SiteGqText") + ")"; if (n.p_result_temp1 == null && n.p_result_temp2 == null) { VS = "(0-0)"; } else { VS = "(" + n.p_result_temp1 + "-" + n.p_result_temp2 + ")"; } if (n.p_type == 1) { if (n.p_hp_one > 0) { hp_one = "<img src=\"/Files/sys/guess/redcard" + n.p_hp_one + ".gif\" alt=\"红" + n.p_hp_one + "\"/>"; } if (n.p_hp_two > 0) { hp_two = "<img src=\"/Files/sys/guess/redcard" + n.p_hp_two + ".gif\" alt=\"红" + n.p_hp_two + "\"/>"; } } } string actUrl = string.Empty; if (ptype == 6) { actUrl = "act=score&"; } builder.AppendFormat("<a href=\"" + Utils.getUrl("showGuess.aspx?" + actUrl + "gid={0}&backurl=" + Utils.PostPage(1) + "") + "\">{1}[{2}]{3}" + hp_one + "" + VS + "{4}" + hp_two + "{5}</a>", n.ID, DT.FormatDate(Convert.ToDateTime(n.p_TPRtime), 13), n.p_title, n.p_one, n.p_two, Sonce); builder.Append("" + Convertp_once(n.p_once) + "" + Out.waplink(Utils.getUrl("showGuess.aspx?act=analysis&gid=" + n.ID + "&backurl=" + Utils.PostPage(1) + ""), "[析]")); builder.Append(Out.Tab("</div>", "")); strDay = DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日").ToString(); k++; } #endregion #region 分页 if (!Utils.GetTopDomain().Contains("tuhao") && !Utils.GetTopDomain().Contains("th")) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); builder.Append("<b><a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=5") + "\">更多滚球竞猜记录>></a></b>"); builder.Append(Out.Tab("</div>", "")); } #endregion } #endregion } #endregion builder.Append(Out.Tab("", "<br />")); #region 土豪的导航 if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { builder.Append(Out.Tab("<div class=\"text\">", "")); if (ptype == 1) { builder.Append("足球赛事--"); } else if (ptype == 2) { builder.Append("篮球赛事--"); } else if (ptype == 3) { builder.Append("联赛列表--"); } else if (ptype == 5) { builder.Append("" + ub.Get("SiteGqText") + "赛事--"); } else if (ptype == 6) { builder.Append("波胆赛事--"); } else { builder.Append("未开赛事--"); } if (showtype == 0) { builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1") + "\">更多>></a>"); } else { builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\"><<返回</a>"); } builder.Append(Out.Tab("</div>", "<br />")); } #endregion #region 非土豪网,分页数量 if (!Utils.GetTopDomain().Contains("tuhao") && !Utils.GetTopDomain().Contains("th")) { if (showtype == 0) { pageSize = 6; } } #endregion if (ptype != 3) { #region 类型不等于3的时候显示列表 ptype != 3 strDay = ""; if (ptype > 0 && ptype < 4) { strWhere = "p_type=" + ptype + " and p_active=0 and p_del=0 and (p_TPRtime >= '" + System.DateTime.Now + "' OR (p_ison=1 and p_isondel=0)) and p_basketve=0"; } else if (ptype == 4) { strWhere = "p_active=0 and p_del=0 and p_TPRtime >= '" + System.DateTime.Now + "' and p_title like '%" + fly + "'"; } else if (ptype == 5) { strWhere = "p_active=0 and p_del=0 and p_ison=1 and p_isondel=0 and p_basketve=0"; } else if (ptype == 6) { strWhere = "p_active=0 and p_del=0 and p_TPRtime >= '" + System.DateTime.Now + "' and p_score IS NOT NULL AND p_score<>''"; } else if (ptype == 7) { strWhere = "p_active=0 and p_del=0 and (p_TPRtime >= '" + System.DateTime.Now + "' OR (p_ison=1 and p_isondel=0)) and p_basketve>0"; } else if (ptype == 8) { strWhere = "p_active=0 and p_del=0 and (p_TPRtime >= '" + System.DateTime.Now + "' OR (p_ison=1 and p_isondel=0)) and p_basketve=9"; } else if (ptype == 9) { strWhere = "p_active=0 and p_del=0 and (p_TPRtime >= '" + System.DateTime.Now + "') and p_basketve=3"; } else if (ptype == 10) { strWhere = "p_active=0 and p_del=0 and (p_TPRtime >= '" + System.DateTime.Now + "') and p_basketve>0 and p_basketve<9 and p_basketve<>3 "; } else { strWhere = "p_active=0 and p_del=0 and p_TPRtime >= '" + System.DateTime.Now + "' and p_basketve=0"; } if (sp == 1) { strWhere += " AND p_title LIKE '%NBA%'"; } strOrder = "p_TPRtime ASC,ID ASC"; #endregion #region 开始读取竞猜 列表 // 开始读取竞猜 IList <TPR2.Model.guess.BaList> listBaList = new TPR2.BLL.guess.BaList().GetBaLists(pageIndex, pageSize, strWhere, strOrder, out recordCount); if (listBaList.Count > 0) { int k = 1; foreach (TPR2.Model.guess.BaList n in listBaList) { if (k % 2 == 0) { builder.Append(Out.Tab("<div>", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", "<br />")); } } if (DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日").ToString() != strDay.ToString()) { builder.Append(DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日") + "<br />"); } string Sonce = string.Empty; string VS = "VS"; string hp_one = ""; string hp_two = ""; string p_once = ""; if (n.p_ison == 1 && (ptype == 5 || showtype == 1)) { Sonce = "(" + ub.Get("SiteGqText") + ")"; if (n.p_result_temp1 == null && n.p_result_temp2 == null) { VS = "(0-0)"; } else { VS = "(" + n.p_result_temp1 + "-" + n.p_result_temp2 + ")"; } if (n.p_type == 1) { if (n.p_hp_one > 0) { hp_one = "<img src=\"/Files/sys/guess/redcard" + n.p_hp_one + ".gif\" alt=\"红" + n.p_hp_one + "\"/>"; } if (n.p_hp_two > 0) { hp_two = "<img src=\"/Files/sys/guess/redcard" + n.p_hp_two + ".gif\" alt=\"红" + n.p_hp_two + "\"/>"; } } p_once = Convertp_once(n.p_once); } string actUrl = string.Empty; if (ptype == 6) { actUrl = "act=score&"; } builder.AppendFormat("<a href=\"" + Utils.getUrl("showGuess.aspx?" + actUrl + "gid={0}&backurl=" + Utils.PostPage(1) + "") + "\">{1}[{2}]{3}" + VS + "{4}{5}</a>", n.ID, DT.FormatDate(Convert.ToDateTime(n.p_TPRtime), 13), n.p_title, n.p_one, n.p_two, Sonce); builder.Append("" + p_once + "" + Out.waplink(Utils.getUrl("showGuess.aspx?act=analysis&gid=" + n.ID + "&backurl=" + Utils.PostPage(1) + ""), "[析]")); builder.Append(Out.Tab("</div>", "")); strDay = DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日").ToString(); k++; } // 分页 if (showtype == 1) { builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } } else { builder.Append(Out.Div("div", "没有相关记录..")); } #endregion #region 土豪网更多精彩连接 if (!Utils.GetTopDomain().Contains("tuhao") && !Utils.GetTopDomain().Contains("th")) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); if (ptype >= 7) { builder.Append("<b><a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=7") + "\">更多半场单节记录>></a></b>"); } else { builder.Append("<b><a href=\"" + Utils.getUrl("default.aspx?showtype=1") + "\">更多全场竞猜记录>></a></b>"); } builder.Append(Out.Tab("</div>", "")); } #endregion } else { #region 类型等于3时 SQL string strLXWhere = "p_active=0 and p_del=0 and p_TPRtime >= '" + System.DateTime.Now + "'"; #endregion #region 开始读取竞猜 // 开始读取竞猜 IList <TPR2.Model.guess.BaList> listBaListLX = new TPR2.BLL.guess.BaList().GetBaListLX(pageIndex, pageSize, strLXWhere, out recordCount); if (listBaListLX.Count > 0) { int k = 1; foreach (TPR2.Model.guess.BaList n in listBaListLX) { if (k % 2 == 0) { builder.Append(Out.Tab("<div>", "<br />")); } else { if (k == 1) { builder.Append(Out.Tab("<div>", "")); } else { builder.Append(Out.Tab("<div>", "<br />")); } } builder.AppendFormat("<a href=\"" + Utils.getUrl("default.aspx?ptype=4&showtype=1&fly={0}") + "\">-{1}(共{2}场)</a>", n.p_title, n.p_title, new TPR2.BLL.guess.BaList().GetCount(n)); builder.Append(Out.Tab("</div>", "")); k++; } // 分页 if (showtype == 1) { builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } } else { builder.Append(Out.Div("div", "没有相关记录..")); } #endregion } #region 半场和单节 ptype == 0 && showtype == 0 if (ptype == 0 && showtype == 0) { #region 球彩下半部分导航(半场和单节) if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { builder.Append(Out.Tab("<div class=\"text\">", "<br />")); builder.Append("【半场单节】"); builder.Append(Out.Tab("</div>", "")); } else { builder.Append(Out.Tab("<div class=\"title\">", "<br />")); builder.Append("<b>体育球彩半单竞猜</b>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=8") + "\">足半</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=9") + "\">篮半</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=10") + "\">篮单</a> "); builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=3") + "\">联赛</a> "); builder.Append("<a href=\"" + Utils.getUrl("caseGuess.aspx") + "\">兑奖</a>"); builder.Append(Out.Tab("</div>", "")); } #endregion #region 半单SQL strWhere = "p_active=0 and p_del=0 and p_isondel=0 and (p_TPRtime >= '" + System.DateTime.Now + "' OR p_ison=1) and p_basketve>0"; if (sp == 1) { strWhere += " AND p_title LIKE '%NBA%'"; } strOrder = "p_TPRtime ASC,ID ASC"; #endregion #region 开始读取竞猜 // 开始读取竞猜 IList <TPR2.Model.guess.BaList> listBaList = new TPR2.BLL.guess.BaList().GetBaLists(pageIndex, pageSize, strWhere, strOrder, out recordCount); if (listBaList.Count > 0) { #region 循环 int k = 1; foreach (TPR2.Model.guess.BaList n in listBaList) { if (k % 2 == 0) { builder.Append(Out.Tab("<div>", "<br />")); } else { builder.Append(Out.Tab("<div>", "<br />")); } string Sonce = string.Empty; string VS = "VS"; //string hp_one = ""; //string hp_two = ""; if (n.p_ison == 1) { Sonce = "(" + ub.Get("SiteGqText") + ")"; if (n.p_result_temp1 == null && n.p_result_temp2 == null) { VS = "(0-0)"; } else { VS = "(" + n.p_result_temp1 + "-" + n.p_result_temp2 + ")"; } //if (n.p_type == 1) //{ // if (n.p_hp_one > 0) // hp_one = "<img src=\"/Files/sys/guess/redcard" + n.p_hp_one + ".gif\" alt=\"红" + n.p_hp_one + "\"/>"; // if (n.p_hp_two > 0) // hp_two = "<img src=\"/Files/sys/guess/redcard" + n.p_hp_two + ".gif\" alt=\"红" + n.p_hp_two + "\"/>"; //} } if (DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日").ToString() != strDay.ToString()) { builder.Append(DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日") + "<br />"); } builder.AppendFormat("<a href=\"" + Utils.getUrl("showGuess.aspx?gid={0}&backurl=" + Utils.PostPage(1) + "") + "\">{1}[{2}]{3}" + VS + "{4}" + Sonce + "</a>", n.ID, DT.FormatDate(Convert.ToDateTime(n.p_TPRtime), 13), n.p_title, n.p_one, n.p_two); if (n.p_ison == 1) { builder.Append("" + n.p_once + ""); } builder.Append(Out.Tab("</div>", "")); strDay = DT.GetTime(n.p_TPRtime.ToString(), "MM月dd日").ToString(); k++; } #endregion builder.Append(Out.Tab("<div>", "<br />")); #region 半单底部导航 if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { builder.Append("<a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=7") + "\">更多半场单节>></a>"); } else { builder.Append("<b><a href=\"" + Utils.getUrl("default.aspx?showtype=1&ptype=7") + "\">更多半场单节记录>></a></b>"); } #endregion builder.Append(Out.Tab("</div>", "")); } #endregion } #endregion #region 显示类型 showtype == 0 if (showtype == 0) { #region 闲聊显示 //闲聊显示 builder.Append(BCW.User.Users.ShowSpeak(5, "default2.aspx", 5, 0)); if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { builder.Append(Out.Tab("<div>", Out.Hr())); builder.Append("查看:<a href=\"" + Utils.getUrl("myGuess.aspx?ptype=1") + "\">未开</a>."); builder.Append("<a href=\"" + Utils.getUrl("myGuess.aspx?pzztype=2") + "\">历史</a>."); builder.Append("<a href=\"" + Utils.getUrl("listGuess.aspx") + "\">记录</a>."); builder.Append("<a href=\"" + Utils.getUrl("help.aspx") + "\">规则</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("【竞猜排行榜】"); builder.Append(Out.Tab("</div>", "<br />")); } else { builder.Append(Out.Tab("<div>", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("myGuess.aspx?ptype=1") + "\">未开投注</a> "); builder.Append("<a href=\"" + Utils.getUrl("myGuess.aspx?pzztype=2") + "\">历史投注</a><br />"); builder.Append("<a href=\"" + Utils.getUrl("listGuess.aspx") + "\">赛事记录</a> "); builder.Append("<a href=\"" + Utils.getUrl("help.aspx") + "\">游戏规则</a>"); builder.Append(Out.Tab("</div>", "<br />")); } #endregion #region 半单底部导航 builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("topGuess.aspx") + "\">排行榜单</a>:<a href=\"" + Utils.getUrl("topGuess.aspx?p_type=1") + "\">足球</a> "); builder.Append("<a href=\"" + Utils.getUrl("topGuess.aspx?p_type=2") + "\">篮球</a> <a href=\"" + Utils.getUrl("betsuper.aspx?act=top") + "\">串榜</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"text\">", "")); #endregion #region 昨日神猜 DateTime dt = DateTime.Parse(DateTime.Now.ToLongDateString()); string dt1 = dt.AddDays(-1).AddHours(12).ToString(); string dt2 = dt.AddHours(12).ToString(); string dt3 = Convert.ToDateTime(DT.GetWeekStart()).AddHours(12).ToString(); string dt4 = Convert.ToDateTime(DT.GetWeekOver()).AddHours(12).ToString(); ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 1 payusid,Count(DISTINCT bcid) as payCount", "p_TPRtime >= '" + dt1 + "' AND p_TPRtime <= '" + dt2 + "' and itypes=0 and types = 0 and p_active>0 and p_getMoney>paycent group by payusid order by Count(DISTINCT bcid) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { builder.Append("<a href=\"" + Utils.getUrl("topGuess.aspx?act=todaytop") + "\">昨日神猜</a>:<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + ds.Tables[0].Rows[0]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[0]["payusid"].ToString())) + "</a>(获胜" + ds.Tables[0].Rows[0]["payCount"] + "场)<br />"); } else { builder.Append("昨日神猜:暂无数据..<br />"); } #endregion #region 昨日之星 ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 1 payusid,sum(p_getMoney-payCent) as payCents", "p_TPRtime >= '" + dt1 + "' AND p_TPRtime <= '" + dt2 + "' and itypes=0 and types = 0 and p_active>0 group by payusid order by sum(p_getMoney-payCent) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { builder.Append("<a href=\"" + Utils.getUrl("topGuess.aspx?act=todaystar") + "\">昨日之星</a>:<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + ds.Tables[0].Rows[0]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[0]["payusid"].ToString())) + "</a>(净赚" + Convert.ToDouble(ds.Tables[0].Rows[0]["payCents"]) + "" + ub.Get("SiteBz") + ")"); } else { builder.Append("昨日之星:暂无数据.."); } #endregion #region 一周神猜 ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 1 payusid,Count(DISTINCT bcid) as payCount", "p_TPRtime >= '" + dt3 + "' AND p_TPRtime <= '" + dt4 + "' and itypes=0 and types = 0 and p_active>0 and p_getMoney>paycent group by payusid order by Count(DISTINCT bcid) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { builder.Append("<br /><a href=\"" + Utils.getUrl("topGuess.aspx?act=todaytop2") + "\">一周神猜</a>:<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + ds.Tables[0].Rows[0]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[0]["payusid"].ToString())) + "</a>(获胜" + ds.Tables[0].Rows[0]["payCount"] + "场)"); } else { builder.Append("<br />一周神猜:暂无数据.."); } #endregion #region 一周之星 ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 1 payusid,sum(p_getMoney-payCent) as payCents", "p_TPRtime>='" + dt3 + "'and p_TPRtime<='" + dt4 + "' and itypes=0 and types = 0 and p_active>0 group by payusid order by sum(p_getMoney-payCent) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { builder.Append("<br /><a href=\"" + Utils.getUrl("topGuess.aspx?act=todaystar2") + "\">一周之星</a>:<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + ds.Tables[0].Rows[0]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[0]["payusid"].ToString())) + "</a>(净赚" + Convert.ToDouble(ds.Tables[0].Rows[0]["payCents"]) + "" + ub.Get("SiteBz") + ")<br />"); } else { builder.Append("<br />一周之星:暂无数据..<br />"); } #endregion builder.Append(Out.Tab("</div>", "")); #region 底部公共UBB if (ub.GetSub("SiteFoot", xmlPath) != "") { builder.Append(Out.Tab("<div>", "")); builder.Append(Out.SysUBB(ub.GetSub("SiteFoot", xmlPath))); builder.Append(Out.Tab("</div>", "<br />")); } #endregion } else { #region showtype!=0的导航 builder.Append(Out.Tab("<div>", Out.Hr())); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">返回球彩首页</a>"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("<a href=\"" + Utils.getUrl("myGuess.aspx?ptype=1") + "\">未开投注</a> "); builder.Append("<a href=\"" + Utils.getUrl("myGuess.aspx?ptype=2") + "\">历史投注</a>"); builder.Append(Out.Tab("</div>", "<br />")); #endregion } #endregion #region 底部友情链接 builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("<a href=\"" + Utils.getUrl("/default.aspx") + "\">首页</a>-"); builder.Append("<a href=\"" + Utils.getUrl("/bbs/game/default.aspx") + "\">游戏中心</a>"); if (Utils.GetDomain().Contains("lt388")) { builder.Append("-<a href=\"" + Utils.getUrl("/bbs/guess2/gz/default.aspx") + "\">管</a>"); } builder.Append(Out.Tab("</div>", "")); //-----------友链链入开始 int kid = int.Parse(Utils.GetRequest("kid", "get", 1, @"^[0-9]\d*$", "0")); if (kid != 0) { if (new BCW.BLL.Link().Exists(kid)) { //统计链入 string xmlPath2 = "/Controls/link.xml"; if (ub.GetSub("LinkIsPc", xmlPath2) == "0") { if (Utils.IsMobileUa()) { new BCW.BLL.Link().UpdateLinkIn(kid); if (ub.GetSub("LinkGoUrl", xmlPath2) != "") { Response.Redirect(ub.GetSub("LinkGoUrl", xmlPath2)); } } } else { new BCW.BLL.Link().UpdateLinkIn(kid); if (ub.GetSub("LinkGoUrl", xmlPath2) != "") { Response.Redirect(ub.GetSub("LinkGoUrl", xmlPath2)); } } } } //-----------友链链入结束 #endregion }
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*$", "至少输多少币才返填写错误")); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("payusid,sum(p_getMoney-payCent) as payCents", "paytimes>='" + sTime + "'and paytimes<'" + oTime + "' and Types=0 and p_active>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]"; 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*$", "至少赢多少币才返填写错误")); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("payusid,sum(p_getMoney-payCent) as payCents", "paytimes>='" + sTime + "'and paytimes<'" + oTime + "' and Types=0 and p_active>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]"; 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 TPR2.BLL.guess.BaPay().GetBaPayCount("bcid=" + ID + ""); if (pCount == 0) { new TPR2.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 TPR2.BLL.guess.BaList().GetMaxId(); string[] p_pageArr = { "ac", "Ltype", "Ptype", "Ttype", "sTime", "oTime", "iTset", "Info" }; BCW.User.GameLog.GameLogPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号" + cText + "", gid); //组合条件查询 string strWhere = ""; if (Ltype == 1)//排行榜记录 { //------------------------返负彩 if (Convert.ToInt32(ub.GetSub("SiteLostPrice", xmlPath)) > 0) { DataSet ds = new TPR2.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 TPR2.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 TPR2.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 TPR2.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 TPR2.BLL.guess.Super().DeleteStr(strWhere); } else if (Ltype == 5)//串串排行榜 { new TPR2.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|=<>=两者之间|2|<>介负于两者|3|=><=两者之外"; 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("<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 />")); } } }
protected void Page_Load(object sender, EventArgs e) { //防止缓存 Response.Buffer = true; Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1); Response.Expires = 0; Response.CacheControl = "no-cache"; DataSet ds = new TPR2.BLL.guess.Super().GetList("ID,UsID,UsName,BID,PID,Odds,PayCent,p_isfs,p_Auto", "IsOpen=1 and Status=0"); if (ds != null && ds.Tables[0].Rows.Count > 0) { #region 循环下注订单 for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { #region 赋值初期 bool isover = true; int ID = int.Parse(ds.Tables[0].Rows[i]["ID"].ToString()); string BID = ds.Tables[0].Rows[i]["BID"].ToString(); string PID = ds.Tables[0].Rows[i]["PID"].ToString(); string Odds = ds.Tables[0].Rows[i]["Odds"].ToString(); int UsID = int.Parse(ds.Tables[0].Rows[i]["UsID"].ToString()); string UsName = ds.Tables[0].Rows[i]["UsName"].ToString(); double PayCent = double.Parse(ds.Tables[0].Rows[i]["PayCent"].ToString()); int p_isfs = int.Parse(ds.Tables[0].Rows[i]["p_isfs"].ToString()); string[] sBID = Regex.Split(Utils.Mid(BID, 2, BID.Length), "##"); string[] sPID = Regex.Split(Utils.Mid(PID, 2, PID.Length), "##"); string[] sOdds = Regex.Split(Utils.Mid(Odds, 2, Odds.Length), "##"); int p_Auto = int.Parse(ds.Tables[0].Rows[i]["p_Auto"].ToString()); #endregion //P不等于0的时候则视为人工开奖 if (p_Auto != 0) { continue; } #region 比赛是否已结束 for (int j = 0; j < sBID.Length; j++) { int gid = Convert.ToInt32(sBID[j]); //比赛是否已结束 isover = BCW.Data.SqlHelper.Exists("select count(1) from tb_TBaList where ID=" + gid + " and p_active>0"); if (isover == false) { break; } } #endregion #region 如果各场次已结束则进行开奖 if (isover) { if (p_isfs > 0) { //复式 #region 分析复式投注的总注数列表 string strBID = ""; List <string> listNum = new Combination().GetCombination2(sBID.Length, p_isfs, sBID); if (listNum.Count > 0) { foreach (string n in listNum) { strBID += "##" + n.Replace(",", "@"); } } string strPID = ""; List <string> listNum2 = new Combination().GetCombination2(sPID.Length, p_isfs, sPID); if (listNum2.Count > 0) { foreach (string n in listNum2) { strPID += "##" + n.Replace(",", "@"); } } string strOdds = ""; List <string> listNum3 = new Combination().GetCombination2(sOdds.Length, p_isfs, sOdds); if (listNum3.Count > 0) { foreach (string n in listNum3) { strOdds += "##" + n.Replace(",", "@"); } } string[] sBID2 = Regex.Split(Utils.Mid(strBID, 2, strBID.Length), "##"); string[] sPID2 = Regex.Split(Utils.Mid(strPID, 2, strPID.Length), "##"); string[] sOdds2 = Regex.Split(Utils.Mid(strOdds, 2, strOdds.Length), "##"); string fsStat = ""; double cents = 0; #endregion #region J循环 for (int j = 0; j < sBID2.Length; j++) { string[] sBID3 = Regex.Split(sBID2[j], "@"); string[] sPID3 = Regex.Split(sPID2[j], "@"); string[] sOdds3 = Regex.Split(sOdds2[j], "@"); //----------------------------------------------------- int errNum = 0; int sbNum = 0; string Stats = string.Empty; double pCent = PayCent; #region k循环 判断输赢 for (int k = 0; k < sBID3.Length; k++) { int gid = Convert.ToInt32(sBID3[k]); int pid = Convert.ToInt32(sPID3[k]); double odds = Convert.ToDouble(sOdds3[k]); TPR2.Model.guess.BaList qq = new TPR2.BLL.guess.BaList().GetModel(gid); int p_type = new TPR2.BLL.guess.BaList().GetPtype(gid); decimal GetMoney = 0; GetMoney = new TPR2.BLL.guess.BaPay().GetBaPayMoney(pid, UsID); if (p_type == 1) { #region 类型为1,1为足球 if (GetMoney == 0)//全输 { Stats += "##全输"; pCent = pCent * 0; } else if (GetMoney == 100)//平盘 { if (qq.p_active == 2) { Stats += "##平盘"; pCent = pCent * 1; errNum++; } else { Stats += "##走盘"; pCent = pCent * 1; } } else if (GetMoney == 50)//输半 { Stats += "##输半"; pCent = pCent * 0.5; sbNum++; } else if (GetMoney == Convert.ToDecimal(100 * odds))//全赢 { Stats += "##全赢"; pCent = pCent * odds; } else//赢半 { Stats += "##赢半"; pCent = pCent * Convert.ToDouble((odds - 1) / 2 + 1); } #endregion } else { #region 除1外的类型,篮球或其他 if (GetMoney == 0)//全输 { Stats += "##全输"; pCent = pCent * 0; } else if (GetMoney > 100) { Stats += "##全赢"; pCent = pCent * odds; } else if (GetMoney == 100)//平盘 { Stats += "##平盘"; pCent = pCent * 1; errNum++; } #endregion } } #endregion if (sBID3.Length - errNum < 3) { pCent = PayCent; } if (sbNum >= 2) { pCent = 0; } fsStat += Stats; cents += pCent; } #endregion #region 更新输赢 TPR2.Model.guess.Super model = new TPR2.Model.guess.Super(); if (cents == 0) { //更新为输 model.Status = 2; model.getMoney = Convert.ToDecimal(-(PayCent + PayCent * p_isfs)); } else { //更新为赢 model.Status = 1; model.getMoney = Convert.ToDecimal(cents); //发送兑奖内线 string strLog = "超级竞猜赛事ID" + ID + "[br]恭喜赢了" + Convert.ToDouble(cents) + "" + ub.Get("SiteBz") + "[url=/bbs/guess2/supercase.aspx]马上兑奖[/url]"; new BCW.BLL.Guest().Add(1, UsID, UsName, strLog); } #endregion #region 更新为结束 //更新为结束 model.ID = ID; model.getOdds = fsStat; new TPR2.BLL.guess.Super().Update4(model); #endregion #region 更新排行 //更新排行 TPR2.Model.guess.SuperOrder m = new TPR2.Model.guess.SuperOrder(); m.UsID = UsID; m.UsName = UsName; if (cents == 0) { m.Cent = Convert.ToDecimal(-(PayCent + PayCent * p_isfs)); } else { m.Cent = Convert.ToDecimal(cents); } if (!new TPR2.BLL.guess.SuperOrder().Exists(UsID)) { new TPR2.BLL.guess.SuperOrder().Add(m); } else { new TPR2.BLL.guess.SuperOrder().Update(m); } #endregion } else { //非复式 投注处理 int errNum = 0; int sbNum = 0; string Stats = string.Empty; double pCent = PayCent; #region k循环判断输赢 for (int k = 0; k < sBID.Length; k++) { int gid = Convert.ToInt32(sBID[k]); int pid = Convert.ToInt32(sPID[k]); double odds = Convert.ToDouble(sOdds[k]); TPR2.Model.guess.BaList m = new TPR2.BLL.guess.BaList().GetModel(gid); decimal GetMoney = 0; GetMoney = new TPR2.BLL.guess.BaPay().GetBaPayMoney(pid, UsID); if (GetMoney == -1) { break; } if (m.p_type == 1) { #region p_type类型为1的输赢 if (GetMoney == 0)//全输 { Stats += "##全输"; pCent = pCent * 0; } else if (GetMoney == 100)//平盘 { if (m.p_active == 2) { Stats += "##平盘"; pCent = pCent * 1; errNum++; } else { Stats += "##走盘"; pCent = pCent * 1; } } else if (GetMoney == 50)//输半 { Stats += "##输半"; pCent = pCent * 0.5; sbNum++; } else if (GetMoney == Convert.ToDecimal(100 * odds))//全赢 { Stats += "##全赢"; pCent = pCent * odds; } else//赢半 { Stats += "##赢半"; pCent = pCent * Convert.ToDouble((odds - 1) / 2 + 1); } #endregion } else { #region 除1外的类型 if (GetMoney == 0)//全输 { Stats += "##全输"; pCent = pCent * 0; } else if (GetMoney > 100) { Stats += "##全赢"; pCent = pCent * odds; } else if (GetMoney == 100)//平盘 { if (m.p_active == 2) { Stats += "##平盘"; pCent = pCent * 1; errNum++; } else { Stats += "##走盘"; pCent = pCent * 1; } } #endregion } } #endregion #region 发送内线以及处理更新 TPR2.Model.guess.Super model = new TPR2.Model.guess.Super(); if (sBID.Length - errNum < 3) { //无效返回本金 model.Status = 1; model.getMoney = Convert.ToDecimal(PayCent); //发送兑奖内线 string strLog = "超级竞猜赛事ID" + ID + "[br]串串无效系统退回本金" + Convert.ToDouble(PayCent) + "" + ub.Get("SiteBz") + "[url=/bbs/guess2/supercase.aspx]马上兑奖[/url]"; new BCW.BLL.Guest().Add(1, UsID, UsName, strLog); } else { if (pCent == 0 || sbNum >= 2) { //更新为输 model.Status = 2; model.getMoney = Convert.ToDecimal(-PayCent); } else { //更新为赢 model.Status = 1; model.getMoney = Convert.ToDecimal(pCent); //发送兑奖内线 string strLog = "超级竞猜赛事ID" + ID + "[br]恭喜赢了" + Convert.ToDouble(pCent) + "" + ub.Get("SiteBz") + "[url=/bbs/guess2/supercase.aspx]马上兑奖[/url]"; new BCW.BLL.Guest().Add(1, UsID, UsName, strLog); } } #endregion #region 更新为结束 //更新为结束 model.ID = ID; model.getOdds = Stats; new TPR2.BLL.guess.Super().Update4(model); #endregion #region 更新排行 //更新排行 TPR2.Model.guess.SuperOrder n = new TPR2.Model.guess.SuperOrder(); n.UsID = UsID; n.UsName = UsName; if (pCent == 0) { n.Cent = Convert.ToDecimal(-PayCent); } else { n.Cent = Convert.ToDecimal(pCent); } if (!new TPR2.BLL.guess.SuperOrder().Exists(UsID)) { new TPR2.BLL.guess.SuperOrder().Add(n); } else { new TPR2.BLL.guess.SuperOrder().Update(n); } #endregion } } #endregion } #endregion Response.Write("Ok!"); Response.End(); } Response.Write("No record!"); Response.End(); }
protected void Page_Load(object sender, EventArgs e) { #region 走地赛事下注确认 //走地赛事下注确认 HttpContext.Current.Application.Lock(); DataSet dss = new TPR2.BLL.guess.BaPay().GetBaPayList("pType,PayType,payview,ID,bcid,payusid,payusname,paytimes,payCent,types,p_result_temp1,p_result_temp2,state,payonLuone,payonLutwo,payonLuthr,p_pk,p_dx_pk,p_oncetime2,sure", "p_active=0 and (state=1 OR state=2 OR state=3 OR state=4) order by id desc"); if (dss != null && dss.Tables[0].Rows.Count > 0) { for (int i = 0; i < dss.Tables[0].Rows.Count; i++) { #region 变量 int pType = int.Parse(dss.Tables[0].Rows[i]["pType"].ToString()); int PayType = int.Parse(dss.Tables[0].Rows[i]["PayType"].ToString()); int zdtime = 0; if (pType == 1) { zdtime = Convert.ToInt32(ub.GetSub("SiteStemp", "/Controls/guess2.xml")); } else { zdtime = Convert.ToInt32(ub.GetSub("SiteStempb", "/Controls/guess2.xml")); } string payview = dss.Tables[0].Rows[i]["payview"].ToString(); int ID = int.Parse(dss.Tables[0].Rows[i]["ID"].ToString()); int bcid = int.Parse(dss.Tables[0].Rows[i]["bcid"].ToString()); int payusid = int.Parse(dss.Tables[0].Rows[i]["payusid"].ToString()); string payusname = dss.Tables[0].Rows[i]["payusname"].ToString(); DateTime paytimes = DateTime.Parse(dss.Tables[0].Rows[i]["paytimes"].ToString()); int types = int.Parse(dss.Tables[0].Rows[i]["types"].ToString()); long payCent = Convert.ToInt64(dss.Tables[0].Rows[i]["payCent"]); int p_result_temp1 = int.Parse(dss.Tables[0].Rows[i]["p_result_temp1"].ToString()); int p_result_temp2 = int.Parse(dss.Tables[0].Rows[i]["p_result_temp2"].ToString()); int state = int.Parse(dss.Tables[0].Rows[i]["state"].ToString()); decimal payonLuone = decimal.Parse(dss.Tables[0].Rows[i]["payonLuone"].ToString()); decimal payonLutwo = decimal.Parse(dss.Tables[0].Rows[i]["payonLutwo"].ToString()); decimal payonLuthr = decimal.Parse(dss.Tables[0].Rows[i]["payonLuthr"].ToString()); decimal p_pk = decimal.Parse(dss.Tables[0].Rows[i]["p_pk"].ToString()); decimal p_dx_pk = decimal.Parse(dss.Tables[0].Rows[i]["p_dx_pk"].ToString()); int sure = int.Parse(dss.Tables[0].Rows[i]["sure"].ToString()); string p_oncetime2 = ""; if (dss.Tables[0].Rows[i]["p_oncetime2"].ToString() != "") { p_oncetime2 = dss.Tables[0].Rows[i]["p_oncetime2"].ToString(); } #endregion #region 自定义设置ID的下注时间 ///等于1为默认确认状态,0为人工确认状态 if (sure == 1) { ///自定义设置ID的下注时间 string zdIDS = "#" + ub.GetSub("SitezdIDS", "/Controls/guess2.xml") + "#"; if (zdIDS.Contains("#" + payusid.ToString() + "#")) { zdtime = Convert.ToInt32(ub.GetSub("SiteZdtime", "/Controls/guess2.xml")); } } else { zdtime = 1; } #endregion #region 已开赛的下注处理 if (state == 1 || state == 3 || state == 4) { int p_basketve = 0; if (state == 3) { p_basketve = 9; } if (DateTime.Now > paytimes.AddSeconds(zdtime)) { bool IsPass = true; #region 检查球赛即时数据 确认下注状态 //即时更新 TPR2.Model.guess.BaList m = new TPR2.BLL.guess.BaList().Getp_temptime_p_id(bcid); if (m != null) { #region 注前检查盘口数据变动 int p_id = Convert.ToInt32(m.p_id); DateTime temptime = Convert.ToDateTime(m.p_temptime); //读取SiteViewStatus 等于0时采用即时刷新,其他值时,通过刷新机刷新 //黄国军 20160223 if (ub.GetSub("SiteUpdateOpen", "/Controls/guess2.xml") == "" || ub.GetSub("SiteUpdateOpen", "/Controls/guess2.xml") == "0") { #region 进入旧版更新 if (pType == 1) { string s = ""; if (state == 1) { new TPR2.Collec.Footbo().GetBoView(p_id, true); } else { new TPR2.Collec.FootFalf().FootFalfPageHtml(p_id, true); } } else { new TPR2.Collec.Basketbo().GetBoView(p_id, true); } #endregion } else { #region 进入新版更新 if (pType == 1) { string s = ""; if (state == 1) { new TPR2.Collec.Footbo().GetBoView1(p_id, true); } else { new TPR2.Collec.FootFalf().FootFalfPageHtml1(p_id, true, ref s); } } else { new TPR2.Collec.Basketbo().GetBoView1(p_id, true); } #endregion } if (state == 4) { IsPass = false; } else { #region 得到即时比分和封盘时间 //得到即时比分和封盘时间 TPR2.Model.guess.BaList n = new TPR2.BLL.guess.BaList().GetTemp(p_id, p_basketve); if (pType == 1 && n.p_result_temp1 != null) { if (n.p_result_temp1 != p_result_temp1 || n.p_result_temp2 != p_result_temp2)//比分不同 { IsPass = false; } } #endregion #region 进球更新的时间不同 if (m.p_temptime != n.p_temptime)//进球更新的时间不同 { IsPass = false; } if (temptime != Convert.ToDateTime("1990-1-1") && temptime > paytimes && paytimes > temptime.AddSeconds(-zdtime)) { IsPass = false; } #endregion #region 让球封盘时间不同 //让球封盘时间不同 if (PayType == 1 || PayType == 2) { if (m.p_temptime1 != n.p_temptime1) { IsPass = false; } if (n.p_temptime1 != Convert.ToDateTime("1990-1-1") && n.p_temptime1 > paytimes && paytimes > n.p_temptime1.AddSeconds(-zdtime)) { IsPass = false; } } #endregion #region 大小盘封盘时间不同 //大小盘封盘时间不同 if (PayType == 3 || PayType == 4) { if (m.p_temptime2 != n.p_temptime2) { IsPass = false; } if (n.p_temptime2 != Convert.ToDateTime("1990-1-1") && n.p_temptime2 > paytimes && paytimes > n.p_temptime2.AddSeconds(-zdtime)) { IsPass = false; } } #endregion #region 标准盘封盘时间不同 //标准盘封盘时间不同 if (PayType == 5 || PayType == 6 || PayType == 7) { if (m.p_temptime3 != n.p_temptime3) { IsPass = false; } if (n.p_temptime3 != Convert.ToDateTime("1990-1-1") && n.p_temptime3 > paytimes && paytimes > n.p_temptime3.AddSeconds(-zdtime)) { IsPass = false; } } #endregion } #endregion if (IsPass == false) { #region 投注失败,删除投注记录并退币 //投注失败,删除投注记录并退币 new TPR2.BLL.guess.BaPay().Delete(ID); string bzTypes = string.Empty; if (types == 0) { bzTypes = ub.Get("SiteBz"); new BCW.BLL.User().UpdateiGold(payusid, payusname, payCent, "" + ub.Get("SiteGqText") + "" + payview + "下注失败退回"); } else { bzTypes = ub.Get("SiteBz2"); new BCW.BLL.User().UpdateiMoney(payusid, payusname, payCent, "" + ub.Get("SiteGqText") + "" + payview + "下注失败退回"); } #endregion #region 记录失败日志 //记录失败日志 new BCW.BLL.Gamelog().Add(2, "" + payusname + "(" + payusid + ")" + payview + "" + ub.Get("SiteGqText") + "下注失败,系统退回您" + payCent + "" + bzTypes + "", bcid, "自动"); new BCW.BLL.Guest().Add(payusid, payusname, "您的" + payview + "" + ub.Get("SiteGqText") + "下注失败,系统退回您" + payCent + "" + bzTypes + ""); #endregion } else { #region 滚球投注成功 更新state=0 new TPR2.BLL.guess.BaPay().Updatestate(ID); new BCW.BLL.Guest().Add(payusid, payusname, "您的" + payview + "" + ub.Get("SiteGqText") + "下注成功"); #endregion } } #endregion } } #endregion #region 未开赛的下注处理 else if (state == 2)//未开赛需要验证水位的投注 { if (DateTime.Now > paytimes.AddSeconds(0)) { #region 检查即时数据 bool IsPass = true; //即时更新 TPR2.Model.guess.BaList modelBaList = new TPR2.BLL.guess.BaList().GetModel(bcid); if (modelBaList == null) { modelBaList = new TPR2.BLL.guess.BaList().GetModelByp_id(bcid); } if (modelBaList != null) { int p_id = Convert.ToInt32(modelBaList.p_id); if (modelBaList.p_type == 1) { new TPR2.Collec.Footbo().GetBoView(p_id, false); } else { new TPR2.Collec.Basketbo().GetBoView(p_id, false); } modelBaList = new TPR2.BLL.guess.BaList().GetModel(bcid);//同步以上更新的水位 if (modelBaList == null) { modelBaList = new TPR2.BLL.guess.BaList().GetModelByp_id(bcid); } if (PayType == 1) { decimal oldlu = payonLuone; decimal newlu = Convert.ToDecimal(modelBaList.p_one_lu); decimal oldpk = p_pk; decimal newpk = Convert.ToDecimal(modelBaList.p_pk); if (oldlu - newlu >= Convert.ToDecimal(0.1) || newlu - oldlu >= Convert.ToDecimal(0.1)) { IsPass = false; } if (!oldpk.Equals(newpk)) { IsPass = false; } } else if (PayType == 2) { decimal oldlu2 = payonLutwo; decimal newlu2 = Convert.ToDecimal(modelBaList.p_two_lu); decimal oldpk = p_pk; decimal newpk = Convert.ToDecimal(modelBaList.p_pk); if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1)) { IsPass = false; } if (!oldpk.Equals(newpk)) { IsPass = false; } } else if (PayType == 3) { decimal oldlu = payonLuone; decimal newlu = Convert.ToDecimal(modelBaList.p_big_lu); decimal oldpk = p_dx_pk; decimal newpk = Convert.ToDecimal(modelBaList.p_dx_pk); if (oldlu - newlu >= Convert.ToDecimal(0.1) || newlu - oldlu >= Convert.ToDecimal(0.1)) { IsPass = false; } if (!oldpk.Equals(newpk)) { IsPass = false; } } else if (PayType == 4) { decimal oldlu2 = payonLutwo; decimal newlu2 = Convert.ToDecimal(modelBaList.p_small_lu); decimal oldpk = p_dx_pk; decimal newpk = Convert.ToDecimal(modelBaList.p_dx_pk); if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1)) { IsPass = false; } if (!oldpk.Equals(newpk)) { IsPass = false; } } else if (PayType == 5) { decimal oldlu2 = payonLuone; decimal newlu2 = Convert.ToDecimal(modelBaList.p_bzs_lu); decimal oldpk = p_pk; decimal newpk = Convert.ToDecimal(modelBaList.p_pk); if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1)) { IsPass = false; } if (!oldpk.Equals(newpk)) { IsPass = false; } } else if (PayType == 6) { decimal oldlu2 = payonLutwo; decimal newlu2 = Convert.ToDecimal(modelBaList.p_bzp_lu); decimal oldpk = p_pk; decimal newpk = Convert.ToDecimal(modelBaList.p_pk); if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1)) { IsPass = false; } if (!oldpk.Equals(newpk)) { IsPass = false; } } else if (PayType == 7) { decimal oldlu2 = payonLuthr; decimal newlu2 = Convert.ToDecimal(modelBaList.p_bzx_lu); decimal oldpk = p_pk; decimal newpk = Convert.ToDecimal(modelBaList.p_pk); if (oldlu2 - newlu2 >= Convert.ToDecimal(0.1) || newlu2 - oldlu2 >= Convert.ToDecimal(0.1)) { IsPass = false; } if (!oldpk.Equals(newpk)) { IsPass = false; } } } #endregion #region 注确认 if (IsPass == false) { //投注失败,删除投注记录并退币 new TPR2.BLL.guess.BaPay().Delete(ID); string bzTypes = string.Empty; if (types == 0) { bzTypes = ub.Get("SiteBz"); new BCW.BLL.User().UpdateiGold(payusid, payusname, payCent, "" + payview + "下注失败退回"); } else { bzTypes = ub.Get("SiteBz2"); new BCW.BLL.User().UpdateiMoney(payusid, payusname, payCent, "" + payview + "下注失败退回"); } new BCW.BLL.Guest().Add(payusid, payusname, "您的" + payview + "下注失败,系统退回您" + payCent + "" + bzTypes + ""); //记录失败日志 new BCW.BLL.Gamelog().Add(2, "" + payusname + "(" + payusid + ")" + payview + "下注失败,标识ID" + ID + "", bcid, "自动"); } else { new TPR2.BLL.guess.BaPay().Updatestate(ID); new BCW.BLL.Guest().Add(payusid, payusname, "您的" + payview + "下注成功"); } #endregion } } #endregion } } HttpContext.Current.Application.UnLock(); //----------------------------------------------------------------------- #endregion }
protected void Page_Load(object sender, EventArgs e) { if (Request["act"] == "case") { int pid = Utils.ParseInt(Utils.GetRequest("pid", "get", 2, @"^[0-9]\d*$", "选择赛事无效")); int hid = Utils.ParseInt(Utils.GetRequest("hid", "get", 1, @"^[0-9]\d*$", "0")); if (new TPR2.BLL.guess.BaPay().ExistsIsCase(pid, hid)) { int bcid = new TPR2.BLL.guess.BaPay().Getbcid(pid); new TPR2.BLL.guess.BaPay().UpdateIsCase(pid); //操作币 long win = Convert.ToInt64(new TPR2.BLL.guess.BaPay().Getp_getMoney(pid)); int Types = new TPR2.BLL.guess.BaPay().GetTypes(pid); if (Types == 0) { new BCW.BLL.User().UpdateiGold(hid, win, "竞猜赛事ID" + bcid + "#记录ID" + pid + "兑奖(管)"); Utils.Success("兑奖", "成功兑奖" + win + "" + ub.Get("SiteBz") + "", Utils.getPage("caselist.aspx?ptype=2"), "1"); } else { new BCW.BLL.User().UpdateiMoney(hid, win, "竞猜赛事ID" + bcid + "#记录ID" + pid + "兑奖(管)"); Utils.Success("兑奖", "成功兑奖" + win + "" + ub.Get("SiteBz2") + "", Utils.getPage("caselist.aspx?ptype=2"), "1"); } } else { Utils.Success("兑奖", "重复兑奖或没有可以兑奖的记录", Utils.getPage("caselist.aspx?ptype=2"), "1"); } } else { Master.Title = "下注详细记录"; int hid = Utils.ParseInt(Utils.GetRequest("hid", "all", 1, @"^[0-9]\d*$", "0")); int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "all", 1, @"^[0-2]$", "0")); int showtype = Utils.ParseInt(Utils.GetRequest("showtype", "all", 1, @"^[0-1]$", "0")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("兑奖管理"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); if (showtype == 0) { builder.Append("未兑奖|"); } else { builder.Append(Out.waplink(Utils.getUrl("caselist.aspx?hid=" + hid + "&ptype=2&showtype=0"), "未兑奖") + "|"); } if (showtype == 1) { builder.Append("已兑奖"); } else { builder.Append(Out.waplink(Utils.getUrl("caselist.aspx?hid=" + hid + "&ptype=2&showtype=1"), "已兑奖")); } builder.Append(Out.Tab("</div>", "<br />")); int pageSize = 10; int pageIndex; int recordCount; string[] pageValUrl = { "hid", "ptype", "showtype" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //组合条件 string strWhere = ""; strWhere += "p_active>0 and itypes=0 "; if (hid > 0) { strWhere += " and payusid=" + hid + ""; } strWhere += " and p_case=" + showtype + " and p_getMoney > 0"; // 开始读取竞猜 IList <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(pageIndex, pageSize, strWhere, out recordCount); if (listBaPay.Count > 0) { int k = 1; foreach (TPR2.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"); } builder.Append("[" + n.ID + "]"); builder.Append(Out.waplink(Utils.getUrl("../uinfo.aspx?uid=" + n.payusid + "&backurl=" + Utils.PostPage(1) + ""), "" + n.payusname + "") + ":"); string robot = ""; if (n.isrobot == 1) { robot = "<h style=\"color:red\">.[机器人]</h>"; } if (n.p_active == 2) { builder.AppendFormat("{0},平盘" + robot + "<br />时间:{1}", Out.SysUBB(n.payview).Replace("/bbs/guess2/", ""), n.paytimes); builder.AppendFormat(" 返{0}" + bzType + "", Convert.ToDouble(n.p_getMoney)); if (showtype == 0) { builder.Append("" + Out.waplink(Utils.getUrl("caselist.aspx?act=case&pid=" + n.ID + "&hid=" + n.payusid + "&backurl=" + Utils.PostPage(1) + ""), "帮TA兑奖") + ""); } } else { builder.AppendFormat("{0},结果{1}:{2}" + robot + "<br />时间:{3}", Out.SysUBB(n.payview).Replace("/bbs/guess2/", ""), n.p_result_one, n.p_result_two, n.paytimes); builder.AppendFormat(" 赢{0}" + bzType + "", Convert.ToDouble(n.p_getMoney)); if (showtype == 0) { builder.Append("" + Out.waplink(Utils.getUrl("caselist.aspx?act=case&pid=" + n.ID + "&hid=" + n.payusid + "&backurl=" + Utils.PostPage(1) + ""), "帮TA兑奖") + ""); } } builder.Append(Out.Tab("</div>", "")); k++; } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } string strText = "输入用户ID:/,"; string strName = "hid,ptype"; string strType = "num,hidden"; string strValu = "'" + ptype + ""; string strEmpt = "true,false"; string strIdea = "/"; string strOthe = "搜兑奖,caselist.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 />")); } }
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, "", ""); TPR2.BLL.guess.BaList bll = new TPR2.BLL.guess.BaList(); if (bll.GetModel(gid) == null) { Utils.Error("不存在的记录", ""); } TPR2.Model.guess.BaList model = bll.GetModel(gid); Master.Title = "开奖赛事" + model.p_one + "VS" + model.p_two; int ManageId = new BCW.User.Manage().IsManageLogin(); //开奖限制 if (model.p_opentime == DateTime.Parse("1990-1-1")) { if (Convert.ToDateTime(model.p_TPRtime).AddHours(8) < DateTime.Now) { if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { if (ManageId != 1 && ManageId != 2) { Utils.Error("未开奖的比赛超8小时后不能再开奖", ""); } } else { if (ManageId != 1 && ManageId != 9) { Utils.Error("未开奖的比赛超8小时后不能再开奖", ""); } } } } else { if (model.p_opentime.AddHours(3) < DateTime.Now) { if (Utils.GetTopDomain().Contains("tuhao") || Utils.GetTopDomain().Contains("th")) { if (ManageId != 1 && ManageId != 2) { Utils.Error("开奖后已超3小时,不能进行重新开奖", ""); } } else { if (ManageId != 1 && ManageId != 9) { Utils.Error("开奖后已超3小时,不能进行重新开奖", ""); } } } } 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") { //游戏日志记录 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(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号重新开奖" + model.p_one + "VS" + model.p_two + "(" + gid + "),比分" + resultone + ":" + resulttwo + "", gid); } else { BCW.User.GameLog.GameLogPage(1, 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 TPR2.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, "球彩赛事ID" + gid + "重开奖,扣除已兑奖" + ub.Get("SiteBz") + ""); //发送内线 string strGuess = "球彩赛事ID" + gid + "重开奖,你欠下系统的" + 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, "球彩赛事ID" + gid + "重开奖,扣除已兑奖" + ub.Get("SiteBz2") + ""); //发送内线 string strGuess = "球彩赛事ID" + gid + "重开奖,你欠下系统的" + 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 = 1; 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); } //取消得到的排行 TPR2.Model.guess.BaOrder objBaOrder = new TPR2.Model.guess.BaOrder(); objBaOrder.Orderusid = payusid; objBaOrder.Orderusname = payusname; objBaOrder.Orderfanum = 0; objBaOrder.Orderjbnum = -(p_getMoney - payCent); objBaOrder.Orderbanum = -1; objBaOrder.Orderstats = pType; new TPR2.BLL.guess.BaOrder().UpdateOrder(objBaOrder); } } } int OnceMin = Convert.ToInt32(ub.GetSub("SiteOnce", xmlPath));//" + ub.Get("SiteGqText") + "时间限制 //是否" + ub.Get("SiteGqText") + "赛事 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 TPR2.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); //更新开奖时间 new TPR2.BLL.guess.BaList().Updatep_opentime(gid); 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) { TPR2.Model.guess.BaOrder objBaOrder = new TPR2.Model.guess.BaOrder(); // 开始查询并更新之 IList <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(1, 8000, strWhere, out recordCount); if (listBaPay.Count > 0) { foreach (TPR2.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)//如果是" + ub.Get("SiteGqText") + "模式 { 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 TPR2.BLL.guess.BaPay().UpdateCase(n, p_strVal, out p_intDuVal, out p_intWin); Iszd = 1;//" + ub.Get("SiteGqText") + "模式 } else if (n.PayType == 3 || n.PayType == 4) { new TPR2.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 TPR2.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqbzCase(n), out p_intDuVal, out p_intWin); } else//波胆开奖 { new TPR2.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqScoreCase(n), out p_intDuVal, out p_intWin); } } } else { if (n.PayType == 1 || n.PayType == 2) { new TPR2.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqsxCase(n), out p_intDuVal, out p_intWin); } else { new TPR2.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 TPR2.BLL.guess.BaOrder().UpdateOrder(objBaOrder); //发送内线 string strLog = string.Empty; if (Iszd == 1) //" + ub.Get("SiteGqText") + "的内线提醒 { 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 TPR2.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 TPR2.BLL.guess.BaPay().UpdatePPCase(n); //发送内线 if (Convert.ToInt32(n.itypes) == 0) { //发送内线 string strLog = "" + n.payview + "[br]结果平盘,原因:" + ub.Get("SiteGqText") + "赛事,系统将比分变动前后" + 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 <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(1, 8000, strppWhere, out recordCount); if (listBaPay.Count > 0) { foreach (TPR2.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 TPR2.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_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 = "*填写比分/,比/,开奖模式,截止时间,操作原因," + ub.Get("SiteGqText") + "比分时间(格式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 TPR2.BLL.guess.BaList().Getp_temptimes(gid); if (stronce != "") { builder.Append("" + ub.Get("SiteGqText") + "比分参考:<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 />")); } }
protected void Page_Load(object sender, EventArgs e) { int ptype = Utils.ParseInt(Utils.GetRequest("ptype", "get", 1, @"^[1-2]$", "1")); int p_type = Utils.ParseInt(Utils.GetRequest("p_type", "get", 1, @"^[0-2]$", "0")); int paytype = Utils.ParseInt(Utils.GetRequest("paytype", "get", 1, @"^[0-4]$", "0")); string strTitle = ""; if (ptype == 1) { strTitle = "未开投注"; } else { strTitle = "历史投注"; } Master.Title = strTitle; //会员身份页面取会员实体 int meid = new BCW.User.Users().GetUsId(); if (meid == 0) { Utils.Login(); } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("球:"); if (p_type == 0) { builder.Append("全部 "); } else { builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&p_type=0&paytype=" + paytype + ""), "全部") + " "); } if (p_type == 1) { builder.Append("足球 "); } else { builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&p_type=1&paytype=" + paytype + ""), "足球") + " "); } if (p_type == 2) { builder.Append("篮球 "); } else { builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&p_type=2&paytype=" + paytype + ""), "篮球") + " "); } builder.Append("<br />盘:"); if (paytype == 0) { builder.Append("全部 "); } else { builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&p_type=" + p_type + "&paytype=0"), "全部") + " "); } if (paytype == 1) { builder.Append("让球 "); } else { builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&p_type=" + p_type + "&paytype=1"), "让球") + " "); } if (paytype == 2) { builder.Append("大小 "); } else { builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&p_type=" + p_type + "&paytype=2"), "大小") + " "); } if (p_type != 2) { if (paytype == 3) { builder.Append("标准 "); } else { builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&p_type=" + p_type + "&paytype=3"), "标准") + " "); } if (paytype == 4) { builder.Append("波胆 "); } else { builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=" + ptype + "&p_type=" + p_type + "&paytype=4"), "波胆") + " "); } } builder.Append(Out.Tab("</div >", "<br />")); int pageSize = 10; int pageIndex; int recordCount; string[] pageValUrl = { "ptype", "p_type", "paytype" }; pageIndex = Utils.ParseInt(Request.QueryString["page"]); if (pageIndex == 0) { pageIndex = 1; } //组合条件 string strWhere = ""; if (ptype == 1) { strWhere += "p_active=0 and payusid=" + meid + " and itypes=0 "; } else { strWhere += "p_active>0 and payusid=" + meid + " and itypes=0 "; } if (p_type != 0) { strWhere += "and ptype=" + p_type + ""; } if (paytype != 0) { if (paytype == 1) { strWhere += "and (paytype=1 or paytype=2)"; } if (paytype == 2) { strWhere += "and (paytype=3 or paytype=4)"; } if (paytype == 3) { strWhere += "and (paytype=5 or paytype=6 or paytype=7)"; } if (paytype == 4) { strWhere += "and (paytype>100)"; } } // 开始读取竞猜 IList <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(pageIndex, pageSize, strWhere, out recordCount); if (listBaPay.Count > 0) { int k = 1; foreach (TPR2.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 (n.p_active == 0) { builder.AppendFormat("ID:" + n.ID + ".{0}<br />时间:{1}", Out.SysUBB(n.payview), DT.FormatDate(Convert.ToDateTime(n.paytimes), 0)); if (n.state >= 1) { builder.Append("*待确认"); } } else if (n.p_active == 2) { builder.AppendFormat("ID:" + n.ID + ".{0},平盘<br />时间:{1}", Out.SysUBB(n.payview), DT.FormatDate(Convert.ToDateTime(n.paytimes), 0)); builder.AppendFormat(" 返{0}币", Convert.ToDouble(n.p_getMoney)); } else { builder.AppendFormat("ID:" + n.ID + ".{0},结果{1}:{2}<br />时间:{3}", Out.SysUBB(n.payview), n.p_result_one, n.p_result_two, DT.FormatDate(Convert.ToDateTime(n.paytimes), 0)); if (Convert.ToInt32(n.p_getMoney) > 0) { builder.AppendFormat(" 返{0}币", Convert.ToDouble(n.p_getMoney)); } else { builder.AppendFormat(" 输{0}币", Convert.ToDouble(n.payCent)); } } 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>", Out.Hr())); builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=1"), "未开投注") + " "); builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=2"), "历史投注") + "<br />"); builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "返回球彩首页") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append(Out.waplink(Utils.getUrl("/default.aspx"), "首页") + "-"); builder.Append(Out.waplink(Utils.getPage("default.aspx"), "上级") + "-"); builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "球彩") + ""); builder.Append(Out.Tab("</div>", "")); }
private void ReloadPage() { int gid = Utils.ParseInt(Utils.GetRequest("gid", "get", 2, @"^[0-9]\d*$", "竞猜ID无效")); int p = Utils.ParseInt(Utils.GetRequest("p", "get", 2, @"^[1-7]*$|^100$", "选择无效")); string ok = Utils.GetRequest("ok", "all", 1, "", ""); TPR2.BLL.guess.BaList bll = new TPR2.BLL.guess.BaList(); if (bll.GetModel(gid) == null) { Utils.Error("不存在的记录", ""); } TPR2.Model.guess.BaList model = bll.GetModel(gid); #region 确认下注 if (ok == "sure") { int id = Utils.ParseInt(Utils.GetRequest("id", "get", 1, @"^[0-9]\d*$", "ID无效")); TPR2.Model.guess.BaPay bpmodel = new TPR2.BLL.guess.BaPay().GetModelIsCase(id); if (bpmodel != null) { new TPR2.BLL.guess.BaPay().UpdateSure(id); } } #endregion 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 == 100) { builder.Append("波胆盘:下注列表"); } 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 = ""; if (p < 100) { strWhere += "itypes=0 and bcid=" + gid + " and PayType=" + p + ""; } else { strWhere += "itypes=0 and bcid=" + gid + " and PayType>100"; } // 开始读取竞猜 IList <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(pageIndex, pageSize, strWhere, out recordCount); if (listBaPay.Count > 0) { int k = 1; foreach (TPR2.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"); } builder.AppendFormat(Out.waplink(Utils.getUrl("../uinfo.aspx?uid={1}&backurl=" + Utils.PostPage(1) + ""), "{0}({1})[" + n.ID + "]") + ":{2}[{3}]", n.payusname, n.payusid, Out.SysUBB(n.payview).Replace("/bbs/guess2/", ""), n.paytimes); builder.Append(Out.waplink(Utils.getUrl("plguess.aspx?act=back&id=" + n.ID + "&gid=" + gid + "&backurl=" + Utils.PostPage(1) + ""), "[退]")); #region 注状态 //确定下注 if (n.state > 0) { if (n.sure == 1) { builder.Append(Out.waplink(Utils.getUrl("plguess.aspx?ok=sure&p=" + p + "&id=" + n.ID + "&gid=" + gid + "&backurl=" + Utils.PostPage(1) + ""), "[确]")); } else { builder.Append("[待]"); } } if (n.state == 0) { builder.Append("[成]"); } #endregion 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 />")); }
/// <summary> /// 遍历所有下注更新开奖(" + ub.Get("SiteGqText") + "开奖) /// </summary> /// <param name="resultone"></param> /// <param name="resulttwo"></param> /// <param name="gid"></param> /// <param name="p_type"></param> private void UpdateCaseOnce(int resultone, int resulttwo, int gid, int p_type) { int OnceMin = Convert.ToInt32(ub.GetSub("SiteOnce", xmlPath));//" + ub.Get("SiteGqText") + "时间限制 string strWhere = ""; int recordCount = 0; int p_intWin = 0; decimal p_intDuVal = 0; strWhere = "bcid=" + gid + ""; TPR2.Model.guess.BaOrder objBaOrder = new TPR2.Model.guess.BaOrder(); //取得比分时间段 string stronce = new TPR2.BLL.guess.BaList().Getonce(gid); // 开始查询并更新之 IList <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(1, 5000, strWhere, out recordCount); if (listBaPay.Count > 0) { foreach (TPR2.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 (p_type == 1) { //是否可以平盘了 if (n.PayType <= 4) { //if (Utils.GetTopDomain() == "tl88.cc" || Utils.GetTopDomain() == "168yy.cc") //{ // stronce = new TPR2.BLL.guess.BaList().Getp_temptimes(gid); //} //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)//足球让球盘" + ub.Get("SiteGqText") + "开奖 { //比分变化前n秒投注平盘返彩 bool Ispp = false; //if (Utils.GetTopDomain() == "tl88.cc") //{ // string p_temptimes = new TPR2.BLL.guess.BaList().Getp_temptimes(gid); // if (p_temptimes != "") // { // string[] ptemp = p_temptimes.Split("|".ToCharArray()); // for (int i = 0; i < ptemp.Length; i++) // { // TimeSpan ts1 = new TimeSpan(Convert.ToDateTime(n.paytimes).Ticks); // TimeSpan ts2 = new TimeSpan(Convert.ToDateTime(ptemp[i]).Ticks); // TimeSpan ts = ts2.Subtract(ts1); // if (ts.Seconds <= Utils.ParseInt(ub.GetSub("SiteStemp2", xmlPath))) // { // Iszd = 3;//平盘标识 // Ispp = true; // break; // } // } // } //} if (!Ispp) { //算出" + ub.Get("SiteGqText") + "(总分减下注时的比分) n.p_result_one = resultone - Convert.ToInt32(n.p_result_temp1); n.p_result_two = resulttwo - Convert.ToInt32(n.p_result_temp2); string p_strVal = ZqClass.getZqsxCase(n); //重新取值 n.p_result_one = resultone; n.p_result_two = resulttwo; new TPR2.BLL.guess.BaPay().UpdateCase(n, p_strVal, out p_intDuVal, out p_intWin); Iszd = 1;//" + ub.Get("SiteGqText") + "标识 } } else if (n.PayType == 3 || n.PayType == 4) { new TPR2.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 TPR2.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqbzCase(n), out p_intDuVal, out p_intWin); } else { new TPR2.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqScoreCase(n), out p_intDuVal, out p_intWin); } } } else { if (n.PayType == 1 || n.PayType == 2) { new TPR2.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqsxCase(n), out p_intDuVal, out p_intWin); } else { new TPR2.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqdxCase(n), out p_intDuVal, out p_intWin); } } if (Iszd != 2 && Iszd != 3) { 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 TPR2.BLL.guess.BaOrder().UpdateOrder(objBaOrder); //发送内线 if (Convert.ToInt32(n.itypes) == 0) { string strLog = string.Empty; if (Iszd == 1) //" + ub.Get("SiteGqText") + "的内线提醒 { 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 TPR2.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 TPR2.BLL.guess.BaPay().UpdatePPCase(n); //发送内线 if (Convert.ToInt32(n.itypes) == 0) { string strLog = string.Empty; //if (Iszd == 2) strLog = "" + n.payview + "[br]结果平盘,原因:" + ub.Get("SiteGqText") + "赛事,系统将比分变动前后" + OnceMin + "秒钟的下注作平盘处理,返还" + Convert.ToDouble(n.payCent) + "" + bzTypes + "[url=/bbs/guess2/caseGuess.aspx]马上兑奖[/url][br]本场赛事变动时间如下:[br]" + stronce.Replace("|", "[br]") + ""; //else //strLog = "" + n.payview + "[br]结果平盘,原因:" + ub.Get("SiteGqText") + "赛事,系统将比分变动前" + ub.GetSub("SiteStemp2", xmlPath) + "秒的下注作平盘处理,返还" + Convert.ToDouble(n.payCent) + "" + bzTypes + "[url=/bbs/guess2/caseGuess.aspx]马上兑奖[/url]"; new BCW.BLL.Guest().Add(1, Convert.ToInt32(n.payusid), n.payusname, strLog); } } //------------------------------------------------------ } } }
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 if (act == "todaytop") { Master.Title = "昨日神猜"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("昨日神猜Top10"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); DateTime dt = DateTime.Parse(DateTime.Now.ToLongDateString()); string dt1 = dt.AddDays(-1).AddHours(12).ToString(); string dt2 = dt.AddHours(12).ToString(); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 10 payusid,Count(DISTINCT bcid) as payCount", "p_TPRtime >= '" + dt1 + "' AND p_TPRtime <= '" + dt2 + "' and itypes=0 and types = 0 and p_active>0 and p_getMoney>paycent group by payusid order by Count(DISTINCT bcid) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("[第" + (i + 1) + "名]<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + ds.Tables[0].Rows[i]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString())) + "</a>(获胜" + ds.Tables[0].Rows[i]["payCount"] + "场)<br />"); } } else { builder.Append("暂无数据..<br />"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx"), "返回排行首页") + ""); builder.Append("<br />注:一场比赛获胜多场时只算胜一场,平盘、走盘不计,赢半算赢一场"); builder.Append("<br />昨日时间计算:上一天(昨天)12:00~当天中午12:00"); builder.Append(Out.Tab("</div>", "")); } else if (act == "todaytop2") { Master.Title = "一周神猜"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("一周神猜Top10"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); string dt3 = Convert.ToDateTime(DT.GetWeekStart()).AddHours(12).ToString(); string dt4 = Convert.ToDateTime(DT.GetWeekOver()).AddHours(12).ToString(); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 10 payusid,Count(DISTINCT bcid) as payCount", "p_TPRtime >= '" + dt3 + "' AND p_TPRtime <= '" + dt4 + "' and itypes=0 and types = 0 and p_active>0 and p_getMoney>paycent group by payusid order by Count(DISTINCT bcid) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("[第" + (i + 1) + "名]<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + ds.Tables[0].Rows[i]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString())) + "</a>(获胜" + ds.Tables[0].Rows[i]["payCount"] + "场)<br />"); } } else { builder.Append("暂无数据..<br />"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx"), "返回排行首页") + ""); builder.Append("<br />注:一场比赛获胜多场时只算胜一场,平盘、走盘不计,赢半算赢一场"); builder.Append("<br />一周时间计算:按自然周,从本周星期一中午12:00~当天中午12:00"); builder.Append(Out.Tab("</div>", "")); } else if (act == "todaystar") { Master.Title = "昨日之星"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("昨日之星Top10"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); DateTime dt = DateTime.Parse(DateTime.Now.ToLongDateString()); string dt1 = dt.AddDays(-1).AddHours(12).ToString(); string dt2 = dt.AddHours(12).ToString(); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 10 payusid,sum(p_getMoney-payCent) as payCents", "p_TPRtime >= '" + dt1 + "' AND p_TPRtime <= '" + dt2 + "' and itypes=0 and types = 0 and p_active>0 group by payusid order by sum(p_getMoney-payCent) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("[第" + (i + 1) + "名]<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + ds.Tables[0].Rows[i]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString())) + "</a>(净赚" + Convert.ToDouble(ds.Tables[0].Rows[i]["payCents"]) + "" + ub.Get("SiteBz") + ")<br />"); } } else { builder.Append("暂无数据..<br />"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx"), "返回排行首页") + ""); builder.Append("<br />注:昨日时间计算:上一天(昨天)12:00~当天中午12:00"); builder.Append(Out.Tab("</div>", "")); } else if (act == "todaystar2") { Master.Title = "一周之星"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("一周之星Top10"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); string dt3 = Convert.ToDateTime(DT.GetWeekStart()).AddHours(12).ToString(); string dt4 = Convert.ToDateTime(DT.GetWeekOver()).AddHours(12).ToString(); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 10 payusid,sum(p_getMoney-payCent) as payCents", "p_TPRtime >= '" + dt3 + "' AND p_TPRtime <= '" + dt4 + "' and itypes=0 and types = 0 and p_active>0 group by payusid order by sum(p_getMoney-payCent) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("[第" + (i + 1) + "名]<a href=\"" + Utils.getUrl("/bbs/uinfo.aspx?uid=" + ds.Tables[0].Rows[i]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString())) + "</a>(净赚" + Convert.ToDouble(ds.Tables[0].Rows[i]["payCents"]) + "" + ub.Get("SiteBz") + ")<br />"); } } else { builder.Append("暂无数据..<br />"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx"), "返回排行首页") + ""); builder.Append("<br />注:一周时间计算:按自然周,从本周星期一中午12:00~当天中午12:00"); builder.Append(Out.Tab("</div>", "")); } 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&ptype=" + ptype + "&showtype=" + showtype + ""), "总榜") + " "); } if (p_type == 1) { builder.Append("足球 "); } else { builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=1&ptype=" + ptype + "&showtype=" + showtype + ""), "足球") + " "); } if (p_type == 2) { builder.Append("篮球 "); } else { builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=2&ptype=" + ptype + "&showtype=" + showtype + ""), "篮球") + " "); } builder.Append("<br />单:"); if (ptype == 1) { builder.Append("赌神榜 "); } else { builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=" + p_type + "&ptype=1&showtype=" + showtype + ""), "赌神榜") + " "); } if (ptype == 2) { builder.Append("狂人榜 "); } else { builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=" + p_type + "&ptype=2&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 <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPayTop2(pageIndex, pageSize, strWhere, ptype, out recordCount); if (listBaPay.Count > 0) { int k = 1; foreach (TPR2.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("/bbs/uinfo.aspx?uid={1}&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("/bbs/uinfo.aspx?uid={1}&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, 100, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } int meid = new BCW.User.Users().GetUsId(); if (meid > 0) { builder.Append(Out.Tab("<div>", Out.Hr())); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("sum(p_getMoney-payCent) as WinCents", " payusid=" + meid + " and types=0 and itypes=0 and p_active>0"); if (ds != null && ds.Tables[0].Rows.Count > 0) { string win = ds.Tables[0].Rows[0]["WinCents"].ToString(); if (!string.IsNullOrEmpty(win)) { builder.Append("我的战绩:盈利" + Convert.ToDouble(win) + "" + ub.Get("SiteBz") + ""); } else { builder.Append("我的战绩:盈利0" + ub.Get("SiteBz") + ""); } } else { builder.Append("我的战绩:盈利0" + ub.Get("SiteBz") + ""); } builder.Append(Out.Tab("</div>", "")); } } builder.Append(Out.Tab("<div>", Out.Hr())); builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=1"), "未开投注") + " "); builder.Append(Out.waplink(Utils.getUrl("myGuess.aspx?ptype=2"), "历史投注") + "<br />"); builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "返回球彩首页") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append(Out.waplink(Utils.getUrl("/default.aspx"), "首页") + "-"); builder.Append(Out.waplink(Utils.getPage("default.aspx"), "上级") + "-"); builder.Append(Out.waplink(Utils.getUrl("default.aspx"), "球彩") + ""); builder.Append(Out.Tab("</div>", "")); }
/// <summary> /// 遍历所有下注更新开奖 /// </summary> /// <param name="resultone"></param> /// <param name="resulttwo"></param> /// <param name="gid"></param> /// <param name="p_type"></param> private void UpdateCase(int resultone, int resulttwo, int gid, int p_type) { string strWhere = ""; int recordCount = 0; int p_intWin = 0; decimal p_intDuVal = 0; strWhere = "bcid=" + gid + ""; TPR2.Model.guess.BaOrder objBaOrder = new TPR2.Model.guess.BaOrder(); // 开始查询并更新之 IList <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPays(1, 5000, strWhere, out recordCount); if (listBaPay.Count > 0) { foreach (TPR2.Model.guess.BaPay n in listBaPay) { //------------------------------------------------------ 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 (p_type == 1) { if (n.PayType == 1 || n.PayType == 2) { new TPR2.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqsxCase(n), out p_intDuVal, out p_intWin); } else if (n.PayType == 3 || n.PayType == 4) { new TPR2.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 TPR2.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqbzCase(n), out p_intDuVal, out p_intWin); } else { new TPR2.BLL.guess.BaPay().UpdateCase(n, ZqClass.getZqScoreCase(n), out p_intDuVal, out p_intWin); } } else { if (n.PayType == 1 || n.PayType == 2) { new TPR2.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqsxCase(n), out p_intDuVal, out p_intWin); } else { new TPR2.BLL.guess.BaPay().UpdateCase(n, LqClass.getLqdxCase(n), out p_intDuVal, out p_intWin); } } 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 TPR2.BLL.guess.BaOrder().UpdateOrder(objBaOrder); //发送内线 if (Convert.ToInt32(n.itypes) == 0) { string strLog = string.Empty; 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 TPR2.BLL.guess.BaOrder().UpdateOrder(objBaOrder); } //------------------------------------------------------ } } }
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, "", ""); ///开奖状态更新标记 string dr = Utils.GetRequest("dr", "get", 1, "", ""); TPR2.BLL.guess.BaList bll = new TPR2.BLL.guess.BaList(); TPR2.Model.guess.BaList st = bll.GetModel(gid); if (st == null) { Utils.Error("不存在的记录", ""); } #region 立即更新水位 访问8bo string bo = ""; //-----------------------------立即更新水位--------------------------------- if (st.p_active == 0) { //读取SiteViewStatus 等于0时采用即时刷新,其他值时,通过刷新机刷新 //黄国军 20160223 if (ub.GetSub("SiteUpdateOpen", "/Controls/guess2.xml") == "" || ub.GetSub("SiteUpdateOpen", "/Controls/guess2.xml") == "0") { #region 进入旧版更新 if (st.p_basketve == 0) { if (st.p_type == 1) { if (st.p_ison == 1) { bo = new TPR2.Collec.Footbo().GetBoView_kb_old(Convert.ToInt32(st.p_id), true); } else { bo = new TPR2.Collec.Footbo().GetBoView_kb_old(Convert.ToInt32(st.p_id), false); //进行波胆更新 if (st.p_score != "") { bo = new TPR2.Collec.Footbd().FootbdPageHtml_kb_old(Convert.ToInt32(st.p_id)); } } } else { if (st.p_ison == 1) { bo = new TPR2.Collec.Basketbo().GetBoView_kb_old(Convert.ToInt32(st.p_id), true); } else { bo = new TPR2.Collec.Basketbo().GetBoView_kb_old(Convert.ToInt32(st.p_id), false); } } } else if (st.p_basketve == 9) { //载入页面更新足球上半场 if (st.p_type == 1) { string s = ""; if (st.p_ison == 1) { bo = new TPR2.Collec.Footbo().GetBoView_kb_old(Convert.ToInt32(st.p_id), true); bo = new TPR2.Collec.FootFalf().FootFalfPageHtml_kb_old(Convert.ToInt32(st.p_id), true, ref s); } else { bo = new TPR2.Collec.FootFalf().FootFalfPageHtml_kb_old(Convert.ToInt32(st.p_id), false, ref s); } } } #endregion } else { #region 进入新版更新 if (st.p_basketve == 0) { if (st.p_type == 1) { if (st.p_ison == 1) { bo = new TPR2.Collec.Footbo().GetBoView1(Convert.ToInt32(st.p_id), true); } else { bo = new TPR2.Collec.Footbo().GetBoView1(Convert.ToInt32(st.p_id), false); //进行波胆更新 if (st.p_score != "") { new TPR2.Collec.Footbd().FootbdPageHtml(Convert.ToInt32(st.p_id)); } } } else { if (st.p_ison == 1) { bo = new TPR2.Collec.Basketbo().GetBoView1(Convert.ToInt32(st.p_id), true); } else { bo = new TPR2.Collec.Basketbo().GetBoView1(Convert.ToInt32(st.p_id), false); } } } else if (st.p_basketve == 9) { //载入页面更新足球上半场 if (st.p_type == 1) { string s = ""; if (st.p_ison == 1) { bo = new TPR2.Collec.FootFalf().FootFalfPageHtml1(Convert.ToInt32(st.p_id), true, ref s); } else { bo = new TPR2.Collec.FootFalf().FootFalfPageHtml1(Convert.ToInt32(st.p_id), false, ref s); } } } #endregion } //篮球半场和单节 if (st.p_basketve == 1 || st.p_basketve == 3) { bo = "1"; } } #endregion //更新封盘不封盘 if (act == "luck1") { new TPR2.BLL.guess.BaList().Updatep_isluck2(gid, 1, 1); } else if (act == "luck2") { new TPR2.BLL.guess.BaList().Updatep_isluck2(gid, 1, 2); } else if (act == "luck3") { new TPR2.BLL.guess.BaList().Updatep_isluck2(gid, 1, 3); } else if (act == "noluck1") { new TPR2.BLL.guess.BaList().Updatep_isluck2(gid, 0, 1); } else if (act == "noluck2") { new TPR2.BLL.guess.BaList().Updatep_isluck2(gid, 0, 2); } else if (act == "noluck3") { new TPR2.BLL.guess.BaList().Updatep_isluck2(gid, 0, 3); } TPR2.Model.guess.BaList model = bll.GetModel(gid); Master.Title = model.p_one + "VS" + model.p_two; #region 更新隐藏与显示 //更新隐藏与显示 if (act == "yes") { //游戏日志记录 string[] p_pageArr = { "act", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")开放显示", gid); model.p_del = 0; new TPR2.BLL.guess.BaList().Updatep_del(model); } else if (act == "no") { //游戏日志记录 string[] p_pageArr = { "act", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")隐藏显示", gid); model.p_del = 1; new TPR2.BLL.guess.BaList().Updatep_del(model); } #endregion #region 更新抓取与不抓取 //更新抓取与不抓取 if (jc == "yes") { //游戏日志记录 string[] p_pageArr = { "jc", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")开启抓取", gid); model.p_jc = 0; new TPR2.BLL.guess.BaList().Updatep_jc(model); } else if (jc == "no") { //游戏日志记录 string[] p_pageArr = { "jc", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")关闭抓取", gid); model.p_jc = 1; new TPR2.BLL.guess.BaList().Updatep_jc(model); } #endregion #region 更新开奖方式:自动或人工 //更新抓取与不抓取 if (dr == "0") { //游戏日志记录 string[] p_pageArr = { "dr", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")设置为自动开奖", gid); model.p_dr = 0; new TPR2.BLL.guess.BaList().Updatep_dr(model); } else if (dr == "1") { //游戏日志记录 string[] p_pageArr = { "dr", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")设置为人工开奖", gid); model.p_dr = 1; new TPR2.BLL.guess.BaList().Updatep_dr(model); } #endregion #region 除赛事 //删除赛事 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 + "&act=delok1"), "删除,不包含下注记录") + "<br />"); builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&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(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号删除赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")", gid); new TPR2.BLL.guess.BaList().Delete(gid); if (act == "delok2") { TPR2.BLL.guess.BaPay bll2 = new TPR2.BLL.guess.BaPay(); new TPR2.BLL.guess.BaPay().Deletebcid(gid); } Utils.Success("删除赛事", "删除赛事成功..", Utils.getUrl("default.aspx"), "1"); } } #endregion #region 转换成滚球模式 //转换成" + ub.Get("SiteGqText") + "模式 else if (act == "once" || act == "onceok") { 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(130), 0); } else { p_oncetime = DT.FormatDate(Convert.ToDateTime(model.p_oncetime), 0); } builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("确定要转换成" + ub.Get("SiteGqText") + "下注模式吗"); 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", "all", 2, DT.RegexTime, "请正确填写封盘时间")); if (Convert.ToDateTime(model.p_TPRtime) > oncetime) { Utils.Error("封盘时间应大于开赛时间", ""); } //游戏日志记录 string[] p_pageArr = { "oncetime", "act", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号编辑赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")成为" + ub.Get("SiteGqText") + "", gid); new TPR2.BLL.guess.BaList().FootOnceType(gid, oncetime); Utils.Success("转换" + ub.Get("SiteGqText") + "", "转换成功..", Utils.getUrl("showguess.aspx?gid=" + gid + ""), "1"); } } #endregion #region 赛事分析 else if (act == "analysis") { Master.Title = "赛事分析"; builder.Append(Out.Tab("<div class=\"title\">即时赛事分析</div>", "")); builder.Append(Out.Tab("<div>", "")); string strAnal = string.Empty; if (model.p_type == 1) { strAnal = new TPR2.Collec.Analysis().GetAnalysisFoot(0, Convert.ToInt32(model.p_id), gid); if (strAnal == "暂无数据。") { strAnal = new TPR2.Collec.Analysis().GetAnalysisFoot(1, Convert.ToInt32(model.p_id), gid); } } else { strAnal = new TPR2.Collec.Analysis().GetAnalysisBasket(0, Convert.ToInt32(model.p_id), gid); if (strAnal == "暂无数据。") { strAnal = new TPR2.Collec.Analysis().GetAnalysisBasket(1, Convert.ToInt32(model.p_id), gid); } } if (strAnal != "") { builder.Append("" + strAnal + ""); } else { builder.Append("暂无记录.."); } builder.Append(Out.Tab("</div>", Out.Hr())); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getPage("showGuess.aspx?gid=" + gid + ""), "返回上级") + ""); builder.Append(Out.Tab("</div>", "<br />")); } #endregion #region 波胆设置 else if (act == "score") { Master.Title = "波胆盘设置"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append(model.p_title + ":" + model.p_one + "VS" + model.p_two); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); builder.Append("〓波胆盘〓<br />"); builder.Append("主胜↔客胜↔打和"); builder.Append(Out.Tab("</div>", "<br />")); string strText = "1:0,0:1,0:0,/,2:0,0:2,1:1,/,3:0,0:3,2:2,/,4:0,0:4,3:3,/,2:1,1:2,4:4,/,3:1,1:3,/,4:1,1:4,/,3:2,2:3,/,4:2,2:4,/,4:3,3:4,/,主净胜5球或以上,/,客净胜5球或以上,/,其他胆,,,,,,"; string strName = "score10,score01,score00,,score20,score02,score11,,score30,score03,score22,,score40,score04,score33,,score21,score12,score44,,score31,score13,,score41,score14,,score32,score23,,score42,score24,,score43,score34,,score5z,,score5k,,scoreot,gid,act"; string strType = "small,small,small,hr,small,small,small,hr,small,small,small,hr,small,small,small,hr,small,small,small,hr,small,small,hr,small,small,hr,small,small,hr,small,small,hr,small,small,hr,small,hr,small,hr,small,hidden,hidden"; string strValu = ""; if (!string.IsNullOrEmpty(model.p_score)) { string[] score = model.p_score.Split(','); string other = "15"; if (score.Length > 27) { other = score[27].Split('|')[1]; } strValu = "" + score[0].Split('|')[1] + "'" + score[1].Split('|')[1] + "'" + score[2].Split('|')[1] + "''" + score[3].Split('|')[1] + "'" + score[4].Split('|')[1] + "'" + score[5].Split('|')[1] + "''" + score[6].Split('|')[1] + "'" + score[7].Split('|')[1] + "'" + score[8].Split('|')[1] + "''" + score[9].Split('|')[1] + "'" + score[10].Split('|')[1] + "'" + score[11].Split('|')[1] + "''" + score[12].Split('|')[1] + "'" + score[13].Split('|')[1] + "'" + score[14].Split('|')[1] + "''" + score[15].Split('|')[1] + "'" + score[16].Split('|')[1] + "''" + score[17].Split('|')[1] + "'" + score[18].Split('|')[1] + "''" + score[19].Split('|')[1] + "'" + score[20].Split('|')[1] + "''" + score[21].Split('|')[1] + "'" + score[22].Split('|')[1] + "''" + score[23].Split('|')[1] + "'" + score[24].Split('|')[1] + "''" + score[25].Split('|')[1] + "''" + score[26].Split('|')[1] + "''" + other + "'" + gid + "'scoreok"; } else { strValu = "''''''''''''''''''''''''''''''''''''''''" + gid + "'scoreok"; } string strEmpt = "true,true,true,,true,true,true,,true,true,true,,true,true,true,,true,true,true,,true,true,,true,true,,true,true,,true,true,,true,true,,true,,true,true,true,true,true,true,false,false"; string strIdea = "倍 '倍 '倍 ''倍 '倍 '倍 ''倍 '倍 '倍 ''倍 '倍 '倍 ''倍 '倍 '倍 ''倍 '倍 ''倍 '倍 ''倍 '倍 ''倍 '倍 ''倍 '倍 ''倍 ''倍 '''倍 ''倍 '倍 ''倍 ''倍 '''倍 ''倍 '倍 ''倍 ''倍 '''倍 ''倍 '倍 ''倍 ''倍 ''|/"; string strOthe = "确定编辑,showGuess.aspx,post,3,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("温馨提示:当某项不开放投注或无赔率时,请填写-1<br />"); builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?act=scoreok2&gid=" + gid + ""), "[取消本场波胆]") + "<br />"); builder.Append(Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + ""), "返回上级") + ""); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"); builder.Append(Out.Tab("</div>", "<br />")); } #endregion #region 游戏日志记录 else if (act == "scoreok") { //游戏日志记录 string[] p_pageArr = { "act", "gid", "score10", "score01", "score00", "score20", "score02", "score11", "score30", "score03", "score22", "score40", "score04", "score33", "score21", "score12", "score44", "score31", "score13", "score41", "score14", "score32", "score23", "score42", "score24", "score43", "score34", "score5z", "score5k", "scoreot" }; BCW.User.GameLog.GameLogPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事编辑波胆" + model.p_one + "VS" + model.p_two + "(" + gid + ")", gid); decimal score10 = Convert.ToDecimal(Utils.GetRequest("score10", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写1赔率,小数点后保留1-2位")); decimal score01 = Convert.ToDecimal(Utils.GetRequest("score01", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写2赔率,小数点后保留1-2位")); decimal score00 = Convert.ToDecimal(Utils.GetRequest("score00", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写3赔率,小数点后保留1-2位")); decimal score20 = Convert.ToDecimal(Utils.GetRequest("score20", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写4赔率,小数点后保留1-2位")); decimal score02 = Convert.ToDecimal(Utils.GetRequest("score02", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写5赔率,小数点后保留1-2位")); decimal score11 = Convert.ToDecimal(Utils.GetRequest("score11", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写6赔率,小数点后保留1-2位")); decimal score30 = Convert.ToDecimal(Utils.GetRequest("score30", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写7赔率,小数点后保留1-2位")); decimal score03 = Convert.ToDecimal(Utils.GetRequest("score03", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写8赔率,小数点后保留1-2位")); decimal score22 = Convert.ToDecimal(Utils.GetRequest("score22", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写9赔率,小数点后保留1-2位")); decimal score40 = Convert.ToDecimal(Utils.GetRequest("score40", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写10赔率,小数点后保留1-2位")); decimal score04 = Convert.ToDecimal(Utils.GetRequest("score04", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写11赔率,小数点后保留1-2位")); decimal score33 = Convert.ToDecimal(Utils.GetRequest("score33", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写12赔率,小数点后保留1-2位")); decimal score21 = Convert.ToDecimal(Utils.GetRequest("score21", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写13赔率,小数点后保留1-2位")); decimal score12 = Convert.ToDecimal(Utils.GetRequest("score12", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写14赔率,小数点后保留1-2位")); decimal score44 = Convert.ToDecimal(Utils.GetRequest("score44", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写15赔率,小数点后保留1-2位")); decimal score31 = Convert.ToDecimal(Utils.GetRequest("score31", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写16赔率,小数点后保留1-2位")); decimal score13 = Convert.ToDecimal(Utils.GetRequest("score13", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写17赔率,小数点后保留1-2位")); decimal score41 = Convert.ToDecimal(Utils.GetRequest("score41", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写18赔率,小数点后保留1-2位")); decimal score14 = Convert.ToDecimal(Utils.GetRequest("score14", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写19赔率,小数点后保留1-2位")); decimal score32 = Convert.ToDecimal(Utils.GetRequest("score32", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写20赔率,小数点后保留1-2位")); decimal score23 = Convert.ToDecimal(Utils.GetRequest("score23", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写21赔率,小数点后保留1-2位")); decimal score42 = Convert.ToDecimal(Utils.GetRequest("score42", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写22赔率,小数点后保留1-2位")); decimal score24 = Convert.ToDecimal(Utils.GetRequest("score24", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写23赔率,小数点后保留1-2位")); decimal score43 = Convert.ToDecimal(Utils.GetRequest("score43", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写24赔率,小数点后保留1-2位")); decimal score34 = Convert.ToDecimal(Utils.GetRequest("score34", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写25赔率,小数点后保留1-2位")); decimal score5z = Convert.ToDecimal(Utils.GetRequest("score5z", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写26赔率,小数点后保留1-2位")); decimal score5k = Convert.ToDecimal(Utils.GetRequest("score5k", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写27赔率,小数点后保留1-2位")); decimal scoreot = Convert.ToDecimal(Utils.GetRequest("scoreot", "post", 2, @"^-1$|^(\d)*(\.(\d){1,2})?$", "请正确填写27赔率,小数点后保留1-2位")); string score = ""; score += "1:0|" + score10 + ",0:1|" + score01 + ",0:0|" + score00 + ",2:0|" + score20 + ",0:2|" + score02 + ",1:1|" + score11 + ",3:0|" + score30 + ",0:3|" + score03 + ",2:2|" + score22 + ""; score += ",4:0|" + score40 + ",0:4|" + score04 + ",3:3|" + score33 + ",2:1|" + score21 + ",1:2|" + score12 + ",4:4|" + score44 + ""; score += ",3:1|" + score31 + ",1:3|" + score13 + ",4:1|" + score41 + ",1:4|" + score14 + ",3:2|" + score32 + ",2:3|" + score23 + ",4:2|" + score42 + ",2:4|" + score24 + ",4:3|" + score43 + ",3:4|" + score34 + ",5z|" + score5z + ",5k|" + score5k + ",ot|" + scoreot; new TPR2.BLL.guess.BaList().Updatep_score(gid, score); Utils.Success("波胆设置", "波胆设置成功..", Utils.getUrl("showguess.aspx?act=score&gid=" + gid + ""), "1"); } #endregion #region 清空波胆 else if (act == "scoreok2") { //游戏日志记录 string[] p_pageArr = { "act", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事清空波胆" + model.p_one + "VS" + model.p_two + "(" + gid + ")", gid); new TPR2.BLL.guess.BaList().Updatep_score(gid, ""); Utils.Success("清空波胆", "清空波胆成功..", Utils.getUrl("showguess.aspx?act=score&gid=" + gid + ""), "1"); } #endregion #region 注受限设置 else if (act == "xz") { Master.Title = "下注受限设置"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("下注受限设置"); builder.Append(Out.Tab("</div>", "")); string strText = "全场受限ID(全局设置|用#分隔):/,上盘受限ID(用#分隔):/,下盘受限ID(用#分隔):/,大盘受限(用#分隔):/,小盘受限(用#分隔):/,,"; string strName = "ID0,ID1,ID2,ID3,ID4,gid,act"; string strType = "text,text,text,text,text,hidden,hidden"; string strValu = "" + model.xID0 + "'" + model.xID1 + "'" + model.xID2 + "'" + model.xID3 + "'" + model.xID4 + "'" + gid + "'xzok"; string strEmpt = "true,true,true,true,true,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 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>", "<br />")); builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("../default.aspx") + "\">返回管理中心</a>"); builder.Append(Out.Tab("</div>", "<br />")); } #endregion #region 设置受限ID else if (act == "xzok") { //游戏日志记录 string[] p_pageArr = { "act", "gid", "ID0", "ID1", "ID2", "ID3", "ID4" }; BCW.User.GameLog.GameLogPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事设置受限ID" + model.p_one + "VS" + model.p_two + "(" + gid + ")", gid); string ID0 = Utils.GetRequest("ID0", "post", 3, @"^[^\#]{1,50}(?:\#[^\#]{1,50}){0,500}$", "填写错误"); string ID1 = Utils.GetRequest("ID1", "post", 3, @"^[^\#]{1,50}(?:\#[^\#]{1,50}){0,500}$", "填写错误"); string ID2 = Utils.GetRequest("ID2", "post", 3, @"^[^\#]{1,50}(?:\#[^\#]{1,50}){0,500}$", "填写错误"); string ID3 = Utils.GetRequest("ID3", "post", 3, @"^[^\#]{1,50}(?:\#[^\#]{1,50}){0,500}$", "填写错误"); string ID4 = Utils.GetRequest("ID4", "post", 3, @"^[^\#]{1,50}(?:\#[^\#]{1,50}){0,500}$", "填写错误"); new TPR2.BLL.guess.BaList().UpdatexID(gid, ID0, 0); new TPR2.BLL.guess.BaList().UpdatexID(gid, ID1, 1); new TPR2.BLL.guess.BaList().UpdatexID(gid, ID2, 2); new TPR2.BLL.guess.BaList().UpdatexID(gid, ID3, 3); new TPR2.BLL.guess.BaList().UpdatexID(gid, ID4, 4); Utils.Success("下注受限", "下注受限设置成功..", Utils.getUrl("showguess.aspx?act=xz&gid=" + gid + ""), "1"); } #endregion #region 全局封盘 if (act == "luck") { //游戏日志记录 string[] p_pageArr = { "act", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")全局封盘", gid); new TPR2.BLL.guess.BaList().Updatep_isluck(gid, 1); Utils.Success("全局封盘", "全局封盘成功,所有会员将不能下注本场,需要手工解除封盘才可以..", Utils.getUrl("showguess.aspx?gid=" + gid + ""), "2"); } #endregion #region 全局解封 if (act == "noluck") { //游戏日志记录 string[] p_pageArr = { "act", "gid" }; BCW.User.GameLog.GameLogGetPage(1, Utils.getPageUrl(), p_pageArr, "后台管理员" + ManageId + "号将赛事" + model.p_one + "VS" + model.p_two + "(" + gid + ")全局解封", gid); new TPR2.BLL.guess.BaList().Updatep_isluck(gid, 0); Utils.Success("全局解封", "全局解封成功,所有会员可以下注了..", Utils.getUrl("showguess.aspx?gid=" + gid + ""), "2"); } #endregion 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&fly=" + model.p_title + ""), model.p_title) + ":" + model.p_one + "VS" + model.p_two); #region 受限提示 if (model.xID0 != "" || model.xID1 != "" || model.xID2 != "" || model.xID3 != "" || model.xID4 != "") { builder.Append("(有受限)"); } #endregion #region 波胆 builder.Append("<br />开赛:" + DT.FormatDate(Convert.ToDateTime(model.p_TPRtime), 0)); if (model.p_type == 1) { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?act=score&gid=" + gid + ""), "[波胆]")); builder.AppendFormat("|" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&p=100"), "{0}注") + "", new TPR2.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 100)); } #endregion #region 完场比分 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 { builder.Append("<br />比赛状态:" + Convertp_once(model.p_once) + ""); } builder.Append("<br />即时比分:" + model.p_result_temp1 + ":" + model.p_result_temp2 + ""); } builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?act=analysis&gid=" + gid + ""), "[析]")); builder.Append(Out.Tab("</div>", "<br />")); string hp_one = ""; string hp_two = ""; if (model.p_type == 1) { if (model.p_hp_one > 0) { hp_one = "<img src=\"/Files/sys/guess/redcard" + model.p_hp_one + ".gif\" alt=\"红" + model.p_hp_one + "\"/>"; } if (model.p_hp_two > 0) { hp_two = "<img src=\"/Files/sys/guess/redcard" + model.p_hp_two + ".gif\" alt=\"红" + model.p_hp_two + "\"/>"; } } #endregion #region 处理封盘状态 int Min = 0; try { Min = Convert.ToInt32(model.p_once.ToString().Replace("'", "").Replace("+", "")); } catch { } if (model.p_type == 1) { if (Min > 41 && Min < 46 || Min > 87 || (model.p_once == "中" && model.p_basketve == 9)) { model.p_isluck = 1; } } #endregion #region 让球盘 builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("〓让球盘〓"); if (model.p_ison == 1) { if (model.p_isluckone == 0) { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=luck1"), "封")); } else { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=noluck1"), "解封")); } } if (((model.p_ison == 1 && model.p_isluckone == 1) || model.p_isluck == 1) && model.p_active == 0) { builder.Append("<b>(封)</b>"); } else if (bo == "") { builder.Append("<b>(停)</b>"); } builder.AppendFormat("<br />{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&p=1"), "{1}注"), model.p_one + "" + hp_one + "(" + Convert.ToDouble(model.p_one_lu) + ")", new TPR2.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 + "&p=2"), "{1}注"), model.p_two + "" + hp_two + "(" + Convert.ToDouble(model.p_two_lu) + ")", new TPR2.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 2)); #endregion #region 大小盘 if (model.p_big_lu != 0) { builder.Append("<br />〓大小盘〓"); if (model.p_ison == 1) { if (model.p_islucktwo == 0) { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=luck2"), "封")); } else { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=noluck2"), "解封")); } } if (((model.p_ison == 1 && model.p_islucktwo == 1) || model.p_isluck == 1) && model.p_active == 0) { builder.Append("<b>(封)</b>"); } else if (bo == "") { builder.Append("<b>(停)</b>"); } builder.AppendFormat("<br />" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&p=3"), "{0}注") + "{1}", new TPR2.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 + "&p=4"), "{1}注"), "小(" + Convert.ToDouble(model.p_small_lu) + ")", new TPR2.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 4)); } #endregion #region 标准盘 if (model.p_bzs_lu != 0) { builder.Append("<br />〓标准盘〓"); if (model.p_ison == 1) { if (model.p_isluckthr == 0) { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=luck3"), "封")); } else { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=noluck3"), "解封")); } } if (((model.p_ison == 1 && model.p_isluckthr == 1) || model.p_isluck == 1) && model.p_active == 0) { builder.Append("<b>(封)</b>"); } else if (bo == "") { builder.Append("<b>(停)</b>"); } builder.AppendFormat("<br />{0}" + Out.waplink(Utils.getUrl("plGuess.aspx?gid=" + model.ID + "&p=5"), "{1}注"), "主胜(" + Convert.ToDouble(model.p_bzs_lu) + ")", new TPR2.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 + "&p=6"), "{1}注"), "平手(" + Convert.ToDouble(model.p_bzp_lu) + ")", new TPR2.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 + "&p=7"), "{1}注"), "客胜(" + Convert.ToDouble(model.p_bzx_lu) + ")", new TPR2.BLL.guess.BaPay().GetCount(model.ID, Convert.ToInt32(model.p_type), 7)); } builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); #endregion #region 统计 邵广林 20160817 增加机器人盈利分析 long PayCents = new TPR2.BLL.guess.BaPay().GetBaPayCent(model.ID, Convert.ToInt32(model.p_type)); long PayCents_robot = new TPR2.BLL.guess.BaPay().GetBaPayCent_robot(model.ID, Convert.ToInt32(model.p_type)); builder.Append("" + ub.Get("SiteBz") + "统计:<br />会员总注数:" + new TPR2.BLL.guess.BaPay().GetBaPayNum(model.ID, Convert.ToInt32(model.p_type)) + "/会员下注额:" + PayCents + ""); builder.Append("<br />机器总注数:" + new TPR2.BLL.guess.BaPay().GetBaPayNum_robot(model.ID, Convert.ToInt32(model.p_type)) + "/机器下注额:" + PayCents_robot + ""); if (model.p_result_one != null && model.p_result_two != null) { long WinMoney = new TPR2.BLL.guess.BaPay().GetBaPaygetMoney("bcid=" + gid + " and Types=0 and isrobot=0"); long WinMoney_robot = new TPR2.BLL.guess.BaPay().GetBaPaygetMoney("bcid=" + gid + " and Types=0 and isrobot=1"); builder.Append("<br />会员总返彩:" + WinMoney + "/会员盈利额:" + (PayCents - WinMoney) + ""); builder.Append("<br />机器总返彩:" + WinMoney_robot + "/机器盈利额:" + (PayCents_robot - WinMoney_robot) + ""); } #endregion #region 〓管理〓 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 + "&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 + "&act=no"), "隐藏")); } else { builder.Append(" " + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=yes"), "显示")); } if (model.p_jc == 0) { builder.Append("<br />抓取状态:正常抓取<br />" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&jc=no"), "关闭抓取")); } else { builder.Append("<br />抓取状态:停止抓取<br />" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&jc=yes"), "开启抓取")); } if (model.p_dr == 0) { builder.Append("<br />开奖方式:自动开奖<br />" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&dr=1"), "人工开奖")); } else { builder.Append("<br />开奖方式:人工开奖<br />" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&dr=0"), "自动开奖")); } if (model.p_ison == 1) { builder.Append("<br />" + ub.Get("SiteGqText") + "状态:" + ub.Get("SiteGqText") + ""); } else { builder.Append("<br />" + ub.Get("SiteGqText") + "状态:非" + ub.Get("SiteGqText") + ""); } builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=once"), "编辑")); builder.Append("<br />8bo:" + model.p_id + "<br />"); if (model.p_isluck == 0) { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=luck"), "全局封盘")); } else { builder.Append("" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=noluck"), "全局解封")); } builder.Append("<br />" + Out.waplink(Utils.getUrl("showGuess.aspx?gid=" + gid + "&act=xz"), "本场受限ID")); builder.Append("<br />" + Out.waplink(Utils.getUrl("../forumlog.aspx?act=gamelog&ptype=2&gid=" + gid + "&backurl=" + Utils.PostPage(1) + ""), "" + ub.Get("SiteGqText") + "失败日志")); builder.Append("<br />" + Out.waplink(Utils.getUrl("../forumlog.aspx?act=gamelog&ptype=1&gid=" + gid + "&backurl=" + Utils.PostPage(1) + ""), "操作日志")); builder.Append("<br />" + Out.waplink(Utils.getUrl("../forumlog.aspx?act=gameowe&ptype=1&gid=" + gid + "&backurl=" + Utils.PostPage(1) + ""), "欠币日志")); #endregion 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 />")); } }
protected void Page_Load(object sender, EventArgs e) { string act = Utils.GetRequest("act", "get", 1, "", ""); if (act == "seach") { #region 搜索排行榜 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)); #endregion } else if (act == "todaytop") { #region 昨日神猜 Master.Title = "昨日神猜"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("昨日神猜Top10"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); DateTime dt = DateTime.Parse(DateTime.Now.ToLongDateString()); string dt1 = dt.AddDays(-1).AddHours(12).ToString(); string dt2 = dt.AddHours(12).ToString(); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 10 payusid,Count(DISTINCT bcid) as payCount", "p_TPRtime >= '" + dt1 + "' AND p_TPRtime <= '" + dt2 + "' and itypes=0 and types = 0 and p_active>0 and p_getMoney>paycent group by payusid order by Count(DISTINCT bcid) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("[第" + (i + 1) + "名]<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + ds.Tables[0].Rows[i]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString())) + "</a>(获胜" + ds.Tables[0].Rows[i]["payCount"] + "场)<br />"); } } else { builder.Append("暂无数据..<br />"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx"), "返回排行首页") + ""); builder.Append("<br />注:一场比赛获胜多场时只算胜一场,平盘、走盘不计,赢半算赢一场"); builder.Append("<br />昨日时间计算:上一天(昨天)12:00~当天中午12:00"); builder.Append(Out.Tab("</div>", "")); #endregion } else if (act == "todaytop2") { #region 一周神猜 Master.Title = "一周神猜"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("一周神猜Top10"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); string dt3 = Convert.ToDateTime(DT.GetWeekStart()).AddHours(12).ToString(); string dt4 = Convert.ToDateTime(DT.GetWeekOver()).AddHours(12).ToString(); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 10 payusid,Count(DISTINCT bcid) as payCount", "p_TPRtime >= '" + dt3 + "' AND p_TPRtime <= '" + dt4 + "' and itypes=0 and types = 0 and p_active>0 and p_getMoney>paycent group by payusid order by Count(DISTINCT bcid) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("[第" + (i + 1) + "名]<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + ds.Tables[0].Rows[i]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString())) + "</a>(获胜" + ds.Tables[0].Rows[i]["payCount"] + "场)<br />"); } } else { builder.Append("暂无数据..<br />"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx"), "返回排行首页") + ""); builder.Append("<br />注:一场比赛获胜多场时只算胜一场,平盘、走盘不计,赢半算赢一场"); builder.Append("<br />一周时间计算:按自然周,从本周星期一中午12:00~当天中午12:00"); builder.Append(Out.Tab("</div>", "")); #endregion } else if (act == "todaystar") { #region 昨日之星 Master.Title = "昨日之星"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("昨日之星Top10"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); DateTime dt = DateTime.Parse(DateTime.Now.ToLongDateString()); string dt1 = dt.AddDays(-1).AddHours(12).ToString(); string dt2 = dt.AddHours(12).ToString(); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 10 payusid,sum(p_getMoney-payCent) as payCents", "p_TPRtime >= '" + dt1 + "' AND p_TPRtime <= '" + dt2 + "' and itypes=0 and types = 0 and p_active>0 group by payusid order by sum(p_getMoney-payCent) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("[第" + (i + 1) + "名]<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + ds.Tables[0].Rows[i]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString())) + "</a>(净赚" + Convert.ToDouble(ds.Tables[0].Rows[i]["payCents"]) + "" + ub.Get("SiteBz") + ")<br />"); } } else { builder.Append("暂无数据..<br />"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx"), "返回排行首页") + ""); builder.Append("<br />注:昨日时间计算:上一天(昨天)12:00~当天中午12:00"); builder.Append(Out.Tab("</div>", "")); #endregion } else if (act == "todaystar2") { #region 一周之星 Master.Title = "一周之星"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("一周之星Top10"); builder.Append(Out.Tab("</div>", "<br />")); builder.Append(Out.Tab("<div>", "")); string dt3 = Convert.ToDateTime(DT.GetWeekStart()).AddHours(12).ToString(); string dt4 = Convert.ToDateTime(DT.GetWeekOver()).AddHours(12).ToString(); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("TOP 10 payusid,sum(p_getMoney-payCent) as payCents", "p_TPRtime >= '" + dt3 + "' AND p_TPRtime <= '" + dt4 + "' and itypes=0 and types = 0 and p_active>0 group by payusid order by sum(p_getMoney-payCent) desc"); if (ds != null && ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { builder.Append("[第" + (i + 1) + "名]<a href=\"" + Utils.getUrl("../uinfo.aspx?uid=" + ds.Tables[0].Rows[i]["payusid"].ToString() + "&backurl=" + Utils.PostPage(1) + "") + "\">" + BCW.User.Users.SetUser(int.Parse(ds.Tables[0].Rows[i]["payusid"].ToString())) + "</a>(净赚" + Convert.ToDouble(ds.Tables[0].Rows[i]["payCents"]) + "" + ub.Get("SiteBz") + ")<br />"); } } else { builder.Append("暂无数据..<br />"); } builder.Append(Out.Tab("</div>", "")); builder.Append(Out.Tab("<div>", "")); builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx"), "返回排行首页") + ""); builder.Append("<br />注:一周时间计算:按自然周,从本周星期一中午12:00~当天中午12:00"); builder.Append(Out.Tab("</div>", "")); #endregion } //else if (act == "ReWardSent")//奖励发放页 //{ // builder.Append(act); //} else { if (act == "ReWard")//奖励发放确认 { string bcing = Utils.GetRequest("bcing", "get", 1, "", ""); if (bcing == "ok") { string ae = Utils.GetRequest("ae", "get", 1, "", ""); #region 发放前输出 Master.Title = "" + "奖励发放"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("../game/default.aspx") + "\">游戏</a>>"); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">球彩竞猜</a>>"); builder.Append("<a href=\"" + Utils.getUrl("topGuess.aspx") + "\">" + "排行榜" + "</a>>奖励发放"); builder.Append(Out.Tab("</div>", "<br />")); int[] IdRe1 = new int[11]; long[] Top = new long[11]; IdRe1[1] = int.Parse(Utils.GetRequest("IdRe1", "all", 1, "", "10086")); IdRe1[2] = int.Parse(Utils.GetRequest("IdRe2", "all", 1, "", "10086")); IdRe1[3] = int.Parse(Utils.GetRequest("IdRe3", "all", 1, "", "10086")); IdRe1[4] = int.Parse(Utils.GetRequest("IdRe4", "all", 1, "", "10086")); IdRe1[5] = int.Parse(Utils.GetRequest("IdRe5", "all", 1, "", "10086")); IdRe1[6] = int.Parse(Utils.GetRequest("IdRe6", "all", 1, "", "10086")); IdRe1[7] = int.Parse(Utils.GetRequest("IdRe7", "all", 1, "", "10086")); IdRe1[8] = int.Parse(Utils.GetRequest("IdRe8", "all", 1, "", "10086")); IdRe1[9] = int.Parse(Utils.GetRequest("IdRe9", "all", 1, "", "10086")); IdRe1[10] = int.Parse(Utils.GetRequest("IdRe10", "all", 1, "", "10086")); Top[1] = Convert.ToInt64(Utils.GetRequest("top1", "all", 1, "", "")); // Utils.Error(""+Top[1]+"",""); Top[2] = Convert.ToInt64(Utils.GetRequest("top2", "all", 1, "", "")); Top[3] = Convert.ToInt64(Utils.GetRequest("top3", "all", 1, "", "")); Top[4] = Convert.ToInt64(Utils.GetRequest("top4", "all", 1, "", "")); Top[5] = Convert.ToInt64(Utils.GetRequest("top5", "all", 1, "", "")); Top[6] = Convert.ToInt64(Utils.GetRequest("top6", "all", 1, "", "")); Top[7] = Convert.ToInt64(Utils.GetRequest("top7", "all", 1, "", "")); Top[8] = Convert.ToInt64(Utils.GetRequest("top8", "all", 1, "", "")); Top[9] = Convert.ToInt64(Utils.GetRequest("top9", "all", 1, "", "")); Top[10] = Convert.ToInt64(Utils.GetRequest("top10", "all", 1, "", "")); int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[0-3]$", "1")); // int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-3]$", "1")); DateTime startstate = Utils.ParseTime(Utils.GetRequest("startstate", "all", 2, DT.RegexTime, "开始时间填写无效")); DateTime endstate = Utils.ParseTime(Utils.GetRequest("endstate", "all", 2, DT.RegexTime, "结束时间填写无效")); int pageIndex = int.Parse(Utils.GetRequest("pageIndex", "all", 1, @"^[1-9]\d*$", "1")); // string rewardid = Utils.GetRequest("rewardid", "post", 2, @"^[\s\S]{1,500}$", "当前页无可操作用户"); string wdy = ""; if (pageIndex == 1) { wdy = "TOP10"; } else { wdy = "TOP" + (pageIndex - 1).ToString() + "1-" + pageIndex.ToString() + "0"; } // Utils.Error(""+ wdy + "",""); builder.Append(Out.Tab("<div class=\"text\">", "")); builder.Append("正在发放"); switch (ptype) { case 1: builder.Append("<font color =\"red\">《赌神榜》" + wdy + "奖励</font>"); wdy = "《赌神榜》" + wdy; break; case 2: builder.Append("<font color =\"red\">《狂人榜》" + wdy + "奖励</font>"); wdy = "《狂人榜》" + wdy; break; } builder.Append(",是否确认发放?"); builder.Append(Out.Tab("</div>", "<br/>")); #endregion if (ae == "ok") { #region 开始发放 for (int i = 1; i <= 10; i++) { if (Top[i] != 0) { // Utils.Error(""+Top[3]+"=="+ IdRe1[1] + "",""); new BCW.BLL.User().UpdateiGold(IdRe1[i], Top[i], "竞猜排行榜奖励"); //发内线 string strLog = "您在" + startstate.ToString("yyyy年MM月dd日 HH:MM") + "至" + endstate.ToString("yyyy年MM月dd日 HH:MM") + "里在游戏《虚拟竞猜》" + wdy + "上取得了第" + i + "名的好成绩,系统奖励了" + Top[i] + "" + ub.Get("SiteBz") + "[url=/bbs/guess2/default.aspx]进入《虚拟竞猜》[/url]"; new BCW.BLL.Guest().Add(0, IdRe1[i], new BCW.BLL.User().GetUsName(IdRe1[i]), strLog); //动态 string mename = new BCW.BLL.User().GetUsName(IdRe1[i]); string wText = "[url=/bbs/uinfo.aspx?uid=" + IdRe1[i] + "]" + mename + "[/url]在[url=/bbs/guess2/default.aspx]竞猜[/url]" + wdy + "上取得了第" + i + "名的好成绩,系统奖励了" + Top[i] + "" + ub.Get("SiteBz"); new BCW.BLL.Action().Add(1, 0, IdRe1[i], "", wText); } } Utils.Success("奖励操作", "TOP奖励操作成功,内线动态已发送!3s后返回...", Utils.getUrl("topGuess.aspx"), "3"); #endregion } else { // Utils.Error("" + acing + "---" + "", ""); #region 确认发放 builder.Append(Out.Tab("<div>", "")); builder.Append("时间从:" + startstate.ToString("yyy-MM-dd HH:mm:ss") + "到" + endstate.ToString("yyy-MM-dd HH:mm:ss") + "<br/>"); for (int j = 1; j <= 10; j++) { if (j == 10) { builder.Append("TOP" + j + ":" + IdRe1[j] + ". " + "奖励<font color=\"red\"> " + Top[j] + "" + "</font> " + ub.Get("SiteBz") + " "); } else { builder.Append("TOP" + j + ":" + IdRe1[j] + ". " + "奖励<font color=\"red\"> " + Top[j] + "" + "</font> " + ub.Get("SiteBz") + " <br/>"); } } string strText2 = ",,,,,,,,,,,,,,,,,,,,,,,,,,,"; string strName2 = "ptype,pageIndex,ae,endstate,startstate,bcing,act,top1,top2,top3,top4,top5,top6,top7,top8,top9,top10,IdRe1,IdRe2,IdRe3,IdRe4,IdRe5,IdRe6,IdRe7,IdRe8,IdRe9,IdRe10"; string strType2 = "hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,hidden,"; string strValu2 = ptype + "'" + pageIndex + "'" + "ok'" + endstate.ToString("yyy-MM-dd HH:mm:ss") + "'" + startstate.ToString("yyy-MM-dd HH:mm:ss") + "'" + "ok'" + "ReWard'" + Top[1] + "'" + Top[2] + "'" + Top[3] + "'" + Top[4] + "'" + Top[5] + "'" + Top[6] + "'" + Top[7] + "'" + Top[8] + "'" + Top[9] + "'" + Top[10] + "'" + IdRe1[1] + "'" + IdRe1[2] + "'" + IdRe1[3] + "'" + IdRe1[4] + "'" + IdRe1[5] + "'" + IdRe1[6] + "'" + IdRe1[7] + "'" + IdRe1[8] + "'" + IdRe1[9] + "'" + IdRe1[10]; string strEmpt2 = "true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true"; string strIdea2 = "/"; string strOthe2 = "确定发放,topGuess.aspx, post,1,red"; builder.Append(Out.wapform(strText2, strName2, strType2, strValu2, strEmpt2, strIdea2, strOthe2)); builder.Append("<br/><a href=\"" + Utils.getUrl("topGuess.aspx") + "\">" + "再看看吧" + "</a>"); builder.Append(Out.Tab("</div>", "")); #endregion } } else { #region 提交发放奖励 Master.Title = "" + "奖励发放"; builder.Append(Out.Tab("<div class=\"title\">", "")); builder.Append("<a href=\"" + Utils.getUrl("../game/default.aspx") + "\">游戏</a>>"); builder.Append("<a href=\"" + Utils.getUrl("default.aspx") + "\">球彩竞猜</a>>"); builder.Append("<a href=\"" + Utils.getUrl("topGuess.aspx") + "\">" + "排行榜" + "</a>>奖励发放"); builder.Append(Out.Tab("</div>", "<br />")); int ptype = int.Parse(Utils.GetRequest("ptype", "all", 1, @"^[1-3]$", "1")); DateTime startstate = Utils.ParseTime(Utils.GetRequest("startstate", "all", 2, DT.RegexTime, "开始时间填写无效")); DateTime endstate = Utils.ParseTime(Utils.GetRequest("endstate", "all", 2, DT.RegexTime, "结束时间填写无效")); //string startstate = (Utils.GetRequest("startstate", "all", 1, @"^([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})(((0[13578]|1[02])(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8])))$", "20150101")); //string endstate = (Utils.GetRequest("endstate", "all", 1, @"^([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})(((0[13578]|1[02])(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8])))$", "20501231")); int pageIndex = int.Parse(Utils.GetRequest("pageIndex", "all", 1, @"^[1-9]\d*$", "1")); string rewardid = Utils.GetRequest("rewardid", "post", 2, @"^[\s\S]{1,500}$", "当前页无可操作用户");//"727#727#727#727#727#727#727#727#727#727#"; //builder.Append(Out.Tab("<div class=\"hr\"></div>", Out.Hr())); string wdy = ""; if (pageIndex == 1) { wdy = "TOP10"; } else { wdy = "TOP" + (pageIndex - 1).ToString() + "1-" + pageIndex.ToString() + "0"; } builder.Append(Out.Tab("<div>", "")); switch (ptype) { case 1: builder.Append("<font color =\"red\">《赌神榜》" + wdy + "奖励发放:</font>"); break; case 2: builder.Append("<font color =\"red\">《狂人榜》" + wdy + "奖励发放:</font>"); break; } builder.Append(Out.Tab("</div>", "")); int mzj = (pageIndex - 1) * 10; string[] IdRe = rewardid.Split('#'); // Utils.Error("" + ptype + "", ""); // Utils.Error(""+rewardid+"",""); try { string strText2 = ",,,,TOP" + (mzj + 1) + ":" + IdRe[0] + " ,,TOP" + (mzj + 2) + ":" + IdRe[1] + " ,,TOP" + (mzj + 3) + ":" + IdRe[2] + " ,,TOP" + (mzj + 4) + ":" + IdRe[3] + " ,,TOP" + (mzj + 5) + ":" + IdRe[4] + " ,,TOP" + (mzj + 6) + ":" + IdRe[5] + " ,,TOP" + (mzj + 7) + ":" + IdRe[6] + " ,,TOP" + (mzj + 8) + ":" + IdRe[7] + " ,,TOP" + (mzj + 9) + ":" + IdRe[8] + " ,,TOP" + pageIndex * 10 + ":" + IdRe[9] + " ,"; string strName2 = "pageIndex,ptype,startstate,endstate,top1,IdRe1,top2,IdRe2,top3,IdRe3,top4,IdRe4,top5,IdRe5,top6,IdRe6,top7,IdRe7,top8,IdRe8,top9,IdRe9,top10,IdRe10"; string strType2 = "hidden,hidden,hidden,hidden,num,hidden,num,hidden,num,hidden,num,hidden,num,hidden,num,hidden,num,hidden,num,hidden,num,hidden,num,hidden"; string strValu2 = pageIndex + "'" + ptype + "'" + DT.FormatDate(startstate, 0) + "'" + DT.FormatDate(endstate, 0) + "'" + "0'" + IdRe[0] + "'0'" + IdRe[1] + "'0'" + IdRe[2] + "'0'" + IdRe[3] + "'0'" + IdRe[4] + "'0'" + IdRe[5] + "'0'" + IdRe[6] + "'0'" + IdRe[7] + "'0'" + IdRe[8] + "'0'" + IdRe[9] + "'0"; string strEmpt2 = "true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true"; string strIdea2 = "/"; string strOthe2 = "提交,topGuess.aspx?act=ReWard&bcing=ok&ae=not&,post,1,red"; builder.Append(Out.wapform(strText2, strName2, strType2, strValu2, strEmpt2, strIdea2, strOthe2)); } catch { builder.Append(Out.Tab("<div>", "<br/>")); builder.Append("当页少于10人,无法发放!"); builder.Append(Out.Tab("</div>", "")); } builder.Append(Out.Tab("</div>", Out.Hr())); #endregion } } else//正常模式 { #region 查询开始 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.AddMonths(-1); DateTime OverTime = DateTime.Now; //组件查询条件 string strWhere = ""; 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") + "")); } #region 项 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&ptype=" + ptype + "&showtype=" + showtype + ""), "总榜") + " "); } if (p_type == 1) { builder.Append("足球 "); } else { builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=1&ptype=" + ptype + "&showtype=" + showtype + ""), "足球") + " "); } if (p_type == 2) { builder.Append("篮球 "); } else { builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=2&ptype=" + ptype + "&showtype=" + showtype + ""), "篮球") + " "); } builder.Append("<br />单:"); if (ptype == 1) { builder.Append("赌神榜 "); } else { builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=" + p_type + "&ptype=1&showtype=" + showtype + ""), "赌神榜") + " "); } if (ptype == 2) { builder.Append("狂人榜 "); } else { builder.Append(Out.waplink(Utils.getUrl("topGuess.aspx?p_type=" + p_type + "&ptype=2&showtype=" + showtype + ""), "狂人榜") + " "); } builder.Append(Out.Tab("</div>", "<br />")); #endregion 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 + "' "; } } if (act == "timespan")//增加时间段查询前10ID { StartTime = Utils.ParseTime(Utils.GetRequest("StartTime", "all", 1, "", "开始时间格式填写出错,正确格式如" + DateTime.Now.ToString("yyy-MM-dd HH:mm:ss") + "")); OverTime = Utils.ParseTime(Utils.GetRequest("OverTime", "all", 1, "", "结束时间格式填写出错,正确格式如" + DateTime.Now.ToString("yyy-MM-dd HH:mm:ss") + "")); // Utils.Error("" + StartTime + "", ""); strWhere += " and p_TPRtime>='" + StartTime + "'and p_TPRtime<'" + OverTime + "' "; } string rewardid = ""; 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 <TPR2.Model.guess.BaPay> listBaPay = new TPR2.BLL.guess.BaPay().GetBaPayTop2(pageIndex, pageSize, strWhere, ptype, out recordCount); if (listBaPay.Count > 0) { int k = 1; foreach (TPR2.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}&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}&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)); } if (act == "timespan") { rewardid = rewardid + n.payusid.ToString() + "#"; } builder.Append(Out.Tab("</div>", "")); k++; } // 分页 builder.Append(BasePage.MultiPage(pageIndex, pageSize, recordCount, Utils.getPageUrl(), pageValUrl, "page", 0)); } else { builder.Append(Out.Div("div", "没有相关记录..")); } #endregion if (p_type == 0 && showtype == 0)//总榜 { //top 奖励发放 string strText = "开始日期:/,结束日期:/,"; string strName = "StartTime,OverTime,backurl"; string strType = "date,date,hidden"; string strValu = string.Empty; //if (Utils.ToSChinese(ac) != "马上查询") { //strValu = "" + DT.FormatDate(DateTime.Now.AddDays(-1), 0) + "'" + DT.FormatDate(DateTime.Now, 0) + "'" + Utils.getPage(0) + ""; } //else { strValu = StartTime.ToString("yyy-MM-dd HH:mm:ss") + "'" + OverTime.ToString("yyy-MM-dd HH:mm:ss") + "'" + Utils.getPage(0) + ""; } string strEmpt = "false,false,false"; string strIdea = "/"; string strOthe = "马上查询,topGuess.aspx?act=timespan&ptype=" + ptype + "&,post,1,red"; builder.Append(Out.wapform(strText, strName, strType, strValu, strEmpt, strIdea, strOthe)); if (Utils.ToSChinese(act) != "timespan") { builder.Append(Out.Tab("<div>", Out.Hr())); builder.Append("排行榜奖励提示:<br/>"); builder.Append("如需发放奖励,请按日期查询."); builder.Append(Out.Tab("</div>", "")); } else { string wdy = ""; string type = ""; if (ptype == 1) { type = "赌神榜"; } else { type = "狂人榜"; } if (pageIndex == 1) { wdy = "TOP10"; } else { wdy = "TOP" + (pageIndex - 1).ToString() + "1-" + pageIndex.ToString() + "0"; } if (rewardid != "") { builder.Append(Out.Tab("<div>", Out.Hr())); builder.Append("<font color =\"red\">" + type + wdy + " </font>的用户ID分别是:" + rewardid); builder.Append(Out.Tab("</div>", "")); string strText2 = ",,,,"; string strName2 = "startstate,endstate,pageIndex,rewardid,backurl"; string strType2 = "hidden,hidden,hidden,hidden,hidden"; string strValu2 = DT.FormatDate(StartTime, 0) + "'" + DT.FormatDate(OverTime, 0) + "'" + pageIndex + "'" + rewardid + "'" + Utils.getPage(0) + ""; string strEmpt2 = "true,true,false"; string strIdea2 = "/"; string strOthe2 = wdy + "奖励发放,topGuess.aspx?act=ReWard&ptype=" + ptype + "&showtype=0&,post,1,red"; builder.Append(Out.wapform(strText2, strName2, strType2, strValu2, strEmpt2, strIdea2, strOthe2)); } } } int meid = new BCW.User.Users().GetUsId(); if (meid > 0) { builder.Append(Out.Tab("<div>", Out.Hr())); DataSet ds = new TPR2.BLL.guess.BaPay().GetBaPayList("sum(p_getMoney-payCent) as WinCents", " payusid=" + meid + " and types=0 and itypes=0 and p_active>0"); if (ds != null && ds.Tables[0].Rows.Count > 0) { string win = ds.Tables[0].Rows[0]["WinCents"].ToString(); if (!string.IsNullOrEmpty(win)) { builder.Append("我的战绩:盈利" + Convert.ToDouble(win) + "" + ub.Get("SiteBz") + ""); } else { builder.Append("我的战绩:盈利0" + ub.Get("SiteBz") + ""); } } else { builder.Append("我的战绩:盈利0" + ub.Get("SiteBz") + ""); } 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 />")); }