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