Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Response.Expires = 0;
     base.IsUserLoginByMobile();
     this.userName = this.Session["user_name"].ToString();
     this.uModel   = base.GetUserModelInfo;
 }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.userName = HttpContext.Current.Session["user_name"].ToString();
            this.uModel   = base.GetUserModelInfo;
            DataTable lotteryList = base.GetLotteryList();

            this.masterIDSplit = base.GetLotteryMasterID(lotteryList).Split(new char[] { ',' });
            CookieHelper.RemoveCookie("cookiesreportprev");
            string str = LSRequest.qq("id");

            if (string.IsNullOrEmpty(str))
            {
                this.masterId = this.masterIDSplit[0];
            }
            else
            {
                int num = 100;
                if (str.Equals(num.ToString()))
                {
                    this.masterId = "1";
                }
                else
                {
                    this.masterId = "2";
                }
            }
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.masterId = base.q("masterId");
            this.op       = LSRequest.qq("op");
            DataSet list            = CallBLL.cz_lottery_bll.GetList();
            string  lotteryMasterID = base.GetLotteryMasterID(list.Tables[0]);

            if (string.IsNullOrEmpty(this.masterId))
            {
                this.masterId = lotteryMasterID.Split(new char[] { ',' })[0];
            }
            this.beginDate = LSRequest.qq("beginDate");
            this.userName  = HttpContext.Current.Session["user_name"].ToString();
            this.uModel    = this.Session[this.userName + "lottery_session_user_info"] as cz_userinfo_session;
            int num = 1;

            if (this.masterId.Equals(num.ToString()))
            {
                this.sixDataTable = CallBLL.cz_betold_six_bll.GetReportByWeek(this.userName, this.uModel.get_su_type(), this.beginDate);
            }
            else
            {
                this.kcDataTable = CallBLL.cz_betold_kc_bll.GetReportByWeek(this.userName, this.uModel.get_su_type(), this.beginDate, base.get_BetTime_KC());
            }
            CookieHelper.SetCookie("cookiesreportprev", "reportweek.aspx");
        }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires = 0;
        base.IsUserLoginByMobile();
        this.caizhong = base.qq("caizhong");
        this.wanfa    = base.qq("wanfa");
        this.jiangqi  = base.qq("jiangqi");
        this.txtMomey = base.qq("txtMomey");
        this.data_str = base.qq("data");
        if ((((this.caizhong == "") || (this.wanfa == "")) || ((this.jiangqi == "") || (this.data_str == ""))) || (this.txtMomey == ""))
        {
            base.Response.End();
        }
        this.r_url = "KL10_" + this.wanfa + ".aspx?lottery_type=" + this.caizhong + "&player_type=" + this.wanfa;
        DataTable table = CallBLL.cz_phase_kl10_bll.GetIsClosedByTime(int.Parse(this.jiangqi)).Tables[0];

        if ((table != null) && (table.Rows.Count > 0))
        {
            if (table.Rows[0]["is_closed"].ToString().Trim() == "1")
            {
                base.Response.Write("<script>alert('該獎期已經截止下注!');window.location=\"" + this.r_url + "\";</script>");
                base.Response.End();
            }
            else
            {
                this.jiangqi_str = table.Rows[0]["phase"].ToString();
            }
        }
        else
        {
            base.Response.End();
        }
        this.uModel = base.GetUserModelInfo;
        string    str    = this.Session["user_name"].ToString();
        DataTable table2 = CallBLL.cz_users_bll.GetUserRate(str, 2).Tables[0];

        if (table2 == null)
        {
            base.Response.End();
        }
        this.pk_kind = table2.Rows[0]["kc_kind"].ToString().Trim();
        string[] strArray = this.data_str.Split(new char[] { '|' });
        this.s_count = strArray.Length;
        this.s_momey = int.Parse(this.txtMomey) * strArray.Length;
        string str2 = "";

        foreach (string str3 in strArray)
        {
            string[] strArray2 = str3.Split(new char[] { ',' })[0].Split(new char[] { '_' });
            str2 = str2 + strArray2[3].ToString().Trim() + ",";
        }
        str2 = str2.Substring(0, str2.Length - 1);
        DataSet playOddsByID = CallBLL.cz_odds_kl10_bll.GetPlayOddsByID(str2);

        this.plDT = playOddsByID.Tables[0];
        if ((this.plDT == null) || (this.plDT.Rows.Count == 0))
        {
            base.Response.End();
        }
    }
Esempio n. 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string str = HttpContext.Current.Session["user_name"].ToString();
        cz_userinfo_session getUserModelInfo = base.GetUserModelInfo;
        string    str2          = LSRequest.qq("ispay");
        string    str3          = LSRequest.qq("orderid");
        DataTable betByOrdernum = CallBLL.cz_bet_kc_bll.GetBetByOrdernum(str3, str2);

        if (betByOrdernum != null)
        {
            string str4  = betByOrdernum.Rows[0]["play_id"].ToString();
            string str5  = betByOrdernum.Rows[0]["odds_id"].ToString();
            string str6  = betByOrdernum.Rows[0]["play_name"].ToString();
            string str7  = betByOrdernum.Rows[0]["bet_group"].ToString();
            string str8  = betByOrdernum.Rows[0]["bet_wt"].ToString();
            string odds  = betByOrdernum.Rows[0]["odds"].ToString();
            string str10 = betByOrdernum.Rows[0]["phase_id"].ToString();
            string str11 = betByOrdernum.Rows[0]["lottery_type"].ToString();
            this.is_payment = betByOrdernum.Rows[0]["is_payment"].ToString();
            string s     = betByOrdernum.Rows[0]["amount"].ToString();
            string str13 = betByOrdernum.Rows[0]["unit_cnt"].ToString();
            s = (double.Parse(s) / double.Parse(str13)).ToString();
            double drawback = 0.0;
            string str14    = getUserModelInfo.get_su_type();
            if (str14 != null)
            {
                if (!(str14 == "dl"))
                {
                    if (str14 == "zd")
                    {
                        drawback = double.Parse(betByOrdernum.Rows[0]["dl_drawback"].ToString());
                    }
                    else if (str14 == "gd")
                    {
                        drawback = double.Parse(betByOrdernum.Rows[0]["zd_drawback"].ToString());
                    }
                    else if (str14 == "fgs")
                    {
                        drawback = double.Parse(betByOrdernum.Rows[0]["gd_drawback"].ToString());
                    }
                }
                else
                {
                    drawback = double.Parse(betByOrdernum.Rows[0]["hy_drawback"].ToString());
                }
            }
            drawback = double.Parse(betByOrdernum.Rows[0]["amount"].ToString()) * (drawback / 100.0);
            if (this.is_payment.Equals("1"))
            {
                this.groupString = this.GetBetGroupStringPaymentTrue(str11, str10, str4, str5, str6, str7, str8, odds, s, drawback);
            }
            else
            {
                this.groupString = this.GetBetGroupStringPaymentFalse(str4, str5, str6, str7, str8, odds, s);
            }
        }
    }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.userName = HttpContext.Current.Session["user_name"].ToString();
            this.uModel   = this.Session[this.userName + "lottery_session_user_info"] as cz_userinfo_session;
            DataTable lotteryList = base.GetLotteryList();

            this.masterIDSplit = base.GetLotteryMasterID(lotteryList).Split(new char[] { ',' });
            CookieHelper.RemoveCookie("cookiesreportprev");
        }
Esempio n. 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            cz_userinfo_session _session = new cz_userinfo_session();

            _session = this.Session[this.Session["user_name"].ToString() + "lottery_session_user_info"] as cz_userinfo_session;
            string str = _session.get_u_name().Trim();

            this.skin = _session.get_u_skin();
            DataSet newList = CallBLL.cz_login_log_bll.GetNewList(str, 50);

            if ((newList != null) && (newList.Tables.Count > 0))
            {
                this.DT = newList.Tables[0];
            }
        }
Esempio n. 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires = 0;
        base.IsUserLoginByMobile();
        string str = this.Session["user_name"].ToString();
        cz_userinfo_session getUserModelInfo = base.GetUserModelInfo;

        this.u_type = getUserModelInfo.get_u_type().Trim();
        DataSet newList = CallBLL.cz_login_log_bll.GetNewList(str, 50);

        if ((newList != null) && (newList.Tables.Count > 0))
        {
            this.dtable = newList.Tables[0];
        }
    }
Esempio n. 9
0
        public void MemberPageBase_Mobile_Load(object sender, EventArgs e)
        {
            cz_userinfo_session _session = HttpContext.Current.Session[HttpContext.Current.Session["user_name"] + "lottery_session_user_info"] as cz_userinfo_session;

            if (_session != null)
            {
                if ((this.Session["Session_LoginSystem_Flag"]) != "LoginSystem_PhoneWeb")
                {
                    this.Session.Abandon();
                    base.Response.Write("<script>top.location.href='/m'</script>");
                    base.Response.End();
                }
                this.IsOpenLottery();
                this.RedirectReport();
            }
        }
Esempio n. 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Response.Expires = 0;
     base.IsUserLoginByMobileForAjax();
     this.userName = this.Session["user_name"].ToString();
     this.uModel   = base.GetUserModelInfo;
     if (!string.IsNullOrEmpty(base.q("page")))
     {
         this.page = Convert.ToInt32(base.q("page"));
     }
     this.FiledValue   = new string[0];
     this.sixDataTable = CallBLL.cz_bet_six_bll.GetBetByPageList(this.userName, this.page - 1, this.pageSize, ref this.pageCount, ref this.dataCount).Tables[0];
     if (this.page > this.pageCount)
     {
         this.sixDataTable = null;
     }
 }
Esempio n. 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires      = 0;
        base.Response.CacheControl = "no-cache";
        base.Response.AddHeader("Pragma", "No-Cache");
        base.IsUserLoginByMobile();
        this.userName = this.Session["user_name"].ToString();
        this.uModel   = base.GetUserModelInfo;
        if (!string.IsNullOrEmpty(base.q("page")))
        {
            this.page = Convert.ToInt32(base.q("page"));
        }
        this.FiledValue  = new string[0];
        this.kcDataTable = CallBLL.cz_bet_kc_bll.GetBetByPageList(this.userName, this.page - 1, this.pageSize, ref this.pageCount, ref this.dataCount).Tables[0];
        if (this.dataCount == 0)
        {
            this.cssdisplay = "display:none;";
        }
        else
        {
            this.cssdisplay = "display:block;";
        }
        DataTable table = CallBLL.cz_bet_kc_bll.Phone_GetBetByUName(this.userName);

        if (table.Rows.Count > 0)
        {
            int    num  = 0;
            double num2 = 0.0;
            foreach (DataRow row in table.Rows)
            {
                if (row[2].ToString().Equals("0"))
                {
                    num  += int.Parse(row[0].ToString());
                    num2 += double.Parse(row[1].ToString());
                }
            }
            this.count_order = num.ToString();
            this.sum_money   = num2.ToString();
        }
        if (string.IsNullOrEmpty(this.sum_money))
        {
            this.sum_money = "0";
        }
    }
Esempio n. 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.Response.Buffer          = true;
            base.Response.ExpiresAbsolute = DateTime.Now.AddSeconds(-1.0);
            base.Response.Expires         = 0;
            base.Response.CacheControl    = "no-cache";
            base.Response.AddHeader("Pragma", "No-Cache");
            base.IsUserLoginByMobile();
            base.IsUserLoginByMobileForAjax();
            this.findDate = LSRequest.qq("findDate");
            if (!string.IsNullOrEmpty(base.q("page")))
            {
                this.page = Convert.ToInt32(base.q("page"));
            }
            this.userName = this.Session["user_name"].ToString();
            this.uModel   = base.GetUserModelInfo;
            string str = this.uModel.get_su_type().ToString().Trim();

            if (str != null)
            {
                if (!(str == "dl"))
                {
                    if (str == "zd")
                    {
                        this.u_drawback = "dl_drawback";
                    }
                    else if (str == "gd")
                    {
                        this.u_drawback = "zd_drawback";
                    }
                    else if (str == "fgs")
                    {
                        this.u_drawback = "gd_drawback";
                    }
                }
                else
                {
                    this.u_drawback = "hy_drawback";
                }
            }
            this.dataTable = CallBLL.cz_betold_six_bll.Phone_GetReportByPageList(this.userName, this.page - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.findDate + " 08:00:00", this.findDate + " 23:59:59").Tables[0];
        }
Esempio n. 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires = 0;
        base.IsUserLoginByMobile();
        int    num = base.get_current_master_id();
        string str = num.ToString();

        if (num == 0)
        {
            str = "0,1,2";
        }
        else if (num == 1)
        {
            str = "0,1";
        }
        else
        {
            str = "0,2";
        }
        string str2 = HttpContext.Current.Session["user_name"].ToString();
        cz_userinfo_session getUserModelInfo = base.GetUserModelInfo;
        DataTable           table            = null;

        table = base.get_ad_cache(str);
        if (table != null)
        {
            DataRow[] source = base.get_ad_select(ref table, getUserModelInfo.get_u_type(), 1);
            if ((source.Count <DataRow>() > 0) && (source[0]["allow_show"].ToString() == "0"))
            {
                this.adContent = source[0]["ad_content"].ToString();
            }
        }
        if (this.adContent == "")
        {
            base.Response.Redirect("Main.aspx");
        }
    }
Esempio n. 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.ajaxErrorLogSwitch = FileCacheHelper.get_AjaxErrorLogSwitch();
            string str = ConfigurationManager.AppSettings["CloseIndexRefresh"];

            if ((str != "true") && PageBase.IsNeedPopBrower())
            {
                this.Session.Abandon();
                base.Response.Write("<script>top.location.href='/'</script>");
                base.Response.End();
            }
            this.lotteryDT = base.GetLotteryList();
            this.masterids = base.GetLotteryMasterID(this.lotteryDT);
            int num = 0;

            foreach (DataRow row in this.lotteryDT.Rows)
            {
                if (num.Equals(0))
                {
                    this.firstLotteryId = row["id"].ToString();
                }
                num++;
                break;
            }
            if (FileCacheHelper.get_GetDefaultLottery() != "n")
            {
                bool flag = false;
                foreach (DataRow row in this.lotteryDT.Rows)
                {
                    if (row["id"].ToString().Equals(FileCacheHelper.get_GetDefaultLottery()))
                    {
                        flag = true;
                        break;
                    }
                }
                if (flag)
                {
                    this.firstLotteryId = FileCacheHelper.get_GetDefaultLottery();
                }
                this.useNowMenuId = "1";
            }
            if (this.lotteryDT != null)
            {
                Dictionary <string, object> lotteryMenuCfg = base.GetLotteryMenuCfg(this.lotteryDT);
                this.menuCfg = JsonHandle.ObjectToJson(lotteryMenuCfg);
            }
            if (HttpContext.Current.Session["user_name"] == null)
            {
                base.Response.End();
            }
            this.userName = HttpContext.Current.Session["user_name"].ToString();
            this.uModel   = HttpContext.Current.Session[this.userName + "lottery_session_user_info"] as cz_userinfo_session;
            this.skin     = this.uModel.get_u_skin();
            if (str != "true")
            {
                this.browserCode = Utils.Number(4);
                PageBase.SetBrowerFlag(this.browserCode);
            }
            DataTable table = CallBLL.cz_users_bll.GetCredit(this.userName, this.uModel.get_su_type()).Tables[0];

            this.six_credit        = string.Format("{0:F0}", double.Parse(table.Rows[0]["six_credit"].ToString()));
            this.kc_credit         = string.Format("{0:F0}", double.Parse(table.Rows[0]["kc_credit"].ToString()));
            this.six_usable_credit = string.Format("{0:F0}", double.Parse(table.Rows[0]["six_usable_credit"].ToString()));
            this.kc_usable_credit  = string.Format("{0:F0}", double.Parse(table.Rows[0]["kc_usable_credit"].ToString()));
            this.six_iscash        = table.Rows[0]["six_iscash"].ToString();
            this.kc_iscash         = table.Rows[0]["kc_iscash"].ToString();
            CacheHelper.RemoveAllCache("LmGroupCount_Cache");
        }
