PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.2.10
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.2.10
trunk 0.9.0 0.9.1 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0
wp-all-export / views / admin / manage / index.php
wp-all-export / views / admin / manage Last commit date
bulk.php 4 years ago delete.php 4 years ago index.php 4 years ago scheduling.php 4 years ago templates.php 4 years ago update.php 4 years ago
index.php
446 lines
1 <?php
2 $addons = new \Wpae\App\Service\Addons\AddonService();
3 ?>
4
5 <div class="wpallexport-header" style="overflow:hidden; height: 70px; padding-top: 10px; margin-bottom: -15px;">
6 <div class="wpallexport-logo"></div>
7 <div class="wpallexport-title">
8 <h3><?php _e('Manage Exports', 'wp_all_export_plugin'); ?></h3>
9 </div>
10 </div>
11 <!-- TO DO: REMOVE THIS SNIPPET -->
12 <script type="text/javascript">
13 (function ($, ajaxurl, wp_all_export_security) {
14
15 $(document).ready(function () {
16 $('.test').on('click', function () {
17
18 var addon = 'wooco';
19 openUpgradeNotice(addon, $(this), '<?php echo PMXE_ROOT_URL; ?>/static/img/preloader.gif');
20 });
21 });
22 })(jQuery, ajaxurl, wp_all_export_security);
23 </script>
24 <!-- END TO DO -->
25 <a class="test">Test</a>
26 <h2></h2> <!-- Do not remove -->
27
28 <script type="text/javascript">
29 (function ($, ajaxurl, wp_all_export_security) {
30
31 $(document).ready(function () {
32 $('.open_cron_scheduling').click(function () {
33
34 var itemId = $(this).data('itemid');
35 openSchedulingDialog(itemId, $(this), '<?php echo PMXE_ROOT_URL; ?>/static/img/preloader.gif');
36 });
37 });
38 })(jQuery, ajaxurl, wp_all_export_security);
39
40 window.pmxeHasSchedulingSubscription = <?php echo PMXE_Plugin::hasActiveSchedulingLicense() ? 'true' : 'false'; ?>;
41 </script>
42 <?php if ($this->errors->get_error_codes()): ?>
43 <?php $this->error() ?>
44 <?php endif ?>
45
46 <form method="get">
47 <input type="hidden" name="page" value="<?php echo esc_attr($this->input->get('page')) ?>"/>
48 <p class="search-box">
49 <label for="search-input" class="screen-reader-text"><?php _e('Search Exports', 'wp_all_export_plugin') ?>
50 :</label>
51 <input id="search-input" type="text" name="s" value="<?php echo esc_attr($s) ?>"/>
52 <input type="submit" class="button" value="<?php _e('Search Exports', 'wp_all_export_plugin') ?>">
53 </p>
54 </form>
55
56 <?php
57 // define the columns to display, the syntax is 'internal name' => 'display name'
58 $columns = array(
59 'id' => __('ID', 'wp_all_export_plugin'),
60 'name' => __('Name', 'wp_all_export_plugin'),
61 'actions' => '',
62 'data' => __('Query', 'wp_all_export_plugin'),
63 //'format' => __('Format', 'wp_all_export_plugin'),
64 'summary' => __('Summary', 'wp_all_export_plugin'),
65 //'registered_on' => __('Last Export', 'wp_all_export_plugin'),
66 'info' => __('Info & Options', 'wp_all_export_plugin'),
67 );
68
69 //if ( ! wp_all_export_is_compatible()) unset($columns['info']);
70
71 $columns = apply_filters('pmxe_manage_imports_columns', $columns);
72
73 ?>
74
75 <form method="post" id="import-list" action="<?php echo remove_query_arg('pmxe_nt') ?>">
76
77 <input type="hidden" name="action" value="bulk"/>
78 <?php wp_nonce_field('bulk-exports', '_wpnonce_bulk-exports') ?>
79
80 <div class="tablenav">
81 <div class="alignleft actions">
82 <select name="bulk-action">
83 <option value="" selected="selected"><?php _e('Bulk Actions', 'wp_all_export_plugin') ?></option>
84 <option value="delete"><?php _e('Delete', 'wp_all_export_plugin') ?></option>
85 </select>
86 <input type="submit" value="<?php esc_attr_e('Apply', 'wp_all_export_plugin') ?>" name="doaction"
87 id="doaction" class="button-secondary action"/>
88 </div>
89
90 <?php if ($page_links): ?>
91 <div class="tablenav-pages">
92 <?php echo $page_links_html = sprintf(
93 '<span class="displaying-num">' . __('Displaying %s&#8211;%s of %s', 'wp_all_export_plugin') . '</span>%s',
94 number_format_i18n(($pagenum - 1) * $perPage + 1),
95 number_format_i18n(min($pagenum * $perPage, $list->total())),
96 number_format_i18n($list->total()),
97 $page_links
98 ) ?>
99 </div>
100 <?php endif ?>
101 </div>
102 <div class="clear"></div>
103
104 <table class="widefat pmxe-admin-exports">
105 <thead>
106 <tr>
107 <th class="manage-column column-cb check-column" scope="col">
108 <input type="checkbox" />
109 </th>
110 <?php
111 $col_html = '';
112 foreach ($columns as $column_id => $column_display_name) {
113 $column_link = "<a href='";
114 $order2 = 'ASC';
115 if ($order_by == $column_id)
116 $order2 = ($order == 'DESC') ? 'ASC' : 'DESC';
117
118 $column_link .= esc_url(add_query_arg(array('order' => $order2, 'order_by' => $column_id), $this->baseUrl));
119 $column_link .= "'>{$column_display_name}</a>";
120 $col_html .= '<th scope="col" class="column-' . $column_id . ' ' . ($order_by == $column_id ? $order : '') . '">' . $column_link . '</th>';
121 }
122 echo $col_html;
123 ?>
124 </tr>
125 </thead>
126 <tfoot>
127 <tr>
128 <th class="manage-column column-cb check-column" scope="col">
129 <input type="checkbox" />
130 </th>
131 <?php echo $col_html; ?>
132 </tr>
133 </tfoot>
134 <tbody id="the-pmxi-admin-import-list" class="list:pmxe-admin-exports">
135 <?php if ($list->isEmpty()): ?>
136 <tr>
137 <td colspan="<?php echo count($columns) + 1 ?>"><?php _e('No previous exports found.', 'wp_all_export_plugin') ?></td>
138 </tr>
139 <?php else: ?>
140 <?php
141
142 $is_secure_import = PMXE_Plugin::getInstance()->getOption('secure');
143
144 $class = '';
145 ?>
146 <?php foreach ($list as $item):?>
147 <?php $class = ('alternate' == $class) ? '' : 'alternate'; ?>
148 <tr class="<?php echo $class; ?>" valign="middle">
149 <th scope="row" class="check-column">
150 <input type="checkbox" id="item_<?php echo $item['id'] ?>" name="items[]" value="<?php echo esc_attr($item['id']) ?>" />
151 </th>
152 <?php foreach ($columns as $column_id => $column_display_name): ?>
153 <?php
154 switch ($column_id):
155 case 'id':
156 ?>
157 <th valign="top" scope="row">
158 <?php echo $item['id'] ?>
159 </th>
160 <?php
161 break;
162 case 'name':
163 ?>
164 <td style="min-width: 325px;">
165 <strong><?php echo $item['friendly_name']; ?></strong> <br>
166 <div class="row-actions">
167 <span class="edit"><a class="edit" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'template'), $this->baseUrl)) ?>"><?php _e('Edit Export', 'wp_all_export_plugin') ?></a></span> |
168 <span class="edit"><a class="edit" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'options'), $this->baseUrl)) ?>"><?php _e('Export Settings', 'wp_all_export_plugin') ?></a></span> |
169
170 <?php if ( ! $is_secure_import and $item['attch_id']): ?>
171 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'get_file', '_wpnonce' => wp_create_nonce( '_wpnonce-download_feed' )), $this->baseUrl)) ?>"><?php echo strtoupper(wp_all_export_get_export_format($item['options'])); ?></a></span> |
172 <?php if (! empty($item['options']['bundlepath']) and PMXE_Export_Record::is_bundle_supported($item['options'])):?>
173 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'bundle', '_wpnonce' => wp_create_nonce( '_wpnonce-download_bundle' )), $this->baseUrl)) ?>"><?php _e('Bundle', 'wp_all_export_plugin'); ?></a></span> |
174 <?php endif; ?>
175 <?php endif; ?>
176
177 <?php if ($is_secure_import and ! empty($item['options']['filepath'])): ?>
178 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'get_file', '_wpnonce' => wp_create_nonce( '_wpnonce-download_feed' )), $this->baseUrl)) ?>"><?php echo strtoupper(wp_all_export_get_export_format($item['options'])); ?></a></span> |
179 <?php if (! empty($item['options']['bundlepath']) and PMXE_Export_Record::is_bundle_supported($item['options'])):?>
180 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'bundle', '_wpnonce' => wp_create_nonce( '_wpnonce-download_bundle' )), $this->baseUrl)) ?>"><?php _e('Bundle', 'wp_all_export_plugin'); ?></a></span> |
181 <?php endif; ?>
182 <?php endif; ?>
183
184 <?php if ( ! empty($item['options']['split_large_exports']) and ! empty($item['options']['split_files_list']) ): ?>
185 <span class="update"><a class="update" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'split_bundle', '_wpnonce' => wp_create_nonce( '_wpnonce-download_split_bundle' )), $this->baseUrl)) ?>"><?php printf(__('Split %ss', 'wp_all_export_plugin'), strtoupper(wp_all_export_get_export_format($item['options']))); ?></a></span> |
186 <?php endif; ?>
187
188 <span class="delete"><a class="delete" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'delete'), $this->baseUrl)) ?>"><?php _e('Delete', 'wp_all_export_plugin') ?></a></span>
189 </div>
190 </td>
191 <?php
192 break;
193 case 'info':
194 ?>
195 <td style="min-width: 180px;">
196 <a <?php
197 if (!is_array($item['options']['cpt'])) {
198 $item['options']['cpt'] = array($item['options']['cpt']);
199 }
200 if (
201 ((in_array('users', $item['options']['cpt']) || in_array('shop_customer', $item['options']['cpt'])) && !$addons->isUserAddonActive()) ||
202 ($item['options']['export_type'] == 'advanced' && $item['options']['wp_query_selector'] == 'wp_user_query' && !$addons->isUserAddonActive())
203 ) {
204 ?>
205 href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'update'), $this->baseUrl)) ?>"
206 <?php
207 } else {
208 ?>
209 href="#" class="open_cron_scheduling"
210 <?php } ?>
211 data-itemid="<?php echo $item['id']; ?>"><?php _e('Scheduling Options', 'wp_all_export_plugin'); ?></a>
212 <br>
213 <?php
214 $is_re_import_allowed = true;
215 if ( ! empty($item['options']['ids']) )
216 {
217 if (in_array('shop_order', $item['options']['cpt']) and class_exists('WooCommerce')) {
218 $required_fields = array('woo_order' => 'id');
219 }
220 else {
221 $required_fields = array('id' => 'id');
222 }
223 // re-import products
224 if ((in_array('product', $item['options']['cpt']) or $item['options']['export_type'] == 'advanced') and class_exists('WooCommerce') and (empty($item['options']['wp_query_selector']) or $item['options']['wp_query_selector'] == 'wp_query')) {
225 $required_fields['woo'] = '_sku';
226 $required_fields['cats'] = 'product_type';
227 $required_fields['parent'] = 'parent';
228 }
229 if ((in_array('users', $item['options']['cpt']) or $item['options']['export_type'] == 'advanced') and (!empty($item['options']['wp_query_selector']) and $item['options']['wp_query_selector'] == 'wp_user_query')) {
230 $required_fields['user_email'] = 'user_email';
231 $required_fields['user_login'] = 'user_login';
232 }
233 if ($item['options']['export_type'] == 'advanced' and (empty($item['options']['wp_query_selector']) or $item['options']['wp_query_selector'] == 'wp_query')){
234 $required_fields['post_type'] = 'post_type';
235 }
236 $defined_fields = array();
237 foreach ($item['options']['ids'] as $ID => $value)
238 {
239 foreach ($required_fields as $type => $field)
240 {
241 if (strtolower($item['options']['cc_type'][$ID]) == $type && strtolower($item['options']['cc_label'][$ID]) == strtolower($field)){
242 $defined_fields[] = $field;
243 }
244 }
245 }
246
247 foreach ($required_fields as $type => $field) {
248 if ( ! in_array($field, $defined_fields) ){
249 $is_re_import_allowed = false;
250 break;
251 }
252 }
253
254 // if ($is_re_import_allowed and wp_all_export_is_compatible() and ! empty($item['options']['import_id'])){
255 // $import = new PMXI_Import_Record();
256 // $import->getById($item['options']['import_id']);
257 // if ($import->isEmpty() or $import->parent_import_id == 0){
258 // $item['options']['import_id'] = 0;
259 // }
260 // }
261 }
262
263 ?>
264 <?php if ( $item['options']['export_to'] == 'csv' || ( empty($item['options']['xml_template_type']) || ! in_array($item['options']['xml_template_type'], array('custom', 'XmlGoogleMerchants'))) ): ?>
265 <?php if ( wp_all_export_is_compatible() and !empty($item['options']['import_id']) and $is_re_import_allowed): ?>
266 <a href="<?php echo add_query_arg(array('page' => 'pmxi-admin-import', 'id' => $item['options']['import_id'], 'deligate' => 'wpallexport'), remove_query_arg('page', $this->baseUrl)); ?>"><?php _e("Import with WP All Import", "wp_all_export_plugin"); ?></a><br/>
267 <?php endif;?>
268 <?php
269 if ( !in_array($item['options']['wp_query_selector'], array('wp_comment_query')) and (empty($item['options']['cpt']) or ! in_array('comments', $item['options']['cpt']))) {
270 if ( ! empty($item['options']['tpl_data'])) {
271 //$template->getByName($item['options']['template_name']);
272 //if ( ! $template->isEmpty() ){
273 ?>
274 <a href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'templates'), $this->baseUrl)?>"><?php _e('Download Import Templates', 'wp_all_export_plugin'); ?></a>
275 <?php
276 //}
277 }
278 }
279 ?>
280 <?php endif; ?>
281 </td>
282 <?php
283 break;
284 case 'data':
285 ?>
286 <td>
287 <?php echo (!empty($item['options']['cpt'])) ? '<strong>' . __('Post Types: ') . '</strong> ' . implode(', ', $item['options']['cpt']) : $item['options']['wp_query']; ?>
288 </td>
289 <?php
290 break;
291 case 'format':
292 ?>
293 <td>
294 <strong><?php echo ($item['options']['export_to'] == 'csv' && ! empty($item['options']['export_to_sheet'])) ? $item['options']['export_to_sheet'] : $item['options']['export_to']; ?></strong>
295 </td>
296 <?php
297 break;
298 case 'registered_on':
299 ?>
300 <td>
301 <?php if ('0000-00-00 00:00:00' == $item['registered_on']): ?>
302 <em>never</em>
303 <?php else: ?>
304 <?php echo mysql2date(__('Y/m/d g:i a', 'wp_all_export_plugin'), $item['registered_on']) ?>
305 <?php endif ?>
306 </td>
307 <?php
308 break;
309 case 'summary':
310 ?>
311 <td>
312 <?php
313 if ($item['triggered'] and ! $item['processing']){
314 _e('triggered with cron', 'wp_all_export_plugin');
315 if ($item['last_activity'] != '0000-00-00 00:00:00'){
316 $diff = ceil((time() - strtotime($item['last_activity']))/60);
317 ?>
318 <br>
319 <span <?php if ($diff >= 10) echo 'style="color:red;"';?>>
320 <?php
321 printf(__('last activity %s ago', 'wp_all_export_plugin'), human_time_diff(strtotime($item['last_activity']), time()));
322 ?>
323 </span>
324 <?php
325 }
326 }
327 elseif ($item['processing']){
328 _e('currently processing with cron', 'wp_all_export_plugin'); echo '<br/>';
329 printf('Records Processed %s', $item['exported']);
330 if ($item['last_activity'] != '0000-00-00 00:00:00'){
331 $diff = ceil((time() - strtotime($item['last_activity']))/60);
332 ?>
333 <br>
334 <span <?php if ($diff >= 10) echo 'style="color:red;"';?>>
335 <?php
336 printf(__('last activity %s ago', 'wp_all_export_plugin'), human_time_diff(strtotime($item['last_activity']), time()));
337 ?>
338 </span>
339 <?php
340 }
341 }
342 elseif($item['executing']){
343 _e('Export currently in progress', 'wp_all_export_plugin');
344 if ($item['last_activity'] != '0000-00-00 00:00:00'){
345 $diff = ceil((time() - strtotime($item['last_activity']))/60);
346 ?>
347 <br>
348 <span <?php if ($diff >= 10) echo 'style="color:red;"';?>>
349 <?php
350 printf(__('last activity %s ago', 'wp_all_export_plugin'), human_time_diff(strtotime($item['last_activity']), time()));
351 ?>
352 </span>
353 <?php
354 }
355 }
356 elseif($item['canceled'] and $item['canceled_on'] != '0000-00-00 00:00:00'){
357 printf(__('Export Attempt at %s', 'wp_all_export_plugin'), get_date_from_gmt($item['canceled_on'], "m/d/Y g:i a")); echo '<br/>';
358 _e('Export canceled', 'wp_all_export_plugin');
359 }
360 else{
361 printf(__('Last run: %s', 'wp_all_export_plugin'), ($item['registered_on'] == '0000-00-00 00:00:00') ? __('never', 'wp_all_export_plugin') : get_date_from_gmt($item['registered_on'], "m/d/Y g:i a")); echo '<br/>';
362 printf(__('%d Records Exported', 'wp_all_export_plugin'), $item['exported']); echo '<br/>';
363 $export_to = ($item['options']['export_to'] == 'csv' && ! empty($item['options']['export_to_sheet'])) ? $item['options']['export_to_sheet'] : $item['options']['export_to'];
364 printf(__('Format: %s', 'wp_all_export_plugin'), $export_to); echo '<br/>';
365 //printf(__('%d records', 'wp_all_export_plugin'), $item['post_count']);
366 }
367
368 if ($item['settings_update_on'] != '0000-00-00 00:00:00' and $item['last_activity'] != '0000-00-00 00:00:00' and strtotime($item['settings_update_on']) > strtotime($item['last_activity'])){
369 ?>
370 <strong><?php _e('settings edited since last run', 'wp_all_export_plugin'); ?></strong>
371 <?php
372 }
373
374 ?>
375 </td>
376 <?php
377 break;
378 case 'actions':
379 ?>
380 <td style="min-width: 130px;">
381 <?php if ( ! $item['processing'] and ! $item['executing'] ): ?>
382 <!--h2 style="float:left;"><a class="add-new-h2" href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'edit'), $this->baseUrl); ?>"><?php _e('Edit', 'wp_all_export_plugin'); ?></a></h2-->
383 <h2 style="float:left;"><a class="add-new-h2" href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'update'), $this->baseUrl); ?>"><?php _e('Run Export', 'wp_all_export_plugin'); ?></a></h2>
384 <?php elseif ($item['processing']) : ?>
385 <h2 style="float:left;"><a class="add-new-h2" href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'cancel'), $this->baseUrl); ?>"><?php _e('Cancel Cron', 'wp_all_export_plugin'); ?></a></h2>
386 <?php elseif ($item['executing']) : ?>
387 <h2 style="float:left;"><a class="add-new-h2" href="<?php echo add_query_arg(array('id' => $item['id'], 'action' => 'cancel'), $this->baseUrl); ?>"><?php _e('Cancel', 'wp_all_export_plugin'); ?></a></h2>
388 <?php endif; ?>
389 </td>
390 <?php
391 break;
392 default:
393 ?>
394 <td>
395 <?php do_action('pmxe_manage_imports_column', $column_id, $item); ?>
396 </td>
397 <?php
398 break;
399 endswitch;
400 ?>
401 <?php endforeach; ?>
402 </tr>
403 <?php endforeach; ?>
404 <?php endif ?>
405 </tbody>
406 </table>
407
408 <div class="tablenav">
409 <?php if ($page_links): ?><div class="tablenav-pages"><?php echo $page_links_html ?></div><?php endif ?>
410
411 <div class="alignleft actions">
412 <select name="bulk-action2">
413 <option value="" selected="selected"><?php _e('Bulk Actions', 'wp_all_export_plugin') ?></option>
414 <?php if ( empty($type) or 'trash' != $type): ?>
415 <option value="delete"><?php _e('Delete', 'wp_all_export_plugin') ?></option>
416 <?php else: ?>
417 <option value="restore"><?php _e('Restore', 'wp_all_export_plugin')?></option>
418 <option value="delete"><?php _e('Delete Permanently', 'wp_all_export_plugin')?></option>
419 <?php endif ?>
420 </select>
421 <input type="submit" value="<?php esc_attr_e('Apply', 'wp_all_export_plugin') ?>" name="doaction2" id="doaction2" class="button-secondary action" />
422 </div>
423 </div>
424 <div class="clear"></div>
425
426 <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php _e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
427
428 </form>
429 <div class="wpallexport-overlay"></div>
430 <div class="wpallexport-loader" style="border-radius: 5px; z-index: 999999; display:none; position: fixed;top: 200px; left: 50%; width: 100px;height: 100px;background-color: #fff; text-align: center;">
431 <img style="margin-top: 45%;" src="<?php echo PMXE_ROOT_URL; ?>/static/img/preloader.gif" />
432 </div>
433
434
435 <div class="wpallexport-super-overlay"></div>
436
437 <fieldset class="optionsset column rad4 wp-all-export-scheduling-help">
438
439 <div class="title">
440 <span style="font-size:1.5em;" class="wpallexport-add-row-title"><?php _e('Automatic Scheduling', 'wp_all_export_plugin'); ?></span>
441 </div>
442
443 <?php
444 include_once __DIR__.'/../../../src/Scheduling/views/SchedulingHelp.php';
445 ?>
446 </fieldset>