PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.3.6
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.3.6
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 / export / process.php
wp-all-export / views / admin / export Last commit date
blocks 4 years ago options 4 years ago template 4 years ago google.php 4 years ago index.php 4 years ago options.php 4 years ago process.php 4 years ago success_page.php 4 years ago template.php 4 years ago variation_options.php 4 years ago variation_options_common.php 4 years ago
process.php
243 lines
1 <?php
2 if(!defined('ABSPATH')) {
3 die();
4 }
5 ?>
6 <h2 class="wpallexport-wp-notices"></h2>
7
8 <div class="inner-content wpallexport-step-6 wpallexport-wrapper">
9
10 <div class="wpallexport-header">
11 <div class="wpallexport-logo"></div>
12 <div class="wpallexport-title">
13 <h2><?php esc_html_e('Confirm & Run', 'wp_all_export_plugin'); ?></h2>
14 </div>
15 <div class="wpallexport-links">
16 <a href="http://www.wpallimport.com/support/?utm_source=export-plugin-free&utm_medium=help&utm_campaign=premium-support"
17 target="_blank"><?php esc_html_e('Support', 'wp_all_export_plugin'); ?></a> | <a
18 href="http://www.wpallimport.com/documentation/?utm_source=export-plugin-free&utm_medium=help&utm_campaign=docs"
19 target="_blank"><?php esc_html_e('Documentation', 'wp_all_export_plugin'); ?></a>
20 </div>
21
22 <div class="clear"></div>
23 <div class="processing_step_1">
24
25 <div class="clear"></div>
26
27 <div class="step_description">
28 <h2><?php echo wp_kses_post('Export <span id="status">in Progress...</span>', 'wp_all_export_plugin') ?></h2>
29 <h3 id="process_notice"><?php esc_html_e('Exporting may take some time. Please do not close your browser or refresh the page until the process is complete.', 'wp_all_export_plugin'); ?></h3>
30 </div>
31 <div
32 class="wpallexport_process_wrapper_<?php echo intval($update_previous->id); ?> wpallexport_process_parent_wrapper">
33 <div class="wpallexport_processbar rad14">
34 <div class="rad14"></div>
35 </div>
36 <div class="export_progress">
37 <span class="left_progress"><?php esc_html_e('Time Elapsed', 'wp_all_export_plugin'); ?> <span id="then">00:00:00</span></span>
38 <span class="center_progress"><span class="percents_count">0</span>%</span>
39 <span class="right_progress"><?php esc_html_e('Exported', 'wp_all_export_plugin'); ?> <span
40 class="created_count"><?php echo intval($update_previous->exported); ?></span></span>
41 </div>
42 </div>
43 <?php
44 if ((XmlExportEngine::get_addons_service()->isWooCommerceAddonActive() || XmlExportEngine::get_addons_service()->isWooCommerceOrderAddonActive() ) && XmlExportWooCommerceOrder::$is_active && $update_previous->options['export_type'] == 'specific') {
45
46 $exportList = new PMXE_Export_List();
47 foreach ($exportList->getBy('parent_id', $update_previous->id)->convertRecords() as $child_export) {
48 $is_render_child_progress = true;
49 switch ($child_export->export_post_type) {
50 case 'product':
51 if (!$update_previous->options['order_include_poducts']) $is_render_child_progress = false;
52 break;
53 case 'shop_coupon':
54 if (!$update_previous->options['order_include_coupons']) $is_render_child_progress = false;
55 break;
56 case 'shop_customer':if (!$update_previous->options['order_include_customers']) $is_render_child_progress = false;
57 break;
58 }
59
60 if (!$is_render_child_progress) continue;
61
62 ?>
63 <div class="clear"></div>
64 <div
65 class="wpallexport_process_wrapper_<?php echo intval($child_export->id); ?> wpallexport_process_child_wrapper">
66 <div class="wpallexport_processbar rad14">
67 <div class="rad14"></div>
68 </div>
69 <div class="export_progress">
70 <span class="left_progress">
71 <span class="center_progress">
72 <span
73 class="percents_count">0</span>%</span> <?php printf(esc_html__("Export %ss", "wp_all_export_plugin"), ucwords(str_replace("_", " ", str_replace("shop", "", esc_html($child_export->export_post_type))))); ?></span>
74 <span class="right_progress"><?php esc_html_e('Exported', 'wp_all_export_plugin'); ?> <span
75 class="created_count">0</span></span>
76 </div>
77 </div>
78 <?php
79 }
80
81 } ?>
82 </div>
83
84 <span id="wpallexport-error-terminated" style="display: none;">
85 <div class="wpallexport-content-section" style="display:block; position: relative;">
86 <div class="wpallexport-notify-wrapper">
87 <div class="found_records terminated" style="background-position: 0 50% !important;">
88 <h3><?php esc_html_e('Your server terminated the export process', 'wp_all_export_plugin'); ?></h3>
89 <h4 style="width: 78%; line-height: 25px;"><?php esc_html_e("Ask your host to check your server's error log. They will be able to determine why your server is terminating the export process.", "wp_all_export_plugin"); ?></h4>
90 </div>
91 </div>
92 </div>
93 </span>
94 <?php include ('success_page.php'); ?>
95
96
97 </div>
98
99 <a href="http://soflyy.com/" target="_blank"
100 class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
101
102 </div>
103
104 <script type="text/javascript">
105 (function ($) {
106 function toHHMMSS(string)
107 {
108 var sec_num = parseInt(string, 10); // don't forget the second param
109 var hours = Math.floor(sec_num / 3600);
110 var minutes = Math.floor((sec_num - (hours * 3600)) / 60);
111 var seconds = sec_num - (hours * 3600) - (minutes * 60);
112
113 if (hours < 10) {hours = "0"+hours;}
114 if (minutes < 10) {minutes = "0"+minutes;}
115 if (seconds < 10) {seconds = "0"+seconds;}
116 return hours+':'+minutes+':'+seconds;
117
118 }
119 $(function () {
120
121 $('#status').each(function () {
122 var $this = $(this);
123 if ($this.html().match(/\.{3}$/)) {
124 var dots = 0;
125 var status = $this.html().replace(/\.{3}$/, '');
126 var interval;
127 interval = setInterval(function () {
128 if ($this.html().match(new RegExp(status + '\\.{1,3}$', ''))) {
129 $this.html(status + '...'.substr(0, dots++ % 3 + 1));
130 } else {
131 $('#process_notice').hide();
132 clearInterval(interval);
133 }
134 }, 1000);
135 }
136
137 var then = $('#then');
138 var start_date = new Date();
139 var current_date = new Date();
140
141 update = function () {
142 current_date = Date.now();
143 var duration = Math.floor((current_date - start_date)/1000);
144 duration = toHHMMSS(duration);
145 if ($('#process_notice').is(':visible')) then.html(duration);
146 };
147 update();
148 setInterval(update, 1000);
149
150 interval = setInterval(function () {
151
152 $('div[class^=wpallexport_process_wrapper]').each(function () {
153 var percents = $(this).find('.percents_count').html();
154 $(this).find('.wpallexport_processbar div').css({'width': ((parseInt(percents) > 100 || percents == undefined) ? 100 : percents) + '%'});
155 });
156
157 }, 1000);
158
159 $('.wpallexport_processbar').css({'visibility': 'visible'});
160
161 });
162
163 var request = {
164 action: 'wpallexport',
165 security: wp_all_export_security
166 };
167
168 function wp_all_export_process(queue_export) {
169
170 var $URL = ajaxurl;
171
172 if (queue_export !== false) {
173 $URL += '?id=' + queue_export;
174 }
175 else {
176 if (typeof export_id != "undefined") {
177 if ($URL.indexOf("?") == -1) {
178 $URL += '?id=' + export_id;
179 }
180 else {
181 $URL += '&id=' + export_id;
182 }
183 }
184 }
185
186 $.ajax({
187 type: 'POST',
188 url: $URL,
189 data: request,
190 success: function (response) {
191
192 if (response === null) {
193
194 $('#status').html('Error');
195 window.onbeforeunload = false;
196 $('#process_notice').after(request.responseText);
197 return;
198 }
199
200 var $process_wrapper = $('.wpallexport_process_wrapper_' + response.export_id);
201
202 $process_wrapper.find('.created_count').html(response.exported);
203 $process_wrapper.find('.percents_count').html(response.percentage);
204 $process_wrapper.find('.wpallexport_processbar div').css({'width': response.percentage + '%'});
205
206 if (response.done) {
207 if (response.queue_export) {
208 wp_all_export_process(response.queue_export);
209 }
210 else {
211 $('#status').html('Complete');
212 window.onbeforeunload = false;
213
214 setTimeout(function () {
215
216 $('#export_finished').fadeIn();
217
218 }, 1000);
219 }
220 }
221 else {
222 wp_all_export_process(response.export_id);
223 }
224 },
225 error: function (request, status, error) {
226 $('#status').html('Error');
227 window.onbeforeunload = false;
228 $('#process_notice').after(request.responseText);
229 $('#wpallexport-error-terminated').show();
230 },
231 dataType: "json"
232 });
233 };
234
235 wp_all_export_process(<?php echo intval($update_previous->id); ?>);
236
237 window.onbeforeunload = function () {
238 return 'WARNING:\nExport process in under way, leaving the page will interrupt\nthe operation and most likely to cause leftovers in posts.';
239 };
240
241 });
242 })(jQuery);
243 </script>