public int PayOrderAdd(Dictionary <string, object> conditions) { conditions.Add("OperatingIP", GameRequest.GetUserIP()); int r = aideTreasureFacade.PayOrderAdd(conditions); return(r); }
protected void btnUpdate_Click(object sender, EventArgs e) { AccountsProtect protect = new AccountsProtect(); protect.UserID = Fetch.GetUserCookie().UserID; protect.SafeEmail = CtrlHelper.GetText(txtSafeEmail); protect.ModifyIP = GameRequest.GetUserIP(); protect.Question1 = ddlQuestion1.SelectedValue; protect.Question2 = ddlQuestion2.SelectedValue; protect.Question3 = ddlQuestion3.SelectedValue; protect.Response1 = CtrlHelper.GetText(txtMResponse1); protect.Response2 = CtrlHelper.GetText(txtMResponse2); protect.Response3 = CtrlHelper.GetText(txtMResponse3); Message umsg = accountsFacade.ModifyUserSecurity(protect); if (umsg.Success) { this.form2.Visible = false; this.divRight.Visible = true; this.divRight.InnerHtml = "<div class=\"Uright\">您已经成功修改了密码保护!</div>"; } else { Show(umsg.Content); } }
public static void Write(string content, string path) { System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); stringBuilder.Append(System.DateTime.Now); stringBuilder.Append(" 源:" + GameRequest.GetRawUrl()); stringBuilder.Append(" IP:" + GameRequest.GetUserIP()); stringBuilder.Append(" 描述:" + content + "\r\n"); string mapPath = TextUtility.GetMapPath("/Log/Error/"); if (!System.IO.Directory.Exists(mapPath)) { System.IO.Directory.CreateDirectory(mapPath); } string text = mapPath + path + ".log"; int num = 0; text = FileManager.GetCurrentLogName(mapPath, text, ref num); if (System.IO.File.Exists(text)) { System.IO.FileInfo fileInfo = new System.IO.FileInfo(text); if (fileInfo.Length > 31457280L) { text = string.Concat(new object[] { mapPath, path, "[", num, "].log" }); } } System.IO.File.AppendAllText(text, stringBuilder.ToString(), System.Text.Encoding.Unicode); }
protected void btnUpdate_Click(object sender, EventArgs e) { AccountsProtect protect = new AccountsProtect(); protect.UserID = Fetch.GetUserCookie().UserID; protect.InsurePass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtNewPass)); protect.Response1 = CtrlHelper.GetText(txtResponse1); protect.Response2 = CtrlHelper.GetText(txtResponse2); protect.Response3 = CtrlHelper.GetText(txtResponse3); protect.LastLogonIP = GameRequest.GetUserIP(); Message umsg = accountsFacade.ResetInsurePasswd(protect); if (umsg.Success) { this.form1.Visible = false; this.divRight.Visible = true; this.divRight.InnerHtml = "<div class=\"Uright\">重置银行密码成功!</div>"; } else { Show(umsg.Content); this.txtResponse1.Text = ""; this.txtResponse2.Text = ""; this.txtResponse3.Text = ""; } }
/// <summary> /// 提交留言 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnPublish_Click(object sender, EventArgs e) { string accounts = ""; if (Fetch.GetUserCookie() != null) { accounts = Fetch.GetUserCookie().Accounts; } GameFeedbackInfo info = new GameFeedbackInfo(); info.FeedbackContent = CtrlHelper.GetTextAndFilter(txtContent); info.FeedbackTitle = ""; info.ClientIP = GameRequest.GetUserIP(); Message msg = FacadeManage.aideNativeWebFacade.PublishFeedback(info, accounts); if (msg.Success) { ShowAndRedirect("感谢您的问题反馈,我们将尽快给予回复,敬请留意!", "/Service/Feedback.aspx"); } else { Show(msg.Content); } }
/// <summary> /// 注册用户 /// </summary> /// <param name="user"></param> /// <returns></returns> public static Message CheckedUserToRegister(ref Base_Users user) { //用户帐号 Message msg = GameWebRules.CheckedAccounts(user.Username); if (!msg.Success) { return(msg); } //登录密码 msg = GameWebRules.CheckedPassword(user.Password); if (!msg.Success) { return(msg); } //属性编码 user.Username = Utility.HtmlEncode(Utils.TextFilter.FilterScript(user.Username)); user.PreLogintime = DateTime.Now; user.PreLoginIP = GameRequest.GetUserIP( ); user.LastLogintime = DateTime.Now; user.LastLoginIP = user.LastLoginIP; user.AgentID = user.AgentID; user.Username = user.Username.Replace("&", "").Replace("#", ""); return(new Message(true)); }
/// <summary> /// 大厅登陆写入cookie /// </summary> public static string PalaformWriteCookie() { if (HttpContext.Current.Request.Cookies["Accounts"] != null && HttpContext.Current.Request.Cookies["Password"] != null) { string accounts = HttpContext.Current.Request.Cookies["Accounts"].Value.ToString(); string password = HttpContext.Current.Request.Cookies["Password"].Value.ToString(); password = password.Trim(); accounts = accounts.Trim(); UserInfo suInfo = new UserInfo(0, accounts, 0); suInfo.LastLogonIP = GameRequest.GetUserIP(); Message umsg = FacadeManage.aideAccountsFacade.Logon(suInfo, true); if (umsg.Success) { UserInfo ui = umsg.EntityList[0] as UserInfo; ui.LogonPass = password.Trim(); Fetch.SetUserCookie(ui.ToUserTicketInfo()); object obj = WHCache.Default.Get <CookiesCache>(AppConfig.UserLoginCacheKey); if (obj != null) { return(obj.ToString()); } } } return(""); }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request["wxPayUser"]) && !string.IsNullOrEmpty(Request["wxPayMoney"])) { //用户名 string pay_username = Request["wxPayUser"]; //支付金额(单位以分为单位,插入数据库的不边,提交到支付的要*100) string PayMoney = Request["wxPayMoney"]; //订单号 string outOrder_no = "wxzf" + DateTime.Now.ToString("yyyyMMddhhmmss"); //生成订单 int uid = accountsFacade.GetAccountsId(pay_username); OnLineOrder onlineOrder = new OnLineOrder(); onlineOrder.Accounts = pay_username; onlineOrder.UserID = uid; onlineOrder.OrderAmount = decimal.Parse(PayMoney); onlineOrder.OrderID = outOrder_no; onlineOrder.OrderStatus = 0; onlineOrder.ShareID = 20; onlineOrder.CardTotal = 1; onlineOrder.CardTypeID = 1;//卡类充值 onlineOrder.TelPhone = ""; onlineOrder.IPAddress = GameRequest.GetUserIP(); Message msg = treasureFacade.RequestOrder(onlineOrder); if (!msg.Success) { Response.Redirect("/Tips.aspx?msg=" + msg.Content); } else { //明文数据 string param = "mId=" + mId + "¬ify_url=" + notify_url + "&outOrder_no=" + outOrder_no + "&total_fee=" + (Convert.ToInt32(PayMoney) * 100).ToString(); //加密后生成的sign string sign = weixindes.Encrypt(param, pwd); //传递到支付那边的param string realparam = "agCode=" + agCode + "&sign=" + sign; //post支付信息过去,获取传递回来的数据,json格式 string ReturnVal = PostDataGetHtml(url, realparam); //解析json JObject json = JObject.Parse(ReturnVal); string result = json["result"].ToString(); result = result.Replace("\"", ""); string message = json["message"].ToString(); message = message.Replace("\"", ""); //解析result和message,只有当result=0000是才是订单成功,才允许支付,否则,则提交失败到tips.aspx页面 if (result.Equals("0000")) { Response.Redirect(message); } else { Response.Redirect("/Tips.aspx?msg=" + message); } } } //当输入信息不正确是跳到该页面 else { Response.Redirect("/Tips.aspx?msg=生成订单出错。请重试"); } }
protected void btnUpdate_Click(object sender, EventArgs e) { AccountsProtect protect = new AccountsProtect( ); protect.UserID = Fetch.GetUserCookie( ).UserID; protect.SafeEmail = TextFilter.FilterScript(txtSafeEmail.Text.Trim( )); protect.PassportID = TextFilter.FilterScript(txtPassportID.Text.Trim( )); protect.PassportType = Convert.ToByte(ddlPassportType.SelectedValue); protect.CreateIP = GameRequest.GetUserIP( ); protect.Question1 = ddlQuestion1.SelectedValue; protect.Question2 = ddlQuestion2.SelectedValue; protect.Question3 = ddlQuestion3.SelectedValue; protect.Response1 = TextFilter.FilterScript(txtResponse1.Text.Trim( )); protect.Response2 = TextFilter.FilterScript(txtResponse2.Text.Trim( )); protect.Response3 = TextFilter.FilterScript(txtResponse3.Text.Trim( )); Message umsg = accountsFacade.ApplyUserSecurity(protect); if (umsg.Success) { this.form1.Visible = false; this.divRight.Visible = true; } else { Show(umsg.Content); } }
public JsonResult DaiFuFailed(string orderId, string refreso) { if (string.IsNullOrEmpty(orderId)) { return(Json(new { IsOk = false, Msg = "参数错误!" })); } string a = DaiFu.Query_youmifu(orderId); if (a == "SUCCESS") { return(Json(new { IsOk = false, Msg = "该订单交易成功或者已受理,无法拒绝" })); } byte b = 3; string value = ""; if (b == 3) { if (refreso == "") { return(Json(new { IsOk = false, Msg = "请输入代付失败理由!" })); } value = refreso; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary["id"] = 0; dictionary["orderid"] = orderId; dictionary["type"] = b; dictionary["msg"] = value; dictionary["strOperator"] = user.Username; dictionary["strClientIP"] = GameRequest.GetUserIP(); dictionary["strErr"] = ""; Message message = FacadeManage.aideAccountsFacade.ExcuteByProce("P_Acc_PlayerDrawRefused", dictionary); if (message.Success) { return(Json(new { IsOk = true, Msg = "" })); } return(Json(new { IsOk = false, Msg = message.Content })); }
protected void Button1_Click(object sender, EventArgs e) { if (AppConfig.Mode == AppConfig.CodeMode.Dev) { AccountsInfo info = FacadeManage.aideAccountsFacade.GetAccountsInfoByGameID(Convert.ToInt32(TextBox1.Text)); Message msg = FacadeManage.aideAccountsFacade.WXLogin(info != null ? info.UserUin : "yryr", GameRequest.GetUserIP()); if (msg.Success) { UserInfo ui = msg.EntityList[0] as UserInfo; if (ui != null) { Fetch.SetUserCookie(ui.ToUserTicketInfo()); Response.Redirect("/Card/AgentInfo.aspx"); } else { Response.Write( "<div style=\"font-size:1.2rem; color:red; text-align:center; margin-top:3rem;\">登录失败,请稍后尝试</div>"); } } else { Response.Write("<div style=\"font-size:1.2rem; color:red; text-align:center; margin-top:3rem;\">" + msg.Content + "</div>"); } } }
public JsonResult BindIp() { int num = TypeUtil.ObjectToInt(base.Request["isbind"]); if (num >= 0 && user.UserID > 0) { if (user == null) { return(Json(new { IsOk = false, Msg = "操作失败", Url = "/Login/index" })); } user.BandIP = GameRequest.GetUserIP(); user.IsBand = num; FacadeManage.aidePlatformManagerFacade.BindIP(user); FacadeManage.aidePlatformManagerFacade.SaveUserCache(user); return(Json(new { IsOk = true, Msg = "操作成功", IsBind = num })); } return(Json(new { IsOk = false, Msg = "参数出错" })); }
public static string PalaformWriteCookie() { if (HttpContext.Current.Request.Cookies["Accounts"] != null && HttpContext.Current.Request.Cookies["Password"] != null) { string str = HttpContext.Current.Request.Cookies["Accounts"].Value.ToString(); string str1 = HttpContext.Current.Request.Cookies["Password"].Value.ToString(); str1 = str1.Trim(); UserInfo userInfo = new UserInfo(0, str.Trim(), 0) { LastLogonIP = GameRequest.GetUserIP() }; Message message = FacadeManage.aideAccountsFacade.Logon(userInfo, true); if (message.Success) { UserInfo item = message.EntityList[0] as UserInfo; item.LogonPass = str1.Trim(); Fetch.SetUserCookie(item.ToUserTicketInfo()); object obj = WHCache.Default.Get <CookiesCache>(AppConfig.UserLoginCacheKey); if (obj != null) { return(obj.ToString()); } } } return(""); }
public JsonResult ClearZero() { string value = TypeUtil.ObjectToString(base.Request["cid"]); if (string.IsNullOrEmpty(value)) { return(Json(new { IsOk = false, Msg = "没有选择要操作的项" })); } Dictionary <string, object> dictionary = new Dictionary <string, object>(); dictionary["dwUserIDs"] = value; dictionary["dwOperater"] = user.Username; dictionary["strClientIP"] = GameRequest.GetUserIP(); dictionary["strErr"] = ""; Message message = FacadeManage.aideAccountsFacade.ExcuteByProce("RYTreasureDB..NET_PW_ZeroScore", dictionary); if (message.Success) { return(Json(new { IsOk = true, Msg = "清零成功" })); } return(Json(new { IsOk = false, Msg = message.Content })); }
protected void btnConfirm_Click(object sender, EventArgs e) { GameMatchUserInfo userInfo = new GameMatchUserInfo( ); userInfo.Accounts = CtrlHelper.GetText(txtAccounts); userInfo.ClientIP = GameRequest.GetUserIP( ); userInfo.CollectDate = DateTime.Now; userInfo.Compellation = CtrlHelper.GetText(txtCompellation); userInfo.DwellingPlace = CtrlHelper.GetText(txtDwellingPlace); userInfo.EMail = CtrlHelper.GetText(txtEMail); userInfo.Gender = Convert.ToByte(rdoFemale.Checked == true ? 0 : 1); userInfo.MatchID = XID; userInfo.MobilePhone = CtrlHelper.GetText(txtMobilePhone); userInfo.PassportID = CtrlHelper.GetText(txtPassportID); userInfo.PostalCode = CtrlHelper.GetText(txtPostalCode); userInfo.QQ = CtrlHelper.GetText(txtQQ); Message umsg = webFacade.AddGameMatch(userInfo, TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtPwd))); if (umsg.Success) { ShowAndRedirect("报名成功!", "/Match/Index.aspx"); } else { Show(umsg.Content); } }
/// <summary> /// 页面加载 /// </summary> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Log4Net.WriteInfoLog("零钱支付回掉进来了------query:" + GameRequest.Request.QueryString); LQPay.Notify notify = new LQPay.Notify(GameRequest.Request.QueryString); if (!string.IsNullOrEmpty(notify.Param)) { if (notify.IsChecked) { string[] pSplit = notify.Param.Split('|'); string retCode = pSplit[1]; if (retCode == "0000") //支付成返回值 { OnLinePayOrder order = new OnLinePayOrder { OrderID = pSplit[0], PayAddress = GameRequest.GetUserIP(), Amount = Convert.ToInt32(notify.ExtraParam.money) / 100M }; FacadeManage.aideTreasureFacade.FinishOnLineOrder(order); Response.Write("OK"); return; } } } Response.Write("FAIL"); } }
protected void btnUpdate_Click(object sender, EventArgs e) { AccountsProtect protect = new AccountsProtect(); protect.UserID = Fetch.GetUserCookie().UserID; protect.InsurePass = TextEncrypt.EncryptPassword(CtrlHelper.GetTextAndFilter(txtNewPass)); protect.Response1 = CtrlHelper.GetTextAndFilter(txtResponse1); protect.Response2 = CtrlHelper.GetTextAndFilter(txtResponse2); protect.Response3 = CtrlHelper.GetTextAndFilter(txtResponse3); protect.LastLogonIP = GameRequest.GetUserIP(); Message umsg = FacadeManage.aideAccountsFacade.ResetInsurePasswd(protect); if (umsg.Success) { RenderAlertInfo2(false, "重置银行密码成功!"); } else { Show(umsg.Content); this.txtResponse1.Text = ""; this.txtResponse2.Text = ""; this.txtResponse3.Text = ""; } }
/// <summary> /// 页面加载 /// </summary> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int userId = GameRequest.GetQueryInt("UserID", 0); string orderId = GameRequest.GetQueryString("OrderID"); int payAmount = GameRequest.GetQueryInt("PayAmount", 0); StreamReader sr = new StreamReader(Request.InputStream); string receiptData = sr.ReadToEnd(); //苹果返回数据 string rValue = GetAppInfo(receiptData); //苹果返回对象 AppReceipt receipt = AppReceipt.DeserializeObject(rValue); if (receipt.Status == 0 && orderId == receipt.Receipt.transaction_id) { OnLinePayOrder order = new OnLinePayOrder { OrderID = orderId, UserID = userId, PayAddress = GameRequest.GetUserIP(), Amount = payAmount }; Message umsg = FacadeManage.aideTreasureFacade.FinishOnLineOrderIOS(order, receipt.Receipt.product_id); Response.Write(umsg.Success ? "0" : umsg.Content); } else { Response.Write("失败"); } } }
protected void btnPublish_Click(object sender, EventArgs e) { if (txtAccounts.Text.Trim() != "") { Message umsg = accountsFacade.IsAccountsExist(CtrlHelper.GetText(txtAccounts)); if (umsg.Success) { Show("您输入的用户名不存在,请重新输入!"); this.txtAccounts.Text = ""; return; } } GameFeedbackInfo info = new GameFeedbackInfo(); info.Accounts = txtAccounts.Text.Trim(); info.FeedbackContent = TextFilter.FilterScript(txtContent.Text.Trim()).Replace("'", "\\'"); info.FeedbackTitle = TextFilter.FilterScript(txtTitle.Text.Trim()); info.ClientIP = GameRequest.GetUserIP(); Message msg = webFacade.PublishFeedback(info); if (msg.Success) { ShowAndRedirect("感谢您的问题反馈,我们将尽快给予回复,敬请留意!", "/Service/FeedbackList.aspx"); } else { Show(msg.Content); } }
protected void btnUpdate_Click(object sender, EventArgs e) { AccountsProtect protect = new AccountsProtect(); protect.UserID = Fetch.GetUserCookie().UserID; protect.SafeEmail = ""; protect.PassportID = ""; protect.PassportType = 0; protect.CreateIP = GameRequest.GetUserIP(); protect.Question1 = ddlQuestion1.SelectedValue; protect.Question2 = ddlQuestion2.SelectedValue; protect.Question3 = ddlQuestion3.SelectedValue; protect.Response1 = TextFilter.FilterScript(txtResponse1.Text.Trim()); protect.Response2 = TextFilter.FilterScript(txtResponse2.Text.Trim()); protect.Response3 = TextFilter.FilterScript(txtResponse3.Text.Trim()); if (protect.Question1 == "0") { Show("请选择密保问题一"); return; } if (protect.Question2 == "0") { Show("请选择密保问题二"); return; } if (protect.Question3 == "0") { Show("请选择密保问题三"); return; } if (string.IsNullOrEmpty(protect.Response1)) { Show("请输入密保问题一的答案"); return; } if (string.IsNullOrEmpty(protect.Response2)) { Show("请输入密保问题二的答案"); return; } if (string.IsNullOrEmpty(protect.Response3)) { Show("请输入密保问题三的答案"); return; } Message umsg = FacadeManage.aideAccountsFacade.ApplyUserSecurity(protect); if (umsg.Success) { RenderAlertInfo2(false, "您已经成功申请了密码保护!"); } else { Show(umsg.Content); } }
protected void Page_Load(object sender, EventArgs e) { //定义变量 userName = GameRequest.GetFormString("txtPayAccounts"); string reUserName = GameRequest.GetFormString("txtPayReAccounts"); money = GameRequest.GetFormInt("hdfSalePrice", 0); sendUrl = System.Configuration.ConfigurationSettings.AppSettings["DaySendUrl"]; //导向地址 notifyUrl = System.Configuration.ConfigurationSettings.AppSettings["DayNotifyUrl"]; //同步回调地址 string key = System.Configuration.ConfigurationSettings.AppSettings["DayKey"]; //密钥 merId = System.Configuration.ConfigurationSettings.AppSettings["DayMerId"]; //商户ID //验证参数 if (userName != reUserName) { ShowAndRedirect("两次输入的用户名不一致", "/Pay/PayDay.aspx"); return; } if (money == 0) { ShowAndRedirect("金额输入有误", "/Pay/PayDay.aspx"); return; } //生成订单 orderID = PayHelper.GetOrderIDByPrefix("Day"); //订单号 OnLineOrder onlineOrder = new OnLineOrder( ); onlineOrder.ShareID = 2; onlineOrder.OrderID = orderID; if (Fetch.GetUserCookie( ) == null) { onlineOrder.OperUserID = 0; } else { onlineOrder.OperUserID = Fetch.GetUserCookie( ).UserID; } onlineOrder.Accounts = userName; onlineOrder.CardTotal = 1; onlineOrder.CardTypeID = money < 30 ? 1 : money < 60 ? 2 : money < 120 ? 3 : 4; onlineOrder.OrderAmount = money; onlineOrder.IPAddress = GameRequest.GetUserIP( ); TreasureFacade treasureFacade = new TreasureFacade( ); Message umsg = treasureFacade.RequestOrder(onlineOrder); if (!umsg.Success) { RenderAlertInfo(true, umsg.Content, 2); return; } //生成sign签名 string signStr = merId + "|" + orderID + "|" + money + "|" + sendUrl + "|" + userName + "|" + key; sign = EncryptMD5(signStr, false, 32); }
private void PrintLog(string recid, string plarform, string msg) { string ip = GameRequest.GetUserIP(); string serpath = Server.MapPath("TaskLog"); string content = string.Format("{2} 任务ID:{0} 目标IP:{1} {4}\r\n msg:{3}\r\n", recid, ip, DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), msg, plarform); PrintTxt.RecordLog(serpath, content); }
/// <summary> /// 用户登录,登录密码必须是密文。并且验证登录参数 /// </summary> /// <param name="stationID">站点标识</param> /// <param name="accounts">用户名</param> /// <param name="logonPasswd">密文密码</param> /// <param name="ip">登录地址</param> /// <returns>返回网站消息,若登录成功将携带用户对象</returns> public Message Logon(int stationID, string accounts, string logonPasswd) { UserInfo suInfo = new UserInfo(0, accounts, stationID, logonPasswd); suInfo.LastLogonIP = GameRequest.GetUserIP(); return(Logon(suInfo, false)); }
/// <summary> /// 用户登录,登录密码必须是密文。并且验证登录参数 /// </summary> /// <param name="stationID">站点标识</param> /// <param name="accounts">用户名</param> /// <param name="logonPasswd">密文密码</param> /// <param name="ip">登录地址</param> /// <returns>返回网站消息,若登录成功将携带用户对象</returns> public Message Logon(string accounts, string logonPasswd) { UserInfo suInfo = new UserInfo(); suInfo.Accounts = accounts; suInfo.LogonPass = logonPasswd; suInfo.LastLogonIP = GameRequest.GetUserIP(); return(Logon(suInfo, false)); }
public Message Logon(string accounts, string logonPasswd) { return(this.Logon(new UserInfo { Accounts = accounts, LogonPass = logonPasswd, LastLogonIP = GameRequest.GetUserIP() }, false)); }
/// <summary> /// 注册按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnRegister_Click(object sender, EventArgs e) { if (TextUtility.EmptyTrimOrNull(txtAccounts.Text.Trim()) || TextUtility.EmptyTrimOrNull(txtLogonPass.Text.Trim())) { Show("抱歉!您输入的用户名或密码错误了。"); this.txtAccounts.Focus(); return; } //验证码错误 if (!txtCode.Text.Trim().Equals(Fetch.GetVerifyCode(), StringComparison.InvariantCultureIgnoreCase)) { Show("抱歉!您输入的验证码错误了。"); this.txtAccounts.Focus(); return; } Message umsg = accountsFacade.IsAccountsExist(CtrlHelper.GetText(txtAccounts)); if (!umsg.Success) { Show(umsg.Content); this.txtAccounts.Focus(); return; } UserInfo user = new UserInfo(); user.Accounts = CtrlHelper.GetText(txtAccounts); user.Compellation = CtrlHelper.GetText(txtCompellation); user.FaceID = Convert.ToInt16(hfFaceID.Value.Trim()); user.Gender = Convert.ToByte(ddlGender.SelectedValue); user.InsurePass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtInsurePass1)); user.LastLogonDate = DateTime.Now; user.LastLogonIP = GameRequest.GetUserIP(); user.LogonPass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass)); user.NickName = CtrlHelper.GetText(txtNickname); user.PassPortID = CtrlHelper.GetText(txtPassPortID); user.RegisterDate = DateTime.Now; user.RegisterIP = GameRequest.GetUserIP(); Message msg = accountsFacade.Register(user, CtrlHelper.GetText(txtSpreader)); if (msg.Success) { UserInfo ui = msg.EntityList[0] as UserInfo; ui.LogonPass = TextEncrypt.EncryptPassword(CtrlHelper.GetText(txtLogonPass)); Fetch.SetUserCookie(ui.ToUserTicketInfo( )); ShowAndRedirect("注册成功!", "/Member/MIndex.aspx"); } else { Show(msg.Content); this.txtAccounts.Focus(); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string Accounts = context.Request.Params["Ilogname"]; string NickName = context.Request.Params["InickName"]; //string Compellation = context.Request.Params["Iname"]; string LogonPass = context.Request.Params["Ipwd"]; //string PassPortID = context.Request.Params["Iid"]; string Spreader = context.Request.Params["Ispre"]; UserInfo user = new UserInfo(); user.Accounts = Accounts; user.Compellation = ""; //user.FaceID = Convert.ToInt16(hfFaceID.Value.Trim()); // user.Gender = Convert.ToByte(ddlGender.SelectedValue); user.InsurePass = TextEncrypt.EncryptPassword(LogonPass); user.LastLogonDate = DateTime.Now; user.LastLogonIP = GameRequest.GetUserIP(); user.LogonPass = TextEncrypt.EncryptPassword(LogonPass); user.NickName = NickName; user.PassPortID = ""; user.RegisterDate = DateTime.Now; user.RegisterIP = GameRequest.GetUserIP(); string strType = ""; if (System.Web.HttpContext.Current.Request.Cookies["asd"] != null) { strType = System.Web.HttpContext.Current.Request.Cookies["asd"].Value.ToString(); } int nType = 8; if (strType == "2") { nType = 2; } else if (strType == "5") { nType = 5; } Message msg = accountsFacade.Register(user, Spreader, nType); if (msg.Success) { UserInfo ui = msg.EntityList[0] as UserInfo; ui.LogonPass = TextEncrypt.EncryptPassword(LogonPass); Fetch.SetUserCookie(ui.ToUserTicketInfo()); context.Response.Write("success"); } else { context.Response.Write(msg.Content); } }
protected static string Plattype = string.Empty; //平台类型 protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } string type = GameRequest.GetQueryString("y"); Plattype = type; string state = GameRequest.GetQueryString("s"); if (state == "already") { int terminalType = Fetch.GetTerminalType(Request); int gameid = GameRequest.GetQueryInt("g", 0); if (gameid <= 0) { return; } //保存IP绑定信息 string UserIP = GameRequest.GetUserIP(); int result = FacadeManage.aideAccountsFacade.UserIPBind(UserIP, gameid); ConfigInfo config = FacadeManage.aideNativeWebFacade.GetConfigInfo(AppConfig.SiteConfigKey.MobilePlatformVersion.ToString()); if (config != null) { PlatformDownloadUrl = terminalType == 2 ? config.Field5 : config.Field6; if (type == "u3d") { PlatformDownloadUrl = terminalType == 2 ? config.Field9 : config.Field10; } } Random random = new Random(); MobileQrcode = Fetch.GetQrCode("http://" + Request.Url.Authority + "/Mobile/ShareLinkNew.aspx?r=" + random.Next(1000, 9999) + "&g=" + gameid + "&y=" + type, 312); } else { string domain = Request.Url.Authority; int gameid = FacadeManage.aideAgentFacade.GetGameIDByAgentDomain(domain); if (gameid <= 0) { string[] domainStr = domain.Split('.'); if (domainStr.Length == 3 && Regex.IsMatch(domainStr[0], "^[0-9]*$")) { gameid = Convert.ToInt32(domainStr[0]); } else { gameid = GameRequest.GetQueryInt("g", 0); } } Response.Redirect("/Mobile/WxRegister.aspx?t=81&g=" + gameid + (!string.IsNullOrEmpty(type) ? "&y=" + type : "")); } }
protected void Page_Load(object sender, EventArgs e) { TreasureFacade treasureFacade = new TreasureFacade(); string yb_data = Request["data"].ToString(); string yb_encryptkey = Request["encryptkey"].ToString(); Boolean ok = EncryptUtil.checkDecryptAndSign(yb_data, yb_encryptkey, Config.yibaoPublickey, Config.merchantPrivatekey); if (ok) { string AESKey = RSA.Class.RSAFromPkcs8.decryptData(yb_encryptkey, Config.merchantPrivatekey, "UTF-8"); string realData = payapi_mobile_demo.AES.Decrypt(yb_data, AESKey); SortedDictionary <string, object> sd = Newtonsoft.Json.JsonConvert.DeserializeObject <SortedDictionary <string, object> >(realData); /** 3.取得data明文sign。 */ string sign = (string)sd["sign"]; /** 4.对map中的值进行验证 */ StringBuilder signData = new StringBuilder(); foreach (var item in sd) { /** 把sign参数隔过去 */ if (item.Key == "sign") { continue; } signData.Append(item.Value); } string orderid = (string)sd["orderid"]; string money = (Convert.ToInt32(sd["amount"])).ToString(); ShareDetialInfo detailInfo = new ShareDetialInfo();//请不要修改或删除 detailInfo.PayAmount = decimal.Parse(money) / 100; detailInfo.OrderID = orderid; detailInfo.IPAddress = GameRequest.GetUserIP(); Message message = treasureFacade.FilliedOnline(detailInfo, 0); if (message.Success) { Response.Write("success"); } else { Response.Write("sorry"); } } else { Response.Write("sorry"); } }
public void RetrievePassword(HttpContext context) { Message msg = new Message(); AjaxJsonValid ajaxJson = new AjaxJsonValid(); string answer1 = GameRequest.GetFormString("Answer1"); string answer2 = GameRequest.GetFormString("Answer2"); string answer3 = GameRequest.GetFormString("Answer3"); string password = GameRequest.GetFormString("Password"); string rePassword = GameRequest.GetFormString("RePassword"); int userID = GameRequest.GetFormInt("UserID", 0); #region 参数验证 if (string.IsNullOrEmpty(answer1) || string.IsNullOrEmpty(answer2) || string.IsNullOrEmpty(answer3)) { ajaxJson.msg = "抱歉,密保答案不能为空"; context.Response.Write(ajaxJson.SerializeToJson()); return; } if (string.IsNullOrEmpty(password)) { ajaxJson.msg = "抱歉,新密码不能为空"; context.Response.Write(ajaxJson.SerializeToJson()); return; } if (password != rePassword) { ajaxJson.msg = "抱歉,两次密码输入不一致"; context.Response.Write(ajaxJson.SerializeToJson()); return; } if (userID <= 0) { ajaxJson.msg = "抱歉,找回密码用户不存在"; context.Response.Write(ajaxJson.SerializeToJson()); return; } #endregion 参数验证 AccountsProtect protect = new AccountsProtect(); protect.UserID = userID; protect.LogonPass = TextEncrypt.EncryptPassword(password); protect.Response1 = answer1; protect.Response2 = answer2; protect.Response3 = answer3; protect.LastLogonIP = GameRequest.GetUserIP(); Message umsg = FacadeManage.aideAccountsFacade.ResetLogonPasswd(protect); ajaxJson.SetValidDataValue(umsg.Success); ajaxJson.msg = umsg.Content; context.Response.Write(ajaxJson.SerializeToJson()); }