Publics/FileDownLoadX.ashx.cs

(开头部分) 4KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Web.SessionState;

namespace 客户订单管理2.Publics
{
    public class FileDownloadx : IHttpHandler, IRequiresSessionState
    {
        SqlCommandBuilder scb;
        SqlDataAdapter 数据适配器;
        SqlConnection 数据连接;
        DataTable 主表 = new DataTable();

        public void ProcessRequest(HttpContext context)
        {
            #region 权限检查
            if (context.Session["login"] == null || context.Session["login"].ToString() != "true")
            {
                context.Response.Write("<script>top.location.href='../Default.aspx';</script>");
                context.Response.End();
                return;
            }
            if (!系统.权限检查(context.Session["pageTitle"].ToString(), context.Session["username"].ToString(), context.Session["userclass"].ToString()))
            {
                context.Response.Write("<script>alert('缺少访问权限 !(请联系管理员)');</script>");
                context.Response.Write("<script>history.go(-1);</script>");
                context.Response.End();
                return;
            }
            #endregion
            
            string key = context.Request.QueryString["Key"].ToString();
            key = 系统.解密(key.Replace("_", "+"));
            string fieldName = context.Request.QueryString["Field"].ToString();
            fieldName = 系统.解密(fieldName.Replace("_", "+"));
            string tableName = context.Request.QueryString["Table"].ToString();
            tableName = 系统.解密(tableName.Replace("_", "+"));
            string keyValue = context.Session["keyValue"].ToString();
            string sql = "select " + fieldName + "," + fieldName + "_ from " + tableName + " where " + key + " = '" + keyValue + "'";
            数据连接 = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["默认连接_3HK0R6GAS"].ConnectionString);
            数据适配器 = new SqlDataAdapter();
            数据适配器.SelectCommand = new SqlCommand(sql, 数据连接);
            scb = new SqlCommandBuilder(数据适配器);
            try
            {
                数据连接.Open();
                数据适配器.Fill(主表);
                if (主表.Rows[0][fieldName].ToString().Trim() == "")
                {
                    context.Response.Write("<script>history.go(-1);</script>");
                }
                else
后面还有 51 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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