예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            agent_userinfo_session model = this.Session[this.Session["user_name"] + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin = model.get_u_skin();
            if (!this.Session["user_type"].ToString().Equals("zj"))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(model, "po_1_1");
            this.lotteryId = LSRequest.qq("lid");
            this.lotteryDT = base.GetLotteryList();
            base.IsLotteryExist(this.lotteryId, "u100032", "1", "");
            int num = 0;

            foreach (DataRow row in this.lotteryDT.Rows)
            {
                if ((((Convert.ToInt32(row["id"].ToString()).Equals(0) || Convert.ToInt32(row["id"].ToString()).Equals(1)) || (Convert.ToInt32(row["id"].ToString()).Equals(2) || Convert.ToInt32(row["id"].ToString()).Equals(3))) || ((Convert.ToInt32(row["id"].ToString()).Equals(4) || Convert.ToInt32(row["id"].ToString()).Equals(5)) || (Convert.ToInt32(row["id"].ToString()).Equals(6) || Convert.ToInt32(row["id"].ToString()).Equals(7)))) || ((((Convert.ToInt32(row["id"].ToString()).Equals(9) || Convert.ToInt32(row["id"].ToString()).Equals(8)) || (Convert.ToInt32(row["id"].ToString()).Equals(10) || Convert.ToInt32(row["id"].ToString()).Equals(11))) || ((Convert.ToInt32(row["id"].ToString()).Equals(13) || Convert.ToInt32(row["id"].ToString()).Equals(12)) || (Convert.ToInt32(row["id"].ToString()).Equals(14) || Convert.ToInt32(row["id"].ToString()).Equals(15)))) || (((Convert.ToInt32(row["id"].ToString()).Equals(0x10) || Convert.ToInt32(row["id"].ToString()).Equals(0x11)) || (Convert.ToInt32(row["id"].ToString()).Equals(0x12) || Convert.ToInt32(row["id"].ToString()).Equals(0x13))) || (Convert.ToInt32(row["id"].ToString()).Equals(20) || Convert.ToInt32(row["id"].ToString()).Equals(0x16)))))
                {
                    string str2 = "";
                    if (num > 9)
                    {
                        str2 = "<br />";
                        num  = 0;
                    }
                    this.sltString = this.sltString + str2 + string.Format("<label class=\"topLabel\"><input value='{0}' {1} type=\"checkbox\" id=\"chk_{2}\" name=\"chk_{3}\" class=\"chk\" /><span>{4}</span></label>&nbsp;&nbsp;", new object[] { row["id"].ToString(), row["id"].ToString().Equals(this.lotteryId) ? "checked=checked" : "", row["id"].ToString(), row["id"].ToString(), base.GetGameNameByID(row["id"].ToString()) });
                    num++;
                }
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin      = _session.get_u_skin();
            this.lotteryId = base.AgentCurrentLotteryID;
            this.uid       = LSRequest.qq("uid");
            this.mId       = LSRequest.qq("mid");
            this.lotteryDT = base.GetLotteryList();
            int num = 1;

            if (this.mId.Equals(num.ToString()))
            {
                base.Response.Redirect(string.Format("/AutoLet/AutoLet_Show_six.aspx?uid={0}&mid={1}", this.uid, this.mId), true);
            }
            this.cz_users_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
            if (this.cz_users_model == null)
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100038&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!this.cz_users_model.get_kc_allow_sale().Equals(1))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100036&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!_session.get_u_type().Equals("zj") && !base.IsUpperLowerLevels(this.cz_users_model.get_u_name(), _session.get_u_type(), _session.get_u_name()))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            this.InitData();
        }
예제 #3
0
파일: GameHall.cs 프로젝트: singlag888/dll
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            _session.get_u_name().Trim();
            this.skin        = _session.get_u_skin();
            this.DT          = base.GetLotteryList();
            this.currentTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin = model.get_u_skin();
            if (!model.get_u_type().Equals("zj"))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(model, "po_3_5");
            this.lotteryId = LSRequest.qq("lid");
            this.lotteryDT = base.GetLotteryList();
            base.IsLotteryExist(this.lotteryId, "u100032", "1", "");
            Dictionary <string, Dictionary <string, string> > dictionary = new Dictionary <string, Dictionary <string, string> >();

            DataRow[] rowArray  = this.lotteryDT.Select(string.Format(" master_id={0} ", 1));
            DataRow[] rowArray2 = this.lotteryDT.Select(string.Format(" master_id={0} ", 2));
            if ((rowArray != null) && (rowArray.Length > 0))
            {
                string str2 = "";
                Dictionary <string, string> dictionary2 = new Dictionary <string, string>();
                foreach (DataRow row in rowArray)
                {
                    dictionary2.Add(row["id"].ToString(), row["lottery_name"].ToString());
                    str2          = row["name"].ToString();
                    this.six_list = this.six_list + string.Format("<option value='{0}' {1}>{2}</option>", row["id"].ToString(), "selected=selected", row["lottery_name"].ToString());
                }
                dictionary.Add(1.ToString() + "," + str2, dictionary2);
            }
            if ((rowArray2 != null) && (rowArray2.Length > 0))
            {
                string str3 = "";
                Dictionary <string, string> dictionary3 = new Dictionary <string, string>();
                foreach (DataRow row2 in rowArray2)
                {
                    dictionary3.Add(row2["id"].ToString(), row2["lottery_name"].ToString());
                    str3         = row2["name"].ToString();
                    this.kc_list = this.kc_list + string.Format("<option value='{0}'>{1}</option>", row2["id"].ToString(), row2["lottery_name"].ToString());
                }
                dictionary.Add(2.ToString() + "," + str3, dictionary3);
            }
            this.jsonLottery = JsonHandle.ObjectToJson(dictionary);
        }
