Ultimate CSV Importer - Version 3.5.3

Version Description

Download this release

Release Info

Developer smackcoders
Plugin Icon 128x128 Ultimate CSV Importer
Version 3.5.3
Comparing to
See all releases

Code changes from version 3.5.2 to 3.5.3

Readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === Advanced CSV Importer With Ultimate User Friendly Features ===
2
- Contributors: smackcoders, mayavee, fenzik, fredricksujin, rajkumarmohan, kumarsacoe, yesjosephraja, muthukumarp, mansoorkhan
3
  Donate link: http://www.smackcoders.com/donate.html
4
  Tags: Advanced CSV Importer, Advanced CSV Import, csv, csv importer, csv import, csv file, csv format, admin, affiliate, amazon, author, automatic, blog, buddypress, categories, comments, content, custom post, e-commerce, free, images, import, language, manage, media, meta, multisite, News, page, photos, pictures, plugin, Post, seo, shop, shortcode, tags, Taxonomy, text, title, users, video, woocommerce, wordpress, xml, youtube, batch, bulk, bulk edit, bulk editor, excel, spreadsheet
5
  Requires at least: 3.6.0
6
- Tested up to: 3.8.1
7
- Stable tag: 3.5.2
8
- Version: 3.5.2
9
  Author: smackcoders
10
  Author URI: http://profiles.wordpress.org/smackcoders/
11
 
@@ -15,7 +15,7 @@ Advanced CSV Importer plugin to import data as bulk post, page, custom post etc.
15
 
16
  == Description ==
17
 
