PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/live2news.com/wp-content/plugins/w3-total-cache/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/live2news.com/wp-content/plugins/w3-total-cache/Cdnfsd_LimeLight_Popup.php

<?php
namespace W3TC;



class Cdnfsd_LimeLight_Popup {
	static public function w3tc_ajax() {
		$o = new Cdnfsd_LimeLight_Popup();

		add_action( 'w3tc_ajax_cdnfsd_limelight_intro',
			array( $o, 'w3tc_ajax_cdnfsd_limelight_intro' ) );
		add_action( 'w3tc_ajax_cdnfsd_limelight_save',
			array( $o, 'w3tc_ajax_cdnfsd_limelight_save' ) );
	}



	public function w3tc_ajax_cdnfsd_limelight_intro() {
		$this->render_intro( array() );
	}



	private function render_intro( $details ) {
		$config = Dispatcher::config();

		include  W3TC_DIR . '/Cdnfsd_LimeLight_Popup_View_Intro.php';
		exit();
	}



	public function w3tc_ajax_cdnfsd_limelight_save() {
		$short_name = Util_Request::get_string( 'short_name' );
		$username = Util_Request::get_string( 'username' );
		$api_key = Util_Request::get_string( 'api_key' );

		try {
			$api = new Cdnfsd_LimeLight_Api( $short_name, $username, $api_key );
			$url = Util_Environment::home_domain_root_url() . '/';

			$items = array(
				array(
					'pattern' => $url,
					'exact' => true,
					'evict' => false,
					'incqs' => false
				)
			);

			$api->purge( $items );
		} catch ( \Exception $ex ) {
			$this->render_intro( array(
					'error_message' => 'Failed to make test purge request: ' . $ex->getMessage()
				) );
			exit();
		}

		$c = Dispatcher::config();
		$c->set( 'cdnfsd.limelight.short_name', $short_name );
		$c->set( 'cdnfsd.limelight.username', $username );
		$c->set( 'cdnfsd.limelight.api_key', $api_key );
		$c->save();

		include  W3TC_DIR . '/Cdnfsd_LimeLight_Popup_View_Success.php';
		exit();
	}
}