Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var chapters = BookChapterView.GetModelList("enable=1 order by UpdateTime desc", 500);
            var items    = new List <Voodoo.other.SEO.RssItem>();

            foreach (var chapter in chapters)
            {
                items.Add(new Voodoo.other.SEO.RssItem()
                {
                    Title       = chapter.BookTitle + "-" + chapter.Title,
                    PutTime     = chapter.UpdateTime,
                    Link        = SystemSetting.SiteUrl + GetBookChapterUrl(chapter, BookView.GetClass(chapter)),
                    Description = chapter.BookTitle + "Update to chapter:" + chapter.Title + ", from chanel" + chapter.ClassName
                });
            }

            var movies = MovieInfoView.GetModelList();

            foreach (var m in movies)
            {
                items.Add(new Voodoo.other.SEO.RssItem()
                {
                    Title       = m.Title,
                    PutTime     = m.UpdateTime,
                    Link        = SystemSetting.SiteUrl + GetMovieUrl(m, MovieInfoView.GetClass(m)),// GetBookChapterUrl(chapter, BookView.GetClass(chapter)),
                    Description = m.Title + "Update to :" + m.LastDramaTitle + ", from chanel" + m.ClassName + ", Intro:" + m.Intro
                });
            }

            Response.Clear();
            Voodoo.other.SEO.Rss.GetRss(items, SystemSetting.SiteName, SystemSetting.SiteUrl, SystemSetting.Description, SystemSetting.Copyright);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 内容页
        /// </summary>
        /// <param name="Name"></param>
        /// <param name="Class"></param>
        protected void Content(string Name, string Class)
        {
            MovieInfo mv = MovieInfoView.Find(string.Format("StandardTitle=N'{0}' and ClassName=N'{1}'", Name, Class));

            Response.Clear();
            Response.Write(CreateContentPage(mv, MovieInfoView.GetClass(mv)));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 生成电影页面
        /// </summary>
        /// <param name="id"></param>
        protected void CreateMoviePage(int id)
        {
            MovieInfo m = MovieInfoView.GetModelByID(id.ToS());
            if (m.Id > 0)
            {
                Class c = MovieInfoView.GetClass(m);
                Voodoo.Basement.CreatePage.CreateContentPage(m, c);

                var Dramas = MovieDramaView.GetModelList(string.Format("movieid={0}", id));
                var Baidus = MovieUrlBaiduView.GetModelList(string.Format("movieid={0}", id));
                var Kuaibos = MovieUrlKuaibView.GetModelList(string.Format("movieid={0}", id));

                foreach (var d in Dramas)
                {
                    Voodoo.Basement.CreatePage.CreateDramapage(d, c);
                }
                foreach (var d in Baidus)
                {
                    Voodoo.Basement.CreatePage.CreateDramapage(d, c);
                }
                foreach (var d in Kuaibos)
                {
                    Voodoo.Basement.CreatePage.CreateDramapage(d, c);
                }

                Response.Write("电影" + m.Title + "完成");
            }
            else
            {
                Response.Write("不存在");
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 单集列表
        /// </summary>
        /// <param name="id"></param>
        protected void Drama(int id)
        {
            MovieDrama d = MovieDramaView.GetModelByID(id.ToS());

            Response.Clear();
            Response.Write(CreateDramapage(d, MovieInfoView.GetClass(d)));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 百度
        /// </summary>
        /// <param name="id"></param>
        protected void Baidu(int id)
        {
            MovieUrlBaidu b = MovieUrlBaiduView.GetModelByID(id.ToS());

            Response.Clear();
            Response.Write(CreateDramapage(b, MovieInfoView.GetClass(b)));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 快播
        /// </summary>
        /// <param name="id"></param>
        protected void Kuaib(int id)
        {
            MovieUrlKuaib k = MovieUrlKuaibView.GetModelByID(id.ToS());

            Response.Clear();
            Response.Write(CreateDramapage(k, MovieInfoView.GetClass(k)));
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 生成搜索剧集
 /// </summary>
 /// <param name="id"></param>
 protected void CreateDramaPage(long id)
 {
     MovieDrama d = MovieDramaView.GetModelByID(id.ToS());
     if (d.Id > 0)
     {
         Class c = MovieInfoView.GetClass(d);
         Voodoo.Basement.CreatePage.CreateDramapage(d, c);
         Response.Write(string.Format("《{0}》-剧集列表《{1}》完成", d.MovieTitle, d.Title));
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 生成百度影音剧集
 /// </summary>
 /// <param name="id"></param>
 protected void CreateBaiduPage(long id)
 {
     MovieUrlBaidu b = MovieUrlBaiduView.GetModelByID(id.ToS());
     if (b.Id > 0)
     {
         Class c = MovieInfoView.GetClass(b);
         Voodoo.Basement.CreatePage.CreateDramapage(b, c);
         Response.Write(string.Format("《{0}》-百度影音剧集《{1}》完成", b.MovieTitle, b.Title));
     }
     else
     {
         Response.Write("不存在");
     }
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 生成快播页面
 /// </summary>
 /// <param name="id"></param>
 protected void CreateKuaiboPage(long id)
 {
     MovieUrlKuaib k = MovieUrlKuaibView.GetModelByID(id.ToS());
     if (k.Id > 0)
     {
         Class c = MovieInfoView.GetClass(k);
         Voodoo.Basement.CreatePage.CreateDramapage(k, c);
         Response.Write(string.Format("《{0}》-快播剧集《{1}》完成", k.MovieTitle, k.Title));
     }
     else
     {
         Response.Write("不存在");
     }
 }
Ejemplo n.º 10
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());
        }