Exemplo n.º 1
0
        public static string LoadTags(string tags)
        {
            StringBuilder stringBuilder = new StringBuilder();

            string[] array = tags.Split(new char[]
            {
                ','
            });
            for (int i = 0; i < array.Length; i++)
            {
                if (array[i] != "")
                {
                    string text = VirtualPathUtility.ToAbsolute("~/" + ApplicationUtil.GetTitle(array[i]) + ".htm");
                    stringBuilder.Append(string.Concat(new string[]
                    {
                        "<a href=\"",
                        text,
                        "\" title=\"",
                        array[i],
                        "\">",
                        array[i],
                        "</a>"
                    }));
                    if (i < array.Length - 1)
                    {
                        stringBuilder.Append(", ");
                    }
                }
            }
            return(stringBuilder.ToString());
        }
Exemplo n.º 2
0
        public static string ReWriteUrlMod(object modid)
        {
            string modName = ModControl.GetModName(modid);
            string modUrl  = ModControl.GetModUrl(modid);

            if (modUrl.Length > 0)
            {
                return((CMSfunc.uRoot + "san-pham/" + modUrl + ".htm").Replace("--", "-").ToLower());
            }
            if (modUrl.Trim().Length <= 0)
            {
                return((CMSfunc.uRoot + ApplicationUtil.GetTitle(modName) + ".htm").Replace("--", "-").ToLower());
            }
            if (modUrl.Contains("http://"))
            {
                return(modUrl);
            }
            if (!modUrl.Contains("~/"))
            {
                return(CMSfunc.uRoot + modUrl);
            }
            return(VirtualPathUtility.ToAbsolute(modUrl));
        }