Exemple #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();
        }
Exemple #2
0
 // Token: 0x0600031D RID: 797 RVA: 0x0000D4B0 File Offset: 0x0000B6B0
 protected override void View()
 {
     UserBll.UpdateUserState(this.userid, 0);
     WMSCookie.ClearUserCookie();
     this.Session["FP_OLUSERINFO"]      = null;
     this.Session["FP_ADMIN_LEFTMENU"]  = null;
     this.Session["FP_ADMIN_RIGHTMENU"] = null;
     this.Session["FP_ADMIN_TOPMENU"]   = null;
     this.Session.Abandon();
     base.AddMsg("已成功安全退出系统");
     base.SetMetaRefresh(2);
     this.action = "1";
 }
Exemple #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();
 }
Exemple #4
0
 // Token: 0x0600031B RID: 795 RVA: 0x0000D178 File Offset: 0x0000B378
 protected override void View()
 {
     this.regconfig = RegConfigs.GetRegConfig();
     if (this.reurl == "")
     {
         this.reurl = "index.aspx";
     }
     if (this.userid > 0)
     {
         base.Response.Redirect(this.reurl);
     }
     else if (this.ispost)
     {
         string @string = FPRequest.GetString("username");
         string string2 = FPRequest.GetString("password");
         if (@string == "")
         {
             this.ShowErr("帐号不能为空");
         }
         else if (string2 == "")
         {
             this.ShowErr("密码不能为空");
         }
         else
         {
             if (this.isseccode)
             {
                 if (FPRequest.GetString("verify").Equals(""))
                 {
                     this.ShowErr("验证码不能为空");
                     return;
                 }
                 if (string.Compare(this.Session["FP_VERIFY"].ToString().ToLower(), FPRequest.GetString("verify").ToLower(), true) != 0)
                 {
                     this.ShowErr("验证码错误");
                     return;
                 }
             }
             UserInfo userInfo = UserBll.CheckLogin(@string, string2);
             if (userInfo.id > 0)
             {
                 if (userInfo.roleid == 4)
                 {
                     this.ShowErr("对不起,该用户已被禁止登录");
                 }
                 else if (userInfo.roleid == 3)
                 {
                     if (this.regconfig.regverify == 1)
                     {
                         this.ShowErr("您需要等待一些时间, 待系统管理员审核您的帐户后才可登录使用");
                     }
                     else if (this.regconfig.regverify == 2)
                     {
                         this.ShowErr("请您到您的邮箱中点击激活链接来激活您的帐号");
                     }
                     else
                     {
                         this.ShowErr("抱歉, 您的用户身份尚未得到验证");
                     }
                 }
                 else
                 {
                     WMSCookie.WriteUserCookie(userInfo, FPUtils.StrToInt(FPRequest.GetString("expires"), -1), this.sysconfig.passwordkey);
                     this.Session["FP_OLUSERINFO"] = userInfo;
                     this.Session["FP_ROLEINFO"]   = userInfo.RoleInfo;
                     this.Session["FP_PERMISSION"] = new PermissionBll().GetPermissionList(userInfo.RoleInfo.permission);
                     SysBll.InsertLog(userInfo.id, userInfo.username, "用户登录", "登录用户:" + userInfo.username, true);
                     base.AddMsg("登录成功, 返回登录前页面");
                     base.SetMetaRefresh(2, this.reurl);
                     if (!this.iscuserr)
                     {
                         base.Response.Redirect(this.reurl);
                     }
                 }
             }
             else
             {
                 SysBll.InsertLog(userInfo.id, userInfo.username, "用户登录", "输入用户:" + @string + ",密码:" + string2, false);
                 this.ShowErr("帐号或密码错误");
             }
         }
     }
 }