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