System/js/Handler.ashx

(完整代码) 1KB

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

using System;
using System.Web;

public class Handler : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        if (context.Request["name"] != null && context.Request["pwd"] != null)
        {
            string name = context.Server.UrlDecode(context.Request.QueryString["name"]);
            string pwd = context.Server.UrlDecode(context.Request.QueryString["pwd"]);
            pwd = CommonLib.EncryptHelper.Encrypt(pwd, "MD5");

            string sql = "select count(*) from manager where manager_name='" + name + "' and manager_pwd='" + pwd + "'";
            int count = DB.ExecuteScalar(sql);
            if (count > 0)
            {
                sql = "select count(*) from manager where manager_name='" + name + "' and manager_state='正常'";
                count = DB.ExecuteScalar(sql);
                if (count > 0)
                {
                    HttpCookie cookies = context.Request.Cookies["Z-Chu"];
                    cookies = new HttpCookie("Z-Chu");
                    cookies.Values.Add("Manager", HttpUtility.UrlEncode(name));
                    cookies.Expires = DateTime.Now.AddHours(24);//1天有效24小时 
                    context.Response.Cookies.Set(cookies);//存储!~ 
                    context.Response.Write("1");
                }
                else
                {
                    context.Response.Write("-2");
                }
            }
            else
            {
                context.Response.Write("-1");
            }
        }
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}

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

AI 解读 AI

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

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