static void ShowPersistentFile() { scrollPos = GUILayout.BeginScrollView(scrollPos); try { GUIUtil.SafeTextArea(showContent); } catch (Exception e) { GUILayout.TextArea(e.ToString()); } GUILayout.EndScrollView(); if (URLManager.GetURL("PersistentFileUpLoadURL") != null) { if (GUILayout.Button("上传持久数据")) { HTTPTool.Upload_Request_Thread(URLManager.GetURL("PersistentFileUpLoadURL"), LogPath, UploadCallBack); } } else { GUILayout.Label("上传持久数据需要在 URLConfig -> PersistentFileUpLoadURL 配置上传目录"); } if (GUILayout.Button("复制到剪贴板")) { TextEditor tx = new TextEditor(); tx.text = showContent; tx.OnFocus(); tx.Copy(); } if (GUILayout.Button("返回上层")) { isShowPersistentFile = false; } }
public override string TransformFriendlyUrlToQueryString(string[] urlParms, int tabId, int portalId, FriendlyUrlOptions options, string cultureCode, DotNetNuke.Entities.Portals.PortalAliasInfo portalAlias, ref List <string> messages, out int status, out string location) { status = 200; location = null; string result = string.Empty, Slug = string.Empty, PageName = string.Empty; PortalSettings pS = null; bool PageNameRedirect = false; urlParms = urlParms.Select(s => s.ToLower()).Distinct().ToArray(); List <string> urlParmsList = new List <string>(urlParms).ConvertAll(u => u.ToLower()); int SlugTabID = URLManager.GetSlugTabID(urlParms, ref Slug, tabId, PortalController.Instance.GetPortal(portalId)); if (SlugTabID != -1) //Slug Found { URLEntity CurrentURL = URLManager.GetURL(Slug); //Redirect if it's not the default URL if (CurrentURL != null && !CurrentURL.IsDefault) { InitPortalSettings(ref pS, tabId, portalAlias); return(Redirect(out status, out location, portalId, pS, SlugTabID, result, CurrentURL, null)); } if (pS == null) { pS = new PortalSettings(tabId, portalAlias); } //DNN 8580 //https://dnntracker.atlassian.net/browse/DNN-8580?page=com.googlecode.jira-suite-utilities%3Atransitions-summary-tabpanel ClearUrlParams(ref urlParmsList, ref PageName, Slug, SlugTabID, pS); //Tab not identified...need redirect if (tabId == -1) { InitPortalSettings(ref pS, tabId, portalAlias); if (CurrentURL.IgnorePageName) { return(string.Empty); } else { //Redirect based on Include PageName if we're not on homepage if (SlugTabID != pS.HomeTabId && CurrentURL.PageName && !urlParmsList.Contains(PageName) && !string.Join("/", urlParmsList).Contains(PageName)) { PageNameRedirect = true; } else if (!CurrentURL.PageName && (urlParmsList.Contains(PageName) || string.Join("/", urlParmsList).Contains(PageName))) { PageNameRedirect = true; } //Remove PageName foreach (var item in PageName.Split('/')) { urlParmsList.Remove(item); } //Setup Rewrite Path result = "?TabId=" + SlugTabID.ToString(); } } string remainder = base.CreateQueryStringFromParameters(urlParmsList.ToArray(), -1); string Prefix = urlParmsList.Count % 2 == 0 ? string.Empty : "="; if (PageNameRedirect) { InitPortalSettings(ref pS, tabId, portalAlias); return(Redirect(out status, out location, portalId, pS, SlugTabID, result, CurrentURL, remainder)); } //Rewrite URL to appropriate page if (result.StartsWith("?TabId=") && !string.IsNullOrEmpty(Slug)) { result += "&" + Slug + remainder; } else { result += Slug + remainder; } } return(result); }
public ActionResult ArticlesSearch(string searchText) { IArticlesService artSrv = IoC.Resolve <IArticlesService>(); int total = 0; var v = artSrv.GetbyFilter(searchText, 0, 10, out total).Select(c => new { c.NameVNI, c.NameENG, Url = URLManager.GetURL(c) }).ToList(); return(Json(v, JsonRequestBehavior.AllowGet)); }