Views/UserCenter/Message.ashx

(开头部分) 10KB

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

<%@ WebHandler Language="C#" Class="Message" %>

using System;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using MicroDBHelper;
using MicroPublicHelper;
using MicroUserHelper;
using Newtonsoft.Json.Linq;
using MicroAuthHelper;

public class Message : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        MicroAuth.CheckLogin();

        string flag = MicroPublic.GetMsg("SaveURLError"),
            Action = context.Server.UrlDecode(context.Request.Form["action"]),
            ShortTableName = context.Server.UrlDecode(context.Request.Form["stn"]),
            MID = context.Server.UrlDecode(context.Request.Form["mid"]),
            NoticeID = context.Server.UrlDecode(context.Request.Form["noticid"]),
            PWD = context.Server.UrlDecode(context.Request.Form["v"]),
            Fields = context.Server.UrlDecode(context.Request.Form["fields"]);

        //测试数据
        //Action = "view";
        //Fields = "%5B%7B%22NoticeID%22:%222%22,%22Sort%22:%22%22,%22ShortTableName%22:%22ITGenForm%22,%22FormID%22:%221%22,%22FormsID%22:%221%22,%22FormNumber%22:%22IT2020080001%22,%22NoticeType%22:%22Msg%22,%22Title%22:%22IT%E9%80%9A%E7%94%A8%E7%94%B3%E8%AF%B7%E8%A1%A8%22,%22Content%22:%22Admin%20(%E7%AE%A1%E7%90%86%E5%91%98)%EF%BC%8C%E6%8F%90%E4%BA%A4%E4%BA%86%E3%80%8AIT%E9%80%9A%E7%94%A8%E7%94%B3%E8%AF%B7%E8%A1%A8%E3%80%8B%E7%94%B3%E8%AF%B7%EF%BC%8C%E7%BC%96%E5%8F%B7%EF%BC%9AIT2020080001%EF%BC%8C%E6%8B%9C%E6%89%98%E6%82%A8%E8%BF%9B%E8%A1%8C%E5%AE%A1%E6%89%B9%E3%80%82%22,%22IsRead%22:%22False%22,%22UID%22:%2215%22,%22SaveDraft%22:%22False%22,%22DateCreated%22:%222020/8/26%209:14:04%22,%22DateModified%22:%222020/8/26%209:14:04%22,%22Invalid%22:%22False%22,%22Del%22:%22False%22%7D%5D";

        if (!string.IsNullOrEmpty(Action))
        {
            Action = Action.ToLower();
            if (Action == "single" && !string.IsNullOrEmpty(NoticeID))
                SetSingleMsgRead(NoticeID);

            if (Action == "ready" && !string.IsNullOrEmpty(Fields))
                flag = SetMsgRead(context.Server.UrlDecode(Fields));

            if (Action == "unready" && !string.IsNullOrEmpty(Fields))
                flag = SetMsgUnread(context.Server.UrlDecode(Fields));

            if (Action == "readyall")
                flag = SetMsgReadAll();

            if (Action == "unreadytotal")
                flag = GetUnreadTotal();

            if (!string.IsNullOrEmpty(PWD) && !string.IsNullOrEmpty(Fields))
                flag = SetMsgDel(Action, PWD, Fields);

        }

        context.Response.Write(flag);
    }


    /// <summary>
后面还有 248 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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