private void SetPageLoadPart()
 {
     ApplicationController objAppController = new ApplicationController();
     if (!objAppController.CheckRequestExtension(Request))
     {
         CoreJs.IncludeLanguageCoreJs(this.Page);
         SagePageLoadPart();
     }
 }
Пример #2
0
 /// <summary>
 /// Executes on prerendering of the page
 /// </summary>
 /// <param name="e">EventArgs e</param>
 protected override void OnPreRender(EventArgs e)
 {
     try
     {
         ApplicationController objAppController = new ApplicationController();
         if (!objAppController.CheckRequestExtension(Request))
         {
             base.OnPreRender(e);
             SetGoogleAnalytics();
             SageFrameConfig objSageConfig = new SageFrameConfig();
             bool IsCompressCss = bool.Parse(objSageConfig.GetSettingsByKeyIndividual(SageFrameSettingKeys.OptimizeCss));
             bool allowOptimization = bool.Parse(objSageConfig.GetSettingsByKeyIndividual(SageFrameSettingKeys.OptimizeJs));
             if (!isDefaultAdminPage())
             {
                 if (IsCompressCss)
                 {
                     BundleCss();
                 }
                 else
                 {
                     LoadModuleCss();
                 }
             }
             if (!IsAdmin() && allowOptimization)
             {
                 BundleJS();
             }
             else
             {
                 LoadModuleJs();
             }
             HttpContext.Current.Session[SessionKeys.ModuleCss] = new List<CssScriptInfo>();
             HttpContext.Current.Session[SessionKeys.ModuleJs] = new List<CssScriptInfo>();
             HttpContext.Current.Session.Remove(SessionKeys.ModuleJs);
             HttpContext.Current.Session.Remove(SessionKeys.ModuleCss);
         }
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
 public void ManageSSLConnection()
 {
     ApplicationController objAppController = new ApplicationController();
     if (!objAppController.CheckRequestExtension(Request))
     {
         if (Session[SessionKeys.Ssl] == null)
         {
             Session[SessionKeys.Ssl] = "True";
             //check logic redirect to or not
             //btn click login and logout prob
             PageController objController = new PageController();
             List<SecurePageInfo> sp = objController.GetSecurePage(currentportalID, GetCurrentCulture());
             string pagename = GetPageSEOName(PagePath);
             if (pagename != "Page-Not-Found")
             {
                 if (Session[SessionKeys.pagename] != null)
                 {
                     prevpage = Session[SessionKeys.pagename].ToString();
                 }
                 if (prevpage != pagename)
                 {
                     Session[SessionKeys.pagename] = pagename;
                     for (int i = 0; i < sp.Count; i++)
                     {
                         if (pagename.ToLower() == sp[i].SecurePageName.ToString().ToLower())
                         {
                             if (bool.Parse(sp[i].IsSecure.ToString()))
                             {
                                 if (!HttpContext.Current.Request.IsSecureConnection)
                                 {
                                     if (!HttpContext.Current.Request.Url.IsLoopback) //Don't check when in development mode (i.e. localhost)
                                     {
                                         Session[SessionKeys.prevurl] = "https";
                                         Response.Redirect(Request.Url.ToString().Replace("http://", "https://"));
                                     }
                                 }
                             }
                             else
                             {
                                 Session[SessionKeys.prevurl] = "http";
                                 Response.Redirect(Request.Url.ToString().Replace("https://", "http://"));
                             }
                         }
                     }
                 }
                 else if (Session[SessionKeys.prevurl] != null)
                 {
                     if (Session[SessionKeys.prevurl].ToString() != Request.Url.ToString().Split(':')[0].ToString())
                     {
                         for (int i = 0; i < sp.Count; i++)
                         {
                             if (pagename.ToLower() == sp[i].SecurePageName.ToString().ToLower())
                             {
                                 if (bool.Parse(sp[i].IsSecure.ToString()))
                                 {
                                     if (!HttpContext.Current.Request.IsSecureConnection)
                                     {
                                         if (!HttpContext.Current.Request.Url.IsLoopback) //Don't check when in development mode (i.e. localhost)
                                         {
                                             Response.Redirect(Request.Url.ToString().Replace("http://", "https://"));
                                         }
                                     }
                                 }
                                 else
                                 {
                                     Response.Redirect(Request.Url.ToString().Replace("https://", "http://"));
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
 private void SageInitPart()
 {
     try
     {
         ApplicationController objAppController = new ApplicationController();
         if (objAppController.IsInstalled())
         {
             if (!objAppController.CheckRequestExtension(Request))
             {
                 InitializePage();
                 SageFrameConfig sfConfig = new SageFrameConfig();
                 IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
                 SetAdminParts();
                 BindModuleControls();
             }
         }
         else
         {
             HttpContext.Current.Response.Redirect(ResolveUrl("~/Install/InstallWizard.aspx"));
         }
     }
     catch
     {
         //throw ex;
     }
 }
Пример #5
0
 private void SetPageLoadPart()
 {
     ApplicationController objAppController = new ApplicationController();
     if (!objAppController.CheckRequestExtension(Request))
     {
         SagePageLoadPart();
         StringBuilder sb = new StringBuilder();
     }
 }
Пример #6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="e"></param>
 protected override void OnPreRender(EventArgs e)
 {
     ApplicationController objAppController = new ApplicationController();
     if (!objAppController.CheckRequestExtension(Request))
     {
         base.OnPreRender(e);
         SetGoogleAnalytics();
         LoadModuleCss();
         LoadModuleJs();
         HttpContext.Current.Session[SessionKeys.ModuleCss] = new List<CssScriptInfo>();
         HttpContext.Current.Session[SessionKeys.ModuleJs] = new List<CssScriptInfo>();
     }
 }
Пример #7
0
 private void SetPageInitPart()
 {
     ltrJQueryLibrary.Text = GetJqueryLibraryPath();
     templateFavicon = SetFavIcon(GetActiveTemplate);
     Extension = SageFrameSettingKeys.PageExtension;
     ApplicationController objAppController = new ApplicationController();
     if (!objAppController.CheckRequestExtension(Request))
     {
         SageInitPart();
     }
     SetGlobalVariable();
 }
Пример #8
0
 private void SageInitPart()
 {
     ApplicationController objAppController = new ApplicationController();
     if (objAppController.IsInstalled())
     {
         if (!objAppController.CheckRequestExtension(Request))
         {
             SetPortalCofig();
             InitializePage();
             LoadMessageControl();
             BindModuleControls();
         }
     }
     else
     {
         HttpContext.Current.Response.Redirect(ResolveUrl("~/Install/InstallWizard.aspx"));
     }
 }
Пример #9
0
        private void SetPageLoadPart()
        {
            ApplicationController objAppController = new ApplicationController();
            if (!objAppController.CheckRequestExtension(Request))
            {
                //CoreJs.IncludeLanguageCoreJs(this.Page);
                SessionTrackerController sTracController = new SessionTrackerController();
                sTracController.SetSessionTrackerValues(currentportalID.ToString(), GetUsername);

            }
        }
 private void SageInitPart()
 {
     ApplicationController objAppController = new ApplicationController();
     if (objAppController.IsInstalled())
     {
         if (!objAppController.CheckRequestExtension(Request))
         {
             SetPortalCofig();
             InitializePage();
             hypUpgrade.NavigateUrl = "~/Admin/sfUpgrader" + Extension;
             SageFrameConfig sfConfig = new SageFrameConfig();
             IsUseFriendlyUrls = sfConfig.GetSettingBollByKey(SageFrameSettingKeys.UseFriendlyUrls);
             LoadMessageControl();
             BindModuleControls();
         }
     }
     else
     {
         HttpContext.Current.Response.Redirect(ResolveUrl("~/Install/InstallWizard.aspx"));
     }
 }
 private void SetPageInitPart()
 {
     string PageName = Path.GetFileNameWithoutExtension(PagePath);
     if (PageName != null)
     {
         userName = SecurityPolicy.GetUser(GetPortalID);
         templateFavicon = SetFavIcon(GetActiveTemplate);
         Extension = SageFrameSettingKeys.PageExtension;
         ApplicationController objAppController = new ApplicationController();
         if (!objAppController.CheckRequestExtension(Request))
         {
             SageInitPart();
         }
         SetGlobalVariable();
         bool IsAdmin = true;
         IncludeStartup(GetPortalID, pchHolder, IsAdmin);
     }
     else
     {
         Response.Redirect(PortalAPI.PageNotAccessibleURL);
     }
 }
Пример #12
0
 private void SageInitPart()
 {
     ApplicationController objAppController = new ApplicationController();
     if (objAppController.IsInstalled())
     {
         if (!objAppController.CheckRequestExtension(Request))
         {
             SetPortalCofig();
             InitializePage();
             hypUpgrade.NavigateUrl = "~/Admin/sfUpgrader" + Extension;
             LoadMessageControl();
             BindModuleControls();
             SageFrameConfig sfConfig = new SageFrameConfig();
             string defaultAdminTheme = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.DefaultAdminTheme);
             string adminSidebarPosition = sfConfig.GetSettingValueByIndividualKey(SageFrameSettingKeys.AdminSidebarPosition);
             rdTemplate.SelectedValue = defaultAdminTheme;
             if (adminSidebarPosition == "left")
             {
                 rdLeft.Checked = true;
                 divSideBar.Attributes.Add("class", "sideBarLeft");
             }
             else
             {
                 rdRight.Checked = true;
                 divSideBar.Attributes.Add("class", "sideBarRight");
             }
         }
     }
     else
     {
         HttpContext.Current.Response.Redirect(ResolveUrl("~/Install/InstallWizard.aspx"));
     }
 }
Пример #13
0
        private void SetPageInitPart()
        {
            ltrJQueryLibrary.Text = GetAdminJqueryLibraryPath();
            CheckUserLogin();
            string PageName = Path.GetFileNameWithoutExtension(PagePath);
            //adminImage.ImageUrl = GetUserImage;
            if (PageName != null)
            {
                SecurityPolicy objSecurity = new SecurityPolicy();

                userName = objSecurity.GetUser(GetPortalID);
                templateFavicon = SetFavIcon(GetActiveTemplate);
                Extension = SageFrameSettingKeys.PageExtension;
                ApplicationController objAppController = new ApplicationController();
                objSecurity.UpdateExpireTime(userName, GetPortalID);
                if (!objAppController.CheckRequestExtension(Request))
                {
                    SageInitPart();
                }
                SetGlobalVariable();
                bool IsAdmin = true;
                IncludeStartup(GetPortalID, pchHolder, IsAdmin);
            }
            else
            {
                Response.Redirect(PortalAPI.PageNotAccessibleURL);
            }
        }