private void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TimeNow.Text = String.Format(GetText("CURRENT_TIME"), FormatTime(DateTime.Now)); TimeLastVisit.Text = String.Format(GetText("last_visit"), FormatDateTime(Mession.LastVisit)); MarkAll.Text = GetText("MARKALL"); if (UnreadPrivate > 0) { UnreadMsgs.Visible = true; UnreadMsgs.NavigateUrl = Forum.GetLink(Pages.cp_inbox); if (UnreadPrivate == 1) { UnreadMsgs.Text = String.Format(GetText("unread1"), UnreadPrivate); } else { UnreadMsgs.Text = String.Format(GetText("unread0"), UnreadPrivate); } } PageLinks.AddLink(BoardSettings.Name, Forum.GetLink(Pages.forum)); if (PageCategoryID != 0) { PageLinks.AddLink(PageCategoryName, Forum.GetLink(Pages.forum, "c={0}", PageCategoryID)); Welcome.Visible = false; } BindData(); } }
private void Page_Load(object sender, EventArgs e) { if (!User.IsAuthenticated) { Data.AccessDenied(); } if (!IsPostBack) { Send.Text = GetText("SEND"); From.Text = PageUserName; using (DataTable dt = DB.user_list(PageBoardID, Request.QueryString["u"], null)) { foreach (DataRow row in dt.Rows) { PageLinks.AddLink(BoardSettings.Name, Forum.GetLink(Pages.forum)); PageLinks.AddLink(row["user_nick"].ToString(), string.Format("userinfo.aspx?id={0}", row["User_ID"])); PageLinks.AddLink(GetText("TITLE"), Forum.GetLink(Pages.im_icq, "u={0}", row["User_ID"])); ViewState["to"] = (int)row["user_ICQ"]; Status.Src = string.Format("http://web.icq.com/whitepages/online?icq={0}&img=5", row["ICQ"]); break; } } using (DataTable dt = DB.user_list(PageBoardID, PageUserID, null)) { foreach (DataRow row in dt.Rows) { Email.Text = row["user_mail"].ToString(); break; } } } }
/// <summary> /// Adds the forum links. /// </summary> /// <param name="pageLinks">The page links.</param> /// <param name="forumId">The forum id.</param> /// <param name="noForumLink">The no forum link.</param> /// <returns>Returns the page links</returns> public static PageLinks AddForum(this PageLinks pageLinks, int forumId, bool noForumLink = false) { CodeContracts.VerifyNotNull(pageLinks, "pageLinks"); if (BoardContext.Current.PageParentForumID.HasValue) { var parent = BoardContext.Current.GetRepository <Forum>() .GetById(BoardContext.Current.PageParentForumID.Value); if (parent != null) { pageLinks.AddLink( parent.Name, BoardContext.Current.Get <LinkBuilder>().GetForumLink(parent.ID, parent.Name)); } } if (BoardContext.Current.PageForumID == forumId) { pageLinks.AddLink( BoardContext.Current.PageForumName, noForumLink ? string.Empty : BoardContext.Current.Get <LinkBuilder>().GetForumLink( forumId, BoardContext.Current.PageForumName)); } return(pageLinks); }
private void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { PageLinks.AddLink(BoardSettings.Name, Forum.GetLink(Pages.forum)); PageLinks.AddLink("Administration", Forum.GetLink(Pages.admin_admin)); BindData(); UpgradeNotice.Visible = _default.GetCurrentVersion() < Data.AppVersion; } }
/// <summary> /// Given the parameters passed into a page, builds the page links /// going backwards from post -> topic -> forum -> category /// </summary> /// <returns></returns> protected PageLinks BuildBasePageLinks() { PageLinks pageLinks = new PageLinks(); pageLinks.AddLink(ForumApplication.Instance.Title, ForumApplication.Instance.GetLink(SharePointForumControls.ViewForums)); if (messageID != 0) { Message message = RepositoryRegistry.MessageRepository.GetById(messageID); topicID = message.TopicId; } string topicName = string.Empty; if (topicID != 0) { Topic topic = RepositoryRegistry.TopicRepository.GetById(topicID); forumID = topic.ForumId; topicName = topic.Name; } if (forumID != 0) { Forum forum = RepositoryRegistry.ForumRepository.GetById(forumID); forumName = forum.Name; categoryID = forum.CategoryId; } string categoryName = string.Empty; if (categoryID != 0) { Category category = RepositoryRegistry.CategoryRepository.GetById(categoryID); categoryName = category.Name; } // Have to do this check again to build the links in the right order if (categoryID != 0) { pageLinks.AddLink(categoryName, ForumApplication.Instance.GetLink(SharePointForumControls.ViewForums, "category={0}", categoryID)); } if (forumID != 0) { pageLinks.AddLink(forumName, ForumApplication.Instance.GetLink(SharePointForumControls.ViewTopics, "forum={0}", forumID)); } if (topicID != 0) { pageLinks.AddLink(topicName, ForumApplication.Instance.GetLink(SharePointForumControls.ViewMessages, "topic={0}", topicID)); } return(pageLinks); }
protected void Page_Load(object sender, System.EventArgs e) { // if already logged in.. /* * if ( User != null ) * { * // redirect to front page... * YafBuildLink.Redirect( ForumPages.forum ); * } */ if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); PageLinks.AddLink(GetText("TITLE"), ""); ValidateKey.Text = GetText("validate"); if (Request.QueryString ["k"] != null) { key.Text = Request.QueryString ["k"]; ValidateKey_Click(sender, e); } else { approved.Visible = false; error.Visible = !approved.Visible; } } }
protected void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink("Administration", YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.admin_admin)); PageLinks.AddLink("Boards", ""); BindData(); if (BoardID != null) { CreateNewAdminHolder.Visible = false; using (DataTable dt = YAF.Classes.Data.DB.board_list(BoardID)) { DataRow row = dt.Rows [0]; Name.Text = ( string )row ["Name"]; AllowThreaded.Checked = SqlDataLayerConverter.VerifyBool(row ["AllowThreaded"]); BoardMembershipAppName.Text = row["MembershipAppName"].ToString(); } } else { UserName.Text = User.UserName; UserEmail.Text = User.Email; } } }
protected void Page_Load(object sender, EventArgs e) { if (User == null) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { // get user data... MembershipUser user = UserMembershipHelper.GetMembershipUserById(UserID); if (user == null) { YafBuildLink.AccessDenied(/*No such user exists*/); } string displayName = UserMembershipHelper.GetDisplayNameFromID(UserID); PageLinks.AddLink(PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); PageLinks.AddLink(!string.IsNullOrEmpty(displayName) ? displayName : user.UserName, YafBuildLink.GetLink(ForumPages.profile, "u={0}", UserID)); PageLinks.AddLink(GetText("TITLE"), ""); // get full user data... CombinedUserDataHelper userData = new CombinedUserDataHelper(user, UserID); Msg.NavigateUrl = "msnim:chat?contact={0}".FormatWith(userData.Profile.MSN); //Msg.Attributes.Add( "onclick", "return skypeCheck();" ); Img.Src = "http://messenger.services.live.com/users/{0}/presenceimage".FormatWith(userData.Profile.MSN); } }
protected void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink("Administration", YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.admin_admin)); PageLinks.AddLink("Board Settings", ""); // create list boxes by populating datasources from Data class Theme.DataSource = YafStaticData.Themes(); Theme.DataTextField = "Theme"; Theme.DataValueField = "FileName"; Language.DataSource = YafStaticData.Languages(); Language.DataTextField = "Language"; Language.DataValueField = "FileName"; ShowTopic.DataSource = YafStaticData.TopicTimes(); ShowTopic.DataTextField = "TopicText"; ShowTopic.DataValueField = "TopicValue"; FileExtensionAllow.DataSource = YafStaticData.AllowDisallow(); FileExtensionAllow.DataTextField = "Text"; FileExtensionAllow.DataValueField = "Value"; BindData(); SetSelectedOnList(ref Theme, PageContext.BoardSettings.Theme); SetSelectedOnList(ref Language, PageContext.BoardSettings.Language); SetSelectedOnList(ref ShowTopic, PageContext.BoardSettings.ShowTopicsDefault.ToString()); SetSelectedOnList(ref FileExtensionAllow, PageContext.BoardSettings.FileExtensionAreAllowed ? "0" : "1"); AllowThemedLogo.Checked = PageContext.BoardSettings.AllowThemedLogo; } }
protected void Page_Load(object sender, System.EventArgs e) { if (Request.QueryString ["m"] == null || !PageContext.ForumModeratorAccess) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); PageLinks.AddLink(PageContext.PageCategoryName, YafBuildLink.GetLink(ForumPages.forum, "c={0}", PageContext.PageCategoryID)); PageLinks.AddForumLinks(PageContext.PageForumID); PageLinks.AddLink(PageContext.PageTopicName, YafBuildLink.GetLink(ForumPages.posts, "t={0}", PageContext.PageTopicID)); Move.Text = GetText("MOVE_MESSAGE"); CreateAndMove.Text = GetText("CREATE_TOPIC"); ForumList.DataSource = YAF.Classes.Data.DB.forum_listall_sorted(PageContext.PageBoardID, PageContext.PageUserID); ForumList.DataTextField = "Title"; ForumList.DataValueField = "ForumID"; DataBind(); ForumList.Items.FindByValue(PageContext.PageForumID.ToString()).Selected = true; ForumList_SelectedIndexChanged(this.ForumList, e); } }
protected void Page_Load(object sender, System.EventArgs e) { if (Request.QueryString ["u"] != null) { returnUserID = Convert.ToInt32(Request.QueryString ["u"]); } if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); if (returnUserID > 0) { PageLinks.AddLink("Administration", YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.admin_admin)); PageLinks.AddLink("Users", YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.admin_users)); } else { PageLinks.AddLink(HtmlEncode(PageContext.PageUserName), YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.cp_profile)); PageLinks.AddLink(GetText("CP_EDITAVATAR", "TITLE"), YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.cp_editavatar)); } PageLinks.AddLink(GetText("TITLE"), ""); BindData(); } }
/// <summary> /// Creates page links for this page. /// </summary> protected override void CreatePageLinks() { // forum index PageLinks.AddLink(PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); // moderation index PageLinks.AddLink(GetText("TITLE")); }
protected void Page_Load(object sender, System.EventArgs e) { if (User == null) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { // get user data... MembershipUser user = UserMembershipHelper.GetMembershipUser(UserID); if (user == null) { YafBuildLink.AccessDenied(/*No such user exists*/); } PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink(user.UserName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.profile, "u={0}", UserID)); PageLinks.AddLink(GetText("TITLE"), ""); // get full user data... YafCombinedUserData userData = new YafCombinedUserData(user, UserID); Img.Src = string.Format("http://opi.yahoo.com/online?u={0}&m=g&t=2", userData.Profile.YIM); Msg.NavigateUrl = string.Format("http://edit.yahoo.com/config/send_webmesg?.target={0}&.src=pg", userData.Profile.YIM); } }
protected void Page_Load(object sender, System.EventArgs e) { if (User == null) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { // get user data... MembershipUser user = UserMembershipHelper.GetMembershipUser(UserID); if (user == null) { YafBuildLink.AccessDenied(/*No such user exists*/); } PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink(user.UserName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.profile, "u={0}", UserID)); PageLinks.AddLink(GetText("TITLE"), ""); // get full user data... YafCombinedUserData userData = new YafCombinedUserData(user, UserID); Msg.NavigateUrl = string.Format("aim:goim?screenname={0}&message=Hi.+Are+you+there?", userData.Profile.AIM); Buddy.NavigateUrl = string.Format("aim:addbuddy?screenname={0}", userData.Profile.AIM); } }
protected void Page_Load(object sender, EventArgs e) { // Ederon : guess we don't need this if anymore //if ( !CanLogin ) //YAF.Classes.Utils.YafBuildLink.Redirect( YAF.Classes.Utils.ForumPages.forum ); if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink(GetText("TITLE")); // handle localization RequiredFieldValidator usernameRequired = ( RequiredFieldValidator )PasswordRecovery1.UserNameTemplateContainer.FindControl("UserNameRequired"); RequiredFieldValidator answerRequired = ( RequiredFieldValidator )PasswordRecovery1.QuestionTemplateContainer.FindControl("AnswerRequired"); usernameRequired.ToolTip = usernameRequired.ErrorMessage = GetText("REGISTER", "NEED_USERNAME"); answerRequired.ToolTip = answerRequired.ErrorMessage = GetText("REGISTER", "NEED_ANSWER"); (( Button )PasswordRecovery1.UserNameTemplateContainer.FindControl("SubmitButton")).Text = GetText("SUBMIT"); (( Button )PasswordRecovery1.QuestionTemplateContainer.FindControl("SubmitButton")).Text = GetText("SUBMIT"); (( Button )PasswordRecovery1.SuccessTemplateContainer.FindControl("SubmitButton")).Text = GetText("BACK"); PasswordRecovery1.UserNameFailureText = GetText("USERNAME_FAILURE"); PasswordRecovery1.GeneralFailureText = GetText("GENERAL_FAILURE"); PasswordRecovery1.QuestionFailureText = GetText("QUESTION_FAILURE"); DataBind(); } }
protected void Page_Load(object sender, System.EventArgs e) { if (Request.QueryString ["t"] == null || !PageContext.ForumReadAccess || !PageContext.BoardSettings.AllowEmailTopic) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { if (PageContext.Settings.LockedForum == 0) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink(PageContext.PageCategoryName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum, "c={0}", PageContext.PageCategoryID)); } PageLinks.AddForumLinks(PageContext.PageForumID); PageLinks.AddLink(PageContext.PageTopicName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.posts, "t={0}", PageContext.PageTopicID)); SendEmail.Text = GetText("send"); Subject.Text = PageContext.PageTopicName; YafTemplateEmail emailTopic = new YafTemplateEmail(); emailTopic.TemplateParams ["{link}"] = String.Format("{0}{1}", YAF.Classes.Utils.YafForumInfo.ServerURL, YAF.Classes.Utils.YafBuildLink.GetLinkNotEscaped(YAF.Classes.Utils.ForumPages.posts, "t={0}", PageContext.PageTopicID)); emailTopic.TemplateParams ["{user}"] = PageContext.PageUserName; Message.Text = emailTopic.ProcessTemplate("EMAILTOPIC"); } }
protected void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink("Administration", YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.admin_admin)); PageLinks.AddLink("NNTP Servers", ""); BindData(); if (Request.QueryString["s"] != null) { using (DataTable dt = YAF.Classes.Data.DB.nntpserver_list(PageContext.PageBoardID, Request.QueryString["s"])) { DataRow row = dt.Rows[0]; Name.Text = row["Name"].ToString(); Address.Text = row["Address"].ToString(); Port.Text = row["Port"].ToString(); UserName.Text = row["UserName"].ToString(); UserPass.Text = row["UserPass"].ToString(); } } else { Port.Text = "119"; } } }
protected void Page_Load(object sender, System.EventArgs e) { if (User == null) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { Send.Text = GetText("SEND"); From.Text = PageContext.User.UserName; Email.Text = PageContext.User.Email; // get user data... MembershipUser user = UserMembershipHelper.GetMembershipUserById(UserID); if (user == null) { YafBuildLink.AccessDenied(/*No such user exists*/); } string displayName = UserMembershipHelper.GetDisplayNameFromID(UserID); PageLinks.AddLink(PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); PageLinks.AddLink(!string.IsNullOrEmpty(displayName) ? displayName : user.UserName, YafBuildLink.GetLink(ForumPages.profile, "u={0}", UserID)); PageLinks.AddLink(GetText("TITLE"), ""); // get full user data... CombinedUserDataHelper userData = new CombinedUserDataHelper(user, UserID); ViewState ["to"] = userData.Profile.ICQ; Status.Src = "http://web.icq.com/whitepages/online?icq={0}&img=5".FormatWith(userData.Profile.ICQ); } }
protected void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { ForumStats.Visible = PageContext.BoardSettings.ShowForumStatistics; ActiveDiscussions.Visible = PageContext.BoardSettings.ShowActiveDiscussions; if (PageContext.IsPrivate && User == null) { YAF.Classes.Utils.YafBuildLink.Redirect(YAF.Classes.Utils.ForumPages.login, "ReturnUrl={0}", Request.RawUrl); } if (PageContext.Settings.LockedForum == 0) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); if (PageContext.PageCategoryID != 0) { PageLinks.AddLink(PageContext.PageCategoryName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum, "c={0}", PageContext.PageCategoryID)); Welcome.Visible = false; } } BindData(); } }
protected void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink("Administration", YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.admin_admin)); PageLinks.AddLink("Access Masks", ""); BindData(); if (Request.QueryString ["i"] != null) { using (DataTable dt = YAF.Classes.Data.DB.accessmask_list(PageContext.PageBoardID, Request.QueryString["i"])) { DataRow row = dt.Rows[0]; AccessFlags flags = new AccessFlags(row["Flags"]); Name.Text = (string)row["Name"]; ReadAccess.Checked = flags.ReadAccess; PostAccess.Checked = flags.PostAccess; ReplyAccess.Checked = flags.ReplyAccess; PriorityAccess.Checked = flags.PriorityAccess; PollAccess.Checked = flags.PollAccess; VoteAccess.Checked = flags.VoteAccess; ModeratorAccess.Checked = flags.ModeratorAccess; EditAccess.Checked = flags.EditAccess; DeleteAccess.Checked = flags.DeleteAccess; UploadAccess.Checked = flags.UploadAccess; DownloadAccess.Checked = flags.DownloadAccess; } } } }
protected void Page_Load(object sender, EventArgs e) { if (User == null) { YafBuildLink.Redirect(ForumPages.login, "ReturnUrl={0}", General.GetSafeRawUrl()); } // check if this feature is disabled if (!PageContext.BoardSettings.AllowPrivateMessages) { YafBuildLink.Redirect(ForumPages.info, "i=5"); } if (!IsPostBack) { if (String.IsNullOrEmpty(Request.QueryString ["pm"])) { YafBuildLink.AccessDenied(); } PageLinks.AddLink(PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); PageLinks.AddLink(PageContext.PageUserName, YafBuildLink.GetLink(ForumPages.cp_profile)); // handle custom BBCode javascript or CSS... BBCode.RegisterCustomBBCodePageElements(Page, this.GetType()); BindData(); } }
protected void Page_Load(object sender, System.EventArgs e) { if (User == null) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { // get user data... MembershipUser user = UserMembershipHelper.GetMembershipUserById(UserID); if (user == null) { YafBuildLink.AccessDenied(/*No such user exists*/); } string displayName = UserMembershipHelper.GetDisplayNameFromID(UserID); PageLinks.AddLink(PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); PageLinks.AddLink(!string.IsNullOrEmpty(displayName) ? displayName : user.UserName, YafBuildLink.GetLink(ForumPages.profile, "u={0}", UserID)); PageLinks.AddLink(GetText("TITLE"), ""); // get full user data... CombinedUserDataHelper userData = new CombinedUserDataHelper(user, UserID); Msg.NavigateUrl = "aim:goim?screenname={0}&message=Hi.+Are+you+there?".FormatWith(userData.Profile.AIM); Buddy.NavigateUrl = "aim:addbuddy?screenname={0}".FormatWith(userData.Profile.AIM); } }
protected void Page_Load(object sender, EventArgs e) { if (User == null) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { // get user data... MembershipUser user = UserMembershipHelper.GetMembershipUser(UserID); if (user == null) { YafBuildLink.AccessDenied(/*No such user exists*/); } PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink(user.UserName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.profile, "u={0}", UserID)); PageLinks.AddLink(GetText("TITLE"), ""); // get full user data... YafCombinedUserData userData = new YafCombinedUserData(user, UserID); Msg.NavigateUrl = string.Format("skype:{0}?call", userData.Profile.Skype); Msg.Attributes.Add("onclick", "return skypeCheck();"); Img.Src = string.Format("http://mystatus.skype.com/bigclassic/{0}", userData.Profile.Skype); } }
protected void Page_Load(object sender, System.EventArgs e) { if (User == null) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { Send.Text = GetText("SEND"); From.Text = PageContext.User.UserName; Email.Text = PageContext.User.Email; // get user data... MembershipUser user = UserMembershipHelper.GetMembershipUser(UserID); if (user == null) { YafBuildLink.AccessDenied(/*No such user exists*/); } PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink(user.UserName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.profile, "u={0}", UserID)); PageLinks.AddLink(GetText("TITLE"), ""); // get full user data... YafCombinedUserData userData = new YafCombinedUserData(user, UserID); ViewState ["to"] = userData.Profile.ICQ; Status.Src = string.Format("http://web.icq.com/whitepages/online?icq={0}&img=5", userData.Profile.ICQ); } }
protected void Page_Load(object sender, System.EventArgs e) { if (Request.QueryString["t"] == null || !PageContext.ForumModeratorAccess) { YafBuildLink.AccessDenied(); } if (!IsPostBack) { if (PageContext.Settings.LockedForum == 0) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink(PageContext.PageCategoryName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum, "c={0}", PageContext.PageCategoryID)); } PageLinks.AddForumLinks(PageContext.PageForumID); PageLinks.AddLink(PageContext.PageTopicName, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.posts, "t={0}", PageContext.PageTopicID)); Move.Text = GetText("move"); // Ederon : 7/14/2007 - by default, leave pointer is set on value defined on host level LeavePointer.Checked = PageContext.BoardSettings.ShowMoved; ForumList.DataSource = YAF.Classes.Data.DB.forum_listall_sorted(PageContext.PageBoardID, PageContext.PageUserID); DataBind(); System.Web.UI.WebControls.ListItem pageItem = ForumList.Items.FindByValue(PageContext.PageForumID.ToString()); if (pageItem != null) { pageItem.Selected = true; } } }
protected void Page_Load(object sender, System.EventArgs e) { // we're in the admin section... ProfileEditControl.InAdminPages = true; SignatureEditControl.InAdminPages = true; AvatarEditControl.InAdminPages = true; PageContext.QueryIDs = new QueryStringIDHelper("u", true); DataTable dt = YAF.Classes.Data.DB.user_list(PageContext.PageBoardID, CurrentUserID, null); if (dt.Rows.Count == 1) { DataRow userRow = dt.Rows [0]; // do admin permission check... if (!PageContext.IsHostAdmin && IsUserHostAdmin(userRow)) { // user is not host admin and is attempted to edit host admin account... YafBuildLink.AccessDenied(); } if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink("Administration", YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.admin_admin)); PageLinks.AddLink("Users", YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.admin_users)); PageLinks.AddLink(String.Format("Edit User \"{0}\"", userRow ["Name"].ToString())); // do a quick user membership sync... MembershipUser user = UserMembershipHelper.GetMembershipUser(CurrentUserID); RoleMembershipHelper.UpdateForumUser(user, PageContext.PageBoardID); } } }
protected void Page_Load(object sender, System.EventArgs e) { // check access permissions General.HandleRequest(PageContext, PageContext.BoardSettings.ActiveUsersViewPermissions); if (!IsPostBack) { PageLinks.AddLink(PageContext.BoardSettings.Name, YAF.Classes.Utils.YafBuildLink.GetLink(YAF.Classes.Utils.ForumPages.forum)); PageLinks.AddLink(GetText("TITLE"), ""); DataTable dt = YAF.Classes.Data.DB.active_list(PageContext.PageBoardID, true); // remove hidden users... foreach (DataRow row in dt.Rows) { if (Convert.ToBoolean(row ["IsHidden"]) && !PageContext.IsAdmin && !(PageContext.PageUserID == Convert.ToInt32(row ["UserID"]))) { // remove this active user... row.Delete(); } } dt.AcceptChanges(); UserList.DataSource = dt; DataBind(); } }
/// <summary> /// Builds the page links. /// </summary> /// <param name="title">The title.</param> /// <param name="url">The link.</param> /// <returns></returns> protected PageLinks BuildPageLinks(string title, string url) { PageLinks pageLinks = BuildBasePageLinks(); pageLinks.AddLink(title, url); return(pageLinks); }
/// <summary> /// Creates page links for this page. /// </summary> protected override void CreatePageLinks() { // forum index PageLinks.AddLink(PageContext.BoardSettings.Name, YafBuildLink.GetLink(ForumPages.forum)); // information title text PageLinks.AddLink(Title.Text); }
/// <summary> /// Adds the root. /// </summary> /// <param name="pageLinks">The page links.</param> /// <returns>returns the Page links including the root</returns> public static PageLinks AddRoot(this PageLinks pageLinks) { CodeContracts.VerifyNotNull(pageLinks, "pageLinks"); pageLinks.AddLink(pageLinks.Get <BoardSettings>().Name, BuildLink.GetLink(ForumPages.forum)); return(pageLinks); }