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

📄 labelmass_method4.cs

📁 最好用的站点内容管理系统 全部源代码都有
💻 CS
📖 第 1 页 / 共 5 页
字号:
                    {
                        str_PageTitle = str_prefix_2 + getPageTitle(this.Param_CurrentClassID, "Class", 0);
                    }
                    else
                    {
                        str_PageTitle = getPageTitle(this.Param_CurrentClassID, "Class", 0) + str_prefix_2;
                    }
                    break;
                case "Special":
                    if (str_prefix_1 == "0")
                    {
                        str_PageTitle = str_prefix_2 + getPageTitle(this.Param_CurrentSpecialID, "Special", 0);
                    }
                    else
                    {
                        str_PageTitle = getPageTitle(this.Param_CurrentSpecialID, "Special", 0) + str_prefix_2;
                    }
                    break;
                case "ChIndex":
                    if (str_prefix_1 == "0")
                    {
                        str_PageTitle = str_prefix_2 + getPageTitle("0", "ChIndex", ChID);
                    }
                    else
                    {
                        str_PageTitle = getPageTitle("0", "ChIndex", ChID) + str_prefix_2;
                    }
                    break;
                case "ChNews":
                    if (str_prefix_1 == "0")
                    {
                        str_PageTitle = str_prefix_2 + getPageTitle(this.Param_CurrentCHNewsID.ToString(), "ChNews", ChID);
                    }
                    else
                    {
                        str_PageTitle = getPageTitle(this.Param_CurrentCHNewsID.ToString(), "ChNews", ChID) + str_prefix_2;
                    }
                    break;
                case "ChClass":
                    if (str_prefix_1 == "0")
                    {
                        str_PageTitle = str_prefix_2 + getPageTitle(this.Param_CurrentCHClassID.ToString(), "ChClass", ChID);
                    }
                    else
                    {
                        str_PageTitle = getPageTitle(this.Param_CurrentCHClassID.ToString(), "ChClass", ChID) + str_prefix_2;
                    }
                    break;
                case "ChSpecial":
                    if (str_prefix_1 == "0")
                    {
                        str_PageTitle = str_prefix_2 + getPageTitle(this.Param_CurrentCHSpecialID.ToString(), "ChSpecial", ChID);
                    }
                    else
                    {
                        str_PageTitle = getPageTitle(this.Param_CurrentCHSpecialID.ToString(), "ChSpecial", ChID) + str_prefix_2;
                    }
                    break;

            }
            return str_PageTitle;
        }

        /// <summary>
        /// 自定义不规则新闻
        /// </summary>
        /// <returns></returns>
        public string Analyse_unRule()
        {
            string str_unRule = string.Empty;
            string str_RuleID = this.GetParamValue("NT:RuleID");
            string str_STitle = this.GetParamValue("NT:STitle");
            string str_unNavi1 = this.GetParamValue("NT:unNavi");
            string str_unNavi = string.Empty;
            string gstr_RuleID = "0";
            if (str_unNavi1 != null)
            {
                str_unNavi = NetCMS.Common.Input.isPicStr(str_unNavi1);
            }
            if (str_RuleID != null)
            {
                gstr_RuleID = str_RuleID;
            }
            DataTable dt = CommonData.DalPublish.GetUnRule(gstr_RuleID, Param_SiteID);
            if (dt != null && dt.Rows.Count > 0)
            {
                string str_titleCss = "";
                int int_rows = 0;
                int int_rows1 = 1;
                if (str_STitle == "true")
                {
                    str_unRule += "<div>" + newLine;
                    str_unRule += "<span " + str_titleCss + ">" + dt.Rows[0]["unName"].ToString() + "</span>";
                    str_unRule += "</div>" + newLine;
                }
                str_unRule += "<div>" + newLine;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    str_titleCss = dt.Rows[i]["TitleCSS"].ToString();
                    if (str_titleCss != null && str_titleCss != "")
                    {
                        str_titleCss = " class=\"" + str_titleCss + "\"";
                    }
                    string str_SubClass = dt.Rows[i]["SubCSS"].ToString();
                    if (str_SubClass != null && str_SubClass != "")
                    {
                        str_SubClass = " class=\"" + str_SubClass + "\"";
                    }
                    int_rows = int.Parse(dt.Rows[i]["Rows"].ToString());
                    IDataReader rd = CommonData.DalPublish.GetNewsSavePath(dt.Rows[i]["ONewsID"].ToString());
                    string str_NewsUrl = "";
                    if (rd.Read())
                    {
                        PubClassInfo ci = CommonData.GetClassById(rd["ClassID"].ToString());
                        if (ci != null && rd["SavePath"] != DBNull.Value && rd["FileName"] != DBNull.Value && rd["FileEXName"] != DBNull.Value)
                        {
                            str_NewsUrl = getNewsURL(rd["isDelPoint"].ToString(), rd["NewsID"].ToString(), rd["SavePath"].ToString(), ci.SavePath + "/" + ci.SaveClassframe, rd["FileName"].ToString(), rd["FileEXName"].ToString());
                        }
                        else
                        {
                            str_NewsUrl = "javascript:void(0);";
                        }
                        if (int_rows == int_rows1)
                        {
                            if (i == 0)
                            {
                                str_unRule += str_unNavi + "<a href=\"" + str_NewsUrl + "\" " + str_SubClass + " target=\"_blank\">" + dt.Rows[i]["unTitle"].ToString() + "</a>&nbsp;";
                            }
                            else
                            {
                                str_unRule += "<a href=\"" + str_NewsUrl + "\" " + str_SubClass + " target=\"_blank\">" + dt.Rows[i]["unTitle"].ToString() + "</a>&nbsp;";
                            }
                        }
                        else
                        {
                            int_rows1 = int_rows1 + 1;
                            str_unRule += "<br />" + str_unNavi + "<a href=\"" + str_NewsUrl + "\" " + str_SubClass + " target=\"_blank\">" + dt.Rows[i]["unTitle"].ToString() + "</a>&nbsp;";
                        }
                    }
                    rd.Close();
                }

                str_unRule += "</div>" + newLine;
                dt.Clear(); dt.Dispose();
            }
            return str_unRule;
        }

        public string Analyse_ReadNews(int id, int TitleNumer, int ContentNumber, int NaviNumber, string str_Style, string styleid, int currentPageNum, int EndPageNum, int NewsTF)
        {
            return Analyse_ReadNews(id, TitleNumer, ContentNumber, NaviNumber, str_Style, styleid, currentPageNum, EndPageNum, NewsTF, "");
        }


        public string Analyse_ReadNews(int id, int TitleNumer, int ContentNumber, int NaviNumber, string str_Style, string styleid, int currentPageNum, int EndPageNum, int NewsTF, string navistr)
        {
            NetCMS.Model.NewsContent Nci = new NetCMS.Model.NewsContent();
            Nci = this.getNewsInfo(id, this.Param_CurrentNewsID);

            string TmpdimmDir = "";
            if (dimmDir.Trim() != string.Empty)
            {
                TmpdimmDir = "/" + dimmDir;
            }
            if (NewsTF == 1)
            {
                str_Style = this.Mass_Inserted;
                string styleids = Regex.Match(str_Style, @"\[\#NT:StyleID=(?<sid>[^\]]+)]", RegexOptions.Compiled).Groups["sid"].Value.Trim();
                if (styleids != string.Empty)
                {
                    str_Style = LabelStyle.GetStyleByID(styleids);
                }
                if (str_Style.Trim() == string.Empty)
                    return string.Empty;
            }
            bool b_navi = false;
            if (navistr != null && navistr.Trim() != "")
                b_navi = true;
            if (Nci != null)
            {
                if (TitleNumer <= 0)
                    TitleNumer = 15;
                if (ContentNumber <= 0)
                    ContentNumber = 15;
                if (NaviNumber <= 0)
                    NaviNumber = 15;

                PubClassInfo ci = CommonData.GetClassById(Nci.ClassID);
                if (ci == null)
                    ci = new PubClassInfo();
                PubSpecialInfo si = new PubSpecialInfo();
                if (Nci.SpecialID != "")
                    si = CommonData.GetSpecial(Nci.SpecialID);

                #region 基本
                if (str_Style.IndexOf("{#Title}") > -1)
                {
                    string str_title = Nci.NewsTitle;
                    string CommStr = "";
                    if (NewsTF == 0)
                    {
                        if (Nci.CommLinkTF == 1)
                        {
                            if (Nci.CommTF == 1)
                            {
                                CommStr = " <a href=\"" + getNewsURL(Nci.isDelPoint.ToString(), Nci.NewsID, Nci.SavePath, ci.SavePath + "/" + ci.SaveClassframe, Nci.FileName, Nci.FileEXName) + "#commList\">[评]</a>";
                            }
                        }
                        str_title = getStyle(NetCMS.Common.Input.GetSubString(str_title, TitleNumer), Nci.TitleColor, Nci.TitleITF, Nci.TitleBTF);
                    }
                    if (b_navi)
                        str_title = navistr + str_title;
                    str_Style = str_Style.Replace("{#Title}", str_title + CommStr);
                }
                //标题(不可截断)--------------------------------------------------------------------------------------------------------
                if (str_Style.IndexOf("{#uTitle}") > -1)
                {
                    string s_NewsTitle = Nci.NewsTitle;
                    if (b_navi)
                        s_NewsTitle = navistr + s_NewsTitle;
                    if (NewsTF == 1)
                    {
                        str_Style = str_Style.Replace("{#uTitle}", s_NewsTitle);
                    }
                    else
                    {
                        str_Style = getStyle(s_NewsTitle, Nci.TitleColor, Nci.TitleITF, Nci.TitleBTF);
                    }
                }
                //副标题--------------------------------------------------------------------------------------------------------
                if (str_Style.IndexOf("{#sTitle}") > -1)
                {
                    if (Nci.sNewsTitle != "")
                        str_Style = str_Style.Replace("{#sTitle}", Nci.sNewsTitle);
                    else
                        str_Style = str_Style.Replace("{#sTitle}", "");
                }
                //连接地址--------------------------------------------------------------------------------------------------------
                if (str_Style.IndexOf("{#URL}") > -1)
                {
                    string URLS = "";
                    if (Nci.NewsType == 2)
                    {
                        URLS = Nci.URLaddress;
                    }
                    else
                    {
                        if (Nci.FileEXName != "")
                        {
                            URLS = getNewsURL(Nci.isDelPoint.ToString(), Nci.NewsID, Nci.SavePath, ci.SavePath + "/" + ci.SaveClassframe, Nci.FileName, Nci.FileEXName);
                        }
                    }
                    str_Style = str_Style.Replace("{#URL}", URLS);
                }
                //新闻内容--------------------------------------------------------------------------------------------------------
                if (str_Style.IndexOf("{#Content}") > -1)
                {
                    string str_content = Nci.Content

⌨️ 快捷键说明

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