// Token: 0x0600006A RID: 106 RVA: 0x00007D00 File Offset: 0x00005F00 public FPController() { if (this.rawurl.IndexOf("/") >= 0) { this.rawpath = this.rawurl.Substring(0, this.rawurl.LastIndexOf("/")); this.rawpath += "/"; } else { this.rawpath = this.webpath; } this.fullurl = this.rawurl.Substring(this.webpath.Length); if (this.fullurl.IndexOf("?") >= 0) { this.cururl = this.fullurl.Substring(0, this.fullurl.IndexOf("?")); } else { this.cururl = this.fullurl; } if (this.cururl.IndexOf("/") > 0) { this.curpath = this.cururl.Substring(0, this.cururl.LastIndexOf("/")); this.curpath += "/"; } this.adminpath = this.webpath + "admin/"; this.plupath = this.webpath + "plugins/"; string[] array = this.fullurl.Split(new char[] { '/' }); this.fullname = array[array.Length - 1]; if (this.cururl.IndexOf("/") >= 0) { this.sitepath = this.cururl.Substring(0, this.cururl.IndexOf("/")); } else { this.sitepath = WebConfig.SitePath; } this.siteconfig = SiteConfigs.GetSiteInfo(this.sitepath); this.pagetitle = this.siteconfig.sitetitle; this.AddMetaSeo(this.siteconfig.keywords, this.siteconfig.description, this.siteconfig.otherhead); this.ispost = FPRequest.IsPost(); this.isget = FPRequest.IsGet(); this.isfile = FPRequest.IsPostFile(); this.link = this.pagename; this.action = FPRequest.GetString("action").ToLower(); this.browser = this.getBrowserName(); this.isie = this.browser.StartsWith("ie"); }
// Token: 0x06000055 RID: 85 RVA: 0x000038E8 File Offset: 0x00001AE8 public static SiteConfig GetSiteInfo(string sitepath) { SiteConfig siteConfig = FPCache.Get <SiteConfig>("FP_SITECONFIG_" + sitepath); lock (SiteConfigs.lockHelper) { if (siteConfig == null) { string mapPath; if (sitepath == "") { mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "site.config"); } else if (File.Exists(FPUtils.GetMapPath(WebConfig.WebPath + "sites/" + sitepath + "/site.config"))) { mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "sites/" + sitepath + "/site.config"); } else if (File.Exists(FPUtils.GetMapPath(WebConfig.WebPath + sitepath + "/site.config"))) { mapPath = FPUtils.GetMapPath(WebConfig.WebPath + sitepath + "/site.config"); } else { mapPath = FPUtils.GetMapPath(WebConfig.WebPath + "site.config"); } if (!File.Exists(mapPath)) { FPSerializer.Save <SiteConfig>(mapPath); } FPCache.Insert("FP_SITECONFIG_" + sitepath, SiteConfigs.LoadConfig(mapPath), mapPath); siteConfig = FPCache.Get <SiteConfig>("FP_SITECONFIG_" + sitepath); } } siteConfig.sitepath = sitepath; return(siteConfig); }
public FPController() { port = FPArray.SplitInt(domain, ":", 2)[1]; if (rawurl.IndexOf("/") >= 0) { if (rawurl.IndexOf("?") >= 0) { rawpath = rawurl.Substring(0, rawurl.IndexOf("?")); rawpath = rawpath.Substring(0, rawpath.LastIndexOf("/")) + "/"; } else { rawpath = rawurl.Substring(0, rawurl.LastIndexOf("/")) + "/"; } } else { rawpath = webpath; } cururl = rawurl.Substring(webpath.Length); pageurl = pagename; if (cururl.Contains("?")) { curname = cururl.Substring(0, cururl.IndexOf("?")); query = cururl.Substring(cururl.IndexOf("?") + 1); pageurl = pagename + "?" + query; } else { curname = cururl; } if (curname.IndexOf("/") > 0) { curpath = curname.Substring(0, curname.LastIndexOf("/")) + "/"; } if (curname.IndexOf("/") >= 0) { sitepath = curname.Substring(0, curname.IndexOf("/")); } else { sitepath = WebConfig.SitePath; } if (sitepath == "sites") { sitepath = curpath.Substring(curpath.IndexOf("/") + 1).TrimEnd('/'); } if (!Directory.Exists(FPFile.GetMapPath(webpath + sitepath))) { sitepath = WebConfig.SitePath; } pagepath = webpath + sitepath + "/"; siteinfo = SiteConfigs.GetSiteInfo(sitepath); adminpath = webpath + "admin/"; plupath = webpath + "plugins/"; apppath = webpath + "app/"; sitetitle = siteinfo.sitetitle; pagetitle = siteinfo.sitetitle; CreateSeoInfo(siteinfo.keywords, siteinfo.description, siteinfo.otherhead); ispost = FPRequest.IsPost(); isget = FPRequest.IsGet(); isfile = FPRequest.IsPostFile(); action = FPRequest.GetString("action"); op = FPRequest.GetInt("op"); try { ua = HttpContext.Current.Request.UserAgent.ToLower(); } catch { } browser = getBrowserName(ua, out isie); args = FPArray.SplitString(Path.GetFileNameWithoutExtension(pagename), "-"); }