예제 #5
0
파일: EditPwd.cs 프로젝트: singlag888/dll
        protected void Page_Load(object sender, EventArgs e)
        {
            agent_userinfo_session _session = this.Session[this.Session["user_name"].ToString() + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin = _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(base.ShowDialogBox("請輸入完整的密碼!", "", 400));
                    base.Response.End();
                }
                if (str3 == str2)
                {
                    base.Response.Write(base.ShowDialogBox("新密碼和舊密碼不能相同!", "", 400));
                    base.Response.End();
                }
                if (str3 != str4)
                {
                    base.Response.Write(base.ShowDialogBox("新密碼和確認新密碼不一致!", "", 400));
                    base.Response.End();
                }
                if (!Regexlib.IsValidPassword(str3.Trim(), base.get_GetPasswordLU()))
                {
                    if (base.get_GetPasswordLU().Equals("1"))
                    {
                        base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含大寫字母、小寫字母和数字!", "", 400));
                        base.Response.End();
                    }
                    else
                    {
                        base.Response.Write(base.ShowDialogBox("密碼要8-20位,且必需包含字母、和数字!", "", 400));
                        base.Response.End();
                    }
                    base.Response.End();
                }
                if (_session.get_users_child_session() == null)
                {
                    cz_users _users = CallBLL.cz_users_bll.AgentLogin(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.ShowDialogBox("您輸入原密碼不正確!", "", 400));
                            base.Response.End();
                        }
                        else
                        {
                            string ramSalt = Utils.GetRamSalt(6);
                            if (CallBLL.cz_users_bll.UpUserPwd(this.Session["user_name"].ToString(), DESEncrypt.EncryptString(str3, ramSalt), ramSalt) > 0)
                            {
                                int num = CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["user_name"].ToString());
                                base.log_user_reset_password(this.Session["user_name"].ToString(), this.Session["user_name"].ToString(), "", this.Session["modifypassword"]);
                                this.Session["modifypassword"] = null;
                                string url = "Quit.aspx";
                                base.Response.Write(base.ShowDialogBox("修改密碼成功!", url, 0));
                                base.Response.End();
                            }
                            else
                            {
                                base.Response.Write(base.ShowDialogBox("修改密碼不成功!", "", 400));
                                base.Response.End();
                            }
                        }
                    }
                }
                else
                {
                    cz_users_child _child = CallBLL.cz_users_child_bll.AgentLogin(this.Session["child_user_name"].ToString().ToLower());
                    if (_child != null)
                    {
                        string str9  = _child.get_salt().Trim();
                        string str10 = DESEncrypt.EncryptString(str2, str9);
                        if (_child.get_u_psw() != str10)
                        {
                            base.Response.Write(base.ShowDialogBox("您輸入原密碼不正確!", "", 400));
                            base.Response.End();
                        }
                        else
                        {
                            string str11 = Utils.GetRamSalt(6);
                            if (CallBLL.cz_users_child_bll.UpUserPwd(this.Session["child_user_name"].ToString(), DESEncrypt.EncryptString(str3, str11), str11) > 0)
                            {
                                int num2 = CallBLL.cz_users_bll.UpdateUserPwdStutas(this.Session["child_user_name"].ToString().ToLower());
                                base.log_user_reset_password(this.Session["child_user_name"].ToString(), this.Session["child_user_name"].ToString(), "", this.Session["modifypassword"]);
                                this.Session["modifypassword"] = null;
                                string str12 = "Quit.aspx";
                                base.Response.Write(base.ShowDialogBox("修改密碼成功!", str12, 0));
                                base.Response.End();
                            }
                            else
                            {
                                base.Response.Write(base.ShowDialogBox("修改密碼不成功!", "", 400));
                                base.Response.End();
                            }
                        }
                    }
                }
            }
        }
