Meeting/Html/ajax/login.ashx.cs

(开头部分) 3KB

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

using BLL.Admin;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web;
using System.Web.SessionState;

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

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            if (context.Request["cardid"] != null && context.Request["password"] != null && context.Request["code"] != null)
            {
                if (context.Session["CheckCode"] == null) 
                {
                    context.Response.Write("验证码已过期!@@@");
                }
                else 
                {
                    if (context.Session["CheckCode"].ToString().ToUpper() != context.Request["code"].ToUpper())
                    {
                        context.Response.Write("验证码不正确!@@@");
                    }
                    else
                    {
                        SqlParameter[] param = new SqlParameter[] {
                            new SqlParameter("@CardID",SqlDbType.NVarChar),
                            new SqlParameter("@PassWord",SqlDbType.NVarChar)
                        };
                        param[0].Value = context.Request["cardid"];
                        param[1].Value = Admin.Tools.Base64.Base64Code(context.Request["password"]);
                        if (DBUtility.DbHelperSQL.Exists("select * from GZXX_U_UserTable where CardID = @CardID and PassWord = @PassWord ",param))
                        {
                            
                           
                            GZXX_UserTable ubll = new GZXX_UserTable();
                            DataTable dt = DBUtility.DbHelperSQL.Query("select * from GZXX_U_UserTable where CardID = @CardID and PassWord = @PassWord ",param).Tables[0];
                            context.Session["LoginName"] = dt.Rows[0]["CardID"].ToString();
                            context.Session["DepartID"] = dt.Rows[0]["DepartID"].ToString();
                            context.Session["InfoID"] = dt.Rows[0]["InfoID"].ToString();
                            ubll.LoginSetConfig(int.Parse(dt.Rows[0]["InfoID"].ToString()), new DBUtility.IPAddress().IP_Address, context.Request["cardid"]);
                            context.Response.Write("操作成功!@@@" + dt.Rows[0]["IsLogin"].ToString());
                        }
                        else 
                        {
                            context.Response.Write("用户名或密码错误!@@@");
                        }
                    }
                }
            }
            else 
            {
后面还有 14 行代码,购买后查看完整代码

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

AI 解读

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

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