Exemplo n.º 1
0
 private void Page_Load(System.Object sender, System.EventArgs e)
 {
     RegisterResources();
         Response.CacheControl = "no-cache";
         Response.AddHeader("Pragma", "no-cache");
         Response.Expires = -1;
         m_refContent = m_refContentApi.EkContentRef;
         m_refMsg = m_refContentApi.EkMsgRef;
         if (m_refContent.IsAllowed(0, 0, "users", "IsLoggedIn", 0) == false || m_refContent.IsAllowed(0, 0, "users", "IsAdmin", 0) == false)
         {
             if (!m_refContent.IsARoleMember(Convert.ToInt64(EkEnumeration.CmsRoleIds.AdminXmlConfig), m_refContent.RequestInformation.UserId, false))
             {
                 Utilities.ShowError(m_refMsg.GetMessage("com: user does not have permission"));
             }
         }
         if (!String.IsNullOrEmpty(Request.QueryString["action"]))
         {
             m_strPageAction = Request.QueryString["action"].ToLower();
         }
         if (!String.IsNullOrEmpty(Request.QueryString["LangType"]))
         {
             ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
             m_refApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
         }
         else
         {
             if (m_refApi.GetCookieValue("LastValidLanguageID") != "")
             {
                 ContentLanguage = int.Parse(m_refApi.GetCookieValue("LastValidLanguageID"));
             }
         }
         m_refApi.ContentLanguage = ContentLanguage;
         StyleSheetJS.Text = m_refStyle.GetClientScript();
 }