예제 #6
0
        private void user_login(HttpContext context, ref string strResult)
        {
            string       str    = "";
            string       str2   = "";
            string       str3   = "";
            string       str4   = "";
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object> {
                {
                    "type",
                    "user_login"
                }
            };
            string loginName    = LSRequest.qq("loginName").Trim().ToLower();
            string loginPwd     = LSRequest.qq("loginPwd").Trim();
            string ValidateCode = 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(loginName) || string.IsNullOrEmpty(loginPwd))
            {
                context.Response.End();
            }
            else
            {
                DateTime time = new DateTime();
                string   retry_times;
                string   str10;
                string   str11;
                string   str14;
                DateTime?nullable;
                int      num2;
                DateTime?nullable3;
                DateTime time2;
                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(loginName))
                    {
//                        TODO 登录超时
//                        if (PageBase.IsErrTimesAbove(ref time, str5))
//                        {
//                            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(str5);
//                            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(loginName) || string.IsNullOrEmpty(loginPwd))
                    {
                        context.Response.End();
                        return;
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(loginName) || string.IsNullOrEmpty(loginPwd))
                    {
                        context.Response.End();
                        return;
                    }
                    if (string.IsNullOrEmpty(ValidateCode))
                    {
                        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() != ValidateCode.ToLower())
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                }
                cz_users       _users = CallBLL.cz_users_bll.AgentLogin(loginName.ToLower());
                cz_users_child _child = null;
                if (_users == null)
                {
                    _child = CallBLL.cz_users_child_bll.AgentLogin(loginName.ToLower());
                    if (_child != null)
                    {
                        retry_times = _child.get_retry_times().ToString();
                        if (!string.IsNullOrEmpty(retry_times) && (int.Parse(retry_times) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                        {
                            if (!PageBase.IsLockedTimeout(loginName, "child"))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(560);
                                result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                                strResult = JsonHandle.ObjectToJson(result);
                                return;
                            }
                            PageBase.zero_retry_times_children(loginName);
                        }
                        str10 = _child.get_salt().Trim();
                        str11 = DESEncrypt.EncryptString(loginPwd, str10);
                        if (_child.get_u_psw() != str11)
                        {
                            context.Session["lottery_session_img_code"] = null;
                            PageBase.inc_retry_times_children(loginName);
                            PageBase.login_error_ip();
                            result.set_success(400);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                            strResult = JsonHandle.ObjectToJson(result);
                            if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                            {
                                if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(loginName))
                                {
                                    CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(loginName);
                                }
                                else
                                {
                                    CallBLL.cz_user_psw_err_log_bll.AddUser(loginName);
                                }
                                if (PageBase.IsErrTimesAbove(ref time, loginName))
                                {
                                    context.Session["lottery_session_img_code"] = null;
                                    result.set_success(400);
                                    result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                    dictionary.Add("is_display_code", "1");
                                    result.set_data(dictionary);
                                    strResult = JsonHandle.ObjectToJson(result);
                                    context.Session["lottery_session_img_code_display"] = 1;
                                }
                            }
                            return;
                        }
                        str2   = _child.get_status().ToString();
                        str3   = PageBase.upper_user_status(_child.get_parent_u_name());
                        _users = CallBLL.cz_users_bll.AgentLogin(_child.get_parent_u_name());
                    }
                    else
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100002", "MessageHint"));
                        dictionary.Add("fs_name", "loginName");
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                    PageBase.zero_retry_times_children(loginName);
                }
                else
                {
                    retry_times = _users.get_retry_times().ToString();
                    if (!string.IsNullOrEmpty(retry_times) && (int.Parse(retry_times) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                    {
                        if (!PageBase.IsLockedTimeout(loginName, "master"))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(560);
                            result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                            strResult = JsonHandle.ObjectToJson(result);
                            return;
                        }
                        PageBase.zero_retry_times(loginName);
                    }
                    str = _users.get_a_state().ToString();
                    string str12 = _users.get_a_state().ToString();
                    str4 = PageBase.upper_user_status(_users.get_u_name());
                    if (str12.Equals("2"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint"));
                        dictionary.Add("fs_name", "loginName");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str4 == "2")
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    str   = (str12 == null) ? "0" : str;
                    str10 = _users.get_salt().Trim();
                    str11 = DESEncrypt.EncryptString(loginPwd, str10);
                    if (_users.get_u_psw() != str11)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.inc_retry_times(loginName);
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                        {
                            if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(loginName))
                            {
                                CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(loginName);
                            }
                            else
                            {
                                CallBLL.cz_user_psw_err_log_bll.AddUser(loginName);
                            }
                            if (PageBase.IsErrTimesAbove(ref time, loginName))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(400);
                                result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                dictionary.Add("is_display_code", "1");
                                result.set_data(dictionary);
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["lottery_session_img_code_display"] = 1;
                            }
                        }
                        return;
                    }
                    PageBase.zero_retry_times(loginName);
                }
                if (!string.IsNullOrEmpty(str2))
                {
                    context.Session["user_name"]       = _users.get_u_name().Trim();
                    context.Session["user_type"]       = _users.get_u_type().Trim();
                    context.Session["child_user_name"] = _child.get_u_name().Trim();
                    context.Session["user_state"]      = str2.Trim();
                    if (str2.Equals("2"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (_users.get_a_state() == 2)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的主帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str3 == "2")
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session.Abandon();
                        return;
                    }
                    if (str2 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str2;
                    }
                    else if (_users.get_a_state() == 1)
                    {
                        result.set_success(200);
                        result.set_tipinfo("您的主帳號已被凍結,请与管理员联系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = _users.get_a_state().ToString();
                    }
                    else if (str3 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str3;
                    }
                    else
                    {
                        context.Session["user_state"] = "0";
                        result.set_success(200);
                        strResult = JsonHandle.ObjectToJson(result);
                    }
                }
                else
                {
                    context.Session["user_name"]  = _users.get_u_name().Trim();
                    context.Session["user_type"]  = _users.get_u_type().Trim();
                    context.Session["user_state"] = str.Trim();
                    if (str.Equals("1"))
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str;
                    }
                    else if (str4 == "1")
                    {
                        result.set_success(200);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["user_state"] = str4;
                    }
                    else
                    {
                        context.Session["user_state"] = "0";
                        result.set_success(200);
                        strResult = JsonHandle.ObjectToJson(result);
                    }
                }
                agent_userinfo_session _session = new agent_userinfo_session();
                _session.set_u_id(_users.get_u_id());
                _session.set_u_name(_users.get_u_name().Trim());
                _session.set_u_psw(_users.get_u_psw().Trim());
                _session.set_u_nicker(_users.get_u_nicker().Trim());
                _session.set_u_skin(_users.get_u_skin().Trim());
                if (_child != null)
                {
                    if (string.IsNullOrEmpty(_child.get_u_skin()))
                    {
                        _session.set_u_skin("");
                    }
                    else
                    {
                        _session.set_u_skin(_child.get_u_skin());
                    }
                }
                _session.set_sup_name(_users.get_sup_name().Trim());
                _session.set_u_type(_users.get_u_type().Trim());
                _session.set_su_type(_users.get_su_type().Trim());
                _session.set_a_state(_users.get_a_state());
                _session.set_six_kind(_users.get_six_kind());
                _session.set_kc_kind(_users.get_kc_kind());
                _session.set_allow_sale(_users.get_allow_sale());
                _session.set_kc_allow_sale(_users.get_kc_allow_sale());
                _session.set_negative_sale(_users.get_negative_sale());
                if (!_users.get_allow_view_report().HasValue)
                {
                    _session.set_allow_view_report(0);
                }
                else
                {
                    _session.set_allow_view_report(_users.get_allow_view_report());
                }
                DataRow item = CallBLL.cz_admin_sysconfig_bll.GetItem();
                if (item == null)
                {
                    _session.set_u_skin("Blue");
                }
                else
                {
                    string str13 = item["agent_skin"].ToString();
                    if (string.IsNullOrEmpty(_session.get_u_skin()) || (str13.IndexOf(_session.get_u_skin()) < 0))
                    {
                        _session.set_u_skin(str13.Split(new char[] { '|' })[0]);
                    }
                }
                if (_child != null)
                {
                    _child.set_salt("");
                }
                _session.set_users_child_session(_child);
                DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo();
                if (zJInfo != null)
                {
                    _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim());
                }
                if (!_session.get_u_type().ToLower().Equals("zj"))
                {
                    cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(_session.get_u_name());
                    _session.set_fgs_name(rateKCByUserName.get_fgs_name());
                    _session.set_gd_name(rateKCByUserName.get_gd_name());
                    _session.set_zd_name(rateKCByUserName.get_zd_name());
                    _session.set_dl_name(rateKCByUserName.get_dl_name());
                    DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(_session.get_u_name());
                    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["child_user_name"] = null;
                if (_child != null)
                {
                    context.Session["child_user_name"] = _child.get_u_name();
                }
                context.Session["user_name"] = _users.get_u_name();
                context.Session[_users.get_u_name() + "lottery_session_user_info"] = _session;
                PageBase.SetAppcationFlag(loginName);
                if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
                {
                    bool flag4 = false;
                    if ((_session.get_users_child_session() != null) && _session.get_users_child_session().get_is_admin().Equals(1))
                    {
                        flag4 = true;
                    }
                    if (!flag4)
                    {
//                        if (FileCacheHelper.get_RedisStatOnline().Equals(1))
//                        {
//                            new PageBase_Redis().InitUserOnlineTopToRedis(str5, _session.get_u_type());
//                        }
//                        if (FileCacheHelper.get_RedisStatOnline().Equals(2))
//                        {
//                            new PageBase_Redis().InitUserOnlineTopToRedisStack(str5, _session.get_u_type());
//                        }
                    }
                }
                else
                {
                    MemberPageBase.stat_top_online(loginName);
                    MemberPageBase.stat_online(loginName, _session.get_u_type());
                }
                if (FileCacheHelper.get_RedisStatOnline() == 0)
                {
                    PageBase.ZeroIsOutFlag(loginName);
                }
                CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(loginName);
                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(loginName);
                PageBase base2 = new PageBase();
//                _log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current));
                bool flag5 = CallBLL.cz_login_log_bll.Add(_log);
                if (_child == null)
                {
                    str14 = _users.get_is_changed().ToString();
                    if (string.IsNullOrEmpty(str14))
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else if (str14 == "0")
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else
                    {
                        nullable  = _users.get_last_changedate();
                        num2      = PageBase.PasswordExpire();
                        nullable3 = nullable;
                        time2     = DateTime.Now.AddDays((double)-num2);
                        if (nullable3.HasValue ? (nullable3.GetValueOrDefault() < time2) : false)
                        {
                            result.set_success(550);
                            result.set_tipinfo("密碼過期,需重置密碼!");
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["modifypassword"] = "******";
                        }
                    }
                }
                else
                {
                    str14 = _child.get_is_changed().ToString();
                    if (string.IsNullOrEmpty(str14))
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else if (str14 == "0")
                    {
                        result.set_success(550);
                        result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                        strResult = JsonHandle.ObjectToJson(result);
                        context.Session["modifypassword"] = "******";
                    }
                    else
                    {
                        nullable = _child.get_last_changedate();
                        num2     = PageBase.PasswordExpire();
                        if (nullable.HasValue && ((nullable3 = nullable).HasValue ? (nullable3.GetValueOrDefault() < (time2 = DateTime.Now.AddDays((double)-num2))) : false))
                        {
                            result.set_success(550);
                            result.set_tipinfo("密碼過期,需重置密碼!");
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["modifypassword"] = "******";
                        }
                    }
                }
            }
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin      = _session.get_u_skin();
            this.lotteryDT = base.GetLotteryList();
            this.lotteryId = LSRequest.qq("lid");
            this.mId       = LSRequest.qq("mid");
            this.uid       = LSRequest.qq("uid");
            int num = 1;

            if (!this.mId.Equals(num.ToString()))
            {
                base.Response.Redirect(string.Format("/AutoLet/AutoLet_Show_kc.aspx?uid={0}&mid={1}", this.uid, this.mId), true);
            }
            this.cz_users_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid);
            if (this.cz_users_model == null)
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100038&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!this.cz_users_model.get_allow_sale().Equals(1))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100037&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            if (!_session.get_u_type().Equals("zj") && !base.IsUpperLowerLevels(this.cz_users_model.get_u_name(), _session.get_u_type(), _session.get_u_name()))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1");
                base.Response.End();
            }
            DataTable play = null;

            if (!FileCacheHelper.get_IsShowLM_B())
            {
                play = CallBLL.cz_play_six_bll.GetPlay("91060,91061,91062,91063,91064,91065");
            }
            else
            {
                play = CallBLL.cz_play_six_bll.GetPlay();
            }
            if (play != null)
            {
                this.play_Row = play.Select(" play_id <>91002 and play_id <>91015 ");
            }
            DataSet autosaleByUserName = null;

            if (!FileCacheHelper.get_IsShowLM_B())
            {
                autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(this.cz_users_model.get_u_name(), "91060,91061,91062,91063,91064,91065");
            }
            else
            {
                autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(this.cz_users_model.get_u_name());
            }
            if (((autosaleByUserName != null) && (autosaleByUserName.Tables.Count > 0)) && (autosaleByUserName.Tables[0].Rows.Count > 0))
            {
                this.Autosale_DT = autosaleByUserName.Tables[0];
            }
        }
