403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.189.11.42
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/4082427/root/proc/7779/cwd/plugins/popularis-extra/includes/panel/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/4082427/root/proc/7779/cwd/plugins/popularis-extra/includes/panel/assets/js/installer.js
var oe_installer = oe_installer || {};

jQuery( document ).ready( function( $ ) {

	"use strict";

	var is_loading = false;

   /**
	* Install the plugin
	*/
	oe_installer.install_plugin = function( el, plugin ) {

	   	// Confirm activation
	   	var r = confirm( oe_installer_localize.install_now );

	      if ( r ) {

	      	is_loading = true;
	      	el.addClass( 'installing' );

	      	$.ajax( {
		   		type 	: 'POST',
		   		url 	: oe_installer_localize.ajax_url,
		   		data 	: {
		   			action 		: 'oe_plugin_installer',
		   			plugin 		: plugin,
		   			nonce 		: oe_installer_localize.admin_nonce,
		   			dataType 	: 'json'
		   		},

		   		success: function( data ) {
			   		if ( data  ){
				   		if ( data.status === 'success' ) {
				   			el.attr( 'class', 'activate button button-primary' );
					   		el.html( oe_installer_localize.activate_btn );
				   		} else {
				   			el.removeClass( 'installing' );
			   			}
			   		} else {
			   			el.removeClass( 'installing' );
			   		}
			   		is_loading = false;
		   		},

		   		error: function( xhr, status, error ) {
		      		console.log( status );
		      		el.removeClass( 'installing' );
		      		is_loading = false;
		   		}
		   	} );

	   	}
	}

   /**
	* Activate the plugin
	*/
	oe_installer.activate_plugin = function( el, plugin ) {

		$.ajax( {
	   		type 	: 'POST',
	   		url 	: oe_installer_localize.ajax_url,
	   		data 	: {
	   			action 		: 'oe_plugin_activation',
	   			plugin 		: plugin,
	   			nonce 		: oe_installer_localize.admin_nonce,
	   			dataType 	: 'json'
	   		},

	   		success: function( data ) {
		   		if ( data ) {
			   		if ( data.status === 'success' ) {
				   		el.attr( 'class', 'installed button disabled' );
				   		el.html( oe_installer_localize.installed_btn );
			   		}
		   		}
		   		is_loading = false;
	   		},

	   		error: function( xhr, status, error ) {
	      		console.log( status );
	      		is_loading = false;
	   		}
	   	} );

	};

   /**
	* Activate the premium lugin
	*/
	oe_installer.activate_premium_plugin = function( el, plugin ) {

		$.ajax( {
	   		type 	: 'POST',
	   		url 	: oe_installer_localize.ajax_url,
	   		data 	: {
	   			action 		: 'oe_premium_plugin_activation',
	   			plugin 		: plugin,
	   			nonce 		: oe_installer_localize.admin_nonce,
	   			dataType 	: 'json'
	   		},

	   		success: function( data ) {
		   		if ( data ) {
			   		if ( data.status === 'success' ) {
				   		el.attr( 'class', 'installed button disabled' );
				   		el.html( oe_installer_localize.installed_btn );
			   		}
		   		}
		   		is_loading = false;
	   		},

	   		error: function( xhr, status, error ) {
	      		console.log( status );
	      		is_loading = false;
	   		}
	   	} );

	};

	/**
	* Install/Activate Button Click
	*/
	$( document ).on( 'click', '.oe-plugin-installer a.button:not(.premium-link)', function( e ) {
	   	var el 		= $( this ),
	   		plugin 	= el.data( 'slug' );

	   	e.preventDefault();

	   	if ( ! el.hasClass( 'disabled' ) ) {

	      	if ( is_loading ) return false;

		   	// Installation
	      	if ( el.hasClass( 'install' ) ) {
		      	oe_installer.install_plugin( el, plugin );
		   	}

		   	// Activation
		   	if ( el.hasClass( 'activate' ) ) {
			   	oe_installer.activate_plugin( el, plugin );
			}
	   	}
	} );

	/**
	* Activate Premium Extension
	*/
	$( document ).on( 'click', '.oe-plugin-installer a.button.premium-activation', function( e ) {
	   	var el 		= $( this ),
	   		plugin 	= el.data( 'slug' );

	   	e.preventDefault();

	   	if ( ! el.hasClass( 'disabled' ) ) {

	      	if ( is_loading ) return false;

		   	// Activation
		   	if ( el.hasClass( 'activate' ) ) {
			   	oe_installer.activate_premium_plugin( el, plugin );
			}
	   	}
	} );

});

Youez - 2016 - github.com/yon3zu
LinuXploit