protected void Page_Load(object sender, EventArgs e) { String siteName = CMSContext.CurrentSiteName; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } int nodeID = QueryHelper.GetInteger("nodeID", 0); int testID = QueryHelper.GetInteger("abTestId", 0); listElem.TestID = testID; // Prepare the actions string[,] actions = new string[1, 6]; actions[0, 0] = HeaderActions.TYPE_HYPERLINK; actions[0, 1] = ResHelper.GetString("abtesting.variant.new"); actions[0, 3] = ResolveUrl("Edit.aspx?abtestID=" + testID + "&nodeid=" + nodeID); actions[0, 5] = GetImageUrl("Objects/CMS_Variant/add.png"); // Set the actions ICMSMasterPage master = this.CurrentMaster; master.HeaderActions.Actions = actions; }
protected void Page_Load(object sender, EventArgs e) { String siteName = CMSContext.CurrentSiteName; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } // Prepare the breadcrumbs string[,] breadcrumbs = new string[2, 3]; breadcrumbs[0, 0] = GetString("abtesting.abtest.list"); breadcrumbs[0, 1] = "~/CMSModules/OnlineMarketing/Pages/Content/ABTesting/ABTest/List.aspx?nodeid=" + NodeID; breadcrumbs[1, 0] = GetString("abtesting.abtest.new"); // Set the title PageTitle title = this.CurrentMaster.Title; title.Breadcrumbs = breadcrumbs; title.HelpTopicName = "abtest_general"; editElem.AliasPath = QueryHelper.GetString("AliasPath", String.Empty); this.editElem.OnSaved += new EventHandler(editElem_OnSaved); }
protected void Page_Load(object sender, EventArgs e) { CheckWebAnalyticsUI("ABTest.ConversionsValue"); CurrentMaster.PanelContent.CssClass = ""; UIHelper.AllowUpdateProgress = false; String siteName = CMSContext.CurrentSiteName; // Text for menu mSave = GetString("general.save"); mPrint = GetString("Analytics_Report.Print"); mDeleteData = GetString("Analytics_Report.ManageData"); // Images for menu buttons imgSave.ImageUrl = GetImageUrl("CMSModules/CMS_Content/EditMenu/save_small.png"); imgPrint.ImageUrl = GetImageUrl("General/printSmall.png"); imgManageData.ImageUrl = GetImageUrl("CMSModules/CMS_Reporting/managedataSmall.png"); // Check 'ManageData' permission if (CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.WebAnalytics", "ManageData")) { this.lnkDeleteData.OnClientClick = "modalDialog('" + ResolveUrl("~/CMSModules/Reporting/WebAnalytics/Analytics_ManageData.aspx") + "?statcodename=abtest', 'AnalyticsManageData'," + AnalyticsHelper.MANAGE_WINDOW_WIDTH + ", " + AnalyticsHelper.MANAGE_WINDOW_HEIGHT + "); return false; "; this.lnkDeleteData.Visible = true; } ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "myModalDialog", ScriptHelper.GetScript("function myModalDialog(url, name, width, height) { " + "win = window; " + "var dHeight = height; var dWidth = width; " + "if (( document.all )&&(navigator.appName != 'Opera')) { " + "try { win = wopener.window; } catch (e) {} " + "if ( parseInt(navigator.appVersion.substr(22, 1)) < 7 ) { dWidth += 4; dHeight += 58; }; " + "dialog = win.showModalDialog(url, this, 'dialogWidth:' + dWidth + 'px;dialogHeight:' + dHeight + 'px;resizable:yes;scroll:yes'); " + "} else { " + "oWindow = win.open(url, name, 'height=' + dHeight + ',width=' + dWidth + ',toolbar=no,directories=no,menubar=no,modal=yes,dependent=yes,resizable=yes,scroll=yes,scrollbars=yes'); oWindow.opener = this; oWindow.focus(); } } ")); // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } ucConversionReportViewer.ReportsName = "abtestconversionvalue.yearreport;abtestconversionvalue.monthreport;abtestconversionvalue.weekreport;abtestconversionvalue.dayreport;abtestconversionvalue.hourreport"; ucConversionReportViewer.ShowAllConversions = true; }
protected void Page_Load(object sender, EventArgs e) { String siteName = CMSContext.CurrentSiteName; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } if (!AnalyticsHelper.TrackConversionsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblTrackConversionsDisabled.Text = GetString("webanalytics.tackconversionsdisabled"); } listElem.ShowFilter = false; UIContext.AnalyticsTab = AnalyticsTabEnum.ABTests; listElem.NodeID = NodeID; // Get the alias path of the current node string aliasPath = String.Empty; if (this.Node != null) { aliasPath = Node.NodeAliasPath; listElem.AliasPath = aliasPath; } else { listElem.StopProcessing = true; } // Prepare the actions string[,] actions = new string[1, 6]; actions[0, 0] = HeaderActions.TYPE_HYPERLINK; actions[0, 1] = ResHelper.GetString("abtesting.abtest.new"); actions[0, 3] = ResolveUrl("new.aspx?nodeID=" + NodeID + "&AliasPath=" + aliasPath); actions[0, 5] = GetImageUrl("Objects/OM_AbTest/add.png"); // Set the actions ICMSMasterPage master = this.CurrentMaster; master.HeaderActions.Actions = actions; }
protected void Page_Load(object sender, EventArgs e) { String siteName = CMSContext.CurrentSiteName; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } PageTitle title = this.CurrentMaster.Title; int testID = QueryHelper.GetInteger("abTestID", 0); editElem.TestID = testID; // Prepare the header string name = ""; title.HelpTopicName = "variant_edit"; if (editElem.VariantObj != null) { name = editElem.VariantObj.ABVariantDisplayName; title.TitleImage = GetImageUrl("Objects/CMS_Variant/object.png"); } else { name = GetString("abtesting.variant.new"); title.TitleImage = GetImageUrl("Objects/CMS_Variant/new.png"); } nodeID = QueryHelper.GetInteger("nodeID", 0); // Prepare the breadcrumbs string[,] breadcrumbs = new string[2, 3]; breadcrumbs[0, 0] = GetString("abtesting.variant.list"); breadcrumbs[0, 1] = "~/CMSModules/OnlineMarketing/Pages/Content/ABTesting/ABVariant/List.aspx?abTestID=" + testID + "&nodeid=" + nodeID; breadcrumbs[1, 0] = name; // Set the title title.Breadcrumbs = breadcrumbs; }
protected void Page_Load(object sender, EventArgs e) { CheckWebAnalyticsUI("ABTest.Overview"); ucDisplayReport = LoadControl("~/CMSModules/Reporting/Controls/DisplayReport.ascx") as IDisplayReport; pnlOverview.Controls.Add((Control)ucDisplayReport); ucConversionRateReport = LoadControl("~/CMSModules/Reporting/Controls/DisplayReport.ascx") as IDisplayReport; pnlConversionRate.Controls.Add((Control)ucConversionRateReport); ucTestValuesReport = LoadControl("~/CMSModules/Reporting/Controls/DisplayReport.ascx") as IDisplayReport; pnlConversionValue.Controls.Add((Control)ucTestValuesReport); listElem.ShowObjectMenu = false; CurrentMaster.PanelContent.CssClass = ""; String siteName = CMSContext.CurrentSiteName; UIHelper.AllowUpdateProgress = false; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } listElem.ShowFilter = false; listElem.DelayedReload = true; listElem.Grid.GridName = "~/CMSModules/OnlineMarketing/Controls/UI/ABTest/ListWithValues.xml"; lnkTestRate.NavigateUrl = "#"; lnkTestValue.NavigateUrl = "#"; lnkTestValue.Attributes["OnClick"] = "if (parent.parent.selectTreeNode != null) parent.parent.selectTreeNode('ABTest.ConversionsValue');parent.location=\"abtest_frameset.aspx?page=conversionsvalue&displayTab=abtesting.conversionsvalue\""; lnkTestRate.Attributes["OnClick"] = "if (parent.parent.selectTreeNode != null) parent.parent.selectTreeNode('ABTest.ConversionsRate');parent.location=\"abtest_frameset.aspx?page=conversionsrate&displayTab=abtesting.conversionrate\""; ucABTests.AllowAll = true; ucABTests.AllowEmpty = false; ucABTests.IsLiveSite = false; ucABTests.ReturnColumnName = "ABTestName"; ucABTests.PostbackOnChange = true; }
protected override void OnInit(EventArgs e) { String siteName = CMSContext.CurrentSiteName; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } // Get the ID from query string this.editElem.ABTestID = QueryHelper.GetInteger("abTestId", 0); base.OnInit(e); }
/// <summary> /// Handles the Load event of the Page control. /// </summary> protected void Page_Load(object sender, EventArgs e) { String siteName = CMSContext.CurrentSiteName; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } ScriptHelper.RegisterProgress(Page); ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "SaveDocument", ScriptHelper.GetScript("function SaveDocument(nodeId, createAnother) { " + ControlsHelper.GetPostBackEventReference(this, "#", false).Replace("'#'", "createAnother+''") + "}")); }
protected void Page_Load(object sender, EventArgs e) { String siteName = CMSContext.CurrentSiteName; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblDisabled.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblABTestingDisabled.Text = GetString("abtesting.disabled"); } if (!AnalyticsHelper.TrackConversionsEnabled(siteName)) { this.pnlDisabled.Visible = true; this.lblTrackConversionsDisabled.Text = GetString("webanalytics.tackconversionsdisabled"); } // Prepare the actions string[,] actions = new string[1, 6]; actions[0, 0] = HeaderActions.TYPE_HYPERLINK; actions[0, 1] = ResHelper.GetString("abtesting.abtest.new"); actions[0, 3] = ResolveUrl("new.aspx"); actions[0, 5] = GetImageUrl("Objects/OM_AbTest/add.png"); // Set the actions ICMSMasterPage master = this.CurrentMaster; master.HeaderActions.Actions = actions; listElem.ShowFilter = true; }
protected void Page_Load(object sender, EventArgs e) { ucDisplayReport = LoadControl("~/CMSModules/Reporting/Controls/DisplayReport.ascx") as IDisplayReport; pnlContent.Controls.Add((Control)ucDisplayReport); CurrentMaster.PanelContent.CssClass = ""; UIHelper.AllowUpdateProgress = false; // ABTest Info int abTestID = QueryHelper.GetInteger("abtestid", 0); ABTestInfo abInfo = ABTestInfoProvider.GetABTestInfo(abTestID); if (abInfo == null) { return; } String siteName = CMSContext.CurrentSiteName; // Display disabled information if (!AnalyticsHelper.AnalyticsEnabled(siteName)) { this.pnlWarning.Visible = true; this.lblWAWarning.Text = GetString("WebAnalytics.Disabled") + "<br/>"; } if (!ABTestInfoProvider.ABTestingEnabled(siteName)) { this.pnlWarning.Visible = true; this.lblABWarning.Text = GetString("abtesting.disabled"); } testName = abInfo.ABTestName; // Variants condition ucSelectVariation.WhereCondition = "ABVariantTestID IN ( SELECT ABTestID FROM OM_ABTest WHERE ABTestName = N'" + testName + "')"; // Text for menu mSave = GetString("general.save"); mPrint = GetString("Analytics_Report.Print"); mDeleteData = GetString("Analytics_Report.ManageData"); // Images for menu buttons imgSave.ImageUrl = GetImageUrl("CMSModules/CMS_Content/EditMenu/save_small.png"); imgPrint.ImageUrl = GetImageUrl("General/printSmall.png"); imgManageData.ImageUrl = GetImageUrl("CMSModules/CMS_Reporting/managedataSmall.png"); // Check 'ManageData' permission if (CMSContext.CurrentUser.IsAuthorizedPerResource("CMS.WebAnalytics", "ManageData")) { this.lnkDeleteData.OnClientClick = "modalDialog('" + ResolveUrl("~/CMSModules/Reporting/WebAnalytics/Analytics_ManageData.aspx") + "?statcodename=abconversion;" + testName + ";%', 'AnalyticsManageData', " + AnalyticsHelper.MANAGE_WINDOW_WIDTH + ", " + AnalyticsHelper.MANAGE_WINDOW_HEIGHT + "); return false; "; this.lnkDeleteData.Visible = true; } ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "myModalDialog", ScriptHelper.GetScript("function myModalDialog(url, name, width, height) { " + "win = window; " + "var dHeight = height; var dWidth = width; " + "if (( document.all )&&(navigator.appName != 'Opera')) { " + "try { win = wopener.window; } catch (e) {} " + "if ( parseInt(navigator.appVersion.substr(22, 1)) < 7 ) { dWidth += 4; dHeight += 58; }; " + "dialog = win.showModalDialog(url, this, 'dialogWidth:' + dWidth + 'px;dialogHeight:' + dHeight + 'px;resizable:yes;scroll:yes'); " + "} else { " + "oWindow = win.open(url, name, 'height=' + dHeight + ',width=' + dWidth + ',toolbar=no,directories=no,menubar=no,modal=yes,dependent=yes,resizable=yes,scroll=yes,scrollbars=yes'); oWindow.opener = this; oWindow.focus(); } } ")); ucGraphType.ProcessChartSelectors(false); // Enables/disables radio buttons (based on UI elements) CurrentUserInfo ui = CMSContext.CurrentUser; if (!RequestHelper.IsPostBack()) { if (!ui.IsGlobalAdministrator) { rbCount.Enabled = ui.IsAuthorizedPerUIElement("cms.WebAnalytics", "ABTest.ConversionsCount"); rbRate.Enabled = ui.IsAuthorizedPerUIElement("cms.WebAnalytics", "ABTest.ConversionsRate"); rbValue.Enabled = ui.IsAuthorizedPerUIElement("cms.WebAnalytics", "ABTest.ConversionsValue"); rbSourcePages.Enabled = ui.IsAuthorizedPerUIElement("cms.WebAnalytics", "ABTest.ConversionsSourcePages"); rbVariants.Enabled = ui.IsAuthorizedPerUIElement("cms.WebAnalytics", "ABTest.ConversionsByVariations"); bool checkedButton = false; // Check first enabled button foreach (Control ctrl in pnlRadios.Controls) { RadioButton rb = ctrl as RadioButton; if (rb != null) { if (rb.Enabled) { rb.Checked = true; checkedButton = true; break; } } } // No report avaible -> redirect to access denied if (!checkedButton) { RedirectToAccessDenied(GetString("abtest.noreportavaible")); } } else { // Admin check first radio button rbCount.Checked = true; } } }