예제 #8
0
파일: User.cs 프로젝트: singlag888/dll
        private void userLogin(HttpContext context, ref string strResult)
        {
            DateTime?    nullable12;
            DateTime     time4;
            string       str    = "";
            string       str2   = "";
            string       str3   = "";
            string       str4   = "";
            ReturnResult result = new ReturnResult();
            Dictionary <string, object> dictionary = new Dictionary <string, object>();

            dictionary.Add("type", "user_login");
            string str5 = LSRequest.qq("loginName").Trim().ToLower();
            string str6 = LSRequest.qq("loginPwd").Trim();
            string str7 = 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);
                return;
            }
            if (string.IsNullOrEmpty(str5) || string.IsNullOrEmpty(str6))
            {
                context.Response.End();
                return;
            }
            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(str5))
                {
                    DateTime time;
                    if (PageBase.IsErrTimesAbove(ref time, str5))
                    {
                        if (!PageBase.IsErrTimeout(time))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(400);
                            result.set_tipinfo("");
                            dictionary.Add("isDisplayCode", 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(str5);
                        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(str5) || string.IsNullOrEmpty(str6))
                {
                    context.Response.End();
                    return;
                }
            }
            else
            {
                if (string.IsNullOrEmpty(str5) || string.IsNullOrEmpty(str6))
                {
                    context.Response.End();
                    return;
                }
                if (string.IsNullOrEmpty(str7))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    dictionary.Add("isDisplayCode", 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)
                {
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                if (context.Session["lottery_session_img_code"].ToString().ToLower() != str7.ToLower())
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(410);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100001", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
            }
            cz_users       _users = CallBLL.cz_users_bll.AgentLogin(str5.ToLower());
            cz_users_child _child = null;

            if (_users == null)
            {
                _child = CallBLL.cz_users_child_bll.AgentLogin(str5.ToLower());
                if (_child != null)
                {
                    string str9 = _child.get_retry_times().ToString();
                    if (!string.IsNullOrEmpty(str9) && (int.Parse(str9) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                    {
                        if (!PageBase.IsLockedTimeout(str5, "child"))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(560);
                            result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                            strResult = JsonHandle.ObjectToJson(result);
                            return;
                        }
                        PageBase.zero_retry_times_children(str5);
                    }
                    string str10 = _child.get_salt().Trim();
                    string str11 = DESEncrypt.EncryptString(str6, str10);
                    if (_child.get_u_psw() != str11)
                    {
                        context.Session["lottery_session_img_code"] = null;
                        PageBase.inc_retry_times_children(str5);
                        PageBase.login_error_ip();
                        result.set_success(400);
                        result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                        strResult = JsonHandle.ObjectToJson(result);
                        if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                        {
                            DateTime time2;
                            if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str5))
                            {
                                CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(str5);
                            }
                            else
                            {
                                CallBLL.cz_user_psw_err_log_bll.AddUser(str5);
                            }
                            if (PageBase.IsErrTimesAbove(ref time2, str5))
                            {
                                context.Session["lottery_session_img_code"] = null;
                                result.set_success(400);
                                result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                                dictionary.Add("isDisplayCode", 1);
                                result.set_data(dictionary);
                                strResult = JsonHandle.ObjectToJson(result);
                                context.Session["lottery_session_img_code_display"] = 1;
                            }
                        }
                        return;
                    }
                    str2   = _child.get_status().ToString();
                    str3   = PageBase.upper_user_status(_child.get_parent_u_name());
                    _users = CallBLL.cz_users_bll.AgentLogin(_child.get_parent_u_name());
                }
                else
                {
                    context.Session["lottery_session_img_code"] = null;
                    PageBase.login_error_ip();
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100002", "MessageHint"));
                    dictionary.Add("fs_name", "loginName");
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                PageBase.zero_retry_times_children(str5);
            }
            else
            {
                string str12 = _users.get_retry_times().ToString();
                if (!string.IsNullOrEmpty(str12) && (int.Parse(str12) > int.Parse(FileCacheHelper.get_GetLockedUserCount())))
                {
                    if (!PageBase.IsLockedTimeout(str5, "master"))
                    {
                        context.Session["lottery_session_img_code"] = null;
                        result.set_success(400);
                        result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!");
                        strResult = JsonHandle.ObjectToJson(result);
                        return;
                    }
                    PageBase.zero_retry_times(str5);
                }
                str = _users.get_a_state().ToString();
                string str13 = _users.get_a_state().ToString();
                str4 = PageBase.upper_user_status(_users.get_u_name());
                if (str13.Equals("2"))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint"));
                    dictionary.Add("fs_name", "loginName");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str4 == "2")
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                str = (str13 == null) ? "0" : str;
                string str14 = _users.get_salt().Trim();
                string str15 = DESEncrypt.EncryptString(str6, str14);
                if (_users.get_u_psw() != str15)
                {
                    context.Session["lottery_session_img_code"] = null;
                    PageBase.inc_retry_times(str5);
                    PageBase.login_error_ip();
                    result.set_success(400);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    if (context.Session["lottery_session_img_code_display"].ToString() == "0")
                    {
                        DateTime time3;
                        if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str5))
                        {
                            CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(str5);
                        }
                        else
                        {
                            CallBLL.cz_user_psw_err_log_bll.AddUser(str5);
                        }
                        if (PageBase.IsErrTimesAbove(ref time3, str5))
                        {
                            context.Session["lottery_session_img_code"] = null;
                            result.set_success(400);
                            result.set_tipinfo(PageBase.GetMessageByCache("u100003", "MessageHint"));
                            dictionary.Add("isDisplayCode", 1);
                            result.set_data(dictionary);
                            strResult = JsonHandle.ObjectToJson(result);
                            context.Session["lottery_session_img_code_display"] = 1;
                        }
                    }
                    return;
                }
                PageBase.zero_retry_times(str5);
            }
            if (!string.IsNullOrEmpty(str2))
            {
                context.Session["user_name"]       = _users.get_u_name().Trim();
                context.Session["user_type"]       = _users.get_u_type().Trim();
                context.Session["child_user_name"] = _child.get_u_name().Trim();
                context.Session["user_state"]      = str2.Trim();
                if (str2.Equals("2"))
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (_users.get_a_state() == 2)
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的主帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str3 == "2")
                {
                    context.Session["lottery_session_img_code"] = null;
                    result.set_success(400);
                    result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session.Abandon();
                    return;
                }
                if (str2 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str2;
                }
                else if (_users.get_a_state() == 1)
                {
                    result.set_success(200);
                    result.set_tipinfo("您的主帳號已被凍結,请与管理员联系!");
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = _users.get_a_state().ToString();
                }
                else if (str3 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str3;
                }
                else
                {
                    context.Session["user_state"] = "0";
                    result.set_success(200);
                    strResult = JsonHandle.ObjectToJson(result);
                }
            }
            else
            {
                context.Session["user_name"]  = _users.get_u_name().Trim();
                context.Session["user_type"]  = _users.get_u_type().Trim();
                context.Session["user_state"] = str.Trim();
                if (str.Equals("1"))
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str;
                }
                else if (str4 == "1")
                {
                    result.set_success(200);
                    result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint"));
                    strResult = JsonHandle.ObjectToJson(result);
                    context.Session["user_state"] = str4;
                }
                else
                {
                    context.Session["user_state"] = "0";
                    result.set_success(200);
                    strResult = JsonHandle.ObjectToJson(result);
                }
            }
            agent_userinfo_session _session = new agent_userinfo_session();

            _session.set_u_id(_users.get_u_id());
            _session.set_u_name(_users.get_u_name().Trim());
            _session.set_u_psw(_users.get_u_psw().Trim());
            _session.set_u_nicker(_users.get_u_nicker().Trim());
            _session.set_u_skin(_users.get_u_skin().Trim());
            if (_child != null)
            {
                if (string.IsNullOrEmpty(_child.get_u_skin()))
                {
                    _session.set_u_skin("");
                }
                else
                {
                    _session.set_u_skin(_child.get_u_skin());
                }
            }
            _session.set_sup_name(_users.get_sup_name().Trim());
            _session.set_u_type(_users.get_u_type().Trim());
            _session.set_su_type(_users.get_su_type().Trim());
            _session.set_a_state(_users.get_a_state());
            _session.set_six_kind(_users.get_six_kind());
            _session.set_kc_kind(_users.get_kc_kind());
            _session.set_allow_sale(_users.get_allow_sale());
            _session.set_kc_allow_sale(_users.get_kc_allow_sale());
            _session.set_negative_sale(_users.get_negative_sale());
            if (!_users.get_allow_view_report().HasValue)
            {
                _session.set_allow_view_report(0);
            }
            else
            {
                _session.set_allow_view_report(_users.get_allow_view_report());
            }
            DataRow item = CallBLL.cz_admin_sysconfig_bll.GetItem();

            if (item == null)
            {
                _session.set_u_skin("Blue");
            }
            else
            {
                string str16 = item["agent_skin"].ToString();
                if (string.IsNullOrEmpty(_session.get_u_skin()) || (str16.IndexOf(_session.get_u_skin()) < 0))
                {
                    _session.set_u_skin(str16.Split(new char[] { '|' })[0]);
                }
            }
            if (_child != null)
            {
                _child.set_salt("");
            }
            _session.set_users_child_session(_child);
            DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo();

            if (zJInfo != null)
            {
                _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim());
            }
            if (!_session.get_u_type().ToLower().Equals("zj"))
            {
                cz_rate_kc rateKCByUserName = CallBLL.cz_rate_kc_bll.GetRateKCByUserName(_session.get_u_name());
                _session.set_fgs_name(rateKCByUserName.get_fgs_name());
                _session.set_gd_name(rateKCByUserName.get_gd_name());
                _session.set_zd_name(rateKCByUserName.get_zd_name());
                _session.set_dl_name(rateKCByUserName.get_dl_name());
                DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(_session.get_u_name());
                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["child_user_name"] = null;
            if (_child != null)
            {
                context.Session["child_user_name"] = _child.get_u_name();
            }
            context.Session["user_name"] = _users.get_u_name();
            context.Session[_users.get_u_name() + "lottery_session_user_info"] = _session;
            PageBase.SetAppcationFlag(str5);
            if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2))
            {
                bool flag6 = false;
                if ((_session.get_users_child_session() != null) && _session.get_users_child_session().get_is_admin().Equals(1))
                {
                    flag6 = true;
                }
                if (!flag6)
                {
                    if (FileCacheHelper.get_RedisStatOnline().Equals(1))
                    {
                        new PageBase_Redis().InitUserOnlineTopToRedis(str5, _session.get_u_type());
                    }
                    else if (FileCacheHelper.get_RedisStatOnline().Equals(2))
                    {
                        new PageBase_Redis().InitUserOnlineTopToRedisStack(str5, _session.get_u_type());
                    }
                }
            }
            else
            {
                MemberPageBase.stat_top_online(str5);
                MemberPageBase.stat_online(str5, _session.get_u_type());
            }
            if (FileCacheHelper.get_RedisStatOnline().Equals(0))
            {
                PageBase.ZeroIsOutFlag(str5);
            }
            CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str5);
            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(str5);
            new PageBase();
            _log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current));
            CallBLL.cz_login_log_bll.Add(_log);
            if (_child == null)
            {
                string str17 = _users.get_is_changed().ToString();
                if (string.IsNullOrEmpty(str17) || (str17 == "0"))
                {
                    result.set_success(550);
                    result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                    strResult = JsonHandle.ObjectToJson(result);
                    return;
                }
                DateTime?nullable = _users.get_last_changedate();
                int      num2     = PageBase.PasswordExpire();
                if (nullable.HasValue)
                {
                    nullable12 = nullable;
                    time4      = DateTime.Now.AddDays((double)-num2);
                    if (!(nullable12.HasValue ? (nullable12.GetValueOrDefault() < time4) : false))
                    {
                        goto Label_131D;
                    }
                }
                result.set_success(550);
                result.set_tipinfo("密碼過期,需重置密碼!");
                strResult = JsonHandle.ObjectToJson(result);
                return;
            }
            string str18 = _child.get_is_changed().ToString();

            if (string.IsNullOrEmpty(str18) || (str18 == "0"))
            {
                result.set_success(550);
                result.set_tipinfo("新密碼首次登錄,需重置密碼!");
                strResult = JsonHandle.ObjectToJson(result);
                return;
            }
            DateTime?nullable2 = _child.get_last_changedate();
            int      num3      = PageBase.PasswordExpire();

            if (nullable2.HasValue)
            {
                nullable12 = nullable2;
                time4      = DateTime.Now.AddDays((double)-num3);
                if (!(nullable12.HasValue ? (nullable12.GetValueOrDefault() < time4) : false))
                {
                    goto Label_131D;
                }
            }
            result.set_success(550);
            result.set_tipinfo("密碼過期,需重置密碼!");
            strResult = JsonHandle.ObjectToJson(result);
            return;