Esempio n. 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires = 0;
        base.IsUserLoginByMobile();
        cz_userinfo_session getUserModelInfo = base.GetUserModelInfo;
        string str  = LSRequest.qq("hdnsubmit");
        string str2 = LSRequest.qq("VIP_PWD_old");
        string str3 = LSRequest.qq("VIP_PWD");
        string str4 = LSRequest.qq("VIP_PWD1");

        if (str.Equals("submit"))
        {
            if ((string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3)) || string.IsNullOrEmpty(str4))
            {
                base.Response.Write("請輸入完整的密碼!");
                base.Response.End();
            }
            if (str3 == str2)
            {
                base.Response.Write("新密碼和舊密碼不能相同!");
                base.Response.End();
            }
            if (str3 != str4)
            {
                base.Response.Write("新密碼和確認新密碼不一致!");
                base.Response.End();
            }
            if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
            {
                if (base.get_GetPasswordLU().Equals("1"))
                {
                    base.Response.Write("<script>alert('密碼要8-20位,且必需包含大寫字母、小寫字母和数字!');</script>");
                }
                else
                {
                    base.Response.Write("<script>alert('密碼要8-20位,且必需包含字母、和数字!');</script>");
                }
                base.Response.End();
            }
            cz_users _users = CallBLL.cz_users_bll.UserLogin(this.Session["user_name"].ToString());
            if (_users != null)
            {
                string str5 = _users.get_salt().Trim();
                string str6 = DESEncrypt.EncryptString(str2, str5);
                if (_users.get_u_psw() != str6)
                {
                    base.Response.Write("您輸入原密碼不正確!");
                    base.Response.End();
                }
                else
                {
                    string ramSalt = Utils.GetRamSalt(6);
                    string str8    = DESEncrypt.EncryptString(str3, ramSalt);
                    if (CallBLL.cz_users_bll.UpUserPwd(this.Session["user_name"].ToString(), str8, ramSalt) > 0)
                    {
                        if (CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["user_name"].ToString()) > 0)
                        {
                            MemberPageBase.log_user_reset_password(this.Session["user_name"].ToString(), this.Session["modifypassword"]);
                            base.Response.Write("true");
                            base.Response.End();
                        }
                        else
                        {
                            base.Response.Write("修改密碼不成功!");
                            base.Response.End();
                        }
                    }
                    else
                    {
                        base.Response.Write("修改密碼不成功!");
                        base.Response.End();
                    }
                }
            }
        }
    }
Esempio n. 16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     string strResult = "";
     ReturnResult_Mobile mobile = new ReturnResult_Mobile();
     Dictionary<string, object> dictionary = new Dictionary<string, object>();
     dictionary.Add("type", "user_login");
     string str2 = LSRequest.qq("loginName").Trim();
     string str3 = LSRequest.qq("loginPwd").Trim();
     string str4 = LSRequest.qq("ValidateCode").Trim();
     if (PageBase.is_ip_locked())
     {
         this.Session["lottery_session_img_code"] = null;
         mobile.set_status(2);
         mobile.set_msg("由於輸入錯誤次數過多,您已被禁用,請稍後再試!");
         strResult = JsonHandle.ObjectToJson(mobile);
         base.OutJson(strResult);
     }
     else if (string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3))
     {
         base.Response.End();
     }
     else
     {
         DateTime time;
         if (int.Parse(FileCacheHelper.get_GetLockedPasswordCount()) == 0)
         {
             this.Session["lottery_session_img_code_display"] = 1;
         }
         if (this.Session["lottery_session_img_code_display"] == null)
         {
             if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str2))
             {
                 if (PageBase.IsErrTimesAbove(ref time, str2))
                 {
                     if (!PageBase.IsErrTimeout(time))
                     {
                         this.Session["lottery_session_img_code"] = null;
                         mobile.set_status(2);
                         mobile.set_msg("");
                         dictionary.Add("is_display_code", "1");
                         mobile.set_data(dictionary);
                         strResult = JsonHandle.ObjectToJson(mobile);
                         this.Session["lottery_session_img_code_display"] = 1;
                         base.OutJson(strResult);
                         return;
                     }
                     CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str2);
                     this.Session["lottery_session_img_code"] = null;
                     this.Session["lottery_session_img_code_display"] = 0;
                 }
                 else
                 {
                     this.Session["lottery_session_img_code"] = null;
                     this.Session["lottery_session_img_code_display"] = 0;
                 }
             }
             else
             {
                 this.Session["lottery_session_img_code"] = null;
                 this.Session["lottery_session_img_code_display"] = 0;
             }
         }
         if (this.Session["lottery_session_img_code_display"].ToString() == "0")
         {
             if (string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3))
             {
                 base.Response.End();
                 return;
             }
         }
         else
         {
             if (string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3))
             {
                 base.Response.End();
                 return;
             }
             if (string.IsNullOrEmpty(str4))
             {
                 this.Session["lottery_session_img_code"] = null;
                 mobile.set_status(2);
                 mobile.set_msg("");
                 dictionary.Add("is_display_code", "1");
                 mobile.set_data(dictionary);
                 strResult = JsonHandle.ObjectToJson(mobile);
                 this.Session["lottery_session_img_code_display"] = 1;
                 base.OutJson(strResult);
                 return;
             }
             if (this.Session["lottery_session_img_code"] == null)
             {
                 base.Response.End();
                 return;
             }
             if (this.Session["lottery_session_img_code"].ToString().ToLower() != str4.ToLower())
             {
                 this.Session["lottery_session_img_code"] = null;
                 mobile.set_status(2);
                 mobile.set_msg(PageBase.GetMessageByCache("u100004", "MessageHint"));
                 strResult = JsonHandle.ObjectToJson(mobile);
                 base.OutJson(strResult);
                 return;
             }
         }
         this.Session["lottery_session_img_code"] = null;
         cz_users _users = CallBLL.cz_users_bll.UserLogin(str2.ToLower());
         if (_users == null)
         {
             this.Session["lottery_session_img_code"] = null;
             PageBase.login_error_ip();
             mobile.set_status(2);
             mobile.set_msg(PageBase.GetMessageByCache("u100005", "MessageHint"));
             strResult = JsonHandle.ObjectToJson(mobile);
             base.OutJson(strResult);
         }
         else
         {
             string str6 = _users.get_retry_times().ToString();
             if (!string.IsNullOrEmpty(str6) && (int.Parse(str6) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
             {
                 if (!PageBase.IsLockedTimeout(str2, "master"))
                 {
                     this.Session["lottery_session_img_code"] = null;
                     mobile.set_status(2);
                     mobile.set_msg("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                     strResult = JsonHandle.ObjectToJson(mobile);
                     base.OutJson(strResult);
                     return;
                 }
                 PageBase.zero_retry_times(str2);
             }
             string str7 = _users.get_a_state().ToString();
             string str8 = PageBase.upper_user_status(_users.get_u_name().ToLower());
             if (str7 == "2")
             {
                 this.Session["lottery_session_img_code"] = null;
                 mobile.set_status(2);
                 mobile.set_msg(PageBase.GetMessageByCache("u100008", "MessageHint"));
                 strResult = JsonHandle.ObjectToJson(mobile);
                 base.OutJson(strResult);
             }
             else if (str8 == "2")
             {
                 this.Session["lottery_session_img_code"] = null;
                 mobile.set_status(2);
                 mobile.set_msg("您的上級帳號已被停用,请与管理员联系!");
                 strResult = JsonHandle.ObjectToJson(mobile);
                 base.OutJson(strResult);
             }
             else
             {
                 if (str7 == "1")
                 {
                     mobile.set_status(1);
                     mobile.set_msg(PageBase.GetMessageByCache("u100007", "MessageHint"));
                     strResult = JsonHandle.ObjectToJson(mobile);
                     this.Session["user_state"] = str7;
                 }
                 else if (str8 == "1")
                 {
                     mobile.set_status(1);
                     mobile.set_msg(PageBase.GetMessageByCache("u100010", "MessageHint"));
                     strResult = JsonHandle.ObjectToJson(mobile);
                     this.Session["user_state"] = str8;
                 }
                 else
                 {
                     this.Session["user_state"] = "0";
                     mobile.set_status(0);
                     strResult = JsonHandle.ObjectToJson(mobile);
                 }
                 string str9 = _users.get_salt().Trim();
                 string str10 = DESEncrypt.EncryptString(str3, str9);
                 if (_users.get_u_psw() != str10)
                 {
                     this.Session["lottery_session_img_code"] = null;
                     PageBase.inc_retry_times(str2);
                     PageBase.login_error_ip();
                     mobile.set_status(2);
                     mobile.set_msg(PageBase.GetMessageByCache("u100006", "MessageHint"));
                     strResult = JsonHandle.ObjectToJson(mobile);
                     if (this.Session["lottery_session_img_code_display"].ToString() == "0")
                     {
                         if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str2))
                         {
                             CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(str2);
                         }
                         else
                         {
                             CallBLL.cz_user_psw_err_log_bll.AddUser(str2);
                         }
                         if (PageBase.IsErrTimesAbove(ref time, str2))
                         {
                             this.Session["lottery_session_img_code"] = null;
                             mobile.set_status(2);
                             mobile.set_msg(PageBase.GetMessageByCache("u100006", "MessageHint"));
                             dictionary.Add("is_display_code", "1");
                             mobile.set_data(dictionary);
                             strResult = JsonHandle.ObjectToJson(mobile);
                             this.Session["lottery_session_img_code_display"] = 1;
                             base.OutJson(strResult);
                             return;
                         }
                     }
                     base.OutJson(strResult);
                 }
                 else
                 {
                     cz_userinfo_session _session = new cz_userinfo_session();
                     _session.set_u_id(_users.get_u_id());
                     _session.set_u_name(_users.get_u_name());
                     _session.set_u_nicker(_users.get_u_nicker());
                     _session.set_u_skin(_users.get_u_skin());
                     _session.set_u_type(_users.get_u_type());
                     _session.set_su_type(_users.get_su_type());
                     _session.set_kc_kind(_users.get_kc_kind().Trim());
                     _session.set_six_kind(_users.get_six_kind().Trim());
                     _session.set_u_psw(_users.get_u_psw().Trim());
                     _session.set_kc_rate_owner(_users.get_kc_rate_owner());
                     _session.set_six_rate_owner(_users.get_six_rate_owner());
                     DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo();
                     if (zJInfo != null)
                     {
                         _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim());
                     }
                     DataTable table2 = CallBLL.cz_rate_six_bll.GetRateByAccount(str2.ToLower()).Tables[0];
                     _session.get_six_session().set_fgsname(table2.Rows[0]["fgs_name"].ToString().Trim());
                     _session.get_six_session().set_gdname(table2.Rows[0]["gd_name"].ToString().Trim());
                     _session.get_six_session().set_zdname(table2.Rows[0]["zd_name"].ToString().Trim());
                     _session.get_six_session().set_dlname(table2.Rows[0]["dl_name"].ToString().Trim());
                     DataTable table3 = CallBLL.cz_rate_kc_bll.GetRateByAccount(str2.ToLower()).Tables[0];
                     _session.get_kc_session().set_fgsname(table3.Rows[0]["fgs_name"].ToString().Trim());
                     _session.get_kc_session().set_gdname(table3.Rows[0]["gd_name"].ToString().Trim());
                     _session.get_kc_session().set_zdname(table3.Rows[0]["zd_name"].ToString().Trim());
                     _session.get_kc_session().set_dlname(table3.Rows[0]["dl_name"].ToString().Trim());
                     _session.set_kc_rate_owner(new int?(Convert.ToInt32(table3.Rows[0]["kc_rate_owner"])));
                     _session.set_six_rate_owner(new int?(Convert.ToInt32(table2.Rows[0]["six_rate_owner"])));
                     DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(str2.ToLower());
                     if (userOpOdds != null)
                     {
                         if ((userOpOdds.Rows[0]["six_op_odds"] != null) && (userOpOdds.Rows[0]["six_op_odds"].ToString() != ""))
                         {
                             _session.set_six_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["six_op_odds"].ToString())));
                         }
                         if ((userOpOdds.Rows[0]["kc_op_odds"] != null) && (userOpOdds.Rows[0]["kc_op_odds"].ToString() != ""))
                         {
                             _session.set_kc_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["kc_op_odds"].ToString())));
                         }
                     }
                     _session.set_isPhone(1);
                     this.Session["user_name"] = str2.ToLower();
                     this.Session[str2 + "lottery_session_user_info"] = _session;
                     PageBase.SetAppcationFlag(str2);
                     if (FileCacheHelper.get_RedisStatOnline().Equals(1))
                     {
                         new PageBase_Redis().InitUserOnlineTopToRedis(str2, _session.get_u_type());
                     }
                     else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
                     {
                         new PageBase_Redis().InitUserOnlineTopToRedisStack(str2, _session.get_u_type());
                     }
                     else
                     {
                         MemberPageBase.stat_top_online(str2);
                         MemberPageBase.stat_online(str2, _session.get_u_type());
                     }
                     if (FileCacheHelper.get_RedisStatOnline().Equals(0))
                     {
                         PageBase.ZeroIsOutFlag(str2);
                     }
                     PageBase.zero_retry_times(str2);
                     CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str2);
                     cz_login_log _log = new cz_login_log();
                     _log.set_ip(LSRequest.GetIP());
                     _log.set_login_time(new DateTime?(DateTime.Now));
                     _log.set_u_name(str2);
                     _log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current));
                     CallBLL.cz_login_log_bll.Add(_log);
                     this.Session["Session_LoginSystem_Flag"] = "LoginSystem_PhoneWeb";
                     string str11 = _users.get_is_changed().ToString();
                     if (string.IsNullOrEmpty(str11))
                     {
                         this.Session["lottery_session_img_code"] = null;
                         mobile.set_status(550);
                         mobile.set_msg("新密碼首次登錄,需重置密碼!");
                         strResult = JsonHandle.ObjectToJson(mobile);
                         this.Session["modifypassword"] = "******";
                         base.OutJson(strResult);
                     }
                     else if (str11 == "0")
                     {
                         this.Session["lottery_session_img_code"] = null;
                         mobile.set_status(550);
                         mobile.set_msg("新密碼首次登錄,需重置密碼!");
                         strResult = JsonHandle.ObjectToJson(mobile);
                         this.Session["modifypassword"] = "******";
                         base.OutJson(strResult);
                     }
                     else
                     {
                         DateTime? nullable3;
                         DateTime? nullable = _users.get_last_changedate();
                         int num2 = PageBase.PasswordExpire();
                         if (nullable.HasValue && ((nullable3 = nullable).HasValue ? (nullable3.GetValueOrDefault() < DateTime.Now.AddDays((double) -num2)) : false))
                         {
                             this.Session["lottery_session_img_code"] = null;
                             mobile.set_status(550);
                             mobile.set_msg("密碼過期,需重置密碼!");
                             strResult = JsonHandle.ObjectToJson(mobile);
                             this.Session["modifypassword"] = "******";
                             base.OutJson(strResult);
                         }
                         else
                         {
                             CallBLL.cz_credit_lock_bll.Delete(_users.get_u_name());
                             mobile.set_status(0);
                             strResult = JsonHandle.ObjectToJson(mobile);
                             base.OutJson(strResult);
                         }
                     }
                 }
             }
         }
     }
 }
