public Cps(Users user) { this.User = user; this.ID = -1L; this.SiteID = user.SiteID; this.OwnerUserID = user.ID; this.Name = ""; this.Url = ""; this.LogoUrl = ""; this.BonusScale = 0.0; this.ON = false; this.IsShow = true; this.Company = ""; this.Address = ""; this.PostCode = ""; this.ResponsiblePerson = ""; this.ContactPerson = ""; this.Telephone = ""; this.Fax = ""; this.Mobile = ""; this.Email = ""; this.QQ = ""; this.ServiceTelephone = ""; this.MD5Key = ""; this.Type = -1; this.DomainName = ""; this.ParentID = -1L; this.OperatorID = 1L; this.CommendID = -1L; this.DateTime = System.DateTime.Now; this.Content = null; }
protected override void OnLoad(EventArgs e) { this.AlipayLoginSrcUrl = base.ResolveUrl("~/Home/Room/images/zfb_button2.jpg"); this.LoginTopSrcUrl = base.ResolveUrl("~/Home/Room/images/login_top.jpg"); this.LoginBackSrcUrl = base.ResolveUrl("~/Home/Room/images/login_back.jpg"); this.RegisterUrl = base.ResolveUrl("~/UserReg.aspx"); this.ForgetPwdUrl = base.ResolveUrl("~/Home/Room/ForgetPassword.aspx"); this.AlipayLoginUrl = base.ResolveUrl("~/Home/Room/Login.aspx"); this.LoginIframeUrl = base.ResolveUrl("~/Home/Room/UserLoginDialog.aspx"); this._Site = new Sites()[1L]; this._User = Users.GetCurrentUser(this._Site.ID); base.OnLoad(e); }
private void Buy(Users _User) { string request = Shove._Web.Utility.GetRequest("HidIsuseID"); string str2 = Shove._Web.Utility.GetRequest("HidIsuseEndTime"); string str3 = Shove._Web.Utility.GetRequest("playType"); Shove._Web.Utility.GetRequest("CoBuy"); string s = Shove._Web.Utility.GetRequest("tb_Share"); string str5 = Shove._Web.Utility.GetRequest("tb_BuyShare"); Shove._Web.Utility.GetRequest("tb_AssureShare"); string str6 = Shove._Web.Utility.GetRequest("tb_OpenUserList"); string str7 = Shove._Web.Utility.GetRequest("tb_Title"); string str8 = Shove._Web.Utility.GetRequest("tb_Description"); string str9 = Shove._Web.Utility.GetRequest("SecrecyLevel"); string str10 = Shove._Web.Utility.FilteSqlInfusion(base.Request["tb_LotteryNumber"]); string str11 = Shove._Web.Utility.GetRequest("tb_hide_SumMoney"); string str12 = Shove._Web.Utility.GetRequest("tb_hide_AssureMoney"); string str13 = Shove._Web.Utility.GetRequest("tb_hide_SumNum"); string str14 = Shove._Web.Utility.GetRequest("HidLotteryID"); string str15 = Shove._Web.Utility.GetRequest("tb_Multiple"); string str16 = Shove._Web.Utility.GetRequest("tb_SchemeBonusScale"); string str17 = Shove._Web.Utility.GetRequest("tbPlayTypeID"); string str18 = Shove._Web.Utility.GetRequest("tb_SchemeMoney"); int num = 2; if (str15 == "") { str15 = "1"; } double money = 0.0; int share = 0; int buyShare = 0; double assureMoney = 0.0; int multiple = 0; int num7 = 0; short num8 = 0; int playType = 0; int num10 = 0; long isuseID = 0L; double schemeBonusScale = 0.0; try { money = double.Parse(str11); share = int.Parse(s); buyShare = int.Parse(str5); assureMoney = double.Parse(str12); multiple = int.Parse(str15); num7 = int.Parse(str13); num8 = short.Parse(str9); playType = int.Parse(str17); num10 = int.Parse(str14); isuseID = long.Parse(request); schemeBonusScale = double.Parse(str16); } catch { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); return; } if (str17 != str3) { money = double.Parse(str18); } if ((money > 0.0) && ((num7 >= 1) || !(str17 == str3))) { if (assureMoney < 0.0) { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); } else if (share < 1) { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); } else { if ((buyShare == share) && (assureMoney == 0.0)) { share = 1; buyShare = 1; } if ((money / ((double)share)) < 1.0) { JavaScript.Alert(this.Page, "每份金额最低不能少于 1 元。"); } else { double num13 = (buyShare * (money / ((double)share))) + assureMoney; if (num13 > _User.Balance) { this.SaveDataForAliBuy(); } else if (num13 > 10000000.0) { JavaScript.Alert(this.Page, "投注金额不能大于" + 0x989680.ToString() + ",谢谢。"); } else if (multiple > 0x3e7) { JavaScript.Alert(this.Page, "投注倍数不能大于 999 倍,谢谢。"); } else if ((schemeBonusScale < 0.0) && (schemeBonusScale > 10.0)) { JavaScript.Alert(this.Page, "佣金比例只能在0~10之间"); } else if ((schemeBonusScale.ToString().IndexOf("-") > -1) || (schemeBonusScale.ToString().IndexOf(".") > -1)) { JavaScript.Alert(this.Page, "佣金比例输入有误"); } else { schemeBonusScale /= 100.0; string number = str10; if (str17 == str3) { if (number[number.Length - 1] == '\n') { number = number.Substring(0, number.Length - 1); } SLS.Lottery lottery = new SLS.Lottery(); string[] strArray = this.SplitLotteryNumber(number); if ((strArray == null) || (strArray.Length < 1)) { JavaScript.Alert(this.Page, "选号发生异常,请重新选择号码投注,谢谢。(-694)"); return; } int num15 = 0; foreach (string str20 in strArray) { string str21 = lottery[num10].AnalyseScheme(str20, playType); if (!string.IsNullOrEmpty(str21)) { string[] strArray3 = str21.Split(new char[] { '|' }); if ((strArray3 != null) && (strArray3.Length >= 1)) { num15 += _Convert.StrToInt(strArray3[strArray3.Length - 1], 0); } } } if (num15 != num7) { JavaScript.Alert(this.Page, "选号发生异常,请重新选择号码投注,谢谢。"); return; } } string returnDescription = ""; if (DateTime.Now >= _Convert.StrToDateTime(str2.Replace("/", "-"), DateTime.Now.AddDays(-1.0).ToString())) { JavaScript.Alert(this.Page, "本期投注已截止,谢谢。"); } else if ((str3 == str17) && (((num * num7) * multiple) != money)) { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); } else { long num17 = _User.InitiateScheme(isuseID, playType, (str7.Trim() == "") ? "(无标题)" : str7.Trim(), str8.Trim(), number, "", multiple, money, assureMoney, share, buyShare, str6.Trim(), short.Parse(num8.ToString()), schemeBonusScale, ref returnDescription); if (num17 < 0L) { PF.GoError(1, returnDescription, base.GetType().FullName + "(-755)"); } else { Shove._Web.Cache.ClearCache("Home_Room_CoBuy_BindDataForType" + isuseID.ToString()); Shove._Web.Cache.ClearCache("Home_Room_SchemeAll_BindData" + isuseID.ToString()); if ((money > 50.0) && (share > 1)) { Shove._Web.Cache.ClearCache("Home_Room_JoinAllBuy_BindData"); } base.Response.Redirect("../Home/Room/UserBuySuccess.aspx?LotteryID=" + num10.ToString() + "&&Money=" + num13.ToString() + "&SchemeID=" + num17.ToString()); } } } } } } else { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); } }
private void Buy(Users _User) { string request = Shove._Web.Utility.GetRequest("HidIsuseID"); string str2 = Shove._Web.Utility.GetRequest("HidIsuseEndTime"); string s = Shove._Web.Utility.GetRequest("playType"); string str4 = Shove._Web.Utility.GetRequest("Chase"); Shove._Web.Utility.GetRequest("CoBuy"); string str5 = Shove._Web.Utility.GetRequest("tb_Share"); string str6 = Shove._Web.Utility.GetRequest("tb_BuyShare"); Shove._Web.Utility.GetRequest("tb_AssureShare"); string str7 = Shove._Web.Utility.GetRequest("tb_OpenUserList"); string str8 = Shove._Web.Utility.GetRequest("tb_Title"); string str9 = Shove._Web.Utility.GetRequest("tb_Description"); string str10 = Shove._Web.Utility.GetRequest("tbAutoStopAtWinMoney"); string str11 = Shove._Web.Utility.GetRequest("SecrecyLevel"); string str12 = Shove._Web.Utility.FilteSqlInfusion(base.Request["tb_LotteryNumber"]); string str13 = Shove._Web.Utility.GetRequest("tb_hide_SumMoney"); string str14 = Shove._Web.Utility.GetRequest("tb_hide_AssureMoney"); string str15 = Shove._Web.Utility.GetRequest("tb_hide_SumNum"); Shove._Web.Utility.GetRequest("HidIsuseCount"); string str16 = Shove._Web.Utility.GetRequest("HidLotteryID"); Shove._Web.Utility.GetRequest("HidIsAlipay"); string str17 = Shove._Web.Utility.GetRequest("tb_Multiple"); Shove._Web.Utility.GetRequest("HidIsuseName"); Shove._Web.Utility.GetRequest("tbPlayTypeName"); string str18 = Shove._Web.Utility.GetRequest("tb_hide_ChaseBuyedMoney"); string str19 = Shove._Web.Utility.GetRequest("tb_SchemeBonusScale"); string str20 = Shove._Web.Utility.GetRequest("tb_SchemeBonusScalec"); int num = 2; if (str17 == "") { str17 = "1"; } double money = 0.0; int share = 0; int buyShare = 0; double assureMoney = 0.0; int multiple = 0; int num7 = 0; short num8 = 0; int playType = 0; int lotteryID = 0; long isuseID = 0L; double stopWhenWinMoney = 0.0; double schemeBonusScale = 0.0; double schemeBonusScalec = 0.0; try { money = double.Parse(str13); share = int.Parse(str5); buyShare = int.Parse(str6); assureMoney = double.Parse(str14); multiple = int.Parse(str17); num7 = int.Parse(str15); num8 = short.Parse(str11); playType = int.Parse(s); lotteryID = int.Parse(str16); isuseID = long.Parse(request); stopWhenWinMoney = double.Parse(str10); schemeBonusScale = double.Parse(str19); schemeBonusScalec = double.Parse(str20); } catch { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); return; } if ((money > 0.0) && (num7 >= 1)) { if (assureMoney < 0.0) { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); } else if (share < 1) { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); } else { if ((buyShare == share) && (assureMoney == 0.0)) { share = 1; buyShare = 1; } if ((money / ((double)share)) < 1.0) { JavaScript.Alert(this.Page, "每份金额最低不能少于 1 元。"); } else { double num15 = (buyShare * (money / ((double)share))) + assureMoney; if (str4 != "") { num15 = double.Parse(str18); } if (num15 > _User.Balance) { this.SaveDataForAliBuy(); } else if (num15 > 10000000.0) { JavaScript.Alert(this.Page, "投注金额不能大于" + 0x989680.ToString() + ",谢谢。"); } else if (multiple > 0x3e7) { JavaScript.Alert(this.Page, "投注倍数不能大于 999 倍,谢谢。"); } else if ((schemeBonusScale < 0.0) && (schemeBonusScale > 10.0)) { JavaScript.Alert(this.Page, "佣金比例只能在0~10之间"); } else if ((schemeBonusScale.ToString().IndexOf("-") > -1) || (schemeBonusScale.ToString().IndexOf(".") > -1)) { JavaScript.Alert(this.Page, "佣金比例输入有误"); } else if ((schemeBonusScalec < 0.0) && (schemeBonusScalec > 10.0)) { JavaScript.Alert(this.Page, "佣金比例只能在0~10之间"); } else if ((schemeBonusScalec.ToString().IndexOf("-") > -1) || (schemeBonusScalec.ToString().IndexOf(".") > -1)) { JavaScript.Alert(this.Page, "佣金比例输入有误"); } else { schemeBonusScale /= 100.0; schemeBonusScalec /= 100.0; string number = str12; if (number[number.Length - 1] == '\n') { number = number.Substring(0, number.Length - 1); } SLS.Lottery lottery = new SLS.Lottery(); string[] strArray = this.SplitLotteryNumber(number); if ((strArray == null) || (strArray.Length < 1)) { JavaScript.Alert(this.Page, "选号发生异常,请重新选择号码投注,谢谢。(-694)"); } else { int num17 = 0; foreach (string str22 in strArray) { string str23 = lottery[lotteryID].AnalyseScheme(str22, playType); if (!string.IsNullOrEmpty(str23)) { string[] strArray3 = str23.Split(new char[] { '|' }); if ((strArray3 != null) && (strArray3.Length >= 1)) { num17 += _Convert.StrToInt(strArray3[strArray3.Length - 1], 0); } } } if (num17 != num7) { JavaScript.Alert(this.Page, "选号发生异常,请重新选择号码投注,谢谢。"); } else { StringBuilder builder = new StringBuilder(); int num19 = 0; string detailXML = ""; string returnDescription = ""; if (str4 == "1") { foreach (string str26 in base.Request.Form.AllKeys) { if (str26.IndexOf("check") > -1) { int num20 = _Convert.StrToInt(str26.Replace("check", ""), -1); if (num20 > 0) { num19++; int num21 = (_Convert.StrToInt(base.Request.Form["tb_hide_SumNum"], -1) * num) * _Convert.StrToInt(base.Request.Form["times" + num20.ToString()], -1); builder.Append(base.Request.Form[str26]).Append(",").Append(base.Request.Form["times" + num20.ToString()]).Append(",").Append(num21.ToString()).Append(",").Append(base.Request.Form["share" + num20.ToString()]).Append(",").Append(base.Request.Form["buyedShare" + num20.ToString()]).Append(",").Append(base.Request.Form["assureShare" + num20.ToString()]).Append(";"); } } } if (builder.Length > 0) { builder.Remove(builder.Length - 1, 1); } if (number[number.Length - 1] == '\n') { number = number.Substring(0, number.Length - 1); } try { money = double.Parse(str13); } catch { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。(-1325)"); return; } if (money < 2.0) { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。(-1332)"); } else { string[] strArray5 = builder.ToString().Split(new char[] { ';' }); int length = strArray5.Length; string[] str = new string[length * 9]; DateTime time2 = DateTime.Parse(Functions.F_GetIsuseSystemEndTime(long.Parse(strArray5[0].Split(new char[] { ',' })[0]), playType).ToString()); if (DateTime.Now >= time2) { JavaScript.Alert(this.Page, "您选择的追号期号中包含已截止的期,请重新选择。"); } else { for (int i = 0; i < length; i++) { str[i * 9] = strArray5[i].Split(new char[] { ',' })[0]; str[(i * 9) + 1] = playType.ToString(); str[(i * 9) + 2] = number; str[(i * 9) + 3] = strArray5[i].Split(new char[] { ',' })[1]; str[(i * 9) + 4] = strArray5[i].Split(new char[] { ',' })[2]; str[(i * 9) + 5] = num8.ToString(); str[(i * 9) + 6] = strArray5[i].Split(new char[] { ',' })[3]; str[(i * 9) + 7] = strArray5[i].Split(new char[] { ',' })[4]; str[(i * 9) + 8] = strArray5[i].Split(new char[] { ',' })[5]; if ((_Convert.StrToDouble(str[(i * 9) + 3], 0.0) * money) != _Convert.StrToDouble(str[(i * 9) + 4], 1.0)) { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); return; } if (_Convert.StrToDouble(str[(i * 9) + 3], 0.0) < multiple) { JavaScript.Alert(this.Page, "追号倍数有错误,请仔细检查!"); return; } if (((double.Parse(str[(i * 9) + 3]) * num7) * num) != double.Parse(str[(i * 9) + 4])) { JavaScript.Alert(this.Page, "追号金额有错误,请仔细检查!可能原因:浏览器不兼容,建议使用IE 7.0"); return; } } detailXML = PF.BuildIsuseAdditionasXmlForBJKL8(str); if (detailXML == "") { JavaScript.Alert(this.Page, "追号发生错误。"); } else if (_User.InitiateChaseTask(str8.Trim(), str9.Trim(), lotteryID, stopWhenWinMoney, detailXML, number, schemeBonusScalec, ref returnDescription) < 0) { PF.GoError(1, returnDescription, base.GetType().FullName + "(-754)"); } else { Shove._Web.Cache.ClearCache("Home_Room_CoBuy_BindDataForType" + isuseID.ToString()); Shove._Web.Cache.ClearCache("Home_Room_SchemeAll_BindData" + isuseID.ToString()); Shove._Web.Cache.ClearCache(base._Site.ID.ToString() + "AccountFreezeDetail_" + _User.ID.ToString()); base.Response.Redirect("../Home/Room/UserBuySuccess.aspx?LotteryID=" + lotteryID.ToString() + "&Type=2&Money=" + num15.ToString()); } } } } else if (DateTime.Now >= _Convert.StrToDateTime(str2.Replace("/", "-"), DateTime.Now.AddDays(-1.0).ToString())) { JavaScript.Alert(this.Page, "本期投注已截止,谢谢。"); } else if (((num * num7) * multiple) != money) { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); } else { long num25 = _User.InitiateScheme(isuseID, playType, (str8.Trim() == "") ? "(无标题)" : str8.Trim(), str9.Trim(), number, "", multiple, money, assureMoney, share, buyShare, str7.Trim(), short.Parse(num8.ToString()), schemeBonusScale, ref returnDescription); if (num25 < 0L) { PF.GoError(1, returnDescription, base.GetType().FullName + "(-755)"); } else { Shove._Web.Cache.ClearCache("Home_Room_CoBuy_BindDataForType" + isuseID.ToString()); Shove._Web.Cache.ClearCache("Home_Room_SchemeAll_BindData" + isuseID.ToString()); if ((money > 50.0) && (share > 1)) { Shove._Web.Cache.ClearCache("Home_Room_JoinAllBuy_BindData"); } base.Response.Redirect("../Home/Room/UserBuySuccess.aspx?LotteryID=" + lotteryID.ToString() + "&Money=" + num15.ToString() + "&SchemeID=" + num25.ToString()); } } } } } } } } else { JavaScript.Alert(this.Page, "输入有错误,请仔细检查。"); } }
public static void SendWinNotification(DataSet ds) { if (ds != null) { for (int i = 0; i < ds.Tables.Count; i++) { DataTable table = ds.Tables[i]; if (table.Rows.Count >= 1) { long siteID = long.Parse(table.Rows[0]["SiteID"].ToString()); bool flag = Functions.F_GetSiteSendNotificationTypes(siteID, 2).IndexOf("[Win]") >= 0; bool flag2 = Functions.F_GetSiteSendNotificationTypes(siteID, 1).IndexOf("[Win]") >= 0; bool flag3 = Functions.F_GetSiteSendNotificationTypes(siteID, 3).IndexOf("[Win]") >= 0; if ((flag || flag2) || flag3) { Sites site = new Sites()[siteID]; if (site != null) { string subject = ""; string body = ""; if (flag) { site.SiteNotificationTemplates.SplitEmailTemplate(site.SiteNotificationTemplates[2, "Win"], ref subject, ref body); } string str3 = ""; if (flag2) { str3 = site.SiteNotificationTemplates[1, "Win"]; } string str4 = ""; if (flag3) { str4 = site.SiteNotificationTemplates[3, "Win"]; } if (((subject != "") && (body != "")) || ((str3 != "") || (str4 != ""))) { for (int j = 0; j < table.Rows.Count; j++) { DataRow row = table.Rows[j]; Users users = new Users(site.ID)[site.ID, long.Parse(row["UserID"].ToString())]; if (users != null) { if (((flag && (subject != "")) && ((body != "") && (users.Email != ""))) && Functions.F_GetIsSendNotification(site.ID, 2, "Win", users.ID)) { string str5 = subject.Replace("[UserName]", users.Name); string str6 = body.Replace("[UserName]", users.Name).Replace("[SchemeID]", row["SchemeID"].ToString()).Replace("[Money]", double.Parse(row["WinMoney"].ToString()).ToString("N")); SendEmail(site, users.Email, str5, str6); } if (((flag2 && (str4 != "")) && ((users.Mobile != "") && users.isMobileValided)) && Functions.F_GetIsSendNotification(site.ID, 1, "Win", users.ID)) { string content = str4.Replace("[UserName]", users.Name).Replace("[SchemeID]", row["SchemeID"].ToString()).Replace("[Money]", double.Parse(row["WinMoney"].ToString()).ToString("N")); SendSMS(site, users.ID, users.Mobile, content); } if ((flag3 && (str4 != "")) && Functions.F_GetIsSendNotification(site.ID, 3, "Win", users.ID)) { string str8 = str4.Replace("[UserName]", users.Name).Replace("[SchemeID]", row["SchemeID"].ToString()).Replace("[Money]", double.Parse(row["WinMoney"].ToString()).ToString("N")); SendStationSMS(site, site.AdministratorID, users.ID, 2, str8); } } } } } } } } } }
public int GetUserInformationByName(ref string ReturnDescription) { int returnValue = -1; ReturnDescription = ""; Users user = new Users(this.SiteID); this.Clone(user); if (Procedures.P_GetUserInformationByName(this.Name, this.SiteID, ref this._id, ref this.NickName, ref this.RealityName, ref this._password, ref this._passwordadv, ref this.CityID, ref this.Sex, ref this.BirthDay, ref this.IDCardNumber, ref this.Address, ref this.Email, ref this.isEmailValided, ref this.QQ, ref this.isQQValided, ref this.Telephone, ref this.Mobile, ref this.isMobileValided, ref this.isPrivacy, ref this.isCanLogin, ref this.RegisterTime, ref this.LastLoginTime, ref this.LastLoginIP, ref this.LoginCount, ref this.UserType, ref this.BankType, ref this.BankName, ref this.BankCardNumber, ref this.Balance, ref this.Freeze, ref this.ScoringOfSelfBuy, ref this.ScoringOfCommendBuy, ref this.Scoring, ref this.Level, ref this.CommenderID, ref this.CpsID, ref this.OwnerSites, ref this.AlipayID, ref this.Bonus, ref this.Reward, ref this.AlipayName, ref this.isAlipayNameValided, ref this.ComeFrom, ref this.isCanLogin, ref this.Memo, ref this.BonusThisMonth, ref this.BonusAllow, ref this.BonusUse, ref this.PromotionMemberBonusScale, ref this.PromotionSiteBonusScale, ref this.VisitSource, ref this.HeadUrl, ref this.SecurityQuestion, ref this.SecurityAnswer, ref this.FriendList, ref returnValue, ref ReturnDescription) < 0) { user.Clone(this); ReturnDescription = "数据库读写错误"; return -1; } if (returnValue < 0) { user.Clone(this); return returnValue; } this.cps.OwnerUserID = this.ID; ReturnDescription = ""; this.cps.GetCpsInformationByOwnerUserID(ref ReturnDescription); if ((this.cps.SiteID > 0L) && (this.cps.ID < 0L)) { ReturnDescription = ""; } return 0; }
public void Clone(Users user) { user._id = this._id; user._siteid = this._siteid; user._password = this._password; user._passwordadv = this._passwordadv; user.Name = this.Name; user.RealityName = this.RealityName; user.Sex = this.Sex; user.BirthDay = this.BirthDay; user.IDCardNumber = this.IDCardNumber; user.CityID = this.CityID; user.Address = this.Address; user.Email = this.Email; user.isEmailValided = this.isEmailValided; user.QQ = this.QQ; user.isQQValided = this.isQQValided; user.Telephone = this.Telephone; user.Mobile = this.Mobile; user.isMobileValided = this.isMobileValided; user.isPrivacy = this.isPrivacy; user.isCanLogin = this.isCanLogin; user.RegisterTime = this.RegisterTime; user.LastLoginTime = this.LastLoginTime; user.LastLoginIP = this.LastLoginIP; user.LoginCount = this.LoginCount; user.UserType = this.UserType; user.BankType = this.BankType; user.BankName = this.BankName; user.BankCardNumber = this.BankCardNumber; user.Balance = this.Balance; user.Freeze = this.Freeze; user.ScoringOfSelfBuy = this.ScoringOfSelfBuy; user.ScoringOfCommendBuy = this.ScoringOfCommendBuy; user.Scoring = this.Scoring; user.Bonus = this.Bonus; user.Reward = this.Reward; user.Level = this.Level; user.CommenderID = this.CommenderID; user.CpsID = this.CpsID; user.cps = this.cps; user.isAlipayCps = this.isAlipayCps; user.AlipayID = this.AlipayID; user.AlipayName = this.AlipayName; user.isAlipayNameValided = this.isAlipayNameValided; user.Site = this.Site; user.Competences = this.Competences; user.OwnerSites = this.OwnerSites; user.VisitSource = this.VisitSource; }
public static Users GetCurrentUser(long siteid) { string str = "SLS.Center.LoginUserID"; HttpCookie cookie = HttpContext.Current.Request.Cookies[str]; if ((cookie != null) && !string.IsNullOrEmpty(cookie.Value)) { string input = cookie.Value; try { input = Encrypt.UnEncryptString(PF.GetCallCert(), Encrypt.Decrypt3DES(PF.GetCallCert(), input, PF.DesKey)); } catch { input = ""; } long num = -1L; Users users = null; if (!string.IsNullOrEmpty(input)) { num = _Convert.StrToLong(input, -1L); if (num > 0L) { users = new Users(siteid)[siteid, num]; if (users != null) { return users; } } } } return null; }
public Users this[long siteid, string name] { get { Users users = new Users(siteid) { Name = name }; string returnDescription = ""; if (users.GetUserInformationByName(ref returnDescription) < 0) { return null; } return users; } }
protected override void OnLoad(EventArgs e) { if (!base.IsPostBack) { new FirstUrl().Save(); } this.PageUrl = base.Request.Url.AbsoluteUri; this._Site = new Sites()[1L]; if (this._Site == null) { PF.GoError(1, "域名无效,限制访问", "SitePageBase"); } else { this._User = Users.GetCurrentUser(this._Site.ID); if (this.isRequestLogin && (this._User == null)) { PF.GoLogin(this.RequestLoginPage, this.isAtFramePageLogin); } else { try { PlaceHolder holder = this.Page.FindControl("phHead") as PlaceHolder; if (holder != null) { UserControl child = this.Page.LoadControl("~/Home/Room/UserControls/WebHead.ascx") as UserControl; holder.Controls.Add(child); } PlaceHolder holder2 = this.Page.FindControl("phFoot") as PlaceHolder; if (holder2 != null) { UserControl control2 = this.Page.LoadControl("~/Home/Room/UserControls/WebFoot.ascx") as UserControl; holder2.Controls.Add(control2); } } catch { } string str = ((base.Request.Url.Query == "") ? base.Request.Url.AbsoluteUri : base.Request.Url.AbsoluteUri.Replace(base.Request.Url.Query, "")).Replace(Utility.GetUrl(), "").Replace("/", "_").Replace(".aspx", ""); if (str.StartsWith("_")) { str = str.Remove(0, 1); } if (FloatNotifyPageList.IndexOf("," + str + ",") > -1) { StringBuilder builder = new StringBuilder(); string key = "FloatNotifyContent"; DataTable cacheAsDataTable = Shove._Web.Cache.GetCacheAsDataTable(key); if (cacheAsDataTable == null) { cacheAsDataTable = new Tables.T_FloatNotify().Open("", "", "[Order] asc,[DateTime] desc"); if ((cacheAsDataTable != null) && (cacheAsDataTable.Rows.Count > 0)) { Shove._Web.Cache.SetCache(key, cacheAsDataTable, 0xea60); } } bool flag = false; int num = this._Site.SiteOptions["Opt_FloatNotifiesTime"].ToInt(3); string name = "LastLoginShowFloatNotifyUserID"; switch (num) { case 1: { HttpCookie cookie = base.Request.Cookies[name]; if ((cookie != null) && !string.IsNullOrEmpty(cookie.Value)) { flag = true; } break; } case 2: flag = DateTime.Now.Minute == 0; break; case 3: flag = true; break; } if (((cacheAsDataTable != null) && (cacheAsDataTable.Rows.Count > 0)) && flag) { DataRow[] rowArray = cacheAsDataTable.Select("isShow=1"); for (int i = 0; i < rowArray.Length; i++) { if (i == 2) { break; } int num4 = i + 1; builder.Append("<font color='" + rowArray[i]["Color"].ToString() + "'>").Append(num4.ToString()).Append(".</font>").Append("<a href='").Append(rowArray[i]["Url"].ToString()).Append("' target='_blank' style='text-decoration: none;color:").Append(rowArray[i]["Color"].ToString()).Append(";' onmouseover=\"this.style.color='#ff6600';\" onmouseout=\"this.style.color='").Append(rowArray[i]["Color"].ToString()).Append("';\">").Append(rowArray[i]["Title"].ToString()).Append("</a><br />"); } string html = HmtlManage.GetHtml(AppDomain.CurrentDomain.BaseDirectory + "Home/Web/Template/FloatNotify.html"); Label label = new Label(); int num5 = FloatNotifyTimeOut * 100; label.Text = html.Replace("$FloatNotifyTimeOut$", num5.ToString()).Replace("$FloatNotifyContent$", builder.ToString()); try { base.Form.Controls.AddAt(0, label); } catch (Exception exception) { new Log("Page").Write(str + exception.Message); } HttpCookie cookie2 = new HttpCookie(name) { Value = "", Expires = DateTime.Now.AddYears(-20) }; try { HttpContext.Current.Response.Cookies.Add(cookie2); } catch { } } } if (this.isAllowPageCache && (this.PageCacheSeconds > 0)) { base.Response.Cache.SetExpires(DateTime.Now.AddSeconds((double)this.PageCacheSeconds)); base.Response.Cache.SetCacheability(HttpCacheability.Server); base.Response.Cache.VaryByParams["*"] = true; base.Response.Cache.SetValidUntilExpires(true); base.Response.Cache.SetVaryByCustom("SitePage"); } base.OnLoad(e); } } }
public Competences(Users user) { this.User = user; }
public Competences() { this.User = null; }