private void SetAdminParts()
 {
     HttpCookie authCookie = Request.Cookies[FormsAuthentication.FormsCookieName + "_" + GetAppPath() + "_" + GetPortalID];
     if (authCookie != null)
     {
         FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(authCookie.Value);
         string user = ticket.Name;
         if (user != string.Empty && user != ApplicationKeys.anonymousUser)
         {
             divAdminControlPanel.Visible = true;
             ApplicationController objAppController = new ApplicationController();
             objAppController.ChangeCss(Page, "pchWhole", "lytA", "sfOuterWrapper", "style", "margin-top:30px");
         }
     }
     else
     {
         divAdminControlPanel.Visible = false;
     }
     if (IsHandheld())
     {
         divAdminControlPanel.Visible = false;
     }
 }
示例#2
0
        /// <summary>
        /// Set Current Screen Width Parse From Preset XML File
        /// </summary>      

        public void SetScreenWidth(string userName)
        {
            string appendClass = " sfLoggedTopBar";
            if (userName.ToLower() == "anonymoususer")
            {
                appendClass = "";
            }
            PresetInfo preset = GetPresetDetails;
            if (preset.ActiveWidth != "")
            {
                ApplicationController objAppController = new ApplicationController();
                objAppController.ChangeCss(Page, "pchWhole", "lytA", "sfOuterWrapper", "class", "sf" + preset.ActiveWidth.ToLower() + appendClass);
            }
        }
 /// <summary>
 /// Set Current Screen Width Parse From Preset XML File
 /// </summary>
 public void SetScreenWidth()
 {
     PresetInfo preset = GetPresetDetails;
     if (preset.ActiveWidth != "")
     {
         ApplicationController objAppController = new ApplicationController();
         objAppController.ChangeCss(Page, "pchWhole", "lytA", "sfOuterWrapper", "class", "sf" + preset.ActiveWidth.ToLower());
     }
 }