示例#1
0
	<table class="table-importer">
	<tr>
	<td>
	<h3><?php 
echo esc_html__('CSV Import Options', 'wp-ultimate-csv-importer');
?>
</h3>
	<div id='sec-one' <?php 
if (sanitize_text_field($_REQUEST['step']) !== 'uploadfile') {
    ?>
 style='display:none;' <?php 
}
?>
>
	<?php 
if (is_dir($impCE->getUploadDirectory('default'))) {
    if (!is_writable($impCE->getUploadDirectory('default'))) {
        if (!chmod($impCE->getUploadDirectory('default'), 0777)) {
            ?>
                                <input type='hidden' id='is_uploadfound' name='is_uploadfound' value='notfound' /> <?php 
        }
    } else {
        ?>
                        <input type='hidden' id='is_uploadfound' name='is_uploadfound' value='found' />
                <?php 
    }
    ?>
	<?php 
} else {
    ?>
		<input type='hidden' id='is_uploadfound' name='is_uploadfound' value='notfound' />
				<td>
					<h3><?php 
echo __('CSV Import Options', 'wp-ultimate-csv-importer');
?>
</h3>

					<div
						id='sec-one' <?php 
if ($_REQUEST['step'] != 'uploadfile') {
    ?>
 style='display:none;' <?php 
}
?>
>
						<?php 
if (is_dir($impCE->getUploadDirectory('default'))) {
    if (!is_writable($impCE->getUploadDirectory('default'))) {
        if (!chmod($impCE->getUploadDirectory('default'), 0777)) {
            ?>
									<input type='hidden' id='is_uploadfound' name='is_uploadfound'
										   value='notfound'/> <?php 
        }
    } else {
        ?>
								<input type='hidden' id='is_uploadfound' name='is_uploadfound' value='found'/>
							<?php 
    }
    ?>
						<?php 
} else {
    ?>
示例#3
0
    $count = $tmpCnt + $count;
    if ($count > $totRecords) {
        $count = $totRecords;
    }
} else {
    $count = $totRecords;
}
$resultArr = array();
$res2 = array();
$res1 = array();
$get_mapped_array = array();
$mapping_value = '';
$import_obj = new WPImporter_includes_helper();
$filename = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['uploadedFile'];
$parserObj = new SmackCSVParser();
$file = $import_obj->getUploadDirectory() . '/' . $filename;
$resultArr = $parserObj->parseCSV($file, $limit, $get_request_limit);
if (sanitize_text_field($_POST['postdata']['dupTitle'])) {
    $importObj->titleDupCheck = sanitize_text_field($_POST['postdata']['dupTitle']);
}
if (sanitize_text_field($_POST['postdata']['dupContent'])) {
    $importObj->conDupCheck = sanitize_text_field($_POST['postdata']['dupContent']);
}
$csv_rec_count = $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['h2'];
$available_groups = $skinnyObj->get_availgroups($curr_action);
//mapped and unmapped count
if (!empty($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']) && is_array($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) {
    foreach ($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'] as $seskey => $sesval) {
        foreach ($available_groups as $groupKey => $groupVal) {
            $current_mapped = explode($groupVal . 'mapping', $seskey);
            if (is_array($current_mapped) && count($current_mapped) == 2) {