| Server IP : 68.183.124.220 / Your IP : 216.73.216.141 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/wp-content/plugins/ajax-search-lite/includes/classes/ajax/ |
Upload File : |
<?php
if (!defined('ABSPATH')) die('-1');
if (!class_exists("WD_ASL_Maintenance_Handler")) {
/**
* Class WD_ASL_Maintenance_Handler
*
* Maintenance page ajax handler
*
* @class WD_ASL_Maintenance_Handler
* @version 1.0
* @package AjaxSearchPro/Classes/Ajax
* @category Class
* @author Ernest Marcinko
*/
class WD_ASL_Maintenance_Handler extends WD_ASL_Handler_Abstract {
/**
* This function handles the index table ajax requests
*/
public function handle() {
if (ASL_DEMO) {
print "Maintenance !!!ASL_MAINT_START!!!";
print_r(json_encode(array(
'status' => 0,
'action' => '',
'msg' => 'Not allowed in demo mode!'
)));
print "!!!ASL_MAINT_STOP!!!";
die();
}
$status = 0;
$msg = 'Missing POST information, please try again!';
$action = 'none';
if ( isset($_POST, $_POST['data']) ) {
if (is_array($_POST['data']))
$data = $_POST['data'];
else
parse_str($_POST['data'], $data);
if ( isset($data['asl_reset_nonce']) ) {
$nonce = 'asl_reset_nonce';
} else if ( isset($data['asl_wipe_nonce']) ) {
$nonce = 'asl_wipe_nonce';
}
if ( isset($data[$nonce]) &&
wp_verify_nonce( $data[$nonce], $nonce )
) {
if ( $nonce == 'asl_reset_nonce' ) { // Reset
wd_asl()->init->pluginReset();
$status = 1;
$action = 'refresh';
$msg = 'The plugin data was successfully reset!';
} else { // Wipe
wd_asl()->init->pluginWipe();
$status = 1;
$action = 'redirect';
$msg = 'All plugin data was successfully wiped, you will be redirected in 5 seconds!';
}
} else {
$msg = 'Missing or invalid NONCE, please <strong>reload this page</strong> and try again!';
}
}
$ret = array(
'status' => $status,
'action' => $action,
'msg' => $msg
);
print "Maintenance !!!ASL_MAINT_START!!!";
print_r(json_encode($ret));
print "!!!ASL_MAINT_STOP!!!";
die();
}
// ------------------------------------------------------------
// ---------------- SINGLETON SPECIFIC --------------------
// ------------------------------------------------------------
public static function getInstance() {
if ( ! ( self::$_instance instanceof self ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
}
}