Exemple #1
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("不存在");
            }
        }
Exemple #2
0
        protected void LoadInfo()
        {
            ddl_Class.DataSource     = NewsAction.NewsClass.Where(p => p.ModelID == 6).ToList();
            ddl_Class.DataTextField  = "ClassName";
            ddl_Class.DataValueField = "ID";
            ddl_Class.DataBind();

            ddl_Class.SelectedValue = cls.ToS();

            int id = WS.RequestInt("id");

            MovieInfo mi = MovieInfoView.GetModelByID(id.ToS());

            txt_Title.Text           = mi.Title;
            txt_Director.Text        = mi.Director;
            txt_Actors.Text          = mi.Actors;
            txt_Tags.Text            = mi.Tags;
            txt_Location.Text        = mi.Location;
            txt_PublicYear.Text      = mi.PublicYear;
            txt_Intro.Text           = mi.Intro;
            FCKeditor1.Value         = mi.Info;
            chk_IsMovie.Checked      = mi.IsMove;
            img_Movieface.ImageUrl   = mi.FaceImage;
            rbl_Status.SelectedValue = mi.Status.ToS();
            chk_Enable.Checked       = mi.Enable;
        }
Exemple #3
0
        public static string GetMovieDramaUrl(MovieUrlKuaib b, Class cls)
        {
            if (b == null)
            {
                return("");
            }

            MovieInfo movie = MovieInfoView.GetModelByID(b.MovieID.ToS());

            string result = "";


            string sitrurl = "/Movie/";


            result = string.Format("{0}{1}/{2}/Kuaib/{3}{4}",
                                   sitrurl,
                                   cls.ClassForder,
                                   TitleFilter(movie.Title.Replace("/", "_")),
                                   b.Id,
                                   BasePage.SystemSetting.ExtName
                                   );
            result = Regex.Replace(result, "[/]{2,}", "/");
            result = result.Replace(":", "_");
            result = result.Replace(">", "");
            result = result.Replace("<", "");
            result = result.Replace("*", "");
            result = result.Replace("?", "");
            result = result.Replace("|", "_");
            return(result);
        }
Exemple #4
0
        /// <summary>
        /// 从source文件中分析剧集
        /// </summary>
        /// <param name="source"></param>
        /// <returns></returns>
        public List <Drama> CollectDramas(string source, int Movieid)
        {
            MovieInfo mv = MovieInfoView.GetModelByID(Movieid.ToS());

            var result = new List <Drama>();

            source = source.UrlDecode().AsciiToNative();

            List <string> tmp = new List <string>();
            Match         m   = new Regex("((bdhd://)|(qvod://)).*?((.rmvb)|(.rm)|(.avi)|(.mp4)|(.asf)|(.wmv))+").Match(source);

            while (m.Success)
            {
                string str = m.Groups["0"].Value;
                tmp.Add(str);
                m = m.NextMatch();
            }

            foreach (string str in tmp)
            {
                try
                {
                    result.Add(new Drama()
                    {
                        Title = str.Split('|')[2].GetMatchGroup("[0-9]+").Groups[0].Value.IsNull(str.Split('|')[2].ToLower().Replace(".rmvb", "").Replace(".rm", "").Replace(".avi", "").Replace(".mp4", "").Replace(".asf", "").Replace(".wmv", "").Replace(" ", "").Replace(".", "")),
                        Url   = str,
                        Type  = str.StartsWith("bdhd") ? "baidu" : "qvod"
                    });
                }
                catch { }
            }


            return(result);
        }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int       id = WS.RequestInt("id");
         MovieInfo mv = MovieInfoView.GetModelByID(id.ToS());
         txt_BookTitle.Text = mv.Title;
     }
 }
Exemple #6
0
        protected void SaveDramas(int MovieID, List <Drama> dramas)
        {
            if (dramas.Count == 0)
            {
                return;
            }

            MovieInfo mv = MovieInfoView.GetModelByID(MovieID.ToS());

            List <MovieUrlBaidu> baidus  = new List <MovieUrlBaidu>();
            List <MovieUrlKuaib> kuaibos = new List <MovieUrlKuaib>();

            if (dramas[0].Type == "baidu")
            {
                baidus = MovieUrlBaiduView.GetModelList(string.Format("movieid={0}", MovieID));

                foreach (var drama in dramas)
                {
                    if (baidus.Where(p => p.Title == drama.Title).Count() == 0)
                    {
                        MovieUrlBaidu m = new MovieUrlBaidu();
                        m.Enable     = true;
                        m.MovieID    = mv.Id;
                        m.MovieTitle = mv.Title;
                        m.Title      = drama.Title;
                        m.UpdateTime = DateTime.UtcNow.AddHours(8);
                        m.Url        = drama.Url;
                        MovieUrlBaiduView.Insert(m);
                    }
                }
            }
            else
            {
                kuaibos = MovieUrlKuaibView.GetModelList(string.Format("movieid={0}", MovieID));
                foreach (var drama in dramas)
                {
                    if (kuaibos.Where(p => p.Title == drama.Title).Count() == 0)
                    {
                        MovieUrlKuaib m = new MovieUrlKuaib();
                        m.Enable     = true;
                        m.MovieID    = mv.Id;
                        m.MovieTitle = mv.Title;
                        m.Title      = drama.Title;
                        m.UpdateTime = DateTime.UtcNow.AddHours(8);
                        m.Url        = drama.Url;
                        MovieUrlKuaibView.Insert(m);
                    }
                }
            }
        }
