public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST") { string sAccount = CYRequest.GetFormString("bankaccount");//充值账号 string sPid = CYRequest.GetFormString("pid"); int iPid = 0; int.TryParse(sPid, out iPid); string sUserName = PartnerUserBLL.PartnerUserNameGet(sAccount, iPid); string sPhone = CYRequest.GetFormString("bankphonenum"); string sPayNums = CYRequest.GetFormString("bankpayprice");//充值金额 string bankchannel = CYRequest.GetFormString("bankchannel"); string bankname = CYRequest.GetFormString("bankname"); string cardTypeCombine = CYRequest.GetString("cardTypeCombine"); StringBuilder sbText = new StringBuilder(200); sbText.AppendFormat("<form id='bankpay' name='bankpay' action='{0}' method='post'>", "BankPay.ashx"); sbText.AppendFormat("<input type='hidden' name='bankaccount' value='{0}'/>", sUserName); sbText.AppendFormat("<input type='hidden' name='bankphonenum' value='{0}'/>", sPhone); sbText.AppendFormat("<input type='hidden' name='bankpayprice' value='{0}'/>", sPayNums); sbText.AppendFormat("<input type='hidden' name='bankchannel' value='{0}'/>", bankchannel); sbText.AppendFormat("<input type='hidden' name='bankname' value='{0}'/>", bankname); sbText.AppendFormat("<input type='hidden' name='cardTypeCombine' value='{0}'/>", cardTypeCombine); //submit按钮控件请不要含有name属性 sbText.Append("<input type='submit' value='submit' style='display:none;'></form>"); sbText.Append("<script>document.forms['bankpay'].submit();</script>"); context.Response.Write(sbText); return; } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { string sGameAbbre = CYRequest.GetString("gn"); if (!ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameAbbre))) { Response.Write("<script>alert('即将开服,敬请期待!');location.href='ahxycl.aspx';</script>"); return; } int iUserID = GetUserID(); if (iUserID > 999) { string sUserID = iUserID.ToString(); string sServerID = sGameAbbre.Replace("ahxy", ""); string sServerName = ServerBLL.ServerNameSelByAbbre(sGameAbbre); string sGameLoginUrl = string.Format("app://loadgame:{0}服-{1}-{2}|{3}&from_launcher=1", sServerID, sServerName, sUserID, ahxyGame.Login(sUserID, sGameAbbre)); if (GameLogin(sGameAbbre)) { GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sGameLoginUrl); } Response.Write(string.Format("<script>window.location ='{0}';</script>", sGameLoginUrl)); } } else { Response.Write("<script>alert('用户状态不存在,请登陆!');location.href='ahxycl.aspx';</script>"); return; } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { string sGameAbbre = CYRequest.GetString("gn"); if (!ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameAbbre))) { Response.Write("1"); return; } int iUserID = GetUserID(); if (iUserID > 999) { string sUserID = iUserID.ToString(); string sGameLoginUrl = string.Format("app://loadgame:{0},{1}|{2}&from_launcher=1", sUserID, sGameAbbre, sjsgGame.Login(sUserID, sGameAbbre)); if (GameLogin(sGameAbbre)) { GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sGameLoginUrl); } Response.Write(sGameLoginUrl); } } else { Response.Write("2"); } }
private void gameval() { sAccount = CYRequest.GetString("account").Trim(); string sPassWord = CYRequest.GetString("passwordl"); string sMD5PassWord = UserBll.PassWordMD5(sAccount, sPassWord); string sRes = UserBll.UserVal(sAccount, sMD5PassWord); string sPageUrl = Request.Url.ToString(); if (sRes == "0") { int iUserID = UserBll.UserIDSel(sAccount); LoginStateSet(sAccount, iUserID, sPageUrl); return; } else { string sMD5PassWordNew = UserBll.PassWordMD5New(sAccount, sPassWord); if ("0" == UserBll.UserVal(sAccount, sMD5PassWordNew)) { int iUserID = UserBll.UserIDSel(sAccount); LoginStateSet(sAccount, iUserID, sPageUrl); } else { Response.Redirect(string.Format("{0}/yxzq/sg/index1.html", sWUrl), true); } } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { string sGameAbbre = CYRequest.GetString("gn"); if (!ProvideCommon.valTime(DateTime.Now.ToString(), ServerBLL.ServerTimeSel(sGameAbbre))) { Response.Write("<script>alert('即将开服,敬请期待!');location.href='jycl.aspx';</script>"); return; } int iUserID = GetUserID(); DateTime dtLoginTime = GetLoginTime(); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { ClearUsersInfo(); string sJs = "<script>alert('密码已改,请重新登陆!');location.href='jyc.html';</script>"; Response.Write(sJs); return; } string sClient = "pc"; string sUrl = jyGame.Login(iUserID.ToString(), sGameAbbre, sClient); if (GameLogin(sGameAbbre)) { GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sUrl); } Response.Redirect(sUrl, true); return; } else { Server.Transfer("jycl.aspx", false); } }
protected void Page_Load(object sender, EventArgs e) { string sType = CYRequest.GetString("Type"); string sAccount = CYRequest.GetString("Account", true); string sKey = CYRequest.GetString("Key"); string sPassWord = CYRequest.GetString("PsssWord", true);//md5加密后的密码 string sUForm = CYRequest.GetString("UFrom", true); if (ValKey(sAccount, sKey)) { switch (sType) { case "reg": Response.Write(UserReg(sAccount, sPassWord, sUForm)); break; case "login": Response.Write(UserLogin(sAccount, sPassWord, sUForm)); break; case "namesel": Response.Write(UserNameSel(sAccount)); break; case "UserInfoVal": Response.Write(UsersVal(sAccount, sPassWord)); break; } } }
protected void Page_Load(object sender, EventArgs e) { string sAccount = CYRequest.GetString("account"); string sPId = CYRequest.GetString("agentid"); string sign = CYRequest.GetString("sign"); int pid = 0; int.TryParse(sPId, out pid); if (pid == 1) { string sTicket = PartnerBLL.PartnerKeySel(pid); StringBuilder sbText = new StringBuilder(50); sbText.Append(sAccount); sbText.Append(sPId); sbText.Append(sTicket); string sValSign = ProvideCommon.MD5(sbText.ToString());//md5(account + agentid + TICKEY_PAY) if (sign != sValSign) { Response.Redirect("http://www.682.com/Home/xsk"); } else { string sPartnerAbbre = PartnerBLL.PartnerAbbreSel(pid); string sAccountC = string.Format("{0}:{1}", sPartnerAbbre, sAccount); int iUserID = PartnerUserBLL.PartnerUserIDSel(sAccount, pid); string sPageUrl = Request.Url.ToString(); LoginStateSet(sAccountC, iUserID, sPageUrl); } } else if (!(LoginSessionVal() || isLoginCookie())) { Response.Redirect("http://www.682.com/Home/xsk"); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.RequestType == "POST") { string sType = CYRequest.GetString("Type"); if (sType == "login") { //用户登陆 string sUserName = CYRequest.GetString("account"); string pwd = CYRequest.GetString("pwdone"); gameval(sUserName, pwd); } } else { if (LoginSessionVal() || isLoginCookie()) { DateTime dtLoginTime = GetLoginTime(); int iUserID = UserBll.UserIDSel(GetAccount()); if (!PWDUpdateBLL.PwdUpdateVal(iUserID, dtLoginTime)) { ClearUsersInfo(); sMsg = "<script>alert('密码已改,请重新登陆!')</script>"; return; } else { Server.Transfer("sqserver.aspx", false); } } } }
protected void RegButton_Click(object sender, EventArgs e) { string sAccount = CYRequest.GetFormString("txz").Trim(); string sPassWord = CYRequest.GetFormString("pwdtwo").Trim(); string sValCode = Request["ValCode"].ToString(); string sRes = ValCheckCode(sValCode); if (sRes != "0") { StringBuilder sbText = new StringBuilder(); sbText.Append("<script>alert('"); sbText.Append(sRes); sbText.Append("')</script>"); sMsg = sbText.ToString(); return; } string sValMessage = UserBll.RegCheck(sAccount, sPassWord); if (sValMessage != "") { sMsg = sValMessage; return; } int iUID = UserBll.UserReg(sAccount, sPassWord); if (-1 == iUID) { sMsg = "<script>alert('注册失败,请重试!')</script>"; return; } else if (iUID > 999) { string sQuestion = CYRequest.GetString("question"); string sAnswer = CYRequest.GetString("answer"); string sEmail = CYRequest.GetString("email"); string sName = CYRequest.GetString("realname"); string sCrednnum = CYRequest.GetString("credennum"); UserInfo uiObject = new UserInfo(); uiObject.Credennum = sCrednnum; uiObject.Answer = sAnswer; uiObject.Email = sEmail; uiObject.Name = sName; uiObject.question = sQuestion; uiObject.regip = ProvideCommon.GetRealIP(); uiObject.uid = iUID; UserInfoBLL.UserInfoAdd(uiObject); string sPageUrl = Request.Url.ToString(); LoginStateSet(sAccount, iUID, sPageUrl); string sWUrl = WebConfig.BaseConfig.sWUrl; string sWWWUrl = string.Format("{0}/{1}?un={2}", sWUrl, "usercookie.aspx", sAccount); string sKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); string sBBSUrl = DiscuzUserI.BBSLogin(sAccount, sPassWord, sKey); string sJSUrl = string.Format("<script src='{0}'></script><script src='{1}'></script>", sBBSUrl, sWWWUrl); sMsg = string.Format("{0}<script>alert('注册成功!');location.href='http://www.dao50.com/';</script>", sJSUrl); return; } }
public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST" || context.Request.HttpMethod == "GET") { string sAjaxType = CYRequest.GetString("AjaxType"); string sRes = string.Empty; string account = string.Empty; string question = string.Empty; string answer = string.Empty; switch (sAjaxType) { case "QuestionVal": account = CYRequest.GetString("un"); question = CYRequest.GetString("question"); answer = CYRequest.GetString("answer"); context.Response.Write(QuestionVal(account, question, answer)); break; case "PassWordFind": account = CYRequest.GetString("un"); question = CYRequest.GetString("question"); answer = CYRequest.GetString("answer"); if (QuestionVal(account, question, answer) == "2") { string sPassWordTwo = CYRequest.GetString("pwdtwo"); sRes = PassWordFind(account, sPassWordTwo); } else { sRes = "1"; } context.Response.Write(sRes); break; case "UserMoreSel": account = CYRequest.GetString("un"); context.Response.Write(UserMoreSel(account)); break; case "UserCredenSel": account = CYRequest.GetString("un"); context.Response.Write(UserCredenSel(account)); break; case "UserEmailSel": account = CYRequest.GetString("un"); context.Response.Write(UserEmailSel(account)); break; case "UserQuestionSel": account = CYRequest.GetString("un"); context.Response.Write(UserQuestionSel(account)); break; } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.RequestType == "POST") { string sType = CYRequest.GetString("Type"); if (sType == "login") { //用户登陆 string sUserName = CYRequest.GetString("account"); string pwd = CYRequest.GetString("pwdone"); gameval(sUserName, pwd); } else if (sType == "reg") { //用户注册 string sUserName = CYRequest.GetString("accountreg"); string pwdone = CYRequest.GetString("pwdonereg"); string pwdtwo = CYRequest.GetString("pwdtwo"); if (pwdone != pwdtwo) { sMsg = "<script>alert('注册失败,密码与确认密码不一致,请正确输入!')</script>"; return; } string sValMessage = UserBll.RegCheck(sUserName, pwdtwo); if (sValMessage != "") { sMsg = sValMessage; return; } int iUID = UserBll.UserReg(sUserName, pwdtwo); if (-1 == iUID) { sMsg = "<script>alert('注册失败,请重试!')</script>"; return; } else if (iUID > 999) { string sKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); string sR = DiscuzUserI.BBSReg(sUserName, pwdtwo, sKey); string sPageUrl = Request.Url.ToString(); LoginStateSet(sUserName, iUID, sPageUrl); Server.Transfer("zsg.aspx", false); } } } else { if (LoginSessionVal() || isLoginCookie()) { Server.Transfer("zsg.aspx", false); } } }
protected void Page_Load(object sender, EventArgs e) { string sUserName = CYRequest.GetString("username"); string sPWD = CYRequest.GetString("pwd"); string sKey = CYRequest.GetString("key"); string sGameID = CYRequest.GetString("gameid"); string sServerid = CYRequest.GetString("serverid"); if (ValKey(sUserName, sPWD, sKey)) { string sState = UserBll.UserVal(sUserName, sPWD); if ("0" == sState) { int iUserID = UserBll.UserIDSel(sUserName); string sbbsKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); string sUrl = DiscuzUserI.BBSLogin(sUserName, sPWD, sbbsKey); string sPageUrl = Request.Url.ToString(); LoginStateSet(sUserName, iUserID, sPageUrl); int iGameID = 0; int.TryParse(sGameID, out iGameID); int iServerID = 0; int.TryParse(sServerid, out iServerID); string sGameAbbre = GameBLL.GameAbbreSel(iGameID, iServerID).Trim(); string sGame = GameInfoBLL.GameInfoAbbreSel(sGameAbbre).TrimEnd(); string sGameUrl = string.Empty; switch (sGame) { case "sssg": string client = CYRequest.GetString("client"); sGameUrl = string.Format("{0}/GCenter/PlayGame.aspx?gn={1}&client={2}", sRootUrl, sGameAbbre, client); break; case "tssg": string fuid = CYRequest.GetString("fuid"); sGameUrl = string.Format("{0}/GCenter/PlayGame.aspx?gn={1}&fuid={2}", sRootUrl, sGameAbbre, fuid); break; default: sGameUrl = string.Format("{0}/GCenter/PlayGame.aspx?gn={1}", sRootUrl, sGameAbbre); break; } sMsg = string.Format("<script>location.href='{0}'</script><script src='{1}'></script>", sGameUrl, sUrl); } else { sMsg = string.Format("<script>alert('用户信息输入错误,验证失败!')</script><script>location.href='{0}/Default.aspx'</script>", sRootUrl); return; } } else { Response.Redirect("../Default.aspx", true); } }
public void ProcessRequest(HttpContext context) { if (context.Request.HttpMethod == "POST") { string sFromHost = context.Request.UrlReferrer.Host; context.Response.Cookies["fromhost"].Value = sFromHost; context.Response.Cookies["fromhost"].Expires = DateTime.Now.AddHours(1); string sAccount = CYRequest.GetFormString("bankaccount"); //充值账号 string sPhone = CYRequest.GetFormString("bankphonenum"); string sPayNums = CYRequest.GetFormString("bankpayprice"); //充值金额 int iUserID = UserBll.UserIDSel(sAccount); if (iUserID < 1000) { context.Response.Write("<script>alert('充值账号不存在!');</script>"); return; } else { decimal dPrice = 0; decimal.TryParse(sPayNums, out dPrice); if (dPrice < 10) { context.Response.Redirect("PayPErr.aspx?err=204"); return; } string sChannel = CYRequest.GetFormString("bankchannel"); string sBankName = string.Empty; if (sChannel == "ibank") { sBankName = CYRequest.GetFormString("bankname"); } int iCount = 1; string sPayDirect = string.Empty; if (sChannel == "tenpay") { sPayDirect = TenPayBuy.PayBegin(sChannel, sPhone, sAccount, dPrice, iCount, context); } else if (sChannel == "szfphone") { string cardTypeCombine = CYRequest.GetString("cardTypeCombine"); sPayDirect = SzfPayBuy.PayBegin(sChannel, sPhone, sAccount, dPrice, iCount, "0", cardTypeCombine); } else { sPayDirect = PayAll.CreatePay(sChannel, sPhone, sAccount, dPrice, iCount, sBankName); } context.Response.Write(sPayDirect); return; } } }
protected void Page_Load(object sender, EventArgs e) { if (Request.HttpMethod == "GET") { string sWebUrl = WebConfig.BaseConfig.sWUrl; string uniqueid = CYRequest.GetString("uniqueid"); string sGameName = CYRequest.GetString("game"); string sign = CYRequest.GetString("sign"); string sKey = "1!s@k#d)}w[l<>"; StringBuilder sbText = new StringBuilder(); sbText.Append(uniqueid); sbText.Append(sGameName); sbText.Append(sKey); string sValSign = ProvideCommon.MD5(sbText.ToString()).ToLower(); if (sign == sValSign) { if (!NoRegLoginBLL.NoRegLoginUnionidSel(uniqueid)) { sMsg = "uniqueid重复"; return; } string sUserName = string.Format("?{0}", ProvideCommon.GenerateStringID()); int iTypeID = 1; int iState = 1; string sPassWord = ""; int iUID = UserBll.UserReg(sUserName, sPassWord, iTypeID, iState); if (iUID > 1000) { string sPageUrl = Request.Url.ToString(); LoginStateSet(sUserName, iUID, sPageUrl); NoRegLoginBLL.NoRegLoginAdd(iUID, uniqueid, sGameName); NoRegLoginBLL.AddUserid(uniqueid, iUID.ToString()); if (sGameName.Length > 0) { sUrl = string.Format("/frame/g_mainframe_noreg.aspx?gn={0}", sGameName); return; } } else { sMsg = "注册失败"; return; } } else { sMsg = "sign error"; return; } } }
public static string VPayVal() { string sRes = string.Empty; //'接受服务器url get参数 string rtmd5 = CYRequest.GetString("v1"); // '服务器MD5 string trka = CYRequest.GetString("v2"); // 'V币号码15位 string rtmi = CYRequest.GetString("v3"); // '密码'V币密码6位 (可能为空 老V币没有密码) string rtmz = CYRequest.GetString("v4"); // '面值1-999 整数 string rtlx = CYRequest.GetString("v5"); // '卡的类型 1 2 3 string rtoid = CYRequest.GetString("v6"); // '网盈一号通服务器端订单 string rtcoid = CYRequest.GetString("v7"); // '商户自己订单 string rtuserid = CYRequest.GetString("v8"); // '商户的用户ID string rtcustom = CYRequest.GetString("v9"); //'商户自己定义数据 string rtflag = CYRequest.GetString("v10"); // '返回状态. 1正常发送 2补单发送 StringBuilder sbText = new StringBuilder(); sbText.Append(trka); sbText.Append(rtmi); sbText.Append(rtoid); sbText.Append(spid); sbText.Append(sppwd); sbText.Append(rtcoid); sbText.Append(rtflag); sbText.Append(rtmz); string get_key = sbText.ToString(); //string get_key = trka + rtmi + rtoid + spid + sppwd + rtcoid + rtflag + rtmz; string md5password = ProvideCommon.MD5(get_key).ToUpper(); // '先MD5 32 然后转大写 string sAccount = rtuserid; //获取充值人账户 decimal dPrice = 0; decimal.TryParse(rtmz, out dPrice); if (rtflag == "1" || rtflag == "2") { if (md5password == rtmd5) { string sTranID = string.Format("{0}{1}", rtcoid, rtcustom.Split('|')[0]); int j = TransPBLL.PointSalesCommit(sTranID, sAccount, dPrice); //确认返回信息无误后提交此定单 sRes = j.ToString(); } else { sRes = string.Format("{0}|{1}", md5password, rtmd5); } } else { sRes = string.Format("rtflag:{0}", rtflag); } return(sRes); }
//protected string noresize = string.Empty; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string sGameName = CYRequest.GetString("gn"); if (sGameName == "" || sGameName == "unsafe string") { Response.Redirect(string.Format("{0}/yxzx", sWUrl), false); } else { sGame = sGameName; } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { sGameName = CYRequest.GetString("gn"); sAccountT = GetAccount(); if (sGameName.Length > 0 && sAccountT.IndexOf("?") == 0) { sServerName = ServerBLL.ServerTitleNoSNameSel(sGameName); } else { Response.Redirect("http://www.dao50.com/", false); } } }
protected void RegButton_Click(object sender, EventArgs e) { string sAccount = CYRequest.GetFormString("txz").Trim(); string sPassWord = CYRequest.GetFormString("pwdtwo").Trim(); string sValMessage = UserBll.RegCheck(sAccount, sPassWord); if (sValMessage != "") { sMsg = sValMessage; return; } int iUID = UserBll.UserReg(sAccount, sPassWord); if (-1 == iUID) { sMsg = "<script>alert('注册失败,请重试!')</script>"; return; } else if (iUID > 999) { string sChannel = CYRequest.GetString("channel"); //string sQuestion = ""; //string sAnswer = ""; //string sEmail = ""; //string sName = ""; //string sCrednnum = ""; //UserInfo uiObject = new UserInfo(); //uiObject.Credennum = sCrednnum; //uiObject.Answer = sAnswer; //uiObject.Email = sEmail; //uiObject.Name = sName; //uiObject.question = sQuestion; //uiObject.regip = ProvideCommon.GetRealIP(); //uiObject.uid = iUID; //UserInfoBLL.UserInfoAdd(uiObject); string sKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); string sR = DiscuzUserI.BBSReg(sAccount, sPassWord, sKey); string sPageUrl = Request.Url.ToString(); string url = string.Format("http://union.dao50.com/Interface/other/UsercenterReg.aspx?name={0}&userid={1}&channel={2}", sAccount, iUID, sChannel); GetPageInfo(url); // LoginStateSet(sAccount, iUID, sPageUrl); //更新成功 sMsg = "<script>alert('注册成功!');location.href='http://www.dao50.com/';</script>"; return; } }
protected void Page_Load(object sender, EventArgs e) { if (Request.HttpMethod == "POST") { string sWebUrl = WebConfig.BaseConfig.sWUrl; string username = CYRequest.GetString("un"); string password = CYRequest.GetString("pwd"); string url = CYRequest.GetString("url"); string nusername = GetAccount(); StringBuilder sbHtml = new StringBuilder(); string sWWWUrl = string.Format("{0}/{1}?un={2}", sWebUrl, "usercookie.aspx", username); string sKey = ConfigurationManager.AppSettings["UserValKey"].ToString(); string sBBSUrl = DiscuzUserI.BBSLogin(username, password, sKey); string sJSUrl = string.Format("<script src='{0}'></script><script src='{1}'></script>", sBBSUrl, sWWWUrl); if (username == nusername && nusername != "" && username != "unsafe string") { //写入cookie sbHtml.AppendFormat("<script src='{0}'></script>", sJSUrl); } else { //验证账号合法性 if (UserBll.UserAllVal(username, password)) { //写入cookie sbHtml.AppendFormat("<script src='{0}'></script>", sJSUrl); string sPageUrl = Request.Url.ToString(); int iUserID = UserBll.UserIDSel(username); LoginStateSet(username, iUserID, sPageUrl); } else { sbHtml.Append("<script>alert('账号信息输入错误!')</script>"); } } if (url != "" && url != "unsafe string") { sbHtml.AppendFormat("<script>location.href='{0}'</script>", url); } else { sbHtml.AppendFormat("<script>location.href='{0}'</script>", sWebUrl); } Response.Write(sbHtml.ToString()); } }
private string PassProtect(int iUserID) { string sQuestion = CYRequest.GetString("question"); string sAnswer = CYRequest.GetString("mbda"); int iNum = UserInfoBLL.UserInfoUpdateOfQuestion(sQuestion, sAnswer, iUserID); string sMsg = string.Empty; if (iNum > 0) { sMsg = "0"; } else { sMsg = "1"; } return(sMsg); }
/// <summary> /// /// </summary> /// <param name="passwordtwo">新密码</param> /// <param name="bpassword">原密码</param> /// <returns>0成功,1失败,2原始密码验证失败</returns> private string UpdatePass(int iUserID) { string passwordtwo = CYRequest.GetString("passwordtwo"); string bpassword = CYRequest.GetString("bpassword"); string sMsg = string.Empty; string sAccountC = UserBll.AccountSel(iUserID).Trim(); string sOPassWord = UserBll.PassWordMD5(sAccountC, bpassword); int iRes = UserBll.PWDVal(iUserID, sOPassWord); if (iRes > 999) { string sMD5PassWord = UserBll.PassWordMD5(sAccountC, passwordtwo); if (1 == UserBll.UserUpdatePWD(iUserID, sMD5PassWord)) { sMsg = "0"; } else { sMsg = "1"; } } else { string sMD5PassWordNew = UserBll.PassWordMD5New(sAccountC, bpassword); iRes = UserBll.PWDVal(iUserID, sMD5PassWordNew); if (iRes > 999) { string sMD5PassWord = UserBll.PassWordMD5(sAccountC, passwordtwo); if (1 == UserBll.UserUpdatePWD(iUserID, sMD5PassWord)) { ClearUsersInfo(); sMsg = "0"; } else { sMsg = "1"; } } else { sMsg = "2"; } } return(sMsg); }
protected void Page_Load(object sender, EventArgs e) { if (Request.RequestType == "GET" || Request.RequestType == "POST") { string skey = "Pd23AS!2lh*2B"; string sUserName = CYRequest.GetString("username"); string sPassWord = CYRequest.GetString("password"); string sPage = Server.UrlDecode(CYRequest.GetString("page")); string sSign = CYRequest.GetString("sign"); if (sSign != "") { StringBuilder sbText = new StringBuilder(); sbText.AppendFormat("{0}{1}{2}", sUserName, sPassWord, skey); string sValSign = ProvideCommon.MD5(sbText.ToString()); if (sValSign == sSign) { if (UserBll.UserAllVal(sUserName, sPassWord)) { string sPageUrl = Request.Url.ToString(); int iUserID = UserBll.UserIDSel(sUserName); LoginStateSet(sUserName, iUserID, sPageUrl); if (sPage != "") { string sHost = ProvideCommon.getHost(sPage); int iUserPoint = GetUPoints(); string sPP = ProvideCommon.getMultiPP(iUserID); Response.Redirect(string.Format("http://{0}/usercookie.aspx?un={1}&point={2}&GoUrl={3}&pp={4}", sHost, sUserName, iUserPoint, sPage, sPP), true); } else { Response.Write("page is null"); } } else { Response.Write("login val err"); } } else { Response.Write("sign val err"); } } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/xml"; StringBuilder sbXml = new StringBuilder("<?xml version=\"1.0\" encoding=\"utf-8\"?>"); sbXml.Append("<response>"); string sBeginDate = CYRequest.GetString("date"); if (sBeginDate == "" || sBeginDate == "unsafe string") { sbXml.Append("<result>0</result>"); } else { string sSign = CYRequest.GetString("sign"); if (sSign == "" || sSign == "unsafe string") { sbXml.Append("<result>0</result>"); } else { if (hysjGame.signVal(sBeginDate, sSign)) { IFormatProvider format = new System.Globalization.CultureInfo("zh-CN"); string TarStr = "yyyyMMdd"; DateTime dBeginDate = DateTime.ParseExact(sBeginDate, TarStr, format); DateTime dEndDate = dBeginDate.AddDays(1); int iGameID = 6; int iGamePoints = TransGBLL.TransSelGPointsByGame(iGameID, dBeginDate, dEndDate); int iPrice = iGamePoints / 10; sbXml.Append("<result>1</result>"); sbXml.Append("<exchangeRate>10</exchangeRate>"); sbXml.AppendFormat("<localMoneyAmount>{0}</localMoneyAmount>", iPrice.ToString("f2")); sbXml.AppendFormat("<gameMoneyAmount>{0}</gameMoneyAmount>", iGamePoints); } else { sbXml.Append("<result>0</result>"); } } } sbXml.Append("</response>"); context.Response.Write(sbXml.ToString()); }
public void ProcessRequest(HttpContext context) { string uid = CYRequest.GetString("uid"); string vcpoints = CYRequest.GetString("vcpoints"); string tid = CYRequest.GetString("tid"); string offer_name = CYRequest.GetString("offer_name"); string pass = CYRequest.GetString("pass"); int iPoint = 0; if (!int.TryParse(vcpoints, out iPoint)) { context.Response.Write("vcpoints err"); return; } int iUserID = 0; if (!int.TryParse(uid, out iUserID)) { context.Response.Write("uid err"); return; } string sParmValRes = YRTPayBLL.ParmVal(iUserID, iPoint, tid, pass); if (sParmValRes.Length > 0) { context.Response.Write(sParmValRes); return; } //验证ip //验证pass string sYRTPayRes = string.Empty; if (YRTPayBLL.PassVal(uid, vcpoints, tid, pass)) { sYRTPayRes = YRTPayBLL.Pay(tid, iPoint, iUserID, offer_name); context.Response.Write(sYRTPayRes); } else { sYRTPayRes = string.Format("{\"uid\":\"{0}\",\"vcpoints\":\"{1}\",\"tid\":\"{2}\",\"offer_name\":\"{3}\",\"status\":\"1002\"}", uid, vcpoints, tid, offer_name); context.Response.Write(sYRTPayRes); } }
protected void Page_Load(object sender, EventArgs e) { string sRes = string.Empty; if (LoginSessionVal() || isLoginCookie()) { if (Request.HttpMethod == "POST" || Request.HttpMethod == "GET") { int iUserID = GetUserID(); string sType = CYRequest.GetString("Type"); switch (sType) { case "UpdatePass": Response.Write(UpdatePass(iUserID)); break; case "PassProtect": Response.Write(PassProtect(iUserID)); break; case "DIndulge": Response.Write(DIndulge(iUserID)); break; case "EmailBind": Response.Write(EmailBind(iUserID)); break; case "UserInfoUpdate": Response.Write(UserInfoUpdate()); break; case "UserMoreSel": Response.Write(UserMoreSel(iUserID)); break; } } } else { sRes = "-1"; } Response.Write(sRes); }
protected void Page_Load(object sender, EventArgs e) { string sName = GetSearchName(); if (sName.Length < 4) { Response.Redirect("searchPass.aspx", true); } if (Request.HttpMethod == "POST") { string sPassWordOne = CYRequest.GetString("passwordone"); string sPassWord = CYRequest.GetString("passwordtwo"); int iUserID = UserBll.UserIDSel(sName); string sMD5PassWord = UserBll.PassWordMD5(sName, sPassWord); if (sPassWord != "" && sName != "") { if (sPassWord == sPassWordOne && sPassWord != "unsafe string") { if (1 == UserBll.UserUpdatePWD(iUserID, sMD5PassWord)) { Response.Cookies["searchname"].Expires = DateTime.Now.AddDays(-1); sMsg = "<script>alert('修改密码成功!');location.href='../Default.aspx';</script>"; return; } else { //更新失败 sMsg = "<script>alert('修改密码失败!')</script>"; return; } } else { sMsg = "<script>alert('两次输入的密码不一致!');</script>"; return; } } else { sMsg = "<script>alert('用户名或者密码不能为空!');</script>"; return; } } }
protected void Page_Load(object sender, EventArgs e) { if (LoginSessionVal() || isLoginCookie()) { string sGameAbbre = CYRequest.GetString("gn"); int iUserID = GetUserID(); string sUrl = zsgGame.Login(iUserID.ToString(), sGameAbbre); if (GameLogin(sGameAbbre)) { GameLoginBLL.GameLoginAdd(iUserID, sGameAbbre, ProvideCommon.GetRealIP(), sUrl); } Response.Write(string.Format("<script>location.href='{0}'</script>", sUrl)); return; } else { Server.Transfer("zsgcl.aspx", false); } }
protected void Page_Load(object sender, EventArgs e) { string agentid = CYRequest.GetString("agentid"); string sign = CYRequest.GetString("sign");//md5(agentid + TICKEY) string TICKEY = "dao50GSel_ko(*dg_)12:?do"; StringBuilder sbText = new StringBuilder(50); sbText.Append(agentid); sbText.Append(TICKEY); string sValSign = ProvideCommon.MD5(sbText.ToString()); if (sign == sValSign) { Response.Write(GameBLL.GameDBXml()); } else { Response.Write("-1"); } }
public string PageRefresh() { string sUrl = CYRequest.GetString("url"); string sMsg = string.Empty; if (sUrl == "" || sUrl == "unsafe string") { //sMsg = string.Format("<script>parent.location.reload();</script>", sUrl); //sMsg = string.Format("<script>parent.location.href=parent.location.href+'?'+ Math.random();</script>", sUrl); sMsg = "<script>parent.location.href=parent.location.href;</script>"; } else { //sMsg = string.Format("<script>window.parent.location.href='{0}'+'?'+ Math.random();</script>", sUrl); sUrl = sUrl.Split('?')[0]; string sMD5Time = ProvideCommon.MD5(DateTime.Now.ToString()); sMsg = string.Format("<script>parent.location.href='{0}?{1}'</script>", sUrl, sMD5Time); } return(sMsg); }
public static string VPaySubmit() { string sRes = string.Empty; //'接受服务器url get参数 string rtmd5 = CYRequest.GetString("v1"); // '服务器MD5 string trka = CYRequest.GetString("v2"); // 'V币号码15位 string rtmi = CYRequest.GetString("v3"); // '密码'V币密码6位 (可能为空 老V币没有密码) string rtmz = CYRequest.GetString("v4"); // '面值1-999 整数 string rtlx = CYRequest.GetString("v5"); // '卡的类型 1 2 3 string rtoid = CYRequest.GetString("v6"); // '网盈一号通服务器端订单 string rtcoid = CYRequest.GetString("v7"); // '商户自己订单 string rtuserid = CYRequest.GetString("v8"); // '商户的用户ID string rtcustom = CYRequest.GetString("v9"); //'商户自己定义数据 string rtflag = CYRequest.GetString("v10"); // '返回状态. 1正常发送 2补单发送 StringBuilder sbText = new StringBuilder(); sbText.Append(trka); sbText.Append(rtmi); sbText.Append(rtoid); sbText.Append(spid); sbText.Append(sppwd); sbText.Append(rtcoid); sbText.Append(rtflag); sbText.Append(rtmz); string get_key = sbText.ToString();//string get_key = trka + rtmi + rtoid + spid + sppwd + rtcoid + rtflag + rtmz; //'卡+密+网盈一号通服务器端订单+ 5位spid+ 18位SP密码+商户订单+rtflag返回类型1或2 +面值 //'LCase函数是将字符转换为小写; Ucase函数是将字符转换为大写 //'全国声讯支付联盟全国声讯电话支付接口对MD5值只认大写字符串,所以小写的MD5值得转换为大写 string md5password = ProvideCommon.MD5(get_key).ToUpper(); // '先MD5 32 然后转大写 if (md5password == rtmd5) { string sTranID = string.Format("{0}{1}", rtcoid, rtcustom.Split('|')[0]); sRes = string.Format("0|{0}", sTranID); } else { sRes = "1"; } return(sRes); }