Medical/Html/ajax/pwd.ashx.cs

(开头部分) 2KB

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

using System;
using System.Collections.Generic;
using System.Web.SessionState;
using System.Web;
using System.Collections;

namespace WebApplication.Html.ajax
{
    /// <summary>
    /// pwd 的摘要说明
    /// </summary>
    public class pwd : IHttpHandler,IRequiresSessionState
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //context.Response.Write("Hello World");
            if (context.Session["LoginLoginName"] != null) 
            {
                if (context.Request["channelid"] != null && context.Request["classid"] != null)
                {
                    int channelid = int.Parse(context.Request["channelid"].ToString());
                    Model.Models.GZXX_Model model = new Model.Models.GZXX_Model();
                    BLL.Models.GZXX_Model bll = new BLL.Models.GZXX_Model();
                    model = bll.GetModelInfo(channelid);
                    if (model == null)
                    {
                        context.Response.Write("参数错误!");
                    }
                    else
                    {
                        Hashtable ht = new Hashtable();
                        //ht["Title"] = context.Session["LoginTitle"].ToString();
                        //ht["infoid"] = context.Session["LoginInfoID"].ToString();
                        ht.Add("infoid", context.Session["LoginInfoID"].ToString());
                        ht.Add("Title", context.Session["LoginTitle"].ToString());
                        for (int i = 0; i < context.Request.Form.Count; i++)
                        {
                            ht.Add(context.Request.Form.Keys[i].ToString(), context.Request.Form[i].ToString());
                        }
                        if (bll.EditContent(model.modeltable, ht))
                        {
                            context.Session["LoginPic"] = ht["pic"];
                            context.Response.Write("密码修改成功!");
                        }
                        else
                        {
                            context.Response.Write("密码修改失败,请稍后再试!");
                        }
                    }
                }
                else
                {
                    context.Response.Write("参数错误!");
                }
            }
            else 
            {
                context.Response.Write("登录超时!");
后面还有 12 行代码,购买后查看完整代码

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

AI 解读

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

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