コード例 #1
0
        public override void Page_Load(ref NVelocity.VelocityContext context)
        {
            base.Page_Load(ref context);

            #region  加载头部及Title

            string title_val    = "";
            string keywords_val = title_val;

            context.Put("title", title_val);
            context.Put("keywords", keywords_val);
            context.Put("keywords_cname", keywords_val.Replace("红人", ""));


            head.Init_Head(context, 0);

            #endregion


            articleid = String_Manage.Return_Request_Int("id", 0);


            Model.HRENH_ARTICLE article_model = new BLL.HRENH_ARTICLE().GetModel(articleid);

            if (article_model != null)
            {
                type = Convert.ToInt32(article_model.TYPES);

                typename = type_bll.GetModel(type).TypeName;


                context.Put("parent_nav", typename);

                //通过汉字获取该汉字的首字母
                type_shouzimu = Get_Hanzi_Shouzimu.GetSpellCode(typename);

                string typeurl = "/" + ArticleHelper.Get_Type_Rname(type) + type_shouzimu + "/";

                if (type == 370)
                {
                    typeurl = "/" + ArticleHelper.Get_Type_Rname(type) + "/";
                }

                context.Put("typepurl", typeurl);

                navurl = typeurl + "show_";

                int pageid = 2100;

                #region  详情页相关阅读上方广告图

                //context.Put("topad", ArticleHelper.Get_Tj_Img(1, pageid, 1008));

                #endregion

                #region  详情页相关阅读轮播图

                //context.Put("topadlb", ArticleHelper.Get_Tj_Img(0, pageid, 1009));

                #endregion


                #region  获取最新排行的列表

                //context.Put("zxph", ArticleHelper.Get_Zxph(10));

                #endregion

                #region  今日热点

                context.Put("jrrd", Get_Jrrd(context));

                #endregion


                #region  每日精选

                context.Put("mrjx_ad", ArticleHelper.Get_Tj_Img(0, pageid, 1010));

                #endregion

                #region  大家都在搜

                context.Put("djdzs", ArticleHelper.Get_Tj_Img(0, pageid, 1004));

                #endregion


                //获取文章详情
                GetDetail(context);
            }
            else
            {
                context.Put("redirecturl", "/404");
            }
        }
コード例 #2
0
        public override void Page_Load(ref NVelocity.VelocityContext context)
        {
            base.Page_Load(ref context);

            #region  加载头部及Title

            string title_val    = "";
            string keywords_val = title_val;

            context.Put("title", title_val);
            context.Put("keywords", keywords_val);
            context.Put("keywords_cname", keywords_val.Replace("红人", ""));


            head.Init_Head(context, 0);

            #endregion


            try
            {
                season_require_id = DbHelperSQL.GetSingle("select top 1 season_id from HRENH_SET_ARTICLE_SHOW_SEASON order by id desc").ToString();
            }
            catch (Exception ex)
            {
            }


            articleid = String_Manage.Return_Request_Int("id", 0);


            Model.HRENH_ARTICLE article_model = new BLL.HRENH_ARTICLE().GetModel(articleid);

            if (article_model != null)
            {
                type = Convert.ToInt32(article_model.TYPES);

                typename = type_bll.GetModel(type).TypeName;


                context.Put("parent_nav", typename);

                //通过汉字获取该汉字的首字母
                type_shouzimu = Get_Hanzi_Shouzimu.GetSpellCode(typename);

                string typeurl = "/" + ArticleHelper.Get_Type_Rname(type) + type_shouzimu + "/";

                if (type == 370)
                {
                    typeurl = "/" + ArticleHelper.Get_Type_Rname(type) + "/";
                }

                context.Put("typepurl", typeurl);

                navurl = typeurl + "show_";

                int pageid = 2100;


                #region  今日热点

                context.Put("jrrd", Get_Jrrd(context));

                #endregion


                #region  每日精选

                context.Put("mrjx_ad", ArticleHelper.Get_Tj_Img(0, pageid, 1010));

                #endregion

                #region  大家都在搜

                context.Put("djdzs", ArticleHelper.Get_Tj_Img(0, pageid, 1004));

                #endregion


                //获取文章详情
                GetDetail(context);
            }
            else
            {
                context.Put("redirecturl", "/404");
            }
        }
コード例 #3
0
        public override void Page_Load(ref NVelocity.VelocityContext context)
        {
            base.Page_Load(ref context);

            #region  加载头部及Title
            NewXzc.Web.templatecs.Head_Article head = new Head_Article();
            head.Init_Head(context, 0);

            context.Put("title", "文章详情_衣品搭配");

            #endregion

            articleid = String_Manage.Return_Request_Int("id", 0);


            Model.HRENH_ARTICLE article_model = new BLL.HRENH_ARTICLE().GetModel(articleid);

            if (article_model != null)
            {
                stype     = Convert.ToInt32(article_model.TYPES);
                types_pid = article_model.TYPES_PID;

                #region  加载子级栏目
                //Get_Son_Type(context);
                #endregion


                #region  获取面包屑导航

                int ctypes = type;

                if (types_pid > 0)
                {
                    ctypes = types_pid;
                }
                else
                {
                    ctypes = stype;
                    stype  = -1;
                }

                string mbxnav = ArticleHelper.Get_Article_Nav(ctypes, stype, 1);
                context.Put("mbxnav", mbxnav);

                #endregion

                int pageid = 2100;

                #region  详情页相关阅读上方广告图

                //context.Put("topad", ArticleHelper.Get_Tj_Img(1, pageid, 1008));

                #endregion

                #region  详情页相关阅读轮播图

                //context.Put("topadlb", ArticleHelper.Get_Tj_Img(0, pageid, 1009));

                #endregion

                #region  详情页热门推荐轮播图

                //context.Put("lunbo1", ArticleHelper.Get_Tj_Img(0, pageid, 1005));

                #endregion

                #region  获取最新排行的列表

                //context.Put("zxph", ArticleHelper.Get_Zxph(10));

                #endregion

                #region  详情页论坛精华

                //context.Put("ltjh_ad", ArticleHelper.Get_Tj_Img(3, pageid, 1006));

                #endregion


                #region  今日热点

                context.Put("jrrd", Get_Jrrd(context));

                #endregion

                #region  每日精选

                //context.Put("mrjx_ad", ArticleHelper.Get_Tj_Img(0, pageid, 1007));

                context.Put("mrjx_ad", ArticleHelper.Get_Tj_Img(0, pageid, 1010));

                #endregion

                #region  大家都在搜

                context.Put("djdzs", ArticleHelper.Get_Tj_Img(0, pageid, 1004));

                #endregion


                #region  推荐位
                ////最新娱乐热点
                //context.Put("newzx", ArticleHelper.Get_New_ZX(8, "", 10));

                #region  推荐公共项
                //NewXzc.Web.templatecs.Article.Article_Search_Common article_common = new Article_Search_Common();

                ////头部广告
                //article_common.Init_Common_Ad(context);

                ////最火娱乐资讯
                //article_common.Init_Zhylzx(context);

                ////相关搜索上方广告
                //Init_Search_Ad(context);

                ////相关搜索
                //Init_Xgss(context);

                ////为您推荐
                //article_common.Init_Wntj(context);

                ////右侧推荐
                //article_common.Init_Rgiht_Common_Ad(context);

                ////相关阅读
                //Init_Xgyd(context);

                #endregion

                #endregion

                //获取文章详情
                GetDetail(context);
            }
            else
            {
                context.Put("redirecturl", "/404");
            }
        }