Plugins/ProUpload.aspx.cs

(开头部分) 42KB

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

using System;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using EKETEAM.Data;
using EKETEAM.FrameWork;
using LitJson;

namespace eFrameWork.Plugins
{
    public partial class ProUpload : System.Web.UI.Page
    {
        public string formhost = "";
        private bool writeLog = true;
        public bool isMobile = false;
        private string tempPath = "";//临时文件夹
        private string backPath = "";//返回路径
        private string sourcePath = "";//源文件路径
        private string basePath = ""; //根目录
        protected void Page_Load(object sender, EventArgs e)
        {
            basePath = eRunTime.basePath;
            tempPath = eRunTime.tempPath;
            backPath = eRunTime.tempURL;
            sourcePath = eRunTime.sourcePathCurrent;

          

            #region 文件类型检查            
            if (Request.Files.Count > 0)
            {
                for (int i = 0; i < Request.Files.Count; i++)
                {
                    HttpPostedFile file = Request.Files[i];
                    string ext = file.FileName.fileExtension();
                    if(!eConfig.allowExtensions.Contains(ext))
                    {
                        if (Request.UrlReferrer != null && Request.UrlReferrer.PathAndQuery.ToLower().IndexOf("plugins/proupload.aspx") > -1)
                        {
                            Response.Write("<div style=\"font-size:12px;color:#ff0000;\">文件类型不允许上传!&nbsp;&nbsp;<a href=\"javascript:;\" style=\"color:#1F47F4;text-decoration:none;\" onclick=\"history.back();\">返回</a></div>");
                            Response.End();
                        }
                        else
                        {
                        }
                        eResult.Error("文件类型不允许上传!");
                    }
                }
            }
            #endregion
            string userAgent = HttpContext.Current.Request.ServerVariables["HTTP_USER_AGENT"].ToString().Replace(" ", "").ToLower();
            if (userAgent.IndexOf(";android") > -1 || userAgent.IndexOf("android;") > -1 || userAgent.IndexOf("iphone;") > -1 || userAgent.IndexOf("ipad;") > -1)
            {
                isMobile = true;
                imgFile.Attributes.Add("style", "width:90px;overflow:hidden;");
后面还有 774 行代码,解锁后查看完整代码

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

AI 解读

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

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