private void userLogout(ref string strResult) { base.checkLoginByHandler(0); this.Session.Abandon(); ReturnResult result = new ReturnResult(); result.set_success(200); strResult = JsonHandle.ObjectToJson(result); }
protected void Page_Load(object sender, EventArgs e) { base.Response.End(); base.Response.End(); ITransaction transaction = CallBLL.redisHelper.CreateTransaction(); CallBLL.redisHelper.GetDatabase().CreateBatch(null).Execute(); List <string> stringKeysByPattern = CallBLL.redisHelper.GetStringKeysByPattern("*online*"); Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary.Add("A1", "A11111"); dictionary.Add("B1", "B11111"); CallBLL.redisHelper.StringSet("DictTest:dict", JsonHandle.ObjectToJson(dictionary), FileCacheHelper.get_RedisExpiryDay()); RedisDemoObject obj2 = new RedisDemoObject { Id = 1, Name = "123" }; CallBLL.redisHelper.StringSet <RedisDemoObject>("test1:RedisDemoObject", obj2, FileCacheHelper.get_RedisExpiryDay()); RedisDemoObject obj3 = CallBLL.redisHelper.StringGet <RedisDemoObject>("test1:RedisDemoObject"); string str = "select * from cz_stat_online"; Dictionary <string, cz_stat_online> dictionary2 = new Dictionary <string, cz_stat_online>(); DataTable table = DbHelperSQL.Query(str, null).Tables[0]; foreach (DataRow row in table.Rows) { cz_stat_online _online = new cz_stat_online(); _online.set_id(int.Parse(row["id"].ToString())); _online.set_u_name(row["u_name"].ToString()); _online.set_u_type(row["u_type"].ToString()); _online.set_u_flag(row["u_flag"].ToString()); _online.set_first_time(new DateTime?(DateTime.Parse(row["first_time"].ToString()))); _online.set_last_time(new DateTime?(DateTime.Parse(row["last_time"].ToString()))); _online.set_ip(row["ip"].ToString()); _online.set_is_out(new int?(int.Parse(row["is_out"].ToString()))); CallBLL.redisHelper.HashSet <cz_stat_online>("useronline:list", _online.get_u_name(), _online); } long num = CallBLL.redisHelper.HashLength("useronline:list"); cz_stat_online _online2 = CallBLL.redisHelper.HashGet <cz_stat_online>("useronline:list", "yt668833"); cz_stat_online _online3 = new cz_stat_online(); _online3.set_u_name("fgs_1111111111111111111111"); if (CallBLL.redisHelper.HashExists("useronline:list", "fgs_1111111111111111111111")) { CallBLL.redisHelper.HashDelete("list", "useronlinefgs_1111111111111111111111"); } _online3.set_u_flag("zj"); CallBLL.redisHelper.HashSet <cz_stat_online>("useronline:list", _online3.get_u_name(), _online3); List <cz_stat_online> list2 = CallBLL.redisHelper.HashValues <cz_stat_online>("useronline:list"); bool flag2 = transaction.Execute(0); }
public static bool ChildOperateValid(agent_userinfo_session sessionInfo, string permissions_name, HttpContext context) { if ((sessionInfo.get_u_type().Trim().Equals("zj") && (context.Session["child_user_name"] != null)) && (sessionInfo.get_users_child_session().get_permissions_name().IndexOf(permissions_name) < 0)) { ReturnResult result = new ReturnResult(); result.set_success(400); result.set_tipinfo(PageBase.GetMessageByCache("u100013", "MessageHint")); string s = JsonHandle.ObjectToJson(result); HttpContext.Current.Response.ContentType = "text/json"; HttpContext.Current.Response.Write(s); return(false); } return(true); }
protected void Page_Load(object sender, EventArgs e) { IDictionary <string, object> dictionary = new Dictionary <string, object>(); if (!base.IsUserLoginByMobileForAjax()) { dictionary.Add("status", "2"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { this.out_odds_info(); } }
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); }
protected void Page_Load(object sender, EventArgs e) { IDictionary <string, object> dictionary = new Dictionary <string, object>(); cz_phase_six currentPhaseClose = CallBLL.cz_phase_six_bll.GetCurrentPhaseClose(); if (currentPhaseClose != null) { string str = (currentPhaseClose != null) ? currentPhaseClose.get_phase() : ""; string str2 = (currentPhaseClose != null) ? string.Format("{0},{1},{2},{3},{4},{5},{6}", new object[] { currentPhaseClose.get_n1(), currentPhaseClose.get_n2(), currentPhaseClose.get_n3(), currentPhaseClose.get_n4(), currentPhaseClose.get_n5(), currentPhaseClose.get_n6(), currentPhaseClose.get_sn() }) : ""; dictionary.Add("draw_phase", str); dictionary.Add("draw_result", str2.Split(new char[] { ',' }).ToArray <string>()); } dictionary.Add("type", "get_drawinfo"); dictionary.Add("status", "1"); string strResult = JsonHandle.ObjectToJson(dictionary); base.OutJson(strResult); }
protected void Page_Load(object sender, EventArgs e) { IDictionary<string, object> dictionary = new Dictionary<string, object>(); string str = ""; DataTable kCOpenBall = base.GetKCOpenBall(0x15); string[] strArray = null; if ((kCOpenBall != null) && (kCOpenBall.Rows.Count > 0)) { string str2 = kCOpenBall.Rows[0]["previousphase"].ToString().Trim(); string str3 = kCOpenBall.Rows[0]["sold"].ToString().Trim(); string str4 = kCOpenBall.Rows[0]["surplus"].ToString().Trim(); str = kCOpenBall.Rows[0]["nns"].ToString().Trim(); strArray = (str2 + "," + str).Split(new char[] { ',' }).ToArray<string>(); } dictionary.Add("status", "1"); dictionary.Add("kaijiang", strArray); string strResult = JsonHandle.ObjectToJson(dictionary); base.OutJson(strResult); }
private string UserStatus(string status) { ReturnResult result = new ReturnResult(); string str = ""; if (status != "0") { if (status == "1") { result.set_success(400); result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint")); str = JsonHandle.ObjectToJson(result); } if (status == "2") { result.set_success(400); result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint")); str = JsonHandle.ObjectToJson(result); } } return(str); }
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"] = "******"; } } } } }
protected void Page_Load(object sender, EventArgs e) { base.Response.Expires = 0; base.Response.CacheControl = "no-cache"; IDictionary <string, object> dictionary = new Dictionary <string, object>(); if (!base.IsUserLoginByMobileForAjax()) { dictionary.Add("islogin", "0"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { dictionary.Add("islogin", "1"); string user = HttpContext.Current.Session["user_name"].ToString(); cz_users _users = CallBLL.cz_users_bll.UserLogin(user); string str2 = _users.get_kc_kind().Trim(); decimal num = Convert.ToDecimal(_users.get_kc_credit()); decimal num2 = Convert.ToDecimal(_users.get_kc_usable_credit()); decimal num3 = Convert.ToDecimal(_users.get_six_credit()); decimal num4 = Convert.ToDecimal(_users.get_six_usable_credit()); string str3 = num3.ToString("F1"); string str4 = num4.ToString("F1"); string kCProfit = base.GetKCProfit(); if (_users.get_kc_iscash().Equals(int.Parse("1"))) { dictionary.Add("t_iscash", "1"); } else { dictionary.Add("t_iscash", "0"); } dictionary.Add("t_credit", num2.ToString("F1")); dictionary.Add("t_amt", double.Parse(kCProfit).ToString("F1")); if (_users.get_six_iscash().Equals(int.Parse("1"))) { dictionary.Add("t_iscash_six", "1"); } else { dictionary.Add("t_iscash_six", "0"); } dictionary.Add("t_credit_six", str3); dictionary.Add("t_amt_six", str4); if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { base.CheckIsOut(user); base.stat_online_redis(user, _users.get_u_type()); } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { base.CheckIsOutStack(user); base.stat_online_redisStack(user, _users.get_u_type()); } else { MemberPageBase.stat_online(user, "hy"); } base.OutJson(JsonHandle.ObjectToJson(dictionary)); } }
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; if (!model.get_u_type().Trim().Equals("zj")) { base.Response.Redirect("../MessagePage.aspx?code=u100035&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } base.Permission_Aspx_ZJ(model, "po_2_3"); this.userid = LSRequest.qq("uid"); this.newAdd = LSRequest.qq("isadd"); this.cz_saleset_six_model = CallBLL.cz_saleset_six_bll.GetModel(this.userid); if (this.cz_saleset_six_model == null) { base.Response.Redirect("../MessagePage.aspx?code=u100034&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } this.lotteryDT = base.GetLotteryList(); DataTable table = this.lotteryDT.DefaultView.ToTable(true, new string[] { "master_id" }); for (int i = 0; i < table.Rows.Count; i++) { if (Convert.ToInt32(table.Rows[i][0]).Equals(1)) { this.lottrty_six = table.Rows[i][0].ToString(); } else if (Convert.ToInt32(table.Rows[i][0]).Equals(2)) { this.lottrty_kc = table.Rows[i][0].ToString(); } } if (!string.IsNullOrEmpty(this.lottrty_six)) { this.tabState_six = "on"; } else { base.Response.Redirect("/Quit.aspx"); } if (this.cz_saleset_six_model.get_six_kind().ToLower() != "0") { if (this.cz_saleset_six_model.get_six_kind().ToLower() != "a") { this.pk_six_a = "display:none;"; } if (this.cz_saleset_six_model.get_six_kind().ToLower() != "b") { this.pk_six_b = "display:none;"; } if (this.cz_saleset_six_model.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:;"; } this.InitData(); this.drawBackjson = JsonHandle.ObjectToJson(this.DICT); if (LSRequest.qq("hdnSubmit").Equals("hdnsubmit") && !this.cz_saleset_six_model.get_flag().Equals(1)) { string mess = ""; string str4 = ""; this.namestr = LSRequest.qq("namestr"); this.GetModifyPlays(this.namestr); if ((this.table_six != null) && !string.IsNullOrEmpty(this.six_modify_playid)) { this.ValidSix(); this.UpdateSix(ref mess); } string str5 = mess + "<br />" + str4; if (string.IsNullOrEmpty(this.newAdd)) { this.newAdd = "0"; } base.Response.Write(base.ShowDialogBox(str5, base.UserReturnBackUrl, 0)); base.Response.End(); } }
protected void output_cl_cql_lryl() { IDictionary <string, object> dictionary = new Dictionary <string, object>(); if (!base.IsUserLoginByMobileForAjax()) { dictionary.Add("status", "2"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { string str = "_m_pcdd_lmcl"; string str2 = "_m_pcdd_cql"; List <object> cache = new List <object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str) != null) { cache = CacheHelper.GetCache("balance_kc_FileCacheKey" + str) as List <object>; } else { DataTable table = CallBLL.cz_phase_pcdd_bll.GetChangLong().Tables[0]; if (table.Rows.Count > 0) { foreach (DataRow row in table.Rows) { cache.Add(row["c_name"].ToString() + "," + row["c_qs"].ToString()); } } CacheHelper.SetCache("balance_kc_FileCacheKey" + str, cache); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str, cache, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } string str6 = string.Join("|", cache.ToArray()); dictionary.Add("long", str6); if (!string.IsNullOrEmpty(LSRequest.qq("page_type").Trim())) { string str8 = "pcdd_lmp"; Dictionary <string, object> dictionary2 = new Dictionary <string, object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str8) != null) { dictionary2 = CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str8) as Dictionary <string, object>; dictionary.Add("ph_title", dictionary2["ph_title"]); dictionary.Add("ph_content", dictionary2["ph_content"]); } else { Dictionary <string, string> paiHang = CallBLL.cz_phase_pcdd_bll.GetPaiHang(10); if ((paiHang != null) && (paiHang.Count > 0)) { ArrayList list2 = new ArrayList(); ArrayList list3 = new ArrayList(); foreach (KeyValuePair <string, string> pair in paiHang) { list2.Add(pair.Key); if (pair.Key.Equals("波色")) { list3.Add(pair.Value.Replace("波", "")); } else { list3.Add(pair.Value); } } string str9 = string.Join("|", list2.ToArray()); dictionary.Add("ph_title", str9); dictionary.Add("ph_content", list3); dictionary2.Add("ph_title", str9); dictionary2.Add("ph_content", list3); CacheHelper.SetCache("balance_kc_FileCacheKey" + str2 + str8, dictionary2); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str2 + str8, dictionary2, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } } } dictionary.Add("status", "1"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } }
protected string ObjectToJson(object obj) { return(JsonHandle.ObjectToJson(obj)); }
protected void Page_Load(object sender, EventArgs e) { string strResult = ""; ReturnResult_Mobile mobile = new ReturnResult_Mobile(); Dictionary<string, object> dictionary = new Dictionary<string, object>(); dictionary.Add("type", "user_login"); string str2 = LSRequest.qq("loginName").Trim(); string str3 = LSRequest.qq("loginPwd").Trim(); string str4 = LSRequest.qq("ValidateCode").Trim(); if (PageBase.is_ip_locked()) { this.Session["lottery_session_img_code"] = null; mobile.set_status(2); mobile.set_msg("由於輸入錯誤次數過多,您已被禁用,請稍後再試!"); strResult = JsonHandle.ObjectToJson(mobile); base.OutJson(strResult); } else if (string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3)) { base.Response.End(); } else { DateTime time; if (int.Parse(FileCacheHelper.get_GetLockedPasswordCount()) == 0) { this.Session["lottery_session_img_code_display"] = 1; } if (this.Session["lottery_session_img_code_display"] == null) { if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str2)) { if (PageBase.IsErrTimesAbove(ref time, str2)) { if (!PageBase.IsErrTimeout(time)) { this.Session["lottery_session_img_code"] = null; mobile.set_status(2); mobile.set_msg(""); dictionary.Add("is_display_code", "1"); mobile.set_data(dictionary); strResult = JsonHandle.ObjectToJson(mobile); this.Session["lottery_session_img_code_display"] = 1; base.OutJson(strResult); return; } CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str2); this.Session["lottery_session_img_code"] = null; this.Session["lottery_session_img_code_display"] = 0; } else { this.Session["lottery_session_img_code"] = null; this.Session["lottery_session_img_code_display"] = 0; } } else { this.Session["lottery_session_img_code"] = null; this.Session["lottery_session_img_code_display"] = 0; } } if (this.Session["lottery_session_img_code_display"].ToString() == "0") { if (string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3)) { base.Response.End(); return; } } else { if (string.IsNullOrEmpty(str2) || string.IsNullOrEmpty(str3)) { base.Response.End(); return; } if (string.IsNullOrEmpty(str4)) { this.Session["lottery_session_img_code"] = null; mobile.set_status(2); mobile.set_msg(""); dictionary.Add("is_display_code", "1"); mobile.set_data(dictionary); strResult = JsonHandle.ObjectToJson(mobile); this.Session["lottery_session_img_code_display"] = 1; base.OutJson(strResult); return; } if (this.Session["lottery_session_img_code"] == null) { base.Response.End(); return; } if (this.Session["lottery_session_img_code"].ToString().ToLower() != str4.ToLower()) { this.Session["lottery_session_img_code"] = null; mobile.set_status(2); mobile.set_msg(PageBase.GetMessageByCache("u100004", "MessageHint")); strResult = JsonHandle.ObjectToJson(mobile); base.OutJson(strResult); return; } } this.Session["lottery_session_img_code"] = null; cz_users _users = CallBLL.cz_users_bll.UserLogin(str2.ToLower()); if (_users == null) { this.Session["lottery_session_img_code"] = null; PageBase.login_error_ip(); mobile.set_status(2); mobile.set_msg(PageBase.GetMessageByCache("u100005", "MessageHint")); strResult = JsonHandle.ObjectToJson(mobile); base.OutJson(strResult); } else { string str6 = _users.get_retry_times().ToString(); if (!string.IsNullOrEmpty(str6) && (int.Parse(str6) > int.Parse(FileCacheHelper.get_GetLockedUserCount()))) { if (!PageBase.IsLockedTimeout(str2, "master")) { this.Session["lottery_session_img_code"] = null; mobile.set_status(2); mobile.set_msg("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!"); strResult = JsonHandle.ObjectToJson(mobile); base.OutJson(strResult); return; } PageBase.zero_retry_times(str2); } string str7 = _users.get_a_state().ToString(); string str8 = PageBase.upper_user_status(_users.get_u_name().ToLower()); if (str7 == "2") { this.Session["lottery_session_img_code"] = null; mobile.set_status(2); mobile.set_msg(PageBase.GetMessageByCache("u100008", "MessageHint")); strResult = JsonHandle.ObjectToJson(mobile); base.OutJson(strResult); } else if (str8 == "2") { this.Session["lottery_session_img_code"] = null; mobile.set_status(2); mobile.set_msg("您的上級帳號已被停用,请与管理员联系!"); strResult = JsonHandle.ObjectToJson(mobile); base.OutJson(strResult); } else { if (str7 == "1") { mobile.set_status(1); mobile.set_msg(PageBase.GetMessageByCache("u100007", "MessageHint")); strResult = JsonHandle.ObjectToJson(mobile); this.Session["user_state"] = str7; } else if (str8 == "1") { mobile.set_status(1); mobile.set_msg(PageBase.GetMessageByCache("u100010", "MessageHint")); strResult = JsonHandle.ObjectToJson(mobile); this.Session["user_state"] = str8; } else { this.Session["user_state"] = "0"; mobile.set_status(0); strResult = JsonHandle.ObjectToJson(mobile); } string str9 = _users.get_salt().Trim(); string str10 = DESEncrypt.EncryptString(str3, str9); if (_users.get_u_psw() != str10) { this.Session["lottery_session_img_code"] = null; PageBase.inc_retry_times(str2); PageBase.login_error_ip(); mobile.set_status(2); mobile.set_msg(PageBase.GetMessageByCache("u100006", "MessageHint")); strResult = JsonHandle.ObjectToJson(mobile); if (this.Session["lottery_session_img_code_display"].ToString() == "0") { if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(str2)) { CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(str2); } else { CallBLL.cz_user_psw_err_log_bll.AddUser(str2); } if (PageBase.IsErrTimesAbove(ref time, str2)) { this.Session["lottery_session_img_code"] = null; mobile.set_status(2); mobile.set_msg(PageBase.GetMessageByCache("u100006", "MessageHint")); dictionary.Add("is_display_code", "1"); mobile.set_data(dictionary); strResult = JsonHandle.ObjectToJson(mobile); this.Session["lottery_session_img_code_display"] = 1; base.OutJson(strResult); return; } } base.OutJson(strResult); } else { cz_userinfo_session _session = new cz_userinfo_session(); _session.set_u_id(_users.get_u_id()); _session.set_u_name(_users.get_u_name()); _session.set_u_nicker(_users.get_u_nicker()); _session.set_u_skin(_users.get_u_skin()); _session.set_u_type(_users.get_u_type()); _session.set_su_type(_users.get_su_type()); _session.set_kc_kind(_users.get_kc_kind().Trim()); _session.set_six_kind(_users.get_six_kind().Trim()); _session.set_u_psw(_users.get_u_psw().Trim()); _session.set_kc_rate_owner(_users.get_kc_rate_owner()); _session.set_six_rate_owner(_users.get_six_rate_owner()); DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo(); if (zJInfo != null) { _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim()); } DataTable table2 = CallBLL.cz_rate_six_bll.GetRateByAccount(str2.ToLower()).Tables[0]; _session.get_six_session().set_fgsname(table2.Rows[0]["fgs_name"].ToString().Trim()); _session.get_six_session().set_gdname(table2.Rows[0]["gd_name"].ToString().Trim()); _session.get_six_session().set_zdname(table2.Rows[0]["zd_name"].ToString().Trim()); _session.get_six_session().set_dlname(table2.Rows[0]["dl_name"].ToString().Trim()); DataTable table3 = CallBLL.cz_rate_kc_bll.GetRateByAccount(str2.ToLower()).Tables[0]; _session.get_kc_session().set_fgsname(table3.Rows[0]["fgs_name"].ToString().Trim()); _session.get_kc_session().set_gdname(table3.Rows[0]["gd_name"].ToString().Trim()); _session.get_kc_session().set_zdname(table3.Rows[0]["zd_name"].ToString().Trim()); _session.get_kc_session().set_dlname(table3.Rows[0]["dl_name"].ToString().Trim()); _session.set_kc_rate_owner(new int?(Convert.ToInt32(table3.Rows[0]["kc_rate_owner"]))); _session.set_six_rate_owner(new int?(Convert.ToInt32(table2.Rows[0]["six_rate_owner"]))); DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(str2.ToLower()); if (userOpOdds != null) { if ((userOpOdds.Rows[0]["six_op_odds"] != null) && (userOpOdds.Rows[0]["six_op_odds"].ToString() != "")) { _session.set_six_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["six_op_odds"].ToString()))); } if ((userOpOdds.Rows[0]["kc_op_odds"] != null) && (userOpOdds.Rows[0]["kc_op_odds"].ToString() != "")) { _session.set_kc_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["kc_op_odds"].ToString()))); } } _session.set_isPhone(1); this.Session["user_name"] = str2.ToLower(); this.Session[str2 + "lottery_session_user_info"] = _session; PageBase.SetAppcationFlag(str2); if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { new PageBase_Redis().InitUserOnlineTopToRedis(str2, _session.get_u_type()); } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { new PageBase_Redis().InitUserOnlineTopToRedisStack(str2, _session.get_u_type()); } else { MemberPageBase.stat_top_online(str2); MemberPageBase.stat_online(str2, _session.get_u_type()); } if (FileCacheHelper.get_RedisStatOnline().Equals(0)) { PageBase.ZeroIsOutFlag(str2); } PageBase.zero_retry_times(str2); CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(str2); cz_login_log _log = new cz_login_log(); _log.set_ip(LSRequest.GetIP()); _log.set_login_time(new DateTime?(DateTime.Now)); _log.set_u_name(str2); _log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current)); CallBLL.cz_login_log_bll.Add(_log); this.Session["Session_LoginSystem_Flag"] = "LoginSystem_PhoneWeb"; string str11 = _users.get_is_changed().ToString(); if (string.IsNullOrEmpty(str11)) { this.Session["lottery_session_img_code"] = null; mobile.set_status(550); mobile.set_msg("新密碼首次登錄,需重置密碼!"); strResult = JsonHandle.ObjectToJson(mobile); this.Session["modifypassword"] = "******"; base.OutJson(strResult); } else if (str11 == "0") { this.Session["lottery_session_img_code"] = null; mobile.set_status(550); mobile.set_msg("新密碼首次登錄,需重置密碼!"); strResult = JsonHandle.ObjectToJson(mobile); this.Session["modifypassword"] = "******"; base.OutJson(strResult); } else { DateTime? nullable3; DateTime? nullable = _users.get_last_changedate(); int num2 = PageBase.PasswordExpire(); if (nullable.HasValue && ((nullable3 = nullable).HasValue ? (nullable3.GetValueOrDefault() < DateTime.Now.AddDays((double) -num2)) : false)) { this.Session["lottery_session_img_code"] = null; mobile.set_status(550); mobile.set_msg("密碼過期,需重置密碼!"); strResult = JsonHandle.ObjectToJson(mobile); this.Session["modifypassword"] = "******"; base.OutJson(strResult); } else { CallBLL.cz_credit_lock_bll.Delete(_users.get_u_name()); mobile.set_status(0); strResult = JsonHandle.ObjectToJson(mobile); base.OutJson(strResult); } } } } } } }
protected void Page_Load(object sender, EventArgs e) { IDictionary<string, object> dictionary = new Dictionary<string, object>(); string str = LSRequest.qq("player_type"); string numTable = ""; numTable = Utils.GetPKBJL_NumTable(str); string str3 = ""; string str4 = ""; string str5 = ""; string str6 = ""; string str7 = ""; string[] strArray = null; Dictionary<string, string> dictionary2 = new Dictionary<string, string>(); DataTable kCOpenBall = base.GetKCOpenBall(8, numTable); if ((kCOpenBall != null) && (kCOpenBall.Rows.Count > 0)) { DataRow row = kCOpenBall.Rows[0]; string str8 = row["previousphase"].ToString().Trim(); str7 = row["currentphase"].ToString().Trim(); str3 = row["nns"].ToString(); strArray = (str8 + "," + str3).Split(new char[] { ',' }).ToArray<string>(); str4 = row["ten_poker"].ToString(); str6 = row["zhuang_nn"].ToString(); str5 = row["xian_nn"].ToString(); dictionary2.Add("player", str5); dictionary2.Add("banker", str6); } DataTable table2 = CallBLL.cz_phase_pkbjl_bll.IsOpenPhaseByTime(DateTime.Now, numTable); if ((table2 == null) || (table2.Rows.Count < 1)) { str4 = ""; } else { DateTime time = Convert.ToDateTime(DateTime.Now.ToString()); string str9 = table2.Rows[0]["p_id"].ToString().Trim(); str7 = table2.Rows[0]["phase"].ToString().Trim(); DateTime time2 = Convert.ToDateTime(table2.Rows[0]["play_open_date"].ToString().Trim()); DateTime time3 = Convert.ToDateTime(table2.Rows[0]["open_date"].ToString().Trim()); string str10 = time2.ToString("HH:mm:ss"); DateTime time4 = Convert.ToDateTime(table2.Rows[0]["stop_date"].ToString().Trim()); string str11 = "y"; string str12 = Utils.DateDiff(time4, time).ToString(); TimeSpan dateDiff = Utils.GetDateDiff(time4, time); if (table2.Rows[0]["is_closed"].ToString().Trim() == "0") { if (time4 < time) { str11 = "n"; } } else { str11 = "n"; } if (str11.Equals("n")) { int num = 8; base.Add_TenPoker_Lock(num.ToString(), str9, numTable); cz_phase_pkbjl tenPoker = CallBLL.cz_phase_pkbjl_bll.GetTenPoker(str9, numTable); if ((tenPoker == null) || string.IsNullOrEmpty(tenPoker.get_ten_poker())) { CallBLL.cz_poker_pkbjl_bll.InitToPhase(numTable, str9); } base.Un_TenPoker_Lock(8.ToString(), str9, numTable); } } str4 = CallBLL.cz_phase_pkbjl_bll.GetNewOpenPhaseByNumTable(numTable).Rows[0]["ten_poker"].ToString(); dictionary.Add("status", "1"); dictionary.Add("kaijiang", strArray); dictionary.Add("porkList", str4); dictionary.Add("jq", str7); dictionary.Add("lastResult", dictionary2); dictionary.Add("road", base.GetPAILU(numTable)); string strResult = JsonHandle.ObjectToJson(dictionary); base.OutJson(strResult); }
protected void Page_Load(object sender, EventArgs e) { if (!FileCacheHelper.get_ManageZJProfit().Equals("1")) { base.Response.End(); } Dictionary <string, object> dictionary = new Dictionary <string, object>(); base.Response.ContentType = "text/json"; string str = LSRequest.qq("lotteryType"); string str2 = LSRequest.qq("lotteryPhase"); string str3 = LSRequest.qq("validcode"); string str4 = "0"; string str5 = "0"; double num = 0.0; double num2 = 0.0; double num3 = 0.0; string str6 = ""; if ((string.IsNullOrEmpty(str) || string.IsNullOrEmpty(str2)) || !str3.Equals(FileCacheHelper.get_ManageZJProfitValidCode())) { dictionary.Add("code", 400); dictionary.Add("tip_info", "參數錯誤!"); dictionary.Add("lotteryType", str); dictionary.Add("phase", str2); dictionary.Add("minRate", str4); dictionary.Add("maxRate", str5); dictionary.Add("sum_amount", num); dictionary.Add("sum_profit", num2); dictionary.Add("sum_drawback", num3); dictionary.Add("data", null); base.Response.Write(JsonHandle.ObjectToJson(dictionary)); base.Response.End(); } str6 = Utils.LotteryTypeById_ccms(str); if (string.IsNullOrEmpty(str6)) { dictionary.Add("code", 400); dictionary.Add("tip_info", "參數錯誤!"); dictionary.Add("lotteryType", str); dictionary.Add("phase", str2); dictionary.Add("minRate", str4); dictionary.Add("maxRate", str5); dictionary.Add("sum_amount", num); dictionary.Add("sum_profit", num2); dictionary.Add("sum_drawback", num3); dictionary.Add("data", null); base.Response.Write(JsonHandle.ObjectToJson(dictionary)); base.Response.End(); } SqlParameter[] parameterArray2 = new SqlParameter[2]; SqlParameter parameter = new SqlParameter("@lottery_id", SqlDbType.Int) { Value = str6 }; parameterArray2[0] = parameter; SqlParameter parameter2 = new SqlParameter("@id_ccms", SqlDbType.NVarChar) { Value = str }; parameterArray2[1] = parameter2; SqlParameter[] parameterArray = parameterArray2; DataSet set = DbHelperSQL.Query(" select top 1 * from cz_zj_profit_set where lottery_id=@lottery_id and id_ccms=@id_ccms and (minRate != 0 or maxRate != 0 ) ", parameterArray); if (((set != null) && (set.Tables.Count > 0)) && (set.Tables[0].Rows.Count > 0)) { str4 = set.Tables[0].Rows[0]["minRate"].ToString(); str5 = set.Tables[0].Rows[0]["maxRate"].ToString(); string str7 = set.Tables[0].Rows[0]["openTime"].ToString(); string str8 = set.Tables[0].Rows[0]["u_type"].ToString(); string str9 = set.Tables[0].Rows[0]["u_name"].ToString(); DataTable table = CallBLL.cz_bet_kc_bll.GetZJTotalsByTime(str6, str7, str8, str9); if (table != null) { num = double.Parse(table.Rows[0]["sum_amount"].ToString()); num2 = double.Parse(table.Rows[0]["sum_profit"].ToString()); num3 = double.Parse(table.Rows[0]["sum_drawback"].ToString()); } } int num4 = 0; DataTable table2 = CallBLL.cz_bet_kc_bll.GetZJTotals(str6, str2, ref num4); switch (num4) { case 1: dictionary.Add("code", 400); dictionary.Add("tip_info", "找不到獎期!"); break; case 2: dictionary.Add("code", 400); dictionary.Add("tip_info", "該獎期正在開盤中!"); break; default: dictionary.Add("code", 200); dictionary.Add("tip_info", ""); break; } dictionary.Add("lotteryType", str); dictionary.Add("phase", str2); dictionary.Add("minRate", str4); dictionary.Add("maxRate", str5); dictionary.Add("sum_amount", num); dictionary.Add("sum_profit", num2); dictionary.Add("sum_drawback", num3); dictionary.Add("data", table2); base.Response.Write(JsonHandle.ObjectToJson(dictionary)); base.Response.End(); }
protected void write_json() { IDictionary <string, object> dictionary = new Dictionary <string, object>(); if (!base.IsUserLoginByMobileForAjax()) { dictionary.Add("status", "2"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { string str = "_m_jsk3_jqkj"; dictionary.Add("status", "1"); List <object> cache = new List <object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str) != null) { cache = CacheHelper.GetCache("balance_kc_FileCacheKey" + str) as List <object>; } else { string str2 = ""; string str3 = ""; string str4 = ""; string str5 = ""; DataSet topPhase = CallBLL.cz_phase_jsk3_bll.GetTopPhase(0x16); if (topPhase != null) { DataTable table = topPhase.Tables[0]; Dictionary <string, object> dictionary2 = new Dictionary <string, object>(); StringBuilder builder = new StringBuilder(); foreach (DataRow row in table.Rows) { str2 = row["phase"].ToString().Trim().Substring(9, 2); str3 = row["play_open_date"].ToString(); int num = Convert.ToInt32(row["n1"].ToString()); int num2 = Convert.ToInt32(row["n2"].ToString()); int num3 = Convert.ToInt32(row["n3"].ToString()); str4 = ((num + num2) + num3).ToString(); if ((num == num2) && (num2 == num3)) { str5 = "通吃"; } else if (Convert.ToInt32(str4) <= 10) { str5 = "小"; } else { str5 = "大"; } string item = string.Format("{0},{1},{2},{3},{4},{5}", new object[] { str2, num, num2, num3, str4, str5 }); cache.Add(item); } } CacheHelper.SetCache("balance_kc_FileCacheKey" + str, cache); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str, cache, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } dictionary.Add("k3Long", cache); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } }
protected void Page_Load(object sender, EventArgs e) { agent_userinfo_session _session = this.Session[this.Session["user_name"] + "lottery_session_user_info"] as agent_userinfo_session; if (_session.get_u_type().Equals("zj") && (_session.get_users_child_session() != null)) { this.perName_1 = ""; this.perName_2 = ""; if (_session.get_users_child_session().get_permissions_name().IndexOf("po_4_1") > -1) { this.perName_1 = "po_4_1"; } if (_session.get_users_child_session().get_permissions_name().IndexOf("po_4_2") > -1) { this.perName_2 = "po_4_2"; } if (string.IsNullOrEmpty(this.perName_1) && string.IsNullOrEmpty(this.perName_2)) { base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0"); } } if (!_session.get_u_type().Equals("zj") && (_session.get_users_child_session() != null)) { this.perName_1 = ""; this.perName_2 = ""; if (_session.get_users_child_session().get_permissions_name().IndexOf("po_7_1") > -1) { this.perName_1 = "po_7_1"; } if (_session.get_users_child_session().get_permissions_name().IndexOf("po_7_2") > -1) { this.perName_2 = "po_7_2"; } if (string.IsNullOrEmpty(this.perName_1) && string.IsNullOrEmpty(this.perName_2)) { base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0"); } } this.lotteryId = LSRequest.qq("lid"); this.lotteryDT = base.GetLotteryList(); this.SetDate(); this.beginTime = DateTime.Now.AddHours(-7.0).ToString("yyyy-MM-dd"); this.endTime = DateTime.Now.AddHours(-7.0).ToString("yyyy-MM-dd"); if (CallBLL.cz_phase_six_bll.IsOpenPhase()) { this.sixOpenPhase = "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 str = ""; Dictionary <string, string> dictionary2 = new Dictionary <string, string>(); foreach (DataRow row in rowArray) { dictionary2.Add(row["id"].ToString(), row["lottery_name"].ToString()); str = 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() + "," + str, dictionary2); } if ((rowArray2 != null) && (rowArray2.Length > 0)) { string str2 = ""; Dictionary <string, string> dictionary3 = new Dictionary <string, string>(); foreach (DataRow row2 in rowArray2) { dictionary3.Add(row2["id"].ToString(), row2["lottery_name"].ToString()); str2 = 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() + "," + str2, dictionary3); } this.jsonLottery = JsonHandle.ObjectToJson(dictionary); this.GetReportOpenDate(); }
private void user_login(HttpContext context, ref string strResult) { cz_login_log login_log; ReturnResult result = new ReturnResult(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("type", "user_login"); string userName = LSRequest.qq("loginName").Trim().ToLower(); string str = LSRequest.qq("loginPwd").Trim(); string str2 = LSRequest.qq("ValidateCode").Trim(); if (PageBase.is_ip_locked()) { context.Session["lottery_session_img_code"] = null; result.set_success(400); result.set_tipinfo("由於輸入錯誤次數過多,您已被禁用,請稍後再試!"); strResult = JsonHandle.ObjectToJson(result); } else if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(str)) { context.Response.End(); } else { DateTime time; if (int.Parse(FileCacheHelper.get_GetLockedPasswordCount()) == 0) { context.Session["lottery_session_img_code_display"] = 1; } if (context.Session["lottery_session_img_code_display"] == null) { if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(userName)) { if (PageBase.IsErrTimesAbove(ref time, userName)) { if (!PageBase.IsErrTimeout(time)) { context.Session["lottery_session_img_code"] = null; result.set_success(400); result.set_tipinfo(""); dictionary.Add("is_display_code", "1"); result.set_data(dictionary); strResult = JsonHandle.ObjectToJson(result); context.Session["lottery_session_img_code_display"] = 1; return; } CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(userName); context.Session["lottery_session_img_code"] = null; context.Session["lottery_session_img_code_display"] = 0; } else { context.Session["lottery_session_img_code"] = null; context.Session["lottery_session_img_code_display"] = 0; } } else { context.Session["lottery_session_img_code"] = null; context.Session["lottery_session_img_code_display"] = 0; } } if (context.Session["lottery_session_img_code_display"].ToString() == "0") { if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(str)) { context.Response.End(); return; } } else { if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(str)) { context.Response.End(); return; } if (string.IsNullOrEmpty(str2)) { context.Session["lottery_session_img_code"] = null; result.set_success(400); result.set_tipinfo(""); dictionary.Add("is_display_code", "1"); result.set_data(dictionary); strResult = JsonHandle.ObjectToJson(result); context.Session["lottery_session_img_code_display"] = 1; return; } if (context.Session["lottery_session_img_code"] == null) { context.Response.End(); return; } if (context.Session["lottery_session_img_code"].ToString().ToLower() != str2.ToLower()) { context.Session["lottery_session_img_code"] = null; result.set_success(400); result.set_tipinfo(PageBase.GetMessageByCache("u100004", "MessageHint")); dictionary.Add("fs_name", "ValidateCode"); strResult = JsonHandle.ObjectToJson(result); return; } } cz_users _users = CallBLL.cz_users_bll.UserLogin(userName.ToLower()); if (_users == null) { context.Session["lottery_session_img_code"] = null; PageBase.login_error_ip(); result.set_success(400); result.set_tipinfo(PageBase.GetMessageByCache("u100005", "MessageHint")); dictionary.Add("fs_name", "loginName"); strResult = JsonHandle.ObjectToJson(result); } else { string str4 = _users.get_retry_times().ToString(); if (!string.IsNullOrEmpty(str4) && (int.Parse(str4) > int.Parse(FileCacheHelper.get_GetLockedUserCount()))) { if (!PageBase.IsLockedTimeout(userName, "master")) { context.Session["lottery_session_img_code"] = null; result.set_success(560); result.set_tipinfo("您的帳號因密碼多次輸入錯誤被鎖死,請與管理員聯系!"); strResult = JsonHandle.ObjectToJson(result); return; } PageBase.zero_retry_times(userName); } string str5 = _users.get_a_state().ToString(); string str6 = PageBase.upper_user_status(_users.get_u_name().ToLower()); if (str5 == "2") { context.Session["lottery_session_img_code"] = null; result.set_success(400); result.set_tipinfo(PageBase.GetMessageByCache("u100008", "MessageHint")); strResult = JsonHandle.ObjectToJson(result); context.Session.Abandon(); } else if (str6 == "2") { context.Session["lottery_session_img_code"] = null; result.set_success(400); result.set_tipinfo("您的上級帳號已被停用,请与管理员联系!"); strResult = JsonHandle.ObjectToJson(result); context.Session.Abandon(); } else { if (str5 == "1") { result.set_success(200); result.set_tipinfo(PageBase.GetMessageByCache("u100007", "MessageHint")); strResult = JsonHandle.ObjectToJson(result); context.Session["user_state"] = str5; } else if (str6 == "1") { result.set_success(200); result.set_tipinfo(PageBase.GetMessageByCache("u100010", "MessageHint")); strResult = JsonHandle.ObjectToJson(result); context.Session["user_state"] = str6; } else { context.Session["user_state"] = "0"; result.set_success(200); strResult = JsonHandle.ObjectToJson(result); } string str7 = _users.get_salt().Trim(); string str8 = DESEncrypt.EncryptString(str, str7); if (_users.get_u_psw() != str8) { context.Session["lottery_session_img_code"] = null; PageBase.inc_retry_times(userName); PageBase.login_error_ip(); result.set_success(400); result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint")); strResult = JsonHandle.ObjectToJson(result); if (context.Session["lottery_session_img_code_display"].ToString() == "0") { if (CallBLL.cz_user_psw_err_log_bll.IsExistUser(userName)) { CallBLL.cz_user_psw_err_log_bll.UpdateErrTimes(userName); } else { CallBLL.cz_user_psw_err_log_bll.AddUser(userName); } if (PageBase.IsErrTimesAbove(ref time, userName)) { context.Session["lottery_session_img_code"] = null; result.set_success(400); result.set_tipinfo(PageBase.GetMessageByCache("u100006", "MessageHint")); dictionary.Add("is_display_code", "1"); result.set_data(dictionary); strResult = JsonHandle.ObjectToJson(result); context.Session["lottery_session_img_code_display"] = 1; } } } else { cz_userinfo_session _session = new cz_userinfo_session(); _session.set_u_id(_users.get_u_id()); _session.set_u_name(_users.get_u_name()); _session.set_u_nicker(_users.get_u_nicker()); _session.set_u_skin(_users.get_u_skin()); _session.set_u_type(_users.get_u_type()); _session.set_su_type(_users.get_su_type()); _session.set_kc_kind(_users.get_kc_kind().Trim()); _session.set_six_kind(_users.get_six_kind().Trim()); _session.set_u_psw(_users.get_u_psw().Trim()); _session.set_kc_rate_owner(_users.get_kc_rate_owner()); _session.set_six_rate_owner(_users.get_six_rate_owner()); _session.set_a_state(new int?(int.Parse(context.Session["user_state"].ToString()))); DataTable zJInfo = CallBLL.cz_users_bll.GetZJInfo(); if (zJInfo != null) { _session.set_zjname(zJInfo.Rows[0]["u_name"].ToString().Trim()); } DataRow item = CallBLL.cz_admin_sysconfig_bll.GetItem(); if (item == null) { _session.set_u_skin("Blue"); } else { string str9 = item["hy_skin"].ToString(); if (string.IsNullOrEmpty(_session.get_u_skin()) || (str9.IndexOf(_session.get_u_skin()) < 0)) { _session.set_u_skin(str9.Split(new char[] { '|' })[0]); } } DataTable table2 = CallBLL.cz_rate_six_bll.GetRateByAccount(userName.ToLower()).Tables[0]; _session.get_six_session().set_fgsname(table2.Rows[0]["fgs_name"].ToString().Trim()); _session.get_six_session().set_gdname(table2.Rows[0]["gd_name"].ToString().Trim()); _session.get_six_session().set_zdname(table2.Rows[0]["zd_name"].ToString().Trim()); _session.get_six_session().set_dlname(table2.Rows[0]["dl_name"].ToString().Trim()); DataTable table3 = CallBLL.cz_rate_kc_bll.GetRateByAccount(userName.ToLower()).Tables[0]; _session.get_kc_session().set_fgsname(table3.Rows[0]["fgs_name"].ToString().Trim()); _session.get_kc_session().set_gdname(table3.Rows[0]["gd_name"].ToString().Trim()); _session.get_kc_session().set_zdname(table3.Rows[0]["zd_name"].ToString().Trim()); _session.get_kc_session().set_dlname(table3.Rows[0]["dl_name"].ToString().Trim()); _session.set_kc_rate_owner(new int?(Convert.ToInt32(table3.Rows[0]["kc_rate_owner"]))); _session.set_six_rate_owner(new int?(Convert.ToInt32(table2.Rows[0]["six_rate_owner"]))); DataTable userOpOdds = CallBLL.cz_rate_kc_bll.GetUserOpOdds(userName.ToLower()); if (userOpOdds != null) { if ((userOpOdds.Rows[0]["six_op_odds"] != null) && (userOpOdds.Rows[0]["six_op_odds"].ToString() != "")) { _session.set_six_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["six_op_odds"].ToString()))); } if ((userOpOdds.Rows[0]["kc_op_odds"] != null) && (userOpOdds.Rows[0]["kc_op_odds"].ToString() != "")) { _session.set_kc_op_odds(new int?(int.Parse(userOpOdds.Rows[0]["kc_op_odds"].ToString()))); } } context.Session["user_name"] = userName.ToLower(); context.Session[userName + "lottery_session_user_info"] = _session; PageBase.SetAppcationFlag(userName); if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { new PageBase_Redis().InitUserOnlineTopToRedis(userName, _session.get_u_type()); } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { new PageBase_Redis().InitUserOnlineTopToRedisStack(userName, _session.get_u_type()); } else { MemberPageBase.stat_top_online(userName); MemberPageBase.stat_online(userName, _session.get_u_type()); } if (FileCacheHelper.get_RedisStatOnline().Equals(0)) { PageBase.ZeroIsOutFlag(userName); } login_log = new cz_login_log(); login_log.set_ip(LSRequest.GetIP()); login_log.set_login_time(new DateTime?(DateTime.Now)); login_log.set_u_name(userName); login_log.set_browser_type(Utils.GetBrowserInfo(HttpContext.Current)); Task.Factory.StartNew(delegate { PageBase.zero_retry_times(userName); CallBLL.cz_user_psw_err_log_bll.ZeroErrTimes(userName); CallBLL.cz_login_log_bll.Add(login_log); }).ContinueWith(delegate(Task t) { string str = string.Format("Task Exception: {0}", t.Exception.InnerException.Message); MessageQueueConfig.TaskQueue.Enqueue(new TaskModel(0, str)); }, TaskContinuationOptions.OnlyOnFaulted); if (FileCacheHelper.get_GetWebModelView().Equals(0)) { HttpContext.Current.Session["Session_LoginSystem_Flag"] = "LoginSystem_OldWeb"; _session.set_u_skin("Yellow"); } else { HttpContext.Current.Session["Session_LoginSystem_Flag"] = "LoginSystem_NewWeb"; } string str10 = _users.get_is_changed().ToString(); if (string.IsNullOrEmpty(str10)) { result.set_success(550); result.set_tipinfo("新密碼首次登錄,需重置密碼!"); strResult = JsonHandle.ObjectToJson(result); context.Session["modifypassword"] = "******"; } else if (str10 == "0") { result.set_success(550); result.set_tipinfo("新密碼首次登錄,需重置密碼!"); strResult = JsonHandle.ObjectToJson(result); context.Session["modifypassword"] = "******"; } else { DateTime?nullable3; DateTime?nullable = _users.get_last_changedate(); int num2 = PageBase.PasswordExpire(); if (nullable.HasValue && ((nullable3 = nullable).HasValue ? (nullable3.GetValueOrDefault() < DateTime.Now.AddDays((double)-num2)) : false)) { result.set_success(550); result.set_tipinfo("密碼過期,需重置密碼!"); strResult = JsonHandle.ObjectToJson(result); context.Session["modifypassword"] = "******"; } else { CallBLL.cz_credit_lock_bll.Delete(_users.get_u_name()); result.set_data(dictionary); strResult = JsonHandle.ObjectToJson(result); } } } } } } }
protected void out_six_odds_info() { string str = LSRequest.qq("playid"); string str2 = LSRequest.qq("playpage"); if (string.IsNullOrEmpty(str)) { base.Response.End(); } else { string str3 = this.Session["user_name"].ToString(); cz_userinfo_session getUserModelInfo = base.GetUserModelInfo; string str4 = getUserModelInfo.get_su_type().ToString(); string str5 = getUserModelInfo.get_u_name().ToString(); string str6 = getUserModelInfo.get_six_kind().Trim(); ReturnResult result = new ReturnResult(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("type", "get_oddsinfo"); dictionary.Add("playpage", str2); DataTable table = CallBLL.cz_users_bll.GetCredit(str5, str4).Tables[0]; string str7 = table.Rows[0]["six_credit"].ToString(); string str8 = table.Rows[0]["six_iscash"]; decimal num = Convert.ToDecimal(str7); string str9 = "0"; if (str8.Equals("1")) { str9 = "1"; } decimal num2 = Convert.ToDecimal(table.Rows[0]["six_usable_credit"].ToString()); dictionary.Add("iscash", str9); dictionary.Add("credit", num.ToString("F1")); dictionary.Add("usable_credit", num2.ToString("F1")); cz_phase_six currentPhase = CallBLL.cz_phase_six_bll.GetCurrentPhase(); if (!this.isOpenLottery(currentPhase)) { dictionary.Add("status", "3"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { DateTime now = DateTime.Now; string str11 = "n"; string str12 = "0"; string str13 = ""; string str14 = currentPhase.get_open_date().ToString(); string str15 = ""; DateTime time2 = Convert.ToDateTime(currentPhase.get_stop_date()); DateTime time3 = Convert.ToDateTime(currentPhase.get_sn_stop_date()); TimeSpan span = Utils.DateDiff(time2, now); TimeSpan span2 = Utils.DateDiff(time3, now); string str16 = string.Concat(new object[] { (span.Days * 0x18) + span.Hours, ":", span.Minutes, ":", span.Seconds }); string str17 = string.Concat(new object[] { (span2.Days * 0x18) + span2.Hours, ":", span2.Minutes, ":", span2.Seconds }); if (time2 < now) { str15 = str16; } else { str11 = "y"; str12 = "1"; str15 = str16; } if (time3 < now) { str13 = str17; } else { str11 = "y"; str12 = "1"; str13 = str17; } if ((currentPhase != null) && currentPhase.get_is_closed().Equals(0)) { int num3; if (time2 < now) { num3 = CallBLL.cz_odds_six_bll.UpdateIsOpen(1, "91001,91002,91003,91004,91005,91007,91038"); } if (time3 < now) { num3 = CallBLL.cz_odds_six_bll.UpdateIsOpen(0, ""); } } string str18 = (currentPhase != null) ? currentPhase.get_phase() : ""; string str19 = (currentPhase != null) ? currentPhase.get_p_id().ToString() : ""; dictionary.Add("openning", str11); dictionary.Add("isopen", str12); int index = str14.IndexOf(' '); dictionary.Add("drawopen_time", str14.Substring(index)); string str20 = ""; string[] strArray = str13.Split(new char[] { ':' }); str20 = (Convert.ToInt32(strArray[0]) < 10) ? ("0" + strArray[0]) : strArray[0]; str20 = (str20 + ":" + ((Convert.ToInt32(strArray[1]) < 10) ? ("0" + strArray[1]) : strArray[1])) + ":" + ((Convert.ToInt32(strArray[2]) < 10) ? ("0" + strArray[2]) : strArray[2]); dictionary.Add("stop_time", str20); dictionary.Add("nn", str18); dictionary.Add("p_id", str19); dictionary.Add("profit", ""); DataSet play = CallBLL.cz_play_six_bll.GetPlay(str, str4); if (play == null) { base.Response.End(); } else { DataTable table2 = play.Tables["odds"]; if (table2 == null) { base.Response.End(); } else { DataSet cache; DataTable table3 = null; DataTable table4 = null; DataTable table5 = null; DataTable table6 = null; DataTable table7 = null; DataTable table8 = null; DataTable wT = null; DataTable table10 = null; DataTable table11 = null; DataTable table12 = null; DataTable table13 = null; DataTable table14 = null; DataTable table15 = null; DataTable table16 = null; DataTable table17 = null; DataTable table18 = null; DataTable table19 = null; DataTable table20 = null; DataTable table21 = null; DataTable table22 = null; string str37 = str2; if (str37 != null) { if (!(str37 == "six_lm")) { if (str37 == "six_lm_b") { wT = CallBLL.cz_wt_3qz_b_six_bll.GetWT(); table10 = CallBLL.cz_wt_3z2_b_six_bll.GetWT(); table11 = CallBLL.cz_wt_2qz_b_six_bll.GetWT(); table12 = CallBLL.cz_wt_2zt_b_six_bll.GetWT(); table13 = CallBLL.cz_wt_tc_b_six_bll.GetWT(); table14 = CallBLL.cz_wt_4z1_b_six_bll.GetWT(); } else if (str37 == "six_bz") { table15 = CallBLL.cz_wt_5bz_six_bll.GetWT(); table16 = CallBLL.cz_wt_6bz_six_bll.GetWT(); table17 = CallBLL.cz_wt_7bz_six_bll.GetWT(); table18 = CallBLL.cz_wt_8bz_six_bll.GetWT(); table19 = CallBLL.cz_wt_9bz_six_bll.GetWT(); table20 = CallBLL.cz_wt_10bz_six_bll.GetWT(); } else if (str37 == "six_lx") { table21 = CallBLL.cz_wt_sxlwsl_six_bll.GetWT(); table22 = CallBLL.cz_wt_6xyz_six_bll.GetWT(); } else if (str37 == "six_ws") { table21 = CallBLL.cz_wt_sxlwsl_six_bll.GetWT(); } } else { table3 = CallBLL.cz_wt_3qz_six_bll.GetWT(); table4 = CallBLL.cz_wt_3z2_six_bll.GetWT(); table5 = CallBLL.cz_wt_2qz_six_bll.GetWT(); table6 = CallBLL.cz_wt_2zt_six_bll.GetWT(); table7 = CallBLL.cz_wt_tc_six_bll.GetWT(); table8 = CallBLL.cz_wt_4z1_six_bll.GetWT(); } } DataTable drawbackByPlayIds = null; if (FileCacheHelper.get_GetSixPutMoneyCache() == "1") { foreach (string str21 in str.Split(new char[] { ',' })) { DataTable table24; if (CacheHelper.GetCache("six_drawback_FileCacheKey" + str21 + this.Session["user_name"].ToString()) != null) { cache = CacheHelper.GetCache("six_drawback_FileCacheKey" + str21 + this.Session["user_name"].ToString()) as DataSet; if (drawbackByPlayIds == null) { drawbackByPlayIds = cache.Tables[0]; } else { table24 = drawbackByPlayIds.Clone(); table24 = cache.Tables[0]; if (table24 != null) { drawbackByPlayIds.Merge(table24); } } } else if (drawbackByPlayIds == null) { drawbackByPlayIds = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str21, getUserModelInfo.get_u_name()); } else { table24 = drawbackByPlayIds.Clone(); table24 = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str21, getUserModelInfo.get_u_name()); if (table24 != null) { drawbackByPlayIds.Merge(table24); } } } } else if (CacheHelper.GetCache("six_drawback_FileCacheKey" + this.Session["user_name"].ToString()) != null) { cache = CacheHelper.GetCache("six_drawback_FileCacheKey" + this.Session["user_name"].ToString()) as DataSet; drawbackByPlayIds = cache.Tables[0]; } else { drawbackByPlayIds = CallBLL.cz_drawback_six_bll.GetDrawbackByPlayIds(str, getUserModelInfo.get_u_name()); } Dictionary <string, object> dictionary2 = new Dictionary <string, object>(); foreach (DataRow row in table2.Rows) { string key = ""; string pl = ""; string s = ""; string str25 = ""; string str26 = ""; string str27 = ""; string str28 = ""; List <double> source = new List <double>(); Dictionary <string, object> dictionary3 = new Dictionary <string, object>(); key = row["play_id"].ToString() + "_" + row["odds_id"].ToString(); string str29 = row["current_odds"].ToString(); string str30 = row[str6 + "_diff"].ToString().Trim(); if (!row["is_open"].ToString().Equals("0")) { try { string[] strArray3 = row["current_odds"].ToString().Split(new char[] { ',' }); string[] strArray4 = row[str6 + "_diff"].ToString().Trim().Split(new char[] { ',' }); base.GetOdds_SIX(row["odds_id"].ToString(), row["current_odds"].ToString(), row[str6 + "_diff"].ToString(), ref pl); } catch (Exception exception) { string message = exception.Message; } } else if (row["current_odds"].ToString().Split(new char[] { ',' }).Length > 1) { pl = "-,-"; } else { pl = "-"; } DataRow[] rowArray = drawbackByPlayIds.Select(string.Format(" play_id={0} and u_name='{1}' ", row["play_id"].ToString(), getUserModelInfo.get_u_name())); string str32 = rowArray[0]["single_phase_amount"].ToString(); string str33 = rowArray[0]["single_max_amount"].ToString(); string str34 = rowArray[0]["single_min_amount"].ToString(); s = row["allow_min_amount"].ToString(); str25 = row["allow_max_amount"].ToString(); str26 = row["max_appoint"].ToString(); str27 = row["total_amount"].ToString(); str28 = row["allow_max_put_amount"].ToString(); if (Convert.ToDecimal(str25) > Convert.ToDecimal(str28)) { str25 = row["allow_max_put_amount"].ToString(); } if (Convert.ToDecimal(str25) > Convert.ToDecimal(str27)) { str25 = row["total_amount"].ToString(); } if (double.Parse(s) < double.Parse(str34)) { s = str34; } if (double.Parse(str25) > double.Parse(str33)) { str25 = str33; } if ((str2.Equals("six_lm") || str2.Equals("six_lm_b")) || str2.Equals("six_bz")) { switch (row["play_id"].ToString()) { case "91016": foreach (DataRow row2 in table3.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91017": foreach (DataRow row2 in table4.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91018": foreach (DataRow row2 in table5.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91019": foreach (DataRow row2 in table6.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91020": foreach (DataRow row2 in table7.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91040": foreach (DataRow row2 in table8.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91060": foreach (DataRow row2 in wT.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91061": foreach (DataRow row2 in table10.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91062": foreach (DataRow row2 in table11.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91063": foreach (DataRow row2 in table12.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91064": foreach (DataRow row2 in table13.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91065": foreach (DataRow row2 in table14.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91037": foreach (DataRow row2 in table15.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91047": foreach (DataRow row2 in table16.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91048": foreach (DataRow row2 in table17.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91049": foreach (DataRow row2 in table18.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91050": foreach (DataRow row2 in table19.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; case "91051": foreach (DataRow row2 in table20.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } break; } } if (str2.Equals("six_lx")) { string str36 = row["odds_id"].ToString(); if (str36.Equals("92565")) { foreach (DataRow row2 in table22.Rows) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } } else { DataRow[] rowArray2 = table21.Select(string.Format(" odds_id={0} ", Convert.ToInt32(str36))); foreach (DataRow row2 in rowArray2) { source.Add(double.Parse(row2["wt_value"].ToString())); } if (source.Count <double>(p => (p == 0.0)) == source.Count) { source.Clear(); } } } dictionary3.Add("pl", pl); dictionary3.Add("plx", new List <double>(source)); dictionary3.Add("min_amount", s); dictionary3.Add("max_amount", str25); dictionary3.Add("top_amount", str26); dictionary3.Add("dq_max_amount", str27); dictionary3.Add("dh_max_amount", str28); dictionary2.Add(key, new Dictionary <string, object>(dictionary3)); } dictionary.Add("status", "1"); dictionary.Add("play_odds", dictionary2); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } } } } }
protected void output_cl_cql_lryl() { IDictionary <string, object> dictionary = new Dictionary <string, object>(); if (!base.IsUserLoginByMobileForAjax()) { dictionary.Add("status", "2"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { int num; string str = "_m_cqsc_lmcl"; string str2 = "_m_cqsc_cql"; string str3 = "_m_cqsc_lryl"; List <object> cache = new List <object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str) != null) { cache = CacheHelper.GetCache("balance_kc_FileCacheKey" + str) as List <object>; } else { DataTable table = CallBLL.cz_phase_cqsc_bll.GetChangLong().Tables[0]; if (table.Rows.Count > 0) { foreach (DataRow row in table.Rows) { cache.Add(row["c_name"].ToString() + "," + row["c_qs"].ToString()); } CacheHelper.SetCache("balance_kc_FileCacheKey" + str, cache); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str, cache, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } } string str6 = string.Join("|", cache.ToArray()); dictionary.Add("long", str6); string str7 = LSRequest.qq("page_type").Trim(); if (!string.IsNullOrEmpty(str7)) { Dictionary <string, object> dictionary2; List <string> list2; string str8; if ((str7 == "17") || (str7 == "24")) { dictionary2 = new Dictionary <string, object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str7) != null) { dictionary2 = CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str7) as Dictionary <string, object>; dictionary.Add("ph_title", dictionary2["ph_title"]); dictionary.Add("ph_content", dictionary2["ph_content"]); } else { list2 = CallBLL.cz_phase_cqsc_bll.PaihangList_LMP(str7, 10); List <string> list3 = new List <string>(); for (num = 1; num <= 5; num++) { list3.Add(string.Format("第{0}球大小", num)); list3.Add(string.Format("第{0}球單雙", num)); } list3.Add("總和大小"); list3.Add("總和單雙"); list3.Add("龍虎"); str8 = string.Join("|", list3.ToArray()); dictionary.Add("ph_title", str8); dictionary.Add("ph_content", list2); dictionary2.Add("ph_title", str8); dictionary2.Add("ph_content", list2); CacheHelper.SetCache("balance_kc_FileCacheKey" + str2 + str7, dictionary2); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str2 + str7, dictionary2, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } } else { string str9 = str7; if (Utils.IsNumeric(str9)) { dictionary2 = new Dictionary <string, object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str9) != null) { dictionary2 = CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str9) as Dictionary <string, object>; dictionary.Add("ph_title", dictionary2["ph_title"]); dictionary.Add("ph_content", dictionary2["ph_content"]); } else { list2 = CallBLL.cz_phase_cqsc_bll.PaihangListDQ(str9, 10); str8 = string.Join("|", new List <string> { string.Format("第{0}球", str9), "大小", "單雙", "總和大小", "總和單雙", "龍虎" }.ToArray()); dictionary.Add("ph_title", str8); dictionary.Add("ph_content", list2); dictionary2.Add("ph_title", str8); dictionary2.Add("ph_content", list2); CacheHelper.SetCache("balance_kc_FileCacheKey" + str2 + str9, dictionary2); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str2 + str9, dictionary2, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } } } } string str10 = LSRequest.qq("t"); if (((!string.IsNullOrEmpty(str10) && Utils.IsNumeric(str10)) && (int.Parse(str10) > 0)) && (int.Parse(str10) <= 5)) { string str11 = ""; if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str3 + str10) != null) { str11 = CacheHelper.GetCache("balance_kc_FileCacheKey" + str3 + str10) as string; } else { DataSet lRYL = CallBLL.cz_phase_cqsc_bll.GetLRYL(str10); DataTable table2 = null; if (lRYL != null) { table2 = lRYL.Tables[0]; ArrayList list4 = new ArrayList(); if ((table2 != null) && (table2.Rows.Count > 0)) { ArrayList list5 = new ArrayList(); for (num = 0; num < table2.Columns.Count; num++) { list5.Add(table2.Columns[num].ColumnName); } string str12 = string.Join(",", table2.Rows[0].ItemArray.Skip <object>(1).ToArray <object>()); string str13 = string.Join(",", table2.Rows[1].ItemArray.Skip <object>(1).ToArray <object>()); str11 = str12 + "|" + str13; } } CacheHelper.SetCache("balance_kc_FileCacheKey" + str3 + str10, str11); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str3 + str10, str11, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } dictionary.Add("lryl", str11); } dictionary.Add("status", "1"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } }
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); }
protected void Page_Load(object sender, EventArgs e) { this.ajaxErrorLogSwitch = FileCacheHelper.get_AjaxErrorLogSwitch(); string str = ConfigurationManager.AppSettings["CloseIndexRefresh"]; if ((str != "true") && PageBase.IsNeedPopBrower()) { this.Session.Abandon(); base.Response.Write("<script>top.location.href='/'</script>"); base.Response.End(); } this.lotteryDT = base.GetLotteryList(); this.masterids = base.GetLotteryMasterID(this.lotteryDT); int num = 0; foreach (DataRow row in this.lotteryDT.Rows) { if (num.Equals(0)) { this.firstLotteryId = row["id"].ToString(); } num++; break; } if (FileCacheHelper.get_GetDefaultLottery() != "n") { bool flag = false; foreach (DataRow row in this.lotteryDT.Rows) { if (row["id"].ToString().Equals(FileCacheHelper.get_GetDefaultLottery())) { flag = true; break; } } if (flag) { this.firstLotteryId = FileCacheHelper.get_GetDefaultLottery(); } this.useNowMenuId = "1"; } if (this.lotteryDT != null) { Dictionary <string, object> lotteryMenuCfg = base.GetLotteryMenuCfg(this.lotteryDT); this.menuCfg = JsonHandle.ObjectToJson(lotteryMenuCfg); } if (HttpContext.Current.Session["user_name"] == null) { base.Response.End(); } this.userName = HttpContext.Current.Session["user_name"].ToString(); this.uModel = HttpContext.Current.Session[this.userName + "lottery_session_user_info"] as cz_userinfo_session; this.skin = this.uModel.get_u_skin(); if (str != "true") { this.browserCode = Utils.Number(4); PageBase.SetBrowerFlag(this.browserCode); } DataTable table = CallBLL.cz_users_bll.GetCredit(this.userName, this.uModel.get_su_type()).Tables[0]; this.six_credit = string.Format("{0:F0}", double.Parse(table.Rows[0]["six_credit"].ToString())); this.kc_credit = string.Format("{0:F0}", double.Parse(table.Rows[0]["kc_credit"].ToString())); this.six_usable_credit = string.Format("{0:F0}", double.Parse(table.Rows[0]["six_usable_credit"].ToString())); this.kc_usable_credit = string.Format("{0:F0}", double.Parse(table.Rows[0]["kc_usable_credit"].ToString())); this.six_iscash = table.Rows[0]["six_iscash"].ToString(); this.kc_iscash = table.Rows[0]["kc_iscash"].ToString(); CacheHelper.RemoveAllCache("LmGroupCount_Cache"); }
protected void output_cl_cql_lryl() { IDictionary <string, object> dictionary = new Dictionary <string, object>(); if (!base.IsUserLoginByMobileForAjax()) { dictionary.Add("status", "2"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { ArrayList list3; string str = "_m_kl10_lmcl"; string str2 = "_m_kl10_cql"; string str3 = "_m_kl10_lryl"; List <object> cache = new List <object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str) != null) { cache = CacheHelper.GetCache("balance_kc_FileCacheKey" + str) as List <object>; } else { DataTable table = CallBLL.cz_phase_kl10_bll.GetChangLong().Tables[0]; if (table.Rows.Count > 0) { foreach (DataRow row in table.Rows) { cache.Add(row["c_name"].ToString() + "," + row["c_qs"].ToString()); } } CacheHelper.SetCache("balance_kc_FileCacheKey" + str, cache); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str, cache, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } string str6 = string.Join("|", cache.ToArray()); dictionary.Add("long", str6); string str7 = LSRequest.qq("page_type").Trim(); if (!string.IsNullOrEmpty(str7)) { string str8; Dictionary <string, object> dictionary2; Dictionary <string, string> paiHang; ArrayList list2; string str9; if (str7 == "16") { str8 = "kl10_lmp"; dictionary2 = new Dictionary <string, object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str8) != null) { dictionary2 = CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str8) as Dictionary <string, object>; dictionary.Add("ph_title", dictionary2["ph_title"]); dictionary.Add("ph_content", dictionary2["ph_content"]); } else { paiHang = CallBLL.cz_phase_kl10_bll.GetPaiHang(str8, 10); if ((paiHang != null) && (paiHang.Count > 0)) { list2 = new ArrayList(); list3 = new ArrayList(); foreach (KeyValuePair <string, string> pair in paiHang) { list2.Add(pair.Key); list3.Add(pair.Value); } str9 = string.Join("|", list2.ToArray()); dictionary.Add("ph_title", str9); dictionary.Add("ph_content", list3); dictionary2.Add("ph_title", str9); dictionary2.Add("ph_content", list3); CacheHelper.SetCache("balance_kc_FileCacheKey" + str2 + str8, dictionary2); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str2 + str8, dictionary2, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } } } else { str8 = str7; if (Utils.IsNumeric(str8)) { dictionary2 = new Dictionary <string, object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str8) != null) { dictionary2 = CacheHelper.GetCache("balance_kc_FileCacheKey" + str2 + str8) as Dictionary <string, object>; dictionary.Add("ph_title", dictionary2["ph_title"]); dictionary.Add("ph_content", dictionary2["ph_content"]); } else { paiHang = CallBLL.cz_phase_kl10_bll.GetPaiHang(str8, 10); if ((paiHang != null) && (paiHang.Count > 0)) { list2 = new ArrayList(); list3 = new ArrayList(); foreach (KeyValuePair <string, string> pair in paiHang) { list2.Add(pair.Key); list3.Add(pair.Value); } str9 = string.Join("|", list2.ToArray()); dictionary.Add("ph_title", str9); dictionary.Add("ph_content", list3); dictionary2.Add("ph_title", str9); dictionary2.Add("ph_content", list3); } CacheHelper.SetCache("balance_kc_FileCacheKey" + str2 + str8, dictionary2); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str2 + str8, dictionary2, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } } } } string str10 = LSRequest.qq("t"); if (((!string.IsNullOrEmpty(str10) && Utils.IsNumeric(str10)) && (int.Parse(str10) > 0)) && (int.Parse(str10) <= 8)) { string str11 = ""; if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str3 + str10) != null) { str11 = CacheHelper.GetCache("balance_kc_FileCacheKey" + str3 + str10) as string; } else { DataSet lRYL = CallBLL.cz_phase_kl10_bll.GetLRYL(str10); DataTable table2 = null; if (lRYL != null) { table2 = lRYL.Tables[0]; ArrayList list4 = new ArrayList(); if ((table2 != null) && (table2.Rows.Count > 0)) { list3 = new ArrayList(); for (int i = 0; i < table2.Columns.Count; i++) { list3.Add(table2.Columns[i].ColumnName); } string str12 = string.Join(",", table2.Rows[0].ItemArray.Skip <object>(1).ToArray <object>()); string str13 = string.Join(",", table2.Rows[1].ItemArray.Skip <object>(1).ToArray <object>()); str11 = str12 + "|" + str13; } } CacheHelper.SetCache("balance_kc_FileCacheKey" + str3 + str10, str11); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str3 + str10, str11, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } dictionary.Add("lryl", str11); } dictionary.Add("status", "1"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } }
protected void output_cl_cql_lryl() { IDictionary <string, object> dictionary = new Dictionary <string, object>(); if (!base.IsUserLoginByMobileForAjax()) { dictionary.Add("status", "2"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { string str = "_m_xyftoa_lmcl"; string str2 = "_m_xyftoa_cql"; List <object> cache = new List <object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str) != null) { cache = CacheHelper.GetCache("balance_kc_FileCacheKey" + str) as List <object>; } else { DataTable table = CallBLL.cz_phase_xyftoa_bll.GetChangLong().Tables[0]; if (table.Rows.Count > 0) { foreach (DataRow row in table.Rows) { cache.Add(row["c_name"].ToString() + "," + row["c_qs"].ToString()); } } CacheHelper.SetCache("balance_kc_FileCacheKey" + str, cache); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str, cache, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } string str5 = string.Join("|", cache.ToArray()); dictionary.Add("long", str5); string str6 = LSRequest.qq("page_type").Trim(); if (!string.IsNullOrEmpty(str6) && ((str6 == "21") || (str6 == "18"))) { Dictionary <string, object> dictionary2 = new Dictionary <string, object>(); if (CacheHelper.GetCache("balance_kc_FileCacheKey" + str2) != null) { dictionary2 = CacheHelper.GetCache("balance_kc_FileCacheKey" + str2) as Dictionary <string, object>; dictionary.Add("ph_title", dictionary2["ph_title"]); dictionary.Add("ph_content", dictionary2["ph_content"]); } else { List <string> list2 = CallBLL.cz_phase_xyftoa_bll.PaihangList_LMP("xyftoa_lmp", 10); string str7 = string.Join("|", new List <string> { "冠亞軍和", "冠亞軍和大小", "冠亞軍和單雙" }.ToArray()); dictionary.Add("ph_title", str7); dictionary.Add("ph_content", list2); dictionary2.Add("ph_title", str7); dictionary2.Add("ph_content", list2); CacheHelper.SetCache("balance_kc_FileCacheKey" + str2, dictionary2); CacheHelper.SetPublicFileCache("balance_kc_FileCacheKey" + str2, dictionary2, PageBase.GetPublicForderPath(base.get_KC_BalanceFileName())); } } dictionary.Add("status", "1"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } }
public void MemberPageBase_Load(object sender, EventArgs e) { DateTime now; cz_stat_online _online; cz_stat_online _online2; if (HttpContext.Current.Session["user_name"] == null) { HttpContext.Current.Response.Write("<script>top.location.href='/'</script>"); HttpContext.Current.Response.End(); } string str = this.get_children_name(); if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { if (HttpContext.Current.Request.Path.ToLower().IndexOf("resetpasswd.aspx") > 0) { now = DateTime.Now; _online = new cz_stat_online(); _online.set_u_name((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str); _online.set_is_out(0); _online.set_u_type(HttpContext.Current.Session["user_type"].ToString()); _online.set_ip(LSRequest.GetIP()); _online.set_first_time(new DateTime?(now)); _online.set_last_time(new DateTime?(now)); // CallBLL.redisHelper.HashGet<cz_stat_online>("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str, _online); } // if (CallBLL.redisHelper.HashExists("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str)) // { // _online2 = CallBLL.redisHelper.HashGet<cz_stat_online>("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str); // if ((_online2 != null) && _online2.get_is_out().Equals(1)) // { // HttpContext.Current.Session.Abandon(); // HttpContext.Current.Response.Write("<script>top.location.href='/'</script>"); // HttpContext.Current.Response.End(); // } // } if (PageBase.IsNeedPopBrower((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str)) { HttpContext.Current.Session.Abandon(); HttpContext.Current.Response.Write("<script>top.location.href='/'</script>"); HttpContext.Current.Response.End(); } } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { RedisClient client; if (HttpContext.Current.Request.Path.ToLower().IndexOf("resetpasswd.aspx") > 0) { now = DateTime.Now; _online = new cz_stat_online(); _online.set_u_name((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str); _online.set_is_out(0); _online.set_u_type(HttpContext.Current.Session["user_type"].ToString()); _online.set_ip(LSRequest.GetIP()); _online.set_first_time(new DateTime?(now)); _online.set_last_time(new DateTime?(now)); using (client = new RedisClient(RedisConnectSplit.get_RedisIP(), RedisConnectSplit.get_RedisPort(), RedisConnectSplit.get_RedisPassword(), (long)FileCacheHelper.get_GetRedisDBIndex())) { client.ConnectTimeout = int.Parse(RedisConnectSplit.get_RedisConnectTimeout()); client.SetEntryInHash("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str, JsonHandle.ObjectToJson(_online)); } } using (client = new RedisClient(RedisConnectSplit.get_RedisIP(), RedisConnectSplit.get_RedisPort(), RedisConnectSplit.get_RedisPassword(), (long)FileCacheHelper.get_GetRedisDBIndex())) { client.ConnectTimeout = int.Parse(RedisConnectSplit.get_RedisConnectTimeout()); if (client.HashContainsEntry("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str)) { _online2 = JsonHandle.JsonToObject <cz_stat_online>(client.GetValueFromHash("useronline:list", (str == "") ? HttpContext.Current.Session["user_name"].ToString() : str)) as cz_stat_online; if ((_online2 != null) && _online2.get_is_out().Equals(1)) { HttpContext.Current.Session.Abandon(); HttpContext.Current.Response.Write("<script>top.location.href='/'</script>"); HttpContext.Current.Response.End(); } } } if (PageBase.IsNeedPopBrower((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str)) { HttpContext.Current.Session.Abandon(); HttpContext.Current.Response.Write("<script>top.location.href='/'</script>"); HttpContext.Current.Response.End(); } } else if (base.IsUserOut((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str) || PageBase.IsNeedPopBrower((str == "") ? HttpContext.Current.Session["user_name"].ToString() : str)) { HttpContext.Current.Session.Abandon(); HttpContext.Current.Response.Write("<script>top.location.href='/'</script>"); HttpContext.Current.Response.End(); } string str3 = HttpContext.Current.Session["user_name"].ToString(); this.UserCurrentSkin = (HttpContext.Current.Session[str3 + "lottery_session_user_info"] as agent_userinfo_session).get_u_skin(); this.ForcedModifyPassword(); this.AgentCurrentLottery(); this.RedirectReport(); this.IsOpenLottery(); if (((((HttpContext.Current.Request.Path.ToLower().IndexOf("fgs_list") > -1) || (HttpContext.Current.Request.Path.ToLower().IndexOf("gd_list") > -1)) || ((HttpContext.Current.Request.Path.ToLower().IndexOf("zd_list") > -1) || (HttpContext.Current.Request.Path.ToLower().IndexOf("dl_list") > -1))) || ((HttpContext.Current.Request.Path.ToLower().IndexOf("hy_list") > -1) || (HttpContext.Current.Request.Path.ToLower().IndexOf("child_list") > -1))) || (HttpContext.Current.Request.Path.ToLower().IndexOf("filluser_list") > -1)) { CookieHelper.SetCookie("userreturnbackurl", HttpContext.Current.Request.ServerVariables["Path_Info"] + "?" + HttpContext.Current.Request.ServerVariables["Query_String"]); } }
private void out_odds_info() { string str = LSRequest.qq("GT"); if (string.IsNullOrEmpty(str)) { base.Response.End(); } else { string str2 = this.Session["user_name"].ToString(); cz_userinfo_session getUserModelInfo = base.GetUserModelInfo; string str3 = getUserModelInfo.get_su_type().ToString(); string str4 = getUserModelInfo.get_u_name().ToString(); string str5 = getUserModelInfo.get_kc_kind().Trim(); DataTable table = CallBLL.cz_users_bll.GetCredit(str2, str3).Tables[0]; if (table == null) { base.Response.End(); } else { double num = double.Parse(table.Rows[0]["kc_usable_credit"].ToString()); Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("type", "get_oddsinfo"); DataSet set = CallBLL.cz_play_car168_bll.GetPlay(str, str4, str3); if (set == null) { base.Response.End(); } else { this.phaseDT = set.Tables["phase"]; DataTable table2 = set.Tables["odds"]; if ((this.phaseDT == null) || (table2 == null)) { base.Response.End(); } else if (!this.isOpenLottery()) { dictionary.Add("status", "3"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { DataRow row = this.phaseDT.Rows[0]; string str6 = row["openning"].ToString(); string str7 = row["isopen"].ToString(); string str8 = row["opendate"].ToString(); string str9 = row["endtime"].ToString(); string str10 = row["nn"].ToString(); string str11 = row["p_id"].ToString(); double num2 = double.Parse(base.GetKCProfit()); dictionary.Add("status", "1"); dictionary.Add("open", str6); dictionary.Add("k_open_time", str8); dictionary.Add("k_stop_time", str9); dictionary.Add("qishu", str10); dictionary.Add("credit", num.ToString("F1")); dictionary.Add("amount", num2.ToString("F1")); dictionary.Add("k_id", str11); Dictionary <string, object> dictionary2 = new Dictionary <string, object>(); Dictionary <string, object> dictionary3 = new Dictionary <string, object>(); string str12 = ""; string pl = ""; List <double> list = new List <double>(); foreach (DataRow row2 in table2.Rows) { str12 = row2["play_id"].ToString() + "_" + row2["odds_id"].ToString(); string s = row2["current_odds"].ToString(); if (str6 == "n") { s = "-"; } string str18 = row2[str5 + "_diff"].ToString().Trim(); if (s != "-") { pl = (double.Parse(s) + double.Parse(str18)).ToString(); } else { pl = s; } if (s != "-") { base.GetOdds_KC(0x10, row2["odds_id"].ToString(), ref pl); } this.oddsList.Add(str12 + "," + pl); } string str19 = string.Join("|", this.oddsList.ToArray()); if (this.oddsList.Count <string>() > 0) { dictionary.Add("play_odds", str19); } base.OutJson(JsonHandle.ObjectToJson(dictionary)); } } } } }
private void out_odds_info() { string str = LSRequest.qq("GT"); string str2 = LSRequest.qq("player_type"); string str3 = ""; str3 = Utils.GetPKBJL_NumTable(str2); string str4 = LSRequest.qq("playtype"); if (string.IsNullOrEmpty(str) || string.IsNullOrEmpty(str3)) { base.Response.End(); } else if (!string.IsNullOrEmpty(str4) && ((str4 != "0") && (str4 != "1"))) { base.Response.End(); } else { string str5 = this.Session["user_name"].ToString(); cz_userinfo_session getUserModelInfo = base.GetUserModelInfo; string str6 = getUserModelInfo.get_su_type().ToString(); string str7 = getUserModelInfo.get_u_name().ToString(); string str8 = getUserModelInfo.get_kc_kind().Trim(); DataTable table = CallBLL.cz_users_bll.GetCredit(str5, str6).Tables[0]; if (table == null) { base.Response.End(); } else { double num = double.Parse(table.Rows[0]["kc_usable_credit"].ToString()); Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary.Add("type", "get_oddsinfo"); DataSet set = CallBLL.cz_play_pkbjl_bll.GetPlay(str, str7, str6, str3); if (set == null) { base.Response.End(); } else { this.phaseDT = set.Tables["phase"]; DataTable table2 = set.Tables["odds"]; if ((this.phaseDT == null) || (table2 == null)) { base.Response.End(); } else if (!this.isOpenLottery()) { dictionary.Add("status", "3"); base.OutJson(JsonHandle.ObjectToJson(dictionary)); } else { DataRow row = this.phaseDT.Rows[0]; string str9 = row["openning"].ToString(); string str10 = row["isopen"].ToString(); string str11 = row["opendate"].ToString(); string str12 = row["endtime"].ToString(); string str13 = row["nn"].ToString(); string str14 = row["p_id"].ToString(); double num2 = double.Parse(base.GetKCProfit()); if (str9.Equals("n") && string.IsNullOrEmpty(CacheHelper.GetCache(string.Concat(new object[] { "Poker_", 8, "_", str14, "_", str3 })))) { int num3 = 8; base.Add_TenPoker_Lock(num3.ToString(), str14, str3); cz_phase_pkbjl tenPoker = CallBLL.cz_phase_pkbjl_bll.GetTenPoker(str14, str3); if ((tenPoker == null) || string.IsNullOrEmpty(tenPoker.get_ten_poker())) { CallBLL.cz_poker_pkbjl_bll.InitToPhase(str3, str14); } base.Un_TenPoker_Lock(8.ToString(), str14, str3); } dictionary.Add("status", "1"); dictionary.Add("open", str9); dictionary.Add("k_open_time", str11); dictionary.Add("k_stop_time", str12); dictionary.Add("qishu", str13); dictionary.Add("credit", num.ToString("F1")); dictionary.Add("amount", num2.ToString("F1")); dictionary.Add("k_id", str14); DataTable newOpenPhaseByNumTable = CallBLL.cz_phase_pkbjl_bll.GetNewOpenPhaseByNumTable(str3); dictionary.Add("porkList", newOpenPhaseByNumTable.Rows[0]["ten_poker"].ToString()); Dictionary <string, string> dictionary2 = new Dictionary <string, string>(); dictionary2.Add("player", newOpenPhaseByNumTable.Rows[0]["xian_nn"].ToString()); dictionary2.Add("banker", newOpenPhaseByNumTable.Rows[0]["zhuang_nn"].ToString()); dictionary.Add("lastResult", dictionary2); dictionary.Add("road", base.GetPAILU(str3)); Dictionary <string, object> dictionary3 = new Dictionary <string, object>(); Dictionary <string, object> dictionary4 = new Dictionary <string, object>(); string str16 = ""; string pl = ""; List <double> list = new List <double>(); foreach (DataRow row2 in table2.Rows) { double num4; str16 = row2["play_id"].ToString() + "_" + row2["odds_id"].ToString(); string s = row2["current_odds"].ToString(); if (str9 == "n") { s = "-"; } string str22 = row2[str8 + "_diff"].ToString().Trim(); if (s != "-") { num4 = double.Parse(s) + double.Parse(str22); pl = num4.ToString(); } else { pl = s; } if (s != "-") { base.GetOdds_KC(8, row2["odds_id"].ToString(), ref pl); } if (str4.Equals("0") && !pl.Equals("-")) { if (str16.Equals("81004_82005")) { num4 = Convert.ToDouble(pl) + base.GetPlayTypeWTValue_PKBJL("82005"); pl = num4.ToString(); } if (str16.Equals("81004_82006")) { pl = (Convert.ToDouble(pl) + base.GetPlayTypeWTValue_PKBJL("82006")).ToString(); } } this.oddsList.Add(str16 + "," + pl); } string str23 = string.Join("|", this.oddsList.ToArray()); if (this.oddsList.Count <string>() > 0) { dictionary.Add("play_odds", str23); } base.OutJson(JsonHandle.ObjectToJson(dictionary)); } } } } }