Web/Tools/ReSetPwd.ashx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;
namespace Web.Tools
{
/// <summary>
/// ReSetPwd 的摘要说明
/// </summary>
public class ReSetPwd : IHttpHandler,IReadOnlySessionState
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string newPwd = context.Request["password"].ToString();
BLL.Member bll = new BLL.Member();
newPwd = Common.DESEncrypt.Encrypt(newPwd);
string photo = context.Request["tel"].ToString();
string token = context.Request["token"].ToString();
if (token == context.Session["validataCode"].ToString())
{
if (bll.UpdateFieldByUserName(newPwd, photo))
{
context.Session["validataCode"] = null;
context.Response.Redirect("../Login.aspx");
}
else
{
context.Response.Write("修改失败!");
}
}
else
{
context.Response.Write("Error!");
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。