public List <FullCalendarEvent> GetFullCalendarEvents() { int _calendarID = DataHelper.GetIntFromQueryString("calendarID", 1); int _editMode = DataHelper.GetIntFromQueryString("editMode", 0); List <SueetieCalendarEvent> _sueetieCalendarEvents = SueetieCalendars.GetSueetieCalendarEventList(_calendarID); List <FullCalendarEvent> _fullCalendarEvents = new List <FullCalendarEvent>(); foreach (SueetieCalendarEvent _sueetieCalendarEvent in _sueetieCalendarEvents) { FullCalendarEvent _fullCalendarEvent = new FullCalendarEvent { id = _sueetieCalendarEvent.EventGuid, start = _sueetieCalendarEvent.StartDateTime.ToString("MM/dd/yyyy HH:mm:ss"), end = _sueetieCalendarEvent.EndDateTime.ToString("MM/dd/yyyy HH:mm:ss"), description = _sueetieCalendarEvent.EventDescription, moreMessage = SueetieLocalizer.GetString("click_for_more"), allDay = _sueetieCalendarEvent.AllDayEvent, title = _sueetieCalendarEvent.EventTitle, url = string.IsNullOrEmpty(_sueetieCalendarEvent.Url) || _editMode > 0 ? "na" : _sueetieCalendarEvent.Url, endRepeatDate = _sueetieCalendarEvent.RepeatEndDate.ToShortDateString(), sourceContentID = _sueetieCalendarEvent.SourceContentID }; _fullCalendarEvents.Add(_fullCalendarEvent); } return(_fullCalendarEvents); }
protected override void Render(HtmlTextWriter writer) { SueetieUser user = SueetieContext.Current.User; string _href = SueetieUrls.Instance.MasterAccountInfo().Url; if (SueetieConfiguration.Get().Core.UseForumProfile) { _href = SueetieUrls.Instance.MyAccountInfo().Url; } string _imgUrl = "/images/avatars/noavatarthumbnail.jpg"; if (user.HasAvatarImage) { _imgUrl = "/images/avatars/" + user.UserID.ToString() + "t.jpg?d=" + DateTime.Now.ToLongTimeString(); } writer.BeginRender(); writer.Write("<span class='WelcomeText'>" + string.Format(SueetieLocalizer.GetString("welcome_back"), user.DisplayName, SueetieLocalizer.GetString("welcome_exclamation")) + "</span>"); writer.Write(string.Format("<span class='AvatarImage'><a href='{0}'><img src='{1}' alt='' /></a></span>", _href, _imgUrl)); var aspUser = System.Web.Security.Membership.GetUser(false); //System.Web.Profile.ProfileManager. writer.Write($"<!-- ProviderUserKey = {aspUser?.ProviderUserKey} ; UserName = {aspUser?.UserName} ; DisplayName = {HttpContext.Current.Profile["DisplayName"]} -->"); writer.EndRender(); }
protected void GenerateProductKey_Click(object sender, EventArgs e) { var productPackage = CommerceCommon.GetProductPackage(base.CurrentSueetieProduct.ProductID); var purchase2 = new ProductPurchase { UserID = base.CurrentSueetieUserID, CartLinkID = CommerceCommon.GetCartLinkList(base.CurrentSueetieProduct.ProductID).Find(p => p.LicenseTypeID == 1).CartLinkID, ProductID = base.CurrentSueetieProduct.ProductID, PurchaseKey = CommerceCommon.GeneratePurchaseKey(), ActionID = 2 }; var productPurchase = purchase2; var num = Purchases.RecordPurchase(productPurchase); var spt = (SueetiePackageType)Enum.ToObject(typeof(SueetiePackageType), productPackage.PackageTypeID); var productLicense = new ProductLicense { License = LicensingCommon.CreateLicenseKey(SueetieLicenseType.Free, spt), PackageTypeID = productPackage.PackageTypeID, LicenseTypeID = 1, Version = productPackage.Version, UserID = base.CurrentSueetieUserID, CartLinkID = productPurchase.CartLinkID, PurchaseID = num }; Licenses.CreateProductLicense(productLicense); this.ltLicenseGeneration.Text = SueetieLocalizer.GetMarketplaceString("license_created_message"); this.ltNewLicense.Text = productLicense.License; this.SetActivePanel(this.pnlLicenseGeneration); }
// Sueetie Modified - Link Tags to Global Search Results protected virtual string SueetieTagLinks() { if (Post.IsPublished) { if (Post.Tags.Count == 0) { return(SueetieLocalizer.GetString("no_tags_blogpost")); } int _contentID = -1; if (this.CurrentSueetieBlogPost != null) { _contentID = this.CurrentSueetieBlogPost.ContentID; } string[] tags = new string[Post.Tags.Count]; for (int i = 0; i < Post.Tags.Count; i++) { tags[i] = Post.Tags[i]; } return(SueetieTags.TagUrls(_contentID)); } else { return(SueetieLocalizer.GetString("no_tags_notpublished")); } }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { DataHelper.GetIntFromQueryString("l", -1); if (!LicensingCommon.IsValidLicense(SueetiePackageType.Marketplace)) { this.lblLicenseType.Text = SueetieLocalizer.GetLicensingString("license_marketplace_notvalid_title"); this.lblLicenseInfo.Text = SueetieLocalizer.GetLicensingString("license_marketplace_notvalid_message") + " " + SueetieLocalizer.GetLicensingString("license_visit_sueetiecom"); } else if (LicensingCommon.IsInTrialPeriod(SueetiePackageType.Marketplace)) { this.lblLicenseType.Text = SueetieLocalizer.GetLicensingString("license_marketplace_trialperiod_title"); this.lblLicenseInfo.Text = SueetieLocalizer.GetLicensingString("license_marketplace_trialperiod_message") + " " + SueetieLocalizer.GetLicensingString("license_visit_sueetiecom"); } else if (LicensingCommon.IsFreeLicense(SueetiePackageType.Marketplace)) { this.lblLicenseType.Text = SueetieLocalizer.GetLicensingString("license_marketplace_free_title"); this.lblLicenseInfo.Text = SueetieLocalizer.GetLicensingString("license_marketplace_free_message") + " " + SueetieLocalizer.GetLicensingString("license_visit_sueetiecom"); } else if (LicensingCommon.IsCommercialLicense(SueetiePackageType.Marketplace)) { this.lblLicenseType.Text = string.Format(SueetieLocalizer.GetLicensingString("license_marketplace_paid_title"), LicenseHelper.LicenseTypeDisplay(LicensingCommon.GetSueetieLicenseType(SueetiePackageType.Marketplace))); this.lblLicenseInfo.Text = SueetieLocalizer.GetLicensingString("license_marketplace_paid_message"); } this.ProcessHyperlinks(LicensingCommon.IsValidLicense(SueetiePackageType.Marketplace)); } }
protected void ResetPassword_Click(object sender, EventArgs e) { MembershipUser user = Membership.GetUser(); try { lblPasswordMessage.Visible = true; if (user.ChangePassword(txtCurrentPassword.Text, txtNewPassword1.Text)) { lblPasswordMessage.Text = SueetieLocalizer.GetString("accountinfo_password_changed"); } else { if (user.IsLockedOut) { lblPasswordMessage.Text = SueetieLocalizer.GetString("accountinfo_password_exceeded_attempts", new string[] { SiteSettings.Instance.ContactEmail }); } else { lblPasswordMessage.Text = SueetieLocalizer.GetString("accountinfo_password_current_incorrect"); } } } catch (Exception exception) { lblPasswordMessage.Text = exception.Message; } }
private void BindLink(RepeaterItemEventArgs e, SueetieSearchResult searchResult) { var relatedLink = (HyperLink)e.Item.FindControl("Link"); var datePublished = (Literal)e.Item.FindControl("DatePublished"); var score = (Literal)e.Item.FindControl("Score"); var ltContainerName = (Literal)e.Item.FindControl("ltContainerName"); var ltContainerLabel = (Literal)e.Item.FindControl("ltContainerLabel"); var ltHighlightedContent = (Literal)e.Item.FindControl("ltHighlightedContent"); var ltAuthor = (Literal)e.Item.FindControl("ltAuthor"); var ltTags = (Literal)e.Item.FindControl("ltTags"); var searchResultItem = (HtmlGenericControl)e.Item.FindControl("searchResultItem"); if (relatedLink != null) { searchResultItem.Attributes.Add("class", "srch" + SearchResultItemClass(searchResult.ApplicationTypeID, searchResult.ContentTypeID)); relatedLink.Text = searchResult.Title; relatedLink.NavigateUrl = searchResult.PermaLink; datePublished.Text = searchResult.PublishDate.ToShortDateString(); score.Text = searchResult.Score.ToString(); ltContainerLabel.Text = ContainerLabel(searchResult.ApplicationTypeID, searchResult.ContentTypeID); ltContainerName.Text = searchResult.ContainerName; ltHighlightedContent.Text = searchResult.HighlightedContent; ltAuthor.Text = searchResult.Author; if (string.IsNullOrEmpty(searchResult.DisplayTags)) { ltTags.Text = SueetieLocalizer.GetString("no_tags"); } else { ltTags.Text = searchResult.DisplayTags; } } }
private void ConfigureControls() { this.TaskHeaderText = Resources.GalleryServerPro.Task_Edit_Captions_Header_Text; this.TaskBodyText = Resources.GalleryServerPro.Task_Edit_Captions_Body_Text; this.OkButtonText = SueetieLocalizer.GetString("process_updates", "MediaGallery.xml"); this.OkButtonToolTip = Resources.GalleryServerPro.Task_Edit_Captions_Ok_Button_Tooltip; this.PageTitle = Resources.GalleryServerPro.Task_Edit_Captions_Page_Title; // Sueetie Modified - Converting GSP galleryObjects into SueetieGalleryObjects List <SueetieMediaObject> sueetieMediaObjects = new List <SueetieMediaObject>(); IGalleryObjectCollection albumChildren = this.GetAlbum().GetChildGalleryObjects(GalleryObjectType.MediaObject, true); foreach (IGalleryObject _galleryObject in albumChildren) { SueetieMediaObject _sueetieMediaObject = SueetieMedia.GetSueetieMediaObject(this.CurrentSueetieGalleryID, _galleryObject.Id); MediaHelper.PopulateMediaObject(_sueetieMediaObject, _galleryObject); sueetieMediaObjects.Add(_sueetieMediaObject); } if (albumChildren.Count > 0) { const int textareaWidthBuffer = 30; // Extra width padding to allow room for the caption. const int textareaHeightBuffer = 72; // Extra height padding to allow room for the caption. SetThumbnailCssStyle(albumChildren, textareaWidthBuffer, textareaHeightBuffer); rptr.DataSource = sueetieMediaObjects; rptr.DataBind(); } else { this.RedirectToAlbumViewPage("msg={0}", ((int)Message.CannotEditCaptionsNoEditableObjectsExistInAlbum).ToString(CultureInfo.InvariantCulture)); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Sueetie Modified - Adding Compressed theme/style.css and Sueetie Theme stylesheets Page.Header.Controls.Add(SueetieBlogUtils.AddBlogEngineThemeCSS()); Page.Header.Controls.Add(MakeStyleSheetControl("/themes/" + this.CurrentTheme + "/style/shared.css")); Page.Header.Controls.Add(MakeStyleSheetControl("/themes/" + this.CurrentTheme + "/style/blogs.css")); Page.Header.Controls.Add(MakeStyleSheetControl("/themes/" + this.CurrentTheme + "/style/contact.css")); Page.Header.Controls.Add(new LiteralControl("<!--[if IE]><link rel=\"stylesheet\" href=\"/themes/" + this.CurrentTheme + "/style/ie.css\" type=\"text/css\" /><![endif]-->")); MembershipUser user = Membership.GetUser(); UserLink.Text = "Welcome, Guest!"; UserLink.NavigateUrl = "/members/login.aspx"; if (Page.User.Identity.IsAuthenticated) { string _displayName = SueetieUsers.GetUserDisplayName(SueetieContext.Current.User.UserID, false); if (SueetieConfiguration.Get().Core.UseForumProfile) { UserLink.NavigateUrl = SueetieUrls.Instance.MasterAccountInfo().Url; } else { UserLink.NavigateUrl = SueetieUrls.Instance.MyAccountInfo().Url; } UserLink.Text = string.Format(SueetieLocalizer.GetString("link_greetings_member"), _displayName); } } }
public static string FreeIt(decimal price) { if (price == 0M) { return(SueetieLocalizer.GetMarketplaceString("list_free")); } return(price.ToString("C")); }
protected void btnUpdateProfile_Click(object sender, EventArgs e) { if (IsValid) { SaveProfile(); lblProfileMessage.Text = SueetieLocalizer.GetString("accountinfo_profile_updated"); lblProfileMessage.Visible = true; Response.Redirect("myaccountinfo.aspx?pr=1"); } }
private MailMessage AddHeaders(MailMessage _msg, MembershipUser _user) { _msg.From = new MailAddress(SiteSettings.Instance.ContactEmail, SiteSettings.Instance.FromName); _msg.Subject = SueetieLocalizer.GetString("approval_email_subject"); MailAddress userAddress = new MailAddress(_user.Email, SueetieUsers.GetUserDisplayName(_user.UserName)); _msg.To.Add(userAddress); return(_msg); }
protected override void OnLoad(EventArgs e) { HyperLink _dashboardLink = new HyperLink(); _dashboardLink.NavigateUrl = string.Format("http://{0}/forum/default.aspx?g=cp_profile&u={1}", string.Format("{0}{1}", System.Web.HttpContext.Current.Request.Url.Host, System.Web.HttpContext.Current.Request.Url.Port == 80 ? "" : ":" + System.Web.HttpContext.Current.Request.Url.Port.ToString()), CurrentSueetieUser.ForumUserID); _dashboardLink.Text = SueetieLocalizer.GetString("menu_dashboard"); Controls.Add(_dashboardLink); }
private MailMessage AddFromAndSubject(MailMessage _msg, SueetieUser _user) { _msg.From = new MailAddress(SiteSettings.Instance.ContactEmail, string.Format(SueetieLocalizer.GetString("forgot_username_user_services"), SiteSettings.Instance.SiteName)); _msg.Subject = string.Format(SueetieLocalizer.GetString("forgot_username_your_accountinfo"), SiteSettings.Instance.SiteName); MailAddress userAddress = new MailAddress(_user.Email, _user.DisplayName); _msg.To.Add(userAddress); return(_msg); }
private void Refresh() { this.Controls.Clear(); Predicate <ProductCategory> match = null; var categoryId = -1; if (base.Request.QueryString["c"] != null) { categoryId = int.Parse(base.Request.QueryString["c"].ToString()); } else if (this.CurrentCategoryID != -1) { categoryId = this.CurrentCategoryID; } var productCategoryList = ProductCategories.GetProductCategoryList(); if (productCategoryList.Count != 0 && categoryId > 0) { if (match == null) { match = u => u.CategoryID == categoryId; } var categories = productCategoryList.Find(match).Path.Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries); Predicate <ProductCategory> predicate = null; var first = true; foreach (string id in categories) { if (!string.IsNullOrEmpty(id)) { if (!first || this.Prefix) { var child = new Literal { Text = SueetieLocalizer.GetString("breadcrumb_separator", "marketplace.xml") }; this.Controls.Add(child); } predicate = l => l.CategoryID == Convert.ToInt32(id); var link = new HyperLink(); link.Text = productCategoryList.Find(predicate).CategoryName.Trim(); link.NavigateUrl = SueetieUrls.Instance.MarketplaceCategory(Convert.ToInt32(id)).Url; this.Controls.Add(link); first = false; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { PasswordRecovery1.MailDefinition.Subject = SueetieLocalizer.GetString("forgot_password_emailsubject"); PasswordRecovery1.UserNameFailureText = SueetieLocalizer.GetString("forgot_username_couldnotfind"); PasswordRecovery1.SuccessText = SueetieLocalizer.GetString("forgot_username_success"); if (Request.IsAuthenticated) { Response.Redirect("/default.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { this.returnUrl = Request.QueryString["ReturnUrl"]; string wikiReturnUrl = Request.QueryString["Redirect"]; if (wikiReturnUrl != null) { this.returnUrl = wikiReturnUrl; } if (this.returnUrl != null) { this.returnUrl = this.returnUrl.Replace("/members", string.Empty); if (!this.returnUrl.StartsWith("/")) { this.returnUrl = "/" + returnUrl; } } this.createUserUrl = "/members/register.aspx"; if (this.returnUrl != null) { this.createUserUrl += "?ReturnUrl=" + this.returnUrl; } Button LoginButton = Login1.FindControl("LoginButton") as Button; Login1.FailureText = SueetieLocalizer.GetString("login_failed_msg", new string[] { this.createUserUrl }); SetActiveButtonAttributes(LoginButton); if (Page.User.Identity.IsAuthenticated) { if (returnUrl != null) { Response.Redirect(returnUrl); } else { Response.Redirect("/default.aspx", true); } } else { Login1.LoggedIn += new EventHandler(Login1_LoggedIn); Login1.LoginError += Login1_LoginError; Login1.FindControl("username").Focus(); InititializeCaptcha(); } }
public void Page_Load() { Predicate <CartLink> match = null; Literal child = new Literal(); StringBuilder builder = new StringBuilder(); string str = string.Empty; string title = string.Empty; PaymentService primaryPaymentService = CommerceContext.Current.PrimaryPaymentService; if (base.CurrentSueetieProduct.ProductTypeID == 5) { foreach (CartLink link in (from p in CommerceCommon.GetCartLinkList(base.CurrentSueetieProduct.ProductID) where p.LicenseTypeID > 11 select p).ToList <CartLink>()) { title = link.PackageTypeDescription + " " + link.LicenseTypeDescription + " Product Key"; str = string.Format(primaryPaymentService.PurchaseUrl, new object[] { primaryPaymentService.AccountName, link.CartLinkID, title, link.Price.ToString("##0.00"), primaryPaymentService.ReturnUrl, primaryPaymentService.ShoppingUrl }); if (this.IsSideBarLink) { builder.Append("<li><a href=\"" + str + "\">" + link.LicenseTypeDescription + " Product Key</a></li>"); } else { builder.Append("<li><a href=\"" + str + "\">Add " + link.LicenseTypeDescription + " Product Key To Your Shopping Cart</a></li>"); } } } else if (base.CurrentSueetieProduct.PurchaseTypeID == 1) { if (match == null) { match = p => p.ProductID == base.CurrentSueetieProduct.ProductID; } CartLink link2 = CommerceCommon.GetCartLinkList(base.CurrentSueetieProduct.ProductID).Find(match); title = base.CurrentSueetieProduct.Title; str = string.Format(primaryPaymentService.PurchaseUrl, new object[] { primaryPaymentService.AccountName, link2.CartLinkID, title, link2.Price.ToString("##0.00"), primaryPaymentService.ReturnUrl, primaryPaymentService.ShoppingUrl }); if (this.IsSideBarLink) { builder.Append("<li><a href=\"" + str + "\">" + SueetieLocalizer.GetMarketplaceString("cartlink_commercial_sidebar") + "</a></li>"); } else { builder.Append("<li><a href=\"" + str + "\">" + string.Format(SueetieLocalizer.GetMarketplaceString("cartlink_commercial_bottom"), base.CurrentSueetieProduct.Title) + "</a></li>"); } } child.Text = builder.ToString(); if (child.Text.Trim().Length > 0) { this.Controls.Add(child); } }
protected override void Render(HtmlTextWriter writer) { bool wrapText = this.Anchor != AnchorHtml.unknown; string anchor = this.Anchor.ToString(); writer.BeginRender(); if (wrapText) { writer.Write("<{0}", anchor); if (!string.IsNullOrEmpty(this.LocalCssID)) { writer.Write(" id=\"{0}\"", this.LocalCssID); } if (!string.IsNullOrEmpty(this.CssClass)) { writer.Write(" class=\"{0}\"", this.CssClass); } if (this.Attributes != null && this.Attributes.Count > 0) { foreach (string key in this.Attributes.Keys) { writer.Write(" {0}=\"{1}\"", key, this.Attributes[key]); } } writer.Write(">"); } string _resource = SueetieLocalizer.GetString(this.Key, this.LanguageFile); if (this.UseCurrentApplicationFile) { _resource = SueetieLocalizer.GetString(this.Key, true); } if (!string.IsNullOrEmpty(this.Parameter1)) { string[] _params = new string[] { this.Parameter1, this.Parameter2, this.Parameter3 }; _resource = string.Format(_resource, _params); } writer.Write(_resource); if (wrapText) { writer.Write("</{0}>", anchor); } writer.EndRender(); }
protected override void OnLoad(EventArgs e) { int unreadCount = SueetieDataProvider.Provider.GetUnreadPMs(SueetieContext.Current.User.UserName).Count(); HyperLink _inboxLink = new HyperLink(); _inboxLink.NavigateUrl = "/forum/default.aspx?g=cp_pm"; _inboxLink.Text = SueetieLocalizer.GetString("link_conversations"); if (unreadCount > 0) { _inboxLink.Text = SueetieLocalizer.GetString("link_conversations") + string.Format(" ({0})", unreadCount); } Controls.Add(_inboxLink); }
private void ConfigureControls() { this.TaskHeaderText = Resources.GalleryServerPro.Task_Edit_Captions_Header_Text; this.TaskBodyText = Resources.GalleryServerPro.Task_Edit_Captions_Body_Text; this.OkButtonText = SueetieLocalizer.GetString("process_updates", "MediaGallery.xml"); this.OkButtonToolTip = Resources.GalleryServerPro.Task_Edit_Captions_Ok_Button_Tooltip; this.PageTitle = Resources.GalleryServerPro.Task_Edit_Captions_Page_Title; // Sueetie Modified - Converting GSP galleryObjects into SueetieGalleryObjects SueetieConfiguration config = SueetieConfiguration.Get(); List <SueetieMediaObject> sueetieMediaObjects = new List <SueetieMediaObject>(); IGalleryObjectCollection albumChildren = this.GetAlbum().GetChildGalleryObjects(GalleryObjectType.Album, true); foreach (IGalleryObject _galleryObject in albumChildren) { SueetieMediaAlbum _album = SueetieMedia.GetSueetieMediaAlbum(CurrentSueetieGalleryID, _galleryObject.Id); sueetieMediaObjects.Insert(0, new SueetieMediaObject { MediaObjectID = _galleryObject.Id, MediaObjectTitle = _galleryObject.Title, AlbumID = _galleryObject.Id, IsAlbum = true, MediaObjectUrl = String.Concat(Util.GetUrl(PageId.album, "aid={0}", _galleryObject.Id)), MediaObjectDescription = _album.AlbumDescription, DisplayName = _album.DisplayName, ThumbnailHeight = config.Media.ThumbnailHeight, ThumbnailWidth = config.Media.ThumbnailWidth }); } if (albumChildren.Count > 0) { const int textareaWidthBuffer = 30; // Extra width padding to allow room for the caption. const int textareaHeightBuffer = 72; // Extra height padding to allow room for the caption. SetThumbnailCssStyle(albumChildren, textareaWidthBuffer, textareaHeightBuffer); rptr.DataSource = sueetieMediaObjects; rptr.DataBind(); } else { this.RedirectToAlbumViewPage("msg={0}", ((int)Message.CannotEditCaptionsNoEditableObjectsExistInAlbum).ToString(CultureInfo.InvariantCulture)); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SetActiveButtonAttributes(CreateUserButton); if (Request.IsAuthenticated) { Response.Redirect("/default.aspx"); } else if (SueetieContext.Current.SiteSettings.RegistrationType == (int)SueetieRegistrationType.Closed) { // temporary redirect to enable during site updates or when you do not want new users to register Response.Redirect("/members/message.aspx?msgid=4"); } SueetieUIHelper.PopulateTimeZoneList(ddTimeZones); registrationType = (SueetieRegistrationType)SueetieContext.Current.SiteSettings.RegistrationType; InitializeCaptcha(); CreateUserButton.Text = SueetieLocalizer.GetString("register_createuserbutton_text"); RegularExpressionDisplayNameValidator.Text = SueetieLocalizer.GetString("register_validator_displayname"); if (string.IsNullOrWhiteSpace(RegularExpressionDisplayNameValidator.Text)) { RegularExpressionDisplayNameValidator.Text = "Erreur"; } RegularExpressionUsernameValidator.Text = SueetieLocalizer.GetString("register_validator_username"); if (string.IsNullOrWhiteSpace(RegularExpressionUsernameValidator.Text)) { RegularExpressionUsernameValidator.Text = "Erreur"; } RegularExpressionEmailValidator.Text = SueetieLocalizer.GetString("register_validator_email"); if (string.IsNullOrWhiteSpace(RegularExpressionEmailValidator.Text)) { RegularExpressionEmailValidator.Text = "Erreur"; } RegularExpressionPasswordValidator.Text = SueetieLocalizer.GetString("register_validator_password"); if (string.IsNullOrWhiteSpace(RegularExpressionPasswordValidator.Text)) { RegularExpressionPasswordValidator.Text = "Erreur"; } } }
protected override void Render(HtmlTextWriter writer) { SueetieContentPage _sueetieContentPage = SueetieContext.Current.ContentPage; if (_sueetieContentPage != null) { bool wrapText = this.Anchor != AnchorHtml.unknown; string anchor = this.Anchor.ToString(); writer.BeginRender(); if (wrapText) { writer.Write("<{0}", anchor); if (this.DisplayCssID) { writer.Write(" id=\"{0}\"", "cms_" + _sueetieContentPage.PageKey.ToLower() + "_title"); } if (!string.IsNullOrEmpty(this.CssClass)) { writer.Write(" class=\"{0}\"", this.CssClass); } if (this.Attributes != null && this.Attributes.Count > 0) { foreach (string key in this.Attributes.Keys) { writer.Write(" {0}=\"{1}\"", key, this.Attributes[key]); } } writer.Write(">"); } string _key = "cms_" + _sueetieContentPage.PageKey.ToLower() + "_title"; string _resource = SueetieLocalizer.GetString(_key, this.LanguageFile); writer.Write(_resource); if (wrapText) { writer.Write("</{0}>", anchor); } writer.EndRender(); } }
void Login1_LoginError(object sender, EventArgs e) { // Default message Login1.FailureText = SueetieLocalizer.GetString("login_failed_msg", new string[] { this.createUserUrl }); try { // We try to retrieve the user var userInfo = Membership.GetUser(Login1.UserName); if (userInfo.IsLockedOut) { Login1.FailureText = SueetieLocalizer.GetString("login_failed_locked_msg", new string[0]); } else if (!userInfo.IsApproved) { Login1.FailureText = SueetieLocalizer.GetString("login_failed_notapproved_msg", new string[0]); } } catch { } }
public static string PurchaseTypeToString(PurchaseType productPurchaseType) { switch (productPurchaseType) { case PurchaseType.Commercial: return(SueetieLocalizer.GetMarketplaceString("purchasetype_commercial")); case PurchaseType.FreeRegistered: return(SueetieLocalizer.GetMarketplaceString("purchasetype_freeregistered")); case PurchaseType.FreeSubscribers: return(SueetieLocalizer.GetMarketplaceString("purchasetype_freesubscribers")); case PurchaseType.FreeAll: return(SueetieLocalizer.GetMarketplaceString("purchasetype_freeall")); case PurchaseType.Contribution: return(SueetieLocalizer.GetMarketplaceString("purchasetype_freecontribution")); } return(SueetieLocalizer.GetMarketplaceString("purchasetype_other")); }
public static string ProductStatusToString(ProductStatusType productStatusType) { ProductStatusType type = productStatusType; switch (type) { case ProductStatusType.PendingApproval: return(SueetieLocalizer.GetMarketplaceString("statustype_pending")); case ProductStatusType.Expired: return(SueetieLocalizer.GetMarketplaceString("statustype_expired")); case ProductStatusType.SoldOut: return(SueetieLocalizer.GetMarketplaceString("statustype_soldout")); } if (type != ProductStatusType.Active) { return(SueetieLocalizer.GetMarketplaceString("statustype_other")); } return(SueetieLocalizer.GetMarketplaceString("statustype_active")); }
public string ProcessTags(int _itemID, int _contentID, int _contentTypeID, string _tags) { if (string.IsNullOrEmpty(_tags)) { return(SueetieLocalizer.GetString("no_tags_entered")); } string pipedTags = SueetieTags.PipedTags(_tags); SueetieTagEntry sueetieTagEntry = new SueetieTagEntry { ItemID = _itemID, ContentID = _contentID, ContentTypeID = _contentTypeID, UserID = SueetieContext.Current.User.UserID, Tags = pipedTags }; if (_contentTypeID == (int)SueetieContentType.CMSPage) { SueetieContentParts.EnterContentPageTags(sueetieTagEntry); } else if (SueetieCommon.IsMediaObject(_contentTypeID)) { SueetieMedia.EnterMediaObjectTags(sueetieTagEntry); } else if (SueetieCommon.IsMediaAlbum(_contentTypeID)) { SueetieMedia.EnterMediaAlbumTags(sueetieTagEntry); } else if (_contentTypeID == (int)SueetieContentType.WikiPage) { SueetieWikis.EnterWikiPageTags(sueetieTagEntry); } else if (_contentTypeID == (int)SueetieContentType.ForumTopic) { SueetieForums.EnterForumTopicTags(sueetieTagEntry); } SueetieTags.ClearSueetieTagCache(); return(SueetieTags.TagUrls(pipedTags)); }
private void BindData() { AvatarImg.Visible = true; DeleteAvatarButton.Visible = false; DeleteAvatarButton.Text = SueetieLocalizer.GetString("accountinfo_clear_avatar_button"); if (CurrentSueetieUser.HasAvatarImage) { AvatarImg.ImageUrl = "/images/avatars/" + CurrentUserID.ToString() + ".jpg?n=" + DateTime.Now.ToLongTimeString(); } else { AvatarImg.ImageUrl = "/images/avatars/noavatar.jpg"; } AvatarImg.CssClass = "AvatarBig"; DeleteAvatarButton.Visible = true; if (Request.QueryString["dv"] == "1") { DeleteMessage.Visible = true; } if (Request.QueryString["av"] == "1") { UpdateMessage.Visible = true; } if (Request.QueryString["bio"] == "1") { lblBioUpdateMessage.Visible = true; } if (Request.QueryString["pr"] == "1") { lblProfileMessage.Visible = true; } if (Request.QueryString["pw"] == "1") { lblPasswordMessage.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["u"] == null) { Response.Redirect("Message.aspx"); } else { int userID = DataHelper.GetIntFromQueryString("u", -1); if (userID > 0) { if (SueetieConfiguration.Get().Core.UseForumProfile) { int forumUserID = SueetieUsers.GetThinSueetieUser(userID).ForumUserID; string profileUrl = SueetieUrls.Instance.MasterProfile(forumUserID).Url; Response.Redirect(profileUrl); } UserProfiled = SueetieUsers.GetUser(int.Parse(Request.QueryString["u"].ToString())); if (UserProfiled.IsAnonymous) { Response.Redirect("Message.aspx?msg=1"); } else { if (UserProfiled.HasAvatarImage) { AvatarImg.ImageUrl = "/images/avatars/" + UserProfiled.AvatarFilename; } else { AvatarImg.ImageUrl = "/images/avatars/noavatar.jpg"; } lblMemberSince.Text = UserProfiled.DisplayName + " has been a member of the Sueetie Community since " + UserProfiled.DateJoined.ToString("y"); lblBio.Text = DataHelper.DefaultTextIt(UserProfiled.Bio, UserProfiled.DisplayName + " has not yet created a bio."); Page.Title = SueetieLocalizer.GetString("memberprofile_title") + UserProfiled.DisplayName; } } } }
protected void SendEmail_Click(object sender, EventArgs e) { if (txtEmail.Text.Length == 0) { ResultsText.Text = SueetieLocalizer.GetString("forgot_username_empty_email"); return; } SueetieUser sueetieUser = SueetieUsers.GetSueetieUserByEmail(txtEmail.Text); if (String.IsNullOrEmpty(sueetieUser.UserName)) { ResultsText.Text = SueetieLocalizer.GetString("forgot_username_notindatabase"); return; } MailMessage msg = new MailMessage(); AddFromAndSubject(msg, sueetieUser); AddBody(msg, sueetieUser); SendIt(msg); ResultsText.Text = SueetieLocalizer.GetString("forgot_username_sent_msg", new string[] { txtEmail.Text }); }