Exemple #1
0
        /// <summary>
        /// 生成内容页--影视
        /// </summary>
        /// <param name="album"></param>
        /// <param name="cls"></param>
        public static void CreateContentPage(MovieInfo movie, Class cls)
        {
            TemplateHelper h        = new TemplateHelper();
            string         FileName = BasePage.GetMovieUrl(movie, cls);

            Voodoo.IO.File.Write(System.Web.HttpContext.Current.Server.MapPath("~" + FileName), h.CreateContentPage(movie, cls));

            ping(BasePage.SystemSetting.SiteUrl.TrimEnd('/') + FileName);
            CreatePagesByCrateWith(3);
        }
Exemple #2
0
        /// <summary>
        /// 获取电影列表
        /// </summary>
        /// <param name="top">条数</param>
        /// <param name="custitle">标题截取</param>
        /// <param name="m_where">条件语句</param>
        /// <param name="htmlTemp">模板</param>
        /// <returns></returns>
        public static string getmovielist(string top, string custitle, string m_where, string htmlTemp)
        {
            StringBuilder sb = new StringBuilder();

            List <MovieInfo> movies = MovieInfoView.GetModelList(m_where, top.ToInt32());
            var i = 0;

            foreach (MovieInfo m in movies)
            {
                i++;
                string item = htmlTemp;
                item = item.Replace("{url}", BasePage.GetMovieUrl(m, MovieInfoView.GetClass(m)));
                item = item.Replace("{id}", m.Id.ToS());
                item = item.Replace("{authors}", m.Actors);
                item = item.Replace("{classid}", m.ClassID.ToS());
                item = item.Replace("{classname}", m.ClassName);
                item = item.Replace("{director}", m.Director);
                item = item.Replace("{faceimage}", m.FaceImage);
                item = item.Replace("{inserttime}", m.InsertTime.ToString("yyyy-MM-dd"));
                item = item.Replace("{intro}", m.Intro);
                item = item.Replace("{ismovie}", m.IsMove ? "电影" : "电视剧");
                item = item.Replace("{lastdramatitle}", m.LastDramaTitle);
                item = item.Replace("{location}", m.Location);
                item = item.Replace("{publicyear}", m.PublicYear);
                item = item.Replace("{status}", m.Status == 0 ? "更新中" : "完结");
                item = item.Replace("{tags}", m.Tags);
                item = item.Replace("{title}", m.Title);
                item = item.Replace("{ftitle}", m.Title.CutString(custitle.ToInt32()));
                item = item.Replace("{updatetime}", m.UpdateTime.ToString("yyyy-MM-dd"));
                item = item.Replace("{clickcount}", m.ClickCount.ToS());
                //item = item.Replace("{clickcount}", m.ClickCount.ToS());
                item = item.Replace("{replycount}", m.ReplyCount.ToS());
                item = item.Replace("{scoreavg}", m.ScoreAvg.ToS());
                item = item.Replace("{rownum}", i.ToS());
                item = item.Replace("{index}", (i - 1).ToS());
                sb.Append(item);
            }
            return(sb.ToS());
        }