Label_131D:
            dictionary.Add("uid", _session.get_u_id());
            DataTable lotteryList = base.GetLotteryList();

            string[] source = base.GetLotteryMasterID(lotteryList).Split(new char[] { ',' });
            int      num4   = 1;

            if (source.Contains <string>(num4.ToString()))
            {
                dictionary.Add("hasSix", 1);
            }
            else
            {
                dictionary.Add("hasSix", 0);
            }
            num4 = 2;
            if (source.Contains <string>(num4.ToString()))
            {
                dictionary.Add("hasKc", 1);
            }
            else
            {
                dictionary.Add("hasKc", 0);
            }
            dictionary.Add("utype", _session.get_u_type().ToLower());
            List <object> list = new List <object>();

            foreach (DataRow row2 in lotteryList.Rows)
            {
                string str20 = row2["lottery_name"].ToString();
                string s     = row2["id"].ToString();
                Dictionary <string, object> dictionary2 = new Dictionary <string, object>();
                dictionary2.Add("name", str20);
                dictionary2.Add("id", int.Parse(s));
                list.Add(dictionary2);
            }
            dictionary.Add("lotteryCfg", list);
            dictionary.Add("PasswordLU", ConfigurationManager.AppSettings["PasswordLU"]);
            dictionary.Add("roleCfg", MemberPageBase_Mobile.roleCfg);
            result.set_data(dictionary);
            strResult = JsonHandle.ObjectToJson(result);
        }
