protected void Page_Load(object sender, EventArgs e) { if (!AppSettings.SplashPage.SplashPageEnabled) { Response.Redirect("~/default.aspx"); } if (Request.QueryString["id"] == null) { Response.Redirect("~/default.aspx"); } int pageId = Convert.ToInt32(Request.QueryString["id"]); try { CustomSplashPage page = new CustomSplashPage(pageId); PageLiteral.Text = Server.HtmlDecode(page.Text); if (ReferrerUtils.GetReferrerName() == null) { ReferrerUtils.SetReferrer(page.UserId); } } catch (Exception ex) { } }
protected void Page_Load(object sender, EventArgs e) { //TITAN News has its own homepage if (AppSettings.TitanFeatures.NewsHomepageEnabled) { Response.Redirect("~/sites/defaultnews.aspx"); } //Theme redirection for demo if (AppSettings.IsDemo && AppSettings.Site.Theme != "titan" && !Request.CurrentExecutionFilePath.StartsWith("/Themes")) { Server.Transfer(String.Format("~/Themes/{0}/default.aspx", AppSettings.Site.Theme)); } GlobalMasterHelper.PageLoad(); AdBlockManager.CheckDenyForAll(); if (Request.QueryString["u"] != null) { //Save the referer in the cookies ReferrerUtils.SetReferrer(Request.QueryString["u"]); if (!Page.IsPostBack) { PoolRotatorManager.TryAddLinkView(ReferrerUtils.GetReferrerName()); } } else if (Request.QueryString["ref"] != null) { //Save the referer in the session Session["PaidToPromoteReferer"] = Request.QueryString["ref"]; } TestimonialsLiteral.Text = Testimonial.GetTestimonials(); if (AppSettings.Site.IsEUCookiePolicyEnabled) { ScriptLiteral.Text += "<script src=\"Scripts/EU.js\" type=\"text/javascript\"></script>"; } if (AppSettings.Communication.TawkLiveChatEnabled) { TawkChatPlaceHolder.Visible = true; TawkSourceID = AppSettings.Communication.TawkLiveChatKey; } PaymentProofsLink.Visible = AppSettings.TitanFeatures.PaymentProofsEnabled; FooterNewsLink.Visible = AppSettings.Site.LatestNewsEnabled; var cache = new PayoutsScrollingBarCashe().Get(); LatestPayoutsLiteral.Text = cache.ToString(); }
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"; }