PluginProbe ʕ •ᴥ•ʔ
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets / 3.2.2
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets v3.2.2
4.1.1 3.9.5 3.9.6 4.0.0 4.0.1 4.1.0 trunk 2.12 2.13 2.14 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9 3.7.0 3.7.1 3.7.2 3.7.3 3.7.3-beta-1.0 3.7.4 3.7.4-beta-1.0 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8.0 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4
wp-all-import / views / admin / import / index.php
wp-all-import / views / admin / import Last commit date
options 11 years ago template 11 years ago confirm.php 11 years ago element.php 11 years ago error.php 11 years ago evaluate.php 11 years ago evaluate_variations.php 11 years ago index.php 11 years ago options.php 11 years ago preview.php 11 years ago preview_images.php 11 years ago preview_prices.php 11 years ago preview_taxonomies.php 11 years ago process-complete.php 11 years ago process.php 11 years ago tag.php 11 years ago template.php 11 years ago warning.php 11 years ago
index.php
246 lines
1 <!-- Preload Images -->
2
3 <img src="<?php echo PMXI_Plugin::ROOT_URL . '/static/img/soflyy-logo.png'; ?>" class="wpallimport-preload-image"/>
4
5 <?php
6
7 $l10n = array(
8 'queue_limit_exceeded' => 'You have attempted to queue too many files.',
9 'file_exceeds_size_limit' => 'This file exceeds the maximum upload size for this site.',
10 'zero_byte_file' => 'This file is empty. Please try another.',
11 'invalid_filetype' => 'This file type is not allowed. Please try another.',
12 'default_error' => 'An error occurred in the upload. Please try again later.',
13 'missing_upload_url' => 'There was a configuration error. Please contact the server administrator.',
14 'upload_limit_exceeded' => 'You may only upload 1 file.',
15 'http_error' => 'HTTP error.',
16 'upload_failed' => 'Upload failed.',
17 'io_error' => 'IO error.',
18 'security_error' => 'Security error.',
19 'file_cancelled' => 'File canceled.',
20 'upload_stopped' => 'Upload stopped.',
21 'dismiss' => 'Dismiss',
22 'crunching' => 'Crunching&hellip;',
23 'deleted' => 'moved to the trash.',
24 'error_uploading' => 'has failed to upload due to an error',
25 'cancel_upload' => 'Cancel upload',
26 'dismiss' => 'Dismiss'
27 );
28
29 ?>
30 <script type="text/javascript">
31 var plugin_url = '<?php echo PMXI_ROOT_URL; ?>';
32 var swfuploadL10n = <?php echo json_encode($l10n); ?>;
33 </script>
34
35 <table class="wpallimport-layout wpallimport-step-1">
36 <tr>
37 <td class="left">
38 <div class="wpallimport-wrapper">
39 <h2 class="wpallimport-wp-notices"></h2>
40 <div class="wpallimport-header">
41 <div class="wpallimport-logo"></div>
42 <div class="wpallimport-title">
43 <p><?php _e('WP All Import', 'pmxi_plugin'); ?></p>
44 <h2><?php _e('Import XML / CSV', 'pmxi_plugin'); ?></h2>
45 </div>
46 <div class="wpallimport-links">
47 <a href="http://www.wpallimport.com/support/" target="_blank"><?php _e('Support', 'pmxi_plugin'); ?></a> | <a href="http://www.wpallimport.com/documentation/" target="_blank"><?php _e('Documentation', 'pmxi_plugin'); ?></a>
48 </div>
49 </div>
50
51 <div class="clear"></div>
52
53 <?php if ($this->errors->get_error_codes()): ?>
54 <?php $this->error() ?>
55 <?php endif ?>
56
57 <?php
58 if ( ! $reimported_import->isEmpty()):
59 ?>
60 <div class="wpallimport-reimported-notify">
61 <p><?php _e( 'You are importing a new file for: <b>' . $reimported_import->name . '</b>' , 'pmxi_plugin' );?></p>
62 <p><span><?php _e( 'Last imported on ' . date("m-d-Y H:i:s", strtotime($reimported_import->registered_on)) , 'pmxi_plugin' ); ?></span></p>
63 </div>
64 <?php
65 endif;
66 ?>
67
68 <?php //do_action('pmxi_choose_file_header'); ?>
69
70 <form method="post" class="wpallimport-choose-file" enctype="multipart/form-data" autocomplete="off">
71
72 <div class="wpallimport-upload-resource-step-one">
73
74 <input type="hidden" name="is_submitted" value="1" />
75
76 <?php wp_nonce_field('upload-xml', '_wpnonce_upload-xml') ?>
77
78 <div class="clear"></div>
79
80 <div class="wpallimport-import-types">
81 <h2><?php _e('First, specify how you want to import your data', 'pmxi_plugin'); ?></h2>
82 <a class="wpallimport-import-from wpallimport-upload-type <?php echo ('upload' == $post['type'] and ! empty($_POST)) ? 'selected' : '' ?>" rel="upload_type" href="javascript:void(0);">
83 <span class="wpallimport-icon"></span>
84 <span class="wpallimport-icon-label"><?php _e('Upload a file', 'pmxi_plugin'); ?></span>
85 </a>
86 <a class="wpallimport-import-from wpallimport-url-type <?php echo 'url' == $post['type'] ? 'selected' : '' ?>" rel="url_type" href="javascript:void(0);">
87 <span class="wpallimport-icon"></span>
88 <span class="wpallimport-icon-label"><?php _e('Download from URL', 'pmxi_plugin'); ?></span>
89 </a>
90 <a class="wpallimport-import-from wpallimport-file-type <?php echo 'file' == $post['type'] ? 'selected' : '' ?>" rel="file_type" href="javascript:void(0);">
91 <span class="wpallimport-icon"></span>
92 <span class="wpallimport-icon-label"><?php _e('Use existing file', 'pmxi_plugin'); ?></span>
93 </a>
94 </div>
95
96 <input type="hidden" value="<?php echo $post['type']; ?>" name="type"/>
97
98 <div class="wpallimport-upload-type-container" rel="upload_type">
99 <div id="plupload-ui" class="wpallimport-file-type-options">
100 <div>
101 <input type="hidden" name="filepath" value="<?php echo $post['filepath'] ?>" id="filepath"/>
102 <a id="select-files" href="javascript:void(0);"/><?php _e('Click here to select file from your computer...', 'pmxi_plugin'); ?></a>
103 <div id="progressbar" class="wpallimport-progressbar">
104
105 </div>
106 <div id="progress" class="wpallimport-progress">
107 <div id="upload_process" class="wpallimport-upload-process"></div>
108 </div>
109 </div>
110 </div>
111 </div>
112 <div class="wpallimport-upload-type-container" rel="url_type">
113 <div class="wpallimport-file-type-options">
114 <span class="wpallimport-url-icon"></span>
115 <input type="text" class="regular-text" name="url" value="<?php echo ( ! empty($post['url'])) ? esc_attr($post['url']) : ''; ?>" placeholder="Enter a web address to download the file from..."/>
116 <a class="wpallimport-download-from-url rad4" href="javascript:void(0);"><?php _e('Download', 'pmxi_plugin'); ?></a>
117 <span class="img_preloader" style="top:0; left: 5px; visibility: hidden; display: inline;"></span>
118 </div>
119 <div class="wpallimport-note" style="margin: 20px auto 0; font-size: 13px;">
120 <?php _e('<strong>Hint:</strong> After you create this import, you can schedule it to run automatically, on a pre-defined schedule, with cron jobs. If anything in your file has changed, WP All Import can update your site with the changed data automatically.', 'pmxi_plugin'); ?>
121 <div class="wpallimport-free-edition-notice" style="display:none;">
122 <a href="http://www.wpallimport.com/upgrade-to-pro/?utm_source=free-plugin&utm_medium=in-plugin&utm_campaign=download-from-url" target="_blank" class="upgrade_link"><?php _e('Upgrade to the professional edition of WP All Import to use this feature.', 'pmxi_plugin');?></a>
123 </div>
124 </div>
125 <input type="hidden" name="downloaded" value="<?php echo $post['downloaded']; ?>"/>
126 </div>
127 <div class="wpallimport-upload-type-container" rel="file_type">
128 <?php $upload_dir = wp_upload_dir(); ?>
129 <div class="wpallimport-file-type-options">
130
131 <div id="file_selector" class="dd-container dd-disabled" style="width: 600px;">
132 <div class="dd-select" style="width: 600px; background: none repeat scroll 0% 0% rgb(238, 238, 238);">
133 <input type="hidden" class="dd-selected-value" value="">
134 <a class="dd-selected" style="color: rgb(207, 206, 202);">
135 <label class="dd-selected-text "><?php _e('Select a previously uploaded file', 'pmxi_plugin');?></label>
136 </a>
137 <span class="dd-pointer dd-pointer-down"></span>
138 </div>
139 </div>
140
141 <input type="hidden" name="file" value="<?php echo esc_attr($post['file']); ?>"/>
142
143 <div class="wpallimport-note" style="margin: 0 auto; font-size: 13px;">
144 <?php printf(__('Upload files to <strong>%s</strong> and they will appear in this list', 'pmxi_plugin'), $upload_dir['basedir'] . '/wpallimport/files') ?>
145 <div class="wpallimport-free-edition-notice">
146 <a href="http://www.wpallimport.com/upgrade-to-pro/?utm_source=free-plugin&utm_medium=in-plugin&utm_campaign=use-existing-file" target="_blank" class="upgrade_link"><?php _e('Upgrade to the professional edition of WP All Import to use this feature.', 'pmxi_plugin');?></a>
147 </div>
148 </div>
149 </div>
150 </div>
151 <div id="wpallimport-url-upload-status"></div>
152
153 <div class="wpallimport-upload-resource-step-two">
154
155 <div class="wpallimport-choose-post-type">
156
157 <input type="hidden" name="wizard_type" value="<?php echo $post['wizard_type']; ?>"/>
158
159 <h2 style="margin-top:0;"><?php _e('Import data from this file into...', 'pmxi_plugin'); ?></h2>
160
161 <div class="wpallimport-choose-data-type">
162 <a class="wpallimport-import-to rad4 wpallimport-to-new-items <?php if ($post['wizard_type'] == 'new') echo 'wpallimport-import-to-checked'; ?>" rel="new" href="javascript:void(0);">
163 <span class="wpallimport-import-to-title"><?php _e('New Items', 'pmxi_plugin'); ?></span>
164 <span class="wpallimport-import-to-arrow"></span>
165 </a>
166 <a class="wpallimport-import-to rad4 wpallimport-to-existing-items <?php if ($post['wizard_type'] == 'matching') echo 'wpallimport-import-to-checked'; ?>" rel="matching" href="javascript:void(0);">
167 <span class="wpallimport-import-to-title"><?php _e('Existing Items', 'pmxi_plugin'); ?></span>
168 <span class="wpallimport-import-to-arrow"></span>
169 </a>
170 </div>
171
172 <?php
173
174 $custom_types = get_post_types(array('_builtin' => true), 'objects') + get_post_types(array('_builtin' => false, 'show_ui' => true), 'objects');
175 foreach ($custom_types as $key => $ct) {
176 if (in_array($key, array('attachment', 'revision', 'nav_menu_item'))) unset($custom_types[$key]);
177 }
178 $custom_types = apply_filters( 'pmxi_custom_types', $custom_types );
179
180 $hidden_post_types = get_post_types(array('_builtin' => false, 'show_ui' => false), 'objects');
181 foreach ($hidden_post_types as $key => $ct) {
182 if (in_array($key, array('attachment', 'revision', 'nav_menu_item'))) unset($hidden_post_types[$key]);
183 }
184 $hidden_post_types = apply_filters( 'pmxi_custom_types', $hidden_post_types );
185
186 ?>
187 <div class="wpallimport-choose-import-direction">
188 <div class="wpallimport-extra-text-left">
189 <div class="wpallimport-new-records"><?php _e('Create new', 'pmxi_plugin'); ?></div>
190 <div class="wpallimport-existing-records"><?php _e('Import to existing', 'pmxi_plugin'); ?></div>
191 </div>
192 <div class="wpallimport-extra-text-right">
193 <div class="wpallimport-new-records"><?php _e('for each record in my data file.', 'pmxi_plugin'); ?></div>
194 <div class="wpallimport-existing-records"><?php _e('and update some or all of their data.', 'pmxi_plugin'); ?>
195 <a class="wpallimport-help" href="#help" style="position: relative; top: -2px;" original-title="The Existing Items option is commonly used to update existing products with new stock quantities while leaving all their other data alone, update properties on your site with new pricing, etc. <br/><br/> In Step 4, you will map the records in your file to the existing items on your site and specify which data points will be updated and which will be left alone.">?</a>
196 </div>
197 </div>
198 <select name="custom_type_selector" id="custom_type_selector" class="wpallimport-post-types">
199 <?php if ( ! empty($custom_types)): ?>
200 <?php foreach ($custom_types as $key => $cpt) :?>
201 <?php
202 $image_src = 'dashicon-cpt';
203 if ( in_array($key, array('post', 'page', 'product', 'import_users') ) )
204 $image_src = 'dashicon-' . $key;
205 ?>
206 <option value="<?php echo $key; ?>" data-imagesrc="dashicon <?php echo $image_src; ?>"><?php echo $cpt->labels->name; ?></option>
207 <?php endforeach; ?>
208 <?php endif; ?>
209 <?php if ( ! empty($hidden_post_types)): ?>
210 <?php foreach ($hidden_post_types as $key => $cpt) :?>
211 <?php
212 $image_src = 'dashicon-cpt';
213 if ( in_array($key, array('post', 'page', 'product') ) )
214 $image_src = 'dashicon-' . $key;
215 ?>
216 <option value="<?php echo $key; ?>" data-imagesrc="dashicon <?php echo $image_src; ?>"><?php echo $cpt->labels->name; ?></option>
217 <?php endforeach; ?>
218 <?php endif; ?>
219 </select>
220 </div>
221 <div class="clear wpallimport-extra-text-below">
222 <!--div class="wpallimport-existing-records">
223 <p><?php _e('In Step 4, you will map the records in your file to the existing items on your site and specify which data points will be updated and which will be left alone.', 'pmxi_plugin'); ?></p>
224 <p><?php _e('The Existing Items option is commonly used to update existing products with new stock quantities while leaving all their other data alone, update properties on your site with new pricing, etc.', 'pmxi_plugin'); ?></p>
225 </div-->
226 </div>
227 </div>
228 </div>
229
230 </div>
231
232 <p class="wpallimport-submit-buttons">
233 <input type="hidden" name="custom_type" value="<?php echo $post['custom_type'];?>">
234 <input type="hidden" name="is_submitted" value="1" />
235 <?php wp_nonce_field('choose-file', '_wpnonce_choose-file'); ?>
236 <input type="submit" class="button button-primary button-hero wpallimport-large-button" value="<?php _e('Continue to Step 2', 'pmxi_plugin') ?>" id="advanced_upload"/>
237 </p>
238
239 <table><tr><td class="wpallimport-note"></td></tr></table>
240 </form>
241 <a href="http://soflyy.com/" target="_blank" class="wpallimport-created-by"><?php _e('Created by', 'pmxi_plugin'); ?> <span></span></a>
242 </div>
243 </td>
244 </tr>
245 </table>
246