// 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(); }
// 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(); }
private void btnLogin_Click(object sender, EventArgs e) { string username = this.username.Text; string password = this.password.Text; bool saveId = this.saveId.Checked; bool autoLogin = this.autoLogin.Checked; string loginResult = ""; var task = Task.Run(() => { LoginService login = new LoginService(); loginResult = login.login(username, password); }); var form = new frmWaitingBox(task); //等待界面 form.ShowDialog(); //login.cashTest(); if (loginResult.Equals("1")) { string rs = string.Empty; UserInfo user = (UserInfo)AffectCacheObject.Instance[Constants.USERKEY]; rs = user.userName + "----" + user.userPwd; if (autoLogin || saveId) { hand.WriterConfig("userName", user.userName); hand.WriterConfig("userPwd", user.userPwd); hand.WriterConfig("autoLogin", autoLogin ? "T" : "F"); hand.WriterConfig("saveId", saveId ? "T" : "F"); SysConfigInfo config = SysConfigs.Instance().GetConfig(); config.UserName = user.userName; config.UserPwd = user.userPwd; config.Token = autoLogin ? "T" : "F"; config.SaveId = saveId ? "T" : "F"; } // MessageBox.Show(rs); this.DialogResult = DialogResult.OK; } else { MessageBox.Show(loginResult); } }
// 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(); }