Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        member = (Member)Session["Member"];

        AjaxPro.Utility.RegisterTypeForAjax(typeof(MVideo));

        ViewingMember = ExtractPageParams.GetMember(this.Page, this.Context);

        string CurentTab = Request.QueryString["to"];
        string strPage   = Request.QueryString["p"];

        try
        {
            CurrentTab = (MemberOrderVideo)int.Parse(CurentTab);
        }
        catch { }

        SetOrderTab();

        PageTo = 1;

        Int32.TryParse(strPage, out PageTo);

        // set the page to 1 if no preference is found in the URL
        PageTo = (PageTo == 0) ? 1 : PageTo;

        if (ViewingMember != null)
        {
            GetVideoLister(ViewingMember.WebMemberID, true);
        }
        else
        {
            // error forward to notavailable.aspx
        }
    }
Пример #2
0
    /// <summary>
    /// set the page skin
    /// </summary>
    /// <param name="e"></param>
    protected override void OnPreInit(EventArgs e)
    {
        ViewingMember = ExtractPageParams.GetMember(this.Page, this.Context);

        member = (Member)Session["Member"];

        if (member != null)
        {
            if (member.MemberID == ViewingMember.MemberID)
            {
                Master.SkinID = "profile";
            }
        }


        base.OnPreInit(e);
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(WallPage));

        member = (Member)Session["Member"];

        if (member != null)
        {
            IsLoggedIn = true;
        }

        LoginUrl = @"/signup.aspx?u=" + Request.Url.AbsoluteUri;

        ViewingMember = ExtractPageParams.GetMember(this.Page, this.Context);

        Comments1.ObjectId    = ViewingMember.MemberID;
        Comments1.ObjectWebId = ViewingMember.WebMemberID;
        Comments1.CommentType = CommentType.Wall;
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(MFriends));
        member = (Member)Session["Member"];
        string strPager = Request.Params["p"];

        // determine if a page reqest has been requested otherwise default to page 1
        int PageTo = 1;

        Int32.TryParse(strPager, out PageTo);
        PageTo = (PageTo == 0) ? 1 : PageTo;

        ViewingMember = ExtractPageParams.GetMember(this.Page, this.Context);

        if (ViewingMember != null)
        {
            List <Member> friends = Member.GetAllFriendsByMemberIDForPageLister(ViewingMember.MemberID);
            GenerateLister(friends, 1, PageTo, true);
        }
    }
Пример #5
0
    private void ExtractURLParams()
    {
        ViewingMember = ExtractPageParams.GetMember(this.Page, this.Context);

        // if no member name was givent then it is likely to be a video page
        if (ViewingMember == null)
        {
            // get the video and extact the member
            DefaultVideo  = ExtractPageParams.GetVideo(this.Page, this.Context);
            ViewingMember = new Member(DefaultVideo.MemberID);
        }

        NumberOfComments          = AjaxComment.GetNumberOfCommentByObjectID(ViewingMember.MemberID, (int)CommentType.Wall);
        NumberOfMemberSubscribers = SubscriptionMember.GetSubscriberCountByMemberID(ViewingMember.MemberID).ToString();
        ViewingMemberProfile      = ViewingMember.MemberProfile[0];

        try
        {
            NumberOfVideos  = ViewingMemberProfile.NumberOfVideos;
            NumberOfPhotos  = ViewingMemberProfile.NumberOfPhotos;
            NumberOfFriends = FriendRequest.GetNumberOfFriends(ViewingMember.MemberID);
        }
        catch { }

        try
        {
            ResourceFile PhotoRes = new ResourceFile(ViewingMember.ProfilePhotoResourceFileID);
            PhotoURL      = ParallelServer.Get(PhotoRes.FullyQualifiedURL) + PhotoRes.FullyQualifiedURL;
            LargePhotoURL = ParallelServer.Get("/pmed/" + PhotoRes.FileName) + @"user/" + ViewingMember.NickName + "/pmed/" + PhotoRes.FileName;
        }
        catch { }

        ViewingMemberProfile = ViewingMember.MemberProfile[0];

        ViewingMemberProfile.NumberOfViews++;
    }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxPro.Utility.RegisterTypeForAjax(typeof(Blog));

        member = (Member)Session["Member"];

        if (member != null)
        {
            IsLoggedIn = true;
        }

        ViewingMember = ExtractPageParams.GetMember(this.Page, this.Context);

        string strPager = Request.Params["p"];

        strBlogID = Request.Params["b"];

        try
        {
            string [] blogID = strBlogID.Split(new char[] { ',' });

            if (blogID.Length != 0)
            {
                strBlogID = blogID[blogID.Length - 1];
            }
        }
        catch {}



        Int32.TryParse(strPager, out PageTo);
        PageTo = (PageTo == 0) ? 1 : PageTo;

        if (member != null)
        {
            if (ViewingMember.WebMemberID == member.WebMemberID)
            {
                IsMyPage = true;
            }
        }

        if (ViewingMember != null)
        {
            blogs = BlogEntry.GetBlogEntryByMemberID(ViewingMember.WebMemberID);
            blogs = SortBlogsByDate(blogs);
        }

        if (blogs.Count == 0)
        {
            return;
        }

        HasContent = true;

        int i = 1;

        if (strBlogID != null)
        {
            foreach (BlogEntry b in blogs)
            {
                if (b.WebBlogEntryID == strBlogID)
                {
                    blog   = b;
                    PageTo = i;
                    break;
                }
                i++;
            }
        }
        else
        {
            if (PageTo > blogs.Count)
            {
                PageTo = blogs.Count;
            }

            blog = blogs[PageTo - 1];
        }

        if (blog != null)
        {
            strBlogID             = blog.WebBlogEntryID;
            WebBlogID             = blog.WebBlogEntryID;
            Comments1.ObjectId    = blog.BlogEntryID;
            Comments1.ObjectWebId = blog.WebBlogEntryID;
            Comments1.CommentType = CommentType.Blog;

            PopulateVariables();
            BlogPager pager = new BlogPager("/users/" + ViewingMember.NickName + "/blog/", ViewingMember.NickName + "/", PageTo, blogs.Count);
            pager.PageSize   = 1;
            DefaultHTMLPager = (blogs.Count > 0) ? "<span>" + pager.ToString() + "</span>" : string.Empty;
        }
    }