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