icent.Web/Admin/Function/Files/uploadAttachment.aspx.cs

(开头部分) 2KB

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

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using icent.Common;
using icent.Web.UI;

namespace icent.Web.Admin.Function.Files
{
    public partial class uploadAttachment : AdminPage
    {
        string type;
        string currentRootPath;
        string isShowAttachment;
        string addSpanClientID;
        string delSpanClientID;
        string textBoxClientID;

        protected void Page_Load(object sender, EventArgs e)
        {
            type = Request.QueryString["type"];
            currentRootPath = Request.QueryString["currentRootPath"];
            isShowAttachment = Request.QueryString["isShowAttachment"];
            addSpanClientID = Request.QueryString["addSpanClientID"];
            delSpanClientID = Request.QueryString["delSpanClientID"];
            textBoxClientID = Request.QueryString["textBoxClientID"];

            if (!IsPostBack)
            {
                myFile.Attributes.Add("onchange", "InputChange(this)");
            }
        }

        protected void Submit_OnClick(object sender, EventArgs e)
        {
            string fileName;
            string msg;
            int result = Common.Files.UploadFile(myFile, currentRootPath, out fileName, out msg);
            if (result == 1)
            {
                if (addSpanClientID != null && delSpanClientID != null && textBoxClientID != null)
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.parent.SelectAttachment('" + textBoxClientID + "','" + currentRootPath + fileName + "','showPopWin(\\'/Admin/Function/Files/viewFile.aspx?currentRootPath=" + currentRootPath + "&fileName=" + fileName + "\\',600, 400, _refresh);return false;','" + addSpanClientID + "','" + delSpanClientID + "');window.parent.hidePopWin();</script>");
                }
                else
                {
                    ltlMsg.Text = Utility.displayMsg(msg, 1, "window.parent.location=window.parent.location;", this.Page);
                }
            }
            else
            {
                ltlMsg.Text = Utility.displayMsg(msg, 2, "window.parent.location=window.parent.location;", this.Page);
            }
后面还有 4 行代码,解锁后查看完整代码

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

AI 解读

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

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