$impCheckobj = CallWPImporterObj::checkSecurity(); if ($impCheckobj != 'true') { die($impCheckobj); } $noncevar = isset($_REQUEST['wpnonce']) ? $_REQUEST['wpnonce'] : ''; if (!wp_verify_nonce($noncevar, 'smack_nonce')) { die('You are not allowed to do this operation.Please contact your admin.'); } $requested_module = ""; if (isset($requested_module)) { $requested_module = $_REQUEST['checkmodule']; } $post_url = admin_url() . 'admin.php?page=' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/index.php&__module=' . $requested_module . '&step=mapping_settings'; if ($_SERVER['HTTP_REFERER'] != urldecode($_SERVER['HTTP_REFERER'])) { if ($post_url != urldecode($_SERVER['HTTP_REFERER'])) { die('Your requested url were wrong! Please contact your admin.'); } } else { if ($post_url != $_SERVER['HTTP_REFERER']) { die('Your requested url were wrong! Please contact your admin.'); } } $impObj = CallWPImporterObj::getInstance(); $filename = $_POST['file_name']; $delimeter = ''; $result = $impObj->csv_file_readdata($filename, $impObj); #$result = $impObj->csv_file_data($filename); foreach ($result[$_REQUEST['record_no']] as $key => $value) { $data[] = html_entity_decode($value); } print_r(json_encode($data));
$impObj = new WPImporter_includes_helper(); $nonceKey = $impObj->create_nonce_key(); if (!wp_verify_nonce($nonceKey, 'smack_nonce')) { die('You are not allowed to do this operation.Please contact your admin.'); } $impCheckobj = CallWPImporterObj::checkSecurity(); if ($impCheckobj != 'true') { die($impCheckobj); } $post = $page = $custompost = $users = $eshop = $settings = $support = $dashboard = $filemanager = $mappingtemplate = $schedulemapping = $export = ''; $active_plugins = get_option('active_plugins'); if (in_array('eshop/eshop.php', $active_plugins)) { $eshop = true; } $custompost = true; $impCEM = CallWPImporterObj::getInstance(); $get_settings = array(); $get_settings = $impCEM->getSettings(); $requestedModule = sanitize_text_field($_REQUEST['__module']); $requestedAction = isset($_REQUEST['action']) ? sanitize_text_field($_REQUEST['action']) : ''; $mod = isset($requestedModule) ? $requestedModule : ''; $module = $manager = ''; if (is_array($get_settings) && !empty($get_settings)) { foreach ($get_settings as $key) { $key = true; } } if (isset($requestedAction) && $requestedAction != '') { $action = $requestedAction; ${$action} = 'activate'; } else {