示例#1
0
        // Token: 0x0600002D RID: 45 RVA: 0x00004C98 File Offset: 0x00002E98
        protected override void View()
        {
            this.sysconfiginfo = SysConfigs.GetConfig();
            this.sitelist      = SiteBll.GetSiteList();
            Configuration configuration = WebConfigurationManager.OpenWebConfiguration("~");

            if (configuration.AppSettings.Settings["sitepath"] != null)
            {
                this.mainsite = configuration.AppSettings.Settings["sitepath"].Value;
            }
            CustomErrorsSection customErrorsSection = (CustomErrorsSection)configuration.GetSection("system.web/customErrors");

            if (customErrorsSection.Mode == CustomErrorsMode.Off)
            {
                this.customerror = 1;
            }
            this.adminsiteconfig = SiteConfigs.LoadConfig(FPUtils.GetMapPath(this.webpath + this.sysconfiginfo.adminpath + "/site.config"));
            if (this.ispost)
            {
                if (!this.isperm)
                {
                    this.ShowErr("对不起,您没有限权进行修改配置。");
                    return;
                }
                this.sysconfiginfo = FPRequest.GetModel <SysConfig>(this.sysconfiginfo);
                if (this.sysconfiginfo.admintitle == "")
                {
                    this.sysconfiginfo.admintitle = this.adminsiteconfig.sitetitle;
                }
                this.sysconfiginfo.passwordkey = WMSUtils.CreateAuthStr(10);
                WMSCookie.WriteCookie("password", DES.Encode(this.user.password, this.sysconfiginfo.passwordkey));
                SysConfigs.SaveConfig(this.sysconfiginfo);
                SysConfigs.ResetConfig();
                if (FPRequest.GetInt("customerror") != this.customerror)
                {
                    this.customerror = FPRequest.GetInt("customerror");
                    if (this.customerror == 1)
                    {
                        customErrorsSection.Mode = CustomErrorsMode.Off;
                    }
                    else
                    {
                        customErrorsSection.Mode = CustomErrorsMode.RemoteOnly;
                    }
                }
                if (configuration.AppSettings.Settings["sitepath"] != null)
                {
                    configuration.AppSettings.Settings["sitepath"].Value = FPRequest.GetString("mainsite");
                }
                else
                {
                    configuration.AppSettings.Settings.Add("sitepath", FPRequest.GetString("mainsite"));
                }
                configuration.Save(ConfigurationSaveMode.Modified);
                WebConfig.ReSet();
                base.AddMsg("更新配置成功!");
            }
            base.SaveRightURL();
        }
示例#2
0
 // Token: 0x0600004A RID: 74 RVA: 0x0000681C File Offset: 0x00004A1C
 protected override void View()
 {
     this.sysconfiginfo = SysConfigs.GetConfig();
     if (this.ispost)
     {
         if (!this.isperm)
         {
             this.ShowErr("对不起,您没有权限操作。");
             return;
         }
         this.sysconfiginfo = FPRequest.GetModel <SysConfig>(this.sysconfiginfo);
         SysConfigs.SaveConfig(this.sysconfiginfo);
         SysConfigs.ResetConfig();
     }
     base.SaveRightURL();
 }
示例#3
0
 // Token: 0x06000016 RID: 22 RVA: 0x000031C4 File Offset: 0x000013C4
 protected override void View()
 {
     if (this.ispost)
     {
         string @string = FPRequest.GetString("cache");
         foreach (string a in @string.Split(new char[]
         {
             ','
         }))
         {
             if (a == "sysconfig")
             {
                 this.sysconfig.passwordkey = WMSUtils.CreateAuthStr(10);
                 SysConfigs.SaveConfig(this.sysconfig);
                 WMSCookie.WriteCookie("password", DES.Encode(this.user.password, this.sysconfig.passwordkey));
                 SysConfigs.ResetConfig();
             }
             if (a == "syssort")
             {
                 CacheBll.RemoveSortCache();
             }
             if (a == "attachtype")
             {
                 FPCache.Remove("FP_ATTACHTYPE", "image,flash,media,file");
             }
             if (a == "siteconfig")
             {
                 List <SiteConfig> siteList = SiteBll.GetSiteList();
                 foreach (SiteConfig siteConfig in siteList)
                 {
                     FPCache.Remove("FP_SITECONFIG_" + siteConfig.sitepath);
                 }
             }
         }
         base.Response.Redirect("cachemanage.aspx");
     }
     base.SaveRightURL();
 }