Esempio n. 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires = 0;
        base.IsUserLoginByMobile();
        this.caizhong  = base.qq("caizhong");
        this.game_type = base.qq("game_type");
        this.wanfa     = base.qq("wanfa");
        this.jiangqi   = base.qq("jiangqi");
        this.txtMomey  = base.qq("txtMomey");
        this.data_str  = base.qq("data");
        this.wt_value  = base.qq("uPI_WT");
        this.lmtype    = base.qq("lmtype");
        string str = base.qq("ids");

        this.group_odds  = base.qq("group_odds");
        this.numbers     = base.qq("numbers");
        this.str_numbers = this.numbers;
        this.str_numbers.Replace(',', '、');
        this.lx_numbers = base.qq("zodiac");
        this.lx_numbers.Replace(',', '、');
        string str2 = base.qq("plx");

        if (((((this.caizhong == "") || (this.wanfa == "")) || ((this.jiangqi == "") || (this.data_str == ""))) || (this.txtMomey == "")) || (this.game_type == ""))
        {
            this.EndTipInfo("参数错误!");
        }
        this.r_url = "SIX_" + this.game_type + ".aspx?lottery_type=" + this.caizhong + "&player_type=" + this.wanfa;
        Dictionary <string, object> source = new Dictionary <string, object>();

        string[] strArray = null;
        string   str3     = "";

        if (this.lmtype != "0")
        {
            strArray     = this.data_str.Split(new char[] { '|' });
            this.s_count = strArray.Length;
            this.s_momey = int.Parse(this.txtMomey) * strArray.Length;
            foreach (string str4 in strArray)
            {
                string[] strArray2 = str4.Split(new char[] { ',' })[0].Split(new char[] { '_' });
                str3 = str3 + strArray2[3].ToString().Trim() + ",";
            }
            str3 = str3.Substring(0, str3.Length - 1);
        }
        else
        {
            string[]  strArray3;
            string[]  strArray4;
            DataTable wTs;
            int       num3;
            int       num4;
            DataRow[] rowArray;
            double    num5;
            double    num6;
            strArray     = this.data_str.Split(new char[] { '|' });
            this.s_count = 1;
            foreach (string str4 in strArray)
            {
                string str5 = str4.Split(new char[] { ',' })[0];
                string key  = str5.Substring(str5.IndexOf("jeu_p_"));
                string str7 = str4.Split(new char[] { ',' })[1];
                source.Add(key, str7);
            }
            int    num  = source.Count <KeyValuePair <string, object> >();
            int    num2 = 0;
            string str8 = str.Split(new char[] { '_' })[1];
            str3 = str8;
            if (((str8.Equals("92285") || str8.Equals("92286")) || str8.Equals("92638")) || str8.Equals("92639"))
            {
                num2      = ((num * (num - 1)) * (num - 2)) / 6;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = null;
                if (str8.Equals("92285"))
                {
                    wTs = CallBLL.cz_wt_3qz_six_bll.GetWTs();
                }
                else if (str8.Equals("92286"))
                {
                    wTs = CallBLL.cz_wt_3z2_six_bll.GetWTs();
                }
                else if (str8.Equals("92638"))
                {
                    wTs = CallBLL.cz_wt_3qz_b_six_bll.GetWTs();
                }
                else if (str8.Equals("92639"))
                {
                    wTs = CallBLL.cz_wt_3z2_b_six_bll.GetWTs();
                }
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if ((((str8.Equals("92287") || str8.Equals("92288")) || (str8.Equals("92289") || str8.Equals("92640"))) || str8.Equals("92641")) || str8.Equals("92642"))
            {
                num2      = (num * (num - 1)) / 2;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = null;
                if (str8.Equals("92287"))
                {
                    wTs = CallBLL.cz_wt_2qz_six_bll.GetWTs();
                }
                else if (str8.Equals("92288"))
                {
                    wTs = CallBLL.cz_wt_2zt_six_bll.GetWTs();
                }
                else if (str8.Equals("92289"))
                {
                    wTs = CallBLL.cz_wt_tc_six_bll.GetWTs();
                }
                else if (str8.Equals("92640"))
                {
                    wTs = CallBLL.cz_wt_2qz_b_six_bll.GetWTs();
                }
                else if (str8.Equals("92641"))
                {
                    wTs = CallBLL.cz_wt_2zt_b_six_bll.GetWTs();
                }
                else if (str8.Equals("92642"))
                {
                    wTs = CallBLL.cz_wt_tc_b_six_bll.GetWTs();
                }
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if (str8.Equals("92575") || str8.Equals("92643"))
            {
                num2      = (((num * (num - 1)) * (num - 2)) * (num - 3)) / 0x18;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = null;
                if (str8.Equals("92575"))
                {
                    wTs = CallBLL.cz_wt_4z1_six_bll.GetWTs();
                }
                else if (str8.Equals("92643"))
                {
                    wTs = CallBLL.cz_wt_4z1_b_six_bll.GetWTs();
                }
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if (str8.Equals("92572"))
            {
                num2      = ((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) / 120;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = CallBLL.cz_wt_5bz_six_bll.GetWTs();
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if (str8.Equals("92588"))
            {
                num2      = (((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) / 720;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = CallBLL.cz_wt_6bz_six_bll.GetWTs();
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if (str8.Equals("92589"))
            {
                num2      = ((((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) * (num - 6)) / 0x13b0;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = CallBLL.cz_wt_7bz_six_bll.GetWTs();
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if (str8.Equals("92590"))
            {
                num2      = (((((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) * (num - 6)) * (num - 7)) / 0x9d80;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = CallBLL.cz_wt_8bz_six_bll.GetWTs();
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if (str8.Equals("92591"))
            {
                num2      = ((((((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) * (num - 6)) * (num - 7)) * (num - 8)) / 0x58980;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = CallBLL.cz_wt_9bz_six_bll.GetWTs();
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if (str8.Equals("92592"))
            {
                num2      = (((((((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) * (num - 5)) * (num - 6)) * (num - 7)) * (num - 8)) * (num - 9)) / 0x375f00;
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = CallBLL.cz_wt_10bz_six_bll.GetWTs();
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
            else if (str8.Equals("92566") || str8.Equals("92569"))
            {
                num2 = (num * (num - 1)) / 2;
                if (str8.Equals("92569"))
                {
                    this.str_numbers.Replace("、", "尾、");
                }
            }
            else if (str8.Equals("92567") || str8.Equals("92570"))
            {
                num2 = ((num * (num - 1)) * (num - 2)) / 6;
                if (str8.Equals("92570"))
                {
                    this.str_numbers.Replace("、", "尾、");
                }
            }
            else if (str8.Equals("92568") || str8.Equals("92571"))
            {
                num2 = (((num * (num - 1)) * (num - 2)) * (num - 3)) / 0x18;
                if (str8.Equals("92571"))
                {
                    this.str_numbers.Replace("、", "尾、");
                }
            }
            else if (str8.Equals("92636") || str8.Equals("92637"))
            {
                num2 = ((((num * (num - 1)) * (num - 2)) * (num - 3)) * (num - 4)) / 120;
                if (str8.Equals("92637"))
                {
                    this.str_numbers.Replace("、", "尾、");
                }
            }
            else if (str8.Equals("92565"))
            {
                num2 = 1;
            }
            this.g_cnt   = num2;
            this.s_momey = this.g_cnt * int.Parse(this.txtMomey);
            if (((str8.Equals("92566") || str8.Equals("92567")) || str8.Equals("92568")) || str8.Equals("92636"))
            {
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                string[] strArray5 = base.qq("zodiac").Split(new char[] { ',' });
                wTs = null;
                wTs = CallBLL.cz_wt_sxlwsl_six_bll.GetWTs(str8);
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT_SX.Add(strArray5[num3], num5);
                        }
                        num3++;
                    }
                }
            }
            else if (((str8.Equals("92569") || str8.Equals("92570")) || str8.Equals("92571")) || str8.Equals("92637"))
            {
                strArray3 = this.numbers.Split(new char[] { ',' });
                strArray4 = str2.Split(new char[] { ',' });
                wTs       = null;
                wTs       = CallBLL.cz_wt_sxlwsl_six_bll.GetWTs(str8);
                if ((wTs != null) && (wTs.Rows.Count > 0))
                {
                    num3 = 0;
                    foreach (string str9 in strArray3)
                    {
                        num4     = int.Parse(str9);
                        rowArray = wTs.Select(string.Format(" number = {0} ", num4));
                        if ((rowArray != null) && (rowArray.Count <DataRow>() > 0))
                        {
                            num5 = double.Parse(rowArray[0]["wt_value"].ToString());
                            num6 = double.Parse(strArray4[num3]);
                            this.dictWT_WS.Add(str9, num5);
                        }
                        num3++;
                    }
                }
            }
        }
        string       str10        = "";
        string       str11        = "";
        cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase();

        if (currentPhase != null)
        {
            if (currentPhase.get_is_closed() == 1)
            {
                this.EndTipInfo("停止下注");
                return;
            }
            str10            = currentPhase.get_phase().ToString();
            this.jiangqi_str = str10;
            str11            = currentPhase.get_p_id().ToString();
        }
        else
        {
            this.EndTipInfo("停止下注");
            return;
        }
        DataTable playIDByOddsIds = CallBLL.cz_odds_six_bll.GetPlayIDByOddsIds(str3);
        DateTime  now             = DateTime.Now;
        DateTime  time2           = Convert.ToDateTime(currentPhase.get_stop_date());
        DateTime  time3           = Convert.ToDateTime(currentPhase.get_sn_stop_date());

        if (((((playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91001") || (playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91002")) || ((playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91004") || (playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91005"))) || (playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91007")) || (playIDByOddsIds.Rows[0]["play_id"].ToString().Trim() == "91038"))
        {
            if (time3 < now)
            {
                this.EndTipInfo("停止下注");
                return;
            }
        }
        else if (time2 < now)
        {
            this.EndTipInfo("停止下注");
            return;
        }
        DataSet playOddsByID = CallBLL.cz_odds_six_bll.GetPlayOddsByID(str3);

        this.plDT = playOddsByID.Tables[0];
        if (this.plDT.Rows.Count == 0)
        {
            this.EndTipInfo("賠率ID設置错误!");
        }
        else
        {
            string[] strArray6 = str3.Split(new char[] { ',' });
            for (int i = 0; i < strArray6.Length; i++)
            {
                bool flag = false;
                for (int j = 0; j < this.plDT.Rows.Count; j++)
                {
                    if (strArray6[i].Equals(this.plDT.Rows[j]["odds_id"].ToString()))
                    {
                        flag = true;
                        break;
                    }
                }
                if (!flag)
                {
                    this.EndTipInfo("赔率ID错误!");
                    return;
                }
            }
            this.uModel = base.GetUserModelInfo;
            string str12 = this.Session["user_name"].ToString();
            this.pk_kind = this.uModel.get_six_kind();
        }
    }
Esempio n. 18
0
    private void out_odds_info()
    {
        string str  = LSRequest.qq("GT");
        string str2 = LSRequest.qq("player_type");
        string str3 = "";

        str3 = Utils.GetPKBJL_NumTable(str2);
        string str4 = LSRequest.qq("playtype");

        if (string.IsNullOrEmpty(str) || string.IsNullOrEmpty(str3))
        {
            base.Response.End();
        }
        else if (!string.IsNullOrEmpty(str4) && ((str4 != "0") && (str4 != "1")))
        {
            base.Response.End();
        }
        else
        {
            string str5 = this.Session["user_name"].ToString();
            cz_userinfo_session getUserModelInfo = base.GetUserModelInfo;
            string    str6  = getUserModelInfo.get_su_type().ToString();
            string    str7  = getUserModelInfo.get_u_name().ToString();
            string    str8  = getUserModelInfo.get_kc_kind().Trim();
            DataTable table = CallBLL.cz_users_bll.GetCredit(str5, str6).Tables[0];
            if (table == null)
            {
                base.Response.End();
            }
            else
            {
                double num = double.Parse(table.Rows[0]["kc_usable_credit"].ToString());
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary.Add("type", "get_oddsinfo");
                DataSet set = CallBLL.cz_play_pkbjl_bll.GetPlay(str, str7, str6, str3);
                if (set == null)
                {
                    base.Response.End();
                }
                else
                {
                    this.phaseDT = set.Tables["phase"];
                    DataTable table2 = set.Tables["odds"];
                    if ((this.phaseDT == null) || (table2 == null))
                    {
                        base.Response.End();
                    }
                    else if (!this.isOpenLottery())
                    {
                        dictionary.Add("status", "3");
                        base.OutJson(JsonHandle.ObjectToJson(dictionary));
                    }
                    else
                    {
                        DataRow row   = this.phaseDT.Rows[0];
                        string  str9  = row["openning"].ToString();
                        string  str10 = row["isopen"].ToString();
                        string  str11 = row["opendate"].ToString();
                        string  str12 = row["endtime"].ToString();
                        string  str13 = row["nn"].ToString();
                        string  str14 = row["p_id"].ToString();
                        double  num2  = double.Parse(base.GetKCProfit());
                        if (str9.Equals("n") && string.IsNullOrEmpty(CacheHelper.GetCache(string.Concat(new object[] { "Poker_", 8, "_", str14, "_", str3 }))))
                        {
                            int num3 = 8;
                            base.Add_TenPoker_Lock(num3.ToString(), str14, str3);
                            cz_phase_pkbjl tenPoker = CallBLL.cz_phase_pkbjl_bll.GetTenPoker(str14, str3);
                            if ((tenPoker == null) || string.IsNullOrEmpty(tenPoker.get_ten_poker()))
                            {
                                CallBLL.cz_poker_pkbjl_bll.InitToPhase(str3, str14);
                            }
                            base.Un_TenPoker_Lock(8.ToString(), str14, str3);
                        }
                        dictionary.Add("status", "1");
                        dictionary.Add("open", str9);
                        dictionary.Add("k_open_time", str11);
                        dictionary.Add("k_stop_time", str12);
                        dictionary.Add("qishu", str13);
                        dictionary.Add("credit", num.ToString("F1"));
                        dictionary.Add("amount", num2.ToString("F1"));
                        dictionary.Add("k_id", str14);
                        DataTable newOpenPhaseByNumTable = CallBLL.cz_phase_pkbjl_bll.GetNewOpenPhaseByNumTable(str3);
                        dictionary.Add("porkList", newOpenPhaseByNumTable.Rows[0]["ten_poker"].ToString());
                        Dictionary <string, string> dictionary2 = new Dictionary <string, string>();
                        dictionary2.Add("player", newOpenPhaseByNumTable.Rows[0]["xian_nn"].ToString());
                        dictionary2.Add("banker", newOpenPhaseByNumTable.Rows[0]["zhuang_nn"].ToString());
                        dictionary.Add("lastResult", dictionary2);
                        dictionary.Add("road", base.GetPAILU(str3));
                        Dictionary <string, object> dictionary3 = new Dictionary <string, object>();
                        Dictionary <string, object> dictionary4 = new Dictionary <string, object>();
                        string        str16 = "";
                        string        pl    = "";
                        List <double> list  = new List <double>();
                        foreach (DataRow row2 in table2.Rows)
                        {
                            double num4;
                            str16 = row2["play_id"].ToString() + "_" + row2["odds_id"].ToString();
                            string s = row2["current_odds"].ToString();
                            if (str9 == "n")
                            {
                                s = "-";
                            }
                            string str22 = row2[str8 + "_diff"].ToString().Trim();
                            if (s != "-")
                            {
                                num4 = double.Parse(s) + double.Parse(str22);
                                pl   = num4.ToString();
                            }
                            else
                            {
                                pl = s;
                            }
                            if (s != "-")
                            {
                                base.GetOdds_KC(8, row2["odds_id"].ToString(), ref pl);
                            }
                            if (str4.Equals("0") && !pl.Equals("-"))
                            {
                                if (str16.Equals("81004_82005"))
                                {
                                    num4 = Convert.ToDouble(pl) + base.GetPlayTypeWTValue_PKBJL("82005");
                                    pl   = num4.ToString();
                                }
                                if (str16.Equals("81004_82006"))
                                {
                                    pl = (Convert.ToDouble(pl) + base.GetPlayTypeWTValue_PKBJL("82006")).ToString();
                                }
                            }
                            this.oddsList.Add(str16 + "," + pl);
                        }
                        string str23 = string.Join("|", this.oddsList.ToArray());
                        if (this.oddsList.Count <string>() > 0)
                        {
                            dictionary.Add("play_odds", str23);
                        }
                        base.OutJson(JsonHandle.ObjectToJson(dictionary));
                    }
                }
            }
        }
    }
Esempio n. 19
0
    private void out_odds_info()
    {
        string str = LSRequest.qq("GT");

        if (string.IsNullOrEmpty(str))
        {
            base.Response.End();
        }
        else
        {
            string str2 = this.Session["user_name"].ToString();
            cz_userinfo_session getUserModelInfo = base.GetUserModelInfo;
            string    str3  = getUserModelInfo.get_su_type().ToString();
            string    str4  = getUserModelInfo.get_u_name().ToString();
            string    str5  = getUserModelInfo.get_kc_kind().Trim();
            DataTable table = CallBLL.cz_users_bll.GetCredit(str2, str3).Tables[0];
            if (table == null)
            {
                base.Response.End();
            }
            else
            {
                double num = double.Parse(table.Rows[0]["kc_usable_credit"].ToString());
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary.Add("type", "get_oddsinfo");
                DataSet set = CallBLL.cz_play_car168_bll.GetPlay(str, str4, str3);
                if (set == null)
                {
                    base.Response.End();
                }
                else
                {
                    this.phaseDT = set.Tables["phase"];
                    DataTable table2 = set.Tables["odds"];
                    if ((this.phaseDT == null) || (table2 == null))
                    {
                        base.Response.End();
                    }
                    else if (!this.isOpenLottery())
                    {
                        dictionary.Add("status", "3");
                        base.OutJson(JsonHandle.ObjectToJson(dictionary));
                    }
                    else
                    {
                        DataRow row   = this.phaseDT.Rows[0];
                        string  str6  = row["openning"].ToString();
                        string  str7  = row["isopen"].ToString();
                        string  str8  = row["opendate"].ToString();
                        string  str9  = row["endtime"].ToString();
                        string  str10 = row["nn"].ToString();
                        string  str11 = row["p_id"].ToString();
                        double  num2  = double.Parse(base.GetKCProfit());
                        dictionary.Add("status", "1");
                        dictionary.Add("open", str6);
                        dictionary.Add("k_open_time", str8);
                        dictionary.Add("k_stop_time", str9);
                        dictionary.Add("qishu", str10);
                        dictionary.Add("credit", num.ToString("F1"));
                        dictionary.Add("amount", num2.ToString("F1"));
                        dictionary.Add("k_id", str11);
                        Dictionary <string, object> dictionary2 = new Dictionary <string, object>();
                        Dictionary <string, object> dictionary3 = new Dictionary <string, object>();
                        string        str12 = "";
                        string        pl    = "";
                        List <double> list  = new List <double>();
                        foreach (DataRow row2 in table2.Rows)
                        {
                            str12 = row2["play_id"].ToString() + "_" + row2["odds_id"].ToString();
                            string s = row2["current_odds"].ToString();
                            if (str6 == "n")
                            {
                                s = "-";
                            }
                            string str18 = row2[str5 + "_diff"].ToString().Trim();
                            if (s != "-")
                            {
                                pl = (double.Parse(s) + double.Parse(str18)).ToString();
                            }
                            else
                            {
                                pl = s;
                            }
                            if (s != "-")
                            {
                                base.GetOdds_KC(0x10, row2["odds_id"].ToString(), ref pl);
                            }
                            this.oddsList.Add(str12 + "," + pl);
                        }
                        string str19 = string.Join("|", this.oddsList.ToArray());
                        if (this.oddsList.Count <string>() > 0)
                        {
                            dictionary.Add("play_odds", str19);
                        }
                        base.OutJson(JsonHandle.ObjectToJson(dictionary));
                    }
                }
            }
        }
    }
Esempio n. 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            cz_userinfo_session _session = new cz_userinfo_session();

            this.skin = (this.Session[this.Session["user_name"].ToString() + "lottery_session_user_info"] as cz_userinfo_session).get_u_skin();
            string str  = LSRequest.qq("hdnsubmit");
            string str2 = LSRequest.qq("txtoldpwd");
            string str3 = LSRequest.qq("txtnewpwd");
            string str4 = LSRequest.qq("txtnewpwdcf");

            if (str.Equals("submit"))
            {
                if ((string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3)) || string.IsNullOrEmpty(str4))
                {
                    base.Response.Write("<script>alert('請輸入完整的密碼!');</script>");
                    base.Response.End();
                }
                if (str3 == str2)
                {
                    base.Response.Write("<script>alert('新密碼和舊密碼不能相同!');</script>");
                    base.Response.End();
                }
                if (str3 != str4)
                {
                    base.Response.Write("<script>alert('新密碼和確認新密碼不一致!');</script>");
                    base.Response.End();
                }
                if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
                {
                    if (base.get_GetPasswordLU().Equals("1"))
                    {
                        base.Response.Write("<script>alert('密碼要8-20位,且必需包含大寫字母、小寫字母和数字!');</script>");
                    }
                    else
                    {
                        base.Response.Write("<script>alert('密碼要8-20位,且必需包含字母、和数字!');</script>");
                    }
                    base.Response.End();
                }
                cz_users _users = CallBLL.cz_users_bll.UserLogin(this.Session["user_name"].ToString());
                if (_users != null)
                {
                    string str5 = _users.get_salt().Trim();
                    string str6 = DESEncrypt.EncryptString(str2, str5);
                    if (_users.get_u_psw() != str6)
                    {
                        base.Response.Write("<script>alert('您輸入原密碼不正確!');</script>");
                        base.Response.End();
                    }
                    else
                    {
                        string ramSalt = Utils.GetRamSalt(6);
                        string str8    = DESEncrypt.EncryptString(str3, ramSalt);
                        if (CallBLL.cz_users_bll.UpUserPwd(this.Session["user_name"].ToString(), str8, ramSalt) > 0)
                        {
                            if (CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["user_name"].ToString()) > 0)
                            {
                                MemberPageBase.log_user_reset_password(this.Session["user_name"].ToString(), this.Session["modifypassword"]);
                                this.Session["modifypassword"] = null;
                                base.Response.Write("<script>alert('修改密碼成功!');location.href='/Quit.aspx';</script>");
                                base.Response.End();
                            }
                            else
                            {
                                base.Response.Write("<script>alert('修改密碼不成功!');</script>");
                                base.Response.End();
                            }
                        }
                        else
                        {
                            base.Response.Write("<script>alert('修改密碼不成功!');</script>");
                            base.Response.End();
                        }
                    }
                }
            }
        }
Esempio n. 21
0
    protected void out_six_odds_info()
    {
        string str  = LSRequest.qq("playid");
        string str2 = LSRequest.qq("playpage");

        if (string.IsNullOrEmpty(str))
        {
            base.Response.End();
        }
        else
        {
            string str3 = this.Session["user_name"].ToString();
            cz_userinfo_session getUserModelInfo = base.GetUserModelInfo;
            string       str4   = getUserModelInfo.get_su_type().ToString();
            string       str5   = getUserModelInfo.get_u_name().ToString();
            string       str6   = getUserModelInfo.get_six_kind().Trim();
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();
            dictionary.Add("type", "get_oddsinfo");
            dictionary.Add("playpage", str2);
            DataTable table = CallBLL.cz_users_bll.GetCredit(str5, str4).Tables[0];
            string    str7  = table.Rows[0]["six_credit"].ToString();
            string    str8  = table.Rows[0]["six_iscash"];
            decimal   num   = Convert.ToDecimal(str7);
            string    str9  = "0";
            if (str8.Equals("1"))
            {
                str9 = "1";
            }
            decimal num2 = Convert.ToDecimal(table.Rows[0]["six_usable_credit"].ToString());
            dictionary.Add("iscash", str9);
            dictionary.Add("credit", num.ToString("F1"));
            dictionary.Add("usable_credit", num2.ToString("F1"));
            cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase();
            if (!this.isOpenLottery(currentPhase))
            {
                dictionary.Add("status", "3");
                base.OutJson(JsonHandle.ObjectToJson(dictionary));
            }
            else
            {
                DateTime now   = DateTime.Now;
                string   str11 = "n";
                string   str12 = "0";
                string   str13 = "";
                string   str14 = currentPhase.get_open_date().ToString();
                string   str15 = "";
                DateTime time2 = Convert.ToDateTime(currentPhase.get_stop_date());
                DateTime time3 = Convert.ToDateTime(currentPhase.get_sn_stop_date());
                TimeSpan span  = Utils.DateDiff(time2, now);
                TimeSpan span2 = Utils.DateDiff(time3, now);
                string   str16 = string.Concat(new object[] { (span.Days * 0x18) + span.Hours, ":", span.Minutes, ":", span.Seconds });
                string   str17 = string.Concat(new object[] { (span2.Days * 0x18) + span2.Hours, ":", span2.Minutes, ":", span2.Seconds });
                if (time2 < now)
                {
                    str15 = str16;
                }
                else
                {
                    str11 = "y";
                    str12 = "1";
                    str15 = str16;
                }
                if (time3 < now)
                {
                    str13 = str17;
                }
                else
                {
                    str11 = "y";
                    str12 = "1";
                    str13 = str17;
                }
                if ((currentPhase != null) && currentPhase.get_is_closed().Equals(0))
                {
                    int num3;
                    if (time2 < now)
                    {
                        num3 = CallBLL.cz_odds_six_bll.UpdateIsOpen(1, "91001,91002,91003,91004,91005,91007,91038");
                    }
                    if (time3 < now)
                    {
                        num3 = CallBLL.cz_odds_six_bll.UpdateIsOpen(0, "");
                    }
                }
                string str18 = (currentPhase != null) ? currentPhase.get_phase() : "";
                string str19 = (currentPhase != null) ? currentPhase.get_p_id().ToString() : "";
                dictionary.Add("openning", str11);
                dictionary.Add("isopen", str12);
                int index = str14.IndexOf(' ');
                dictionary.Add("drawopen_time", str14.Substring(index));
                string   str20    = "";
                string[] strArray = str13.Split(new char[] { ':' });
                str20 = (Convert.ToInt32(strArray[0]) < 10) ? ("0" + strArray[0]) : strArray[0];
                str20 = (str20 + ":" + ((Convert.ToInt32(strArray[1]) < 10) ? ("0" + strArray[1]) : strArray[1])) + ":" + ((Convert.ToInt32(strArray[2]) < 10) ? ("0" + strArray[2]) : strArray[2]);
                dictionary.Add("stop_time", str20);
                dictionary.Add("nn", str18);
                dictionary.Add("p_id", str19);
                dictionary.Add("profit", "");
                DataSet play = CallBLL.cz_play_six_bll.GetPlay(str, str4);
                if (play == null)
                {
                    base.Response.End();
                }
                else
                {
                    DataTable table2 = play.Tables["odds"];
                    if (table2 == null)
                    {
                        base.Response.End();
                    }
                    else
                    {
                        DataSet   cache;
                        DataTable table3  = null;
                        DataTable table4  = null;
                        DataTable table5  = null;
                        DataTable table6  = null;
                        DataTable table7  = null;
                        DataTable table8  = null;
                        DataTable wT      = null;
                        DataTable table10 = null;
                        DataTable table11 = null;
                        DataTable table12 = null;
                        DataTable table13 = null;
                        DataTable table14 = null;
                        DataTable table15 = null;
                        DataTable table16 = null;
                        DataTable table17 = null;
                        DataTable table18 = null;
                        DataTable table19 = null;
                        DataTable table20 = null;
                        DataTable table21 = null;
                        DataTable table22 = null;
                        string    str37   = str2;
                        if (str37 != null)
                        {
                            if (!(str37 == "six_lm"))
                            {
                                if (str37 == "six_lm_b")
                                {
                                    wT      = CallBLL.cz_wt_3qz_b_six_bll.GetWT();
                                    table10 = CallBLL.cz_wt_3z2_b_six_bll.GetWT();
                                    table11 = CallBLL.cz_wt_2qz_b_six_bll.GetWT();
                                    table12 = CallBLL.cz_wt_2zt_b_six_bll.GetWT();
                                    table13 = CallBLL.cz_wt_tc_b_six_bll.GetWT();
                                    table14 = CallBLL.cz_wt_4z1_b_six_bll.GetWT();
                                }
                                else if (str37 == "six_bz")
                                {
                                    table15 = CallBLL.cz_wt_5bz_six_bll.GetWT();
                                    table16 = CallBLL.cz_wt_6bz_six_bll.GetWT();
                                    table17 = CallBLL.cz_wt_7bz_six_bll.GetWT();
                                    table18 = CallBLL.cz_wt_8bz_six_bll.GetWT();
                                    table19 = CallBLL.cz_wt_9bz_six_bll.GetWT();
                                    table20 = CallBLL.cz_wt_10bz_six_bll.GetWT();
                                }
                                else if (str37 == "six_lx")
                                {
                                    table21 = CallBLL.cz_wt_sxlwsl_six_bll.GetWT();
                                    table22 = CallBLL.cz_wt_6xyz_six_bll.GetWT();
                                }
                                else if (str37 == "six_ws")
                                {
                                    table21 = CallBLL.cz_wt_sxlwsl_six_bll.GetWT();
                                }
                            }
                            else
                            {
                                table3 = CallBLL.cz_wt_3qz_six_bll.GetWT();
                                table4 = CallBLL.cz_wt_3z2_six_bll.GetWT();
                                table5 = CallBLL.cz_wt_2qz_six_bll.GetWT();
                                table6 = CallBLL.cz_wt_2zt_six_bll.GetWT();
                                table7 = CallBLL.cz_wt_tc_six_bll.GetWT();
                                table8 = CallBLL.cz_wt_4z1_six_bll.GetWT();
                            }
                        }
                        DataTable drawbackByPlayIds = null;
                        if (FileCacheHelper.get_GetSixPutMoneyCache() == "1")
                        {
                            foreach (string str21 in str.Split(new char[] { ',' }))
                            {
                                DataTable table24;
                                if (CacheHelper.GetCache("six_drawback_FileCacheKey" + str21 + this.Session["user_name"].ToString()) != null)
                                {
                                    cache = CacheHelper.GetCache("six_drawback_FileCacheKey" + str21 + this.Session["user_name"].ToString()) as DataSet;
                                    if (drawbackByPlayIds == null)
                                    {
                                        drawbackByPlayIds = cache.Tables[0];
                                    }
                                    else
                                    {
                                        table24 = drawbackByPlayIds.Clone();
                                        table24 = cache.Tables[0];
                                        if (table24 != null)
                                        {
                                            drawbackByPlayIds.Merge(table24);
                                        }
                                    }
                                }
                                else if (drawbackByPlayIds == null)
                                {
                                    drawbackByPlayIds = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str21, getUserModelInfo.get_u_name());
                                }
                                else
                                {
                                    table24 = drawbackByPlayIds.Clone();
                                    table24 = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str21, getUserModelInfo.get_u_name());
                                    if (table24 != null)
                                    {
                                        drawbackByPlayIds.Merge(table24);
                                    }
                                }
                            }
                        }
                        else if (CacheHelper.GetCache("six_drawback_FileCacheKey" + this.Session["user_name"].ToString()) != null)
                        {
                            cache             = CacheHelper.GetCache("six_drawback_FileCacheKey" + this.Session["user_name"].ToString()) as DataSet;
                            drawbackByPlayIds = cache.Tables[0];
                        }
                        else
                        {
                            drawbackByPlayIds = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str, getUserModelInfo.get_u_name());
                        }
                        Dictionary <string, object> dictionary2 = new Dictionary <string, object>();
                        foreach (DataRow row in table2.Rows)
                        {
                            string        key    = "";
                            string        pl     = "";
                            string        s      = "";
                            string        str25  = "";
                            string        str26  = "";
                            string        str27  = "";
                            string        str28  = "";
                            List <double> source = new List <double>();
                            Dictionary <string, object> dictionary3 = new Dictionary <string, object>();
                            key = row["play_id"].ToString() + "_" + row["odds_id"].ToString();
                            string str29 = row["current_odds"].ToString();
                            string str30 = row[str6 + "_diff"].ToString().Trim();
                            if (!row["is_open"].ToString().Equals("0"))
                            {
                                try
                                {
                                    string[] strArray3 = row["current_odds"].ToString().Split(new char[] { ',' });
                                    string[] strArray4 = row[str6 + "_diff"].ToString().Trim().Split(new char[] { ',' });
                                    base.GetOdds_SIX(row["odds_id"].ToString(), row["current_odds"].ToString(), row[str6 + "_diff"].ToString(), ref pl);
                                }
                                catch (Exception exception)
                                {
                                    string message = exception.Message;
                                }
                            }
                            else if (row["current_odds"].ToString().Split(new char[] { ',' }).Length > 1)
                            {
                                pl = "-,-";
                            }
                            else
                            {
                                pl = "-";
                            }
                            DataRow[] rowArray = drawbackByPlayIds.Select(string.Format(" play_id={0} and u_name='{1}' ", row["play_id"].ToString(), getUserModelInfo.get_u_name()));
                            string    str32    = rowArray[0]["single_phase_amount"].ToString();
                            string    str33    = rowArray[0]["single_max_amount"].ToString();
                            string    str34    = rowArray[0]["single_min_amount"].ToString();
                            s     = row["allow_min_amount"].ToString();
                            str25 = row["allow_max_amount"].ToString();
                            str26 = row["max_appoint"].ToString();
                            str27 = row["total_amount"].ToString();
                            str28 = row["allow_max_put_amount"].ToString();
                            if (Convert.ToDecimal(str25) > Convert.ToDecimal(str28))
                            {
                                str25 = row["allow_max_put_amount"].ToString();
                            }
                            if (Convert.ToDecimal(str25) > Convert.ToDecimal(str27))
                            {
                                str25 = row["total_amount"].ToString();
                            }
                            if (double.Parse(s) < double.Parse(str34))
                            {
                                s = str34;
                            }
                            if (double.Parse(str25) > double.Parse(str33))
                            {
                                str25 = str33;
                            }
                            if ((str2.Equals("six_lm") || str2.Equals("six_lm_b")) || str2.Equals("six_bz"))
                            {
                                switch (row["play_id"].ToString())
                                {
                                case "91016":
                                    foreach (DataRow row2 in table3.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91017":
                                    foreach (DataRow row2 in table4.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91018":
                                    foreach (DataRow row2 in table5.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91019":
                                    foreach (DataRow row2 in table6.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91020":
                                    foreach (DataRow row2 in table7.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91040":
                                    foreach (DataRow row2 in table8.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91060":
                                    foreach (DataRow row2 in wT.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91061":
                                    foreach (DataRow row2 in table10.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91062":
                                    foreach (DataRow row2 in table11.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91063":
                                    foreach (DataRow row2 in table12.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91064":
                                    foreach (DataRow row2 in table13.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91065":
                                    foreach (DataRow row2 in table14.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91037":
                                    foreach (DataRow row2 in table15.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91047":
                                    foreach (DataRow row2 in table16.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91048":
                                    foreach (DataRow row2 in table17.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91049":
                                    foreach (DataRow row2 in table18.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91050":
                                    foreach (DataRow row2 in table19.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;

                                case "91051":
                                    foreach (DataRow row2 in table20.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                    break;
                                }
                            }
                            if (str2.Equals("six_lx"))
                            {
                                string str36 = row["odds_id"].ToString();
                                if (str36.Equals("92565"))
                                {
                                    foreach (DataRow row2 in table22.Rows)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                }
                                else
                                {
                                    DataRow[] rowArray2 = table21.Select(string.Format(" odds_id={0} ", Convert.ToInt32(str36)));
                                    foreach (DataRow row2 in rowArray2)
                                    {
                                        source.Add(double.Parse(row2["wt_value"].ToString()));
                                    }
                                    if (source.Count <double>(p => (p == 0.0)) == source.Count)
                                    {
                                        source.Clear();
                                    }
                                }
                            }
                            dictionary3.Add("pl", pl);
                            dictionary3.Add("plx", new List <double>(source));
                            dictionary3.Add("min_amount", s);
                            dictionary3.Add("max_amount", str25);
                            dictionary3.Add("top_amount", str26);
                            dictionary3.Add("dq_max_amount", str27);
                            dictionary3.Add("dh_max_amount", str28);
                            dictionary2.Add(key, new Dictionary <string, object>(dictionary3));
                        }
                        dictionary.Add("status", "1");
                        dictionary.Add("play_odds", dictionary2);
                        base.OutJson(JsonHandle.ObjectToJson(dictionary));
                    }
                }
            }
        }
    }
Esempio n. 22
0
        private void user_login(HttpContext context, ref string strResult)
        {
            cz_login_log login_log;
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Add("type", "user_login");
            string userName = LSRequest.qq("loginName").Trim().ToLower();
            string str      = LSRequest.qq("loginPwd").Trim();
            string str2     = LSRequest.qq("ValidateCode").Trim();

            if (PageBase.is_ip_locked())
            {
                context.Session["lottery_session_img_code"] = null;
                result.set_success(400);
                result.set_tipinfo("由於輸入錯誤次數過多,您已被禁用,請稍後再試!");
                strResult = JsonHandle.ObjectToJson(result);
            }
            else if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(str))
            {
                context.Response.End();
            }
            else
            {
                DateTime time;
                if (int.Parse(FileCacheHelper.get_GetLockedPasswordCount()) == 0)
                {
                    context.Session["lottery_session_img_code_display"] = 1;
                }
                if (context.Session["lottery_session_img_code_display"] == null)
                {
                    if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(userName))
                    {
                        if (PageBase.IsErrTimesAbove(ref time, userName))
                        {
                            if (!PageBase.IsErrTimeout(time))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(400);
                                result.set_tipinfo("");
                                dictionary.Add("is_display_code", "1");
                                result.set_data(dictionary);
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["lottery_session_img_code_display"] = 1;
                                return;
                            }
                            CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(userName);
                            context.Session["lottery_session_img_code"]         = null;
                            context.Session["lottery_session_img_code_display"] = 0;
                        }
                        else
                        {
                            context.Session["lottery_session_img_code"]         = null;
                            context.Session["lottery_session_img_code_display"] = 0;
                        }
                    }
                    else
                    {
                        context.Session["lottery_session_img_code"]         = null;
                        context.Session["lottery_session_img_code_display"] = 0;
                    }
                }
                if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                {
                    if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(str))
                    {
                        context.Response.End();
                        return;
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(str))
                    {
                        context.Response.End();
                        return;
                    }
                    if (string.IsNullOrEmpty(str2))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("");
                        dictionary.Add("is_display_code", "1");
                        result.set_data(dictionary);
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["lottery_session_img_code_display"] = 1;
                        return;
                    }
                    if (context.Session["lottery_session_img_code"] == null)
                    {
                        context.Response.End();
                        return;
                    }
                    if (context.Session["lottery_session_img_code"].ToString().ToLower() != str2.ToLower())
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                        dictionary.Add("fs_name", "ValidateCode");
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                }
                cz_users _users = CallBLL.cz_users_bll.UserLogin(userName.ToLower());
                if (_users == null)
                {
                    context.Session["lottery_session_img_code"] = null;
                    PageBase.login_error_ip();
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint"));
                    dictionary.Add("fs_name", "loginName");
                    strResult = JsonHandle.ObjectToJson(result);
                }
                else
                {
                    string str4 = _users.get_retry_times().ToString();
                    if (!string.IsNullOrEmpty(str4) && (int.Parse(str4) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                    {
                        if (!PageBase.IsLockedTimeout(userName, "master"))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(560);
                            result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                            strResult = JsonHandle.ObjectToJson(result);
                            return;
                        }
                        PageBase.zero_retry_times(userName);
                    }
                    string str5 = _users.get_a_state().ToString();
                    string str6 = PageBase.upper_user_status(_users.get_u_name().ToLower());
                    if (str5 == "2")
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100008", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                    }
                    else if (str6 == "2")
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                    }
                    else
                    {
                        if (str5 == "1")
                        {
                            result.set_success(200);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100007", "MessageHint"));
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["user_state"] = str5;
                        }
                        else if (str6 == "1")
                        {
                            result.set_success(200);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100010", "MessageHint"));
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["user_state"] = str6;
                        }
                        else
                        {
                            context.Session["user_state"] = "0";
                            result.set_success(200);
                            strResult = JsonHandle.ObjectToJson(result);
                        }
                        string str7 = _users.get_salt().Trim();
                        string str8 = DESEncrypt.EncryptString(str, str7);
                        if (_users.get_u_psw() != str8)
                        {
                            context.Session["lottery_session_img_code"] = null;
                            PageBase.inc_retry_times(userName);
                            PageBase.login_error_ip();
                            result.set_success(400);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                            strResult = JsonHandle.ObjectToJson(result);
                            if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                            {
                                if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(userName))
                                {
                                    CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(userName);
                                }
                                else
                                {
                                    CallBLL.cz_user_psw_err_log_bll.AddUser(userName);
                                }
                                if (PageBase.IsErrTimesAbove(ref time, userName))
                                {
                                    context.Session["lottery_session_img_code"] = null;
                                    result.set_success(400);
                                    result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                                    dictionary.Add("is_display_code", "1");
                                    result.set_data(dictionary);
                                    strResult = JsonHandle.ObjectToJson(result);
                                    context.Session["lottery_session_img_code_display"] = 1;
                                }
                            }
                        }
                        else
                        {
                            cz_userinfo_session _session = new cz_userinfo_session();
                            _session.set_u_id(_users.get_u_id());
                            _session.set_u_name(_users.get_u_name());
                            _session.set_u_nicker(_users.get_u_nicker());
                            _session.set_u_skin(_users.get_u_skin());
                            _session.set_u_type(_users.get_u_type());
                            _session.set_su_type(_users.get_su_type());
                            _session.set_kc_kind(_users.get_kc_kind().Trim());
                            _session.set_six_kind(_users.get_six_kind().Trim());
                            _session.set_u_psw(_users.get_u_psw().Trim());
                            _session.set_kc_rate_owner(_users.get_kc_rate_owner());
                            _session.set_six_rate_owner(_users.get_six_rate_owner());
                            _session.set_a_state(new int?(int.Parse(context.Session["user_state"].ToString())));
                            DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo();
                            if (zJInfo != null)
                            {
                                _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim());
                            }
                            DataRow item = CallBLL.cz_admin_sysconfig_bll.GetItem();
                            if (item == null)
                            {
                                _session.set_u_skin("Blue");
                            }
                            else
                            {
                                string str9 = item["hy_skin"].ToString();
                                if (string.IsNullOrEmpty(_session.get_u_skin()) || (str9.IndexOf(_session.get_u_skin()) < 0))
                                {
                                    _session.set_u_skin(str9.Split(new char[] { '|' })[0]);
                                }
                            }
                            DataTable table2 = CallBLL.cz_rate_six_bll.GetRateByAccount(userName.ToLower()).Tables[0];
                            _session.get_six_session().set_fgsname(table2.Rows[0]["fgs_name"].ToString().Trim());
                            _session.get_six_session().set_gdname(table2.Rows[0]["gd_name"].ToString().Trim());
                            _session.get_six_session().set_zdname(table2.Rows[0]["zd_name"].ToString().Trim());
                            _session.get_six_session().set_dlname(table2.Rows[0]["dl_name"].ToString().Trim());
                            DataTable table3 = CallBLL.cz_rate_kc_bll.GetRateByAccount(userName.ToLower()).Tables[0];
                            _session.get_kc_session().set_fgsname(table3.Rows[0]["fgs_name"].ToString().Trim());
                            _session.get_kc_session().set_gdname(table3.Rows[0]["gd_name"].ToString().Trim());
                            _session.get_kc_session().set_zdname(table3.Rows[0]["zd_name"].ToString().Trim());
                            _session.get_kc_session().set_dlname(table3.Rows[0]["dl_name"].ToString().Trim());
                            _session.set_kc_rate_owner(new int?(Convert.ToInt32(table3.Rows[0]["kc_rate_owner"])));
                            _session.set_six_rate_owner(new int?(Convert.ToInt32(table2.Rows[0]["six_rate_owner"])));
                            DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(userName.ToLower());
                            if (userOpOdds != null)
                            {
                                if ((userOpOdds.Rows[0]["six_op_odds"] != null) && (userOpOdds.Rows[0]["six_op_odds"].ToString() != ""))
                                {
                                    _session.set_six_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["six_op_odds"].ToString())));
                                }
                                if ((userOpOdds.Rows[0]["kc_op_odds"] != null) && (userOpOdds.Rows[0]["kc_op_odds"].ToString() != ""))
                                {
                                    _session.set_kc_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["kc_op_odds"].ToString())));
                                }
                            }
                            context.Session["user_name"] = userName.ToLower();
                            context.Session[userName + "lottery_session_user_info"] = _session;
                            PageBase.SetAppcationFlag(userName);
                            if (FileCacheHelper.get_RedisStatOnline().Equals(1))
                            {
                                new PageBase_Redis().InitUserOnlineTopToRedis(userName, _session.get_u_type());
                            }
                            else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
                            {
                                new PageBase_Redis().InitUserOnlineTopToRedisStack(userName, _session.get_u_type());
                            }
                            else
                            {
                                MemberPageBase.stat_top_online(userName);
                                MemberPageBase.stat_online(userName, _session.get_u_type());
                            }
                            if (FileCacheHelper.get_RedisStatOnline().Equals(0))
                            {
                                PageBase.ZeroIsOutFlag(userName);
                            }
                            login_log = new cz_login_log();
                            login_log.set_ip(LSRequest.GetIP());
                            login_log.set_login_time(new DateTime?(DateTime.Now));
                            login_log.set_u_name(userName);
                            login_log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current));
                            Task.Factory.StartNew(delegate {
                                PageBase.zero_retry_times(userName);
                                CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(userName);
                                CallBLL.cz_login_log_bll.Add(login_log);
                            }).ContinueWith(delegate(Task t) {
                                string str = string.Format("Task Exception: {0}", t.Exception.InnerException.Message);
                                MessageQueueConfig.TaskQueue.Enqueue(new TaskModel(0, str));
                            }, TaskContinuationOptions.OnlyOnFaulted);
                            if (FileCacheHelper.get_GetWebModelView().Equals(0))
                            {
                                HttpContext.Current.Session["Session_LoginSystem_Flag"] = "LoginSystem_OldWeb";
                                _session.set_u_skin("Yellow");
                            }
                            else
                            {
                                HttpContext.Current.Session["Session_LoginSystem_Flag"] = "LoginSystem_NewWeb";
                            }
                            string str10 = _users.get_is_changed().ToString();
                            if (string.IsNullOrEmpty(str10))
                            {
                                result.set_success(550);
                                result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["modifypassword"] = "******";
                            }
                            else if (str10 == "0")
                            {
                                result.set_success(550);
                                result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["modifypassword"] = "******";
                            }
                            else
                            {
                                DateTime?nullable3;
                                DateTime?nullable = _users.get_last_changedate();
                                int      num2     = PageBase.PasswordExpire();
                                if (nullable.HasValue && ((nullable3 = nullable).HasValue ? (nullable3.GetValueOrDefault() < DateTime.Now.AddDays((double)-num2)) : false))
                                {
                                    result.set_success(550);
                                    result.set_tipinfo("密碼過期,需重置密碼!");
                                    strResult = JsonHandle.ObjectToJson(result);
                                    context.Session["modifypassword"] = "******";
                                }
                                else
                                {
                                    CallBLL.cz_credit_lock_bll.Delete(_users.get_u_name());
                                    result.set_data(dictionary);
                                    strResult = JsonHandle.ObjectToJson(result);
                                }
                            }
                        }
                    }
                }
            }
        }
Esempio n. 23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Expires = 0;
        base.IsUserLoginByMobileForAjax();
        this.userName = this.Session["user_name"].ToString();
        this.uModel   = base.GetUserModelInfo;
        this.findDate = LSRequest.qq("findDate");
        this.lid      = LSRequest.qq("lid");
        if (!Utils.ValidLotteryID(this.lid, true))
        {
            base.Response.End();
        }
        if (!string.IsNullOrEmpty(base.q("page")))
        {
            this.page = Convert.ToInt32(base.q("page"));
        }
        this.FiledValue = new string[0];
        string str2 = this.uModel.get_su_type().ToString().Trim();

        if (str2 != null)
        {
            if (!(str2 == "dl"))
            {
                if (str2 == "zd")
                {
                    this.u_drawback = "dl_drawback";
                }
                else if (str2 == "gd")
                {
                    this.u_drawback = "zd_drawback";
                }
                else if (str2 == "fgs")
                {
                    this.u_drawback = "gd_drawback";
                }
            }
            else
            {
                this.u_drawback = "hy_drawback";
            }
        }
        string str = "cz_betold_kc";

        if (DateTime.Now.AddHours((double)-int.Parse(base.get_BetTime_KC())).ToString("yyyy-MM-dd") == this.findDate)
        {
            str = "cz_bet_kc";
        }
        DateTime time2 = Convert.ToDateTime(this.findDate);
        DateTime now   = DateTime.Now;

        now = time2.AddDays(1.0);
        if (str.Equals("cz_betold_kc"))
        {
            this.dataTable = CallBLL.cz_betold_kc_bll.GetReportByPageList(this.userName, this.page - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.findDate + " 07:00:00", now.ToString("yyyy-MM-dd") + " 07:00:00", this.lid).Tables[0];
        }
        else
        {
            this.dataTable = CallBLL.cz_bet_kc_bll.GetReportByPageList(this.userName, this.page - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.findDate + " 07:00:00", now.ToString("yyyy-MM-dd") + " 07:00:00", this.lid).Tables[0];
        }
        if (this.page > this.pageCount)
        {
            this.dataTable = null;
        }
    }
Esempio n. 24
0
    public static void get_drawback(ref cz_userinfo_session uModel, string play_id, ref string zj_ds, ref string fgs_ds, ref string gd_ds, ref string zd_ds, ref string dl_ds, ref string hy_ds, string a_m_type, string hy_pk)
    {
        string    str   = "'" + uModel.get_kc_session().get_fgsname() + "','" + uModel.get_kc_session().get_gdname() + "','" + uModel.get_kc_session().get_zdname() + "','" + uModel.get_kc_session().get_dlname() + "','" + uModel.get_u_name() + "'";
        DataTable table = CallBLL.cz_drawback_kl10_bll.GetDrawbacks(play_id.Trim(), str).Tables[0];

        foreach (DataRow row in table.Rows)
        {
            string str2 = row["u_type"].ToString().Trim();
            if (str2 != null)
            {
                if (!(str2 == "zj"))
                {
                    if (str2 == "fgs")
                    {
                        goto Label_0178;
                    }
                    if (str2 == "gd")
                    {
                        goto Label_019B;
                    }
                    if (str2 == "zd")
                    {
                        goto Label_01BF;
                    }
                    if (str2 == "dl")
                    {
                        goto Label_01E3;
                    }
                    if (str2 == "hy")
                    {
                        goto Label_0207;
                    }
                }
                else
                {
                    zj_ds = row[hy_pk + "_drawback"].ToString().Trim();
                }
            }
            continue;
Label_0178:
            fgs_ds = row[hy_pk + "_drawback"].ToString().Trim();
            continue;
Label_019B:
            gd_ds = row[hy_pk + "_drawback"].ToString().Trim();
            continue;
Label_01BF:
            zd_ds = row[hy_pk + "_drawback"].ToString().Trim();
            continue;
Label_01E3:
            dl_ds = row[hy_pk + "_drawback"].ToString().Trim();
            continue;
Label_0207:
            if (a_m_type == "dl")
            {
                hy_ds = row[hy_pk + "_drawback"].ToString().Trim();
            }
            else if (a_m_type == "zd")
            {
                dl_ds = row[hy_pk + "_drawback"].ToString().Trim();
                hy_ds = row[hy_pk + "_drawback"].ToString().Trim();
            }
            else if (a_m_type == "gd")
            {
                zd_ds = row[hy_pk + "_drawback"].ToString().Trim();
                hy_ds = row[hy_pk + "_drawback"].ToString().Trim();
            }
            else if (a_m_type == "fgs")
            {
                gd_ds = row[hy_pk + "_drawback"].ToString().Trim();
                hy_ds = row[hy_pk + "_drawback"].ToString().Trim();
            }
        }
    }
Esempio n. 25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        DateTime time;

        base.Response.Expires = 0;
        if (!base.IsUserLoginByMobileForAjax())
        {
            this.Session.Abandon();
            base.Response.Write("<script>top.location.href='/m'</script>");
            base.Response.End();
        }
        int num30 = 2;

        if (!base.IsLotteryExistByPhone(num30.ToString()))
        {
            this.Session.Abandon();
            base.Response.Write("<script>top.location.href='/m'</script>");
            base.Response.End();
        }
        string str  = this.Session["user_name"].ToString();
        string str2 = "";
        cz_userinfo_session getUserModelInfo = base.GetUserModelInfo;

        if (FileCacheHelper.get_RedisStatOnline().Equals(1))
        {
            base.CheckIsOut(getUserModelInfo.get_u_name());
            base.stat_online_redis(getUserModelInfo.get_u_name(), "hy");
        }
        else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
        {
            base.CheckIsOutStack(getUserModelInfo.get_u_name());
            base.stat_online_redisStack(getUserModelInfo.get_u_name(), "hy");
        }
        else
        {
            MemberPageBase.stat_online_bet(getUserModelInfo.get_u_name(), "hy");
        }
        if (!base.BetCreditLock(str))
        {
            str2 = "系統繁忙,請稍後!";
            str2 = string.Format("<script>alert('{0}');</script>", str2);
            base.Response.Write(str2);
            base.Response.End();
        }
        user_kc_rate rate  = base.GetUserRate_kc(getUserModelInfo.get_zjname());
        DataTable    table = null;
        DataSet      set   = CallBLL.cz_users_bll.AccountIsDisabled(rate.get_fgsname(), rate.get_gdname(), rate.get_zdname(), rate.get_dlname(), getUserModelInfo.get_u_name());

        if (set != null)
        {
            table = set.Tables[0];
            if ((table != null) && (table.Rows.Count > 0))
            {
                if (table.Rows[0]["a_state"].ToString().Trim() == "1")
                {
                    base.DeleteCreditLock(str);
                    str2 = "會員或上級已經被凍結,請與上級聯系!";
                    str2 = string.Format("<script>alert('{0}');</script>", str2);
                    base.Response.Write(str2);
                    base.Response.End();
                }
                else
                {
                    base.DeleteCreditLock(str);
                    str2 = "會員或上級已經被停用,請與上級聯系!";
                    str2 = string.Format("<script>alert('{0}');</script>", str2);
                    base.Response.Write(str2);
                    base.Response.End();
                }
            }
        }
        else
        {
            base.DeleteCreditLock(str);
            base.Response.End();
        }
        string str4  = base.qq("caizhong");
        string str5  = base.qq("wanfa");
        string str6  = base.qq("jiangqi");
        string str7  = "PK10_" + str5 + ".aspx?lottery_type=" + str4 + "&player_type=" + str5;
        string str8  = "";
        string str9  = "";
        string str10 = "";
        string str11 = "";
        string str12 = "";

        str9  = base.qq("uPI_ID");
        str10 = base.qq("uPI_P");
        str11 = base.qq("uPI_M");
        string[] strArray = base.qq("i_index").Split(new char[] { ',' });
        str12 = base.qq("JeuValidate");
        str8  = base.qq("shortcut");
        if ((((string.IsNullOrEmpty(str4) || string.IsNullOrEmpty(str5)) || (string.IsNullOrEmpty(str6) || string.IsNullOrEmpty(str9))) || string.IsNullOrEmpty(str10)) || string.IsNullOrEmpty(str11))
        {
            base.DeleteCreditLock(str);
            base.Response.End();
        }
        string[] source = str9.Split(new char[] { ',' });
        if (source.Distinct <string>().ToList <string>().Count != source.Length)
        {
            base.DeleteCreditLock(str);
            base.Response.End();
        }
        if (source.Length > FileCacheHelper.get_GetPK10MaxGroup())
        {
            base.DeleteCreditLock(str);
            base.Response.End();
        }
        string str13 = str5;
        string s     = str6;
        int    num2  = 2;

        if ((this.Session["JeuValidate"].ToString().Trim() != str12) || (this.Session["JeuValidate"].ToString().Trim() == ""))
        {
            base.DeleteCreditLock(str);
            base.Response.Write("<script>alert('下注規則有誤,請重新下注,謝謝合作!');$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
            base.Response.End();
        }
        else
        {
            this.Session["JeuValidate"] = "";
        }
        int num3 = 1;

        if (getUserModelInfo.get_su_type().ToString().Trim() != "dl")
        {
            num3 = -1;
        }
        int index = 0;

        Label_05F3 :;
        if (index < str11.Split(new char[] { ',' }).Length)
        {
            if (!base.IsNumber(str11.Split(new char[] { ',' })[index]))
            {
                base.DeleteCreditLock(str);
                base.Response.Write("<script>alert($(\"#v_" + strArray[index] + "\").text()+' 下注金額有誤!');$('#m_" + strArray[index] + "').focus();$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                base.Response.End();
                return;
            }
            index++;
            goto Label_05F3;
        }
        if (getUserModelInfo.get_begin_kc().Trim() != "yes")
        {
            getUserModelInfo = base.GetRateByUserObject(2, rate);
        }
        string str16 = "";
        string str17 = "";

        if (!Utils.IsInteger(s))
        {
            base.Response.End();
        }
        DataTable table2 = CallBLL.cz_phase_pk10_bll.GetIsClosedByTime(int.Parse(s)).Tables[0];

        if ((table2 != null) && (table2.Rows.Count > 0))
        {
            if (table2.Rows[0]["is_closed"].ToString().Trim() == "1")
            {
                base.DeleteCreditLock(str);
                base.Response.Write("<script>alert('該獎期已經截止下注!');window.location=\"" + str7 + "\";</script>");
                base.Response.End();
                return;
            }
            str16 = table2.Rows[0]["phase"].ToString();
            str17 = table2.Rows[0]["p_id"].ToString();
            time  = Convert.ToDateTime(table2.Rows[0]["stop_date"].ToString());
            num30 = 2;
            string str18 = base.BetReceiveEnd(num30.ToString());
            if (!string.IsNullOrEmpty(str18))
            {
                time = Convert.ToDateTime(table2.Rows[0]["play_open_date"].ToString()).AddSeconds((double)-int.Parse(str18));
            }
        }
        else
        {
            base.DeleteCreditLock(str);
            base.Response.Write("<script>alert('該獎期已經截止下注!');window.location=\"" + str7 + "\";</script>");
            base.Response.End();
            return;
        }
        string    str19  = "";
        string    str20  = "";
        double    num5   = 0.0;
        DataTable table3 = CallBLL.cz_users_bll.GetUserRate(str, 2).Tables[0];

        str19 = table3.Rows[0]["kc_kind"].ToString().Trim().ToUpper();
        str20 = table3.Rows[0]["su_type"].ToString().Trim();
        num5  = double.Parse(table3.Rows[0]["kc_usable_credit"].ToString().Trim());
        getUserModelInfo.set_kc_kind(str19.ToUpper());
        string str21 = "0";
        string str22 = "0";
        string str23 = "0";
        string str24 = "0";
        string str25 = "0";
        string str26 = "0";
        double num6  = 0.0;
        double num7  = 0.0;
        double num8  = 0.0;
        double num9  = 0.0;
        double num10 = 0.0;
        double num11 = 0.0;
        string str27 = "";
        string str28 = "";
        string str29 = "";
        string str30 = "";
        string str31 = "";

        string[]  strArray3 = str9.Split(new char[] { ',' });
        string[]  strArray4 = str10.Split(new char[] { ',' });
        string[]  strArray5 = str11.Split(new char[] { ',' });
        DataTable plDT      = CallBLL.cz_odds_pk10_bll.GetPlayOddsByID(str9).Tables[0];

        if (plDT.Rows.Count == 0)
        {
            base.DeleteCreditLock(str);
            base.Response.End();
        }
        else
        {
            DataTable table5 = CallBLL.cz_bet_kc_bll.GetSinglePhaseByBet(str16, str, num2.ToString(), str9, null).Tables[0];
            if ((plDT.Rows.Count == 0) || (plDT.Rows.Count != strArray3.Count <string>()))
            {
                base.DeleteCreditLock(str);
                base.Response.End();
            }
            else
            {
                double        num12 = 0.0;
                string        str32 = "";
                List <string> list  = new List <string>();
                List <string> list2 = new List <string>();
                int           num13 = 0;
                foreach (string str33 in strArray3)
                {
                    num6  = 0.0;
                    row   = plDT.Select(string.Format(" odds_id= {0} ", str33.Trim()))[0];
                    str32 = row["is_open"].ToString().Trim();
                    str28 = row["current_odds"].ToString().Trim();
                    str29 = row[str19 + "_diff"].ToString().Trim();
                    str27 = row["play_id"].ToString().Trim();
                    str30 = row["play_name"].ToString().Trim();
                    str31 = row["put_amount"].ToString().Trim();
                    num11 = double.Parse(row["allow_min_amount"].ToString().Trim());
                    num8  = double.Parse(row["allow_max_amount"].ToString().Trim());
                    num10 = double.Parse(row["allow_max_put_amount"].ToString().Trim());
                    if ((table5 != null) && (table5.Rows.Count > 0))
                    {
                        DataRow[] rowArray2 = table5.Select(string.Format(" odds_id = {0} ", str33.Trim()));
                        if (rowArray2.Count <DataRow>() > 0)
                        {
                            num6 = double.Parse(rowArray2[0]["sumbet"].ToString().Trim());
                        }
                    }
                    DataTable table6 = null;
                    if (FileCacheHelper.get_GetKCPutMoneyCache() == "1")
                    {
                        if (CacheHelper.GetCache("kc_drawback_FileCacheKey_pk10" + str27 + this.Session["user_name"].ToString()) == null)
                        {
                            table6 = CallBLL.cz_drawback_pk10_bll.GetDrawback(str27, str).Tables[0];
                        }
                        else
                        {
                            table6 = base.GetUserDrawback_pk10(rate, getUserModelInfo.get_kc_kind(), str27);
                        }
                    }
                    else if (CacheHelper.GetCache("kc_drawback_FileCacheKey_pk10" + this.Session["user_name"].ToString()) == null)
                    {
                        table6 = CallBLL.cz_drawback_pk10_bll.GetDrawback(str27, str).Tables[0];
                    }
                    else
                    {
                        table6 = base.GetUserDrawback_pk10(rate, getUserModelInfo.get_kc_kind());
                    }
                    DataRow[] rowArray3 = table6.Select(string.Format(" play_id={0} and u_name='{1}' ", str27, str));
                    num7 = double.Parse(rowArray3[0]["single_max_amount"].ToString().Trim());
                    double num14 = double.Parse(rowArray3[0]["single_min_amount"].ToString().Trim());
                    num9 = double.Parse(rowArray3[0]["single_phase_amount"].ToString().Trim());
                    if (num7 > num8)
                    {
                        num7 = num8;
                    }
                    if (num9 > num10)
                    {
                        num9 = num10;
                    }
                    if (num14 > num11)
                    {
                        num11 = num14;
                    }
                    if (str32 != "1")
                    {
                        base.DeleteCreditLock(str);
                        base.Response.Write("<script>alert('" + str30 + "【" + str31 + "】已經停止投注!!');$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                        base.Response.End();
                    }
                    num12 = double.Parse(str28) + double.Parse(str29);
                    string pl = num12.ToString();
                    base.GetOdds_KC(2, str33, ref pl);
                    num12 = Convert.ToDouble(pl);
                    if (!(double.Parse(strArray4[num13]) == double.Parse(num12.ToString())))
                    {
                        list.Add(num13.ToString());
                        list2.Add(num12.ToString());
                    }
                    if (list.Count > 0)
                    {
                        base.DeleteCreditLock(str);
                        base.Response.Write("<script>alert('" + str30 + "【" + str31 + "】賠率已經由 " + strArray4[num13] + " 變為 " + num12.ToString() + " 請確認再投註!');$('#v_" + strArray[num13] + " ~ span.hong').text('" + num12.ToString() + "');$('#p_" + strArray[num13] + "').val('" + num12.ToString() + "');$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                        base.Response.End();
                        return;
                    }
                    if (double.Parse(strArray5[num13]) > num7)
                    {
                        base.DeleteCreditLock(str);
                        base.Response.Write("<script>alert($(\"#v_" + strArray[num13] + "\").text()+' 下注金額超出單注最大金額!');$('#m_" + strArray[num13] + "').focus();$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                        base.Response.End();
                        return;
                    }
                    if (double.Parse(strArray5[num13]) < num11)
                    {
                        base.DeleteCreditLock(str);
                        base.Response.Write("<script>alert($(\"#v_" + strArray[num13] + "\").text()+' 下注金額低過最低金額!');$('#m_" + strArray[num13] + "').focus();$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                        base.Response.End();
                        return;
                    }
                    if (double.Parse(strArray5[num13]) > num5)
                    {
                        base.DeleteCreditLock(str);
                        base.Response.Write("<script>alert($(\"#v_" + strArray[num13] + "\").text()+' 下注金額超出可用金額!');$('#m_" + strArray[num13] + "').focus();$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                        base.Response.End();
                        return;
                    }
                    if ((double.Parse(strArray5[num13]) + num6) > num9)
                    {
                        base.DeleteCreditLock(str);
                        base.Response.Write("<script>alert('" + str30 + "【" + str31 + "】下註單期金額超出單期最大金額!');</script>");
                        base.Response.End();
                        return;
                    }
                    num13++;
                }
                double num15 = 0.0;
                int    num16 = 0;
                foreach (string str35 in strArray3)
                {
                    num15 += double.Parse(strArray5[num16].ToString().Trim());
                    num16++;
                }
                if (num5 < num15)
                {
                    base.DeleteCreditLock(str);
                    base.Response.Write("<script>alert('可用餘額不足!');$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                    base.Response.End();
                }
                else
                {
                    DataTable     dataTable      = null;
                    bool          flag2          = false;
                    List <string> successBetList = new List <string>();
                    DateTime?     nullable       = null;
                    num13 = 0;
                    foreach (string str33 in strArray3)
                    {
                        double num20;
                        if (FileCacheHelper.get_AddBetLockUType_KC().Equals("zj"))
                        {
                            num30 = 2;
                            base.Add_Bet_Lock(num30.ToString(), getUserModelInfo.get_zjname(), str33);
                        }
                        DataTable table8 = CallBLL.cz_odds_pk10_bll.GetOddsByID(str33).Tables[0];
                        int       num17  = int.Parse(table8.Rows[0]["play_id"].ToString());
                        string    str36  = table8.Rows[0]["play_name"].ToString();
                        string    str37  = table8.Rows[0]["put_amount"].ToString();
                        string    ratio  = table8.Rows[0]["ratio"].ToString();
                        if (FileCacheHelper.get_GetKCPutMoneyCache() == "1")
                        {
                            dataTable = base.GetUserDrawback_pk10(rate, getUserModelInfo.get_kc_kind(), num17.ToString());
                        }
                        else
                        {
                            dataTable = base.GetUserDrawback_pk10(rate, getUserModelInfo.get_kc_kind());
                        }
                        if (dataTable == null)
                        {
                            base.DeleteCreditLock(str);
                            if (FileCacheHelper.get_AddBetLockUType_KC().Equals("zj"))
                            {
                                num30 = 2;
                                base.Un_Bet_Lock(num30.ToString(), getUserModelInfo.get_zjname(), str33);
                            }
                            else
                            {
                                num30 = 2;
                                base.Un_Bet_Lock(num30.ToString(), rate.get_fgsname(), str33);
                            }
                            base.Response.Write("<script>alert('系統錯誤,請重試!');$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                            base.Response.End();
                            return;
                        }
                        DataRow[] rowArray4 = dataTable.Select(string.Format(" play_id={0} ", num17));
                        foreach (DataRow row in rowArray4)
                        {
                            string str42 = row["u_type"].ToString().Trim();
                            if (str42 != null)
                            {
                                if (!(str42 == "zj"))
                                {
                                    if (str42 == "fgs")
                                    {
                                        goto Label_152D;
                                    }
                                    if (str42 == "gd")
                                    {
                                        goto Label_1551;
                                    }
                                    if (str42 == "zd")
                                    {
                                        goto Label_1575;
                                    }
                                    if (str42 == "dl")
                                    {
                                        goto Label_1599;
                                    }
                                    if (str42 == "hy")
                                    {
                                        goto Label_15BD;
                                    }
                                }
                                else
                                {
                                    str21 = row[str19 + "_drawback"].ToString().Trim();
                                }
                            }
                            continue;
Label_152D:
                            str22 = row[str19 + "_drawback"].ToString().Trim();
                            continue;
Label_1551:
                            str23 = row[str19 + "_drawback"].ToString().Trim();
                            continue;
Label_1575:
                            str24 = row[str19 + "_drawback"].ToString().Trim();
                            continue;
Label_1599:
                            str25 = row[str19 + "_drawback"].ToString().Trim();
                            continue;
Label_15BD:
                            if (getUserModelInfo.get_su_type() == "dl")
                            {
                                str26 = row[str19 + "_drawback"].ToString().Trim();
                            }
                            else if (getUserModelInfo.get_su_type() == "zd")
                            {
                                str25 = row[str19 + "_drawback"].ToString().Trim();
                                str26 = row[str19 + "_drawback"].ToString().Trim();
                            }
                            else if (getUserModelInfo.get_su_type() == "gd")
                            {
                                str24 = row[str19 + "_drawback"].ToString().Trim();
                                str26 = row[str19 + "_drawback"].ToString().Trim();
                            }
                            else if (getUserModelInfo.get_su_type() == "fgs")
                            {
                                str23 = row[str19 + "_drawback"].ToString().Trim();
                                str26 = row[str19 + "_drawback"].ToString().Trim();
                            }
                        }
                        double num18 = 0.0;
                        double num19 = 0.0;
                        if (rate.get_zcyg().Equals("1"))
                        {
                            num20 = (((100.0 - double.Parse(rate.get_fgszc())) - double.Parse(rate.get_gdzc())) - double.Parse(rate.get_zdzc())) - double.Parse(rate.get_dlzc());
                            num18 = num20;
                            num19 = double.Parse(rate.get_fgszc());
                        }
                        else
                        {
                            num20 = (((100.0 - double.Parse(rate.get_zjzc())) - double.Parse(rate.get_gdzc())) - double.Parse(rate.get_zdzc())) - double.Parse(rate.get_dlzc());
                            num19 = num20;
                            num18 = double.Parse(rate.get_zjzc());
                        }
                        if (DateTime.Now >= time.AddSeconds(0.0))
                        {
                            flag2 = true;
                            break;
                        }
                        if (!FileCacheHelper.get_AddBetLockUType_KC().Equals("zj"))
                        {
                            num30 = 2;
                            base.Add_Bet_Lock(num30.ToString(), rate.get_fgsname(), str33);
                        }
                        double num33 = double.Parse(table8.Rows[0]["current_odds"].ToString()) + Convert.ToDouble(table8.Rows[0][str19 + "_diff"].ToString().Trim());
                        string str39 = num33.ToString();
                        string str40 = str39.ToString();
                        base.GetOdds_KC(2, str33, ref str40);
                        double playDrawbackValue = base.GetPlayDrawbackValue(str22, ratio);
                        if ((playDrawbackValue != 0.0) && (double.Parse(str39) > playDrawbackValue))
                        {
                            base.DeleteCreditLock(str);
                            if (FileCacheHelper.get_AddBetLockUType_KC().Equals("zj"))
                            {
                                num30 = 2;
                                base.Un_Bet_Lock(num30.ToString(), getUserModelInfo.get_zjname(), str33);
                            }
                            else
                            {
                                num30 = 2;
                                base.Un_Bet_Lock(num30.ToString(), rate.get_fgsname(), str33);
                            }
                            base.Response.Write("<script>alert('賠率錯誤!');$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                            base.Response.End();
                        }
                        if (!nullable.HasValue)
                        {
                            nullable = new DateTime?(DateTime.Now);
                        }
                        cz_bet_kc _kc = new cz_bet_kc();
                        _kc.set_order_num(Utils.GetOrderNumber());
                        _kc.set_checkcode(str12);
                        _kc.set_u_name(getUserModelInfo.get_u_name());
                        _kc.set_u_nicker(getUserModelInfo.get_u_nicker());
                        _kc.set_phase_id(new int?(int.Parse(str17)));
                        _kc.set_phase(str16);
                        _kc.set_bet_time(nullable);
                        _kc.set_odds_id(new int?(int.Parse(str33)));
                        _kc.set_category(table8.Rows[0]["category"].ToString());
                        _kc.set_play_id(new int?(int.Parse(table8.Rows[0]["play_id"].ToString())));
                        _kc.set_play_name(str36);
                        _kc.set_bet_val(str37);
                        _kc.set_odds(str40);
                        _kc.set_amount(new decimal?(decimal.Parse(strArray5[num13])));
                        _kc.set_profit(0);
                        _kc.set_hy_drawback(new decimal?(decimal.Parse(str26)));
                        _kc.set_dl_drawback(new decimal?(decimal.Parse(str25)));
                        _kc.set_zd_drawback(new decimal?(decimal.Parse(str24)));
                        _kc.set_gd_drawback(new decimal?(decimal.Parse(str23)));
                        _kc.set_fgs_drawback(new decimal?(decimal.Parse(str22)));
                        _kc.set_zj_drawback(new decimal?(decimal.Parse(str21)));
                        _kc.set_dl_rate((float)int.Parse(rate.get_dlzc()));
                        _kc.set_zd_rate((float)int.Parse(rate.get_zdzc()));
                        _kc.set_gd_rate((float)int.Parse(rate.get_gdzc()));
                        _kc.set_fgs_rate(float.Parse(num19.ToString()));
                        _kc.set_zj_rate(float.Parse(num18.ToString()));
                        _kc.set_dl_name(rate.get_dlname());
                        _kc.set_zd_name(rate.get_zdname());
                        _kc.set_gd_name(rate.get_gdname());
                        _kc.set_fgs_name(rate.get_fgsname());
                        _kc.set_is_payment(0);
                        _kc.set_m_type(new int?(num3));
                        _kc.set_kind(str19);
                        _kc.set_ip(LSRequest.GetIP());
                        _kc.set_lottery_type(new int?(num2));
                        _kc.set_lottery_name(base.GetGameNameByID(_kc.get_lottery_type().ToString()));
                        _kc.set_ordervalidcode(Utils.GetOrderValidCode(_kc.get_u_name(), _kc.get_order_num(), _kc.get_bet_val(), _kc.get_odds(), _kc.get_kind(), Convert.ToInt32(_kc.get_phase_id()), Convert.ToInt32(_kc.get_odds_id()), Convert.ToDouble(_kc.get_amount())));
                        _kc.set_odds_zj(str39);
                        _kc.set_isPhone(1);
                        int num22 = 0;
                        if (!CallBLL.cz_bet_kc_bll.AddBet(_kc, decimal.Parse(strArray5[num13]), str, ref num22) || (num22 <= 0))
                        {
                            base.DeleteCreditLock(str);
                            if (FileCacheHelper.get_AddBetLockUType_KC().Equals("zj"))
                            {
                                num30 = 2;
                                base.Un_Bet_Lock(num30.ToString(), getUserModelInfo.get_zjname(), str33);
                            }
                            else
                            {
                                num30 = 2;
                                base.Un_Bet_Lock(num30.ToString(), rate.get_fgsname(), str33);
                            }
                            base.Response.Write("<script>alert('系統錯誤,請重試!');$('#JeuValidate').val('" + base.get_JeuValidate() + "');</script>");
                            base.Response.End();
                            return;
                        }
                        successBetList.Add(string.Concat(new object[] { _kc.get_odds_id(), ",", _kc.get_order_num(), ",", _kc.get_play_name(), ",", _kc.get_bet_val(), ",", _kc.get_odds(), ",", _kc.get_amount() }));
                        double num23 = (double.Parse(strArray5[num13]) * num18) / 100.0;
                        CallBLL.cz_odds_pk10_bll.UpdateGrandTotal(Convert.ToDecimal(num23), int.Parse(str33));
                        double num24 = double.Parse(table8.Rows[0]["grand_total"].ToString()) + num23;
                        double num25 = double.Parse(table8.Rows[0]["downbase"].ToString());
                        double num26 = Math.Floor((double)(num24 / num25));
                        if ((num26 >= 1.0) && (num25 >= 1.0))
                        {
                            double        num27 = double.Parse(table8.Rows[0]["down_odds_rate"].ToString()) * num26;
                            int           num29 = CallBLL.cz_odds_pk10_bll.UpdateGrandTotalCurrentOdds(num27.ToString(), (num23 - (num25 * num26)).ToString(), str33);
                            cz_system_log _log  = new cz_system_log();
                            _log.set_user_name("系統");
                            _log.set_children_name("");
                            _log.set_category(table8.Rows[0]["category"].ToString());
                            _log.set_play_name(str36);
                            _log.set_put_amount(str37);
                            num30 = 2;
                            _log.set_l_name(base.GetGameNameByID(num30.ToString()));
                            _log.set_l_phase(str16);
                            _log.set_action("降賠率");
                            _log.set_odds_id(int.Parse(str33));
                            string str41 = table8.Rows[0]["current_odds"].ToString();
                            _log.set_old_val(str41);
                            num33 = double.Parse(str41) - num27;
                            _log.set_new_val(num33.ToString());
                            _log.set_ip(LSRequest.GetIP());
                            _log.set_add_time(DateTime.Now);
                            _log.set_note("系統自動降賠");
                            _log.set_type_id(Convert.ToInt32((LSEnums.LogTypeID) 0));
                            _log.set_lottery_type(2);
                            CallBLL.cz_system_log_bll.Add(_log);
                            cz_jp_odds _odds = new cz_jp_odds();
                            _odds.set_add_time(DateTime.Now);
                            _odds.set_odds_id(int.Parse(str33));
                            _odds.set_phase_id(int.Parse(str17));
                            _odds.set_play_name(str36);
                            _odds.set_put_amount(str37);
                            _odds.set_odds(num27.ToString());
                            _odds.set_lottery_type(2);
                            _odds.set_phase(str16);
                            _odds.set_old_odds(str41);
                            _odds.set_new_odds((double.Parse(str41) - num27).ToString());
                            CallBLL.cz_jp_odds_bll.Add(_odds);
                        }
                        DataTable fgsWTTable = null;
                        if (getUserModelInfo.get_kc_op_odds().Equals(1))
                        {
                            fgsWTTable = base.GetFgsWTTable(2);
                        }
                        CallBLL.cz_autosale_pk10_bll.DLAutoSale(_kc.get_order_num(), str12, getUserModelInfo.get_u_nicker(), getUserModelInfo.get_u_name(), str19, table8.Rows[0]["play_id"].ToString(), str33.Trim(), str21, str22, str23, str24, str25, str26, str17, str16, _kc.get_ip(), num2, _kc.get_lottery_name(), getUserModelInfo, rate, fgsWTTable);
                        if (getUserModelInfo.get_kc_op_odds().Equals(1))
                        {
                            fgsWTTable = base.GetFgsWTTable(2);
                        }
                        CallBLL.cz_autosale_pk10_bll.ZDAutoSale(_kc.get_order_num(), str12, getUserModelInfo.get_u_nicker(), getUserModelInfo.get_u_name(), str19, table8.Rows[0]["play_id"].ToString(), str33.Trim(), str21, str22, str23, str24, str25, str26, str17, str16, _kc.get_ip(), num2, _kc.get_lottery_name(), getUserModelInfo, rate, fgsWTTable);
                        if (getUserModelInfo.get_kc_op_odds().Equals(1))
                        {
                            fgsWTTable = base.GetFgsWTTable(2);
                        }
                        CallBLL.cz_autosale_pk10_bll.GDAutoSale(_kc.get_order_num(), str12, getUserModelInfo.get_u_nicker(), getUserModelInfo.get_u_name(), str19, table8.Rows[0]["play_id"].ToString(), str33.Trim(), str21, str22, str23, str24, str25, str26, str17, str16, _kc.get_ip(), num2, _kc.get_lottery_name(), getUserModelInfo, rate, fgsWTTable);
                        if (getUserModelInfo.get_kc_op_odds().Equals(1))
                        {
                            fgsWTTable = base.GetFgsWTTable(2);
                        }
                        CallBLL.cz_autosale_pk10_bll.FGSAutoSale(_kc.get_order_num(), str12, getUserModelInfo.get_u_nicker(), getUserModelInfo.get_u_name(), str19, table8.Rows[0]["play_id"].ToString(), str33.Trim(), str21, str22, str23, str24, str25, str26, str17, str16, _kc.get_ip(), num2, _kc.get_lottery_name(), getUserModelInfo, rate, fgsWTTable);
                        if (FileCacheHelper.get_AddBetLockUType_KC().Equals("zj"))
                        {
                            num30 = 2;
                            base.Un_Bet_Lock(num30.ToString(), getUserModelInfo.get_zjname(), str33);
                        }
                        else
                        {
                            base.Un_Bet_Lock(2.ToString(), rate.get_fgsname(), str33);
                        }
                        num13++;
                        if (FileCacheHelper.get_GetKCPutMoneyCache() == "1")
                        {
                            base.SetUserDrawback_pk10(dataTable, num17.ToString());
                        }
                    }
                    base.SetUserRate_kc(rate);
                    if (FileCacheHelper.get_GetKCPutMoneyCache() != "1")
                    {
                        base.SetUserDrawback_pk10(dataTable);
                    }
                    getUserModelInfo.set_begin_kc("yes");
                    base.UserPutBetByPhone(plDT, successBetList, strArray3, strArray4, strArray5);
                    base.DeleteCreditLock(str);
                    base.Response.Write(string.Format("<script>window.location=\"tj_ok.aspx?lottery_type={0}&player_type={1}\";</script>", str4, str5));
                    base.Response.End();
                }
            }
        }
    }
Esempio n. 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = HttpContext.Current.Session["user_name"].ToString();
            cz_userinfo_session _session    = this.Session[str + "lottery_session_user_info"] as cz_userinfo_session;
            DataTable           lotteryList = base.GetLotteryList();

            if (!string.IsNullOrEmpty(LSRequest.qq("lid")))
            {
                this.v_lid = LSRequest.qq("lid");
                DataTable currentPhase = null;
                switch (Convert.ToInt32(this.v_lid))
                {
                case 0:
                    currentPhase = CallBLL.cz_phase_kl10_bll.IsPhaseClose();
                    break;

                case 1:
                    currentPhase = CallBLL.cz_phase_cqsc_bll.IsPhaseClose();
                    break;

                case 2:
                    currentPhase = CallBLL.cz_phase_pk10_bll.IsPhaseClose();
                    break;

                case 3:
                    currentPhase = CallBLL.cz_phase_xync_bll.IsPhaseClose();
                    break;

                case 4:
                    currentPhase = CallBLL.cz_phase_jsk3_bll.IsPhaseClose();
                    break;

                case 5:
                    currentPhase = CallBLL.cz_phase_kl8_bll.IsPhaseClose();
                    break;

                case 6:
                    currentPhase = CallBLL.cz_phase_k8sc_bll.IsPhaseClose();
                    break;

                case 7:
                    currentPhase = CallBLL.cz_phase_pcdd_bll.IsPhaseClose();
                    break;

                case 8:
                    currentPhase = CallBLL.cz_phase_pkbjl_bll.IsPhaseClose();
                    break;

                case 9:
                    currentPhase = CallBLL.cz_phase_xyft5_bll.IsPhaseClose();
                    break;

                case 10:
                    currentPhase = CallBLL.cz_phase_jscar_bll.IsPhaseClose();
                    break;

                case 11:
                    currentPhase = CallBLL.cz_phase_speed5_bll.IsPhaseClose();
                    break;

                case 12:
                    currentPhase = CallBLL.cz_phase_jspk10_bll.IsPhaseClose();
                    break;

                case 13:
                    currentPhase = CallBLL.cz_phase_jscqsc_bll.IsPhaseClose();
                    break;

                case 14:
                    currentPhase = CallBLL.cz_phase_jssfc_bll.IsPhaseClose();
                    break;

                case 15:
                    currentPhase = CallBLL.cz_phase_jsft2_bll.IsPhaseClose();
                    break;

                case 0x10:
                    currentPhase = CallBLL.cz_phase_car168_bll.IsPhaseClose();
                    break;

                case 0x11:
                    currentPhase = CallBLL.cz_phase_ssc168_bll.IsPhaseClose();
                    break;

                case 0x12:
                    currentPhase = CallBLL.cz_phase_vrcar_bll.IsPhaseClose();
                    break;

                case 0x13:
                    currentPhase = CallBLL.cz_phase_vrssc_bll.IsPhaseClose();
                    break;

                case 20:
                    currentPhase = CallBLL.cz_phase_xyftoa_bll.IsPhaseClose();
                    break;

                case 0x15:
                    currentPhase = CallBLL.cz_phase_xyftsg_bll.IsPhaseClose();
                    break;

                case 0x16:
                    currentPhase = CallBLL.cz_phase_happycar_bll.IsPhaseClose();
                    break;

                case 100:
                    currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase("1");
                    break;
                }
                DataRow[] rowArray = lotteryList.Select(string.Format("id={0}", Convert.ToInt32(this.v_lid)));
                int       num2     = 100;
                if (this.v_lid.Equals(num2.ToString()))
                {
                    cz_phase_six _six = CallBLL.cz_phase_six_bll.GetCurrentPhase();
                    this.v_url   = string.Format("/OldWeb/{0}/index.aspx?lid={1}", "L_SIX", 100);
                    this.v_phase = _six.get_phase();
                }
                else if (currentPhase.Rows[0]["isopen"].ToString().Equals("0"))
                {
                    DateTime now          = DateTime.Now;
                    DateTime time2        = DateTime.Now;
                    string   introduced13 = now.ToString("yyyy-MM-dd");
                    if (introduced13 == now.AddHours(7.0).ToString("yyyy-MM-dd"))
                    {
                        time2 = Convert.ToDateTime(now.ToString("yyyy-MM-dd") + " " + rowArray[0]["begintime"].ToString());
                    }
                    else
                    {
                        time2 = Convert.ToDateTime(now.AddDays(1.0).ToString("yyyy-MM-dd") + " " + rowArray[0]["begintime"].ToString());
                    }
                    this.v_currentTime = now.ToString("yyyy-MM-dd HH:mm:ss");
                    this.v_beginTime   = time2.ToString("yyyy-MM-dd HH:mm:ss");
                    string str2 = "";
                    switch (Convert.ToInt32(this.v_lid))
                    {
                    case 0:
                    case 2:
                    case 3:
                    case 8:
                    case 9:
                    case 10:
                    case 12:
                    case 14:
                    case 15:
                    case 0x10:
                    case 0x12:
                    case 20:
                    case 0x15:
                    case 0x16:
                        if (string.IsNullOrEmpty(str2))
                        {
                            str2 = string.Format("/OldWeb/{0}/index.aspx?lid={1}", rowArray[0]["dir_name"].ToString(), rowArray[0]["id"].ToString());
                        }
                        break;

                    case 1:
                    case 4:
                    case 6:
                    case 7:
                    case 11:
                    case 13:
                    case 0x11:
                    case 0x13:
                        str2 = string.Format("/OldWeb/{0}/index.aspx?lid={1}", rowArray[0]["dir_name"].ToString(), rowArray[0]["id"].ToString());
                        break;

                    case 5:
                        str2 = string.Format("/OldWeb/{0}/index.aspx?lid={1}", rowArray[0]["dir_name"].ToString(), rowArray[0]["id"].ToString());
                        break;
                    }
                    this.v_url = str2;
                }
            }
        }