⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 labelmass_method4.cs

📁 最好用的站点内容管理系统 全部源代码都有
💻 CS
📖 第 1 页 / 共 5 页
字号:
            if (str_SearchWhere == "true")
            {
                str_Search += " <select name=\"searchType\" class=\"" + str_SelectCss + "\">" + newLine;
                str_Search += "<option value=\"0\">站内搜索</otpion>" + newLine;
                str_Search += "<option value=\"1\">google搜索</otpion>" + newLine;
                str_Search += "</select>" + newLine;
            }

            if (str_ShowStyle == "true")
            {
                str_Search += " <input name=\"buttongo\" class=\"" + str_ButtonCss + "\" type=\"button\" value=\"搜索\" onclick=\"javascript:SearchGo" + str_RnadNum + "(this.form);\">";
            }
            else
            {
                str_Search += "  <img src=\"" + str_ImagePath + "\"  class=\"" + str_ButtonCss + "\" onclick=\"javascript:SearchGo" + str_RnadNum + "(this.form);\"> ";
                str_Search = str_Search.Replace("{@dirfile}", NetCMS.Config.UIConfig.dirFile);
            }
            str_Search += "</td>" + newLine;
            str_Search += "</tr>" + newLine;
            str_Search += "</form>" + newLine;
            str_Search += "</table>" + newLine;

            str_Search += "<script language=\"javascript\" type=\"text/javascript\">" + newLine;
            str_Search += "function SearchGo" + str_RnadNum + "(obj)" + newLine;
            str_Search += "{" + newLine;
            int minlen = 0;
            int maxlen = 20;
            string LenSearch = NetCMS.Common.Public.readparamConfig("LenSearch");
            minlen = int.Parse(LenSearch.Split('|')[0]);
            maxlen = int.Parse(LenSearch.Split('|')[1]);
            str_Search += "if(document.getElementById('tags').value.length<" + minlen + "||document.getElementById('tags').value.length>" + maxlen + ")" + newLine;
            str_Search += "{" + newLine;
            str_Search += " alert('搜索最小长度" + minlen + "字符,最大长度" + maxlen + "字符。');return false;" + newLine;
            str_Search += "}" + newLine;
            str_Search += "if(document.getElementById('tags').value=='')" + newLine;
            str_Search += "{" + newLine;
            str_Search += " alert('请填写关键字');return false;" + newLine;
            str_Search += "}" + newLine;
            if (str_SearchType == "true")
            {
                str_Search += "window.location.href='" + CommonData.SiteDomain + "/Search.html?type=news";
                if (b_ShowDate == true)
                    str_Search += "&Date='+document.getElementById('Date').value+'";
                if (b_ShowClass == true)
                    str_Search += "&ClassID='+document.getElementById('ClassID').value+'";
                str_Search += "&tags='+escape(document.getElementById('tags').value)+'';" + newLine;
            }
            if (str_SearchWhere == "true")
            {
                str_Search += "if(document.getElementById('searchType').value==" + 0 + ")" + newLine;
                str_Search += "{" + newLine;
                str_Search += "window.location.href='" + CommonData.SiteDomain + "/Search.html?type=news&tags='+escape(document.getElementById('tags').value)+'';" + newLine;
                str_Search += "}else{" + newLine;
                str_Search += "window.location.href='http://www.google.com'";
                str_Search += "}" + newLine;
            }
            else
            {
                str_Search += "window.location.href='" + CommonData.SiteDomain + "/Search.html?type=news&tags='+escape(document.getElementById('tags').value)+'';" + newLine;
            }
            str_Search += "}" + newLine;
            str_Search += "</script>" + newLine;
            return str_Search;
        }

        /// <summary>
        /// 位置导航
        /// </summary>
        /// <returns></returns>
        public string Analyse_Position(int ChID)
        {
            string str_Position = string.Empty;
            string str_DynChar = this.GetParamValue("NT:DynChar");
            if (str_DynChar == null)
            {
                str_DynChar = " >> ";
            }
            string ReadType = NetCMS.Common.Public.readparamConfig("ReviewType");
            switch (this.TemplateType.ToString())
            {
                #region 新闻频道
                case "Index":
                    str_Position = "<a href=\"" + CommonData.SiteDomain + "\">首页</a>";
                    break;
                case "News":
                    string ClassID = CommonData.DalPublish.GetClassIDByNewsID(this.Param_CurrentNewsID);
                    PubClassInfo ci = CommonData.GetClassById(ClassID);
                    if (ci != null)
                    {
                        if (ci.isDelPoint != 0 || ReadType == "1")
                        {
                            str_Position = "<a href=\"" + CommonData.SiteDomain + "\">首页</a>" + str_DynChar + getPositionSTR(str_DynChar, ClassID, 0) + "正文";
                        }
                        else
                        {
                            str_Position = ci.NewsPosition;
                        }
                    }
                    else
                    {
                        str_Position = string.Empty;
                    }
                    break;
                case "Class":
                    PubClassInfo ci1 = CommonData.GetClassById(this.Param_CurrentClassID);
                    if (ci1.isDelPoint != 0 || ReadType == "1")
                    {
                        str_Position = "<a href=\"" + CommonData.SiteDomain + "\">首页</a>" + str_DynChar + getPositionSTR(str_DynChar, this.Param_CurrentClassID, 0) + "列表";
                    }
                    else
                    {
                        str_Position = ci1.NaviPosition;
                    }
                    break;
                case "Special":
                    PubSpecialInfo si = CommonData.GetSpecial(this.Param_CurrentSpecialID);
                    if (si.isDelPoint != 0 || ReadType == "1")
                    {
                        str_Position = "<a href=\"" + CommonData.SiteDomain + "\">首页</a>" + str_DynChar + getPositionSTR(str_DynChar, this.Param_CurrentSpecialID, 1) + "列表";
                    }
                    else
                    {
                        str_Position = si.NaviPosition;
                    }
                    break;
                #endregion 新闻频道的
                case "ChIndex":
                    str_Position = GetIndexPath(ReadType, ChID, str_DynChar) + str_DynChar +" 频道首页";
                    break;
                case "ChNews":
                    str_Position = GetIndexPath(ReadType, ChID, str_DynChar) + str_DynChar + getCHPositionSTR(str_DynChar, this.Param_CurrentCHNewsID, "ChNews", ChID);
                    break;
                case "ChClass":
                    str_Position = GetIndexPath(ReadType, ChID, str_DynChar) + str_DynChar + getCHPositionSTR(str_DynChar, this.Param_CurrentCHClassID, "ChClass", ChID) + "列表";
                    break;
                case "ChSpecial":
                    str_Position = GetIndexPath(ReadType, ChID, str_DynChar) + str_DynChar + getCHPositionSTR(str_DynChar, this.Param_CurrentCHSpecialID, "ChSpecial", ChID);
                    break;
                default:
                    break;
            }
            return str_Position;
        }

        public string GetIndexPath(string ReadType, int ChID, string str_DynChar)
        {
            string str_Position = string.Empty;
            IDataReader dr = CommonData.DalPublish.GetPositionNavi(0, "ChIndex", ChID);
            if (dr.Read())
            {
                str_Position = "<a href=\"" + CommonData.SiteDomain + "\">首页</a>" + GetParentChannelPosition(ReadType, ChID, str_DynChar);
            }
            dr.Close();
            return str_Position;
        }

        public string GetParentChannelPosition(string ReadType, int ChID, string str_DynChar)
        {
            string str_Position = string.Empty;
            IDataReader dr = CommonData.DalPublish.GetParentPositionNavi(ChID);
            while (dr.Read())
            {
                if (ReadType == "1")
                {
                    str_Position = str_DynChar + "<a href=\"" + CommonData.SiteDomain + "/default.aspx?ChID=" + ChID + "" + "\">" + dr["channelName"].ToString() + "</a>" + str_Position;
                }
                else
                {
                    string iPath = "/" + dr["htmldir"].ToString() + "/" + dr["indexFileName"].ToString() + "";
                    iPath = iPath.Replace("//", "/").Replace("{@dirHTML}", NetCMS.Config.UIConfig.dirHtml);
                    str_Position = str_DynChar + "<a href=\"" + CommonData.SiteDomain + iPath + "\">" + dr["channelName"].ToString() + "</a>" + str_Position;
                }
                if (dr["ParentID"].ToString() != "0")
                {
                    str_Position = GetParentChannelPosition(ReadType, int.Parse(dr["ParentID"].ToString()), str_DynChar) + str_Position;
                }
            }
            dr.Close();
            return str_Position;
        }

        /// <summary>
        /// 得到META类
        /// </summary>
        /// <param name="Num"></param>
        /// <returns></returns>
        public string Analyse_Meta(int Num, int ChID)
        {
            string str_Metas = string.Empty;
            string str_MetaContent = this.GetParamValue("NT:MetaContent");
            switch (this.TemplateType.ToString())
            {
                case "Index":
                    str_Metas = "首页,新闻,CMS";
                    break;
                case "News":
                    str_Metas = getMetaContent(this.Param_CurrentNewsID, "News", Num) + "," + str_MetaContent;
                    break;
                case "Class":
                    str_Metas = getMetaContent(this.Param_CurrentClassID, "Class", Num) + "," + str_MetaContent;
                    break;
                case "Special":
                    str_Metas = getMetaContent(this.Param_CurrentSpecialID, "Special", Num) + "," + str_MetaContent;
                    break;
                case "ChIndex":
                    str_Metas = CommonData.DalPublish.GetCHMeta(0, Num, ChID, "ChIndex");
                    break;
                case "ChClass":
                    str_Metas = CommonData.DalPublish.GetCHMeta(this.Param_CurrentCHClassID, Num, ChID, "ChClass");
                    break;
                case "ChNews":
                    str_Metas = CommonData.DalPublish.GetCHMeta(this.Param_CurrentCHNewsID, Num, ChID, "ChNews");
                    break;
                case "ChSpecial":
                    str_Metas = CommonData.DalPublish.GetCHMeta(this.Param_CurrentCHSpecialID, Num, ChID, "ChSpecial");
                    break;
                default:
                    break;
            }
            return str_Metas;
        }

        /// <summary>
        /// 页面标题
        /// </summary>
        /// <returns></returns>
        public string Analyse_PageTitle(int ChID)
        {
            string str_PageTitle = "";
            string str_prefix = this.GetParamValue("NT:prefix");
            string str_prefix_1 = "0";
            string str_prefix_2 = "";
            if (str_prefix.IndexOf("$") > -1)
            {
                string[] str_prefixARR = str_prefix.Split('$');
                str_prefix_1 = str_prefixARR[0];
                str_prefix_2 = str_prefixARR[1];
            }
            switch (this.TemplateType.ToString())
            {
                case "Index":
                    if (str_prefix_1 == "0")
                    {
                        str_PageTitle = str_prefix_2 + getSiteName();
                    }
                    else
                    {
                        str_PageTitle = getSiteName() + str_prefix_2;
                    }
                    break;
                case "News":
                    if (str_prefix_1 == "0")
                    {
                        str_PageTitle = str_prefix_2 + getPageTitle(this.Param_CurrentNewsID, "News", 0);
                    }
                    else
                    {
                        str_PageTitle = getPageTitle(this.Param_CurrentNewsID, "News", 0) + str_prefix_2;
                    }
                    break;
                case "Class":
                    if (str_prefix_1 == "0")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -