Beispiel #1
0
        /// <summary>
        /// 加载页面头部轮播图片地址
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static string GetLunBoImgUrl(int id)
        {
            string rStr = string.Empty;

            OS.BLL.contents.article_category   bll   = new OS.BLL.contents.article_category();
            OS.Model.contents.article_category model = new OS.Model.contents.article_category();
            model = bll.GetModel(id);
            if (model != null)
            {
                string h = "154";
                if (id == 95)
                {
                    h = "204";
                }
                rStr += "<div class=\"pic\"  id=\"ShadowL\">";
                if (!string.IsNullOrEmpty(model.img_url))
                {
                    rStr += "<a href=\"javascript:void(0)\" style=\"display: block\" class=\"change\"><img alt=\"\" title=\"\" width=\"828\" height=\"" + h + "\" src=\"" + model.img_url + "\"></a>";
                }
                if (!string.IsNullOrEmpty(model.seo_title))
                {
                    rStr += "<a href=\"javascript:void(0)\" style=\"display: none\" class=\"change\"><img alt=\"\" title=\"\" width=\"828\" height=\"" + h + "\" src=\"" + model.seo_title + "\"></a>";
                }
                if (!string.IsNullOrEmpty(model.seo_keywords))
                {
                    rStr += "<a href=\"javascript:void(0)\" style=\"display: none\" class=\"change\"><img alt=\"\" title=\"\" width=\"828\" height=\"" + h + "\" src=\"" + model.seo_keywords + "\"></a>";
                }
                rStr += "</div>";
            }
            return(rStr);
        }
Beispiel #2
0
        /// <summary>
        /// 加载页面头部图片地址
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static string GetImgUrl(int id)
        {
            string rStr = string.Empty;

            OS.BLL.contents.article_category   bll   = new OS.BLL.contents.article_category();
            OS.Model.contents.article_category model = new OS.Model.contents.article_category();
            model = bll.GetModel(id);
            if (model != null)
            {
                rStr = model.img_url;
            }
            return(rStr);
        }
Beispiel #3
0
 /// <summary>
 /// 加载页面头部图片地址
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static string GetImgUrl(int id)
 {
     string rStr = string.Empty;
     OS.BLL.contents.article_category bll = new OS.BLL.contents.article_category();
     OS.Model.contents.article_category model = new OS.Model.contents.article_category();
     model = bll.GetModel(id);
     if (model != null) {
         rStr = model.img_url;
     }
     return rStr;
 }
Beispiel #4
0
 /// <summary>
 /// 加载页面头部轮播图片地址
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static string GetLunBoImgUrl(int id)
 {
     string rStr = string.Empty;
     OS.BLL.contents.article_category bll = new OS.BLL.contents.article_category();
     OS.Model.contents.article_category model = new OS.Model.contents.article_category();
     model = bll.GetModel(id);
     if (model != null) {
         string h = "154";
         if (id == 95) {
             h = "204";
         }
         rStr += "<div class=\"pic\"  id=\"ShadowL\">";
         if (!string.IsNullOrEmpty(model.img_url)) {
             rStr += "<a href=\"javascript:void(0)\" style=\"display: block\" class=\"change\"><img alt=\"\" title=\"\" width=\"828\" height=\"" + h + "\" src=\"" + model.img_url + "\"></a>";
         }
         if (!string.IsNullOrEmpty(model.seo_title)) {
             rStr += "<a href=\"javascript:void(0)\" style=\"display: none\" class=\"change\"><img alt=\"\" title=\"\" width=\"828\" height=\"" + h + "\" src=\"" + model.seo_title + "\"></a>";
         }
         if (!string.IsNullOrEmpty(model.seo_keywords)) {
             rStr += "<a href=\"javascript:void(0)\" style=\"display: none\" class=\"change\"><img alt=\"\" title=\"\" width=\"828\" height=\"" + h + "\" src=\"" + model.seo_keywords + "\"></a>";
         }
         rStr += "</div>";
     }
     return rStr;
 }