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; base.Permission_Aspx_ZJ(model, "po_2_1"); base.Permission_Aspx_DL(model, "po_6_1"); this.u_type = model.get_u_type().Trim(); if (this.Session["child_user_name"] != null) { this.isCloneUser = true; this.cloneName = this.Session["child_user_name"].ToString(); } this.u_id = LSRequest.qq("uid"); if (string.IsNullOrEmpty(this.u_id)) { base.Response.End(); } this.u_name = CallBLL.cz_users_bll.GetUserNameByUid(this.u_id, ref this.isChild); if (string.IsNullOrEmpty(this.u_name)) { base.Response.Redirect("/MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); base.Response.End(); } if (CallBLL.cz_users_bll.GetUserInfoByUID(this.u_id) == null) { cz_users_child userByUID = CallBLL.cz_users_child_bll.GetUserByUID(this.u_id); if ((userByUID != null) && userByUID.get_parent_u_name().Equals(model.get_u_name())) { if (!base.IsUpperLowerLevels(userByUID.get_parent_u_name(), model.get_u_type(), model.get_u_name())) { base.Response.Redirect("/MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); base.Response.End(); } } else { base.Response.Redirect("/MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); base.Response.End(); } } else if (!base.IsUpperLowerLevels(this.u_name, model.get_u_type(), model.get_u_name())) { base.Response.Redirect("/MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); base.Response.End(); } this.page = LSRequest.qq("page"); if (string.IsNullOrEmpty(this.page)) { this.page = "1"; } if (int.Parse(this.page) < 1) { this.page = "1"; } this.dataTable = CallBLL.cz_login_log_bll.get_log_table(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.u_name.Trim(), ref this.isAll); this.FiledValue = new string[] { this.u_id }; }
private void UpdateStatus() { string uid = LSRequest.qq("uid").Trim(); string str2 = LSRequest.qq("status").Trim(); cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(uid); string str3 = ""; if (userInfoByUID != null) { str3 = userInfoByUID.get_a_state().ToString(); } if (userInfoByUID == null) { base.Response.Redirect("../MessagePage.aspx?code=u100034&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } if ((!str2.Equals("0") && !str2.Equals("1")) && !str2.Equals("2")) { base.Response.End(); } string rateName = this.Session["user_name"].ToString(); agent_userinfo_session model = this.Session[rateName + "lottery_session_user_info"] as agent_userinfo_session; base.Permission_Aspx_ZJ(model, "po_2_1"); base.Permission_Aspx_DL(model, "po_6_1"); if (model.get_u_name().Equals(userInfoByUID.get_u_name())) { base.Response.End(); } if (!base.IsUnderLing(userInfoByUID.get_u_name(), rateName, model.get_u_type().Trim())) { base.Response.End(); } if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), model.get_u_type(), model.get_u_name())) { base.Response.End(); } if (CallBLL.cz_users_bll.UpdateStatus(uid, str2)) { if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { base.UpdateIsOutOpts(userInfoByUID.get_u_name()); } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { base.UpdateIsOutOptsStack(userInfoByUID.get_u_name()); } base.user_change_status_log(uid, str3, false); base.Response.Write("1"); } else { base.Response.Write("0"); } }
protected void Page_Load(object sender, EventArgs e) { this.playIds = base.GetSIX_PlayIDChange("qmwx"); this.playpage = "qmwx"; agent_userinfo_session model = this.Session[this.Session["user_name"] + "lottery_session_user_info"] as agent_userinfo_session; base.Permission_Aspx_ZJ(model, "po_1_1"); base.Permission_Aspx_DL(model, "po_5_1"); string str2 = model.get_u_type(); if (str2 != null) { if (!(str2 == "zj")) { if (str2 == "fgs") { this.userType = "2"; goto Label_00AC; } } else { this.userType = "1"; goto Label_00AC; } } this.userType = "0"; Label_00AC: this.jeucode = base.get_JeuValidate(); this.Session["JeuValidate"] = this.jeucode; if (string.IsNullOrEmpty(model.get_allow_sale().ToString())) { this.isAllow_sale = "0"; } else { this.isAllow_sale = model.get_allow_sale().ToString(); if (model.get_users_child_session() != null) { if (model.get_u_type().Equals("zj")) { if (model.get_users_child_session().get_permissions_name().IndexOf("po_1_3") < 0) { this.isAllow_sale = "0"; } } else if (model.get_users_child_session().get_permissions_name().IndexOf("po_5_2") < 0) { this.isAllow_sale = "0"; } } } this.isOperation = base.GetIsOperation(model, 1); }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session sessionInfo = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; if (!sessionInfo.get_u_type().Trim().Equals("zj")) { base.Response.Redirect("../MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); } if (((this.Session["child_user_name"] != null) && sessionInfo.get_u_type().Trim().Equals("zj")) && !RuleJudge.ChildOperateValid(sessionInfo, "po_3_4", HttpContext.Current)) { base.Response.Redirect("../MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); base.Response.End(); } this.page = LSRequest.qq("page"); if (string.IsNullOrEmpty(this.page)) { this.page = "1"; } if (int.Parse(this.page) < 1) { this.page = "1"; } string str2 = LSRequest.qq("isdel"); if (!string.IsNullOrEmpty(str2) && str2.Equals("1")) { string str3 = LSRequest.qq("adid"); if (!string.IsNullOrEmpty(str3)) { bool flag2 = CallBLL.cz_ad_bll.DeleteAd(Convert.ToInt32(str3)); string url = "news_list.aspx?page=" + this.page; if (!flag2) { base.Response.Write(base.ShowDialogBox("刪除站內消息失敗!", url, 400)); base.Response.End(); } else { base.Response.Write(base.ShowDialogBox("刪除站內消息成功!", url, 0)); base.Response.End(); } } } int num = base.get_current_master_id(); DataSet set = CallBLL.cz_ad_bll.GetAdByPage(sessionInfo.get_u_type(), num, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount); if (((set != null) && (set.Tables.Count > 0)) && (set.Tables[0].Rows.Count > 0)) { this.newsTable = set.Tables[0]; } this.CurUrl = string.Format("news_list.aspx?page={0}", this.page); }
private void userLoginLog(ref string strResult) { base.checkLoginByHandler(0); ReturnResult result = new ReturnResult(); new Dictionary <string, object>(); List <object> list = new List <object>(); string str = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; string str2 = _session.get_u_type().Trim(); DataSet newList = CallBLL.cz_login_log_bll.GetNewList((this.Session["child_user_name"] != null) ? this.Session["child_user_name"].ToString() : this.Session["user_name"].ToString(), 50); if ((newList != null) && (newList.Tables.Count > 0)) { DataTable table = newList.Tables[0]; if ((table != null) && (table.Rows.Count > 0)) { foreach (DataRow row in table.Rows) { DateTime time = Convert.ToDateTime(row["login_time"].ToString()); string str3 = row["ip"].ToString(); string iPText = base.GetIPText(str2, str3); string areaByIP = base.GetAreaByIP(str3); Dictionary <string, string> item = new Dictionary <string, string>(); item.Add("ip", iPText); item.Add("ipzone", areaByIP); item.Add("time", time.ToString()); list.Add(item); } } } result.set_success(200); result.set_data(list); strResult = base.ObjectToJson(result); }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; this.skin = _session.get_u_skin(); this.lotteryId = base.AgentCurrentLotteryID; this.uid = LSRequest.qq("uid"); this.mId = LSRequest.qq("mid"); this.lotteryDT = base.GetLotteryList(); int num = 1; if (this.mId.Equals(num.ToString())) { base.Response.Redirect(string.Format("/AutoLet/AutoLet_Show_six.aspx?uid={0}&mid={1}", this.uid, this.mId), true); } this.cz_users_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid); if (this.cz_users_model == null) { base.Response.Redirect("/MessagePage.aspx?code=u100038&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } if (!this.cz_users_model.get_kc_allow_sale().Equals(1)) { base.Response.Redirect("/MessagePage.aspx?code=u100036&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } if (!_session.get_u_type().Equals("zj") && !base.IsUpperLowerLevels(this.cz_users_model.get_u_name(), _session.get_u_type(), _session.get_u_name())) { base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } this.InitData(); }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; this.u_type = _session.get_u_type().Trim(); if (!_session.get_u_type().Trim().Equals("zj")) { base.Response.Redirect("/MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0"); } if (this.Session["child_user_name"] != null) { this.isCloneUser = true; this.cloneName = this.Session["child_user_name"].ToString(); } this.lotteryId = LSRequest.qq("lid"); if (string.IsNullOrEmpty(this.lotteryId)) { this.lotteryId = ""; } this.phaseNum = LSRequest.qq("phaseNum"); if (string.IsNullOrEmpty(this.phaseNum)) { this.phaseNum = ""; } this.lotteryDT = base.GetLotteryList(); base.IsLotteryExistForSysLog(this.lotteryId, "u100032", "1", ""); this.page = LSRequest.qq("page"); if (string.IsNullOrEmpty(this.page)) { this.page = "1"; } if (int.Parse(this.page) < 1) { this.page = "1"; } if (this.lotteryId != "") { this.phaseNumTable = CallBLL.cz_system_log_bll.GetPhaseNumByLottery(base.GetGameNameByID(this.lotteryId)); } DataSet set = CallBLL.cz_system_log_bll.GetSOptLogByPage(Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, (this.lotteryId == "") ? "" : base.GetGameNameByID(this.lotteryId), this.phaseNum); this.dataTable = set.Tables[0]; this.FiledValue = new string[] { this.lotteryId, this.phaseNum }; }
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=u100014&url=&issuccess=1&isback=0"); } base.Permission_Aspx_ZJ(model, "po_3_1"); if (base.IsChildSync()) { base.Response.Redirect("../MessagePage.aspx?code=u100080&url=&issuccess=1&isback=0"); } string s = LSRequest.qq("pid"); string str3 = "/LotteryPeriod/AwardPeriod.aspx?lid=100"; cz_phase_six phaseModel = CallBLL.cz_phase_six_bll.GetPhaseModel(int.Parse(s)); if (!phaseModel.get_is_closed().Equals(1)) { base.Response.Redirect(string.Format("../MessagePage.aspx?code=u100070&url={0}&issuccess=1&isback=1", base.Server.UrlDecode(str3))); } if (!phaseModel.get_is_payment().Equals(1)) { base.Response.Redirect(string.Format("../MessagePage.aspx?code=u100070&url={0}&issuccess=1&isback=1", base.Server.UrlDecode(str3))); } if (CallBLL.cz_phase_six_bll.OpenData(s)) { string str4 = null; if (model.get_users_child_session() != null) { str4 = model.get_users_child_session().get_u_name(); } string str5 = ""; string str6 = ""; cz_lotteryopen_log _log = new cz_lotteryopen_log(); _log.set_phase_id(phaseModel.get_p_id()); _log.set_phase(phaseModel.get_phase()); _log.set_u_name(model.get_u_name()); _log.set_children_name(str4); _log.set_action("開放數據"); _log.set_old_val(str5); _log.set_new_val(str6); _log.set_ip(LSRequest.GetIP()); _log.set_add_time(DateTime.Now); _log.set_note(string.Format("【本期編號:{0}】開放數據", _log.get_phase())); _log.set_type_id(0); _log.set_lottery_id(100); CallBLL.cz_lotteryopen_log_bll.Insert(_log); base.Response.Write(base.ShowDialogBox("開放數據成功!", string.Format("LotteryPeriod/AwardPeriod.aspx?lid={0}", 100), 0)); } else { base.Response.Redirect(string.Format("../MessagePage.aspx?code=u100070&url={0}&issuccess=1&isback=1", base.Server.UrlDecode(str3))); } }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; this.u_type = _session.get_u_type().Trim(); DataSet newList = CallBLL.cz_login_log_bll.GetNewList((this.Session["child_user_name"] != null) ? this.Session["child_user_name"].ToString() : this.Session["user_name"].ToString(), 50); if ((newList != null) && (newList.Tables.Count > 0)) { this.DT = newList.Tables[0]; } }
public static bool ChildOperateValid(agent_userinfo_session sessionInfo, string permissions_name) { if (!sessionInfo.get_u_type().Trim().Equals("zj")) { return(false); } if ((sessionInfo.get_users_child_session() != null) && (sessionInfo.get_users_child_session().get_permissions_name().IndexOf(permissions_name) < 0)) { return(false); } return(true); }
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) { 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") && !model.get_u_type().Trim().Equals("fgs")) && (!model.get_u_type().Trim().Equals("gd") && !model.get_u_type().Trim().Equals("zd"))) && !model.get_u_type().Trim().Equals("dl")) { base.Response.Redirect("../MessagePage.aspx?code=u100035&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } if (this.Session["child_user_name"] != null) { base.Response.Redirect("../MessagePage.aspx?code=u100014&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } base.Permission_Aspx_ZJ(model, "po_2_1"); base.Permission_Aspx_DL(model, "po_6_1"); base.GetLotteryList(); this.page = LSRequest.qq("page"); if (string.IsNullOrEmpty(this.page)) { this.page = "1"; } if (int.Parse(this.page) < 1) { this.page = "1"; } if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2)) { this.childTable = CallBLL.cz_users_child_bll.GetChildList(str, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, "redis"); } else { this.childTable = CallBLL.cz_users_child_bll.GetChildList(str, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount); } this.CurUrl = string.Format("?page={0}", this.page); }
public void Permission_Aspx_ZJ_Mobile(string perName) { base.checkLoginByHandler(0); ReturnResult result = new ReturnResult(); string str2 = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str2 + "lottery_session_user_info"] as agent_userinfo_session; if ((_session.get_u_type().ToLower().Equals("zj") && (_session.get_users_child_session() != null)) && (_session.get_users_child_session().get_permissions_name().IndexOf(perName) < 0)) { result.set_success(400); result.set_tipinfo("無權操作!"); string strResult = this.ObjectToJson(result); this.OutJson(strResult); } }
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); }
private void getMemberDetail(ref string strResult) { base.checkLoginByHandler(0); new ReturnResult(); new Dictionary <string, object>(); new List <object>(); string str = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; if (!_session.get_u_type().Trim().Equals("zj")) { base.Response.End(); } base.checkCloneRight(); string str2 = LSRequest.qq("memberId"); string str3 = LSRequest.qq("submitType"); if (str3 != "add") { base.Response.End(); } if (str2 != "fgs") { 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 (str3 == "add") { this.AddUser(); } }
protected void Page_Load(object sender, EventArgs e) { base.Response.Expires = 0; base.Response.CacheControl = "no-cache"; base.checkLoginByHandler(0); string str = base.get_children_name(); string str2 = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str2 + "lottery_session_user_info"] as agent_userinfo_session; string str3 = _session.get_u_type(); if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2)) { bool flag = false; if ((_session.get_users_child_session() != null) && _session.get_users_child_session().get_is_admin().Equals(1)) { flag = true; } if (!flag) { if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { base.CheckIsOut((str == "") ? str2 : str); base.stat_online_redis((str == "") ? str2 : str, str3); } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { base.CheckIsOutStack((str == "") ? str2 : str); base.stat_online_redisStack((str == "") ? str2 : str, str3); } } } else { MemberPageBase.stat_online((str == "") ? str2 : str, str3); } ReturnResult result = new ReturnResult(); result.set_success(200); string strResult = base.ObjectToJson(result); base.OutJson(strResult); }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); this.login_name = str; this.master_name = str; agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; this.u_type = _session.get_u_type().Trim(); this.zj_name = _session.get_zjname().Trim(); if (this.Session["child_user_name"] != null) { this.isCloneUser = true; this.cloneName = this.Session["child_user_name"].ToString(); this.login_name = this.cloneName; } if (!this.u_type.Equals("zj")) { base.Response.End(); } this.dataTable = CallBLL.cz_system_set_log_bll.get_lottery_set_log(); }
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().Equals("zj")) { base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0"); base.Response.End(); } base.Permission_Aspx_ZJ(model, "po_2_2"); this.lotteryDT = CallBLL.cz_lottery_bll.GetListByConfig().Tables[0]; this.lotteryDT_ZJ = CallBLL.cz_lottery_config_bll.GetAdminList(); if (LSRequest.qq("savelottery").Equals("savelottery")) { if (base.IsChildSync()) { base.Response.Redirect("/MessagePage.aspx?code=u100080&url=&issuccess=1&isback=0"); } string lotteryIds = LSRequest.qq("chk_lottery").Trim(); this.InsertLottery(lotteryIds); } }
private void getMemberDetail(ref string strResult) { base.checkLoginByHandler(0); ReturnResult result = new ReturnResult(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); new List <object>(); string str = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; if (!_session.get_u_type().Trim().Equals("zj")) { base.Response.End(); } base.Permission_Aspx_ZJ_Mobile("po_2_3"); this.uid = LSRequest.qq("uid"); string str2 = LSRequest.qq("memberId"); string str3 = LSRequest.qq("submitType"); if (str2 != "sales") { 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(); } } cz_saleset_six model = null; model = CallBLL.cz_saleset_six_bll.GetModel(this.uid); if (model == null) { base.Response.End(); } switch (str3) { case "view": { Dictionary <string, object> dictionary2 = new Dictionary <string, object>(); dictionary2.Add("name", model.get_u_name()); dictionary2.Add("nicker", model.get_u_nicker()); dictionary2.Add("userKind", model.get_six_kind().ToUpper()); dictionary2.Add("date", model.get_add_date()); dictionary2.Add("type", model.get_flag()); dictionary = dictionary2; result.set_success(200); result.set_data(dictionary); strResult = base.ObjectToJson(result); break; } case "edit": this.AddUser(); break; } }
protected void Page_Load(object sender, EventArgs e) { agent_userinfo_session model = this.Session[this.Session["user_name"] + "lottery_session_user_info"] as agent_userinfo_session; string str = base.Request.UrlReferrer.LocalPath.ToLower(); if (model.get_u_type().Equals("zj")) { if (str.IndexOf("billsearchlist") > -1) { base.Permission_Aspx_ZJ(model, "po_1_1"); } if (str.IndexOf("bill_six") > -1) { base.Permission_Aspx_ZJ(model, "po_1_1"); } if (str.IndexOf("newbet_six") > -1) { base.Permission_Aspx_ZJ(model, "po_3_5"); } if (str.IndexOf("reportdetail_b_six") > -1) { base.Permission_Aspx_ZJ(model, "po_4_1"); } if (str.IndexOf("reportdetail_t_six") > -1) { base.Permission_Aspx_ZJ(model, "po_4_2"); } } else { if ((str.IndexOf("billsearchlist") > -1) || (str.IndexOf("newbet_six") > -1)) { base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } if (str.IndexOf("bill_six") > -1) { base.Permission_Aspx_DL(model, "po_5_1"); } if (str.IndexOf("reportdetail_b_six") > -1) { base.Permission_Aspx_ZJ(model, "po_7_1"); } if (str.IndexOf("reportdetail_t_six") > -1) { base.Permission_Aspx_ZJ(model, "po_7_2"); } } string str2 = LSRequest.qq("ispay"); string str3 = LSRequest.qq("orderid"); this.OutWindow = LSRequest.qq("ow"); this.atz = LSRequest.qq("atz"); DataTable betByOrdernum = CallBLL.cz_bet_six_bll.GetBetByOrdernum(str3, str2); if (betByOrdernum != null) { string str4 = betByOrdernum.Rows[0]["play_id"].ToString(); string str5 = betByOrdernum.Rows[0]["odds_id"].ToString(); string str6 = betByOrdernum.Rows[0]["play_name"].ToString(); string str7 = betByOrdernum.Rows[0]["bet_group"].ToString(); string str8 = betByOrdernum.Rows[0]["bet_wt"].ToString(); string odds = betByOrdernum.Rows[0]["odds"].ToString(); if (model.get_u_type().Equals("zj") || model.get_u_type().Equals("fgs")) { odds = betByOrdernum.Rows[0]["odds_zj"].ToString(); str8 = betByOrdernum.Rows[0]["bet_wt_zj"].ToString(); } double rate = 0.0; double drawback = 0.0; string str15 = model.get_u_type(); if (str15 != null) { if (!(str15 == "zj")) { if (str15 == "fgs") { rate = double.Parse(betByOrdernum.Rows[0]["fgs_rate"].ToString()); drawback = double.Parse(betByOrdernum.Rows[0]["gd_drawback"].ToString()); } else if (str15 == "gd") { rate = double.Parse(betByOrdernum.Rows[0]["gd_rate"].ToString()); drawback = double.Parse(betByOrdernum.Rows[0]["zd_drawback"].ToString()); } else if (str15 == "zd") { rate = double.Parse(betByOrdernum.Rows[0]["zd_rate"].ToString()); drawback = double.Parse(betByOrdernum.Rows[0]["dl_drawback"].ToString()); } else if (str15 == "dl") { rate = double.Parse(betByOrdernum.Rows[0]["dl_rate"].ToString()); drawback = double.Parse(betByOrdernum.Rows[0]["hy_drawback"].ToString()); } } else { rate = double.Parse(betByOrdernum.Rows[0]["zj_rate"].ToString()); drawback = double.Parse(betByOrdernum.Rows[0]["fgs_drawback"].ToString()); } } rate /= 100.0; string str11 = betByOrdernum.Rows[0]["phase_id"].ToString(); this.is_payment = betByOrdernum.Rows[0]["is_payment"].ToString(); string s = betByOrdernum.Rows[0]["amount"].ToString(); string str13 = betByOrdernum.Rows[0]["unit_cnt"].ToString(); string hyAmount = (double.Parse(s) / double.Parse(str13)).ToString(); s = (double.Parse(s) / double.Parse(str13)).ToString(); if (this.is_payment.Equals("1")) { this.groupString = this.GetBetGroupStringPaymentTrue(str11, str4, str5, str6, str7, str8, odds, s, rate, drawback, hyAmount); } else { this.groupString = this.GetBetGroupStringPaymentFalse(str4, str5, str6, str7, str8, odds, s, rate, hyAmount); } } }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; this.u_type = _session.get_u_type().Trim(); if (!_session.get_u_type().Trim().Equals("zj")) { base.Response.End(); } if (this.Session["child_user_name"] != null) { this.isCloneUser = true; this.cloneName = this.Session["child_user_name"].ToString(); } this.page = LSRequest.qq("page"); if (string.IsNullOrEmpty(this.page)) { this.page = "1"; } else if (int.Parse(this.page) < 1) { this.page = "1"; } string str2 = LSRequest.qq("q_date"); if (string.IsNullOrEmpty(str2)) { str2 = DateTime.Now.ToString(); } else { str2 = Utils.StampToDateTime(str2).ToString(); } DateTime now = DateTime.Now; Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { this.onlineTable = base.GetOnlineUserByPage(int.Parse(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, Convert.ToDateTime(str2), "redis"); } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { this.onlineTable = base.GetOnlineUserByPageStack(int.Parse(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, Convert.ToDateTime(str2), "redis"); } else { this.onlineTable = CallBLL.cz_stat_online_bll.GetOnlineUserByPage(int.Parse(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, Convert.ToDateTime(str2)); } stopwatch.Stop(); DateTime time2 = DateTime.Now; TimeSpan span = new TimeSpan(); span = (TimeSpan)(time2 - now); int seconds = span.Seconds; DateTime time3 = DateTime.Now; Stopwatch stopwatch2 = new Stopwatch(); stopwatch2.Start(); if (FileCacheHelper.get_RedisStatOnline().Equals(1)) { this.topTable = base.get_top_online(this.days, "redis"); } else if (FileCacheHelper.get_RedisStatOnline().Equals(2)) { this.topTable = base.get_top_onlineStack(this.days, "redis"); } else { this.topTable = base.get_top_online(this.days); } stopwatch2.Stop(); DateTime time4 = DateTime.Now; TimeSpan span2 = new TimeSpan(); span2 = (TimeSpan)(time4 - time3); int num6 = span2.Seconds; this.FiledValue = new string[] { Utils.DateTimeToStamp(Convert.ToDateTime(str2)).ToString() }; }
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) { 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 Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; this.skin = _session.get_u_skin(); this.lotteryDT = base.GetLotteryList(); this.lotteryId = LSRequest.qq("lid"); this.mId = LSRequest.qq("mid"); this.uid = LSRequest.qq("uid"); int num = 1; if (!this.mId.Equals(num.ToString())) { base.Response.Redirect(string.Format("/AutoLet/AutoLet_Show_kc.aspx?uid={0}&mid={1}", this.uid, this.mId), true); } this.cz_users_model = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid); if (this.cz_users_model == null) { base.Response.Redirect("/MessagePage.aspx?code=u100038&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } if (!this.cz_users_model.get_allow_sale().Equals(1)) { base.Response.Redirect("/MessagePage.aspx?code=u100037&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } if (!_session.get_u_type().Equals("zj") && !base.IsUpperLowerLevels(this.cz_users_model.get_u_name(), _session.get_u_type(), _session.get_u_name())) { base.Response.Redirect("/MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } DataTable play = null; if (!FileCacheHelper.get_IsShowLM_B()) { play = CallBLL.cz_play_six_bll.GetPlay("91060,91061,91062,91063,91064,91065"); } else { play = CallBLL.cz_play_six_bll.GetPlay(); } if (play != null) { this.play_Row = play.Select(" play_id <>91002 and play_id <>91015 "); } DataSet autosaleByUserName = null; if (!FileCacheHelper.get_IsShowLM_B()) { autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(this.cz_users_model.get_u_name(), "91060,91061,91062,91063,91064,91065"); } else { autosaleByUserName = CallBLL.cz_autosale_six_bll.GetAutosaleByUserName(this.cz_users_model.get_u_name()); } if (((autosaleByUserName != null) && (autosaleByUserName.Tables.Count > 0)) && (autosaleByUserName.Tables[0].Rows.Count > 0)) { this.Autosale_DT = autosaleByUserName.Tables[0]; } }
protected void checkCloneRight() { string str; base.checkLoginByHandler(0); ReturnResult result = new ReturnResult(); string str2 = this.Session["user_name"].ToString(); agent_userinfo_session model = this.Session[str2 + "lottery_session_user_info"] as agent_userinfo_session; if (model.get_u_type().Trim().Equals("zj")) { if (this.Permission_Aspx_ZJ_Ajax(model, "po_2_1")) { result.set_success(400); result.set_tipinfo("子帳號無權操作!"); str = this.ObjectToJson(result); this.OutJson(str); } } else if (model.get_u_type().Trim().Equals("fgs")) { if (this.Permission_Aspx_DL_Ajax(model, "po_6_1")) { result.set_success(400); result.set_tipinfo("子帳號無權操作!"); str = this.ObjectToJson(result); this.OutJson(str); } } else if (model.get_u_type().Trim().Equals("gd")) { if (this.Permission_Aspx_DL_Ajax(model, "po_6_1")) { result.set_success(400); result.set_tipinfo("子帳號無權操作!"); str = this.ObjectToJson(result); this.OutJson(str); } } else if (model.get_u_type().Trim().Equals("zd")) { if (this.Permission_Aspx_DL_Ajax(model, "po_6_1")) { result.set_success(400); result.set_tipinfo("子帳號無權操作!"); str = this.ObjectToJson(result); this.OutJson(str); } } else if (model.get_u_type().Trim().Equals("dl")) { if (this.Permission_Aspx_DL_Ajax(model, "po_6_1")) { result.set_success(400); result.set_tipinfo("子帳號無權操作!"); str = this.ObjectToJson(result); this.OutJson(str); } } else { result.set_success(400); result.set_tipinfo("無權操作!"); str = this.ObjectToJson(result); this.OutJson(str); } }
public bool Permission_Aspx_ZJ_Ajax(agent_userinfo_session model, string perName) { return((model.get_u_type().ToLower().Equals("zj") && (model.get_users_child_session() != null)) && (model.get_users_child_session().get_permissions_name().IndexOf(perName) < 0)); }
protected void Page_Load(object sender, EventArgs e) { string str = this.Session["user_name"].ToString(); agent_userinfo_session model = this.Session[str + "lottery_session_user_info"] as agent_userinfo_session; if (!model.get_u_type().Trim().Equals("zj") && !model.get_u_type().Trim().Equals("fgs")) { base.Response.Redirect("../MessagePage.aspx?code=u100035&url=&issuccess=1&isback=0&isopen=1"); base.Response.End(); } base.Permission_Aspx_ZJ(model, "po_2_1"); base.Permission_Aspx_DL(model, "po_6_1"); DataTable table2 = base.GetLotteryList().DefaultView.ToTable(true, new string[] { "master_id" }); for (int i = 0; i < table2.Rows.Count; i++) { if (Convert.ToInt32(table2.Rows[i][0]).Equals(1)) { this.lottrty_six = table2.Rows[i][0].ToString(); } else if (Convert.ToInt32(table2.Rows[i][0]).Equals(2)) { this.lottrty_kc = table2.Rows[i][0].ToString(); } } this.lid = LSRequest.qq("lid"); this.ml = LSRequest.qq("ml"); this.state = LSRequest.qq("state"); this.uid = LSRequest.qq("uid"); this.ut = LSRequest.qq("ut"); if (model.get_u_type().Equals("fgs") && string.IsNullOrEmpty(this.ut)) { this.ut = "fgs"; this.uid = model.get_u_id(); } if (!model.get_u_type().Equals("zj")) { cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.uid); if (!base.IsUpperLowerLevels(userInfoByUID.get_u_name(), model.get_u_type(), model.get_u_name())) { base.Response.Redirect("../MessagePage.aspx?code=u100057&url=&issuccess=1&isback=0"); base.Response.End(); } } this.sortNameState = LSRequest.qq("sortName"); this.sortTypeState = LSRequest.qq("sortType"); if (string.IsNullOrEmpty(this.sortNameState)) { this.sortNameState = "0"; } if (string.IsNullOrEmpty(this.sortTypeState)) { this.sortTypeState = "0"; } this.namesort = this.sortNameState; this.timesort = this.sortTypeState; if (string.IsNullOrEmpty(this.state)) { this.state = "0"; } this.flag = LSRequest.qq("flag"); if (string.IsNullOrEmpty(this.flag)) { this.flag = "0"; } this.keyword = LSRequest.qq("keyword"); this.page = LSRequest.qq("page"); if (string.IsNullOrEmpty(this.page)) { this.page = "1"; } this.url = string.Format("?lid={0}&ml={1}&state={2}&flag={3}&keyword={4}&sortName={5}&sortType={6}&page={7}&uid={8}&ut={9}", new object[] { this.lid, this.ml, this.state, this.flag, this.keyword, this.namesort, this.timesort, this.page, this.uid, this.ut }); if (LSRequest.qq("searchHidden").Equals("search")) { this.ml = LSRequest.qq("ml"); this.state = LSRequest.qq("userState"); this.flag = LSRequest.qq("userFlag"); this.keyword = LSRequest.qq("searchkey"); this.page = LSRequest.qq("page"); this.namesort = LSRequest.qq("sortName"); this.timesort = LSRequest.qq("sortType"); this.url = string.Format("?lid={0}&ml={1}&state={2}&flag={3}&keyword={4}&sortName={5}&sortType={6}&page={7}&uid={8}&ut={9}", new object[] { this.lid, this.ml, this.state, this.flag, this.keyword, this.namesort, this.timesort, 1, this.uid, this.ut }); base.Response.Redirect(string.Format("gd_list.aspx{0}", this.url)); } if (int.Parse(this.page) < 1) { this.page = "1"; } if (FileCacheHelper.get_RedisStatOnline().Equals(1) || FileCacheHelper.get_RedisStatOnline().Equals(2)) { this.userDT = CallBLL.cz_users_bll.GetUserGDList(this.state, "gd", this.flag, this.keyword, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.namesort, this.timesort, this.uid, this.ut, "redis"); } else { this.userDT = CallBLL.cz_users_bll.GetUserGDList(this.state, "gd", this.flag, this.keyword, Convert.ToInt32(this.page) - 1, this.pageSize, ref this.pageCount, ref this.dataCount, this.namesort, this.timesort, this.uid, this.ut); } this.FiledValue = new string[] { this.lid, this.ml, this.state, this.flag, this.namesort, this.timesort, this.keyword, this.uid, this.ut, this.sortNameState, this.sortTypeState }; }
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"] = "******"; } } } } }
private void getMemberDetail(ref string strResult) { bool flag2; bool flag3; base.checkLoginByHandler(0); this.r_u_id = LSRequest.qq("uid"); string str = LSRequest.qq("memberId"); string str2 = LSRequest.qq("submitType"); if (str != "zd") { base.Response.End(); } ReturnResult result = new ReturnResult(); Dictionary <string, object> dictionary = new Dictionary <string, object>(); new List <object>(); string str3 = this.Session["user_name"].ToString(); agent_userinfo_session _session = this.Session[str3 + "lottery_session_user_info"] as agent_userinfo_session; if (!Utils.IsGuid(this.r_u_id)) { base.Response.End(); } if ((!_session.get_u_type().Trim().Equals("zj") && !_session.get_u_type().Trim().Equals("fgs")) && !_session.get_u_type().Trim().Equals("gd")) { base.noRightOptMsg(); } base.checkCloneRight(); 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(); } } cz_users userInfoByUID = CallBLL.cz_users_bll.GetUserInfoByUID(this.r_u_id, str); if (userInfoByUID == null) { base.Response.End(); } bool flag = base.is_locked_user(userInfoByUID.get_retry_times().ToString()); Dictionary <string, string> dictionary2 = new Dictionary <string, string>(); Dictionary <string, string> dictionary3 = new Dictionary <string, string>(); DataTable editGD = CallBLL.cz_rate_six_bll.GetEditGD(this.r_u_id, ref dictionary2); DataTable table3 = CallBLL.cz_rate_kc_bll.GetEditGD(this.r_u_id, ref dictionary3); if ((editGD == null) || (table3 == null)) { base.Response.End(); } this.d_u_name = editGD.Rows[0]["u_name"].ToString(); this.d_u_type = editGD.Rows[0]["u_type"].ToString(); this.d_u_nicker = editGD.Rows[0]["u_nicker"].ToString(); this.d_a_state = editGD.Rows[0]["a_state"].ToString(); this.d_allow_view_report = editGD.Rows[0]["allow_view_report"].ToString(); this.d_six_credit = string.Format("{0:F0}", Convert.ToDouble(editGD.Rows[0]["six_credit"].ToString())); this.d_six_usable_credit = string.Format("{0:F0}", Convert.ToDouble(editGD.Rows[0]["six_usable_credit"].ToString())); this.d_six_rate = editGD.Rows[0]["six_rate"].ToString(); this.d_six_allow_sale = editGD.Rows[0]["allow_sale"].ToString(); this.d_six_allow_maxrate = editGD.Rows[0]["six_allow_maxrate"].ToString(); this.d_six_low_maxrate = editGD.Rows[0]["six_low_maxrate"].ToString(); if (string.IsNullOrEmpty(editGD.Rows[0]["six_kind"])) { this.d_six_kind = "0"; } else { this.d_six_kind = editGD.Rows[0]["six_kind"].ToString(); } if (string.IsNullOrEmpty(editGD.Rows[0]["six_iscash"])) { this.d_six_iscash = "0"; } else { this.d_six_iscash = editGD.Rows[0]["six_iscash"].ToString(); } this.d_six_ExistsBet = CallBLL.cz_bet_six_bll.ExistsBetByUserName(this.d_u_type, this.d_u_name); this.d_six_OpenPhase = CallBLL.cz_phase_six_bll.IsOpenPhase(); this.d_up_u_name = dictionary2["u_name"]; this.d_up_u_nicker = dictionary2["u_nicker"]; this.d_up_u_type = dictionary2["u_type"]; this.d_up_six_allow_sale = dictionary2["six_allow_sale"]; this.d_up_six_usable_credit = dictionary2["six_usable_credit"]; this.d_maxRate_six = Convert.ToDouble(dictionary2["six_maxRate"].ToString()); this.d_downRate_six = Convert.ToDouble(dictionary2["six_downRate"].ToString()); this.d_kc_credit = string.Format("{0:F0}", Convert.ToDouble(table3.Rows[0]["kc_credit"].ToString())); this.d_kc_usable_credit = string.Format("{0:F0}", Convert.ToDouble(table3.Rows[0]["kc_usable_credit"].ToString())); this.d_kc_rate = table3.Rows[0]["kc_rate"].ToString(); this.d_kc_allow_sale = table3.Rows[0]["kc_allow_sale"].ToString(); this.d_kc_allow_maxrate = table3.Rows[0]["kc_allow_maxrate"].ToString(); this.d_kc_low_maxrate = table3.Rows[0]["kc_low_maxrate"].ToString(); if (string.IsNullOrEmpty(table3.Rows[0]["kc_kind"])) { this.d_kc_kind = "0"; } else { this.d_kc_kind = table3.Rows[0]["kc_kind"].ToString(); } if (string.IsNullOrEmpty(table3.Rows[0]["kc_iscash"])) { this.d_kc_iscash = "0"; } else { this.d_kc_iscash = table3.Rows[0]["kc_iscash"].ToString(); } this.d_kc_ExistsBet = CallBLL.cz_bet_kc_bll.ExistsBetByUserName(this.d_u_type, this.d_u_name); this.d_kc_OpenPhase = base.IsOpenPhase_KC(); this.d_up_kc_allow_sale = dictionary3["kc_allow_sale"]; this.d_up_kc_usable_credit = dictionary3["kc_usable_credit"]; this.d_maxRate_kc = Convert.ToDouble(dictionary3["kc_maxRate"].ToString()); this.d_downRate_kc = Convert.ToDouble(dictionary3["kc_downRate"].ToString()); if (this.d_u_name.Equals(_session.get_u_name())) { base.noRightOptMsg(); } if (!base.IsUpperLowerLevels(this.d_u_name, _session.get_u_type(), _session.get_u_name())) { base.noRightOptMsg(); } base.OpenLotteryMaster(out flag2, out flag3); if (str2 == "view") { if (flag2 && flag3) { int num2 = (this.d_six_ExistsBet && this.d_six_OpenPhase) ? 0 : 1; int num3 = (this.d_kc_ExistsBet && this.d_kc_OpenPhase) ? 0 : 1; Dictionary <string, object> dictionary4 = new Dictionary <string, object>(); dictionary4.Add("disabledKc", num3.ToString()); dictionary4.Add("disabledSix", num2.ToString()); dictionary4.Add("supName", this.d_up_u_name); dictionary4.Add("supNameNicker", this.d_up_u_nicker); dictionary4.Add("name", this.d_u_name); dictionary4.Add("isLocked", flag ? "1" : "0"); dictionary4.Add("userState", this.d_a_state); dictionary4.Add("nicker", this.d_u_nicker); dictionary4.Add("userCreditSix", this.d_six_credit); dictionary4.Add("recoverCreditSix", this.d_six_usable_credit); dictionary4.Add("supCreditSix", string.Format("{0:F0}", Convert.ToDouble(this.d_up_six_usable_credit))); dictionary4.Add("userRateSix", this.d_six_rate); dictionary4.Add("maxRateSix", this.d_maxRate_six.ToString()); dictionary4.Add("allowMaxRateSix", this.d_six_allow_maxrate); dictionary4.Add("downRateSix", this.d_downRate_six.ToString()); dictionary4.Add("userAllowSaleSix", this.d_six_allow_sale); dictionary4.Add("userKindSix", this.d_six_kind); dictionary4.Add("isCashSix", this.d_six_iscash); dictionary4.Add("userCreditKc", this.d_kc_credit); dictionary4.Add("recoverCreditKc", this.d_kc_usable_credit); dictionary4.Add("supCreditKc", string.Format("{0:F0}", Convert.ToDouble(this.d_up_kc_usable_credit))); dictionary4.Add("userRateKc", this.d_kc_rate); dictionary4.Add("maxRateKc", this.d_maxRate_kc.ToString()); dictionary4.Add("allowMaxRateKc", this.d_kc_allow_maxrate); dictionary4.Add("downRateKc", this.d_downRate_kc.ToString()); dictionary4.Add("userAllowSaleKc", this.d_kc_allow_sale); dictionary4.Add("userKindKc", this.d_kc_kind); dictionary4.Add("isCashKc", this.d_kc_iscash); dictionary4.Add("date", userInfoByUID.get_add_date()); dictionary = dictionary4; } else if (flag2) { int num4 = (this.d_six_ExistsBet && this.d_six_OpenPhase) ? 0 : 1; Dictionary <string, object> dictionary5 = new Dictionary <string, object>(); dictionary5.Add("disabledSix", num4.ToString()); dictionary5.Add("supName", this.d_up_u_name); dictionary5.Add("supNameNicker", this.d_up_u_nicker); dictionary5.Add("name", this.d_u_name); dictionary5.Add("isLocked", flag ? "1" : "0"); dictionary5.Add("userState", this.d_a_state); dictionary5.Add("nicker", this.d_u_nicker); dictionary5.Add("userCreditSix", this.d_six_credit); dictionary5.Add("recoverCreditSix", this.d_six_usable_credit); dictionary5.Add("supCreditSix", string.Format("{0:F0}", Convert.ToDouble(this.d_up_six_usable_credit))); dictionary5.Add("userRateSix", this.d_six_rate); dictionary5.Add("maxRateSix", this.d_maxRate_six.ToString()); dictionary5.Add("allowMaxRateSix", this.d_six_allow_maxrate); dictionary5.Add("downRateSix", this.d_downRate_six.ToString()); dictionary5.Add("userAllowSaleSix", this.d_six_allow_sale); dictionary5.Add("userKindSix", this.d_six_kind); dictionary5.Add("isCashSix", this.d_six_iscash); dictionary5.Add("date", userInfoByUID.get_add_date()); dictionary = dictionary5; } else if (flag3) { int num5 = (this.d_kc_ExistsBet && this.d_kc_OpenPhase) ? 0 : 1; Dictionary <string, object> dictionary6 = new Dictionary <string, object>(); dictionary6.Add("disabledKc", num5.ToString()); dictionary6.Add("supName", this.d_up_u_name); dictionary6.Add("supNameNicker", this.d_up_u_nicker); dictionary6.Add("name", this.d_u_name); dictionary6.Add("isLocked", flag ? "1" : "0"); dictionary6.Add("userState", this.d_a_state); dictionary6.Add("nicker", this.d_u_nicker); dictionary6.Add("userCreditKc", this.d_kc_credit); dictionary6.Add("recoverCreditKc", this.d_kc_usable_credit); dictionary6.Add("supCreditKc", string.Format("{0:F0}", Convert.ToDouble(this.d_up_kc_usable_credit))); dictionary6.Add("userRateKc", this.d_kc_rate); dictionary6.Add("maxRateKc", this.d_maxRate_kc.ToString()); dictionary6.Add("allowMaxRateKc", this.d_kc_allow_maxrate); dictionary6.Add("downRateKc", this.d_downRate_kc.ToString()); dictionary6.Add("userAllowSaleKc", this.d_kc_allow_sale); dictionary6.Add("userKindKc", this.d_kc_kind); dictionary6.Add("isCashKc", this.d_kc_iscash); dictionary6.Add("date", userInfoByUID.get_add_date()); dictionary = dictionary6; } result.set_success(200); result.set_data(dictionary); strResult = base.ObjectToJson(result); } else if ((str2 == "edit") && !string.IsNullOrEmpty(this.d_u_name)) { this.AddUser(); } }
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=u100014&url=&issuccess=1&isback=0"); } base.Permission_Aspx_ZJ(model, "po_3_1"); if (base.IsChildSync()) { base.Response.Redirect("../MessagePage.aspx?code=u100080&url=&issuccess=1&isback=0"); } if (base.En_Balance_Lock(false).Equals("300")) { base.Response.Redirect("/MessagePage.aspx?code=u100082&url=&issuccess=1&isback=0&isopen=0"); base.Response.End(); } DataTable maxPhase = CallBLL.cz_phase_six_bll.GetMaxPhase(); if (maxPhase == null) { base.Response.Write(base.ShowDialogBox("獎期錯誤!", "", 400)); base.Response.End(); } this.lid = LSRequest.qq("lid"); this.pid = LSRequest.qq("pid"); this.again = maxPhase.Rows[0]["is_opendata"].ToString(); if (LSRequest.qq("hdnadd").Equals("add")) { this.pid = LSRequest.qq("hdnpid"); this.lid = LSRequest.qq("hdnlid"); string message = ""; if (!this.ValidParam(ref message)) { base.Response.Write(base.ShowDialogBox(message, "", 400)); base.Response.End(); } else { if (maxPhase.Rows[0]["p_id"].ToString() != this.pid) { base.Response.Write(base.ShowDialogBox("獎期錯誤!", "", 400)); base.Response.End(); } cz_phase_six _six = new cz_phase_six(); _six.set_p_id(Convert.ToInt32(this.pid)); _six.set_n1((this.CoverString(LSRequest.qq("zm1")).Equals("00") || this.CoverString(LSRequest.qq("zm1")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm1"))); _six.set_n2((this.CoverString(LSRequest.qq("zm2")).Equals("00") || this.CoverString(LSRequest.qq("zm2")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm2"))); _six.set_n3((this.CoverString(LSRequest.qq("zm3")).Equals("00") || this.CoverString(LSRequest.qq("zm3")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm3"))); _six.set_n4((this.CoverString(LSRequest.qq("zm4")).Equals("00") || this.CoverString(LSRequest.qq("zm4")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm4"))); _six.set_n5((this.CoverString(LSRequest.qq("zm5")).Equals("00") || this.CoverString(LSRequest.qq("zm5")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm5"))); _six.set_n6((this.CoverString(LSRequest.qq("zm6")).Equals("00") || this.CoverString(LSRequest.qq("zm6")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("zm6"))); _six.set_sn((this.CoverString(LSRequest.qq("tm")).Equals("00") || this.CoverString(LSRequest.qq("tm")).Equals("0")) ? "" : this.CoverString(LSRequest.qq("tm"))); if (!string.IsNullOrEmpty(_six.get_sn())) { _six.set_zodiac_sn(this.GetZodiacNameString(_six.get_sn())); } if (!string.IsNullOrEmpty(_six.get_n1())) { _six.set_zodiac_n1(this.GetZodiacNameString(_six.get_n1())); } if (!string.IsNullOrEmpty(_six.get_n2())) { _six.set_zodiac_n2(this.GetZodiacNameString(_six.get_n2())); } if (!string.IsNullOrEmpty(_six.get_n3())) { _six.set_zodiac_n3(this.GetZodiacNameString(_six.get_n3())); } if (!string.IsNullOrEmpty(_six.get_n4())) { _six.set_zodiac_n4(this.GetZodiacNameString(_six.get_n4())); } if (!string.IsNullOrEmpty(_six.get_n5())) { _six.set_zodiac_n5(this.GetZodiacNameString(_six.get_n5())); } if (!string.IsNullOrEmpty(_six.get_n6())) { _six.set_zodiac_n6(this.GetZodiacNameString(_six.get_n6())); } if (!CallBLL.cz_phase_six_bll.UpdatePhaseCode(_six)) { base.Response.Write(base.ShowDialogBox("更新開獎碼時錯誤", "", 400)); base.Response.End(); } else { string str5 = null; if (model.get_users_child_session() != null) { str5 = model.get_users_child_session().get_u_name(); } string str6 = string.Concat(new object[] { maxPhase.Rows[0]["n1"], " , ", maxPhase.Rows[0]["n2"], " , ", maxPhase.Rows[0]["n3"], " , ", maxPhase.Rows[0]["n4"], " , ", maxPhase.Rows[0]["n5"], " , ", maxPhase.Rows[0]["n6"], " + ", maxPhase.Rows[0]["sn"] }); string str7 = _six.get_n1() + " , " + _six.get_n2() + " , " + _six.get_n3() + " , " + _six.get_n4() + " , " + _six.get_n5() + " , " + _six.get_n6() + " + " + _six.get_sn(); cz_lotteryopen_log _log = new cz_lotteryopen_log(); _log.set_phase_id(int.Parse(this.pid)); _log.set_phase(maxPhase.Rows[0]["phase"].ToString()); _log.set_u_name(str); _log.set_children_name(str5); _log.set_action("送出號碼"); _log.set_old_val(str6); _log.set_new_val(str7); _log.set_ip(LSRequest.GetIP()); _log.set_add_time(DateTime.Now); if (maxPhase.Rows[0]["is_opendata"].ToString().Equals("1")) { _log.set_note(string.Format("【本期編號:{0}】重新開獎", _log.get_phase())); } else { _log.set_note(string.Format("【本期編號:{0}】開獎", _log.get_phase())); } _log.set_type_id(0); _log.set_lottery_id(100); CallBLL.cz_lotteryopen_log_bll.Insert(_log); base.Response.Write(string.Format("<script>location.href='Lottery_Open.aspx?pid={0}&lid={1}';</script>", this.pid, this.lid)); base.Response.End(); } } } this.phaseModel = CallBLL.cz_phase_six_bll.GetPhaseModel(Convert.ToInt32(this.pid)); if (this.phaseModel == null) { base.Response.Redirect("../MessagePage.aspx?code=u100008&url=&issuccess=1&isback=0"); } }