예제 #1
0
        public ActionResult Index()
        {
            var oneWeekAgo = DateTime.UtcNow.AddDays(-7);
            UserAccount ua = null;

            if (_mu != null)
            {
                ua = new UserAccount(Convert.ToInt32(_mu.ProviderUserKey));
            }

            GetForumThreads(oneWeekAgo, ua);

            ViewBag.RecentArticles = LoadRecentArticles();
            ViewBag.TopUsersOfTheMonth = LoadTopUsers();
            ViewBag.NewestVideos= LoadNewestVideos();

            var recentPhotos = new PhotoItems {UseThumb = true, ShowTitle = false};
            recentPhotos.GetPhotoItemsPageWise(1, AmountOfImagesToShowOnTheHomepage);
            ViewBag.RecentPhotos = recentPhotos;

            return View();
        }
예제 #2
0
        public ActionResult Index()
        {
            // CONTESTS

            Contest cndss = Contest.GetCurrentContest();
            ContestVideos cvids = new ContestVideos();

            Videos vidsInContest = new Videos();
            BootBaronLib.AppSpec.DasKlub.BOL.Video vid2 = null;

            foreach (ContestVideo cv1 in cvids)
            {
                vid2 = new BootBaronLib.AppSpec.DasKlub.BOL.Video(cv1.VideoID);
                vidsInContest.Add(vid2);
            }

            vidsInContest.Sort(delegate(BootBaronLib.AppSpec.DasKlub.BOL.Video p1, BootBaronLib.AppSpec.DasKlub.BOL.Video p2)
            {
                return p2.PublishDate.CompareTo(p1.PublishDate);
            });

            SongRecords sngrcds3 = new SongRecords();
            SongRecord sng3 = new SongRecord();

            foreach (BootBaronLib.AppSpec.DasKlub.BOL.Video v1 in vidsInContest)
            {
                sng3 = new SongRecord(v1);

                sngrcds3.Add(sng3);
            }

            ViewBag.ContestVideoList = sngrcds3.VideosList();
            ViewBag.CurrentContest = cndss;

            //
            PhotoItems pitms = new PhotoItems();
            pitms.UseThumb = true;
            pitms.ShowTitle = false;
            pitms.GetPhotoItemsPageWise(1, 4);

            ViewBag.PhotoList = pitms.ToUnorderdList;

            Contents cnts = new Contents();
            cnts.GetContentPageWiseAll(1, 3);

            ViewBag.RecentArticles = cnts.ToUnorderdList;

            UserAccounts uas = new UserAccounts();
            uas.GetNewestUsers();
            ViewBag.NewestUsers = uas.ToUnorderdList;

            Videos newestVideos = new Videos();
            newestVideos.GetMostRecentVideos();
            SongRecords newSongs = new SongRecords();
            SongRecord sng1 = null;
            foreach (BootBaronLib.AppSpec.DasKlub.BOL.Video v1 in newestVideos)
            {
                sng1 = new SongRecord(v1);
                newSongs.Add(sng1);
            }

            ViewBag.NewestVideos = newSongs.VideosList();

            BootBaronLib.AppSpec.DasKlub.BOL.Video vid = new BootBaronLib.AppSpec.DasKlub.BOL.Video(BootBaronLib.AppSpec.DasKlub.BOL.Video.RandomVideoIDVideo());

            ViewBag.RandomVideoKey = vid.ProviderKey;

            ///video submit
            MultiProperties addList = null;
            PropertyType propTyp = null;
            MultiProperties mps = null;

            // video typesa
            propTyp = new PropertyType(SiteEnums.PropertyTypeCode.VIDTP);
            mps = new MultiProperties(propTyp.PropertyTypeID);
            mps.Sort(delegate(MultiProperty p1, MultiProperty p2)
            {
                return p1.DisplayName.CompareTo(p2.DisplayName);
            });

            ViewBag.VideoTypes = mps;

            // person types
            propTyp = new PropertyType(SiteEnums.PropertyTypeCode.HUMAN);
            mps = new MultiProperties(propTyp.PropertyTypeID);
            mps.Sort(delegate(MultiProperty p1, MultiProperty p2)
            {
                return p1.DisplayName.CompareTo(p2.DisplayName);
            });

            ViewBag.PersonTypes = mps;

            //// footage types
            propTyp = new PropertyType(SiteEnums.PropertyTypeCode.FOOTG);
            mps = new MultiProperties(propTyp.PropertyTypeID);
            mps.Sort(delegate(MultiProperty p1, MultiProperty p2)
            {
                return p1.DisplayName.CompareTo(p2.DisplayName);
            });
            addList = new MultiProperties();

            ViewBag.FootageTypes = mps;

            return View();
        }
예제 #3
0
        public ActionResult Index()
        {
            _pitms = new PhotoItems {UseThumb = true, ShowTitle = false};
            string cacheName = _pitm + "1";
            if (HttpRuntime.Cache[cacheName] == null)
            {
                ViewBag.TotalPhotos = _pitms.GetPhotoItemsPageWise(1, PageSize);
                HttpRuntime.Cache.AddObjToCache(_pitms, cacheName);
            }
            else
            {
                _pitms = (PhotoItems) HttpRuntime.Cache[cacheName];
                ViewBag.TotalPhotos = PageSize; //lie
            }

            return View(_pitms);
        }
예제 #4
0
        public JsonResult PhotoItems(int pageNumber)
        {
            _pitms = new PhotoItems();
            _pitms.GetPhotoItemsPageWise(pageNumber, PageSize);

            _pitms.ShowTitle = false;
            _pitms.UseThumb = true;
            _pitms.IncludeStartAndEndTags = false;

            return Json(new
            {
                ListItems = _pitms.ToUnorderdList
            });
        }
예제 #5
0
        public ActionResult Index()
        {
            pitms = new PhotoItems();
            pitms.UseThumb = true;
            pitms.ShowTitle = false;
            ViewBag.TotalPhotos = pitms.GetPhotoItemsPageWise(1, pageSize);

            return View(pitms);
        }