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