コード例 #1
0
ファイル: SkinsController.cs プロジェクト: danludwig/UCosmic
 public virtual PartialViewResult Logo()
 {
     var model = new LogoInfo();
     var skin = HttpContext.SkinCookie();
     if (!string.IsNullOrWhiteSpace(skin)
         && Url.IsLocalUrl(string.Format("~/content/skins/{0}/head-logo.png", skin))
         && System.IO.File.Exists(Server.MapPath(string.Format("~/content/skins/{0}/head-logo.png", skin))))
     {
         model.SkinName = skin;
     }
     return PartialView(model);
 }
コード例 #2
0
 public virtual PartialViewResult Logo()
 {
     var model = new LogoInfo();
     var cookie = Request.Cookies["skin"];
     if (cookie != null && !string.IsNullOrWhiteSpace(cookie.Value)
         && Url.IsLocalUrl(string.Format("~/content/skins/{0}/head-logo.png", cookie.Value))
         && System.IO.File.Exists(Server.MapPath(string.Format("~/content/skins/{0}/head-logo.png", cookie.Value))))
     {
         model.SkinName = cookie.Value;
     }
     return PartialView(model);
 }