예제 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.lotteryDT = base.GetLotteryList();
            this.lotteryID = LSRequest.qq("lid");
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin = _session.get_u_skin();
            if (_session.get_u_type().Equals("zj"))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            DataSet userCredit = CallBLL.cz_users_bll.GetUserCredit(this.Session["user_name"].ToString());

            if (((userCredit != null) && (userCredit.Tables.Count > 0)) && (userCredit.Tables[0].Rows.Count > 0))
            {
                this.six_credit        = Convert.ToDouble(userCredit.Tables[0].Rows[0]["six_credit"]);
                this.six_usable_credit = Convert.ToDouble(userCredit.Tables[0].Rows[0]["six_usable_credit"]);
                this.six_iscash        = userCredit.Tables[0].Rows[0]["six_iscash"].ToString();
                this.kc_credit         = Convert.ToDouble(userCredit.Tables[0].Rows[0]["kc_credit"]);
                this.kc_usable_credit  = Convert.ToDouble(userCredit.Tables[0].Rows[0]["kc_usable_credit"]);
                this.kc_iscash         = userCredit.Tables[0].Rows[0]["kc_iscash"].ToString();
            }
            if (_session.get_six_kind().ToLower() != "0")
            {
                if (_session.get_six_kind().ToLower() != "a")
                {
                    this.pk_six_a = "display:none;";
                }
                if (_session.get_six_kind().ToLower() != "b")
                {
                    this.pk_six_b = "display:none;";
                }
                if (_session.get_six_kind().ToLower() != "c")
                {
                    this.pk_six_c = "display:none;";
                }
            }
            else
            {
                this.pk_six_a = "display:;";
                this.pk_six_b = "display:;";
                this.pk_six_c = "display:;";
            }
            if (_session.get_kc_kind().ToLower() != "0")
            {
                if (_session.get_kc_kind().ToLower() != "a")
                {
                    this.pk_kc_a = "display:none;";
                }
                if (_session.get_kc_kind().ToLower() != "b")
                {
                    this.pk_kc_b = "display:none;";
                }
                if (_session.get_kc_kind().ToLower() != "c")
                {
                    this.pk_kc_c = "display:none;";
                }
            }
            else
            {
                this.pk_kc_a = "display:;";
                this.pk_kc_b = "display:;";
                this.pk_kc_c = "display:;";
            }
            foreach (DataRow row in this.lotteryDT.Rows)
            {
                int num  = Convert.ToInt32(row["id"].ToString());
                int num2 = Convert.ToInt32(row["master_id"].ToString());
                if (num2.Equals(1))
                {
                    this.six_m_id = num2;
                }
                if (num2.Equals(2))
                {
                    this.kc_m_id = num2;
                }
                if (num.Equals(0))
                {
                    DataSet playByName = CallBLL.cz_play_kl10_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((playByName != null) && (playByName.Tables.Count > 0)) && (playByName.Tables[0].Rows.Count > 0))
                    {
                        this.kl10_DT = playByName.Tables[0];
                    }
                }
                if (num.Equals(1))
                {
                    DataSet set3 = CallBLL.cz_play_cqsc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set3 != null) && (set3.Tables.Count > 0)) && (set3.Tables[0].Rows.Count > 0))
                    {
                        this.cqsc_DT = set3.Tables[0];
                    }
                }
                if (num.Equals(2))
                {
                    DataSet set4 = CallBLL.cz_play_pk10_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set4 != null) && (set4.Tables.Count > 0)) && (set4.Tables[0].Rows.Count > 0))
                    {
                        this.pk10_DT = set4.Tables[0];
                    }
                }
                if (num.Equals(3))
                {
                    DataSet set5 = CallBLL.cz_play_xync_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set5 != null) && (set5.Tables.Count > 0)) && (set5.Tables[0].Rows.Count > 0))
                    {
                        this.xync_DT = set5.Tables[0];
                    }
                }
                if (num.Equals(4))
                {
                    DataSet set6 = CallBLL.cz_play_jsk3_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set6 != null) && (set6.Tables.Count > 0)) && (set6.Tables[0].Rows.Count > 0))
                    {
                        this.jsk3_DT = set6.Tables[0];
                    }
                }
                if (num.Equals(5))
                {
                    DataSet set7 = CallBLL.cz_play_kl8_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set7 != null) && (set7.Tables.Count > 0)) && (set7.Tables[0].Rows.Count > 0))
                    {
                        this.kl8_DT = set7.Tables[0];
                    }
                }
                if (num.Equals(6))
                {
                    DataSet set8 = CallBLL.cz_play_k8sc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set8 != null) && (set8.Tables.Count > 0)) && (set8.Tables[0].Rows.Count > 0))
                    {
                        this.k8sc_DT = set8.Tables[0];
                    }
                }
                if (num.Equals(7))
                {
                    DataSet set9 = CallBLL.cz_play_pcdd_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set9 != null) && (set9.Tables.Count > 0)) && (set9.Tables[0].Rows.Count > 0))
                    {
                        this.pcdd_DT = set9.Tables[0];
                    }
                }
                if (num.Equals(100))
                {
                    DataSet set10 = null;
                    if (!FileCacheHelper.get_IsShowLM_B())
                    {
                        set10 = CallBLL.cz_play_six_bll.GetPlayByName(this.Session["user_name"].ToString(), "91060,91061,91062,91063,91064,91065");
                    }
                    else
                    {
                        set10 = CallBLL.cz_play_six_bll.GetPlayByName(this.Session["user_name"].ToString());
                    }
                    if (((set10 != null) && (set10.Tables.Count > 0)) && (set10.Tables[0].Rows.Count > 0))
                    {
                        this.six_DT = set10.Tables[0];
                    }
                }
                if (num.Equals(9))
                {
                    DataSet set11 = CallBLL.cz_play_xyft5_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set11 != null) && (set11.Tables.Count > 0)) && (set11.Tables[0].Rows.Count > 0))
                    {
                        this.xyft5_DT = set11.Tables[0];
                    }
                }
                if (num.Equals(8))
                {
                    DataSet set12 = CallBLL.cz_play_pkbjl_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set12 != null) && (set12.Tables.Count > 0)) && (set12.Tables[0].Rows.Count > 0))
                    {
                        this.pkbjl_DT = set12.Tables[0];
                    }
                }
                if (num.Equals(10))
                {
                    DataSet set13 = CallBLL.cz_play_jscar_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set13 != null) && (set13.Tables.Count > 0)) && (set13.Tables[0].Rows.Count > 0))
                    {
                        this.jscar_DT = set13.Tables[0];
                    }
                }
                if (num.Equals(11))
                {
                    DataSet set14 = CallBLL.cz_play_speed5_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set14 != null) && (set14.Tables.Count > 0)) && (set14.Tables[0].Rows.Count > 0))
                    {
                        this.speed5_DT = set14.Tables[0];
                    }
                }
                if (num.Equals(13))
                {
                    DataSet set15 = CallBLL.cz_play_jscqsc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set15 != null) && (set15.Tables.Count > 0)) && (set15.Tables[0].Rows.Count > 0))
                    {
                        this.jscqsc_DT = set15.Tables[0];
                    }
                }
                if (num.Equals(12))
                {
                    DataSet set16 = CallBLL.cz_play_jspk10_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set16 != null) && (set16.Tables.Count > 0)) && (set16.Tables[0].Rows.Count > 0))
                    {
                        this.jspk10_DT = set16.Tables[0];
                    }
                }
                if (num.Equals(14))
                {
                    DataSet set17 = CallBLL.cz_play_jssfc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set17 != null) && (set17.Tables.Count > 0)) && (set17.Tables[0].Rows.Count > 0))
                    {
                        this.jssfc_DT = set17.Tables[0];
                    }
                }
                if (num.Equals(15))
                {
                    DataSet set18 = CallBLL.cz_play_jsft2_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set18 != null) && (set18.Tables.Count > 0)) && (set18.Tables[0].Rows.Count > 0))
                    {
                        this.jsft2_DT = set18.Tables[0];
                    }
                }
                if (num.Equals(0x10))
                {
                    DataSet set19 = CallBLL.cz_play_car168_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set19 != null) && (set19.Tables.Count > 0)) && (set19.Tables[0].Rows.Count > 0))
                    {
                        this.car168_DT = set19.Tables[0];
                    }
                }
                if (num.Equals(0x11))
                {
                    DataSet set20 = CallBLL.cz_play_ssc168_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set20 != null) && (set20.Tables.Count > 0)) && (set20.Tables[0].Rows.Count > 0))
                    {
                        this.ssc168_DT = set20.Tables[0];
                    }
                }
                if (num.Equals(0x12))
                {
                    DataSet set21 = CallBLL.cz_play_vrcar_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set21 != null) && (set21.Tables.Count > 0)) && (set21.Tables[0].Rows.Count > 0))
                    {
                        this.vrcar_DT = set21.Tables[0];
                    }
                }
                if (num.Equals(0x13))
                {
                    DataSet set22 = CallBLL.cz_play_vrssc_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set22 != null) && (set22.Tables.Count > 0)) && (set22.Tables[0].Rows.Count > 0))
                    {
                        this.vrssc_DT = set22.Tables[0];
                    }
                }
                if (num.Equals(20))
                {
                    DataSet set23 = CallBLL.cz_play_xyftoa_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set23 != null) && (set23.Tables.Count > 0)) && (set23.Tables[0].Rows.Count > 0))
                    {
                        this.xyftoa_DT = set23.Tables[0];
                    }
                }
                if (num.Equals(0x15))
                {
                    DataSet set24 = CallBLL.cz_play_xyftsg_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set24 != null) && (set24.Tables.Count > 0)) && (set24.Tables[0].Rows.Count > 0))
                    {
                        this.xyftsg_DT = set24.Tables[0];
                    }
                }
                if (num.Equals(0x16))
                {
                    DataSet set25 = CallBLL.cz_play_happycar_bll.GetPlayByName(this.Session["user_name"].ToString());
                    if (((set25 != null) && (set25.Tables.Count > 0)) && (set25.Tables[0].Rows.Count > 0))
                    {
                        this.happycar_DT = set25.Tables[0];
                    }
                }
            }
        }