18
- **Version 3.5.2 is now available with all reported bug fixes. Give a try today and [Leave your thoughts, comments, review and feed back here](http://wordpress.org/support/view/plugin-reviews/wp-ultimate-csv-importer?filter=5)**
19
 
20
  WP Ultimate CSV Importer Plugin proven much effective advanced CSV File Importer With Ultimate User Friendly Features. It is much easy now even for newbies to import any csv file as any wordpress post type and associated fields by simple mapping feature. Now import any CSV file as thousands of post, page and custom post types. This is admin side free plugin helps you in bulk edit, create and import posts type for your blog or site.
21
 
@@ -26,7 +26,7 @@ WP Ultimate CSV Importer Plugin proven much effective advanced CSV File Importer
26
  = Highlights =
27
  * Drag drop import
28
  * Define any type of post
29
- * Control post status (Publish, Private, Pending, Draft, Stciky and Protected)
30
  * Simple yet Powerful mapping feature
31
  * Convert any csv import as perfect posts and fields
32
  * Scheduled Publishing
@@ -39,14 +39,14 @@ WP Ultimate CSV Importer Plugin proven much effective advanced CSV File Importer
39
 
40
  = Power Import Features to Control your csv import =
41
  * Post title, content and even excerpt
42
- * Text, WYSIWYG/HTML, inline CSS in post content
43
  * Images, Youtube, Videos in post content
44
  * Featured image by Url
45
  * Multi authors
46
  * Multiple tags and categories
47
  * Non existing tags and categories are created automatically
48
  * Any Short Codes in post content
49
- * Assign sidebar widget, slider, slideshow as shortcodes
50
  * Manual slug feature for SEO friendly urls
51
  * Different post status for each post in CSV file.
52
  * Custom fields support for WP standard
@@ -77,7 +77,7 @@ It is more easy to convert any off line database maintained in Excel xls or spre
77
  * Drag drop import
78
  * Advanced CMS administration
79
 
80
- Much improved User interface with most flexible jquery plugin features and bootstrap UI design makes csv import more simple, easy, fast and even more flexible for better user experience. With improved Multi site, buddy press compatibility (except user import module) works well for most of the best wordpress themes available online. Now manage multisite & buddypress, amazon data import, affiliates blog, product inventory, ecommerce store, multi author blog, automatic news import, photo blog etc periodically with simple click import.
81
 
82
  = Extended Pro Power Features in Wp Ultimate CSV Importer =
83
  * Auto Schedule all your Imports
@@ -89,7 +89,7 @@ Much improved User interface with most flexible jquery plugin features and boots
89
  * Custom Post Type UI plugin import
90
  * Advanced Custom Fields Import
91
  * CCTM Posts and Fields Import
92
- * Woocommerce CSV Importer,
93
  * eshop CSV Importer
94
  * wp ecommerce Products CSV Importer with WP e-Commerce Custom Fields
95
  * Categories & tags Import with Category icons plugin support
@@ -176,6 +176,7 @@ Not clear. You can use [step by step installation wiki with snaps here](http://w
176
  4. Detailed real time log to know pinpoint status.
177
  5. Module based environment for easy and reduced interface to enable most required modules and when ever needed.
178
  6. Inbuilt support form for easy feedback, support, feature request with all useful links for easy and better csv import.
 
179
 
180
  == Frequently Asked Questions ==
181
 
@@ -186,7 +187,7 @@ Not clear. You can use [step by step installation wiki with snaps here](http://w
186
 
187
  = '''What is csv file?''' =
188
 
189
- CSV stands for "Comma Seperated Values". CSV file format is used to store data in a structured table of lists as columns and rows. CSV File otherwise Comma Separated Values file is a simple text file that stores attribute names as headers and their related values in comma separated format.
190
 
191
  In general opening csv files in MS Excel or any spread sheet editor will show all values under each header as columns and rows. Each column have a attribute name called as CSV file header and their data/values in rows for each entry.
192
 
@@ -231,7 +232,7 @@ Refer here as below
231
 
232
  = '''What is a csv importer plugin?''' =
233
 
234
- Csv importer plugin is a tool/plugin that can import your data and records from exported, stored, saved as csv files to your software as useful viewable content to analyze, manage etc. In such way Ultimate CSV importer is a worpdress plugin that imports your off line records or data stored/exported as a csv file into any wordpress post type web content by simple easy mapping feature.
235
 
236
  = '''Why we need CSV import for wordpress?''' =
237
 
@@ -280,6 +281,12 @@ Read More FAQs from below wiki links.
280
 
281
  == Changelog ==
282
 
 
 
 
 
 
 
283
  = 3.5.2 =
284
  * Import posts with author names as numerical apart from User ID
285
  * Added menu_order attribute import
@@ -333,7 +340,7 @@ Read More FAQs from below wiki links.
333
  * Improved: Performance improvements on SQL and CSV parsing
334
  * Fixed: Plugin deactivation issue fixed and updated the code.
335
  * Fixed: Links in the cells makes problems with the "quote"
336
- * Fixed: Loading content from more than one colunm
337
  * Fixed: Custom Post type issues fixed
338
 
339
  = 3.2.0 =
@@ -350,7 +357,7 @@ Read More FAQs from below wiki links.
350
  * Added: Category in numericals are restricted and skipped to Uncategorized
351
  * Added: Now password should be mentioned as {password}
352
  * Added: Post authors can be User ID or name
353
- * Improved: Much improved workflow
354
  * Improved: Add custom field option improved.
355
  * Improved: Date format handling improved
356
  * Improved: Any Date format is supported now
@@ -370,13 +377,13 @@ Read More FAQs from below wiki links.
370
  * Added: Added more post status options
371
  * Added: Publish, Sticky, Private, Draft and Pending Status for whole import
372
  * Added: Protected status with a common password option added
373
- * Added: "Status as in CSV" to assign status for individual psot thorugh CSV as ID or Field Tag
374
  * Added: User ID and User Name support for Post author feature added
375
  * Added: In case of missing or false IDs post assigned to admin as draft
376
- * Added: Add Custom Field Textbox autofilled with CSV header tag.
377
  * Added: Duplicate detection for post content and post title added as options.
378
  * Added: User can choose either one or both to avoid duplicate issues.
379
- * Improved: 6 Standard date format added as dropdown to choose.
380
  * Improved: Renamed post_name as post_slug to avoid confusion
381
  * Improved: Mapping Fields
382
  * Improved: Field tags are formatted to support auto mapping option (next milestone)
@@ -418,6 +425,9 @@ Read More FAQs from below wiki links.
418
 
419
  == Upgrade Notice ==
420
 
 
 
 
421
  = 3.5.2 =
422
  * Upgrade for bug free version and improved image handling
423
 
@@ -437,7 +447,7 @@ Read More FAQs from below wiki links.
437
  * Upgrade for WordPress 3.7.1 compatibility and minor bug fixes
438
 
439
  = 3.2.2 =
440
- * WordPress 3.6.1 compatibile, bug fix and UI improvements
441
 
442
  = 3.2.1 =
443
  * Performance improvements on SQL and CSV parsing
1
  === Advanced CSV Importer With Ultimate User Friendly Features ===
2
+ Contributors: smackcoders
3
  Donate link: http://www.smackcoders.com/donate.html
4
  Tags: Advanced CSV Importer, Advanced CSV Import, csv, csv importer, csv import, csv file, csv format, admin, affiliate, amazon, author, automatic, blog, buddypress, categories, comments, content, custom post, e-commerce, free, images, import, language, manage, media, meta, multisite, News, page, photos, pictures, plugin, Post, seo, shop, shortcode, tags, Taxonomy, text, title, users, video, woocommerce, wordpress, xml, youtube, batch, bulk, bulk edit, bulk editor, excel, spreadsheet
5
  Requires at least: 3.6.0
6
+ Tested up to: 3.9
7
+ Stable tag: 3.5.3
8
+ Version: 3.5.3
9
  Author: smackcoders
10
  Author URI: http://profiles.wordpress.org/smackcoders/
11
 
15
 
16
  == Description ==
17
 
18
+ **Version 3.5.3 is now available with all reported warnings, bug fixes and 3.9 compatibility. Give a try today and [Leave your thoughts, comments, review and feed back here](http://wordpress.org/support/view/plugin-reviews/wp-ultimate-csv-importer)**
19
 
20
  WP Ultimate CSV Importer Plugin proven much effective advanced CSV File Importer With Ultimate User Friendly Features. It is much easy now even for newbies to import any csv file as any wordpress post type and associated fields by simple mapping feature. Now import any CSV file as thousands of post, page and custom post types. This is admin side free plugin helps you in bulk edit, create and import posts type for your blog or site.
21
 
26
  = Highlights =
27
  * Drag drop import
28
  * Define any type of post
29
+ * Control post status (Publish, Private, Pending, Draft, Sticky and Protected)
30
  * Simple yet Powerful mapping feature
31
  * Convert any csv import as perfect posts and fields
32
  * Scheduled Publishing
39
 
40
  = Power Import Features to Control your csv import =
41
  * Post title, content and even excerpt
42
+ * Text, WYSIWYG/HTML, in line CSS in post content
43
  * Images, Youtube, Videos in post content
44
  * Featured image by Url
45
  * Multi authors
46
  * Multiple tags and categories
47
  * Non existing tags and categories are created automatically
48
  * Any Short Codes in post content
49
+ * Assign sidebar widget, slider, slide show as short codes
50
  * Manual slug feature for SEO friendly urls
51
  * Different post status for each post in CSV file.
52
  * Custom fields support for WP standard
77
  * Drag drop import
78
  * Advanced CMS administration
79
 
80
+ Much improved User interface with most flexible jquery plugin features and bootstrap UI design makes csv import more simple, easy, fast and even more flexible for better user experience. With improved Multi site, buddy press compatibility (except user import module) works well for most of the best wordpress themes available online. Now manage multi site & buddy press, amazon data import, affiliates blog, product inventory, ecommerce store, multi author blog, automatic news import, photo blog etc periodically with simple click import.
81
 
82
  = Extended Pro Power Features in Wp Ultimate CSV Importer =
83
  * Auto Schedule all your Imports
89
  * Custom Post Type UI plugin import
90
  * Advanced Custom Fields Import
91
  * CCTM Posts and Fields Import
92
+ * Woo commerce CSV Importer,
93
  * eshop CSV Importer
94
  * wp ecommerce Products CSV Importer with WP e-Commerce Custom Fields
95
  * Categories & tags Import with Category icons plugin support
176
  4. Detailed real time log to know pinpoint status.
177
  5. Module based environment for easy and reduced interface to enable most required modules and when ever needed.
178
  6. Inbuilt support form for easy feedback, support, feature request with all useful links for easy and better csv import.
179
+ 7. New export module for posts, page and all custom posts type plugins.
180
 
181
  == Frequently Asked Questions ==
182
 
187
 
188
  = '''What is csv file?''' =
189
 
190
+ CSV stands for "Comma Separated Values". CSV file format is used to store data in a structured table of lists as columns and rows. CSV File otherwise Comma Separated Values file is a simple text file that stores attribute names as headers and their related values in comma separated format.
191
 
192
  In general opening csv files in MS Excel or any spread sheet editor will show all values under each header as columns and rows. Each column have a attribute name called as CSV file header and their data/values in rows for each entry.
193
 
232
 
233
  = '''What is a csv importer plugin?''' =
234
 
235
+ Csv importer plugin is a tool/plugin that can import your data and records from exported, stored, saved as csv files to your software as useful viewable content to analyse, manage etc. In such way Ultimate CSV importer is a worpdress plugin that imports your off line records or data stored/exported as a csv file into any wordpress post type web content by simple easy mapping feature.
236
 
237
  = '''Why we need CSV import for wordpress?''' =
238
 
281
 
282
  == Changelog ==
283
 
284
+ = 3.5.3 =
285
+ * Added: Compatible up to WordPress 3.9.
286
+ * Added: Export feature added for posts, page, custom posts type plugins.
287
+ * Improved: Removed all warnings.
288
+ * Fixed reported bugs
289
+
290
  = 3.5.2 =
291
  * Import posts with author names as numerical apart from User ID
292
  * Added menu_order attribute import
340
  * Improved: Performance improvements on SQL and CSV parsing
341
  * Fixed: Plugin deactivation issue fixed and updated the code.
342
  * Fixed: Links in the cells makes problems with the "quote"
343
+ * Fixed: Loading content from more than one column
344
  * Fixed: Custom Post type issues fixed
345
 
346
  = 3.2.0 =
357
  * Added: Category in numericals are restricted and skipped to Uncategorized
358
  * Added: Now password should be mentioned as {password}
359
  * Added: Post authors can be User ID or name
360
+ * Improved: Much improved work flow
361
  * Improved: Add custom field option improved.
362
  * Improved: Date format handling improved
363
  * Improved: Any Date format is supported now
377
  * Added: Added more post status options
378
  * Added: Publish, Sticky, Private, Draft and Pending Status for whole import
379
  * Added: Protected status with a common password option added
380
+ * Added: "Status as in CSV" to assign status for individual post through CSV as ID or Field Tag
381
  * Added: User ID and User Name support for Post author feature added
382
  * Added: In case of missing or false IDs post assigned to admin as draft
383
+ * Added: Add Custom Field Text box auto-filled with CSV header tag.
384
  * Added: Duplicate detection for post content and post title added as options.
385
  * Added: User can choose either one or both to avoid duplicate issues.
386
+ * Improved: 6 Standard date format added as drop down to choose.
387
  * Improved: Renamed post_name as post_slug to avoid confusion
388
  * Improved: Mapping Fields
389
  * Improved: Field tags are formatted to support auto mapping option (next milestone)
425
 
426
  == Upgrade Notice ==
427
 
428
+ = 3.5.3 =
429
+ * Upgrade for added export feature and bug fixes
430
+
431
  = 3.5.2 =
432
  * Upgrade for bug free version and improved image handling
433
 
447
  * Upgrade for WordPress 3.7.1 compatibility and minor bug fixes
448
 
449
  = 3.2.2 =
450
+ * WordPress 3.6.1 compatible, bug fix and UI improvements
451
 
452
  = 3.2.1 =
453
  * Performance improvements on SQL and CSV parsing
css/style.css CHANGED
@@ -221,6 +221,12 @@ margin-top:12px
221
  /*margin-top:15px;*/
222
  padding: 0 5px;
223
  }
 
 
 
 
 
 
224
  /*.mappingheader .table-condensed label {
225
  margin-top:13px;
226
  }
221
  /*margin-top:15px;*/
222
  padding: 0 5px;
223
  }
224
+ .newmoduleicon {
225
+ z-index: 1000;
226
+ margin-top: -12px;
227
+ margin-left: -10px;
228
+ position: absolute;
229
+ }
230
  /*.mappingheader .table-condensed label {
231
  margin-top:13px;
232
  }
images/Importicon_24.png CHANGED
File without changes
images/facebook.png CHANGED
File without changes
images/googleplus.png CHANGED
File without changes
images/icon.png CHANGED
File without changes
images/linkedin.png CHANGED
File without changes
images/new.gif ADDED
Binary file
images/twitter.png CHANGED
File without changes
includes/WPImporter_includes_helper.php CHANGED
@@ -349,6 +349,7 @@ class WPImporter_includes_helper {
349
  {
350
  global $wpdb;
351
  $post_id = '';
 
352
  $smack_taxo = array();
353
  $custom_array = array();
354
  $seo_custom_array= array();
@@ -781,6 +782,43 @@ class WPImporter_includes_helper {
781
  echo $htmlShareButtons;
782
  }
783
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
784
  }
785
  class CallWPImporterObj extends WPImporter_includes_helper
786
  {
349
  {
350
  global $wpdb;
351
  $post_id = '';
352
+ $new_post = array();
353
  $smack_taxo = array();
354
  $custom_array = array();
355
  $seo_custom_array= array();
782
  echo $htmlShareButtons;
783
  }
784
 
785
+ public function common_footer() {
786
+ $get_pluginData = get_plugin_data(plugin_dir_path( __FILE__ ).'../index.php');
787
+ $footer = '';
788
+ //$footer .= '<div style="width:85%;height:20px;margin-top:25px;position:relative;"><hr style="border-top: 1px solid #C0C0C0;">';
789
+ //$footer .= '<label>Powered by Smackcoders</label>';
790
+ $footer .= '<div style="padding:10px;">';
791
+ $footer .= '<label class="plugintags"><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer" target="_blank">WIKI</a></label>
792
+ <label class="plugintags"><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_FAQ" target="_blank">FAQ</a></label>
793
+ <label class="plugintags"><a href="http://blog.smackcoders.com/category/free-wordpress-plugins/wordpress-ultimate-csv-importer-plugin/" target="_blank">TUTORIALS</a></label>
794
+ <label class="plugintags"><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_Videos" target="_blank">VIDEOS</a></label>
795
+ <label class="plugintags"><a href="http://forum.smackcoders.com/" target="_blank">FORUM</a></label>
796
+ <label class="plugintags"><a href="http://blog.smackcoders.com/wordpress-ultimate-csv-importer-csv-sample-files-and-updates.html" target="_blank">SAMPLE FILES</a></label>
797
+ <label class="plugintags"><a href="http://blog.smackcoders.com/how-to-make-one-click-easy-csv-import-in-wordpress-free-cheat-sheet-downloads.html" target="_blank">CHEAT SHEETS</a></label>
798
+ <label class="plugintags"><a href="http://blog.smackcoders.com/category/free-wordpress-plugins/wordpress-ultimate-csv-importer-plugin/" target="_blank">RELATED DOWNLOADS</a></label>
799
+ <label class="plugintags"><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_Change_Log" target="_blank">CHANGE LOG</a></label>
800
+ <label class="plugintags"><a href="http://blog.smackcoders.com/category/free-wordpress-plugins/wordpress-ultimate-csv-importer-plugin/" target="_blank">CURRENT VERSION NEWS</a></label>';
801
+ $footer .= '</div>';
802
+ $footer .= '<div style="padding:10px;margin-bottom:20px;">';
803
+ if(isset ($_REQUEST['__module']) && $_REQUEST['__module'] != 'settings')
804
+ $footer .= "<div style='float:left;'><a class='label label-info' href='".get_admin_url()."admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=settings'>Click here to Enable any disabled module</a></div>";
805
+
806
+ if(isset ($_REQUEST['__module']) && $_REQUEST['__module'] == 'settings') {
807
+ $footer .= "<div style='float:left;margin-left:15px;'><a class='label label-info' href='".get_admin_url()."admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=support'>Click here to Get some useful links</a></div>";
808
+ $footer .= "<div style='float:right;margin-right:15px;'><a class='label label-info' href='http://wordpress.org/plugins/wp-ultimate-csv-importer/developers/'>Get Old Versions</a> </span> Current Version: ".$get_pluginData['Version']." </div>";
809
+ }
810
+ if(isset ($_REQUEST['__module']) && $_REQUEST['__module'] != 'support' && $_REQUEST['__module'] != 'settings') {
811
+ $footer .= "<div style='float:left;margin-left:15px;'><a class='label label-info' href='".get_admin_url()."admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=support'>Click here to Get some useful links</a></div>";
812
+ $footer .= "<div style='float:right;margin-right:15px;'><span style='margin-right:20px;'> <a class='label label-info' href='http://wordpress.org/plugins/wp-ultimate-csv-importer/developers/'>Get Old Versions</a></span> Current Version: ".$get_pluginData['Version']." </div>";
813
+ }
814
+ if(isset ($_REQUEST['__module']) && $_REQUEST['__module'] == 'support'){
815
+ $footer .= "<div style='float:right;margin-right:15px;'><span style='margin-right:20px;'>Current Version: ".$get_pluginData['Version']." </span><span style='margin-right:10px;'><a class='label label-info' href='http://wordpress.org/plugins/wp-ultimate-csv-importer/developers/'>Get Old Versions</a></span></div>";
816
+ }
817
+ $footer .= '</div>';
818
+ $footer .= '<div style="float:right;margin-right:15px;"> <label>Powered By <a href="http://www.smackcoders.com"> Smackcoders</a></label> </div>';
819
+ echo $footer;
820
+ }
821
+
822
  }
823
  class CallWPImporterObj extends WPImporter_includes_helper
824
  {
index.php CHANGED
@@ -2,7 +2,7 @@
2
  /******************************
3
  Plugin Name: WP Ultimate CSV Importer
4
  Description: A plugin that helps to import the data's from a CSV file.
5
- Version: 3.5.2
6
  Author: smackcoders.com
7
  Plugin URI: http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html
8
  Author URI: http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html
@@ -13,7 +13,7 @@ define('WP_CONST_ULTIMATE_CSV_IMP_URL', 'http://www.smackcoders.com/wp-ultimate-
13
  define('WP_CONST_ULTIMATE_CSV_IMP_NAME', 'WP Ultimate CSV Importer');
14
  define('WP_CONST_ULTIMATE_CSV_IMP_SLUG', 'wp-ultimate-csv-importer');
15
  define('WP_CONST_ULTIMATE_CSV_IMP_SETTINGS', 'WP Ultimate CSV Importer');
16
- define('WP_CONST_ULTIMATE_CSV_IMP_VERSION', '3.5.2');
17
  define('WP_CONST_ULTIMATE_CSV_IMP_DIR', WP_PLUGIN_URL . '/' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/');
18
  define('WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY', plugin_dir_path( __FILE__ ));
19
  define('WP_CSVIMP_PLUGIN_BASE', WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY);
2
  /******************************
3
  Plugin Name: WP Ultimate CSV Importer
4
  Description: A plugin that helps to import the data's from a CSV file.
5
+ Version: 3.5.3
6
  Author: smackcoders.com
7
  Plugin URI: http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html
8
  Author URI: http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html
13
  define('WP_CONST_ULTIMATE_CSV_IMP_NAME', 'WP Ultimate CSV Importer');
14
  define('WP_CONST_ULTIMATE_CSV_IMP_SLUG', 'wp-ultimate-csv-importer');
15
  define('WP_CONST_ULTIMATE_CSV_IMP_SETTINGS', 'WP Ultimate CSV Importer');
16
+ define('WP_CONST_ULTIMATE_CSV_IMP_VERSION', '3.5.3');
17
  define('WP_CONST_ULTIMATE_CSV_IMP_DIR', WP_PLUGIN_URL . '/' . WP_CONST_ULTIMATE_CSV_IMP_SLUG . '/');
18
  define('WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY', plugin_dir_path( __FILE__ ));
19
  define('WP_CSVIMP_PLUGIN_BASE', WP_CONST_ULTIMATE_CSV_IMP_DIRECTORY);
js/ultimate-importer-pro.js CHANGED
@@ -9,7 +9,7 @@ if(importer=='custompost' && step=='mapping_settings')
9
  }
10
  var checkfile = document.getElementById('checkfile').value;
11
  var uploadedFile = document.getElementById('uploadedFile').value;
12
- var select_delimeter=document.getElementById('select_delimeter').value;
13
  var select_delim=document.getElementById('select_delim').value;
14
  var get_log = document.getElementById('log').innerHTML;
15
  if( !$.trim( $('#log').html() ).length ) {
@@ -446,20 +446,20 @@ function showMapMessages(alerttype, msg) {
446
 
447
  function importRecordsbySettings(siteurl)
448
  {
 
 
449
  var tot_no_of_records = document.getElementById('checktotal').value;
450
  var importas = document.getElementById('selectedImporter').value;
451
  var uploadedFile = document.getElementById('checkfile').value;
452
- var no_of_columns = document.getElementById('h2').value;
453
  var step = document.getElementById('stepstatus').value;
454
  var mappingArr = document.getElementById('mappingArr').value;
455
  var dupContent = document.getElementById('duplicatecontent').checked;
456
  var dupTitle = document.getElementById('duplicatetitle').checked;
457
- var importlimit = document.getElementById('importlimit').value;
458
  var currentlimit = document.getElementById('currentlimit').value;
459
  var tmpCnt = document.getElementById('tmpcount').value;
460
  var no_of_tot_records = document.getElementById('tot_records').value;
461
- var get_requested_count = document.getElementById('importlimit').value;
462
- var get_log = document.getElementById('log').innerHTML;
463
 
464
  if(get_requested_count != '') {
465
  //return true;
@@ -500,7 +500,10 @@ function importRecordsbySettings(siteurl)
500
  'postdata' : postdata,
501
  'siteurl' : siteurl,
502
  },
503
- success:function(data) {
 
 
 
504
  if(parseInt(tmpCnt) < parseInt(tot_no_of_records)){
505
  var terminate_action = document.getElementById('terminateaction').value;
506
  if(terminate_action == 'continue'){
@@ -674,3 +677,27 @@ function gotoback() {
674
  var set_assigned_step = currentURL.replace("uploadfile","mapping_settings");
675
  // window.location.assign(set_assigned_step);
676
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  }
10
  var checkfile = document.getElementById('checkfile').value;
11
  var uploadedFile = document.getElementById('uploadedFile').value;
12
+ var select_delimeter=document.getElementById('select_delim').value;
13
  var select_delim=document.getElementById('select_delim').value;
14
  var get_log = document.getElementById('log').innerHTML;
15
  if( !$.trim( $('#log').html() ).length ) {
446
 
447
  function importRecordsbySettings(siteurl)
448
  {
449
+ var importlimit = document.getElementById('importlimit').value;
450
+ var get_requested_count = importlimit;
451
  var tot_no_of_records = document.getElementById('checktotal').value;
452
  var importas = document.getElementById('selectedImporter').value;
453
  var uploadedFile = document.getElementById('checkfile').value;
454
+ // var no_of_columns = document.getElementById('h2').value;
455
  var step = document.getElementById('stepstatus').value;
456
  var mappingArr = document.getElementById('mappingArr').value;
457
  var dupContent = document.getElementById('duplicatecontent').checked;
458
  var dupTitle = document.getElementById('duplicatetitle').checked;
 
459
  var currentlimit = document.getElementById('currentlimit').value;
460
  var tmpCnt = document.getElementById('tmpcount').value;
461
  var no_of_tot_records = document.getElementById('tot_records').value;
462
+ var get_log = document.getElementById('log').innerHTML;
 
463
 
464
  if(get_requested_count != '') {
465
  //return true;
500
  'postdata' : postdata,
501
  'siteurl' : siteurl,
502
  },
503
+ success:function(data) {
504
+ if(parseInt(tmpCnt) == parseInt(tot_no_of_records)){
505
+ document.getElementById('terminatenow').style.display = "none";
506
+ }
507
  if(parseInt(tmpCnt) < parseInt(tot_no_of_records)){
508
  var terminate_action = document.getElementById('terminateaction').value;
509
  if(terminate_action == 'continue'){
677
  var set_assigned_step = currentURL.replace("uploadfile","mapping_settings");
678
  // window.location.assign(set_assigned_step);
679
  }
680
+ function export_module(){
681
+ var get_selected_module = document.getElementsByName('export');
682
+ // alert(get_selected_module);
683
+ for (var i = 0, length = get_selected_module.length; i < length; i++) {
684
+ if (get_selected_module[i].checked) {
685
+ // do whatever you want with the checked radio
686
+ //alert(get_selected_module[i].value);
687
+ // only one radio can be logically checked, don't check the rest
688
+ //break;
689
+ return true;
690
+ }
691
+ }
692
+ showMapMessages('error', 'Please choose one module to export the records!');
693
+ return false;
694
+ }
695
+ function export_check(value) {
696
+ if(value == 'eshop' || value == 'woocommerce' || value == 'wpcommerce' || value == 'marketpress') {
697
+ document.getElementById(value).checked = false;
698
+ document.getElementById('ShowMsg').style.display = "";
699
+ value = value.toUpperCase();
700
+ document.getElementById('warning-msg').innerHTML = value+' Feature is available only for PRO!.';
701
+ $('#ShowMsg').delay(7000).fadeOut();
702
+ }
703
+ }
modules/comments/templates/index.php CHANGED
@@ -30,12 +30,12 @@
30
  <!-- The file input field used as target for the file upload widget -->
31
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
32
  <?php $uploadDir = wp_upload_dir(); ?>
33
- <input type="hidden" id="uploaddir" value="<?php echo $uploadDir['basedir']; ?>">
34
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
35
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
36
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
37
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
38
- <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php echo $_REQUEST['__module']; ?>' >
39
  <input id="fileupload" type="file" name="files[]" multiple>
40
  </span>
41
  <!-- The global progress bar -->
@@ -142,9 +142,11 @@ $('#importfile').attr('disabled', false);
142
  if(isset($_POST['mydelimeter']))
143
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST["mydelimeter"];
144
  $wpcsvsettings=array();
 
145
  $wpcsvsettings=get_option('wpcsvfreesettings');
146
  ?>
147
  <h3>Mapping Configuration</h3>
 
148
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
149
  <div class='mappingsection'>
150
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
@@ -167,6 +169,7 @@ if(isset($_POST['upload_csv_realname']) && $_POST['upload_csv_realname'] != '')
167
  $getrecords = $impCE->csv_file_data($filename,$delimeter); //print('<pre>');print_r($getrecords); print_r($impCE->headers);
168
  $getcustomposts=get_post_types();
169
  $allcustomposts='';
 
170
  foreach($getcustomposts as $keys => $value)
171
  {
172
  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')) {
@@ -180,26 +183,28 @@ $allcustomposts.=$value.',';
180
  <td colspan='4'>
181
  <div align='center' style='float:right;'>
182
  <?php $cnt = count($impCE->defCols) + 2;
183
- $cnt1 = count($impCE->headers); ?>
184
- <input type="hidden" id="h1" name="h1" value="<?php echo $cnt; ?>"/>
185
- <input type="hidden" id="h2" name="h2" value="<?php echo $cnt1; ?>"/>
186
- <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php echo $_REQUEST['__module']; ?>"/>
 
 
187
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
188
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
189
  <input type='hidden' id='current_record' name='current_record' value='0' />
190
- <input type='hidden' id='totRecords' name='totRecords' value='<?php echo count($getrecords); ?>' />
191
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
192
- <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php echo $filename; ?>" />
193
  <!-- real uploaded filename -->
194
- <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php echo $uploaded_csv_name; ?>" />
195
- <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php echo $delimeter; ?>" />
196
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_REQUEST['step']; ?>' />
197
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
198
  <input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
199
- <label style="padding-right:10px;">Change the csv sample record value by rows</label>
200
  <input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
201
- Go To: <input type='text' id='goto_element' name='goto_element' />
202
- <input type='button' id='apply_element' name='apply_element' value='Get Record' class="btn btn-success" onclick='gotoelement(this.id);' />
203
  </div>
204
  </td>
205
  </tr>
@@ -207,7 +212,7 @@ $allcustomposts.=$value.',';
207
  $count = 0;
208
  $cmdsObj = new CommentsActions();
209
  ?>
210
- <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>SAMPLE VALUE</b> </td><td></td></tr>
211
  <?php
212
  foreach ($impCE->headers as $key => $value) {
213
  ?>
@@ -296,6 +301,7 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
296
  </div>
297
  </div>
298
  </div>
 
299
  </div>
300
  </form>
301
  </td>
@@ -304,18 +310,24 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
304
  <td>
305
  <h3>Import Option Settings</h3>
306
  <!--<?php //echo $_POST['uploadedFile']; ?><?php //echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; die;?>-->
 
307
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
 
308
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex']; ?>"/>
309
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
310
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
311
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
312
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
313
- <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
 
 
 
 
314
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
315
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
316
- <input type='hidden' id='uploadedFile1' name='uploadedFile1' value='<?php echo $_POST['uploadedFile']; ?>' />
317
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
318
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
 
319
  <!-- Import settings options -->
320
  <div class="postbox" id="options" style=" margin-bottom:0px;">
321
  <!-- <h4 class="hndle">Search settings</h4>-->
@@ -345,10 +357,10 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
345
  </select><br>
346
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
347
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
348
- <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect Duplicate Post Content</label> <br>
349
- <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect Duplicate Post Title</label> <br>
350
 
351
- How much comparisons per Server-Request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
352
  <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> per request.</span>
353
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
354
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
@@ -370,6 +382,7 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
370
  <!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
371
  </div>
372
  </div>
 
373
  <!-- Code Ends Here-->
374
  </div>
375
  </td>
@@ -384,16 +397,17 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
384
  </div>
385
  </div>
386
  <!-- Promotion footer for other useful plugins -->
387
- <!--<div class= "promobox" id="pluginpromo" style="width:99%;">
388
  <div class="accordion-group" >
389
  <div class="accordion-heading">
390
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL PLUGINS BY SMACKCODERS </a>
391
  </div>
392
  <div class="accordion-body in collapse">
393
  <div>
394
  <?php // $impCE->common_footer_for_other_plugin_promotions(); ?>
 
395
  </div>
396
  </div>
397
  </div>
398
- </div> -->
399
  </div>
30
  <!-- The file input field used as target for the file upload widget -->
31
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
32
  <?php $uploadDir = wp_upload_dir(); ?>
33
+ <input type="hidden" id="uploaddir" value="<?php if(isset($uploadDir['basedir'])) { echo $uploadDir['basedir']; } ?>">
34
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
35
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
36
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
37
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
38
+ <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>' >
39
  <input id="fileupload" type="file" name="files[]" multiple>
40
  </span>
41
  <!-- The global progress bar -->
142
  if(isset($_POST['mydelimeter']))
143
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST["mydelimeter"];
144
  $wpcsvsettings=array();
145
+ $custom_key = array();
146
  $wpcsvsettings=get_option('wpcsvfreesettings');
147
  ?>
148
  <h3>Mapping Configuration</h3>
149
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'mapping_settings') { ?>
150
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
151
  <div class='mappingsection'>
152
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
169
  $getrecords = $impCE->csv_file_data($filename,$delimeter); //print('<pre>');print_r($getrecords); print_r($impCE->headers);
170
  $getcustomposts=get_post_types();
171
  $allcustomposts='';
172
+ $records = '';
173
  foreach($getcustomposts as $keys => $value)
174
  {
175
  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')) {
183
  <td colspan='4'>
184
  <div align='center' style='float:right;'>
185
  <?php $cnt = count($impCE->defCols) + 2;
186
+ $cnt1 = count($impCE->headers);
187
+ $records = count($getrecords); ?>
188
+
189
+ <input type='hidden' id='h1' name='h1' value="<?php if(isset($cnt)) { echo $cnt; } ?>"/>
190
+ <input type='hidden' id='h2' name='h2' value="<?php if(isset($cnt1)) { echo $cnt1; } ?>"/>
191
+ <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>"/>
192
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
193
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
194
  <input type='hidden' id='current_record' name='current_record' value='0' />
195
+ <input type='hidden' id='totRecords' name='totRecords' value='<?php if(isset($records)) { echo $records; } ?>' />
196
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
197
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php if(isset($filename)) { echo $filename; } ?>" />
198
  <!-- real uploaded filename -->
199
+ <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php if(isset($uploaded_csv_name)) { echo $uploaded_csv_name; } ?>" />
200
+ <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php if(isset($delimeter)) { echo $delimeter; } ?>" />
201
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['step']; } ?>' />
202
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
203
  <input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
204
+ <label style="padding-right:10px;">Change your csv row data</label>
205
  <input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
206
+ Go To Row #<input type='text' id='goto_element' name='goto_element' />
207
+ <input type='button' id='apply_element' name='apply_element' value='Show' class="btn btn-success" onclick='gotoelement(this.id);' />
208
  </div>
209
  </td>
210
  </tr>
212
  $count = 0;
213
  $cmdsObj = new CommentsActions();
214
  ?>
215
+ <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>CSV ROW</b> </td><td></td></tr>
216
  <?php
217
  foreach ($impCE->headers as $key => $value) {
218
  ?>
301
  </div>
302
  </div>
303
  </div>
304
+ <?php } ?>
305
  </div>
306
  </form>
307
  </td>
310
  <td>
311
  <h3>Import Option Settings</h3>
312
  <!--<?php //echo $_POST['uploadedFile']; ?><?php //echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; die;?>-->
313
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'importoptions') { ?>
314
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
315
+ <?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) { ?>
316
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex']; ?>"/>
317
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
318
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
319
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
320
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
321
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
322
+ <input type='hidden' id='selectedImporter' name='selectedImporter' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
323
+ <?php } ?>
324
+ <?php if(isset($_POST)) { ?>
325
+ <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
326
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
327
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
328
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value='<?php echo $_POST['uploadedFile']; ?>' />
 
329
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
330
+ <?php } ?>
331
  <!-- Import settings options -->
332
  <div class="postbox" id="options" style=" margin-bottom:0px;">
333
  <!-- <h4 class="hndle">Search settings</h4>-->
357
  </select><br>
358
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
359
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
360
+ <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect duplicate post content</label> <br>
361
+ <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect duplicate post title</label> <br>
362
 
363
+ How much import per server request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
364
  <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> per request.</span>
365
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
366
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
382
  <!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
383
  </div>
384
  </div>
385
+ <?php } ?>
386
  <!-- Code Ends Here-->
387
  </div>
388
  </td>
397
  </div>
398
  </div>
399
  <!-- Promotion footer for other useful plugins -->
400
+ <div class= "promobox" id="pluginpromo" style="width:99%;">
401
  <div class="accordion-group" >
402
  <div class="accordion-heading">
403
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL LINKS </a>
404
  </div>
405
  <div class="accordion-body in collapse">
406
  <div>
407
  <?php // $impCE->common_footer_for_other_plugin_promotions(); ?>
408
+ <?php $impCE->common_footer(); ?>
409
  </div>
410
  </div>
411
  </div>
412
+ </div>
413
  </div>
modules/custompost/templates/index.php CHANGED
@@ -28,12 +28,12 @@ $impCE = new WPImporter_includes_helper();
28
  <!-- The file input field used as target for the file upload widget -->
29
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
30
  <?php $uploadDir = wp_upload_dir(); ?>
31
- <input type="hidden" id="uploaddir" value="<?php echo $uploadDir['basedir']; ?>">
32
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
33
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
34
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
35
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
36
- <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php echo $_REQUEST['__module']; ?>' >
37
  <input id="fileupload" type="file" name="files[]" multiple>
38
  </span>
39
  <!-- The global progress bar -->
@@ -140,13 +140,15 @@ $impCE = new WPImporter_includes_helper();
140
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST['mydelimeter'];
141
  }
142
  $wpcsvsettings=array();
 
143
  $wpcsvsettings=get_option('wpcsvfreesettings');
144
  ?>
145
  <h3>Mapping Configuration</h3>
 
146
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
147
  <div class='mappingsection'>
148
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
149
- <?php if($_REQUEST['__module']=='custompost'){ ?>
150
  <div class='importstatus' style='display:true;'>
151
  <input type="hidden" id="customposts" name="customposts" value="">
152
  <div style = 'float:left'> <label> Select Post Type </label> <span class="mandatory"> * </span> </div>
@@ -156,30 +158,47 @@ $impCE = new WPImporter_includes_helper();
156
  <?php
157
  $cust_post_list_count=0;
158
  foreach (get_post_types() as $key => $value) {
159
- if($wpcsvsettings['rcustompost']=='custompostuitype'){
160
- 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') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf')) {?>
 
 
 
 
 
 
 
 
 
161
  <option id="<?php echo($value); ?>"> <?php echo($value);?> </option>
162
  <?php
163
  $cust_post_list_count++;
164
  }
165
- }
166
- else
167
- {
168
- $cust_post_ui=array();
169
- $cust_post_ui=get_option('cpt_custom_post_types');
170
- foreach($cust_post_ui as $cust_list){
171
- if($cust_list['name']==$value)
172
- {
173
- $value='createdByCustomPostUI';
174
- }
175
  }
176
- 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') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf') && ($value != 'createdByCustomPostUI')) {?>
177
- <option id="<?php echo($value); ?>"> <?php echo($value);?> </option>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  <?php
179
- $cust_post_list_count++;
180
- }
181
-
182
- }
183
  } ?>
184
  </select>
185
  <input type = 'hidden' id = 'cust_post_list_count' name = 'cust_post_list_count' value = '<?php echo $cust_post_list_count; ?>'>
@@ -205,6 +224,7 @@ $impCE = new WPImporter_includes_helper();
205
  $mFieldsArr='';
206
  $delimeter='';
207
  $filename='';
 
208
  if(isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != ''){
209
  $file_name = $_POST['uploadfilename'];
210
  $filename = $impCE->convert_string2hash_key($file_name);
@@ -230,41 +250,42 @@ $impCE = new WPImporter_includes_helper();
230
  <div align='center' style='float:right;'>
231
  <?php $cnt = count($impCE->defCols) + 2;
232
  $cnt1 = count($impCE->headers);
233
- $imploded_array = implode(',', $impCE->headers); ?>
234
- <input type = 'hidden' id = 'imploded_header' name = 'imploded_array' value = '<?php echo $imploded_array; ?>'>
235
- <input type="hidden" id="h1" name="h1" value="<?php echo $cnt; ?>"/>
236
- <input type="hidden" id="h2" name="h2" value="<?php echo $cnt1; ?>"/>
237
- <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php echo $_REQUEST['__module']; ?>"/>
 
238
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
239
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
240
  <input type='hidden' id='current_record' name='current_record' value='0' />
241
- <input type='hidden' id='totRecords' name='totRecords' value='<?php echo count($getrecords); ?>' />
242
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
243
- <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php echo $filename; ?>" />
244
  <!-- real uploaded filename -->
245
- <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php echo $uploaded_csv_name; ?>" />
246
- <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php echo $delimeter; ?>" />
247
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_REQUEST['step']; ?>' />
248
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
249
  <input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
250
- <label style="padding-right:10px;">Change the csv sample record value by rows</label>
251
  <input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
252
- Go To: <input type='text' id='goto_element' name='goto_element' />
253
- <input type='button' id='apply_element' name='apply_element' class="btn btn-success" value='Get Record' onclick='gotoelement(this.id);' />
254
  </div>
255
  </td>
256
  </tr>
257
  <?php
258
  $count = 0;
259
- if ($_REQUEST['__module'] == 'page') {
260
  unset($impCE->defCols['post_category']);
261
  unset($impCE->defCols['post_tag']);
262
  }
263
- if ($_REQUEST['__module'] != 'page') {
264
  unset($impCE->defCols['menu_order']);
265
  }
266
  ?>
267
- <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>SAMPLE VALUE</b> </td><td></td></tr>
268
  <?php
269
  foreach ($impCE->headers as $key => $value)
270
  { ?>
@@ -343,7 +364,7 @@ $impCE = new WPImporter_includes_helper();
343
  $mFieldsArr = substr($mFieldsArr, 0, -1);
344
  ?>
345
  </table>
346
- <input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php print_r($mFieldsArr); ?>"/>
347
  <div>
348
  <div class="goto_import_options" align=center>
349
  <div class="mappingactions" >
@@ -365,6 +386,7 @@ $impCE = new WPImporter_includes_helper();
365
  </div>
366
  </div>
367
  </div>
 
368
  </div>
369
  </form>
370
  </td>
@@ -373,6 +395,7 @@ $impCE = new WPImporter_includes_helper();
373
  <td>
374
  <h3>Import Option Settings</h3>
375
  <!--<?php //echo $_POST['uploadedFile']; ?><?php //echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; die;?>-->
 
376
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
377
  <?php //$prevoptionindex='';?>
378
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php
@@ -381,16 +404,21 @@ $impCE = new WPImporter_includes_helper();
381
  echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex'];
382
  }
383
  ?>"/>
 
384
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
385
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
386
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
387
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
388
- <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
 
 
 
 
389
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
390
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
391
- <input type='hidden' id='uploadedFile1' name='uploadedFile1' value='<?php echo $_POST['uploadedFile']; ?>' />
392
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
393
- <input type='hidden' id='mappingArr' name='mappingArr' value='' />
394
  <!-- Import settings options -->
395
  <div class="postbox" id="options" style=" margin-bottom:0px;">
396
  <!-- <h4 class="hndle">Search settings</h4>-->
@@ -418,9 +446,9 @@ $impCE = new WPImporter_includes_helper();
418
  </select><br>
419
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
420
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
421
- <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect Duplicate Post Content</label> <br>
422
- <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect Duplicate Post Title</label> <br>
423
- How much comparisons per Server-Request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
424
  <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> per request.</span>
425
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
426
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
@@ -442,6 +470,7 @@ $impCE = new WPImporter_includes_helper();
442
  <!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
443
  </div>
444
  </div>
 
445
  <!-- Code Ends Here-->
446
  </div>
447
  </td>
@@ -456,16 +485,17 @@ $impCE = new WPImporter_includes_helper();
456
  </div>
457
  </div>
458
  <!-- Promotion footer for other useful plugins -->
459
- <!-- <div class= "promobox" id="pluginpromo" style="width:99%;">
460
  <div class="accordion-group" >
461
  <div class="accordion-heading">
462
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL PLUGINS BY SMACKCODERS </a>
463
  </div>
464
  <div class="accordion-body in collapse">
465
  <div>
466
  <?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
 
467
  </div>
468
  </div>
469
  </div>
470
- </div> -->
471
  </div>
28
  <!-- The file input field used as target for the file upload widget -->
29
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
30
  <?php $uploadDir = wp_upload_dir(); ?>
31
+ <input type="hidden" id="uploaddir" value="<?php if(isset($uploadDir)) { echo $uploadDir['basedir']; } ?>">
32
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
33
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
34
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
35
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
36
+ <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>' >
37
  <input id="fileupload" type="file" name="files[]" multiple>
38
  </span>
39
  <!-- The global progress bar -->
140
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST['mydelimeter'];
141
  }
142
  $wpcsvsettings=array();
143
+ $custom_key = array();
144
  $wpcsvsettings=get_option('wpcsvfreesettings');
145
  ?>
146
  <h3>Mapping Configuration</h3>
147
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'mapping_settings' ) { ?>
148
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
149
  <div class='mappingsection'>
150
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
151
+ <?php if(isset($_REQUEST['__module']) && $_REQUEST['__module']=='custompost'){ ?>
152
  <div class='importstatus' style='display:true;'>
153
  <input type="hidden" id="customposts" name="customposts" value="">
154
  <div style = 'float:left'> <label> Select Post Type </label> <span class="mandatory"> * </span> </div>
158
  <?php
159
  $cust_post_list_count=0;
160
  foreach (get_post_types() as $key => $value) {
161
+ $cctm_post_type = array();
162
+ $cctm_post_type = get_option('cctm_data');
163
+ if(!empty($cctm_post_type)){
164
+ foreach($cctm_post_type['post_type_defs'] as $cctmptkey => $cctmptval) {
165
+ if($cctmptkey == $value){
166
+ $value = 'createdByCCTM';
167
+ }
168
+ }
169
+ }
170
+ if($wpcsvsettings['rcustompost']=='custompostuitype'){
171
+ 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') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf') && ($value != 'createdByCCTM')) {?>
172
  <option id="<?php echo($value); ?>"> <?php echo($value);?> </option>
173
  <?php
174
  $cust_post_list_count++;
175
  }
 
 
 
 
 
 
 
 
 
 
176
  }
177
+ else
178
+ {
179
+ $cust_post_ui = array();
180
+ $cust_post_ui = get_option('cpt_custom_post_types');
181
+ $cctm_post_type = array();
182
+ $cctm_post_type = get_option('cctm_data');
183
+ if(!empty($cctm_post_type)){
184
+ foreach($cctm_post_type['post_type_defs'] as $cctmptkey => $cctmptval) {
185
+ if($cctmptkey == $value){
186
+ $value = 'createdByCCTM';
187
+ }
188
+ }
189
+ }
190
+ foreach($cust_post_ui as $cust_list){
191
+ if($cust_list['name']==$value)
192
+ {
193
+ $value='createdByCustomPostUI';
194
+ }
195
+ }
196
+ 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') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf') && ($value != 'createdByCustomPostUI') && ($value != 'createdByCCTM')) {?>
197
+ <option id="<?php echo($value); ?>"> <?php echo($value);?> </option>
198
  <?php
199
+ $cust_post_list_count++;
200
+ }
201
+ }
 
202
  } ?>
203
  </select>
204
  <input type = 'hidden' id = 'cust_post_list_count' name = 'cust_post_list_count' value = '<?php echo $cust_post_list_count; ?>'>
224
  $mFieldsArr='';
225
  $delimeter='';
226
  $filename='';
227
+ $records = '';
228
  if(isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != ''){
229
  $file_name = $_POST['uploadfilename'];
230
  $filename = $impCE->convert_string2hash_key($file_name);
250
  <div align='center' style='float:right;'>
251
  <?php $cnt = count($impCE->defCols) + 2;
252
  $cnt1 = count($impCE->headers);
253
+ $records = count($getrecords);
254
+ $imploaded_array = implode(',', $impCE->headers); ?>
255
+ <input type = 'hidden' id = 'imploded_header' name = 'imploded_array' value = '<?php if(isset($imploaded_array)) { echo $imploaded_array; } ?>'>
256
+ <input type='hidden' id='h1' name='h1' value="<?php if(isset($cnt)) { echo $cnt; } ?>"/>
257
+ <input type='hidden' id='h2' name='h2' value="<?php if(isset($cnt1)) { echo $cnt1; } ?>"/>
258
+ <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>"/>
259
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
260
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
261
  <input type='hidden' id='current_record' name='current_record' value='0' />
262
+ <input type='hidden' id='totRecords' name='totRecords' value='<?php if(isset($records)) { echo $records; } ?>' />
263
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
264
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php if(isset($filename)) { echo $filename; } ?>" />
265
  <!-- real uploaded filename -->
266
+ <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php if(isset($uploaded_csv_name)) { echo $uploaded_csv_name; } ?>" />
267
+ <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php if(isset($delimeter)) { echo $delimeter; } ?>" />
268
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php if(isset($_REQUEST['step'])) { echo $_REQUEST['step']; } ?>' />
269
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
270
  <input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
271
+ <label style="padding-right:10px;">Change your csv row data</label>
272
  <input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
273
+ Go To Row #<input type='text' id='goto_element' name='goto_element' />
274
+ <input type='button' id='apply_element' name='apply_element' class="btn btn-success" value='Show' onclick='gotoelement(this.id);' />
275
  </div>
276
  </td>
277
  </tr>
278
  <?php
279
  $count = 0;
280
+ if (isset($_REQUEST['__module']) && $_REQUEST['__module']== 'page') {
281
  unset($impCE->defCols['post_category']);
282
  unset($impCE->defCols['post_tag']);
283
  }
284
+ if (isset($_REQUEST['__module']) && $_REQUEST['__module'] != 'page') {
285
  unset($impCE->defCols['menu_order']);
286
  }
287
  ?>
288
+ <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>CSV ROW</b> </td><td></td></tr>
289
  <?php
290
  foreach ($impCE->headers as $key => $value)
291
  { ?>
364
  $mFieldsArr = substr($mFieldsArr, 0, -1);
365
  ?>
366
  </table>
367
+ <input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php if(isset($mFieldsArr)) { print_r($mFieldsArr); } ?>"/>
368
  <div>
369
  <div class="goto_import_options" align=center>
370
  <div class="mappingactions" >
386
  </div>
387
  </div>
388
  </div>
389
+ <?php } ?>
390
  </div>
391
  </form>
392
  </td>
395
  <td>
396
  <h3>Import Option Settings</h3>
397
  <!--<?php //echo $_POST['uploadedFile']; ?><?php //echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; die;?>-->
398
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'importoptions') { ?>
399
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
400
  <?php //$prevoptionindex='';?>
401
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php
404
  echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex'];
405
  }
406
  ?>"/>
407
+ <?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) { ?>
408
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
409
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
410
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
411
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
412
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
413
+ <input type='hidden' id='selectedImporter' name='selectedImporter' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['selectedImporter']; ?>' />
414
+ <?php } ?>
415
+ <?php if(isset($_POST)) { ?>
416
+ <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
417
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
418
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
419
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value='<?php echo $_POST['uploadedFile']; ?>' />
420
+ <?php } ?>
421
+ <input type='hidden' id='mappingArr' name='mappingArr' value='' />
422
  <!-- Import settings options -->
423
  <div class="postbox" id="options" style=" margin-bottom:0px;">
424
  <!-- <h4 class="hndle">Search settings</h4>-->
446
  </select><br>
447
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
448
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
449
+ <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect duplicate post content</label> <br>
450
+ <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect duplicate post title</label> <br>
451
+ How much import per server request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
452
  <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> per request.</span>
453
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
454
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
470
  <!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
471
  </div>
472
  </div>
473
+ <?php } ?>
474
  <!-- Code Ends Here-->
475
  </div>
476
  </td>
485
  </div>
486
  </div>
487
  <!-- Promotion footer for other useful plugins -->
488
+ <div class= "promobox" id="pluginpromo" style="width:99%;">
489
  <div class="accordion-group" >
490
  <div class="accordion-heading">
491
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL LINKS </a>
492
  </div>
493
  <div class="accordion-body in collapse">
494
  <div>
495
  <?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
496
+ <?php $impCE->common_footer(); ?>
497
  </div>
498
  </div>
499
  </div>
500
+ </div>
501
  </div>
modules/export/actions/actions.php CHANGED
@@ -1,25 +1,281 @@
1
  <?php
2
  /******************************
3
  * filename: modules/export/actions/actions.php
4
- * description:
5
  */
 
 
 
 
6
 
7
- class ExportActions extends SkinnyActions {
8
-
9
- public function __construct()
10
- {
11
- }
12
-
13
- /**
14
- * The actions index method
15
- * @param array $request
16
- * @return array
17
- */
18
- public function executeIndex($request)
19
- {
20
- // return an array of name value pairs to send data to the template
21
- $data = array();
22
- return $data;
23
- }
24
-
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /******************************
3
  * filename: modules/export/actions/actions.php
4
+ * description: export datas
5
  */
6
+ class ExportActions extends SkinnyActions
7
+ {
8
+ public function __construct()
9
+ {
10
 
11
+ }
12
+
13
+ /**
14
+ * The actions index method
15
+ * @param array $request
16
+ * @return array
17
+ */
18
+ public function executeIndex($request)
19
+ {
20
+ // return an array of name value pairs to send data to the template
21
+ $data = array();
22
+ if(!empty($request['POST']))
23
+ {
24
+ $type = $request['POST']['export'];
25
+ $filename = $request['POST']['export_filename'];
26
+ if(!empty($type) && !empty($filename))
27
+ {
28
+ $helper = new ultimatecsv_include_helper();
29
+ $helper->generateanddownloadcsv($type, $filename);
30
+ }
31
+ }
32
+ return $data;
33
+ }
34
+
35
+ public function executeExport($request)
36
+ {
37
+ $data = array();
38
+ ob_start();
39
+ global $wpdb;
40
+ $Header = $PostData = $PostMetaData = $TermsData = $ExportData = array();
41
+ $exporttype = $request['POST']['export'];
42
+ $export_filename = $request['POST']['export_filename'];
43
+ if($export_filename)
44
+ $csv_file_name = $export_filename.'.csv';
45
+ else
46
+ $csv_file_name='exportas_'.$exporttype.'_'.date("Y-m-d").'.csv';;
47
+
48
+ if($exporttypei == 'post' || $exporttype == 'page')
49
+ {
50
+ $header_query1 = "SELECT wp.* FROM $wpdb->posts wp where post_type = '$exporttype'";
51
+ $header_query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') and meta_key NOT LIKE 'field_%'";
52
+ $result_header_query1 = $wpdb->get_results($header_query1);
53
+ $result_header_query2 = $wpdb->get_results($header_query2);
54
+
55
+ foreach ($result_header_query1 as $rhq1_key) {
56
+ foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
57
+ if (!in_array($rhq1_headkey, $Header))
58
+ $Header[] = $rhq1_headkey;
59
+ }
60
+ }
61
+
62
+ foreach ($result_header_query2 as $rhq2_headkey) {
63
+ if (!in_array($rhq2_headkey->meta_key, $Header)) {
64
+ if ($rhq2_headkey->meta_key != '_eshop_product' && $rhq2_headkey->meta_key != '_wp_attached_file')
65
+ $Header[] = $rhq2_headkey->meta_key;
66
+ }
67
+ }
68
+
69
+ $Header[] = 'post_tag';
70
+ $Header[] = 'featured_image';
71
+ $Header[] = 'post_category';
72
+ // Code for ACF fields
73
+ $limit = ( int ) apply_filters ( 'postmeta_form_limit', 30 );
74
+ $get_acf_fields = $wpdb->get_col ( "SELECT meta_value FROM $wpdb->postmeta
75
+ GROUP BY meta_key
76
+ HAVING meta_key LIKE 'field_%'
77
+ ORDER BY meta_key
78
+ LIMIT $limit" );
79
+
80
+ foreach ( $get_acf_fields as $acf_value ){
81
+ $get_acf_field = unserialize($acf_value);
82
+ $acf_fields[$get_acf_field['name']] = "CF: ".$get_acf_field['name'];
83
+ $acf_fields_slug[$get_acf_field['name']] = "_".$get_acf_field['name'];
84
+ if(in_array("_".$get_acf_field['name'],$Header)){
85
+ $Header = array_diff($Header,$acf_fields_slug);
86
+ }
87
+ if($get_acf_field['type'] == 'checkbox'){
88
+ $checkbox_option_fields[] = $get_acf_field['name'];
89
+ }
90
+ } // Code ends here
91
+ $get_post_ids = "select DISTINCT ID from $wpdb->posts where post_type = '$exporttype' and post_status in ('publish','draft','future','private','pending')";
92
+
93
+ $result = $wpdb->get_col($get_post_ids);
94
+ $fieldsCount = count($result);
95
+ if ($result) {
96
+ foreach ($result as $postID) {
97
+ $pId = $pId . ',' . $postID;
98
+ $query1 = "SELECT wp.* FROM $wpdb->posts wp where ID=$postID";
99
+ $result_query1 = $wpdb->get_results($query1);
100
+ if (!empty($result_query1)) {
101
+ foreach ($result_query1 as $posts) {
102
+ foreach ($posts as $post_key => $post_value) {
103
+ if ($post_key == 'post_status') {
104
+ if (is_sticky($postID)) {
105
+ $PostData[$postID][$post_key] = 'Sticky';
106
+ $post_status = 'Sticky';
107
+ } else {
108
+ $PostData[$postID][$post_key] = $post_value;
109
+ $post_status = $post_value;
110
+ }
111
+ } else {
112
+ $PostData[$postID][$post_key] = $post_value;
113
+ }
114
+ if ($post_key == 'post_password') {
115
+ if ($post_value) {
116
+ $PostData[$postID]['post_status'] = "{" . $post_value . "}";
117
+ } else {
118
+ $PostData[$postID]['post_status'] = $post_status;
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ $query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') AND ID=$postID";
125
+ $result_query2 = $wpdb->get_results($query2);
126
+ if (!empty($result_query2)) {
127
+ foreach ($result_query2 as $postmeta) {
128
+ if ($postmeta->meta_key != '_eshop_product' && $postmeta->meta_key != '_thumbnail_id') {
129
+ if(is_array($acf_fields_slug) && !in_array($postmeta->meta_key,$acf_fields_slug))
130
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
131
+ }
132
+ $eshop_products = $postmeta->meta_value;
133
+ if ($postmeta->meta_key == 'products') {
134
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
135
+ $eshop_products = unserialize($eshop_products);
136
+ foreach ($eshop_products as $key) {
137
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key['option'] . '|' . $key['price'] . '|' . $key['saleprice'] . ',';
138
+ }
139
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
140
+ }
141
+ if ($postmeta->meta_key == '_thumbnail_id') {
142
+ $attachment_file = '';
143
+ $get_attachement = "select guid from $wpdb->posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
144
+ $attachment = $wpdb->get_results($get_attachement);
145
+ $attachment_file = $attachment[0]->guid;
146
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
147
+ $postmeta->meta_key = 'featured_image';
148
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
149
+ }
150
+ if(is_array($checkbox_option_fields) && in_array($postmeta->meta_key,$checkbox_option_fields)){
151
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
152
+ $eshop_products = unserialize($eshop_products); //print_r($eshop_products);
153
+ foreach ($eshop_products as $key) {
154
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key . ',';
155
+ }
156
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
157
+ }
158
+ }
159
+
160
+ }
161
+ // Tags & Categories
162
+ $get_tags = wp_get_post_tags($postID, array('fields' => 'names'));
163
+ $postTags = $postCategory = '';
164
+ foreach ($get_tags as $tags) {
165
+ $postTags .= $tags . ',';
166
+ }
167
+ $postTags = substr($postTags, 0, -1);
168
+ $TermsData[$postID]['post_tag'] = $postTags;
169
+ $get_categotries = wp_get_post_categories($postID, array('fields' => 'names'));
170
+ foreach ($get_categotries as $category) {
171
+ $postCategory .= $category . '|';
172
+ }
173
+ $postCategory = substr($postCategory, 0, -1);
174
+ $TermsData[$postID]['post_category'] = $postCategory;
175
+ }
176
+ $ExportData = array();
177
+ // Merge all arrays
178
+ foreach ($PostData as $pd_key => $pd_val) {
179
+ if (array_key_exists($pd_key, $PostMetaData)) {
180
+ $ExportData[$pd_key] = array_merge($PostData[$pd_key], $PostMetaData[$pd_key]);
181
+ } else {
182
+ $ExportData[$pd_key] = $PostData[$pd_key];
183
+ }
184
+ if (array_key_exists($pd_key, $TermsData)) {
185
+ if (empty($ExportData[$pd_key]))
186
+ $ExportData[$pd_key] = array();
187
+ $ExportData[$pd_key] = array_merge($ExportData[$pd_key], $TermsData[$pd_key]);
188
+ }
189
+ }
190
+
191
+ foreach ($Header as $header_key) {
192
+ foreach ($ExportData as $ED_key) {
193
+ if (array_key_exists($header_key, $ED_key))
194
+ $CSVContent[$header_key][] = $ED_key[$header_key];
195
+ else
196
+ $CSVContent[$header_key][] = '';
197
+ }
198
+ }
199
+ }
200
+
201
+ # GENERATE AS CSV
202
+ for ($j = 0; $j < $fieldsCount; $j++) {
203
+ foreach ($Header as $value) {
204
+ $CSVDATA[$j] .= '"' . $CSVContent[$value][$j] . '",';
205
+ }
206
+ }
207
+
208
+ foreach ($Header as $csv_header) {
209
+ if ($csv_header == '_eshop_stock')
210
+ $csv_header = 'stock_available';
211
+ if ($csv_header == 'cart_radio')
212
+ $csv_header = 'cart_option';
213
+ if ($csv_header == 'sale')
214
+ $csv_header = 'product_in_sale';
215
+ if ($csv_header == 'featured')
216
+ $csv_header = 'featured_product';
217
+ if ($csv_header == 'sku' || $csv_header == '_wpsc_sku')
218
+ $csv_header = 'SKU';
219
+ if ($csv_header == '_aioseop_keywords')
220
+ $csv_header = 'seo_keywords';
221
+ if ($csv_header == '_aioseop_description')
222
+ $csv_header = 'seo_description';
223
+ if ($csv_header == '_aioseop_title')
224
+ $csv_header = 'seo_title';
225
+ if ($csv_header == '_aioseop_noindex')
226
+ $csv_header = 'seo_noindex';
227
+ if ($csv_header == '_aioseop_nofollow')
228
+ $csv_header = 'seo_nofollow';
229
+ if ($csv_header == '_aioseop_disable')
230
+ $csv_header = 'seo_disable';
231
+ if ($csv_header == '_aioseop_disable_analytics')
232
+ $csv_header = 'seo_disable_analytics';
233
+ if ($csv_header == '_yoast_wpseo_focuskw')
234
+ $csv_header = 'focus_keyword';
235
+ if ($csv_header == '_yoast_wpseo_title')
236
+ $csv_header = 'title';
237
+ if ($csv_header == '_yoast_wpseo_metadesc')
238
+ $csv_header = 'meta_desc';
239
+ if ($csv_header == '_yoast_wpseo_meta-robots-noindex')
240
+ $csv_header = 'meta-robots-noindex';
241
+ if ($csv_header == '_yoast_wpseo_meta-robots-nofollow')
242
+ $csv_header = 'meta-robots-nofollow';
243
+ if ($csv_header == '_yoast_wpseo_meta-robots-adv')
244
+ $csv_header = 'meta-robots-adv';
245
+ if ($csv_header == '_yoast_wpseo_sitemap-include')
246
+ $csv_header = 'sitemap-include';
247
+ if ($csv_header == '_yoast_wpseo_sitemap-prio')
248
+ $csv_header = 'sitemap-prio';
249
+ if ($csv_header == '_yoast_wpseo_canonical')
250
+ $csv_header = 'canonical';
251
+ if ($csv_header == '_yoast_wpseo_redirect')
252
+ $csv_header = 'redirect';
253
+ if ($csv_header == '_yoast_wpseo_opengraph-description')
254
+ $csv_header = 'opengraph-description';
255
+ if ($csv_header == '_yoast_wpseo_google-plus-description')
256
+ $csv_header = 'google-plus-description';
257
+ if (array_key_exists($csv_header,$acf_fields))
258
+ $csv_header = $acf_fields[$csv_header];
259
+
260
+ $CSV_FILE_CONTENT .= $csv_header . ",";
261
+ }
262
+
263
+ $CSV_FILE_CONTENT = substr($CSV_FILE_CONTENT, 0, -1);
264
+ $CSV_FILE_CONTENT .= "\n";
265
+ if ($CSVDATA) {
266
+ foreach ($CSVDATA as $csv_content) {
267
+ $csv_content = substr($csv_content, 0, -1);
268
+ $CSV_FILE_CONTENT .= $csv_content . "\n";
269
+ }
270
+ }
271
+ }
272
+ header("Content-type: text/x-csv"); # DECLARING FILE TYPE
273
+ header("Content-Transfer-Encoding: binary");
274
+ header("Content-Disposition: attachment; filename=" . $csv_file_name); # EXPORT GENERATED CSV FILE
275
+ header("Pragma: no-cache");
276
+ header("Expires: 0");
277
+ print($CSV_FILE_CONTENT);
278
+ die;
279
+ return $data;
280
+ }
281
+ }
modules/export/templates/export.php ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once('../../../../../../wp-load.php');
3
+ global $wpdb;
4
+ $Header = $PostData = $PostMetaData = $TermsData = $ExportData = array();
5
+ $checkbox_option_fields=$CSVDATA=array();
6
+ $acf_fields_slug = array();
7
+ $acf_fields = array();
8
+ $CSV_FILE_CONTENT=$pId='';
9
+ $exporttype = $_POST['export'];
10
+ $wpcsvsettings=get_option('wpcsvfreesettings');
11
+ $export_delimiter = $wpcsvsettings['export_delimiter'];
12
+ //$contenturl = 'http://localhost/newwordpress/wp/wp-content';
13
+ // Header fields
14
+ //$PostMetaData[]['products_option']= '';
15
+ if($_POST['export_filename'])
16
+ $csv_file_name =$_POST['export_filename'].'.csv';
17
+ else
18
+ $csv_file_name='exportas_'.date("Y").'-'.date("m").'-'.date("d").'.csv';//$exporttype.'.csv';
19
+ $wptypesfields = get_option('wpcf-fields');
20
+ #print('<pre>'); print_r($wptypesfields); print('</pre>'); #die;
21
+ function get_types_values($value){
22
+ return true;
23
+ }
24
+ if($exporttype=='post' || $exporttype=='page' || $exporttype=='custompost')
25
+ {
26
+ if($exporttype == 'custompost') {
27
+ $exporttype = $_POST['export_post_type'];
28
+ }
29
+ $header_query1 = "SELECT wp.* FROM $wpdb->posts wp where post_type = '$exporttype'";
30
+ $header_query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') and meta_key NOT LIKE 'field_%' and meta_key NOT LIKE '_wp_types%'";
31
+ $result_header_query1 = $wpdb->get_results($header_query1);
32
+ $result_header_query2 = $wpdb->get_results($header_query2);
33
+
34
+ foreach ($result_header_query1 as $rhq1_key) {
35
+ foreach ($rhq1_key as $rhq1_headkey => $rhq1_headval) {
36
+ if (!in_array($rhq1_headkey, $Header))
37
+ $Header[] = $rhq1_headkey;
38
+ }
39
+ }
40
+
41
+ foreach ($result_header_query2 as $rhq2_headkey) {
42
+ if (!in_array($rhq2_headkey->meta_key, $Header)) {
43
+ if ($rhq2_headkey->meta_key != '_eshop_product' && $rhq2_headkey->meta_key != '_wp_attached_file')
44
+ $Header[] = $rhq2_headkey->meta_key;
45
+ }
46
+ }
47
+
48
+ $Header[] = 'post_tag';
49
+ $Header[] = 'featured_image';
50
+ $Header[] = 'post_category';
51
+ // Code for ACF fields
52
+ $limit = ( int ) apply_filters ( 'postmeta_form_limit', 30 );
53
+ $get_acf_fields = $wpdb->get_col ( "SELECT meta_value FROM $wpdb->postmeta
54
+ GROUP BY meta_key
55
+ HAVING meta_key LIKE 'field_%'
56
+ ORDER BY meta_key
57
+ LIMIT $limit" );
58
+
59
+ foreach ( $get_acf_fields as $acf_value ){
60
+ $get_acf_field = unserialize($acf_value);
61
+ $acf_fields[$get_acf_field['name']] = "CF: ".$get_acf_field['name'];
62
+ $acf_fields_slug[$get_acf_field['name']] = "_".$get_acf_field['name'];
63
+ if(in_array("_".$get_acf_field['name'],$Header)){
64
+ $Header = array_diff($Header,$acf_fields_slug);
65
+ }
66
+ if($get_acf_field['type'] == 'checkbox'){
67
+ $checkbox_option_fields[] = $get_acf_field['name'];
68
+ }
69
+ } // Code ends here
70
+ $get_post_ids = "select DISTINCT ID from $wpdb->posts where post_type = '$exporttype' and post_status in ('publish','draft','future','private','pending')";
71
+
72
+ $result = $wpdb->get_col($get_post_ids);
73
+ $fieldsCount = count($result);
74
+ // $pId='';
75
+ if ($result) {
76
+ foreach ($result as $postID) {
77
+ $pId = $pId . ',' . $postID;
78
+ $query1 = "SELECT wp.* FROM $wpdb->posts wp where ID=$postID";
79
+ $result_query1 = $wpdb->get_results($query1);
80
+ if (!empty($result_query1)) {
81
+ foreach ($result_query1 as $posts) {
82
+ foreach ($posts as $post_key => $post_value) {
83
+ if ($post_key == 'post_status') {
84
+ if (is_sticky($postID)) {
85
+ $PostData[$postID][$post_key] = 'Sticky';
86
+ $post_status = 'Sticky';
87
+ } else {
88
+ $PostData[$postID][$post_key] = $post_value;
89
+ $post_status = $post_value;
90
+ }
91
+ } else {
92
+ $PostData[$postID][$post_key] = $post_value;
93
+ }
94
+ if ($post_key == 'post_password') {
95
+ if ($post_value) {
96
+ $PostData[$postID]['post_status'] = "{" . $post_value . "}";
97
+ } else {
98
+ $PostData[$postID]['post_status'] = $post_status;
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ $query2 = "SELECT post_id, meta_key, meta_value FROM $wpdb->posts wp JOIN $wpdb->postmeta wpm ON wpm.post_id = wp.ID where meta_key NOT IN ('_edit_lock','_edit_last') AND ID=$postID";
105
+ $result_query2 = $wpdb->get_results($query2);
106
+ $possible_values = array('s:', 'a:', ':{');
107
+ if (!empty($result_query2)) {
108
+ foreach ($result_query2 as $postmeta) {
109
+ $typesFserialized = 0;
110
+ $isFound = explode('wpcf-',$postmeta->meta_key);
111
+ if(count($isFound) == 2){
112
+ foreach($wptypesfields as $typesKey => $typesVal){
113
+ if($postmeta->meta_key == 'wpcf-'.$typesKey){
114
+ foreach($possible_values as $posval){
115
+ if(strpos($postmeta->meta_value,$posval)){
116
+ $typesFserialized = 1;
117
+ } else {
118
+ $typesFserialized = 0;
119
+ }
120
+ }
121
+ if($typesFserialized == 1){
122
+ $getMetaData = get_post_meta($postID, $postmeta->meta_key);
123
+ if(!is_array($getMetaData[0])){
124
+ $get_all_values = unserialize($getMetaData[0]);
125
+ $get_values = $get_all_values[0];
126
+ } else {
127
+ $get_values = $getMetaData[0];
128
+ }
129
+ $typesFVal = null;
130
+ if($typesVal['type'] == 'checkboxes'){
131
+ foreach($get_values as $authorKey => $authorVal) {
132
+ foreach($typesVal['data']['options'] as $doKey => $doVal){
133
+ if($doKey == $authorKey)
134
+ $typesFVal .= $doVal['title'].',';
135
+ }
136
+ }
137
+ $typesFVal = substr($typesFVal, 0, -1);
138
+ } elseif($typesVal['type'] == 'skype') {
139
+ $typesFVal = $get_values['skypename'];
140
+ }
141
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $typesFVal;
142
+ } else {
143
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
144
+ }
145
+ }
146
+ }
147
+ } else {
148
+ if ($postmeta->meta_key != '_eshop_product' && $postmeta->meta_key != '_thumbnail_id') {
149
+ if(is_array($acf_fields_slug) && !in_array($postmeta->meta_key,$acf_fields_slug))
150
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $postmeta->meta_value;
151
+ }
152
+ $eshop_products = $postmeta->meta_value;
153
+ if ($postmeta->meta_key == 'products') {
154
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
155
+ $eshop_products = unserialize($eshop_products);
156
+ foreach ($eshop_products as $key) {
157
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key['option'] . '|' . $key['price'] . '|' . $key['saleprice'] . ',';
158
+ }
159
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
160
+ }
161
+ if ($postmeta->meta_key == '_thumbnail_id') {
162
+ $attachment_file = '';
163
+ $get_attachement = "select guid from $wpdb->posts where ID = $postmeta->meta_value AND post_type = 'attachment'";
164
+ $attachment = $wpdb->get_results($get_attachement);
165
+ $attachment_file = $attachment[0]->guid;
166
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
167
+ $postmeta->meta_key = 'featured_image';
168
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = $attachment_file;
169
+ }
170
+ if(is_array($checkbox_option_fields) && in_array($postmeta->meta_key,$checkbox_option_fields)){
171
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = '';
172
+ $eshop_products = unserialize($eshop_products); //print_r($eshop_products);
173
+ foreach ($eshop_products as $key) {
174
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] .= $key . ',';
175
+ }
176
+ $PostMetaData[$postmeta->post_id][$postmeta->meta_key] = substr($PostMetaData[$postmeta->post_id][$postmeta->meta_key], 0, -1);
177
+ }
178
+ }
179
+ }
180
+ }
181
+ #print('<pre>'); print_r($PostMetaData); die;
182
+ // Tags & Categories
183
+ $get_tags = wp_get_post_tags($postID, array('fields' => 'names'));
184
+ $postTags = $postCategory = '';
185
+ foreach ($get_tags as $tags) {
186
+ $postTags .= $tags . ',';
187
+ }
188
+ $postTags = substr($postTags, 0, -1);
189
+ $TermsData[$postID]['post_tag'] = $postTags;
190
+ $get_categotries = wp_get_post_categories($postID, array('fields' => 'names'));
191
+ foreach ($get_categotries as $category) {
192
+ $postCategory .= $category . '|';
193
+ }
194
+ $postCategory = substr($postCategory, 0, -1);
195
+ $TermsData[$postID]['post_category'] = $postCategory;
196
+ }
197
+ $ExportData = array();
198
+ // Merge all arrays
199
+ foreach ($PostData as $pd_key => $pd_val) {
200
+ if (array_key_exists($pd_key, $PostMetaData)) {
201
+ $ExportData[$pd_key] = array_merge($PostData[$pd_key], $PostMetaData[$pd_key]);
202
+ } else {
203
+ $ExportData[$pd_key] = $PostData[$pd_key];
204
+ }
205
+ if (array_key_exists($pd_key, $TermsData)) {
206
+ if (empty($ExportData[$pd_key]))
207
+ $ExportData[$pd_key] = array();
208
+ $ExportData[$pd_key] = array_merge($ExportData[$pd_key], $TermsData[$pd_key]);
209
+ }
210
+ }
211
+
212
+ foreach ($Header as $header_key) {
213
+ foreach ($ExportData as $ED_key) {
214
+ if (array_key_exists($header_key, $ED_key))
215
+ $CSVContent[$header_key][] = $ED_key[$header_key];
216
+ else
217
+ $CSVContent[$header_key][] = '';
218
+ }
219
+ }
220
+ }
221
+ //print '<pre>';print_r($CSVContent);die;
222
+ # GENERATE AS CSV
223
+ //if ($_POST['export_file_name'] != '') {
224
+ // $csv_file_name = $_POST['export_file_name'] . '.csv';
225
+ //} else {
226
+ //if(!$_POST['export_filename'])
227
+ //$csv_file_name =$_POST['export_filename'];//$exporttype.'.csv';
228
+
229
+
230
+ //}
231
+ for ($j = 0; $j < $fieldsCount; $j++) {
232
+ foreach ($Header as $value) {
233
+ if ( ! isset($CSVDATA[$j])) {
234
+ $CSVDATA[$j] = null;
235
+ }
236
+ $CSVDATA[$j] .= '"' . $CSVContent[$value][$j] . '"' .$export_delimiter;
237
+ }
238
+ }
239
+ //print '<pre>';print_r($CSVDATA);die;
240
+
241
+ foreach ($Header as $csv_header) {
242
+ if ($csv_header == '_eshop_stock')
243
+ $csv_header = 'stock_available';
244
+ if ($csv_header == 'cart_radio')
245
+ $csv_header = 'cart_option';
246
+ if ($csv_header == 'sale')
247
+ $csv_header = 'product_in_sale';
248
+ if ($csv_header == 'featured')
249
+ $csv_header = 'featured_product';
250
+ if ($csv_header == 'sku' || $csv_header == '_wpsc_sku')
251
+ $csv_header = 'SKU';
252
+ if ($csv_header == '_aioseop_keywords')
253
+ $csv_header = 'seo_keywords';
254
+ if ($csv_header == '_aioseop_description')
255
+ $csv_header = 'seo_description';
256
+ if ($csv_header == '_aioseop_title')
257
+ $csv_header = 'seo_title';
258
+ if ($csv_header == '_aioseop_noindex')
259
+ $csv_header = 'seo_noindex';
260
+ if ($csv_header == '_aioseop_nofollow')
261
+ $csv_header = 'seo_nofollow';
262
+ if ($csv_header == '_aioseop_disable')
263
+ $csv_header = 'seo_disable';
264
+ if ($csv_header == '_aioseop_disable_analytics')
265
+ $csv_header = 'seo_disable_analytics';
266
+ if ($csv_header == '_yoast_wpseo_focuskw')
267
+ $csv_header = 'focus_keyword';
268
+ if ($csv_header == '_yoast_wpseo_title')
269
+ $csv_header = 'title';
270
+ if ($csv_header == '_yoast_wpseo_metadesc')
271
+ $csv_header = 'meta_desc';
272
+ if ($csv_header == '_yoast_wpseo_meta-robots-noindex')
273
+ $csv_header = 'meta-robots-noindex';
274
+ if ($csv_header == '_yoast_wpseo_meta-robots-nofollow')
275
+ $csv_header = 'meta-robots-nofollow';
276
+ if ($csv_header == '_yoast_wpseo_meta-robots-adv')
277
+ $csv_header = 'meta-robots-adv';
278
+ if ($csv_header == '_yoast_wpseo_sitemap-include')
279
+ $csv_header = 'sitemap-include';
280
+ if ($csv_header == '_yoast_wpseo_sitemap-prio')
281
+ $csv_header = 'sitemap-prio';
282
+ if ($csv_header == '_yoast_wpseo_canonical')
283
+ $csv_header = 'canonical';
284
+ if ($csv_header == '_yoast_wpseo_redirect')
285
+ $csv_header = 'redirect';
286
+ if ($csv_header == '_yoast_wpseo_opengraph-description')
287
+ $csv_header = 'opengraph-description';
288
+ if ($csv_header == '_yoast_wpseo_google-plus-description')
289
+ $csv_header = 'google-plus-description';
290
+ if (array_key_exists($csv_header,$acf_fields))
291
+ $csv_header = $acf_fields[$csv_header];
292
+
293
+ $CSV_FILE_CONTENT .= $csv_header . "$export_delimiter";
294
+ }
295
+
296
+ $CSV_FILE_CONTENT = substr($CSV_FILE_CONTENT, 0, -1);
297
+ $CSV_FILE_CONTENT .= "\n";
298
+ if ($CSVDATA) {
299
+ foreach ($CSVDATA as $csv_content) {
300
+ $csv_content = substr($csv_content, 0, -1);
301
+ $CSV_FILE_CONTENT .= $csv_content . "\n";
302
+ }
303
+ }
304
+ }
305
+ header("Content-type: text/x-csv"); # DECLARING FILE TYPE
306
+ header("Content-Transfer-Encoding: binary");
307
+ header("Content-Disposition: attachment; filename=" . $csv_file_name); # EXPORT GENERATED CSV FILE
308
+ header("Pragma: no-cache");
309
+ header("Expires: 0");
310
+ print($CSV_FILE_CONTENT);
311
+ ?>
modules/export/templates/index.php CHANGED
@@ -1,4 +1,45 @@
1
- <?php
2
- /* Put your code here */
3
- echo "<div align='center' style='width:100%;'> <p class='warnings' style='width:50%;text-align:center;color:red;'>This feature is only available in PRO!.</p></div>";
4
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div style="margin-top:30px;">
2
+ <div style="display:none;" id="ShowMsg"><p class="alert alert-warning" id="warning-msg"></p></div>
3
+ <form class="form-horizontal" method="post" name="exportmodule" action = "<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>modules/export/templates/export.php" onsubmit="return export_module();" >
4
+ <div class = 'form-group'> <div class = 'col-sm-3 export_action'> <label> <input type="radio" name="export" value="post"> Post </label> </div> </div>
5
+ <div class = 'form-group'> <div class = 'col-sm-3 export_action'> <label> <input type="radio" name="export" value="page"> Page </label> </div> </div>
6
+ <div class = 'form-group'> <div class = 'col-sm-3 export_action'> <label> <input type="radio" name="export" value="custompost"> Custom Post </label>
7
+ <select name="export_post_type">
8
+ <?php
9
+ foreach (get_post_types() as $key => $value) {
10
+ 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') && ($value != 'product') && ($value != 'product_variation') && ($value != 'shop_order') && ($value != 'shop_coupon') && ($value != 'acf')) {?>
11
+ <option id="<?php echo($value); ?>"> <?php echo($value);?> </option>
12
+ <?php
13
+ }
14
+ }
15
+ ?>
16
+ </select> </div>
17
+ </div> <div class = 'form-group'> <div class = 'col-sm-3 export_action'> <label > <input type='radio' name='export' value='eshop' id='eshop' onclick="export_check(this.value)"> Eshop <span class="mandatory">*</span></label> </div> </div>
18
+ <div class = 'form-group'> <div class = 'col-sm-3 export_action'> <label> <input type="radio" name="export" id='wpcommerce'value="wpcommerce" onclick="export_check(this.value)" > Wp-Commerce <span class="mandatory">*</span></label> </div> </div>
19
+ <div class = 'form-group'> <div class = 'col-sm-3 export_action'> <label> <input type="radio" name="export" id='woocommerce'value="woocommerce" onclick="export_check(this.value)"> Woo-Commerce <span class="mandatory">*</span></label> </div> </div>
20
+ <div class = 'form-group'> <div class = 'col-sm-3 export_action'> <label> <input type="radio" name="export" id='marketpress' value="marketpress" onclick="export_check(this.value)"> Marketpress <span class="mandatory">*</span></label> </div> </div>
21
+ <div class = 'form-group'>
22
+ <label class = 'col-sm-1 control-label'> File Name: </label>
23
+ <div class = 'col-sm-6'>
24
+ <input class = 'form-control' type = 'text' name = 'export_filename' id = 'export_filename' value = '' placeholder = "exportas_<?php echo (date("Y-m-d"));?>" size="18">
25
+ </div>
26
+ <div class = 'col-sm-3'> <input type = "submit" name = "exportbutton" value = "Export" class = 'btn btn-primary'> </div>
27
+ </form>
28
+ </div>
29
+ <div align=center style=''><label style="font-size:1.2em;">Note:- <span class="mandatory">*</span> Available in PRO version!</label></div>
30
+ <!-- Promotion footer for other useful plugins -->
31
+ <?php $impCE = new WPImporter_includes_helper(); ?>
32
+ <div class= "promobox" id="pluginpromo" style="width:99%;">
33
+ <div class="accordion-group" >
34
+ <div class="accordion-heading">
35
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL LINKS </a>
36
+ </div>
37
+ <div class="accordion-body in collapse">
38
+ <div>
39
+ <?php // $impCE->common_footer_for_other_plugin_promotions(); ?>
40
+ <?php $impCE->common_footer(); ?>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+
modules/page/templates/index.php CHANGED
@@ -28,12 +28,12 @@ $impCE = new WPImporter_includes_helper();
28
  <!-- The file input field used as target for the file upload widget -->
29
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
30
  <?php $uploadDir = wp_upload_dir(); ?>
31
- <input type="hidden" id="uploaddir" value="<?php echo $uploadDir['basedir']; ?>">
32
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
33
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
34
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
35
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
36
- <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php echo $_REQUEST['__module']; ?>' >
37
  <input id="fileupload" type="file" name="files[]" multiple>
38
  </span>
39
  <!-- The global progress bar -->
@@ -141,9 +141,11 @@ $impCE = new WPImporter_includes_helper();
141
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST['mydelimeter'];
142
  }
143
  $wpcsvsettings=array();
 
144
  $wpcsvsettings=get_option('wpcsvfreesettings');
145
  ?>
146
  <h3>Mapping Configuration</h3>
 
147
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
148
  <div class='mappingsection'>
149
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
@@ -182,6 +184,7 @@ $impCE = new WPImporter_includes_helper();
182
  $mFieldsArr='';
183
  $delimeter='';
184
  $filename='';
 
185
  if(isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != ''){
186
  $file_name = $_POST['uploadfilename'];
187
  $filename = $impCE->convert_string2hash_key($file_name);
@@ -207,38 +210,39 @@ $impCE = new WPImporter_includes_helper();
207
  <div align='center' style='float:right;'>
208
  <?php $cnt = count($impCE->defCols) + 2;
209
  $cnt1 = count($impCE->headers);
210
- $imploded_array = implode(',', $impCE->headers); ?>
211
- <input type = 'hidden' id = 'imploded_header' name = 'imploded_array' value = '<?php echo $imploded_array; ?>'>
212
- <input type="hidden" id="h1" name="h1" value="<?php echo $cnt; ?>"/>
213
- <input type="hidden" id="h2" name="h2" value="<?php echo $cnt1; ?>"/>
214
- <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php echo $_REQUEST['__module']; ?>"/>
 
215
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
216
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
217
  <input type='hidden' id='current_record' name='current_record' value='0' />
218
- <input type='hidden' id='totRecords' name='totRecords' value='<?php echo count($getrecords); ?>' />
219
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
220
- <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php echo $filename; ?>" />
221
  <!-- real uploaded filename -->
222
- <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php echo $uploaded_csv_name; ?>" />
223
- <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php echo $delimeter; ?>" />
224
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_REQUEST['step']; ?>' />
225
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
226
  <input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
227
- <label style="padding-right:10px;">Change the csv sample record value by rows</label>
228
  <input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
229
- Go To: <input type='text' id='goto_element' name='goto_element' />
230
- <input type='button' id='apply_element' name='apply_element' class="btn btn-success" value='Get Record' onclick='gotoelement(this.id);' />
231
  </div>
232
  </td>
233
  </tr>
234
  <?php
235
  $count = 0;
236
- if ($_REQUEST['__module'] == 'page') {
237
  unset($impCE->defCols['post_category']);
238
  unset($impCE->defCols['post_tag']);
239
  }
240
  ?>
241
- <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>SAMPLE VALUE</b> </td><td></td></tr>
242
  <?php
243
  foreach ($impCE->headers as $key => $value)
244
  { ?>
@@ -339,6 +343,7 @@ $impCE = new WPImporter_includes_helper();
339
  </div>
340
  </div>
341
  </div>
 
342
  </div>
343
  </form>
344
  </td>
@@ -347,6 +352,7 @@ $impCE = new WPImporter_includes_helper();
347
  <td>
348
  <h3>Import Option Settings</h3>
349
  <!--<?php //echo $_POST['uploadedFile']; ?><?php //echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; die;?>-->
 
350
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
351
  <?php //$prevoptionindex='';?>
352
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php
@@ -355,15 +361,20 @@ $impCE = new WPImporter_includes_helper();
355
  echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex'];
356
  }
357
  ?>"/>
 
358
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
359
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
360
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
361
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
362
- <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
 
 
 
 
363
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
364
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
365
- <input type='hidden' id='uploadedFile1' name='uploadedFile1' value='<?php echo $_POST['uploadedFile']; ?>' />
366
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
367
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
368
  <!-- Import settings options -->
369
  <div class="postbox" id="options" style=" margin-bottom:0px;">
@@ -392,10 +403,10 @@ $impCE = new WPImporter_includes_helper();
392
  </select><br>
393
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
394
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
395
- <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect Duplicate Post Content</label> <br>
396
- <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect Duplicate Post Title</label> <br>
397
- How much comparisons per Server-Request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
398
- <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> per request.</span>
399
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
400
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
401
  <input type="hidden" id="terminateaction" name="terminateaction" value="continue" />
@@ -416,6 +427,7 @@ $impCE = new WPImporter_includes_helper();
416
  <!--Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
417
  </div>
418
  </div>
 
419
  <!-- Code Ends Here-->
420
  </div>
421
  </td>
@@ -430,16 +442,17 @@ $impCE = new WPImporter_includes_helper();
430
  </div>
431
  </div>
432
  <!-- Promotion footer for other useful plugins -->
433
- <!-- <div class= "promobox" id="pluginpromo" style="width:99%;">
434
  <div class="accordion-group" >
435
  <div class="accordion-heading">
436
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL PLUGINS BY SMACKCODERS </a>
437
  </div>
438
  <div class="accordion-body in collapse">
439
  <div>
440
  <?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
 
441
  </div>
442
  </div>
443
  </div>
444
- </div> -->
445
  </div>
28
  <!-- The file input field used as target for the file upload widget -->
29
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
30
  <?php $uploadDir = wp_upload_dir(); ?>
31
+ <input type="hidden" id="uploaddir" value="<?php if(isset($uploadDir['basedir'])) { echo $uploadDir['basedir']; } ?>">
32
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
33
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
34
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
35
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
36
+ <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>' >
37
  <input id="fileupload" type="file" name="files[]" multiple>
38
  </span>
39
  <!-- The global progress bar -->
141
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST['mydelimeter'];
142
  }
143
  $wpcsvsettings=array();
144
+ $custom_key = array();
145
  $wpcsvsettings=get_option('wpcsvfreesettings');
146
  ?>
147
  <h3>Mapping Configuration</h3>
148
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'mapping_settings') { ?>
149
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
150
  <div class='mappingsection'>
151
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
184
  $mFieldsArr='';
185
  $delimeter='';
186
  $filename='';
187
+ $records = '';
188
  if(isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != ''){
189
  $file_name = $_POST['uploadfilename'];
190
  $filename = $impCE->convert_string2hash_key($file_name);
210
  <div align='center' style='float:right;'>
211
  <?php $cnt = count($impCE->defCols) + 2;
212
  $cnt1 = count($impCE->headers);
213
+ $records = count($getrecords);
214
+ $imploaded_array = implode(',', $impCE->headers); ?>
215
+ <input type = 'hidden' id = 'imploded_header' name = 'imploded_array' value = '<?php if(isset($imploaded_array)) { echo $imploaded_array; } ?>'>
216
+ <input type='hidden' id='h1' name='h1' value="<?php if(isset($cnt)) { echo $cnt; } ?>"/>
217
+ <input type='hidden' id='h2' name='h2' value="<?php if(isset($cnt1)) { echo $cnt1; } ?>"/>
218
+ <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>"/>
219
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
220
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
221
  <input type='hidden' id='current_record' name='current_record' value='0' />
222
+ <input type='hidden' id='totRecords' name='totRecords' value='<?php if(isset($records)) { echo $records; } ?>' />
223
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
224
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php if(isset($filename)) { echo $filename; } ?>" />
225
  <!-- real uploaded filename -->
226
+ <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php if(isset($uploaded_csv_name)) { echo $uploaded_csv_name; } ?>" />
227
+ <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php if(isset($delimeter)) { echo $delimeter; } ?>" />
228
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php if(isset($_REQUEST['step'])) { echo $_REQUEST['step']; } ?>' />
229
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
230
  <input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
231
+ <label style="padding-right:10px;">Change your csv row data</label>
232
  <input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
233
+ Go To Row #<input type='text' id='goto_element' name='goto_element' />
234
+ <input type='button' id='apply_element' name='apply_element' class="btn btn-success" value='Show' onclick='gotoelement(this.id);' />
235
  </div>
236
  </td>
237
  </tr>
238
  <?php
239
  $count = 0;
240
+ if (isset($_REQUEST['__module']) && $_REQUEST['__module'] == 'page') {
241
  unset($impCE->defCols['post_category']);
242
  unset($impCE->defCols['post_tag']);
243
  }
244
  ?>
245
+ <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>CSV ROW</b> </td><td></td></tr>
246
  <?php
247
  foreach ($impCE->headers as $key => $value)
248
  { ?>
343
  </div>
344
  </div>
345
  </div>
346
+ <?php } ?>
347
  </div>
348
  </form>
349
  </td>
352
  <td>
353
  <h3>Import Option Settings</h3>
354
  <!--<?php //echo $_POST['uploadedFile']; ?><?php //echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; die;?>-->
355
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'importoptions') { ?>
356
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
357
  <?php //$prevoptionindex='';?>
358
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php
361
  echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex'];
362
  }
363
  ?>"/>
364
+ <?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) { ?>
365
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
366
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
367
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
368
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
369
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
370
+ <input type='hidden' id='selectedImporter' name='selectedImporter' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['selectedImporter']; ?>' />
371
+ <?php } ?>
372
+ <?php if(isset($_POST)) { ?>
373
+ <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
374
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
375
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
376
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value='<?php echo $_POST['uploadedFile']; ?>' />
377
+ <?php } ?>
378
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
379
  <!-- Import settings options -->
380
  <div class="postbox" id="options" style=" margin-bottom:0px;">
403
  </select><br>
404
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
405
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
406
+ <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect duplicate post content</label> <br>
407
+ <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect duplicate post title</label> <br>
408
+ How much import per server request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
409
+ <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) { echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; } ?> per request.</span>
410
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
411
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
412
  <input type="hidden" id="terminateaction" name="terminateaction" value="continue" />
427
  <!--Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
428
  </div>
429
  </div>
430
+ <?php } ?>
431
  <!-- Code Ends Here-->
432
  </div>
433
  </td>
442
  </div>
443
  </div>
444
  <!-- Promotion footer for other useful plugins -->
445
+ <div class= "promobox" id="pluginpromo" style="width:99%;">
446
  <div class="accordion-group" >
447
  <div class="accordion-heading">
448
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL LINKS </a>
449
  </div>
450
  <div class="accordion-body in collapse">
451
  <div>
452
  <?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
453
+ <?php $impCE->common_footer(); ?>
454
  </div>
455
  </div>
456
  </div>
457
+ </div>
458
  </div>
modules/post/templates/index.php CHANGED
@@ -29,12 +29,12 @@ $impCE = new WPImporter_includes_helper();
29
  <!-- The file input field used as target for the file upload widget -->
30
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
31
  <?php $uploadDir = wp_upload_dir(); ?>
32
- <input type="hidden" id="uploaddir" value="<?php echo $uploadDir['basedir']; ?>">
33
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
34
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
35
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
36
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
37
- <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php echo $_REQUEST['__module']; ?>' >
38
  <input id="fileupload" type="file" name="files[]" multiple>
39
  </span>
40
  <!-- The global progress bar -->
@@ -140,13 +140,15 @@ $impCE = new WPImporter_includes_helper();
140
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST['mydelimeter'];
141
  }
142
  $wpcsvsettings=array();
 
143
  $wpcsvsettings=get_option('wpcsvfreesettings');
144
  ?>
145
  <h3>Mapping Configuration</h3>
 
146
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
147
  <div class='mappingsection'>
148
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
149
- <?php if($_REQUEST['__module']=='custompost'){ ?>
150
  <div class='importstatus' style='display:true;'>
151
  <input type="hidden" id="customposts" name="customposts" value="">
152
  <div style = 'float:left'> <label> Select Post Type </label> <span class="mandatory"> * </span> </div>
@@ -183,6 +185,7 @@ $impCE = new WPImporter_includes_helper();
183
  $delimeter='';
184
  $mappingFields_arr =array();
185
  $filename='';
 
186
  if(isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != ''){
187
  $file_name = $_POST['uploadfilename'];
188
  $filename = $impCE->convert_string2hash_key($file_name);
@@ -209,41 +212,42 @@ $impCE = new WPImporter_includes_helper();
209
  <div align='center' style='float:right;'>
210
  <?php $cnt = count($impCE->defCols) + 2;
211
  $cnt1 = count($impCE->headers);
212
- $imploded_array = implode(',', $impCE->headers); ?>
213
- <input type = 'hidden' id = 'imploded_header' name = 'imploded_array' value = '<?php echo $imploded_array; ?>'>
214
- <input type="hidden" id="h1" name="h1" value="<?php echo $cnt; ?>"/>
215
- <input type="hidden" id="h2" name="h2" value="<?php echo $cnt1; ?>"/>
216
- <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php echo $_REQUEST['__module']; ?>"/>
 
217
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
218
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
219
  <input type='hidden' id='current_record' name='current_record' value='0' />
220
- <input type='hidden' id='totRecords' name='totRecords' value='<?php echo count($getrecords); ?>' />
221
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
222
- <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php echo $filename; ?>" />
223
  <!-- real uploaded filename -->
224
- <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php echo $uploaded_csv_name; ?>" />
225
- <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php echo $delimeter; ?>" />
226
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_REQUEST['step']; ?>' />
227
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
228
  <input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
229
- <label style="padding-right:10px;">Change the csv sample record value by rows</label>
230
  <input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
231
- Go To: <input type='text' id='goto_element' name='goto_element' />
232
- <input type='button' id='apply_element' name='apply_element' class="btn btn-success" value='Get Record' onclick='gotoelement(this.id);' />
233
  </div>
234
  </td>
235
  </tr>
236
  <?php
237
  $count = 0;
238
- if ($_REQUEST['__module'] == 'page') {
239
  unset($impCE->defCols['post_category']);
240
  unset($impCE->defCols['post_tag']);
241
  }
242
- if ($_REQUEST['__module'] != 'page') {
243
  unset($impCE->defCols['menu_order']);
244
  }
245
  ?>
246
- <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>SAMPLE VALUE</b> </td><td></td></tr>
247
  <?php
248
  foreach ($impCE->headers as $key => $value)
249
  { ?>
@@ -323,7 +327,7 @@ $impCE = new WPImporter_includes_helper();
323
  $mFieldsArr = substr($mFieldsArr, 0, -1);
324
  ?>
325
  </table>
326
- <input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php print_r($mFieldsArr); ?>"/>
327
  <div>
328
  <div class="goto_import_options" align=center>
329
  <div class="mappingactions" >
@@ -345,6 +349,7 @@ $impCE = new WPImporter_includes_helper();
345
  </div>
346
  </div>
347
  </div>
 
348
  </div>
349
  </form>
350
  </td>
@@ -352,7 +357,7 @@ $impCE = new WPImporter_includes_helper();
352
  <tr>
353
  <td>
354
  <h3>Import Option Settings</h3>
355
- <!--<?php //echo $_POST['uploadedFile']; ?><?php //echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; die;?>-->
356
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
357
  <?php //$prevoptionindex='';?>
358
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php
@@ -361,16 +366,21 @@ $impCE = new WPImporter_includes_helper();
361
  echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex'];
362
  }
363
  ?>"/>
 
364
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
365
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
366
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
367
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
368
- <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
 
 
 
 
369
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
370
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
371
- <input type='hidden' id='uploadedFile1' name='uploadedFile1' value='<?php echo $_POST['uploadedFile']; ?>' />
372
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
373
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
 
374
  <!-- Import settings options -->
375
  <div class="postbox" id="options" style=" margin-bottom:0px;">
376
  <!-- <h4 class="hndle">Search settings</h4>-->
@@ -398,10 +408,10 @@ $impCE = new WPImporter_includes_helper();
398
  </select><br>
399
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
400
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
401
- <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect Duplicate Post Content</label> <br>
402
- <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect Duplicate Post Title</label> <br>
403
- How much comparisons per Server-Request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
404
- <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> per request.</span>
405
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
406
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
407
  <input type="hidden" id="terminateaction" name="terminateaction" value="continue" />
@@ -411,7 +421,7 @@ $impCE = new WPImporter_includes_helper();
411
  </li>-->
412
  </ul>
413
  <!-- <input id="goto_back" name="goto_back" class="btn btn-warning" type="button" value="<< Back" onclick="gotoback();" /> -->
414
- <input id="startbutton" class="btn btn-primary" type="button" value="Import Now" style="color: #ffffff;background:#2E9AFE;" onclick="importRecordsbySettings();" >
415
  <input id="terminatenow" class="btn btn-danger btn-sm" type="button" value="Terminate Now" style="" onclick="terminateProcess();" />
416
  <input class="btn btn-warning" type="button" value="Import Again" id="importagain" style="display:none" onclick="import_again();" />
417
  <!--<input id="continuebutton" class="button" type="button" value="Continue old search" style="color: #ffffff;background:#2E9AFE;">-->
@@ -423,6 +433,7 @@ $impCE = new WPImporter_includes_helper();
423
  <!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
424
  </div>
425
  </div>
 
426
  <!-- Code Ends Here-->
427
  </div>
428
  </td>
@@ -437,16 +448,17 @@ $impCE = new WPImporter_includes_helper();
437
  </div>
438
  </div>
439
  <!-- Promotion footer for other useful plugins -->
440
- <!--<div class= "promobox" id="pluginpromo" style="width:99%;">
441
  <div class="accordion-group" >
442
  <div class="accordion-heading">
443
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL PLUGINS BY SMACKCODERS </a>
444
  </div>
445
  <div class="accordion-body in collapse">
446
  <div>
447
  <?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
 
 
448
  </div>
449
  </div>
450
  </div>
451
- </div>-->
452
  </div>
29
  <!-- The file input field used as target for the file upload widget -->
30
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
31
  <?php $uploadDir = wp_upload_dir(); ?>
32
+ <input type="hidden" id="uploaddir" value="<?php if(isset($uploadDir)) { echo $uploadDir['basedir']; } ?>">
33
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
34
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
35
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
36
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
37
+ <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>' >
38
  <input id="fileupload" type="file" name="files[]" multiple>
39
  </span>
40
  <!-- The global progress bar -->
140
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST['mydelimeter'];
141
  }
142
  $wpcsvsettings=array();
143
+ $custom_key = array();
144
  $wpcsvsettings=get_option('wpcsvfreesettings');
145
  ?>
146
  <h3>Mapping Configuration</h3>
147
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'mapping_settings') { ?>
148
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
149
  <div class='mappingsection'>
150
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
151
+ <?php if(isset($_REQUEST['__module']) && $_REQUEST['__module']=='custompost'){ ?>
152
  <div class='importstatus' style='display:true;'>
153
  <input type="hidden" id="customposts" name="customposts" value="">
154
  <div style = 'float:left'> <label> Select Post Type </label> <span class="mandatory"> * </span> </div>
185
  $delimeter='';
186
  $mappingFields_arr =array();
187
  $filename='';
188
+ $records = '';
189
  if(isset($_POST['uploadfilename']) && $_POST['uploadfilename'] != ''){
190
  $file_name = $_POST['uploadfilename'];
191
  $filename = $impCE->convert_string2hash_key($file_name);
212
  <div align='center' style='float:right;'>
213
  <?php $cnt = count($impCE->defCols) + 2;
214
  $cnt1 = count($impCE->headers);
215
+ $records = count($getrecords);
216
+ $imploaded_array = implode(',', $impCE->headers); ?>
217
+ <input type = 'hidden' id = 'imploded_header' name = 'imploded_array' value = '<?php if(isset($imploaded_array)) { echo $imploaded_array; } ?>'>
218
+ <input type='hidden' id='h1' name='h1' value="<?php if(isset($cnt)) { echo $cnt; } ?>"/>
219
+ <input type='hidden' id='h2' name='h2' value="<?php if(isset($cnt1)) { echo $cnt1; } ?>"/>
220
+ <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>"/>
221
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
222
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
223
  <input type='hidden' id='current_record' name='current_record' value='0' />
224
+ <input type='hidden' id='totRecords' name='totRecords' value='<?php if(isset($records)) { echo $records; } ?>' />
225
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
226
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php if(isset($filename)) { echo $filename; } ?>" />
227
  <!-- real uploaded filename -->
228
+ <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php if(isset($uploaded_csv_name)) { echo $uploaded_csv_name; } ?>" />
229
+ <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php if(isset($delimeter)) { echo $delimeter; } ?>" />
230
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php if(isset($_REQUEST['step'])){ echo $_REQUEST['step']; } ?>' />
231
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
232
  <input type='button' id='prev_record' name='prev_record' class="btn btn-primary" value='<<' onclick='gotoelement(this.id);' />
233
+ <label style="padding-right:10px;">Change your csv row data</label>
234
  <input type='button' id='next_record' name='next_record' class="btn btn-primary" value='>>' onclick='gotoelement(this.id);' />
235
+ Go To Row #<input type='text' id='goto_element' name='goto_element' />
236
+ <input type='button' id='apply_element' name='apply_element' class="btn btn-success" value='Show' onclick='gotoelement(this.id);' />
237
  </div>
238
  </td>
239
  </tr>
240
  <?php
241
  $count = 0;
242
+ if (isset($_REQUEST['__module']) && $_REQUEST['__module'] == 'page') {
243
  unset($impCE->defCols['post_category']);
244
  unset($impCE->defCols['post_tag']);
245
  }
246
+ if (isset($_REQUEST['__module']) && $_REQUEST['__module'] != 'page') {
247
  unset($impCE->defCols['menu_order']);
248
  }
249
  ?>
250
+ <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>CSV ROW</b> </td><td></td></tr>
251
  <?php
252
  foreach ($impCE->headers as $key => $value)
253
  { ?>
327
  $mFieldsArr = substr($mFieldsArr, 0, -1);
328
  ?>
329
  </table>
330
+ <input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php if(isset($mFieldsArr)) { print_r($mFieldsArr); } ?>"/>
331
  <div>
332
  <div class="goto_import_options" align=center>
333
  <div class="mappingactions" >
349
  </div>
350
  </div>
351
  </div>
352
+ <?php } ?>
353
  </div>
354
  </form>
355
  </td>
357
  <tr>
358
  <td>
359
  <h3>Import Option Settings</h3>
360
+ <!--<?php //echo $_POST['uploadedFile']; ?><?php //echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; die;?>--> <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'importoptions') { ?>
361
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
362
  <?php //$prevoptionindex='';?>
363
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php
366
  echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex'];
367
  }
368
  ?>"/>
369
+ <?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) { ?>
370
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
371
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
372
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
373
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
374
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
375
+ <input type='hidden' id='selectedImporter' name='selectedImporter' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['selectedImporter']; ?>' />
376
+ <?php } ?>
377
+ <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
378
+ <?php if(isset($_POST)) { ?>
379
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
380
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
381
+ <input type='hidden' id='uploadedFile' name='uploadedFile1' value='<?php echo $_POST['uploadedFile']; ?>' />
 
382
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
383
+ <?php } ?>
384
  <!-- Import settings options -->
385
  <div class="postbox" id="options" style=" margin-bottom:0px;">
386
  <!-- <h4 class="hndle">Search settings</h4>-->
408
  </select><br>
409
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
410
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
411
+ <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect duplicate post content</label> <br>
412
+ <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect duplicate post title</label> <br>
413
+ How much import per server request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
414
+ <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords'])) { echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; } ?> per request.</span>
415
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
416
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
417
  <input type="hidden" id="terminateaction" name="terminateaction" value="continue" />
421
  </li>-->
422
  </ul>
423
  <!-- <input id="goto_back" name="goto_back" class="btn btn-warning" type="button" value="<< Back" onclick="gotoback();" /> -->
424
+ <input id="startbutton" class="btn btn-primary" type="button" value="Import Now" style="color: #ffffff;background:#2E9AFE;" onclick="importRecordsbySettings('<?php echo site_url(); ?>');" >
425
  <input id="terminatenow" class="btn btn-danger btn-sm" type="button" value="Terminate Now" style="" onclick="terminateProcess();" />
426
  <input class="btn btn-warning" type="button" value="Import Again" id="importagain" style="display:none" onclick="import_again();" />
427
  <!--<input id="continuebutton" class="button" type="button" value="Continue old search" style="color: #ffffff;background:#2E9AFE;">-->
433
  <!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
434
  </div>
435
  </div>
436
+ <?php } ?>
437
  <!-- Code Ends Here-->
438
  </div>
439
  </td>
448
  </div>
449
  </div>
450
  <!-- Promotion footer for other useful plugins -->
451
+ <div class= "promobox" id="pluginpromo" style="width:99%;">
452
  <div class="accordion-group" >
453
  <div class="accordion-heading">
454
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL LINKS </a>
455
  </div>
456
  <div class="accordion-body in collapse">
457
  <div>
458
  <?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
459
+ <?php $impCE->common_footer(); ?>
460
+ </div>
461
  </div>
462
  </div>
463
  </div>
 
464
  </div>
modules/settings/templates/index.php CHANGED
@@ -1,142 +1,167 @@
1
  <div id="ShowMsg" style="display:none;"><p id="warning-msg" class="alert alert-warning"><?php echo $skinnyData['plugStatus'];?></p></div>
2
  <?php if(isset($skinnyData['savesettings']) && $skinnyData['savesettings'] == 'done'){ ?>
3
- <div id="deletesuccess"><p class="alert alert-success">Settings Saved</p></div>
4
- <?php
5
- $skinnyData['savesettings'] == 'notdone';
6
- ?>
7
- <script type="text/javascript">
8
- jQuery(document).ready( function() {
9
- jQuery('#ShowMsg').delay(2000).fadeOut();
10
- jQuery('#ShowMsg').css("display", "none");
11
- jQuery('#deletesuccess').delay(2000).fadeOut();
12
- });
13
- </script>
14
- <?php
15
  } ?>
16
  <form class="add:the-list: validate" action="" name="importerSettings" method="post" enctype="multipart/form-data">
17
- <div class="container-fluid">
18
- <div class="accordion" id="accordion2">
19
- <div class="accordion-group">
20
- <div class="accordion-heading">
21
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> MODULES </a>
22
- </div>
23
- <div id="collapseTwo" class="accordion-body in collapse">
24
- <div class="accordion-inner">
25
- <div id = 'moduleBox' class = 'switchercontent newboxes2'>
26
- <table>
27
- <tr>
28
- <td>
29
- <ul>
30
- <li>
31
- <label class="<?php echo $skinnyData['post']; ?>"><input type='checkbox' name='post' id='post' value='post' <?php echo $skinnyData['post']; ?> onclick="check_if_avail(this.name);" > Post </label>
32
- <label class="<?php echo $skinnyData['users']; ?>" ><input type='checkbox' name='users' id='users' value='users' <?php echo $skinnyData['users']; ?> onclick="check_if_avail(this.name);" > Users/Roles </label>
33
- <label class="<?php echo $skinnyData['page']; ?>"><input type='checkbox' name='page' id='page' value='page' <?php echo $skinnyData['page']; ?> onclick="check_if_avail(this.name);" > Page </label>
34
- <label class="<?php echo $skinnyData['comments']; ?>"><input type='checkbox' name='comments' id='comments' value='comments' <?php echo $skinnyData['comments']; ?> onclick="check_if_avail(this.name);" > Comments </label>
35
- <label class="<?php echo $skinnyData['categories']; ?>"><input type='checkbox' name='categories' id='categories' value='categories' <?php echo $skinnyData['categories']; ?> onclick="check_if_avail(this.name);" > Categories/Tags </label>
36
- <label class="<?php echo $skinnyData['customtaxonomy']; ?>" ><input type='checkbox' name='customtaxonomy' id='customtaxonomy' value='customtaxonomy' <?php echo $skinnyData['customtaxonomy']; ?> onclick="check_if_avail(this.name);" > Custom Taxonomy </label>
37
 
38
- <label class="<?php echo $skinnyData['custompost']; ?>"><input type='checkbox' name='custompost' id='custompost' value='custompost' <?php echo $skinnyData['custompost']; ?> onclick="check_if_avail(this.name);" > Custom Post </label>
39
 
40
- <label style='color:red'> Note: Supports Wordpress Custom Post by default. For Custom Post Type UI plugin enable it under supported 3rd party plugins<label></li>
41
- </ul>
42
- </td>
43
- </tr>
44
- </table>
45
  <!-- <input type='hidden' name='post' value='post' />
46
- <input type='hidden' name='custompost' value='custompost' />
47
- <input type='hidden' name='page' value='page' />-->
48
- </div>
49
- </div>
50
- </div>
51
- </div>
52
- <div class="accordion-group">
53
- <div class="accordion-heading">
54
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree"> THIRD PARTY PLUGINS </a>
55
- </div>
56
- <div id="collapseThree" class="accordion-body collapse">
57
- <div class="accordion-inner">
58
- <div id='thirdPartyBox' class = 'switchercontent newboxes2'>
59
- <table class='supportedplugins'>
60
- <tr class='typeofplugin'>
61
- <td class="plugintype" colspan=4> <b> Ecommerce </b> </td>
62
- </tr>
63
- <tr>
64
- <td>
65
- <label class="<?php echo $skinnyData['nonerecommerce']; ?>"><input type = 'radio' name ='recommerce' id='nonerecommerce' value='nonerecommerce' <?php echo $skinnyData['nonerecommerce']; ?> class='ecommerce' checked> None </label>
66
- </td>
67
- <td>
68
- <label class="<?php echo $skinnyData['eshoptd'].' '.$skinnyData['eshop']; ?>">
69
- <input type='radio' name='recommerce' id='eshop' value='eshop' <?php echo $skinnyData['eshop']; ?> class='ecommerce' onclick='check_if_avail(this.id);'> Eshop
70
- </label>
71
- </td>
72
- <td>
73
- <label class="<?php echo $skinnyData['wpcomtd'].' '.$skinnyData['wpcommerce']; ?>">
74
- <input type='radio' name='recommerce' id='wpcommerce' value='wpcommerce' <?php echo $skinnyData['wpcommerce']; ?> class = 'ecommerce' onclick='check_if_avail(this.id);'> WP e-Commerce </label>
75
- </td>
76
- <td>
77
- <label class="<?php echo $skinnyData['woocomtd'].' '.$skinnyData['woocommerce']; ?>"><input type='radio' name='recommerce' id='woocommerce' value='woocommerce' <?php echo $skinnyData['woocommerce']; ?> class = 'woocommerce' onclick='check_if_avail(this.id);'> WooCommerce </label>
78
- </td>
79
- </tr>
80
  <!-- WP e-Commerce Custom Fields support -->
81
- <tr id='wpcustomfieldstr'>
82
- <td></td><td></td>
83
- <td><input type='checkbox' name='wpcustomfields' id='wpcustomfields' onclick='check_if_avail(this.id);'/> WP e-Commerce Custom Fields </td>
84
- </tr>
85
- <tr class='typeofplugin'><td colspan=4><b> Custom Post and Custom Fields </b></td></tr>
86
- <tr>
87
- <td><label class="<?php echo $skinnyData['nonercustompost']; ?>" ><input type = 'radio' name ='rcustompost' id='nonercustompost' value='nonercustompost' <?php echo $skinnyData['nonercustompost']; ?> class='ecommerce' onclick="check_if_avail(this.id);" > Default </label></td>
88
- <td><label class="<?php echo $skinnyData['cptutd'].' '.$skinnyData['custompostuitype'];?>" ><input type ='radio' name = 'rcustompost' id='custompostuitype' value='custompostuitype' <?php echo $skinnyData['custompostuitype']; ?> > Custom Post Type UI </label></td>
89
- <td><label class="<?php echo $skinnyData['cctmtd'].' '.$skinnyData['cctm'];?>" ><input type ='radio' name = 'rcustompost' id='cctm' value='cctm' <?php echo $skinnyData['cctm']; ?> onclick="check_if_avail(this.id);" > CCTM </label></td>
90
- <td><label class="<?php echo $skinnyData['acftd'].' '.$skinnyData['acf'];?>" ><input type ='checkbox' name = 'rcustomfield' id='acf' value='acf' <?php echo $skinnyData['acf']; ?> onclick="check_if_avail(this.id);" > ACF </label></td>
91
- </tr>
92
- <tr class='typeofplugin'>
93
- <td colspan=4><b> SEO Options </b></td>
94
- </tr>
95
- <tr>
96
- <td><label class="<?php echo $skinnyData['nonerseooption'];?>" ><input type = 'radio' name ='rseooption' id='nonerseooption' value='nonerseooption' <?php echo $skinnyData['nonerseooption']; ?> class='ecommerce' onclick="check_if_avail(this.id);" > None </label></td>
97
- <td><label class="<?php echo $skinnyData['aioseotd'].' '.$skinnyData['aioseo']; ?>" ><input type ='radio' name = 'rseooption' id='aioseo' value='aioseo' <?php echo $skinnyData['aioseo']; ?> onclick="check_if_avail(this.id);" > All-in-SEO </label></td>
98
- <td><label class="<?php echo $skinnyData['yoasttd'].' '.$skinnyData['yoastseo']; ?>" ><input type ='radio' name = 'rseooption' id='yoastseo' value='yoastseo' <?php echo $skinnyData['yoastseo']; ?> onclick="check_if_avail(this.id);" > Yoast SEO </label></td>
99
- </tr>
100
- <tr class='typeofplugin'>
101
- <td colspan=4><b> Category Icons </b></td>
102
- </tr>
103
- <tr>
104
- <td><label class="<?php echo $skinnyData['enable'];?>" ><input type = 'radio' name ='rcateicons' id='caticonenable' value='enable' <?php echo $skinnyData['enable']; ?> class='ecommerce' onclick="check_if_avail(this.id);"> Enable </label> </td>
105
- <td>
106
- <label><input type ='radio' name = 'rcateicons' id = 'caticondisable' value='disable' <?php echo $skinnyData['disable']; ?> checked > Disable </label></td>
107
- </tr>
108
- </table>
109
- </div>
110
- </div>
111
- </div>
112
- </div>
113
- <div class="accordion-group">
114
- <div class="accordion-heading">
115
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne"> FEATURES </a>
116
- </div>
117
- <div id="collapseOne" class="accordion-body collapse" style="height: 0px; ">
118
- <div class="accordion-inner">
119
- <div id='featuresBox' class = 'switchercontent newboxes2'>
120
- <table>
121
- <tr>
122
- <td>
123
- <label class=$automapping>
124
- <input type='checkbox' name='automapping' id='automapping' value='automapping' <?php echo $skinnyData['automapping']; ?> onclick="check_if_avail(this.id);" >
125
- Enable Auto Mapping
126
- </label>
127
- </td>
128
- <td>
129
- <label class=$utfsupport><input type='checkbox' name='rutfsupport' id='utfsupport' value='utfsupport' <?php echo $skinnyData['utfsupport']; ?> onclick="check_if_avail(this.id);" >
130
- Enable UTF Support</label>
131
- </td>
132
- </tr>
133
- </table>
134
- </div>
 
 
 
 
 
 
 
 
135
 
136
- </div>
137
- </div>
138
- </div>
139
- <button type='submit' class='action btn btn-primary' name='savesettings' value='Save' style='float:right;' onclick="saveSettings();">Save</button>
140
- </div>
141
- </div>
142
  </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div id="ShowMsg" style="display:none;"><p id="warning-msg" class="alert alert-warning"><?php echo $skinnyData['plugStatus'];?></p></div>
2
  <?php if(isset($skinnyData['savesettings']) && $skinnyData['savesettings'] == 'done'){ ?>
3
+ <div id="deletesuccess"><p class="alert alert-success">Settings Saved</p></div>
4
+ <?php
5
+ $skinnyData['savesettings'] == 'notdone';
6
+ ?>
7
+ <script type="text/javascript">
8
+ jQuery(document).ready( function() {
9
+ jQuery('#ShowMsg').delay(2000).fadeOut();
10
+ jQuery('#ShowMsg').css("display", "none");
11
+ jQuery('#deletesuccess').delay(2000).fadeOut();
12
+ });
13
+ </script>
14
+ <?php
15
  } ?>
16
  <form class="add:the-list: validate" action="" name="importerSettings" method="post" enctype="multipart/form-data">
17
+ <div class="container-fluid">
18
+ <div class="accordion" id="accordion2">
19
+ <div class="accordion-group">
20
+ <div class="accordion-heading">
21
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> MODULES </a>
22
+ </div>
23
+ <div id="collapseTwo" class="accordion-body in collapse">
24
+ <div class="accordion-inner">
25
+ <div id = 'moduleBox' class = 'switchercontent newboxes2'>
26
+ <table>
27
+ <tr>
28
+ <td>
29
+ <ul>
30
+ <li>
31
+ <label class="<?php echo $skinnyData['post']; ?>"><input type='checkbox' name='post' id='post' value='post' <?php echo $skinnyData['post']; ?> onclick="check_if_avail(this.name);" > Post </label>
32
+ <label class="<?php echo $skinnyData['users']; ?>" ><input type='checkbox' name='users' id='users' value='users' <?php echo $skinnyData['users']; ?> onclick="check_if_avail(this.name);" > Users/Roles </label>
33
+ <label class="<?php echo $skinnyData['page']; ?>"><input type='checkbox' name='page' id='page' value='page' <?php echo $skinnyData['page']; ?> onclick="check_if_avail(this.name);" > Page </label>
34
+ <label class="<?php echo $skinnyData['comments']; ?>"><input type='checkbox' name='comments' id='comments' value='comments' <?php echo $skinnyData['comments']; ?> onclick="check_if_avail(this.name);" > Comments </label>
35
+ <label class="<?php echo $skinnyData['categories']; ?>"><input type='checkbox' name='categories' id='categories' value='categories' <?php echo $skinnyData['categories']; ?> onclick="check_if_avail(this.name);" > Categories/Tags </label>
36
+ <label class="<?php echo $skinnyData['customtaxonomy']; ?>" ><input type='checkbox' name='customtaxonomy' id='customtaxonomy' value='customtaxonomy' <?php echo $skinnyData['customtaxonomy']; ?> onclick="check_if_avail(this.name);" > Custom Taxonomy </label>
37
 
38
+ <label class="<?php echo $skinnyData['custompost']; ?>"><input type='checkbox' name='custompost' id='custompost' value='custompost' <?php echo $skinnyData['custompost']; ?> onclick="check_if_avail(this.name);" > Custom Post </label>
39
 
40
+ <label style='color:red'> Note: Supports Wordpress Custom Post by default. For Custom Post Type UI plugin enable it under supported 3rd party plugins<label></li>
41
+ </ul>
42
+ </td>
43
+ </tr>
44
+ </table>
45
  <!-- <input type='hidden' name='post' value='post' />
46
+ <input type='hidden' name='custompost' value='custompost' />
47
+ <input type='hidden' name='page' value='page' />-->
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <div class="accordion-group">
53
+ <div class="accordion-heading">
54
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree"> THIRD PARTY PLUGINS </a>
55
+ </div>
56
+ <div id="collapseThree" class="accordion-body collapse">
57
+ <div class="accordion-inner">
58
+ <div id='thirdPartyBox' class = 'switchercontent newboxes2'>
59
+ <table class='supportedplugins'>
60
+ <tr class='typeofplugin'>
61
+ <td class="plugintype" colspan=4> <b> Ecommerce </b> </td>
62
+ </tr>
63
+ <tr>
64
+ <td>
65
+ <label class="<?php echo $skinnyData['nonerecommerce']; ?>"><input type = 'radio' name ='recommerce' id='nonerecommerce' value='nonerecommerce' <?php echo $skinnyData['nonerecommerce']; ?> class='ecommerce' checked> None </label>
66
+ </td>
67
+ <td>
68
+ <label class="<?php echo $skinnyData['eshoptd'].' '.$skinnyData['eshop']; ?>">
69
+ <input type='radio' name='recommerce' id='eshop' value='eshop' <?php echo $skinnyData['eshop']; ?> class='ecommerce' onclick='check_if_avail(this.id);'> Eshop
70
+ </label>
71
+ </td>
72
+ <td>
73
+ <label class="<?php echo $skinnyData['wpcomtd'].' '.$skinnyData['wpcommerce']; ?>">
74
+ <input type='radio' name='recommerce' id='wpcommerce' value='wpcommerce' <?php echo $skinnyData['wpcommerce']; ?> class = 'ecommerce' onclick='check_if_avail(this.id);'> WP e-Commerce </label>
75
+ </td>
76
+ <td>
77
+ <label class="<?php echo $skinnyData['woocomtd'].' '.$skinnyData['woocommerce']; ?>"><input type='radio' name='recommerce' id='woocommerce' value='woocommerce' <?php echo $skinnyData['woocommerce']; ?> class = 'woocommerce' onclick='check_if_avail(this.id);'> WooCommerce </label>
78
+ </td>
79
+ </tr>
80
  <!-- WP e-Commerce Custom Fields support -->
81
+ <tr id='wpcustomfieldstr'>
82
+ <td></td><td></td>
83
+ <td><input type='checkbox' name='wpcustomfields' id='wpcustomfields' onclick='check_if_avail(this.id);'/> WP e-Commerce Custom Fields </td>
84
+ </tr>
85
+ <tr class='typeofplugin'><td colspan=4><b> Custom Post and Custom Fields </b></td></tr>
86
+ <tr>
87
+ <td><label class="<?php echo $skinnyData['nonercustompost']; ?>" ><input type = 'radio' name ='rcustompost' id='nonercustompost' value='nonercustompost' <?php echo $skinnyData['nonercustompost']; ?> class='ecommerce' onclick="check_if_avail(this.id);" > Default </label></td>
88
+ <td><label class="<?php echo $skinnyData['cptutd'].' '.$skinnyData['custompostuitype'];?>" ><input type ='radio' name = 'rcustompost' id='custompostuitype' value='custompostuitype' <?php echo $skinnyData['custompostuitype']; ?> > Custom Post Type UI </label></td>
89
+ <td><label class="<?php echo $skinnyData['cctmtd'].' '.$skinnyData['cctm'];?>" ><input type ='radio' name = 'rcustompost' id='cctm' value='cctm' <?php echo $skinnyData['cctm']; ?> onclick="check_if_avail(this.id);" > CCTM </label></td>
90
+ <td><label class="<?php echo $skinnyData['acftd'].' '.$skinnyData['acf'];?>" ><input type ='checkbox' name = 'rcustomfield' id='acf' value='acf' <?php echo $skinnyData['acf']; ?> onclick="check_if_avail(this.id);" > ACF </label></td>
91
+ </tr>
92
+ <tr class='typeofplugin'>
93
+ <td colspan=4><b> SEO Options </b></td>
94
+ </tr>
95
+ <tr>
96
+ <td><label class="<?php echo $skinnyData['nonerseooption'];?>" ><input type = 'radio' name ='rseooption' id='nonerseooption' value='nonerseooption' <?php echo $skinnyData['nonerseooption']; ?> class='ecommerce' onclick="check_if_avail(this.id);" > None </label></td>
97
+ <td><label class="<?php echo $skinnyData['aioseotd'].' '.$skinnyData['aioseo']; ?>" ><input type ='radio' name = 'rseooption' id='aioseo' value='aioseo' <?php echo $skinnyData['aioseo']; ?> onclick="check_if_avail(this.id);" > All-in-SEO </label></td>
98
+ <td><label class="<?php echo $skinnyData['yoasttd'].' '.$skinnyData['yoastseo']; ?>" ><input type ='radio' name = 'rseooption' id='yoastseo' value='yoastseo' <?php echo $skinnyData['yoastseo']; ?> onclick="check_if_avail(this.id);" > Yoast SEO </label></td>
99
+ </tr>
100
+ <tr class='typeofplugin'>
101
+ <td colspan=4><b> Category Icons </b></td>
102
+ </tr>
103
+ <tr>
104
+ <td><label class="<?php echo $skinnyData['enable'];?>" ><input type = 'radio' name ='rcateicons' id='caticonenable' value='enable' <?php echo $skinnyData['enable']; ?> class='ecommerce' onclick="check_if_avail(this.id);"> Enable </label> </td>
105
+ <td>
106
+ <label><input type ='radio' name = 'rcateicons' id = 'caticondisable' value='disable' <?php echo $skinnyData['disable']; ?> checked > Disable </label></td>
107
+ </tr>
108
+ </table>
109
+ </div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+ <div class="accordion-group">
114
+ <div class="accordion-heading">
115
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne"> FEATURES </a>
116
+ </div>
117
+ <div id="collapseOne" class="accordion-body collapse" style="height: 0px; ">
118
+ <div class="accordion-inner">
119
+ <div id='featuresBox' class = 'switchercontent newboxes2'>
120
+ <table>
121
+ <tr>
122
+ <td>
123
+ <label class=$automapping>
124
+ <input type='checkbox' name='automapping' id='automapping' value='automapping' <?php if(isset($skinnyData['automapping'])) { echo $skinnyData['automapping']; } ?> onclick="check_if_avail(this.id);" >
125
+ Enable Auto Mapping
126
+ </label>
127
+ </td>
128
+ <td>
129
+ <label class=$utfsupport><input type='checkbox' name='rutfsupport' id='utfsupport' value='utfsupport' <?php if(isset($skinnyData['utfsupport'])) { echo $skinnyData['utfsupport']; } ?> onclick="check_if_avail(this.id);" >
130
+ Enable UTF Support</label>
131
+ </td>
132
+ <td>
133
+ <label style="padding:5px 0px 0px 15px;">Export Delimiter
134
+ <select name="export_delimiter">
135
+ <option>;</option>
136
+ <option>,</option>
137
+ </select>
138
+ </label>
139
+ </td>
140
+ </tr>
141
+ </table>
142
+ </div>
143
 
144
+ </div>
145
+ </div>
146
+ </div>
147
+ <button type='submit' class='action btn btn-primary' name='savesettings' value='Save' style='float:right;' onclick="saveSettings();">Save</button>
148
+ </div>
149
+ </div>
150
  </form>
151
+
152
+ <!-- Promotion footer for other useful plugins -->
153
+ <?php $impCE = new WPImporter_includes_helper(); ?>
154
+ <div class= "promobox" id="pluginpromo" style="width:99%;">
155
+ <div class="accordion-group" >
156
+ <div class="accordion-heading">
157
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL LINKS </a>
158
+ </div>
159
+ <div class="accordion-body in collapse">
160
+ <div>
161
+ <?php // $impCE->common_footer_for_other_plugin_promotions(); ?>
162
+ <?php $impCE->common_footer(); ?>
163
+ </div>
164
+ </div>
165
+ </div>
166
+ </div>
167
+
modules/support/templates/index.php CHANGED
@@ -56,7 +56,7 @@
56
  <tr>
57
  <td>Rate Our Plugin</td>
58
  <td>
59
- <a href="http://wordpress.org/support/view/plugin-reviews/wp-ultimate-csv-importer?rate=5#postform" target="_blank">
60
  <ul class="stars">
61
  <li>1</li>
62
  <li>2</li>
56
  <tr>
57
  <td>Rate Our Plugin</td>
58
  <td>
59
+ <a href="http://wordpress.org/support/view/plugin-reviews/wp-ultimate-csv-importer" target="_blank">
60
  <ul class="stars">
61
  <li>1</li>
62
  <li>2</li>
modules/users/templates/index.php CHANGED
@@ -32,12 +32,12 @@ $impCE = new WPImporter_includes_helper();
32
  <!-- The file input field used as target for the file upload widget -->
33
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
34
  <?php $uploadDir = wp_upload_dir(); ?>
35
- <input type="hidden" id="uploaddir" value="<?php echo $uploadDir['basedir']; ?>">
36
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
37
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
38
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
39
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
40
- <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php echo $_REQUEST['__module']; ?>' >
41
  <input id="fileupload" type="file" name="files[]" multiple>
42
  </span>
43
  <!-- The global progress bar -->
@@ -143,10 +143,12 @@ var url = (document.getElementById('pluginurl').value+'/plugins/<?php echo WP_CO
143
  if(isset($_POST['mydelimeter']))
144
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST["mydelimeter"];
145
  $wpcsvsettings=array();
 
146
  $mappingFields_arr = array();
147
  $wpcsvsettings=get_option('wpcsvfreesettings');
148
  ?>
149
  <h3>Mapping Configuration</h3>
 
150
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
151
  <div class='mappingsection'>
152
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
@@ -181,26 +183,27 @@ $allcustomposts.=$value.',';
181
  <td colspan='4'>
182
  <div align='center' style='float:right;'>
183
  <?php $cnt = count($impCE->defCols) + 2;
184
- $cnt1 = count($impCE->headers); ?>
185
- <input type="hidden" id="h1" name="h1" value="<?php echo $cnt; ?>"/>
186
- <input type="hidden" id="h2" name="h2" value="<?php echo $cnt1; ?>"/>
187
- <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php echo $_REQUEST['__module']; ?>"/>
 
188
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
189
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
190
  <input type='hidden' id='current_record' name='current_record' value='0' />
191
- <input type='hidden' id='totRecords' name='totRecords' value='<?php echo count($getrecords); ?>' />
192
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
193
- <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php echo $filename; ?>" />
194
  <!-- real uploaded filename -->
195
- <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php echo $uploaded_csv_name; ?>" />
196
- <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php echo $delimeter; ?>" />
197
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_REQUEST['step']; ?>' />
198
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
199
  <input type='button' id='prev_record' name='prev_record' value='<<' class="btn btn-primary" onclick='gotoelement(this.id);' />
200
- <label style="padding-right:10px;">Change the csv sample record value by rows</label>
201
  <input type='button' id='next_record' name='next_record' value='>>' class="btn btn-primary" onclick='gotoelement(this.id);' />
202
- Go To: <input type='text' id='goto_element' name='goto_element' />
203
- <input type='button' id='apply_element' name='apply_element' value='Get Record' class="btn btn-success" onclick='gotoelement(this.id);' />
204
  </div>
205
  </td>
206
  </tr>
@@ -208,7 +211,7 @@ $allcustomposts.=$value.',';
208
  $count = 0;
209
  $usersObj = new UsersActions();
210
  ?>
211
- <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>SAMPLE VALUE</b> </td><td></td></tr>
212
  <?php
213
  foreach ($impCE->headers as $key => $value) {
214
  ?>
@@ -275,7 +278,7 @@ foreach($mappingFields_arr as $mkey => $mval){
275
  $mFieldsArr = substr($mFieldsArr, 0, -1);
276
  ?>
277
  </table>
278
- <input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php print_r($mFieldsArr); ?>"/>
279
  <div>
280
  <div class="goto_import_options" align=center>
281
  <div class="mappingactions" >
@@ -296,6 +299,7 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
296
  </div>
297
  </div>
298
  </div>
 
299
  </div>
300
  </form>
301
  </td>
@@ -303,18 +307,24 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
303
  <tr>
304
  <td>
305
  <h3>Import Option Settings</h3>
 
306
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
 
307
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex']; ?>"/>
308
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
309
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
310
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
311
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
312
- <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
 
 
 
 
313
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
314
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
315
- <input type='hidden' id='uploadedFile1' name='uploadedFile1' value='<?php echo $_POST['uploadedFile']; ?>' />
316
- <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
317
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
 
318
  <!-- Import settings options -->
319
  <div class="postbox" id="options" style=" margin-bottom:0px;">
320
  <!-- <h4 class="hndle">Search settings</h4>-->
@@ -344,10 +354,10 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
344
  </select><br>
345
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
346
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
347
- <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect Duplicate Post Content</label> <br>
348
- <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect Duplicate Post Title</label> <br>
349
 
350
- How much comparisons per Server-Request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
351
  <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> per request.</span>
352
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
353
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
@@ -369,6 +379,7 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
369
  <!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
370
  </div>
371
  </div>
 
372
  <!-- Code Ends Here-->
373
  </div>
374
  </td>
@@ -383,16 +394,17 @@ $mFieldsArr = substr($mFieldsArr, 0, -1);
383
  </div>
384
  </div>
385
  <!-- Promotion footer for other useful plugins -->
386
- <!--<div class= "promobox" id="pluginpromo" style="width:99%;">
387
  <div class="accordion-group" >
388
  <div class="accordion-heading">
389
- <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL PLUGINS BY SMACKCODERS </a>
390
  </div>
391
  <div class="accordion-body in collapse">
392
  <div>
393
  <?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
 
394
  </div>
395
  </div>
396
  </div>
397
- </div> -->
398
  </div>
32
  <!-- The file input field used as target for the file upload widget -->
33
  <input type ='hidden' id="pluginurl"value="<?php echo WP_CONTENT_URL;?>">
34
  <?php $uploadDir = wp_upload_dir(); ?>
35
+ <input type="hidden" id="uploaddir" value="<?php if(isset($uploadDir['basedir'])) { echo $uploadDir['basedir']; } ?>">
36
  <input type="hidden" id="uploadFileName" name="uploadfilename" value="">
37
  <input type = 'hidden' id = 'uploadedfilename' name = 'uploadedfilename' value = ''>
38
  <input type = 'hidden' id = 'upload_csv_realname' name = 'upload_csv_realname' value =''>
39
  <input type = 'hidden' id = 'current_file_version' name = 'current_file_version' value = ''>
40
+ <input type = 'hidden' id = 'current_module' name = 'current_module' value = '<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>' >
41
  <input id="fileupload" type="file" name="files[]" multiple>
42
  </span>
43
  <!-- The global progress bar -->
143
  if(isset($_POST['mydelimeter']))
144
  $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['delim'] = $_POST["mydelimeter"];
145
  $wpcsvsettings=array();
146
+ $custom_key=array();
147
  $mappingFields_arr = array();
148
  $wpcsvsettings=get_option('wpcsvfreesettings');
149
  ?>
150
  <h3>Mapping Configuration</h3>
151
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'mapping_settings' ) { ?>
152
  <div id='sec-two' <?php if($_REQUEST['step']!= 'mapping_settings'){ ?> style='display:none;' <?php } ?> >
153
  <div class='mappingsection'>
154
  <h2><div class="secondformheader">Import Data Configuration</div></h2>
183
  <td colspan='4'>
184
  <div align='center' style='float:right;'>
185
  <?php $cnt = count($impCE->defCols) + 2;
186
+ $cnt1 = count($impCE->headers);
187
+ $records = count($getrecords);?>
188
+ <input type='hidden' id='h1' name='h1' value="<?php if(isset($cnt)) { echo $cnt; } ?>"/>
189
+ <input type="hidden" id="h2" name="h2" value="<?php if(isset($cnt1)) { echo $cnt1; } ?>"/>
190
+ <input type='hidden' name='selectedImporter' id='selectedImporter' value="<?php if(isset($_REQUEST['__module'])) { echo $_REQUEST['__module']; } ?>"/>
191
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value=""/>
192
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value=""/>
193
  <input type='hidden' id='current_record' name='current_record' value='0' />
194
+ <input type='hidden' id='totRecords' name='totRecords' value='<?php if(isset($records)) { echo $records; } ?>' />
195
  <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
196
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value="<?php if(isset($filename)) { echo $filename; } ?>" />
197
  <!-- real uploaded filename -->
198
+ <input type='hidden' id='uploaded_csv_name' name='uploaded_csv_name' value="<?php if(isset($uploaded_csv_name)) { echo $uploaded_csv_name; } ?>" />
199
+ <input type='hidden' id='select_delimeter' name='select_delimeter' value="<?php if(isset($delimeter)) { echo $delimeter; } ?>" />
200
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php if(isset($_REQUEST['step'])) { echo $_REQUEST['step']; } ?>' />
201
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
202
  <input type='button' id='prev_record' name='prev_record' value='<<' class="btn btn-primary" onclick='gotoelement(this.id);' />
203
+ <label style="padding-right:10px;">Change your csv row data</label>
204
  <input type='button' id='next_record' name='next_record' value='>>' class="btn btn-primary" onclick='gotoelement(this.id);' />
205
+ Go To Row #<input type='text' id='goto_element' name='goto_element' />
206
+ <input type='button' id='apply_element' name='apply_element' value='Show' class="btn btn-success" onclick='gotoelement(this.id);' />
207
  </div>
208
  </td>
209
  </tr>
211
  $count = 0;
212
  $usersObj = new UsersActions();
213
  ?>
214
+ <tr><td class="left_align"> <b>CSV HEADER</b> </td><td> <b>WP FIELDS</b> </td><td> <b>CSV ROW</b> </td><td></td></tr>
215
  <?php
216
  foreach ($impCE->headers as $key => $value) {
217
  ?>
278
  $mFieldsArr = substr($mFieldsArr, 0, -1);
279
  ?>
280
  </table>
281
+ <input type="hidden" id="mapping_fields_array" name="mapping_fields_array" value="<?php if(isset($mFieldsArr)) { print_r($mFieldsArr); } ?>"/>
282
  <div>
283
  <div class="goto_import_options" align=center>
284
  <div class="mappingactions" >
299
  </div>
300
  </div>
301
  </div>
302
+ <?php } ?>
303
  </div>
304
  </form>
305
  </td>
307
  <tr>
308
  <td>
309
  <h3>Import Option Settings</h3>
310
+ <?php if(isset($_REQUEST['step']) && $_REQUEST['step'] == 'importoptions') { ?>
311
  <div id='sec-three' <?php if($_REQUEST['step']!= 'importoptions'){ ?> style='display:none;' <?php } ?> >
312
+ <?php if(isset($_SESSION['SMACK_MAPPING_SETTINGS_VALUES'])) { ?>
313
  <input type="hidden" id="prevoptionindex" name="prevoptionindex" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionindex']; ?>"/>
314
  <input type="hidden" id="prevoptionvalue" name="prevoptionvalue" value="<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['prevoptionvalue']; ?>"/>
315
  <input type='hidden' id='current_record' name='current_record' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['current_record']; ?>' />
316
  <input type='hidden' id='tot_records' name='tot_records' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
317
  <input type='hidden' id='checktotal' name='checktotal' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?>' />
318
+ <input type='hidden' id='stepstatus' name='stepstatus' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['stepstatus']; ?>' />
319
+ <input type='hidden' id='selectedImporter' name='selectedImporter' value='<?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['selectedImporter']; ?>' />
320
+ <?php } ?>
321
+ <?php if(isset($_POST)) { ?>
322
+ <input type='hidden' id='tmpLoc' name='tmpLoc' value='<?php echo WP_CONST_ULTIMATE_CSV_IMP_DIR; ?>' />
323
  <input type='hidden' id='checkfile' name='checkfile' value='<?php echo $_POST['uploadedFile']; ?>' />
324
  <input type='hidden' id='select_delim' name='select_delim' value='<?php echo $_POST['select_delimeter']; ?>' />
325
+ <input type='hidden' id='uploadedFile' name='uploadedFile' value='<?php echo $_POST['uploadedFile']; ?>' />
 
326
  <input type='hidden' id='mappingArr' name='mappingArr' value='' />
327
+ <?php } ?>
328
  <!-- Import settings options -->
329
  <div class="postbox" id="options" style=" margin-bottom:0px;">
330
  <!-- <h4 class="hndle">Search settings</h4>-->
354
  </select><br>
355
  <input name="filterhtml" id="filterhtml" type="checkbox" value="1"> Filter out HTML-Tags while comparing <br>
356
  <input name="filterhtmlentities" id="filterhtmlentities" type="checkbox" value="1"> Decode HTML-Entities before comparing <br>-->
357
+ <label><input name='duplicatecontent' id='duplicatecontent' type="checkbox" value=""> Detect duplicate post content</label> <br>
358
+ <label><input name='duplicatetitle' id='duplicatetitle' type="checkbox" value="" > Detect duplicate post title</label> <br>
359
 
360
+ How much import per server request? <span class="mandatory">*</span> <input name="importlimit" id="importlimit" type="text" value="" onblur="check_allnumeric(this.value);">
361
  <span class='msg' id='server_request_warning' style="display:none;color:red;margin-left:-10px;">You can set upto <?php echo $_SESSION['SMACK_MAPPING_SETTINGS_VALUES']['totRecords']; ?> per request.</span>
362
  <input type="hidden" id="currentlimit" name="currentlimit" value="0"/>
363
  <input type="hidden" id="tmpcount" name="tmpcount" value="0" />
379
  <!-- Compared <span id="done">0</span> of <span id="count">6</span> posts<br>Found <span id="found">0</span> duplicates <br><input id="deletebutton" style="display: none" class="button" type="button" value="Move selected posts to trash">-->
380
  </div>
381
  </div>
382
+ <?php } ?>
383
  <!-- Code Ends Here-->
384
  </div>
385
  </td>
394
  </div>
395
  </div>
396
  <!-- Promotion footer for other useful plugins -->
397
+ <div class= "promobox" id="pluginpromo" style="width:99%;">
398
  <div class="accordion-group" >
399
  <div class="accordion-heading">
400
+ <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo"> OTHER USEFUL LINKS </a>
401
  </div>
402
  <div class="accordion-body in collapse">
403
  <div>
404
  <?php //$impCE->common_footer_for_other_plugin_promotions(); ?>
405
+ <?php $impCE->common_footer(); ?>
406
  </div>
407
  </div>
408
  </div>
409
+ </div>
410
  </div>
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
screenshot-7.png ADDED
Binary file
templates/menu.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  $post = $page = $custompost = $categories = $users = $customtaxonomy = $comments = $eshop = $wpcommerce = $woocommerce = $settings = $support = $dashboard = $export = $mappingtemplate = $filemanager = $schedulemapping = '';
3
  $impCEM = CallWPImporterObj::getInstance();
4
- $settings = $impCEM->getSettings();
5
  $get_pluginData = get_plugin_data(plugin_dir_path( __FILE__ ).'../index.php');
6
  $mod = isset($_REQUEST['__module']) ? $_REQUEST['__module'] : '';
7
- foreach($settings as $key){
8
  $$key = true;
9
  }
10
  if(isset($_POST['post_csv']) && $_POST['post_csv'] == 'Import')
@@ -44,9 +44,9 @@ if($eshop)
44
  if($wpcommerce)
45
  $menuHTML .= "<li class=\"navigationMenu $wpcommerce\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=wpcommerce' class = 'navigationMenu-link' id = 'module12'>WP e-Commerce</a></li>";
46
  if($woocommerce)
47
- $menuHTML .= "<li class=\"navigationMenu $woocommerce\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=woocommerce' class = 'navigationMenu-link' id = 'module13'>WooCommerce</a></li>";
 
48
  $menuHTML .= "<li class=\"navigationMenu $settings\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=settings' class='navigationMenu-link' id='module15'>Settings</a></li>";
49
- $menuHTML .= "<li class=\"navigationMenu $support\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=support' class='navigationMenu-link' id='module16'>Support</a></li>";
50
  //$menuHTML .= "<li class=\"navigationMenu $dashboard\" style='margin-left:0px;'><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=dashboard' class='navigationMenu-link' id='module0'>Dashboard</a></li>";
51
  /*$menuHTML .="<li class=\"navigationMenu $filemanager\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=filemanager' class = 'navigationMenu-link' id='module1'>File Manager</a></li>";
52
  $menuHTML .= "<li class=\"navigationMenu $mappingtemplate\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=mappingtemplate' class='navigationMenu-link' id='module2'>Templates</a></li>";
@@ -59,20 +59,20 @@ $menuHTML .= "<li class=\"moreMenuList $dashboard\" style='margin-left:0px;'><a
59
  //$menuHTML .="<li class=\"navigationMenu $filemanager\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=filemanager' class = 'navigationMenu-link' id='module1'>File Manager</a></li>";
60
  $menuHTML .= "<li class=\"navigationMenu $mappingtemplate\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=mappingtemplate' class='navigationMenu-link' id='module2'>Templates</a></li>";
61
  $menuHTML .="<li class=\"navigationMenu $schedulemapping\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=schedulemapping' class = 'navigationMenu-link' id='module3'>Smart Schedule</a></li>";
62
- $menuHTML .= "<li class=\"navigationMenu $export\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=export' class='navigationMenu-link' id='module14'>Export</a></li>";
63
  }
64
  else
65
  {
66
- $menuHTML .="<li class=\"moreMenu\"><a href = '#' class='navigationMenu-link' id='module17'>Pro-modules</a><ul><li class=\"moreMenuList $dashboard\" style='margin-left:0px;'><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=dashboard' class='navigationMenu-link' id='module0'>Dashboard</a></li><!--<li class=\"moreMenuList $filemanager\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=filemanager' class = 'navigationMenu-link' id='module1'>File Manager</a></li>--><li class=\"moreMenuList $mappingtemplate\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=mappingtemplate' class='navigationMenu-link' id='module2'>Templates</a></li> <li class=\"moreMenuList $schedulemapping\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=schedulemapping' class = 'navigationMenu-link' id='module3'>Smart Schedule</a></li><li class=\"moreMenuList $export\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=export' class='navigationMenu-link' id='module14'>Export</a></li></ul></li>";
67
  }
 
68
  $menuHTML .= "</ul>";
69
  $menuHTML .= "<div style='margin-right:10px;width: 250px;float: right;'>";
70
  $menuHTML .= "<span class='prolinks'><a class='label label-info' href='http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html' target='_blank'>GO PRO NOW</a></span>";
71
  $menuHTML .= "<span class='prolinks'><a class='label label-info' href='http://demo.smackcoders.com/demowpthree/wp-admin/admin.php?page=wp-ultimate-csv-importer-pro/index.php&__module=dashboard' target='_blank'>TRY PRO LIVE DEMO NOW</a></span>";
72
  $menuHTML .= "</div>";
73
  $menuHTML .= "</div>";
74
- $menuHTML .= "<div style='width:100%;padding-bottom:30px;'>";
75
- $menuHTML .= '<div class="">
76
  <label class="plugintags"><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer" target="_blank">WIKI</a></label>
77
  <label class="plugintags"><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_FAQ" target="_blank">FAQ</a></label>
78
  <label class="plugintags"><a href="http://blog.smackcoders.com/category/free-wordpress-plugins/wordpress-ultimate-csv-importer-plugin/" target="_blank">TUTORIALS</a></label>
@@ -97,8 +97,8 @@ if(isset ($_REQUEST['__module']) && $_REQUEST['__module'] != 'support' && $_REQU
97
  }
98
  if(isset ($_REQUEST['__module']) && $_REQUEST['__module'] == 'support'){
99
  $menuHTML .= "<div style='float:right;margin-right:15px;'>Current Version: ".$get_pluginData['Version']." <a class='label label-info' href='http://wordpress.org/plugins/wp-ultimate-csv-importer/developers/'>Get Old Versions</a></div>";
100
- }
101
- $menuHTML .= "</div>";
102
  $menuHTML .= "<div class='msg' id = 'showMsg' style = 'display:none;'></div>";
103
  $menuHTML .= "<input type='hidden' id='current_url' name='current_url' value='".get_admin_url()."admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=".$_REQUEST['__module']."&step=uploadfile'/>";
104
  echo $menuHTML;
1
  <?php
2
  $post = $page = $custompost = $categories = $users = $customtaxonomy = $comments = $eshop = $wpcommerce = $woocommerce = $settings = $support = $dashboard = $export = $mappingtemplate = $filemanager = $schedulemapping = '';
3
  $impCEM = CallWPImporterObj::getInstance();
4
+ $get_settings = $impCEM->getSettings();
5
  $get_pluginData = get_plugin_data(plugin_dir_path( __FILE__ ).'../index.php');
6
  $mod = isset($_REQUEST['__module']) ? $_REQUEST['__module'] : '';
7
+ foreach($get_settings as $key){
8
  $$key = true;
9
  }
10
  if(isset($_POST['post_csv']) && $_POST['post_csv'] == 'Import')
44
  if($wpcommerce)
45
  $menuHTML .= "<li class=\"navigationMenu $wpcommerce\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=wpcommerce' class = 'navigationMenu-link' id = 'module12'>WP e-Commerce</a></li>";
46
  if($woocommerce)
47
+ $menuHTML .= "<li class=\"navigationMenu $woocommerce\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=woocommerce' class = 'navigationMenu-link' id = 'module13'>WooCommerce</a></li>";
48
+ $menuHTML .= "<li class=\"navigationMenu $export\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=export' class='navigationMenu-link' id='module14'>Export</a><img src='".WP_PLUGIN_URL."/".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/images/new.gif' alt='New' width='35' height='12' border='0' class='newmoduleicon'></li>";
49
  $menuHTML .= "<li class=\"navigationMenu $settings\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=settings' class='navigationMenu-link' id='module15'>Settings</a></li>";
 
50
  //$menuHTML .= "<li class=\"navigationMenu $dashboard\" style='margin-left:0px;'><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=dashboard' class='navigationMenu-link' id='module0'>Dashboard</a></li>";
51
  /*$menuHTML .="<li class=\"navigationMenu $filemanager\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=filemanager' class = 'navigationMenu-link' id='module1'>File Manager</a></li>";
52
  $menuHTML .= "<li class=\"navigationMenu $mappingtemplate\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=mappingtemplate' class='navigationMenu-link' id='module2'>Templates</a></li>";
59
  //$menuHTML .="<li class=\"navigationMenu $filemanager\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=filemanager' class = 'navigationMenu-link' id='module1'>File Manager</a></li>";
60
  $menuHTML .= "<li class=\"navigationMenu $mappingtemplate\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=mappingtemplate' class='navigationMenu-link' id='module2'>Templates</a></li>";
61
  $menuHTML .="<li class=\"navigationMenu $schedulemapping\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=schedulemapping' class = 'navigationMenu-link' id='module3'>Smart Schedule</a></li>";
 
62
  }
63
  else
64
  {
65
+ $menuHTML .="<li class=\"moreMenu\"><a href = '#' class='navigationMenu-link' id='module17'>Power-Features</a><ul><li class=\"moreMenuList $dashboard\" style='margin-left:0px;'><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=dashboard' class='navigationMenu-link' id='module0'>Dashboard</a></li><!--<li class=\"moreMenuList $filemanager\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=filemanager' class = 'navigationMenu-link' id='module1'>File Manager</a></li>--><li class=\"moreMenuList $mappingtemplate\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=mappingtemplate' class='navigationMenu-link' id='module2'>Templates</a></li> <li class=\"moreMenuList $schedulemapping\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=schedulemapping' class = 'navigationMenu-link' id='module3'>Smart Schedule</a></li></ul></li>";
66
  }
67
+ $menuHTML .= "<li class=\"navigationMenu $support\"><a href = 'admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=support' class='navigationMenu-link' id='module16'>Support</a></li>";
68
  $menuHTML .= "</ul>";
69
  $menuHTML .= "<div style='margin-right:10px;width: 250px;float: right;'>";
70
  $menuHTML .= "<span class='prolinks'><a class='label label-info' href='http://www.smackcoders.com/wp-ultimate-csv-importer-pro.html' target='_blank'>GO PRO NOW</a></span>";
71
  $menuHTML .= "<span class='prolinks'><a class='label label-info' href='http://demo.smackcoders.com/demowpthree/wp-admin/admin.php?page=wp-ultimate-csv-importer-pro/index.php&__module=dashboard' target='_blank'>TRY PRO LIVE DEMO NOW</a></span>";
72
  $menuHTML .= "</div>";
73
  $menuHTML .= "</div>";
74
+ //$menuHTML .= "<div style='width:100%;padding-bottom:30px;'>";
75
+ /*$menuHTML .= '<div class="">
76
  <label class="plugintags"><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer" target="_blank">WIKI</a></label>
77
  <label class="plugintags"><a href="http://wiki.smackcoders.com/WP_Ultimate_CSV_Importer_FAQ" target="_blank">FAQ</a></label>
78
  <label class="plugintags"><a href="http://blog.smackcoders.com/category/free-wordpress-plugins/wordpress-ultimate-csv-importer-plugin/" target="_blank">TUTORIALS</a></label>
97
  }
98
  if(isset ($_REQUEST['__module']) && $_REQUEST['__module'] == 'support'){
99
  $menuHTML .= "<div style='float:right;margin-right:15px;'>Current Version: ".$get_pluginData['Version']." <a class='label label-info' href='http://wordpress.org/plugins/wp-ultimate-csv-importer/developers/'>Get Old Versions</a></div>";
100
+ }*/
101
+ //$menuHTML .= "</div>";
102
  $menuHTML .= "<div class='msg' id = 'showMsg' style = 'display:none;'></div>";
103
  $menuHTML .= "<input type='hidden' id='current_url' name='current_url' value='".get_admin_url()."admin.php?page=".WP_CONST_ULTIMATE_CSV_IMP_SLUG."/index.php&__module=".$_REQUEST['__module']."&step=uploadfile'/>";
104
  echo $menuHTML;