Example #1
0
 public UploadForm(Core core, PPage page)
 {
     this.core = core;
     this.page = page;
     this.db = core.Db;
     this.template = core.Template;
     this.Owner = page.Owner;
     this.LoggedInMember = core.Session.LoggedInMember;
 }
Example #2
0
 public ShowPPageEventArgs(PPage page)
     : base(page)
 {
 }
Example #3
0
 public ShowPPageEventArgs(PPage page, string slug)
     : base(page)
 {
     this.itemSlug = slug;
 }
Example #4
0
 public ShowPPageEventArgs(PPage page, long itemId)
     : base(page)
 {
     this.itemId = itemId;
 }
Example #5
0
 public PostForm(Core core, PPage page)
 {
     this.core = core;
     this.page = page;
 }
Example #6
0
        public static void Show(Core core, PPage page)
        {
            page.Template.SetTemplate("Musician", "viewtours");

            if (!(page is MPage))
            {
                core.Functions.Generate404();
                return;
            }

            List<Tour> tours = Tour.GetAll(core, (Musician)page.Owner);

            foreach (Tour tour in tours)
            {
                VariableCollection tourVariableCollection = core.Template.CreateChild("tour_list");

                tourVariableCollection.Parse("ID", tour.Id.ToString());
                tourVariableCollection.Parse("TITLE", tour.Title);
                tourVariableCollection.Parse("YEAR", tour.StartYear.ToString());
                tourVariableCollection.Parse("U_TOUR", tour.Uri);
            }

            List<string[]> tourPath = new List<string[]>();
            tourPath.Add(new string[] { "tours", "Tours" });

            page.Owner.ParseBreadCrumbs(tourPath);
        }
Example #7
0
        public static void Show(Core core, PPage page, long tourId)
        {
            page.Template.SetTemplate("Musician", "viewtour");

            Tour tour = null;

            try
            {
                tour = new Tour(core, (Musician)page.Owner, tourId);
            }
            catch (InvalidTourException)
            {
                core.Functions.Generate404();
                return;
            }

            core.Template.Parse("TOUR_TITLE", tour.Title);
            core.Template.Parse("TOUR_YEAR", tour.StartYear.ToString());
            core.Template.Parse("U_TOUR", tour.Uri);
            core.Display.ParseBbcode("TOUR_ABSTRACT", tour.TourAbstract);

            List<Gig> gigs = tour.GetGigs();

            foreach (Gig gig in gigs)
            {
                VariableCollection gigVariableCollection = core.Template.CreateChild("gig_list");

                gigVariableCollection.Parse("ID", gig.Id.ToString());
                gigVariableCollection.Parse("U_GIG", gig.Uri);
                gigVariableCollection.Parse("DESCRIPTION", gig.Abstract);
                gigVariableCollection.Parse("CITY", gig.City);
                gigVariableCollection.Parse("VENUE", gig.Venue);
                gigVariableCollection.Parse("DATE", core.Tz.DateTimeToDateString(gig.GetTime(core.Tz)));
                gigVariableCollection.Parse("COMMENTS", core.Functions.LargeIntegerToString(gig.Comments));
            }

            List<string[]> tourPath = new List<string[]>();
            tourPath.Add(new string[] { "tours", "Tours" });
            tourPath.Add(new string[] { tour.Id.ToString(), tour.Title });

            page.Owner.ParseBreadCrumbs(tourPath);
        }
Example #8
0
 public ShowBlogEventArgs(PPage page, long itemId)
     : base(page, itemId)
 {
     this.display = BlogDisplayType.Post;
 }
Example #9
0
        public static void ShowForumHeader(Core core, PPage page)
        {
            core.Template.Parse("U_FORUM_INDEX", core.Hyperlink.AppendSid(string.Format("{0}forum",
                page.Owner.UriStub)));
            core.Template.Parse("U_UCP", core.Hyperlink.AppendSid(string.Format("{0}forum/ucp",
                page.Owner.UriStub)));
            core.Template.Parse("U_MEMBERS", core.Hyperlink.AppendSid(string.Format("{0}forum/memberlist",
                page.Owner.UriStub)));

            if (page is GPage)
            {
                if (core.Session.IsLoggedIn && ((GPage)page).Group.IsGroupMember(core.Session.LoggedInMember.ItemKey))
                {
                    core.Template.Parse("IS_FORUM_MEMBER", "TRUE");
                }
                else
                {
                    core.Template.Parse("IS_FORUM_MEMBER", "FALSE");
                }
            }
            core.Template.Parse("U_FAQ", core.Hyperlink.AppendSid(string.Format("{0}forum/help",
                page.Owner.UriStub)));
        }
Example #10
0
 public ShowBlogEventArgs(PPage page, short year, short month)
     : base(page)
 {
     this.year = year;
     this.month = month;
     this.display = BlogDisplayType.Month;
 }
Example #11
0
 public ShowBlogEventArgs(PPage page, short year)
     : base(page)
 {
     this.year = year;
     this.display = BlogDisplayType.Year;
 }
Example #12
0
 public ShowBlogEventArgs(PPage page, BlogDisplayType display, string key)
     : base(page)
 {
     if (display == BlogDisplayType.Category)
     {
         this.category = key;
     }
     else if (display == BlogDisplayType.Tag)
     {
         this.tag = key;
     }
     this.display = display;
 }
Example #13
0
 public ShowBlogEventArgs(PPage page)
     : base(page)
 {
     this.display = BlogDisplayType.All;
 }
Example #14
0
        private static void Save(Core core, PPage page)
        {
            AccountSubModule.AuthoriseRequestSid(core);

            if (core.Session.IsLoggedIn && core.Session.LoggedInMember != null)
            {
                ForumMember member = null;

                try
                {
                    member = new ForumMember(core, page.Owner, core.Session.LoggedInMember);
                }
                catch (InvalidForumMemberException)
                {
                    member = ForumMember.Create(core, page.Owner, core.Session.LoggedInMember, false);
                }
                member.ForumSignature = core.Http.Form["signature"];

                member.Update(typeof(ForumMember));

                core.Display.ShowMessage("Profile Updated", "Your forum profile has been saved in the database.");

                core.Template.Parse("REDIRECT_URI", core.Hyperlink.AppendSid(string.Format("{0}forum/ucp",
                    page.Owner.UriStub)));
            }
        }