예제 #10
0
        public string TableString(string trString, string lotteryID)
        {
            StringBuilder          builder  = new StringBuilder();
            string                 str      = HttpContext.Current.Session["user_name"].ToString();
            agent_userinfo_session _session = HttpContext.Current.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            builder.Append(string.Format(" <link rel=\"stylesheet\" id=\"Iframe_skin\" href=\"../Styles/{0}/skin.css\">", _session.get_u_skin()));
            builder.Append(" <link rel=\"stylesheet\" href=\"../Styles/global.css\">");
            builder.Append(" <link rel=\"stylesheet\" href=\"../Styles/BallCss/ball_all.css\">");
            builder.Append(" <link rel=\"stylesheet\" href=\"../Styles/ui-dialog.css\">");
            builder.Append(" <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#FFFFFF\">");
            builder.Append(" <tr>");
            builder.Append(" <td class=\"topLeftBg1\"></td>");
            builder.Append(" <td class=\"topBoxBg1\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"tm2\">");
            builder.Append(" <tr>");
            builder.Append(" <td width=\"26\" align=\"center\"><div class=\"topArr\"></div></td>");
            builder.AppendFormat(" <td align=\"left\"><b><a href=\"BillBackup.aspx?lid={0}\">{1}</a> -> 注單核對</b></td> ", lotteryID, base.GetGameNameByID(lotteryID));
            builder.Append(" <td>&nbsp;</td>");
            builder.Append(" <td width=\"120\">");
            builder.Append(" </td>");
            builder.Append(" </tr>");
            builder.Append(" </table></td>");
            builder.Append(" <td class=\"topRightBg1\"></td>");
            builder.Append(" </tr>");
            builder.Append(" <tr>");
            builder.Append(" <td class=\"centerLeftBg\"></td>");
            builder.Append(" <td valign=\"top\">");
            builder.Append(" <table class=\"t_list\"> ");
            builder.Append(" <tr> ");
            builder.Append(" <th>用戶名</th> ");
            builder.Append(" <th>單號</th> ");
            builder.Append(" <th>驗證號</th> ");
            builder.Append(" <th>獎期</th> ");
            builder.Append(" <th>玩法分類</th> ");
            builder.Append(" <th>玩法</th> ");
            builder.Append(" <th>玩法標示</th> ");
            builder.Append(" <th>下注值</th> ");
            builder.Append(" <th>賠率</th> ");
            builder.Append(" <th>下注額</th> ");
            builder.Append(" <th>盤口</th> ");
            builder.Append(" </tr> ");
            builder.Append(trString);
            builder.Append(" </table> ");
            builder.Append(" </td>");
            builder.Append(" <td class=\"centerRightBg\"></td>");
            builder.Append(" </tr>");
            builder.Append(" <tr>");
            builder.Append(" <td class=\"bottomLeftBg\"></td>");
            builder.Append(" <td class=\"bottomBoxBg\" align=\"center\">&nbsp;");
            builder.Append(" </td>");
            builder.Append(" <td class=\"bottomRightBg\"></td>");
            builder.Append(" </tr>");
            builder.Append(" </table>");
            return(builder.ToString());
        }