Exemple #7
0
        protected void btn_createPage_Click(object sender, EventArgs e)
        {
            Class c = ClassView.GetModelByID(cls.ToS());

            string[] ids = WS.RequestString("id").Split(',');
            foreach (string id in ids)
            {
                MovieInfo mv = MovieInfoView.GetModelByID(id);
                CreatePage.CreateContentPage(mv, c);
                var kuaibos = MovieUrlKuaibView.GetModelList(string.Format("MovieID={0}", id));
                var baidus  = MovieUrlBaiduView.GetModelList(string.Format("MovieID={0}", id));
                var dramas  = MovieDramaView.GetModelList(string.Format("MovieID={0}", id));
                foreach (var kuaib in kuaibos)
                {
                    CreatePage.CreateDramapage(kuaib, c);
                }
                foreach (var baidu in baidus)
                {
                    CreatePage.CreateDramapage(baidu, c);
                }
                foreach (var drama in dramas)
                {
                    CreatePage.CreateDramapage(drama, c);
                }
            }

            if (cls > 0)
            {
                try
                {
                    CreatePage.CreateListPage(c, 1);
                }
                catch { }
            }
            CreatePage.GreateIndexPage();
            Js.Jump(url);
        }
Exemple #8
0
        protected void btn_Save_Click(object sender, EventArgs e)
        {
            movieID = WS.RequestInt("movieid", 0);
            MovieInfo movie = MovieInfoView.GetModelByID(movieID.ToS());

            #region deal
            switch (type)
            {
            case "kuaib":
                var kuaibUrl = MovieUrlKuaibView.GetModelByID(id.ToS());
                kuaibUrl.MovieTitle = movie.Title;
                kuaibUrl.Title      = txt_Title.Text;
                kuaibUrl.Url        = txt_Url.Text;
                kuaibUrl.MovieID    = movie.Id;
                kuaibUrl.UpdateTime = DateTime.Now;
                if (kuaibUrl.Id > 0)
                {
                    MovieUrlKuaibView.Update(kuaibUrl);
                }
                else
                {
                    MovieUrlKuaibView.Insert(kuaibUrl);
                }
                break;

            case "baidu":
                var baiduUrl = MovieUrlBaiduView.GetModelByID(id.ToS());
                baiduUrl.MovieTitle = movie.Title;
                baiduUrl.Title      = txt_Title.Text;
                baiduUrl.Url        = txt_Url.Text;
                baiduUrl.MovieID    = movie.Id;
                baiduUrl.UpdateTime = DateTime.Now;
                if (baiduUrl.Id > 0)
                {
                    MovieUrlBaiduView.Update(baiduUrl);
                }
                else
                {
                    MovieUrlBaiduView.Insert(baiduUrl);
                }
                break;

            case "mag":
                var magUrl = MovieUrlMagView.GetModelByID(id.ToS());
                magUrl.MovieTitle = movie.Title;
                magUrl.Title      = txt_Title.Text;
                magUrl.Url        = txt_Url.Text;
                magUrl.MovieID    = movie.Id;
                magUrl.UpdateTime = DateTime.Now;
                if (magUrl.Id > 0)
                {
                    MovieUrlMagView.Update(magUrl);
                }
                else
                {
                    MovieUrlMagView.Insert(magUrl);
                }
                break;
            }
            #endregion

            Response.Redirect("UrlList.aspx?type=" + type + "&movieid=" + movieID);
        }
Exemple #9
0
        protected void btn_Save_Click(object sender, EventArgs e)
        {
            int       id = WS.RequestInt("id");
            MovieInfo mi = MovieInfoView.GetModelByID(id.ToS());

            mi.ClassID       = ddl_Class.SelectedItem.Value.ToInt32();
            mi.ClassName     = ddl_Class.SelectedItem.Text;
            mi.Title         = txt_Title.Text;
            mi.Director      = txt_Director.Text;
            mi.Actors        = txt_Actors.Text;
            mi.Tags          = txt_Tags.Text;
            mi.Location      = txt_Location.Text;
            mi.PublicYear    = txt_PublicYear.Text;
            mi.Intro         = txt_Intro.Text;
            mi.IsMove        = chk_IsMovie.Checked;
            mi.Status        = rbl_Status.SelectedValue.ToInt32();
            mi.Enable        = chk_Enable.Checked;
            mi.Info          = FCKeditor1.Value;
            mi.InsertTime    = DateTime.UtcNow.AddHours(8);
            mi.UpdateTime    = DateTime.UtcNow.AddHours(8);
            mi.LastClickTime = DateTime.UtcNow.AddHours(8);

            if (mi.Id > 0)
            {
                //update
                MovieInfoView.Update(mi);
            }
            else
            {
                MovieInfoView.Insert(mi);
            }

            //Deal Book face image
            if (file_Moviefacefile.FileName.IsNullOrEmpty() == false)
            {
                file_Moviefacefile.SaveAs(Server.MapPath("/u/MoviekFace/" + mi.Id + ".jpg"));
                mi.FaceImage = "/u/MoviekFace/" + mi.Id + ".jpg";
                MovieInfoView.Update(mi);
            }

            //Class c=MovieInfoView.GetClass(mi);

            ////Create statis pages
            //CreatePage.CreateContentPage(mi, c);

            //var kuaibos = MovieUrlKuaibView.GetModelList(string.Format("MovieID={0}", mi.Id));
            //var baidus = MovieUrlBaiduView.GetModelList(string.Format("MovieID={0}", mi.Id));
            //var dramas = MovieDramaView.GetModelList(string.Format("MovieID={0}", mi.Id));
            ////foreach (var kuaib in kuaibos)
            //{
            //    CreatePage.CreateDramapage(kuaib, c);
            //}
            //foreach (var baidu in baidus)
            //{
            //    CreatePage.CreateDramapage(baidu, c);
            //}
            //foreach (var drama in dramas)
            //{
            //    CreatePage.CreateDramapage(drama, c);
            //}

            Response.Redirect(url);
        }