Exemple #1
0
        private void Active_PageShow_Page(string PageIndexID)
        {
            PageProperties_Property.PageIndexID = PageIndexID;

            URLrewriter.UrlMgr myUrlMgr = new URLrewriter.UrlMgr();

            hlink_PagePreview.NavigateUrl = myUrlMgr.Get_PageIndex_PageURL(PageIndexID);
            lbl_PageInfo.Text             = myUrlMgr.Get_PageIndex_PageURL(PageIndexID);
            tbx_PageID.Text = PageIndexID;
        }
Exemple #2
0
        /// <summary>
        /// Convert Page URL to SEO friendly URL without pageindexid
        /// </summary>
        /// <param name="OriginalURL">Request.URL</param>
        /// <returns></returns>
        public string Get_SEO_Friendly_URL(string OriginalURL)
        {
            string ReturnURL;

            string _pageindexid = URLParse.Get_ArgValue(OriginalURL, "PageIndexID");

            if (_pageindexid != null)
            {
                UrlMgr myUrlMgr = new UrlMgr();
                ReturnURL = myUrlMgr.Get_PageIndex_PageURL(_pageindexid);

                OriginalURL = URLParse.Remove_Arg(ReturnURL, "PageIndexID");

                if (!DataEval.IsEmptyQuery(URLParse.Get_Arg(OriginalURL)))
                {
                    ReturnURL += "?" + URLParse.Get_Arg(OriginalURL);
                    ReturnURL  = URLParse.Remove_Arg(ReturnURL, "PageIndexID");
                }
            }
            else
            {
                ReturnURL = OriginalURL;
            }

            return(ReturnURL);
        }
Exemple #3
0
        protected override void OnPreInit(EventArgs e)
        {
            Nexus.Core.Pages.PageMgr myPageMgr = new Nexus.Core.Pages.PageMgr();

            // Check _pageindexid
            _pageindexid = Request["PageIndexID"];

            if (DataEval.IsEmptyQuery(_pageindexid) || !myPageMgr.Chk_PageIndexID(_pageindexid) || !Convert.ToBoolean(Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_HomeSwitch")))
            {
                // PageIndexID not exist go to homepage
                _pageindexid = myPageMgr.Get_Homepage_PageIndexID();

                if (DataEval.IsEmptyQuery(_pageindexid) || !myPageMgr.Chk_PageIndexID(_pageindexid) || !Convert.ToBoolean(Phrases.PhraseMgr.Get_Phrase_Value("NexusCore_HomeSwitch")))
                {
                    return;
                }
                else
                {
                    URLrewriter.UrlMgr myUrlMgr = new URLrewriter.UrlMgr();
                    string             realUrl  = myUrlMgr.Get_PageIndex_PageURL(_pageindexid);
                    string             args     = Request.QueryString.ToString();
                    realUrl = Tools.URLParse.Combine_Arg(realUrl, args);

                    Response.Redirect(realUrl);
                }
            }


            // Check Page Types
            Nexus.Core.Pages.PageIndex myPageIndex = myPageMgr.Get_PageIndex(_pageindexid);

            switch (myPageIndex.Page_Type)
            {
            case Page_Type.Normal_Page:
                Load_Normal_Page(_pageindexid);
                break;

            case Page_Type.Category:
                Load_Category(_pageindexid);
                break;

            case Page_Type.Internal_Page_Pointer:
                Load_Internal_Page(_pageindexid);
                break;

            case Page_Type.External_Link:
                Load_External_Page(_pageindexid);
                break;
            }

            base.OnPreInit(e);
        }
Exemple #4
0
        protected void btn_Select_Click(object sender, EventArgs e)
        {
            if (PageMenu_PageIndex.Selected_PageIndexID != "-1" && !DataEval.IsEmptyQuery(PageMenu_PageIndex.Selected_PageIndexID))
            {
                if (!DataEval.IsEmptyQuery(Request.QueryString["ControlID"]))
                {
                    URLrewriter.UrlMgr myUrlMgr = new URLrewriter.UrlMgr();

                    string arg = "FileSelector"
                                 + "^"
                                 + Request.QueryString["ControlID"]
                                 + "^"
                                 + myUrlMgr.Get_PageIndex_PageURL(PageMenu_PageIndex.Selected_PageIndexID);

                    // Finish Select Close Window
                    string _finishupdate_script = string.Format("CloseAndRebind({0});", DataEval.QuoteText(arg));
                    ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true);
                }
            }
        }