Web/ajax/SendPassword.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*********************************************************************
 * CopyRight (c) 2009-2010 HangJing Teconology. All Rights Reserved.
 * Function : 异步发送邮件
 *  at 2010-8-11 21:39:33.
 
*********************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Xml;
using System.Data;

using WMPT.SQLServerDAL;
using WMPT.Model;

public partial class Themes_Default_Ajax_SendPassword : System.Web.UI.Page
{
    ECustomer dal = new ECustomer();
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();

        string User_Emial = WebUtility.InputText(Request["email"]);
        string name = Server.UrlDecode( WebUtility.InputText(Request["name"]));

        string sql = "email = '"+User_Emial+"' and name = '"+name+"'";
        IList<ECustomerInfo> list = dal.GetList(1 , 1 , sql , "dataid" , 1);
        if (list.Count == 1)
        {
            string codebuildtime = DateTime.Now.AddDays(2).ToString();
            string ActivateCode = WebUtility.RandStr(25);
            sql = " update ECustomer set ActivateCode = '" + ActivateCode + "',buildtime = '" + codebuildtime + "' where dataid =" + list[0].DataID;
            WebUtility.excutesql(sql);

            string Title = "找回您的帐户密码";
            string Body = SectionProxyData.GetSetValue(35);
            Body = Body.Replace("{username}", list[0].Name);
            Body = Body.Replace("{activetime}", codebuildtime);

            string url = WebUtility.GetConfigsite() + "/updatepwd.aspx?mycode=" + ActivateCode + "&email=" + list[0].EMAIL;
            string urlhtml = "<a href='" + url + "'>" + url + "</a>";
            Body = Body.Replace("{url}", urlhtml);

            // WMPT.AppLog.AppLog.Info("找回密码url=:" + url + "发送内容:" + Body);

            SysMailMessage mail = new SysMailMessage(User_Emial, Title, Body);
            bool res = mail.Send();
            if (res)
            {
                Response.Write("1");
            }
后面还有 13 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。