예제 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin = model.get_u_skin();
            if (!model.get_u_type().Equals("zj".ToString()))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            base.Permission_Aspx_ZJ(model, "po_3_1");
            this.lotteryId = LSRequest.qq("lid");
            this.maxpid    = LSRequest.qq("maxpid");
            this.numTable  = base.q("tabletype");
            if (string.IsNullOrEmpty(this.numTable))
            {
                string cookie = CookieHelper.GetCookie("PKBJL_TableType_Record_Current_Agent");
                if (string.IsNullOrEmpty(cookie))
                {
                    cookie = "p1";
                }
                this.numTable = Utils.GetPKBJL_NumTable(cookie);
            }
            this.lotteryDT = base.GetLotteryList();
            base.IsLotteryExist(this.lotteryId, "u100032", "1", "");
            this.page = LSRequest.qq("page");
            if (string.IsNullOrEmpty(this.page))
            {
                this.page = "1";
            }
            if (int.Parse(this.page) < 1)
            {
                this.page = "1";
            }
            if (string.IsNullOrEmpty(LSRequest.qq("issearch")))
            {
                this.issearch = "0";
            }
            else
            {
                this.issearch = LSRequest.qq("issearch");
            }
            this.beginTime = LSRequest.qq("begintime");
            this.endTime   = LSRequest.qq("endtime");
            this.search    = LSRequest.qq("searchHidden");
            if (this.search.Equals("search"))
            {
                this.issearch  = "1";
                this.maxpid    = "";
                this.lotteryId = LSRequest.qq("lid");
                this.beginTime = LSRequest.qq("txtbegintime");
                this.endTime   = LSRequest.qq("txtendtime");
                this.url       = string.Format("lid={0}&begintime={1}&endtime={2}&issearch={3}&tabletype={4}", new object[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable });
                string url = string.Format("/LotteryPeriod/AwardPeriod.aspx?{0}", this.url);
                base.Response.Write(base.LocationHref(url));
                base.Response.End();
            }
            this.SetDate();
            switch (Convert.ToInt32(this.lotteryId))
            {
            case 0:
            {
                DataSet set2 = CallBLL.cz_phase_kl10_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set2 != null) && (set2.Tables.Count > 0)) && (set2.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set2.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 1:
            {
                DataSet set3 = CallBLL.cz_phase_cqsc_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set3 != null) && (set3.Tables.Count > 0)) && (set3.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set3.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 2:
            {
                DataSet set4 = CallBLL.cz_phase_pk10_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set4 != null) && (set4.Tables.Count > 0)) && (set4.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set4.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 3:
            {
                DataSet set5 = CallBLL.cz_phase_xync_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set5 != null) && (set5.Tables.Count > 0)) && (set5.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set5.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 4:
            {
                DataSet set6 = CallBLL.cz_phase_jsk3_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set6 != null) && (set6.Tables.Count > 0)) && (set6.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set6.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 5:
            {
                DataSet set7 = CallBLL.cz_phase_kl8_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set7 != null) && (set7.Tables.Count > 0)) && (set7.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set7.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 6:
            {
                DataSet set8 = CallBLL.cz_phase_k8sc_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set8 != null) && (set8.Tables.Count > 0)) && (set8.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set8.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 7:
            {
                DataSet set9 = CallBLL.cz_phase_pcdd_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set9 != null) && (set9.Tables.Count > 0)) && (set9.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set9.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 8:
            {
                DataSet set11 = CallBLL.cz_phase_pkbjl_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable);
                if (((set11 != null) && (set11.Tables.Count > 0)) && (set11.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set11.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 9:
            {
                DataSet set10 = CallBLL.cz_phase_xyft5_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set10 != null) && (set10.Tables.Count > 0)) && (set10.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set10.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 10:
            {
                DataSet set12 = CallBLL.cz_phase_jscar_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set12 != null) && (set12.Tables.Count > 0)) && (set12.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set12.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 11:
            {
                DataSet set13 = CallBLL.cz_phase_speed5_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set13 != null) && (set13.Tables.Count > 0)) && (set13.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set13.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 12:
            {
                DataSet set15 = CallBLL.cz_phase_jspk10_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set15 != null) && (set15.Tables.Count > 0)) && (set15.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set15.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 13:
            {
                DataSet set14 = CallBLL.cz_phase_jscqsc_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set14 != null) && (set14.Tables.Count > 0)) && (set14.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set14.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 14:
            {
                DataSet set16 = CallBLL.cz_phase_jssfc_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set16 != null) && (set16.Tables.Count > 0)) && (set16.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set16.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 15:
            {
                DataSet set17 = CallBLL.cz_phase_jsft2_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set17 != null) && (set17.Tables.Count > 0)) && (set17.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set17.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 0x10:
            {
                DataSet set18 = CallBLL.cz_phase_car168_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set18 != null) && (set18.Tables.Count > 0)) && (set18.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set18.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 0x11:
            {
                DataSet set19 = CallBLL.cz_phase_ssc168_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set19 != null) && (set19.Tables.Count > 0)) && (set19.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set19.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 0x12:
            {
                DataSet set20 = CallBLL.cz_phase_vrcar_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set20 != null) && (set20.Tables.Count > 0)) && (set20.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set20.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 0x13:
            {
                DataSet set21 = CallBLL.cz_phase_vrssc_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set21 != null) && (set21.Tables.Count > 0)) && (set21.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set21.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 20:
            {
                DataSet set22 = CallBLL.cz_phase_xyftoa_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set22 != null) && (set22.Tables.Count > 0)) && (set22.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set22.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 0x15:
            {
                DataSet set23 = CallBLL.cz_phase_xyftsg_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set23 != null) && (set23.Tables.Count > 0)) && (set23.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set23.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 0x16:
            {
                DataSet set24 = CallBLL.cz_phase_happycar_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set24 != null) && (set24.Tables.Count > 0)) && (set24.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set24.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }

            case 100:
            {
                DataSet set = CallBLL.cz_phase_six_bll.GetPhaseByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.beginTime, this.endTime, this.issearch, this.maxpid);
                if (((set != null) && (set.Tables.Count > 0)) && (set.Tables[0].Rows.Count > 0))
                {
                    this.dataTable = set.Tables[0];
                    if (string.IsNullOrEmpty(this.maxpid))
                    {
                        this.maxpid = this.dataTable.Rows[0]["p_id"].ToString();
                    }
                    this.SixMaxPID = CallBLL.cz_phase_six_bll.GetCurrentPhase().get_p_id().ToString();
                }
                this.FiledValue = new string[] { this.lotteryId, this.beginTime, this.endTime, this.issearch, this.maxpid, this.numTable };
                return;
            }
            }
        }
예제 #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string str = this.Session["user_name"].ToString();
            agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session;

            this.skin = model.get_u_skin();
            if (model.get_u_type().Equals("zj".ToString()))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            base.Permission_Aspx_DL(model, "po_5_2");
            this.lotteryDT = base.GetLotteryList();
            this.lotteryId = LSRequest.qq("lid");
            int num = 100;

            if (!this.lotteryId.Equals(num.ToString()))
            {
                base.Response.Redirect("/AutoLet/AutoLet_kc.aspx?lid=" + this.lotteryId, true);
            }
            if (!model.get_allow_sale().Equals(1))
            {
                base.Response.Redirect("/MessagePage.aspx?code=u100037&url=&issuccess=1&isback=0");
                base.Response.End();
            }
            DataRow[] rowArray  = this.lotteryDT.Select(string.Format(" id={0} ", 100));
            DataRow[] rowArray2 = this.lotteryDT.Select(string.Format(" id<>{0} ", 100));
            int       num2      = 100;

            if (this.lotteryId.Equals(num2.ToString()))
            {
                if (rowArray.Length > 0)
                {
                    this.sltString = this.sltString + string.Format("<option value='{0}' selected=selected>{1}</option>", 100, "香港⑥合彩");
                }
                if (rowArray2.Length > 0)
                {
                    this.sltString = this.sltString + string.Format("<option value='{0}'>{1}</option>", 0, "快彩");
                }
            }
            else
            {
                if (rowArray.Length > 0)
                {
                    this.sltString = this.sltString + string.Format("<option value='{0}'>{1}</option>", 100, "香港⑥合彩");
                }
                if (rowArray2.Length > 0)
                {
                    this.sltString = this.sltString + string.Format("<option value='{0}' selected=selected>{1}</option>", 0, "快彩");
                }
            }
            DataTable play = null;
            DataSet   autosaleByUserName = null;

            if (!FileCacheHelper.get_IsShowLM_B())
            {
                play = CallBLL.cz_play_six_bll.GetPlay("91060,91061,91062,91063,91064,91065");
                autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(str, "91060,91061,91062,91063,91064,91065");
            }
            else
            {
                play = CallBLL.cz_play_six_bll.GetPlay();
                autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(str);
            }
            if (play != null)
            {
                this.play_Row = play.Select(" play_id <>91002 and play_id <>91015 ", " sort asc");
            }
            if (((autosaleByUserName != null) && (autosaleByUserName.Tables.Count > 0)) && (autosaleByUserName.Tables[0].Rows.Count > 0))
            {
                this.Autosale_DT = autosaleByUserName.Tables[0];
            }
            if (LSRequest.qq("hdnSubmit").Equals("submit"))
            {
                this.SaveData();
            }
        }