APCGC_CBS.Admin/Controllers/UserController.cs

(开头部分) 3KB

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

using APCGC_CBS.Admin.Code;
using APCGC_CBS.Common;
using APCGC_CBS.DAL.Admin;
using APCGC_CBS.Models.Admin;
using LitJson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace APCGC_CBS.Admin.Controllers
{
    public class UserController : BaseController
    {
        /// <summary>
        /// 更改登录密码
        /// </summary>
        /// <returns></returns>
        [CheckLogin]
        public ActionResult ChangePwd()
        {
            ViewBag.IsChangePassword = this.CurrentUser.IsChangePassword;
            return View();
        }

        /// <summary>
        /// 更改登录密码-提交
        /// </summary>
        /// <returns></returns>
        [CheckLogin]
        [HttpPost]
        public ActionResult ChangePwdSubmit()
        {
            try
            {
                string strRe = Request.Form.ToString();
                strRe = Server.UrlDecode(strRe);
                JsonData para = JsonMapper.ToObject(strRe);
                string strOldPwd = Convert.ToString(para["txtOldPwd"]);
                string strNewPwd = Convert.ToString(para["txtNewPwd"]);
                string strV_NewPwd = Convert.ToString(para["txtV_NewPwd"]);
                if (DEncrypt.Encrypt(strOldPwd) != this.CurrentUser.Password)
                {
                    return new JsonResult { Data = new { msg = "原登录密码不正确", success = "0",isfirst = '0' } };
                }
                if (strNewPwd != strV_NewPwd)
                {
                    return new JsonResult { Data = new { msg = "两次输入的密码不一致", success = "0", isfirst = '0' } };
                }
                DALUserInfo duser = new DALUserInfo();
                if (!duser.UpdatePassword(this.CurrentUser.User_ID, DEncrypt.Encrypt(strNewPwd)))
                {
                    return new JsonResult { Data = new { msg = "修改密码失败,请联系管理员", success = "0", isfirst = '0' } };
                }

                try
                {
                    string ClientIP = Convert.ToString(HttpContext.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
                    if (string.IsNullOrEmpty(ClientIP))
后面还有 25 行代码,购买后查看完整代码

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

AI 解读 AI

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

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