Example #1
0
			<?php 
    $allcustomposts = '';
    $filename = '';
    $records = '';
    if (isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != '') {
        $file_name = sanitize_text_field($_POST['uploadfilename']);
        $filename = $impCE->convert_string2hash_key($file_name);
    }
    if (isset($_POST['upload_csv_realname']) && $_POST['upload_csv_realname'] != '') {
        $uploaded_csv_name = sanitize_file_name($_POST['upload_csv_realname']);
    }
    $total_row_count = '';
    $parserObj = new SmackCSVParser();
    $file = $impCE->getUploadDirectory() . '/' . $filename;
    $parserObj->parseCSV($file, 0, -1);
    $headers = $parserObj->get_CSVheaders();
    $headers = $headers[0];
    $total_row_count = $parserObj->total_row_count - 1;
    $getcustomposts = get_post_types();
    if (!empty($getcustomposts) && is_array($getcustomposts)) {
        foreach ($getcustomposts as $keys => $value) {
            if ($value !== 'featured_image' && $value !== 'attachment' && $value !== 'wpsc-product' && $value !== 'wpsc-product-file' && $value !== 'revision' && $value !== 'nav_menu_item' && $value !== 'post' && $value !== 'page' && $value !== 'wp-types-group' && $value !== 'wp-types-user-group') {
                $allcustomposts .= $value . ',';
            }
        }
    }
    ?>
	
			<table style="font-size: 12px;" class = "table table-striped" id='FIELDGRP'> 
			<tr>
			<div align='center' style='float:right;'>