Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_AdminInfo adminMod = B_Admin.GetLogin();
         ScenceFunc(adminMod.Theme);
         nameL.InnerHtml = "<span style='cursor:pointer;'>" + adminMod.AdminName + "</span>";
         AsyncInvokeFunc preFunc = InvokeFunc;
         preFunc.BeginInvoke(this, null, null);
         //---Logo后期改为拼接
         if (!string.IsNullOrEmpty(SiteConfig.SiteInfo.LogoAdmin))
         {
             zlogo3.Visible        = true;
             zlogo4.Visible        = true;
             newbody_logo2.Visible = true;
             zlogo3.InnerHtml      = ComRE.Img_NoPic(SiteConfig.SiteInfo.LogoAdmin, "");
             zlogo4.InnerHtml      = SiteConfig.SiteInfo.LogoPlatName;
         }
         else
         {
             zlogo1.Visible        = true;
             zlogo2.Visible        = true;
             newbody_logo1.Visible = true;
         }
         if (Call.AppSettValue("ShowedAD").ToLower().Equals("false"))
         {
             function.Script(this, "ShowStartScreen();");
         }
         if (Application["Page_Init"] == null)
         {
             Application["Page_Init"] = true; function.Script(this, "PrePageInit()");
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            IdentityAnalogue ia = new IdentityAnalogue();

            ia.CheckEnableSA();
            siteName = Server.UrlDecode(Request.Params["siteName"]);
            siteID   = Request.QueryString["siteID"];
            //SiteID无法获取到对应的,只能通过名字来访问了,ID需要通过循环遍历

            if ((string.IsNullOrEmpty(siteName) || iis.Sites[siteName] == null) && string.IsNullOrEmpty(siteID))
            {
                function.WriteErrMsg("未选择站点或要访问的站点不存在!!");
            }
            if (string.IsNullOrEmpty(siteID))
            {
                siteID = iis.Sites[siteName].Id.ToString();
            }
            else
            {
                siteName = iisHelper.GetNameBySiteID(siteID);
            }
            if (string.IsNullOrEmpty(siteName))
            {
                function.WriteErrMsg("未选择站 点或要访问的站点不存在!");
            }

            appName = iis.Sites[siteName].Applications[0].ApplicationPoolName;
            webPath = iis.Sites[siteName].Applications[0].VirtualDirectories[0].PhysicalPath + "\\web.config";
            //按1G的量计算剩余空间,1G=1073741824
            //piePercent = "['已用空间" + used+ "'," + (double)size / (double)banSize + "],['剩余空间',"+((double)1-(double)size / (double)banSize)+"]";//
            if (!IsPostBack)
            {
                AuthCheck();
                AsyncInvokeFunc     getSize    = getFileSize;//异步开始获取网站所占空间
                System.IAsyncResult asynResult = getSize.BeginInvoke(iis.Sites[siteName].Applications[0].VirtualDirectories[0].PhysicalPath, null, null);
                GetInfoLocal();
                piePercent = "['已用空间" + getSize.EndInvoke(asynResult) + "',1]";
            }
            Call.HideBread(Master);
        }