// Token: 0x0600025C RID: 604 RVA: 0x00007D3C File Offset: 0x00005F3C public static bool SaveConfig(RegConfig regconfig) { string mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "config/reg.config"); FPCache.Remove("FP_REGCONFIG"); return(FPSerializer.Save <RegConfig>(regconfig, mapPath)); }
// Token: 0x06000014 RID: 20 RVA: 0x0000307C File Offset: 0x0000127C protected override void View() { if (this.ispost) { if (this.action == "delete") { DbHelper.ExecuteDelete <AttachType>(FPRequest.GetString("chkdel")); FPCache.Remove("FP_ATTACHTYPE", "image,flash,media,file"); } else if (this.action == "add") { AttachType attachType = FPRequest.GetModel <AttachType>(); DbHelper.ExecuteInsert <AttachType>(attachType); FPCache.Remove("FP_ATTACHTYPE" + attachType.type); } else if (this.action == "edit") { AttachType attachType = DbHelper.ExecuteModel <AttachType>(this.id); attachType = FPRequest.GetModel <AttachType>(attachType, "edit_"); DbHelper.ExecuteUpdate <AttachType>(attachType); FPCache.Remove("FP_ATTACHTYPE" + attachType.type); } base.Response.Redirect(this.pagename); } OrderByParam orderby = DbHelper.MakeOrderBy("type", OrderBy.ASC); this.attachlist = DbHelper.ExecuteList <AttachType>(orderby, new SqlParam[0]); base.SaveRightURL(); }
// Token: 0x06000078 RID: 120 RVA: 0x0000AAF4 File Offset: 0x00008CF4 protected override void View() { this.channellist = ChannelBll.GetChannelList(); if (this.channelid == 0 && this.channellist.Count > 0) { this.channelid = this.channellist[0].id; } if (this.ispost) { if (!this.isperm) { this.ShowErr("对不起,您没有权限操作。"); return; } int @int = FPRequest.GetInt("id"); if (this.action.Equals("delete")) { SortInfo sortInfo = DbHelper.ExecuteModel <SortInfo>(@int); if (DbHelper.ExecuteDelete <SortInfo>(@int) > 0) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat("DELETE FROM [{0}WMS_SortInfo] WHERE [id] IN (SELECT [id] FROM [{0}WMS_SortInfo] WHERE [parentlist] LIKE '{1},%');", DbConfigs.Prefix, sortInfo.parentlist); stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [subcounts]=[subcounts]-1 WHERE [id]={1};", DbConfigs.Prefix, sortInfo.parentid); DbHelper.ExecuteSql(stringBuilder.ToString()); } } FPCache.Remove("FP_SORTTREE" + this.channelid.ToString()); base.Response.Redirect("sortmanage.aspx?channelid=" + this.channelid); } this.sortlist = SortBll.GetSortList(this.channelid, 0); base.SaveRightURL(); }
// Token: 0x06000047 RID: 71 RVA: 0x00004A84 File Offset: 0x00002C84 public static bool SaveConfig(EmailConfig emailconfig) { string mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "config/email.config"); FPCache.Remove("FP_EMAILCONFIG"); return(FPSerializer.Save <EmailConfig>(emailconfig, mapPath)); }
// Token: 0x06000076 RID: 118 RVA: 0x0000A94C File Offset: 0x00008B4C protected override void View() { SqlParam[] sqlparams = new SqlParam[] { DbHelper.MakeAndWhere("channelid", this.channelid), DbHelper.MakeAndWhere("parentid", this.parentid) }; OrderByParam orderby = DbHelper.MakeOrderBy("display", OrderBy.ASC); this.sortlist = DbHelper.ExecuteList <SortInfo>(orderby, sqlparams); if (this.ispost) { int num = 0; foreach (SortInfo sortInfo in this.sortlist) { this.sortlist[num].display = FPRequest.GetInt("display_" + sortInfo.id); DbHelper.ExecuteUpdate <SortInfo>(this.sortlist[num]); FPCache.Remove("FP_SORTTREE" + sortInfo.channelid); num++; } base.Response.Redirect(string.Concat(new object[] { "sortdisplay.aspx?channelid=", this.channelid, "&parentid=", this.parentid })); } base.SaveRightURL(); }
// Token: 0x06000028 RID: 40 RVA: 0x00003C28 File Offset: 0x00001E28 public static bool SaveConfig(ExamConfig examconfig) { string mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "config/exam.config"); FPCache.Remove("ExamConfig"); return(FPSerializer.Save <ExamConfig>(examconfig, mapPath)); }
// Token: 0x06000006 RID: 6 RVA: 0x0000228C File Offset: 0x0000048C public static bool SaveConfig(SMSConfig smsconfig) { string mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "config/sms.config"); FPCache.Remove("FP_SMSCONFIG"); return(FPSerializer.Save <SMSConfig>(smsconfig, mapPath)); }
// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250 public static string GetAttachTypeArray(string type) { string text = FPCache.Get <string>("FP_ATTACHTYPE" + type); if (text == null) { SqlParam sqlParam = DbHelper.MakeAndWhere("type", type.ToLower()); List <AttachType> list = DbHelper.ExecuteList <AttachType>(new SqlParam[] { sqlParam }); StringBuilder stringBuilder = new StringBuilder(); foreach (AttachType attachType in list) { if (stringBuilder.ToString() != "") { stringBuilder.Append("\r\n"); } stringBuilder.Append(attachType.extension); stringBuilder.Append(","); stringBuilder.Append(attachType.maxsize); } text = stringBuilder.ToString(); FPCache.Insert("FP_ATTACHTYPE" + type, text, 120); } return(text); }
// Token: 0x06000003 RID: 3 RVA: 0x0000216C File Offset: 0x0000036C public static void RemoveSortCache() { List <ChannelInfo> list = new List <ChannelInfo>(); foreach (ChannelInfo channelInfo in list) { FPCache.Remove("FP_SORTTREE" + channelInfo.id); } }
// Token: 0x0600025B RID: 603 RVA: 0x00007CBC File Offset: 0x00005EBC public static RegConfig GetRegConfig() { RegConfig regConfig = FPCache.Get <RegConfig>("FP_REGCONFIG"); lock (RegConfigs.lockHelper) { if (regConfig == null) { string mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "config/reg.config"); regConfig = FPSerializer.Load <RegConfig>(mapPath); FPCache.Insert("FP_REGCONFIG", regConfig, mapPath); } } return(regConfig); }
// Token: 0x06000027 RID: 39 RVA: 0x00003BA8 File Offset: 0x00001DA8 public static ExamConfig GetExamConfig() { ExamConfig examConfig = FPCache.Get <ExamConfig>("ExamConfig"); lock (ExamConifgs.lockHelper) { if (examConfig == null) { string mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "config/exam.config"); examConfig = FPSerializer.Load <ExamConfig>(mapPath); FPCache.Insert("ExamConfig", examConfig, mapPath); } } return(examConfig); }
// Token: 0x06000046 RID: 70 RVA: 0x00004A04 File Offset: 0x00002C04 public static EmailConfig GetEmailConfig() { EmailConfig emailConfig = FPCache.Get <EmailConfig>("FP_EMAILCONFIG"); lock (EmailConfigs.lockHelper) { if (emailConfig == null) { string mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "config/email.config"); emailConfig = FPSerializer.Load <EmailConfig>(mapPath); FPCache.Insert("FP_EMAILCONFIG", emailConfig, mapPath); } } return(emailConfig); }
// Token: 0x0600028A RID: 650 RVA: 0x000097D4 File Offset: 0x000079D4 public static long GetSysSize() { object obj = FPCache.Get("CACHE_SYSSIZE"); long num; if (obj == null) { num = WMSUtils.DirSize(WebConfig.WebPath); FPCache.Insert("CACHE_SYSSIZE", num, 10); } else { num = (long)obj; } return(num); }
// Token: 0x06000005 RID: 5 RVA: 0x000021E4 File Offset: 0x000003E4 public static SMSConfig GetSMSConfig() { SMSConfig smsconfig = FPCache.Get <SMSConfig>("FP_SMSCONFIG"); lock (SMSConfigs.lockHelper) { if (smsconfig == null) { string mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "config/sms.config"); smsconfig = FPSerializer.Load <SMSConfig>(mapPath); if (smsconfig.posturl == "") { smsconfig.posturl = "http://sms.106jiekou.com/utf8/sms.aspx"; } FPCache.Insert("FP_SMSCONFIG", smsconfig, mapPath); } } return(smsconfig); }
// 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(); }
// Token: 0x06000268 RID: 616 RVA: 0x00008252 File Offset: 0x00006452 public static void ReSetConfig() { FPCache.Remove("FP_SMSCONFIG"); SMS.smsconfig = SMSConfigs.GetSMSConfig(); }
// Token: 0x0600006D RID: 109 RVA: 0x00009C14 File Offset: 0x00007E14 protected override void View() { if (this.id > 0) { this.sortinfo = DbHelper.ExecuteModel <SortInfo>(this.id); this.parentid = this.sortinfo.parentid; this.channelid = this.sortinfo.channelid; this.appid = this.sortinfo.appid; } else { SortInfo sortInfo = SortBll.GetSortInfo(this.parentid); this.appid = sortInfo.appid; } if (this.ispost) { this.sortinfo.hidden = 0; this.sortinfo.types = ""; this.sortinfo = FPRequest.GetModel <SortInfo>(this.sortinfo); if (this.sortinfo.channelid == 0) { this.ShowErr("请选择栏目频道。"); return; } if (this.sortinfo.name == "") { this.ShowErr("栏目名称不能为空。"); return; } if (this.isfile) { HttpPostedFile postedFile = FPRequest.Files["uploadimg"]; UpLoad upLoad = new UpLoad(); string json = upLoad.FileSaveAs(postedFile, "image", this.user, false, false, 16, 16); JsonData jsonData = JsonMapper.ToObject(json); if (jsonData["error"].ToString() == "") { if (this.sortinfo.icon != "") { if (File.Exists(FPUtils.GetMapPath(this.sortinfo.icon))) { File.Delete(FPUtils.GetMapPath(this.sortinfo.icon)); } } this.sortinfo.icon = jsonData["filename"].ToString(); } } string text = "0"; SortInfo sortInfo2 = new SortInfo(); if (this.sortinfo.id > 0) { if (DbHelper.ExecuteUpdate <SortInfo>(this.sortinfo) > 0) { if (this.sortinfo.parentid != this.parentid) { text = this.sortinfo.parentlist; if (this.sortinfo.parentid > 0) { sortInfo2 = DbHelper.ExecuteModel <SortInfo>(this.sortinfo.parentid); this.sortinfo.parentlist = sortInfo2.parentlist + "," + this.sortinfo.id; } else { this.sortinfo.parentlist = "0," + this.sortinfo.id.ToString(); } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [parentlist]='{1}' WHERE [id]={2}|", DbConfigs.Prefix, this.sortinfo.parentlist, this.sortinfo.id); if (DbConfigs.DbType == DbType.Access) { stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [parentlist] =REPLACE([parentlist], '{1}', '{2}', 1, 1) WHERE [id] IN (SELECT [id] FROM [{0}WMS_SortInfo] WHERE [parentlist] LIKE '{3},%')|", new object[] { DbConfigs.Prefix, text, this.sortinfo.parentlist, text }); } else { stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [parentlist] =STUFF([parentlist],1,{1},'{2}') WHERE [id] IN (SELECT [id] FROM [{0}WMS_SortInfo] WHERE [parentlist] LIKE '{3},%')|", new object[] { DbConfigs.Prefix, text.Length, this.sortinfo.parentlist, text }); } stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [subcounts]=[subcounts]-1 WHERE [id]={1}|", DbConfigs.Prefix, this.parentid); stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [subcounts]=[subcounts]+1 WHERE [id]={1}", DbConfigs.Prefix, this.sortinfo.parentid); DbHelper.ExecuteSql(stringBuilder.ToString()); } if (this.sortinfo.channelid != this.channelid && this.parentid == 0) { string sqlstring = string.Format("UPDATE [{0}WMS_SortInfo] SET [channelid]={1} WHERE [id] IN (SELECT [id] FROM [{0}WMS_SortInfo] WHERE [parentlist] LIKE '{2},%')", DbConfigs.Prefix, this.sortinfo.channelid, this.sortinfo.parentlist); DbHelper.ExecuteSql(sqlstring); } } base.AddMsg("更新栏目成功!"); } else { SqlParam[] sqlparams = new SqlParam[] { DbHelper.MakeAndWhere("parentid", this.parentid), DbHelper.MakeAndWhere("channelid", this.channelid) }; this.sortinfo.display = FPUtils.StrToInt(DbHelper.ExecuteMax <SortInfo>("display", sqlparams).ToString()) + 1; this.id = DbHelper.ExecuteInsert <SortInfo>(this.sortinfo); if (this.id > 0) { if (this.sortinfo.parentid > 0) { sortInfo2 = DbHelper.ExecuteModel <SortInfo>(this.sortinfo.parentid); text = sortInfo2.parentlist + "," + this.id; } else { text = text + "," + this.id; } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [parentlist]='{1}' WHERE [id]={2}|", DbConfigs.Prefix, text, this.id); stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [subcounts]=[subcounts]+1 WHERE [id]={1}", DbConfigs.Prefix, this.sortinfo.parentid); DbHelper.ExecuteSql(stringBuilder.ToString()); } base.AddMsg("添加栏目成功!"); } FPCache.Remove("FP_SORTTREE" + this.sortinfo.channelid); this.link = "sortmanage.aspx?channelid=" + this.sortinfo.channelid; } SqlParam[] sqlparams2 = new SqlParam[] { DbHelper.MakeAndWhere("parentid", 0), DbHelper.MakeAndWhere("channelid", this.channelid), DbHelper.MakeAndWhere("id", WhereType.NotEqual, this.id) }; OrderByParam orderby = DbHelper.MakeOrderBy("display", OrderBy.ASC); this.channellist = DbHelper.ExecuteList <ChannelInfo>(orderby, new SqlParam[0]); this.sortlist = DbHelper.ExecuteList <SortInfo>(orderby, sqlparams2); this.sortapplist = DbHelper.ExecuteList <SortAppInfo>(OrderBy.ASC); SqlParam sqlParam = DbHelper.MakeAndWhere("parentid", 0); this.typelist = DbHelper.ExecuteList <TypeInfo>(orderby, new SqlParam[] { sqlParam }); base.SaveRightURL(); }
// Token: 0x06000053 RID: 83 RVA: 0x00007374 File Offset: 0x00005574 protected override void View() { if (this.ispost) { if (!this.isperm) { this.ShowErr("对不起,您没有权限操作。"); return; } int @int = FPRequest.GetInt("appid"); AppInfo appInfo = DbHelper.ExecuteModel <AppInfo>(@int); string mapPath = FPUtils.GetMapPath(this.webpath + appInfo.installpath); if (this.action == "delete") { if (DbHelper.ExecuteDelete <AppInfo>(@int) > 0) { foreach (string text in FPUtils.SplitString(appInfo.files)) { if (text.StartsWith("bin/")) { if (File.Exists(FPUtils.GetMapPath(WebConfig.WebPath + text))) { File.Delete(FPUtils.GetMapPath(WebConfig.WebPath + text)); } } if (File.Exists(mapPath + "/" + text)) { if (text.EndsWith(".sql")) { if (text.ToLower().EndsWith("access_un.sql") && DbConfigs.DbType == DbType.Access) { string sqlstring = FPFile.ReadFile(mapPath + "/" + text); DbHelper.ExecuteSql(sqlstring); } else if (text.ToLower().EndsWith("sqlserver_un.sql") && DbConfigs.DbType == DbType.SqlServer) { string sqlstring = FPFile.ReadFile(mapPath + "/" + text); DbHelper.ExecuteSql(sqlstring); } } File.Delete(mapPath + "/" + text); } } if (Directory.Exists(mapPath)) { DirectoryInfo directoryInfo = new DirectoryInfo(mapPath); if (directoryInfo.GetFiles().Length == 0) { directoryInfo.Delete(true); } } SqlParam sqlParam = DbHelper.MakeAndWhere("appid", @int); DbHelper.ExecuteDelete <SortAppInfo>(new SqlParam[] { sqlParam }); } FPCache.Remove("FP_SORTTREE"); base.Response.Redirect("appmanage.aspx"); } } this.applist = DbHelper.ExecuteList <AppInfo>(OrderBy.ASC); base.SaveRightURL(); }
// Token: 0x06000024 RID: 36 RVA: 0x00002FE6 File Offset: 0x000011E6 public static void ReSetConfig() { FPCache.Remove("FP_EMAILCONFIG"); Email.emailconfig = EmailConfigs.GetEmailConfig(); }