//This page has 2 versions: for logged and not-logged member protected void Page_Load(object sender, EventArgs e) { AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertisersRoleEnabled && AppSettings.TitanFeatures.AdvertTrafficGridEnabled && (!Member.IsLogged || Member.CurrentInCache.IsAdvertiser)); RegularExpressionValidator2.ValidationExpression = RegexExpressions.AdWebsiteUrl; if (Member.IsLogged) { UserName.Text = Member.CurrentName; SubLiteral.Text = L1.TRAFFICGRIDADINFO1; LangAdder.Add(CreateAdButton, L1.SEND); } else { UserName.Text = "somerandomstring123456"; //Disable menu & proper page TitanViewPagePanel.Visible = false; MenuMultiView.ActiveViewIndex = 1; //Fix CSS ClientScript.RegisterStartupScript(this.GetType(), "key1", "<script>fixCSS();</script>"); SubLiteral.Text = L1.TRAFFICGRIDADINFO1 + "<br/><br/>" + L1.OUTADSINFO; LangAdder.Add(CreateAdButton, U3000.PAY); //Email field OutEmailPlaceHolder.Visible = true; LangAdder.Add(OutEmailRegularExpressionValidator, L1.ER_BADEMAILFORMAT, true); LangAdder.Add(OutEmailRequiredFieldValidator, L1.REG_REQ_EMAIL, true); HintAdder.Add(OutEmail, L1.OUTEMAILINFO); Master.HideSidebars(); } //Lang & Hint LangAdder.Add(Button1, L1.MANAGE); LangAdder.Add(Button2, L1.NEWCAMPAIGN); LangAdder.Add(RegularExpressionValidator1, L1.ER_INVALIDTITLE, true); LangAdder.Add(UserNameRequired, L1.REQ_TITLE, true); HintAdder.Add(Title, L1.H_TITLE); LangAdder.Add(PasswordRequired, L1.REQ_URL, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); HintAdder.Add(URL, L1.H_URL); //JS changes URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); Title.Attributes.Add("onchange", "$('#Abox1 .ABtitle').html($(this).val());"); ddlOptions.Attributes.Add("onchange", "updatePrice();"); //Get Packs if (!Page.IsPostBack) { availableOptions = TableHelper.SelectRows <TrafficGridAdvertPack>(TableHelper.MakeDictionary("IsVisibleByMembers", true)); BindDataToDDL(); } }
protected void Page_Load(object sender, EventArgs e) { AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertPaidToPromoteEnabled); //Get Packs if (!Page.IsPostBack) { BindDataToDDL(); BindDataCountriesToDDL(); } LangAdder.Add(CreateAdButton, L1.BUY); LangAdder.Add(Button1, L1.MANAGE); LangAdder.Add(Button2, L1.NEWCAMPAIGN); LangAdder.Add(PasswordRequired, L1.REQ_URL, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); HintAdder.Add(URL, L1.H_URL); HintAdder.Add(lblGeolocation, L1.GEOHINT); PriceGeo.Text = AppSettings.PaidToPromote.GeolocationPrice.ToString(); TitleLiteral.Text = U6009.PAIDTOPROMOTE; SubLiteral.Text = L1.ADVADSINFO; //TO CHANGE UserName.Text = Member.CurrentId.ToString(); URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); chbGeolocation.Attributes.Add("onclick", "ManageGeoEvent();"); RegularExpressionValidator2.ValidationExpression = RegexExpressions.AdWebsiteUrl; }
private void AddLang() { MenuButtonMyWebsites.Text = U6000.MYWEBSITES; MenuButtonAddWebsite.Text = L1.ADDNEW; LangAdder.Add(UrlRequiredFieldValidator, L1.REQ_URL, true); LangAdder.Add(UrlRegularExpressionValidator, L1.ER_BADURL, true); HintAdder.Add(WebsiteUrlTextBox, L1.H_URL); AddWebsiteButton.Text = L1.ADDNEW; }
private void AddLang() { MenuButtonAddUrls.Text = L1.ADDNEW; MenuButtonMyUrls.Text = L1.MANAGE; LangAdder.Add(UrlRequiredFieldValidator, L1.REQ_URL, true); LangAdder.Add(UrlRegularExpressionValidator, L1.ER_BADURL, true); HintAdder.Add(UrlTextBox, L1.H_URL); AddUrlButton.Text = L1.ADDNEW; }
private void AddLang() { MenuButtonBuyBanner.Text = L1.ADDNEW; MenuButtonMyBanners.Text = L1.MANAGE; LangAdder.Add(UrlRequiredFieldValidator, L1.REQ_URL, true); LangAdder.Add(UrlRegularExpressionValidator, L1.ER_BADURL, true); HintAdder.Add(BannerUrlTextBox, L1.H_URL); LangAdder.Add(ImageUploadedValidator, U6000.PLEASEUPLOADIMAGE, true); LangAdder.Add(ImageSubmitValidator, U6000.CHOOSEFILE, true); BuyBannerButton.Text = L1.BUY; }
protected void Page_Load(object sender, EventArgs e) { User = Member.Current; AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertisersRoleEnabled && AppSettings.TitanFeatures.AdvertLoginAdsEnabled && User.IsAdvertiser); RegularExpressionValidator2.ValidationExpression = RegexExpressions.AdWebsiteUrl; SubLiteral.Text = L1.ADVADSINFO; LangAdder.Add(CreateAdButton, L1.SEND); //Lang & Hint LangAdder.Add(Button1, L1.MANAGE); LangAdder.Add(Button2, L1.NEWCAMPAIGN); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); LangAdder.Add(UrlRequired, L1.ER_BADURL, true); HintAdder.Add(URL, L1.H_URL); HintAdder.Add(lblGeolocation, L1.GEOHINT); //JS changes URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); chbGeolocation.Attributes.Add("onclick", "ManageGeoEvent();"); if (!Page.IsPostBack) { BindDataCountriesToDDL(); if (AppSettings.LoginAds.IsGeolocationEnabled) { GeolocationPlaceholder.Visible = true; } var loginAdsCreditsEnabled = AppSettings.LoginAds.LoginAdsCreditsEnabled; LoginAdsCreditsPlaceHolder.Visible = loginAdsCreditsEnabled; string extraViews = string.Format(@"({0} {1})", User.LoginAdsCredits, U4200.AVAILABLE); AvailableLoginAdsCreditsLiteral.Text = extraViews; if (loginAdsCreditsEnabled) { PriceLiteral.Text = string.Format("{0} / {1} {2}", AppSettings.LoginAds.Price.ToString(), LoginAdCreditsPrice, U5008.LOGINADSCREDITS); } else { PriceLiteral.Text = AppSettings.LoginAds.Price.ToString(); } } LoginAdsCreditsCheckBox_CheckedChanged(null, null); }
protected void Page_Load(object sender, EventArgs e) { AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertisersRoleEnabled && AppSettings.TitanFeatures.AdvertTrafficExchangeEnabled && Member.CurrentInCache.IsAdvertiser); RegularExpressionValidator2.ValidationExpression = RegexExpressions.AdWebsiteUrl; if (Member.IsLogged) { UserName.Text = Member.CurrentName; SubLiteral.Text = L1.ADVADSINFO; LangAdder.Add(CreateAdButton, L1.SEND); TrafficSourceList.Items[0].Text = " " + U4000.THISWEBSITE + ": " + AppSettings.Site.Url.Replace("http://", "").Replace("/", ""); TrafficSourceList.Items[1].Text = " " + U4000.ANONDIRECT; //Lang & Hint LangAdder.Add(Button1, L1.MANAGE); LangAdder.Add(Button2, L1.NEWCAMPAIGN); LangAdder.Add(RegularExpressionValidator1, L1.ER_INVALIDTITLE, true); LangAdder.Add(UserNameRequired, L1.REQ_TITLE, true); HintAdder.Add(Title, L1.H_TITLE); LangAdder.Add(PasswordRequired, L1.REQ_URL, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); HintAdder.Add(URL, L1.H_URL); HintAdder.Add(lblGeolocation, L1.GEOHINT); //JS changes URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); Title.Attributes.Add("onchange", "$('#Abox1 .ABtitle').html($(this).val());"); chbGeolocation.Attributes.Add("onclick", "updatePrice(); ManageGeoEvent();"); ddlOptions.Attributes.Add("onchange", "updatePrice();"); //Read prices PriceGeo.Text = AppSettings.PtcAdverts.GeolocationCost.ToString(); UsersTrafficBalanceLabel.Text = string.Format(U6008.YOURTRAFFICBALANCE, Member.CurrentInCache.TrafficBalance); //Get Packs if (!Page.IsPostBack) { availableOptions = TableHelper.SelectRows <TrafficExchangeAdvertPack>(TableHelper.MakeDictionary("IsVisibleByMembers", true)); BindDataToDDL(); BindDataCountriesToDDL(); } } }
private void AddLang() { NewPostbackMenuButton.Text = U6000.CONFIGURE; DocumentationMenuButton.Text = U6000.DOCUMENTATION; TestPostbackMenuButton.Text = U6000.TESTPOSTBACK; LangAdder.Add(ChosenWebsiteCustomValidator, U6000.WEBSITEMUSTBEACCEPTED, true); LangAdder.Add(UrlRequiredFieldValidator, L1.REQ_URL, true); LangAdder.Add(UrlRegularExpressionValidator, L1.ER_BADURL, true); HintAdder.Add(PostbackUrlTextBox, L1.H_URL); AddPostbackUrlButton.Text = L1.SAVE; LangAdder.Add(TestPostback_Payout_RequiredFieldValidator, U6000.REQUIRED, true); LangAdder.Add(TestPostback_SubId_RequiredFieldValidator, U6000.REQUIRED, true); TestPostbackButton.Text = L1.SEND; }
protected void Page_Load(object sender, EventArgs e) { AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertisersRoleEnabled && AppSettings.TitanFeatures.AdvertBannersEnabled && Member.CurrentInCache.IsAdvertiser); if (AppSettings.BannerAdverts.AdvertisingPolicy == BannerPolicy.SellingPackages) { Response.Redirect("~/user/advert/banners.aspx"); } UserName.Text = Member.CurrentName; SubLiteral.Text = L1.ADVADSINFO; //Lang & Hint DirectRefsGridView.EmptyDataText = L1.NOBANNERCAMPS; LangAdder.Add(Button2, L1.ADDNEW); LangAdder.Add(Button1, U4000.ADDEDCAMPAIGNS); LangAdder.Add(Button3, U4000.AUCTIONS); LangAdder.Add(CreateAdButton, L1.SEND); LangAdder.Add(CustomValidator1, L1.ER_BADCAPTCHA, true); LangAdder.Add(PasswordRequired, L1.REQ_URL, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); HintAdder.Add(URL, L1.H_URL); BannerImageLabel.Text = L1.BURL; HintAdder.Add(BannerImageLabel, L1.H_BANNERURL); LangAdder.Add(createBannerAdvertisement_BannerUploadSelectedCustomValidator, L1.ER_BANNERNOTSELECTED, true); LangAdder.Add(createBannerAdvertisement_BannerUploadValidCustomValidator, U6000.CHOOSEFILE, true); AuctionsUnavailable.Visible = false; try { if (!Page.IsPostBack) { CurrentSelectedDimemsions = new BannerAdvertDimensions(BannerAdvertDimensions.GetActive()[0].Id); } } catch { AuctionsUnavailable.Visible = true; AuctionsUnavailable.HeaderText = U6000.NEWBANNERSUNAVAILABLEHEADER; AuctionsUnavailable.Reason = U6000.NEWBANNERSUNAVAILABLEREASON; AuctionsPanel.Visible = false; MenuButtonPlaceHolder.Visible = false; return; } if (MenuMultiView.ActiveViewIndex == 0) { CreateDimensionsButtons(); } if (!Page.IsPostBack) { BannerTypeRadioButtonList.Items.Clear(); BannerTypeRadioButtonList.Items.AddRange(BannerAdvertDimensions.GetActiveItems()); if (Request.QueryString["red"] != null && Request.QueryString["red"] == "new") { DimensionsPlaceHolder.Controls.Clear(); MenuMultiView.ActiveViewIndex = 2; Button3.CssClass = string.Empty; Button2.CssClass = "ViewSelected"; Session["YourCampaigns_NewBannerAdvert"] = null; createBannerAdvertisement_BannerImage.ImageUrl = ""; URL.Text = "http://"; OptionRadioButtonDiv.Visible = false; if (Request.QueryString["view"] != null) { var index = Request.QueryString["view"]; OptionBanerAddNewLiteral.Text = BannerTypeRadioButtonList.Items.FindByValue(index).Text; OptionBanerAddNewLiteral.Visible = true; BannerTypeRadioButtonList.Items.FindByValue(index).Selected = true; } } else if (Request.QueryString["red"] != null && Request.QueryString["red"] == "camp") { DimensionsPlaceHolder.Controls.Clear(); MenuMultiView.ActiveViewIndex = 1; Button3.CssClass = string.Empty; Button1.CssClass = "ViewSelected"; Session["YourCampaigns_NewBannerAdvert"] = null; createBannerAdvertisement_BannerImage.ImageUrl = ""; URL.Text = "http://"; } //JS changes URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); BannerUploadByUrlButton.Visible = AppSettings.Site.BannersAddByUrlEnabled; } ErrorMessagePanel.Visible = false; }
protected void Page_Load(object sender, EventArgs e) { AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertisersRoleEnabled && AppSettings.TitanFeatures.AdvertFacebookEnabled && (!Member.IsLogged || Member.CurrentInCache.IsAdvertiser)); if (Member.IsLogged) { UserName.Text = Member.CurrentName; SubLiteral.Text = L1.ADVADSINFO; LangAdder.Add(CreateAdButton, L1.SEND); } else { UserName.Text = "somerandomstring123456"; //Disable menu & proper page TitanViewPagePanel.Visible = false; MenuMultiView.ActiveViewIndex = 1; SubLiteral.Text = L1.OUTADSINFO; LangAdder.Add(CreateAdButton, U3000.PAY); //Email field OutEmailPlaceHolder.Visible = true; LangAdder.Add(OutEmailRegularExpressionValidator, L1.ER_BADEMAILFORMAT, true); LangAdder.Add(OutEmailRequiredFieldValidator, L1.REG_REQ_EMAIL, true); HintAdder.Add(OutEmail, L1.OUTEMAILINFO); Master.HideSidebars(); } //Lang & Hint LangAdder.Add(Button1, L1.MANAGE); LangAdder.Add(Button2, L1.NEWCAMPAIGN); LangAdder.Add(PasswordRequired, L1.REQ_URL, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); //JS changes chbProfilePicture.Attributes.Add("onclick", "updatePrice();"); chbFriends.Attributes.Add("onclick", "updatePrice(); if ($(this).is(':checked')){$('#" + ddlFriends.ClientID + "').css('background-color','#fff').attr('disabled', false);} " + "else {$('#" + ddlFriends.ClientID + "').css('background-color','#f0f0ef').attr('disabled', true);}"); ddlOptions.Attributes.Add("onchange", "updatePrice();"); if (!Page.IsPostBack) { BindDataToDDL(); BindDataToDDL2(); } if (!FacebookManager.IsIntegratedCorretly()) { FacebookPlaceHolder.Visible = false; FacebookUnavailable.Visible = true; FacebookUnavailable.HeaderText = U6002.NEWFACEBOOKUNAVAILABLEHEADER; FacebookUnavailable.Reason = U6002.NEWFACEBOOKUNAVAILABLEREASON; } else { FacebookPlaceHolder.Visible = true; FacebookUnavailable.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { if (Member.IsLogged) { Response.Redirect("~/user/default.aspx"); } //Set proper language to page controls HintAdder.Add(PIN, L1.ENTERPIN); LangAdder.Add(UserNameRequired, L1.REG_REQ_USERNAME); LangAdder.Add(EmailRequired, L1.REG_REQ_EMAIL); LangAdder.Add(RegularExpressionValidator1, L1.ER_INVALIDUSERNAME); LangAdder.Add(CorrectEmailRequired, L1.ER_BADEMAILFORMAT); LangAdder.Add(CustomValidator1, L1.ER_BADCAPTCHA); LangAdder.Add(ResetButton, L1.SEND); LangAdder.Add(Button1, L1.SEND); LangAdder.Add(RegularExpressionValidator3, L1.ER_BADPIN); LangAdder.Add(RequiredFieldValidator2, L1.REG_REQ_PIN); //Set placeholders Username.Attributes.Add("placeholder", L1.USERNAME); Email.Attributes.Add("placeholder", "Email"); PIN.Attributes.Add("placeholder", L1.CURRENTPIN); Password.Attributes.Add("placeholder", L1.PASSWORD); ConfirmPassword.Attributes.Add("placeholder", L1.CONFIRMPASSWORD); PINTextBox.Attributes.Add("placeholder", "PIN"); ConfirmPINTextBox.Attributes.Add("placeholder", L1.CONFIRM + " PIN"); //Add translations LangAdder.Add(RegularExpressionValidator1, L1.ER_INVALIDUSERNAME, true); LangAdder.Add(UserNameRequired, L1.REG_REQ_USERNAME, true); LangAdder.Add(EmailRequired, L1.REG_REQ_EMAIL, true); LangAdder.Add(CorrectEmailRequired, L1.ER_BADEMAILFORMAT, true); LangAdder.Add(RegularExpressionValidator3, L1.ER_BADPIN, true); LangAdder.Add(RequiredFieldValidator2, L1.REG_REQ_PIN, true); LangAdder.Add(CustomValidator1, L1.ER_BADCAPTCHA, true); pinTr.Visible = AppSettings.Registration.IsPINEnabled; if (AppSettings.Authentication.ResetPasswordIndirectLinkEnabled) { pinTr.Visible = false; RegularExpressionValidator3.Visible = false; RegularExpressionValidator3.Enabled = false; RequiredFieldValidator2.Visible = false; RequiredFieldValidator2.Enabled = false; usernameTr.Visible = false; RegularExpressionValidator1.Visible = false; RegularExpressionValidator1.Enabled = false; UserNameRequired.Visible = false; UserNameRequired.Enabled = false; } if (AppSettings.Authentication.ResetPasswordAndPinTogether && AppSettings.Registration.IsPINEnabled) { HeaderLabel1.Text = L1.RESETPWD + " " + L1.AND + " " + "PIN"; HeaderLabel2.Text = L1.RESETPWD + " " + L1.AND + " " + "PIN"; ResetPINPlaceHolder.Visible = true; } else { HeaderLabel1.Text = L1.RESETPWD; HeaderLabel2.Text = L1.RESETPWD; ResetPINPlaceHolder.Visible = false; } if (Request.QueryString["from"] != null && Request.QueryString["s"] != null) { ResetPanel1.Visible = false; ResetPanel2.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { if (AppSettings.Authentication.LoginUsingEmail) { Username.Attributes.Add("PlaceHolder", "Email"); } else { Username.Attributes.Add("PlaceHolder", L1.USERNAME); } if (AppSettings.Authentication.ResetPasswordAndPinTogether) { ForgotMyPasswordHyperLink.Text = L1.IFORGOTPWD + "/PIN"; } else { ForgotMyPasswordHyperLink.Text = L1.IFORGOTPWD; } //Facebook OAuth if (Request.QueryString["fb"] != null && Request["accessToken"] != null) { var accessToken = Request["accessToken"]; Session["AccessToken"] = accessToken; try { FacebookMember User = new FacebookMember(accessToken); TitanAuthService.LoginOrRegister(User); } catch (MsgException ex) { FailureP.Visible = true; FailureText.Text = ex.Message; FormsAuthentication.SignOut(); } catch (Exception ex) { ErrorLogger.Log(ex); throw ex; } } //Demo autofill if (AppSettings.IsDemo) { Username.Text = "demo"; Password.Text = "demopassword"; System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "document.getElementById('" + Password.ClientID + "').value = 'demopassword';", true); } //General autofill if (Request.QueryString["username"] != null && Request.QueryString["password"] != null) { string username = HttpUtility.UrlDecode(Request.QueryString["username"]); string password = HttpUtility.UrlDecode(Request.QueryString["password"]); Username.Text = username; Password.Text = password; System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "document.getElementById('" + Password.ClientID + "').value = '" + password + "';", true); } //Add label & hint translations HintAdder.Add(Password2, L1.LEAVEBLANKIFNOTPWD2); LangAdder.Add(LoginButton, U4000.LOGINTEXT); LangAdder.Add(CustomValidator1, L1.ER_BADCAPTCHA); LoginUserValidationSummary.HeaderText = L1.ER_ALLFIELDSREQUIRED; //Check wheather we should request Captcha (two bad logins trials) if (MemberAuthenticationService.GetBadLoginTrials(Context) > 1) { CaptchaPanel1.Visible = true; LoginUserValidationSummary.HeaderText = L1.ER_ALLFIELDSREQUIRED2; } if (Request.QueryString["afterregister"] != null && Convert.ToInt32(Request.QueryString["afterregister"]) == 1) { ShowResendActivationControls(true); ResendEmailButton.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { //Add translations & hints LangAdder.Add(ChangeSettingsButton, L1.SAVE); LangAdder.Add(ChangeSettingsButton2, L1.SAVE); LangAdder.Add(SecuritySettingsSaveButton, L1.SAVE); LangAdder.Add(PreferencesSettingsSaveButton, L1.SAVE); LangAdder.Add(ChangeSettingsButton3, U4000.ENTERVAC); LangAdder.Add(EmailRequired, L1.REG_REQ_EMAIL, true); LangAdder.Add(CorrectEmailRequired, L1.ER_BADEMAILFORMAT, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_INVALIDPASS, true); LangAdder.Add(CustomValidator2, U6000.PINCANTSTARTWITHZERO, true); LangAdder.Add(PasswordCompare, L1.ER_PASSDIFFER, true); LangAdder.Add(RegularExpressionValidator6, L1.ER_INVALIDPASS, true); LangAdder.Add(CompareValidator1, L1.ER_PASSDIFFER, true); LangAdder.Add(RegularExpressionValidator3, L1.ER_BADPIN, true); LangAdder.Add(RegularExpressionValidator4, L1.ER_BADPIN, true); LangAdder.Add(RegularExpressionValidator5, L1.ER_BADPIN, true); LangAdder.Add(RequiredFieldValidator4, L1.REG_REQ_PIN, true); LangAdder.Add(RequiredFieldValidator3, L1.REG_REQ_PIN, true); LangAdder.Add(RegularExpressionValidator1, L1.ER_BADPIN, true); LangAdder.Add(RequiredFieldValidator2, L1.REG_REQ_PIN, true); LangAdder.Add(RegularExpressionValidator7, L1.ER_BADPIN, true); LangAdder.Add(RequiredFieldValidator5, L1.REG_REQ_PIN, true); LangAdder.Add(RequiredFieldValidator1, L1.REG_REQ_PIN, true); LangAdder.Add(RegularExpressionValidator8, L1.ER_BADPIN, true); HintAdder.Add(Password, L1.REG_PASSWORD); HintAdder.Add(ConfirmPassword, L1.H_LEAVEBLANK); HintAdder.Add(PIN, L1.H_LEAVEBLANK); LangAdder.Add(MenuButtonGeneral, U4000.GENERAL); LangAdder.Add(MenuButtonPayment, U4000.PAYMENT); LangAdder.Add(MenuButtonVacationMode, U4000.VACATIONMODE); LangAdder.Add(AvatarUploadValidCustomValidator, U4200.INVALIDAVATAR + ". " + string.Format(U6012.AVATARVALIDATOR, ImagesHelper.AvatarImage.MaxWidth, ImagesHelper.AvatarImage.MaxWidth), true); LangAdder.Add(AccountTypeValidator, U6000.SELECTACCOUNTTYPE, true); LangAdder.Add(MenuButtonVerification, L1.VERIFICATION); LangAdder.Add(MenuButtonPreferences, U6000.PREFERENCES); LangAdder.Add(MenuButtonSecurity, U6004.AUTHENTICATION); LangAdder.Add(VerificationButton, L1.SEND); LangAdder.Add(Verification_BannerUploadSubmit, L1.SUBMIT); VacationLiteral.Text = U4200.VACATIONINFO2; if (AppSettings.TitanFeatures.AdvertAdPacksEnabled) { VacationLiteral.Text += "<br/>" + U5002.VACATIONINFO3.Replace("%n%", AppSettings.RevShare.AdPack.AdPackName).Replace("%p%", AppSettings.RevShare.AdPack.AdPackNamePlural); } User = Member.Current; BtcCryptocurrency = CryptocurrencyFactory.Get <BitcoinCryptocurrency>(); EthCryptocurrency = CryptocurrencyFactory.Get <EthereumCryptocurrency>(); XrpCryptocurrency = CryptocurrencyFactory.Get <RippleCryptocurrency>(); TokenCryptocurrency = CryptocurrencyFactory.Get <RippleCryptocurrency>(); EarnerCheckBoxPlaceHolder.Visible = AppSettings.TitanFeatures.EarnersRoleEnabled; AdvertiserCheckBoxPlaceHolder.Visible = AppSettings.TitanFeatures.AdvertisersRoleEnabled; PublisherCheckBoxPlaceHolder.Visible = AppSettings.TitanFeatures.PublishersRoleEnabled; PINDiv1.Visible = PINDiv2.Visible = PINDiv3.Visible = PINDiv4.Visible = PINDiv5.Visible = PINDiv6.Visible = AppSettings.Registration.IsPINEnabled; //Vacation mode if (!AppSettings.VacationAndInactivity.IsEnabled) { MenuButtonVacationMode.Visible = false; } if (User.Status == MemberStatus.VacationMode) { YouAreInVacationPanel.Visible = true; VacationPanel.Visible = false; LangAdder.Add(ChangeSettingsButton3, U4000.EXITVAC); ChangeSettingsButton3.OnClientClick = "return confirm('" + U4000.EXITVACSURE + "');"; VacationEndsLiteral.Text = ((DateTime)User.VacationModeEnds).ToShortDateString(); } Password.Attributes["title"] += " " + L1.H_LEAVEBLANK; XrpDestTagTextBox.Attributes["placeholder"] = U6011.DESTINATIONTAG; myonoffswitch.InputAttributes.Add("class", "onoffswitch-checkbox"); myonoffswitch.ClientIDMode = System.Web.UI.ClientIDMode.Static; myonoffswitch2.InputAttributes.Add("class", "onoffswitch2-checkbox"); myonoffswitch2.ClientIDMode = System.Web.UI.ClientIDMode.Static; AvatarImage.ImageUrl = string.Format("{0}?{1}", User.AvatarUrl, AppSettings.ServerTime); ClientScript.RegisterStartupScript(this.GetType(), "onloadscript", "password2change(true);", true); HadSecondaryPassword.Text = User.HasSecondaryPassword() ? "1" : "0"; // Show/hide proper settings cpaNotifications.Visible = AppSettings.TitanFeatures.EarnCPAGPTEnabled; shoutboxPrivacy.Visible = !(AppSettings.Shoutbox.DisplayMode == ShoutboxDisplayMode.Disabled); captchaSettings.Visible = AppSettings.Captcha.AllowMembersToChooseCaptcha; if (!AppSettings.TitanFeatures.EarnCPAGPTEnabled && !AppSettings.Captcha.AllowMembersToChooseCaptcha && AppSettings.Shoutbox.DisplayMode == ShoutboxDisplayMode.Disabled) { MenuButtonPlaceHolder.Controls.Remove(MenuButtonPreferences); } if (!Page.IsPostBack || SuccMessagePanel.Visible) { if (SuccMessagePanel.Visible == false) { Email.Text = User.Email; myonoffswitch.Checked = User.MessageSystemTurnedOn; PIN.Text = ""; myonoffswitch2.Checked = User.HasSecondaryPassword(); } ShoutboxPrivacyList.SelectedValue = ((int)User.ShoutboxPrivacyPermission).ToString(); CPACompletedPermissionsList.SelectedValue = ((int)User.CPAOfferCompletedBehavior).ToString(); CaptchaRB.SelectedValue = ((int)User.SelectedCaptchaType).ToString(); FirstNameTextBox.Text = User.FirstName; SecondNameTextBox.Text = User.SecondName; AddressTextBox.Text = User.Address; CityTextBox.Text = User.City; StateProvinceTextBox.Text = User.StateProvince; ZipCodeTextBox.Text = User.ZipCode; EarnerCheckBox.Checked = User.IsEarner; EarnerCheckBoxImage.Attributes.Add("class", User.IsEarner ? "icon fa fa-money fa-fw fa-2x img-thumbnail img-check text-primary p-10 check" : "icon fa fa-money fa-fw fa-2x img-thumbnail img-check text-primary p-10"); AdvertiserCheckBox.Checked = User.IsAdvertiser; AdvertiserCheckBoxImage.Attributes.Add("class", User.IsAdvertiser ? "icon fa fa-bullhorn fa-fw fa-2x img-thumbnail img-check text-primary p-10 check" : "icon fa fa-bullhorn fa-fw fa-2x img-thumbnail img-check text-primary p-10"); PublisherCheckBox.Checked = User.IsPublisher; PublisherCheckBoxImage.Attributes.Add("class", User.IsPublisher ? "icon fa fa-globe fa-fw fa-2x img-thumbnail img-check text-primary p-10 check" : "icon fa fa-globe fa-fw fa-2x img-thumbnail img-check text-primary p-10"); } //Loading Basic and Custom Processors LoadBasePayoutProcesssorsControls(); LoadCustomProcessorsControls(); btcSettings.Visible = BtcCryptocurrency.WithdrawalEnabled && !TitanFeatures.IsClickmyad; rippleSettings.Visible = XrpCryptocurrency.WithdrawalEnabled; ethereumSettings.Visible = EthCryptocurrency.WithdrawalEnabled; tokenSettings.Visible = TokenCryptocurrency.WithdrawalEnabled; if (!BtcCryptocurrency.WithdrawalEnabled && BasicPayoutProcessorsPlaceHolder.Controls.Count == 0 && CustomPayoutProcessorsPlaceHolder.Controls.Count == 0 && !XrpCryptocurrency.WithdrawalEnabled && !TokenCryptocurrency.WithdrawalEnabled && !EthCryptocurrency.WithdrawalEnabled) { MenuButtonPlaceHolder.Controls.Remove(MenuButtonPayment); } if (btcSettings.Visible && BtcCryptocurrency.WithdrawalApiProcessor == CryptocurrencyAPIProvider.Coinbase && AppSettings.Cryptocurrencies.CoinbaseAddressesPolicy == CoinbaseAddressesPolicy.CoinbaseEmail) { btcSettings.Visible = false; } if (Request.QueryString["ref"] != null) { //We have target reference string TargetReference = Request.QueryString["ref"]; if (TargetReference == "payment") { MenuMultiView.ActiveViewIndex = 1; foreach (Button b in MenuButtonPlaceHolder.Controls) { b.CssClass = ""; } MenuButtonPayment.CssClass = "ViewSelected"; } else if (TargetReference == "vacation") { MenuMultiView.ActiveViewIndex = 2; foreach (Button b in MenuButtonPlaceHolder.Controls) { b.CssClass = ""; } MenuButtonVacationMode.CssClass = "ViewSelected"; } else if (TargetReference == "verification") { MenuMultiView.ActiveViewIndex = 3; foreach (Button b in MenuButtonPlaceHolder.Controls) { b.CssClass = ""; } MenuButtonVacationMode.CssClass = "ViewSelected"; } } //Verification if (!AppSettings.Authentication.IsDocumentVerificationEnabled) { MenuButtonVerification.Visible = false; } if (User.VerificationStatus == VerificationStatus.Pending) { AccountVerificationStatus.Text = L1.PENDING; AccountVerificationStatus.ForeColor = System.Drawing.Color.Blue; documentsUpload.Visible = false; LockVerificationFields(); } if (User.VerificationStatus == VerificationStatus.Verified) { AccountVerificationStatus.ForeColor = System.Drawing.Color.Green; AccountVerificationStatus.Text = U5006.VERIFIED; LockVerificationFields(); } if (User.VerificationStatus == VerificationStatus.NotVerified) { documentsUpload.Visible = true; AccountVerificationStatus.ForeColor = System.Drawing.Color.DarkRed; AccountVerificationStatus.Text = U5006.NOTVERIFIED; } DetailedInfoPlaceHolder.Visible = AppSettings.Authentication.DetailedRegisterFields; ScriptManager.GetCurrent(this).RegisterPostBackControl(Verification_BannerUploadSubmit); ScriptManager.GetCurrent(this).RegisterPostBackControl(VerificationButton); EarnerCheckBoxImage.Attributes.Add("class", EarnerCheckBox.Checked ? "icon fa fa-money fa-fw fa-2x img-thumbnail img-check text-primary p-10 check" : "icon fa fa-money fa-fw fa-2x img-thumbnail img-check text-primary p-10"); AdvertiserCheckBoxImage.Attributes.Add("class", AdvertiserCheckBox.Checked ? "icon fa fa-bullhorn fa-fw fa-2x img-thumbnail img-check text-primary p-10 check" : "icon fa fa-bullhorn fa-fw fa-2x img-thumbnail img-check text-primary p-10"); PublisherCheckBoxImage.Attributes.Add("class", PublisherCheckBox.Checked ? "icon fa fa-globe fa-fw fa-2x img-thumbnail img-check text-primary p-10 check" : "icon fa fa-globe fa-fw fa-2x img-thumbnail img-check text-primary p-10"); if (TitanFeatures.IsRofriqueWorkMines) { ButtonsPlaceHolder.Visible = false; } if (AppSettings.Registration.IsDefaultRegistrationStatusEnabled) { EarnerCheckBoxPlaceHolder.Visible = AdvertiserCheckBoxPlaceHolder.Visible = PublisherCheckBoxPlaceHolder.Visible = false; } }
//This page has 2 versions: for logged and not-logged member protected void Page_Load(object sender, EventArgs e) { AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertisersRoleEnabled && AppSettings.TitanFeatures.AdvertBannersEnabled && (!Member.IsLogged || Member.CurrentInCache.IsAdvertiser)); RegularExpressionValidator2.ValidationExpression = RegexExpressions.AdWebsiteUrl; if (Member.IsLogged) { if (AppSettings.BannerAdverts.AdvertisingPolicy == BannerPolicy.BannerBidding) { Response.Redirect("~/user/advert/bannersb.aspx"); } UserName.Text = Member.CurrentName; SubLiteral.Text = L1.ADVADSINFO; LangAdder.Add(CreateAdButton, L1.SEND); } else { UserName.Text = "somerandomstring123456"; //Disable menu & proper page TitanViewPagePanel.Visible = false; MenuMultiView.ActiveViewIndex = 1; //Fix CSS ClientScript.RegisterStartupScript(this.GetType(), "key1", "<script>fixCSS();</script>"); SubLiteral.Text = L1.OUTADSINFO; LangAdder.Add(CreateAdButton, U3000.PAY); //Email field OutEmailPlaceHolder.Visible = true; LangAdder.Add(OutEmailRegularExpressionValidator, L1.ER_BADEMAILFORMAT, true); LangAdder.Add(OutEmailRequiredFieldValidator, L1.REG_REQ_EMAIL, true); HintAdder.Add(OutEmail, L1.OUTEMAILINFO); Master.HideSidebars(); } //Lang & Hint LangAdder.Add(Button1, L1.MANAGE); LangAdder.Add(Button2, L1.NEWCAMPAIGN); LangAdder.Add(PasswordRequired, L1.REQ_URL, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); HintAdder.Add(URL, L1.H_URL); BannerImageLabel.Text = L1.BURL; HintAdder.Add(lblGeolocation, L1.GEOHINT); LangAdder.Add(createBannerAdvertisement_BannerUploadValidCustomValidator, U6000.CHOOSEFILE, true); LangAdder.Add(createBannerAdvertisement_BannerUploadSelectedCustomValidator, L1.ER_BANNERNOTSELECTED, true); GeolocationPlaceHolder.Visible = AppSettings.BannerAdverts.GeoloactionEnabled; PriceGeo.Text = AppSettings.BannerAdverts.GeolocationCost.ToString(); chbGeolocation.Attributes.Add("onclick", "updatePrice(); ManageGeoEvent();"); ddlOptions.Attributes.Add("onchange", "updatePrice();"); //JS changes URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); //Get data if (!Page.IsPostBack) { BannerTypeRadioButtonList.Items.Clear(); BannerTypeRadioButtonList.Items.AddRange(BannerAdvertDimensions.GetActiveItems()); if (BannerAdvertDimensions.GetActive().Count > 0) { BindDataToDDL(BannerAdvertDimensions.GetActive()[0]); } BindDataCountriesToDDL(); BannerUploadByUrlButton.Visible = AppSettings.Site.BannersAddByUrlEnabled; } ErrorMessagePanel.Visible = false; }
protected void Page_Load(object sender, EventArgs e) { if (AppSettings.PtcAdverts.AdvertPTCPackCashbackEnabled) { CashbackInfoPlaceHolder.Visible = true; } if (ViewState["editid"] == null) { ViewState["editid"] = Request.QueryString["editid"]; } if (ViewState["editid"] != null) { PageRequest = RequestType.Edit; } else { PageRequest = RequestType.Create; } //Get Packs if (!Page.IsPostBack) { BindDataToDDL(); BindDataCountriesToDDL(); } AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertisersRoleEnabled && AppSettings.TitanFeatures.AdvertAdsEnabled && (!Member.IsLogged || Member.CurrentInCache.IsAdvertiser)); TitleLiteral.Text = U6003.PTC; if (!IsPostBack) { BindDataCategoriesToDDL(); if (Member.IsLogged) { BuyWithPTCCreditsPlaceHolder.Visible = AppSettings.PtcAdverts.PTCCreditsEnabled; } CaptchaQuestionTexbox.Text = AppSettings.PtcAdverts.PTCDefaultCaptchaQuestion; BackgroundColorPlaceHolder.Visible = true; if (AppSettings.PtcAdverts.FeedbackCaptchaEnabled) { CustomCaptchaPlaceHolder.Visible = true; CaptchaQuestionTexbox.Visible = CaptchaQuestionCheckBox.Checked; } StarredAdPlaceHolder.Visible = AppSettings.PtcAdverts.StarredAdsEnabled; CategoriesDropDownPlaceHolder.Visible = AppSettings.PtcAdverts.PTCCategoryPolicy == AppSettings.PTCCategoryPolicy.Custom; BoxSizePlaceHolder.Visible = true; if (PageRequest == RequestType.Edit) { BindEditWindow(); } } RegularExpressionValidator2.ValidationExpression = RegexExpressions.AdWebsiteUrl; if (Member.IsLogged) { UserName.Text = Member.CurrentName; SubLiteral.Text = L1.ADVADSINFO; LangAdder.Add(CreateAdButton, L1.SEND); } else { UserName.Text = "somerandomstring123456"; //Disable menu & proper page TitanViewPagePanel.Visible = false; MenuMultiView.ActiveViewIndex = 1; //Fix CSS ClientScript.RegisterStartupScript(this.GetType(), "key1", "<script>fixCSS();</script>"); SubLiteral.Text = L1.OUTADSINFO; LangAdder.Add(CreateAdButton, U3000.PAY); //Email field OutEmailPlaceHolder.Visible = true; LangAdder.Add(OutEmailRegularExpressionValidator, L1.ER_BADEMAILFORMAT, true); LangAdder.Add(OutEmailRequiredFieldValidator, L1.REG_REQ_EMAIL, true); HintAdder.Add(OutEmail, L1.OUTEMAILINFO); Master.HideSidebars(); } //Lang & Hint LangAdder.Add(Button1, L1.MANAGE); LangAdder.Add(Button2, L1.NEWCAMPAIGN); LangAdder.Add(RegularExpressionValidator1, L1.ER_INVALIDTITLE, true); LangAdder.Add(UserNameRequired, L1.REQ_TITLE, true); HintAdder.Add(Title, L1.H_TITLE); HintAdder.Add(Description, L1.H_DESCRIPTION); LangAdder.Add(PasswordRequired, L1.REQ_URL, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); HintAdder.Add(URL, L1.H_URL); HintAdder.Add(lblGeolocation, L1.GEOHINT); LangAdder.Add(lblStarredAd, U5006.STARREDAD); HintAdder.Add(lblStarredAd, U5006.STARREDADINFO); HintAdder.Add(GeoAgeMax, U3900.LEAVEZERO); HintAdder.Add(GeoAgeMin, U3900.LEAVEZERO); LangAdder.Add(PTCImageSubmitValidator, U6000.CHOOSEFILE, true); LangAdder.Add(PTCImageValidator, U5006.MUSTUPLOADIMAGE, true); URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); chbGeolocation.Attributes.Add("onclick", "ManageGeoEvent();"); //Read prices PriceGeo.Text = AppSettings.PtcAdverts.GeolocationCost.ToString(); PriceBold.Text = AppSettings.PtcAdverts.FontBoldCost.ToString(); PriceDesc.Text = AppSettings.PtcAdverts.DescriptionCost.ToString(); var where = TableHelper.MakeDictionary("IsVisibleByMembers", true); var listPacks = TableHelper.SelectRows <PtcAdvertPack>(where); if (listPacks.Count != 0) { RefreshAdvertAndPrice(this, null); } if (AppSettings.PtcAdverts.PTCImagesEnabled) { PTCImagePlaceHolder.Visible = true; } GeolocationPlaceHolder.Visible = AppSettings.PtcAdverts.GeolocationStatus; }
protected void Page_Load(object sender, EventArgs e) { AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertisersRoleEnabled && AppSettings.TitanFeatures.AdvertCPAGPTEnabled && Member.CurrentInCache.IsAdvertiser); RegularExpressionValidator2.ValidationExpression = RegexExpressions.AdWebsiteUrl; UserName.Text = Member.CurrentName; SubLiteral.Text = L1.ADVADSINFO; LangAdder.Add(CreateAdButton, L1.SEND); //Lang & Hint GridView1.EmptyDataText = L1.NODATA; LangAdder.Add(Button1, L1.MANAGE); LangAdder.Add(Button2, L1.NEWCAMPAIGN); LangAdder.Add(PasswordRequired, L1.REQ_URL, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL, true); HintAdder.Add(URL, L1.H_URL); HintAdder.Add(GeoAgeMax, U3900.LEAVEZERO); HintAdder.Add(GeoAgeMin, U3900.LEAVEZERO); HintAdder.Add(GeoCities, U3900.CITIESHINT); BannerImageLabel.Text = L1.BURL; HintAdder.Add(BannerImageLabel, L1.H_BANNERURL); HintAdder.Add(lblGeolocation, L1.GEOHINT); LangAdder.Add(RequiredFieldValidator1, L1.REQ_TITLE, true); LangAdder.Add(RegularExpressionValidator1, L1.ER_INVALIDTITLE, true); LangAdder.Add(RequiredFieldValidator2, L1.REQ_DESC, true); HintAdder.Add(Title, U5006.CPAGPT1); HintAdder.Add(Description, U5006.CPAGPT2); LangAdder.Add(RequiredFieldValidator3, L1.DETAILEDALLREQ, true); LangAdder.Add(RequiredFieldValidator4, L1.DETAILEDALLREQ, true); LangAdder.Add(ExternalSubmissionsMenuButton, U6000.EXTERNALSUBMISSIONS); LangAdder.Add(RequiredFieldValidator4, L1.DETAILEDALLREQ, true); LangAdder.Add(ImageUploadedValidator, U6000.CHOOSEFILE, true); HintAdder.Add(Amount, U5006.CPAGPT4); chbGeolocation.Attributes.Add("onclick", "ManageGeoEvent();"); //JS changes URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); //Get data if (!Page.IsPostBack) { AppSettings.Misc.Reload(); ExternalSubmissionsMenuButton.Visible = AppSettings.AffiliateNetwork.AffiliateNetworkEnabled; BindDataCountriesToDDL(); MakeCategoriesList(); int submissions = 0; var adlist = TableHelper.SelectRows <CPAOffer>(TableHelper.MakeDictionary("AdvertiserUsername", Member.CurrentName)); foreach (var ad in adlist) { //Just numbers foreach (var ent in ad.Entries) { if (ent.Status == OfferStatus.Pending || ent.Status == OfferStatus.UnderReview) { submissions++; } } } LangAdder.Add(Button3, U6000.SUBMISSIONS + " (" + submissions + ")"); if (Request.QueryString["go"] != null && MenuMultiView.ActiveViewIndex == 0) { MenuMultiView.ActiveViewIndex = 2; //Change button style foreach (Button b in MenuButtonPlaceHolder.Controls) { b.CssClass = ""; } Button3.CssClass = "ViewSelected"; MenuTitleLabel.Text = Button3.Text; } BannerUploadByUrlButton.Visible = AppSettings.Site.BannersAddByUrlEnabled; } ErrorMessagePanel.Visible = false; }
protected void Page_Load(object sender, EventArgs e) { User = Member.CurrentInCache; AccessManager.RedirectIfDisabled(AppSettings.TitanFeatures.AdvertSurfAdsEnabled && User.IsAdvertiser); RegularExpressionValidator2.ValidationExpression = RegexExpressions.AdWebsiteUrl; Form.Action = Request.RawUrl; if (!Page.IsPostBack) { BindDataToCampaignsDDL(); BindDataToPacksDDL(); Button1.Text = L1.BUY + " " + U5004.SURFADS; Button2.Text = U4200.ADVERTISEMENTS; Button3.Text = L1.MANAGE; NewAdPackAdvert = null; StartPageDescriptionLiteral.Visible = StartPagePlaceHolder.Visible = AppSettings.RevShare.AdPack.IsStartPageEnabled; if (User.Name == AppSettings.RevShare.AdminUsername) { AdminLiteral.Visible = true; AdminLiteral.Text = @"<br/><br/><b>Administrator's advertisements are automatically approved and will appear in the surf queue if there are not enough ads created by users (no need to buy Surf Ads).</b>"; StartPageDescriptionLiteral.Text = "<br/>Administrator's Start Pages will not be considered."; } else { AdminLiteral.Visible = false; StartPageDescriptionLiteral.Text = "<br/>" + U5001.STARTPAGEDESCRIPTION; } PurchaseStartPageCheckBox.Text = " " + L1.BUY + " " + U5001.STARTPAGE + "<span style='font-size:smaller'> (" + U5003.STARTPAGEINFO + ")</span>"; surfAdsPack = new SurfAdsPack(Convert.ToInt32(PacksDropDown.SelectedValue)); PackPriceLabel.Text = surfAdsPack.Price.ToClearString(); } ScriptManager.RegisterStartupScript(MultiViewUpdatePanel, GetType(), "TBChanged", "TBChanged();", true); LangAdder.Add(RegularExpressionValidator1, L1.ER_INVALIDTITLE); LangAdder.Add(UserNameRequired, L1.REQ_TITLE); HintAdder.Add(Title, L1.H_TITLE); LangAdder.Add(CorrectEmailRequired, L1.ER_BADDESC); HintAdder.Add(Description, L1.H_DESCRIPTION); LangAdder.Add(PasswordRequired, L1.REQ_URL); LangAdder.Add(RegularExpressionValidator2, L1.ER_BADURL); HintAdder.Add(URL, L1.H_URL); ChangeAdvertInfoPlaceholder.Visible = AppSettings.RevShare.AdPack.EnableAdvertChange; //JS changes URL.Attributes.Add("onfocus", "if (getElementById('" + URL.ClientID + "').value == 'http://') getElementById('" + URL.ClientID + "').value = ''"); bool hasAvailableAdverts = AdPackManager.HasAvailableAdverts(User.Id); DropDownAdsPlaceHolder.Visible = PurchaseButton.Visible = DropDownAdsPlaceHolder2.Visible = ChangeCampaignButton.Visible = hasAvailableAdverts; RedirectToNewAdsButton2.Visible = !hasAvailableAdverts; PurchaseButton.Text = L1.BUY; CreateAdButton.Text = U4200.CREATE; AdPacksAdGridView.EmptyDataText = U4200.NOADS; AdPacksAdGridView.Columns[2].HeaderText = L1.TITLE; AdPacksAdGridView.Columns[3].HeaderText = L1.DESCRIPTION; AdPacksAdGridView.Columns[4].HeaderText = U6008.ADDEDAS; AdPacksAdGridView.Columns[5].HeaderText = L1.STATUS; AdPacksAdGridView.Columns[6].HeaderText = U6008.TARGETURL; StartPageCalendarPanel.Visible = PurchaseStartPageCheckBox.Checked; }
protected void Page_Load(object sender, EventArgs e) { GlobalMasterHelper.PageLoad(); AdBlockManager.CheckDenyForAll(); RegistrationCaptchaPlaceHolder.Visible = AppSettings.Registration.IsRegistrationCaptchaEnabled; PINSectionPlaceHolder.Visible = AppSettings.Registration.IsPINEnabled; if (!Page.IsPostBack) { AppSettings.Authentication.Reload(); if (Request.QueryString["e"] != null) { Email.Text = Request.QueryString["e"]; } if (TitanFeatures.IsRetireYoung) { ReferrerUtils.SetReferrer("RetireYoung"); } if (Request.QueryString["u"] != null || ReferrerUtils.GetReferrerName() != null) { string refUsername; if (Request.QueryString["u"] != null) { ReferrerUtils.SetReferrer(Request.QueryString["u"]); } refUsername = ReferrerUtils.GetReferrerName(); if (!Page.IsPostBack) { PoolRotatorManager.TryAddLinkView(refUsername); } // With referral link for Pool Rotator refUsername = PoolRotatorManager.TryGetUserNameFromPool(refUsername); Referer.Text = refUsername; } else if (Session["PaidToPromoteReferer"] != null) { var refId = Convert.ToInt32(Session["PaidToPromoteReferer"].ToString()); var refUsername = new Member(refId).Name; Referer.Text = refUsername; } } FeatureManager Manager = null; //Facebook OAuth if (IsFromFacebookOAuth) { //Check if country is eligible for Facebook Register Manager = new FeatureManager(GeolocatedFeatureType.FacebookRegistration); //Hide unnecessary fields FacebookMember fbMember = new FacebookMember(Session["accessToken"].ToString()); Email.Text = fbMember.Email; //Passwords validators RegularExpressionValidator2.Enabled = false; PasswordRequired.Enabled = false; ConfirmPasswordRequired.Enabled = false; PasswordCompare.Enabled = false; CustomValidator1.Enabled = false; TitanCaptcha.Visible = false; FirstName.Text = fbMember.FirstName; SecondName.Text = fbMember.LastName; } else { //Check if country is eligible for Standard Register Manager = new FeatureManager(GeolocatedFeatureType.Registration); } if (!Manager.IsAllowed) { RegistrationPanel.Visible = false; CreateUserButton.Visible = false; ErrorMessagePanel.Visible = true; ErrorMessage.Text = U4000.SORRYCOUNTRY; } //Set up textbox hints HintAdder.Add(Username, L1.REG_USERNAME); HintAdder.Add(Password, U3501.REG_PASSWORD); HintAdder.Add(Email, L1.REG_EMAIL); HintAdder.Add(PIN, L1.REG_PIN); HintAdder.Add(Referer, L1.REG_REFERER); Username.Attributes.Add("placeholder", L1.USERNAME); Email.Attributes.Add("placeholder", "Email"); Password.Attributes.Add("placeholder", L1.PASSWORD); ConfirmPassword.Attributes.Add("placeholder", L1.CONFIRMPASSWORD); PIN.Attributes.Add("placeholder", L1.DESIREDPIN); BirthYear.Attributes.Add("placeholder", L1.BIRTHYEAR); FirstName.Attributes.Add("placeholder", L1.FIRSTNAME); SecondName.Attributes.Add("placeholder", L1.SECONDNAME); City.Attributes.Add("placeholder", L1.CITY); StateProvince.Attributes.Add("placeholder", L1.STATEPROVINCE); ZipCode.Attributes.Add("placeholder", L1.ZIPCODE); Address.Attributes.Add("placeholder", L1.ADDRESS); //Add translations LangAdder.Add(CreateUserButton, L1.REGISTER); LangAdder.Add(RegularExpressionValidator1, L1.ER_INVALIDUSERNAME, true); LangAdder.Add(UserNameRequired, L1.REG_REQ_USERNAME, true); LangAdder.Add(EmailRequired, L1.REG_REQ_EMAIL, true); LangAdder.Add(CorrectEmailRequired, L1.ER_BADEMAILFORMAT, true); LangAdder.Add(PasswordRequired, L1.REG_REQ_PASS, true); LangAdder.Add(RegularExpressionValidator2, L1.ER_INVALIDPASS, true); LangAdder.Add(PasswordCompare, L1.ER_PASSDIFFER, true); LangAdder.Add(ConfirmPasswordRequired, L1.REG_REQ_CONFIRM, true); LangAdder.Add(RegularExpressionValidator3, L1.ER_BADPIN, true); LangAdder.Add(RequiredFieldValidator2, L1.REG_REQ_PIN, true); LangAdder.Add(RegularExpressionValidator4, L1.ER_BADYEAR, true); LangAdder.Add(RequiredFieldValidator1, L1.REG_REQ_YEAR, true); LangAdder.Add(RefererValidator, L1.ER_BADREF, true); LangAdder.Add(CustomValidator1, L1.ER_BADCAPTCHA, true); LangAdder.Add(CustomValidator4, L1.REG_REQ_TOS, true); EarnerCheckBox.Text = U6000.EARNER; AdvertiserCheckBox.Text = L1.ADVERTISER; PublisherCheckBox.Text = U6000.PUBLISHER; //Detailed info LangAdder.Add(RE_1, L1.DETAILEDNOSPECIAL + " " + L1.FIRSTNAME, true); LangAdder.Add(RF_1, L1.FIRSTNAME + " " + U3900.FIELDISREQUIRED, true); LangAdder.Add(RE_2, L1.DETAILEDNOSPECIAL + " " + L1.SECONDNAME, true); LangAdder.Add(RF_2, L1.SECONDNAME + " " + U3900.FIELDISREQUIRED, true); LangAdder.Add(RE_3, L1.DETAILEDNOSPECIAL + " " + L1.ADDRESS, true); LangAdder.Add(RF_3, L1.ADDRESS + " " + U3900.FIELDISREQUIRED, true); LangAdder.Add(RE_4, L1.DETAILEDNOSPECIAL + " " + L1.CITY, true); LangAdder.Add(RF_4, L1.CITY + " " + U3900.FIELDISREQUIRED, true); LangAdder.Add(RE_5, L1.DETAILEDNOSPECIAL + " " + L1.STATEPROVINCE, true); LangAdder.Add(RF_5, L1.STATEPROVINCE + " " + U3900.FIELDISREQUIRED, true); LangAdder.Add(RE_6, L1.DETAILEDNOSPECIAL + " " + L1.ZIPCODE, true); LangAdder.Add(RF_6, L1.ZIPCODE + " " + U3900.FIELDISREQUIRED, true); LangAdder.Add(AccountTypeValidator, U6000.SELECTACCOUNTTYPE, true); //Check detailed info if (AppSettings.Authentication.DetailedRegisterFields) { DetailedPanel.Visible = true; } AvailableRolesPlaceHolder.Visible = !AppSettings.Registration.IsDefaultRegistrationStatusEnabled; EarnerCheckBoxPlaceHolder.Visible = AppSettings.TitanFeatures.EarnersRoleEnabled; AdvertiserCheckBoxPlaceHolder.Visible = AppSettings.TitanFeatures.AdvertisersRoleEnabled; PublisherCheckBoxPlaceHolder.Visible = AppSettings.TitanFeatures.PublishersRoleEnabled; if (AppSettings.Registration.IsDefaultRegistrationStatusEnabled) { EarnerCheckBox.Checked = AppSettings.Registration.IsDefaultEarnerStatus; AdvertiserCheckBox.Checked = AppSettings.Registration.IsDefaultAdvertiserStatus; PublisherCheckBox.Checked = AppSettings.Registration.IsDefaultPublisherStatus; } //Custom field CustomFields.Controls.Add(RegistrationFieldCreator.Generate()); CountryInformation CIService = new CountryInformation(IP.Current); CountryName.Text = CIService.CountryName; Flag.ImageUrl = "~/Images/Flags/" + CIService.CountryCode.ToLower() + ".png"; }