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 / src / Scheduling / views / SchedulingOptions.php
wp-all-export / src / Scheduling / views Last commit date
CommonJs.php 7 years ago ConnectionIcon.php 7 years ago ManualScheduling.php 7 years ago SaveSchedulingButton.php 7 years ago SchedulingHelp.php 7 years ago SchedulingOptions.php 7 years ago SchedulingUI.php 7 years ago
SchedulingOptions.php
866 lines
1 <?php
2 $scheduling = \Wpae\Scheduling\Scheduling::create();
3 $post = $export->options;
4 $hasActiveLicense = $scheduling->checkLicense();
5 $cron_job_key = PMXE_Plugin::getInstance()->getOption('cron_job_key');
6 $options = \PMXE_Plugin::getInstance()->getOption();
7 ?>
8 <style type="text/css">
9 .days-of-week {
10 margin-left: 5px;
11 }
12
13 .days-of-week li {
14 border: 1px solid #ccc;
15 border-radius: 5px;
16 padding: 10px 30px;;
17 display: inline-block;
18 margin-right: 10px;
19 cursor: pointer;
20 font-weight: bold;
21 width: 38px;
22 text-align: center;
23 height: 16px;
24 color: rgb(68,68,68);
25 float: left;
26 }
27
28 .days-of-week li.selected {
29 color: #fff;
30 background-color: #425F9A;
31 border-color: #585858;
32 }
33
34 #weekly, #monthly {
35 height: 40px;
36 }
37
38 .timepicker {
39 width: 100px;
40 padding: 10px;
41 border-radius: 5px;
42 margin-right: 10px;
43 }
44
45 #times {
46 margin-top: 5px;
47 width: 800px;
48 }
49
50 #times input {
51 margin-top: 10px;
52 margin-left: 0;
53 float: left;
54 }
55
56 #times input.error {
57 border-color: red !important;
58 }
59
60 .subscribe {
61
62 }
63
64 .subscribe .button-container {
65 float: left;
66 width: 150px;
67 }
68
69 .subscribe .text-container {
70 float: left;
71 width: auto;
72 }
73
74 .subscribe .text-container p {
75 margin: 0;
76 color: #425F9A;
77 font-size: 14px;
78 font-weight: bold;
79 }
80
81 .subscribe .text-container p a {
82 color: #425F9A;
83 text-decoration: underline;
84 }
85
86 .save {
87 padding-left: 5px;
88 padding-top: 5px;
89 width: auto;
90 }
91
92 .ui-timepicker-wrapper {
93 width: 98px;
94 }
95
96 .easing-spinner {
97 width: 30px;
98 height: 30px;
99 position: relative;
100 display: inline-block;
101
102 margin-top: 7px;
103 margin-left: -25px;
104
105 float: left;
106 }
107
108 .double-bounce1, .double-bounce2 {
109 width: 100%;
110 height: 100%;
111 border-radius: 50%;
112 background-color: #fff;
113 opacity: 0.6;
114 position: absolute;
115 top: 0;
116 left: 0;
117
118 -webkit-animation: sk-bounce 2.0s infinite ease-in-out;
119 animation: sk-bounce 2.0s infinite ease-in-out;
120 }
121
122 .double-bounce2 {
123 -webkit-animation-delay: -1.0s;
124 animation-delay: -1.0s;
125 }
126
127 .wpae-save-button svg {
128 margin-top: 7px;
129 margin-left: -215px;
130 display: inline-block;
131 position: relative;
132 }
133
134 @-webkit-keyframes sk-bounce {
135 0%, 100% {
136 -webkit-transform: scale(0.0)
137 }
138 50% {
139 -webkit-transform: scale(1.0)
140 }
141 }
142
143 @keyframes sk-bounce {
144 0%, 100% {
145 transform: scale(0.0);
146 -webkit-transform: scale(0.0);
147 }
148 50% {
149 transform: scale(1.0);
150 -webkit-transform: scale(1.0);
151 }
152 }
153
154 #add-subscription-field {
155 position: absolute;
156 left: -155px;
157 top: -2px;
158 height: 46px;
159 border-radius: 5px;
160 font-size: 17px;
161 padding-left: 10px;
162 display: none;
163 width: 140px;
164 }
165
166 #find-subscription-link {
167 position: absolute;
168 left: 133px;
169 top: 14px;
170 height:30px;
171 width: 300px;
172 display: none;
173 }
174
175 #find-subscription-link a {
176 display: block;
177 width: 100%;
178 height: 46px;
179 white-space: nowrap;
180 }
181
182 #weekly li.error, #monthly li.error {
183 border-color: red;
184 }
185
186 .chosen-single {
187 margin-bottom: 0 !important;
188 }
189
190 .chosen-container.chosen-with-drop .chosen-drop {
191 margin-top: 0 !important;
192 }
193
194 .wpallexport-preview-content h4{
195 font-size: 14px;
196 margin-bottom: 5px;
197 color: #40acad;
198 text-decoration: none;
199 }
200 .manual-scheduling { margin-left: 26px;}
201 </style>
202
203 <script type="text/javascript">
204 (function ($) {
205 $(function () {
206
207 var hasActiveLicense = <?php echo $hasActiveLicense? 'true':'false'; ?>;
208
209 function isAutomaticSchedulingEnabled() {
210 return $('input[name="scheduling_enable"]:checked').val() == 1;
211 }
212
213 $(document).ready(function () {
214
215 function openSchedulingAccordeonIfClosed() {
216 if ($('.wpallexport-file-options').hasClass('closed')) {
217 // Open accordion
218 $('#scheduling-title').trigger('click');
219 }
220 }
221
222 window.pmxeValidateSchedulingForm = function () {
223
224 var schedulingEnabled = isAutomaticSchedulingEnabled();
225
226 if (!schedulingEnabled) {
227 return {
228 isValid: true
229 };
230 }
231
232 var runOn = $('input[name="scheduling_run_on"]:checked').val();
233
234 // Validate weekdays
235 if (runOn == 'weekly') {
236 var weeklyDays = $('#weekly_days').val();
237
238 if (weeklyDays == '') {
239 $('#weekly li').addClass('error');
240 return {
241 isValid: false,
242 message: 'Please select at least a day on which the export should run'
243 }
244 }
245 } else if (runOn == 'monthly') {
246 var monthlyDays = $('#monthly_days').val();
247
248 if (monthlyDays == '') {
249 $('#monthly li').addClass('error');
250 return {
251 isValid: false,
252 message: 'Please select at least a day on which the export should run'
253 }
254 }
255 }
256
257 // Validate times
258 var timeValid = true;
259 var timeMessage = 'Please select at least a time for the export to run';
260 var timeInputs = $('.timepicker');
261 var timesHasValues = false;
262
263 timeInputs.each(function (key, $elem) {
264
265 if($(this).val() !== ''){
266 timesHasValues = true;
267 }
268
269 if (!$(this).val().match(/^(0?[1-9]|1[012])(:[0-5]\d)[APap][mM]$/) && $(this).val() != '') {
270 $(this).addClass('error');
271 timeValid = false;
272 } else {
273 $(this).removeClass('error');
274 }
275 });
276
277 if(!timesHasValues) {
278 timeValid = false;
279 $('.timepicker').addClass('error');
280 }
281
282 if (!timeValid) {
283 return {
284 isValid: false,
285 message: timeMessage
286 };
287 }
288
289 return {
290 isValid: true
291 };
292 };
293
294
295
296 $('#weekly li').click(function () {
297
298 $('#weekly li').removeClass('error');
299
300 if ($(this).hasClass('selected')) {
301 $(this).removeClass('selected');
302 } else {
303 $(this).addClass('selected');
304 }
305
306 $('#weekly_days').val('');
307
308 $('#weekly li.selected').each(function () {
309 var val = $(this).data('day');
310 $('#weekly_days').val($('#weekly_days').val() + val + ',');
311 });
312
313 $('#weekly_days').val($('#weekly_days').val().slice(0, -1));
314
315 });
316
317 $('#monthly li').click(function () {
318
319 $('#monthly li').removeClass('error');
320 $(this).parent().parent().find('.days-of-week li').removeClass('selected');
321 $(this).addClass('selected');
322
323 $('#monthly_days').val($(this).data('day'));
324 });
325
326 $('input[name="scheduling_run_on"]').change(function () {
327 var val = $('input[name="scheduling_run_on"]:checked').val();
328 if (val == "weekly") {
329
330 $('#weekly').slideDown({
331 queue: false
332 });
333 $('#monthly').slideUp({
334 queue: false
335 });
336
337 } else if (val == "monthly") {
338
339 $('#weekly').slideUp({
340 queue: false
341 });
342 $('#monthly').slideDown({
343 queue: false
344 });
345 }
346 });
347
348 $('.timepicker').timepicker();
349
350 var selectedTimes = [];
351
352 var onTimeSelected = function () {
353
354 selectedTimes.push([$(this).val(), $(this).val() + 1]);
355
356 var isLastChild = $(this).is(':last-child');
357 if (isLastChild) {
358 $(this).parent().append('<input class="timepicker" name="scheduling_times[]" style="display: none;" type="text" />');
359 $('.timepicker:last-child').timepicker({
360 'disableTimeRanges': selectedTimes
361 });
362 $('.timepicker:last-child').fadeIn('fast');
363 $('.timepicker').on('changeTime', onTimeSelected);
364 }
365 };
366
367 $('.timepicker').on('changeTime', onTimeSelected);
368
369 $('#timezone').chosen({width: '320px'});
370
371
372 $('.wpae-save-button').click(function (e) {
373
374 var initialValue = $(this).find('.save-text').html();
375 var schedulingEnable = $('input[name="scheduling_enable"]:checked').val() == 1;
376 if(!hasActiveLicense) {
377 if (!$(this).data('iunderstand') && schedulingEnable) {
378 $('#no-subscription').slideDown();
379 $(this).find('.save-text').html('<?php echo _e('I Understand');?>');
380 $(this).find('.save-text').css('left', '100px');
381 $(this).data('iunderstand', 1);
382
383 openSchedulingAccordeonIfClosed();
384 e.preventDefault();
385 return;
386 } else {
387 var submitEvent = $.Event('wpae-scheduling-options-form:submit');
388 $(document).trigger(submitEvent);
389
390 return;
391 }
392 }
393
394 // Don't process scheduling
395 if (!schedulingEnable) {
396 var submitEvent = $.Event('wpae-scheduling-options-form:submit');
397 $(document).trigger(submitEvent);
398
399 return;
400 }
401
402 var validationResponse = pmxeValidateSchedulingForm();
403 if (!validationResponse.isValid) {
404
405 openSchedulingAccordeonIfClosed();
406 $('html, body').animate({
407 scrollTop: $("#scheduling-title").offset().top-100
408 }, 500);
409 e.preventDefault();
410 return false;
411 }
412
413 var $button = $(this);
414
415 var formData = $('#scheduling-form :input').serializeArray();
416
417 formData.push({name: 'security', value: wp_all_export_security});
418 formData.push({name: 'action', value: 'save_scheduling'});
419 formData.push({name: 'element_id', value: <?php echo $export_id; ?>});
420 formData.push({name: 'scheduling_enable', value: $('input[name="scheduling_enable"]:checked').val()});
421
422 $button.find('.easing-spinner').toggle();
423
424 $.ajax({
425 type: 'POST',
426 url: ajaxurl,
427 data: formData,
428 success: function (response) {
429 $button.find('.easing-spinner').toggle();
430 $button.find('.save-text').html(initialValue);
431 $button.find('svg').show();
432
433 setTimeout(function(){
434 var submitEvent = $.Event('wpae-scheduling-options-form:submit');
435 $(document).trigger(submitEvent);
436 }, 1000);
437
438 },
439 error: function () {
440 $button.find('.easing-spinner').toggle();
441 $button.find('.save-text').html(initialValue);
442 }
443 });
444 });
445
446 $('.wp_all_export_confirm_and_run').click(function(e){
447
448 e.preventDefault();
449
450 var schedulingEnable = isAutomaticSchedulingEnabled();
451
452 if(schedulingEnable) {
453
454
455 if(!hasActiveLicense) {
456 if (!$(this).data('iunderstand') && schedulingEnable) {
457 $('#no-subscription').slideDown();
458 $(this).find('.save-text').html('<?php echo _e('I Understand');?>');
459 $(this).find('.save-text').css('left', '100px');
460 $(this).data('iunderstand', 1);
461
462 openSchedulingAccordeonIfClosed();
463
464 $('html, body').animate({
465 scrollTop: $(".wpallexport-submit-buttons").offset().top+200
466 }, 900);
467
468 e.preventDefault();
469 return;
470 } else {
471 var submitEvent = $.Event('wpae-scheduling-options-form:submit');
472 $(document).trigger(submitEvent);
473
474 return;
475 }
476 }
477
478 var validationResponse = pmxeValidateSchedulingForm();
479 if (!validationResponse.isValid) {
480
481 openSchedulingAccordeonIfClosed();
482 $('html, body').animate({
483 scrollTop: $("#scheduling-title").offset().top-100
484 }, 500);
485 e.preventDefault();
486 return false;
487 }
488
489 var $button = $('.wpae-scheduling-status');
490 $button.find('.easing-spinner').toggle();
491
492 var formData = $('#scheduling-form :input').serializeArray();
493
494 formData.push({name: 'security', value: wp_all_export_security});
495 formData.push({name: 'action', value: 'save_scheduling'});
496 formData.push({name: 'element_id', value: <?php echo $export_id; ?>});
497 formData.push({name: 'scheduling_enable', value: $('input[name="scheduling_enable"]:checked').val()});
498
499 $.ajax({
500 type: 'POST',
501 url: ajaxurl,
502 data: formData,
503 success: function (response) {
504 $button.find('.easing-spinner').toggle();
505 $button.find('svg').show();
506
507 setTimeout(function(){
508 var submitEvent = $.Event('wpae-scheduling-options-form:submit');
509 $(document).trigger(submitEvent);
510 }, 1000);
511
512 },
513 error: function () {
514 $button.find('.easing-spinner').toggle();
515 }
516 });
517
518 return false;
519 } else {
520 $('form.choose-export-options').submit();
521
522 }
523
524 return false;
525 });
526
527 <?php if($post['scheduling_timezone'] == 'UTC') {
528 ?>
529 var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
530
531 $('#timezone').val(timeZone);
532 $('#timezone').trigger("chosen:updated");
533
534 <?php
535 }
536 ?>
537
538 var saveSubscription = false;
539
540 $('#add-subscription').click(function(){
541
542 $('#add-subscription-field').show();
543 $('#add-subscription-field').animate({width:'400px'}, 225);
544 $('#add-subscription-field').animate({left:'-1px'}, 225);
545 $('#subscribe-button .button-subscribe').css('background-color','#46ba69');
546
547 $('.text-container p').fadeOut();
548
549 setTimeout(function () {
550 $('#find-subscription-link').show();
551 $('#find-subscription-link').animate({left: '410px'}, 300, 'swing');
552 }, 225);
553 $('.subscribe-button-text').html('<?php _e('Activate'); ?>');
554 saveSubscription = true;
555 return false;
556 });
557
558 $('#subscribe-button').click(function(){
559
560 if(saveSubscription) {
561 $('#subscribe-button .easing-spinner').show();
562
563 var license = $('#add-subscription-field').val();
564 $.ajax({
565 url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo wp_create_nonce("wp_all_export_secure");?>',
566 type:"POST",
567 data: {
568 license: license
569 },
570 dataType:"json",
571 success: function(response){
572
573 $('#subscribe-button .button-subscribe').css('background-color','#425f9a');
574 if(response.success) {
575 hasActiveLicense = true;
576 $('#subscribe-button .easing-spinner').hide();
577 $('#subscribe-button svg.success').show();
578 $('#subscribe-button svg.success').fadeOut(3000, function () {
579 $('.subscribe').hide({queue: false});
580 $('#subscribe-filler').show({queue: false});
581 });
582
583 $('.wpai-no-license').hide();
584 $('.wpai-license').show();
585 } else {
586 $('#subscribe-button .easing-spinner').hide();
587 $('#subscribe-button svg.error').show();
588 $('.subscribe-button-text').html('<?php _e('Subscribe'); ?>');
589
590 $('#subscribe-button svg.error').fadeOut(3000, function () {
591 $('#subscribe-button svg.error').hide({queue: false});
592
593 });
594
595 $('#add-subscription').html('<?php _e('Invalid license, try again?');?>');
596 $('.text-container p').fadeIn();
597
598 $('#find-subscription-link').animate({width: 'toggle'}, 300, 'swing');
599
600 setTimeout(function () {
601 $('#add-subscription-field').animate({width:'140px'}, 225);
602 $('#add-subscription-field').animate({left:'-155px'}, 225);
603 }, 300);
604
605 $('#add-subscription-field').val('');
606
607 $('#subscribe-button-text').html('<?php _e('Subscribe'); ?>');
608 saveSubscription = false;
609 }
610 }
611 });
612
613 return false;
614 }
615 });
616 });
617 // help scheduling template
618 $('.help_scheduling').click(function(){
619
620 $('.wp-all-export-scheduling-help').css('left', ($( document ).width()/2) - 255 ).show();
621 $('#wp-all-export-scheduling-help-inner').css('max-height', $( window ).height()-150).show();
622 $('.wpallexport-overlay').show();
623 return false;
624 });
625
626 $('.wp_all_export_scheduling_help').find('h3').click(function(){
627 var $action = $(this).find('span').html();
628 $('.wp_all_export_scheduling_help').find('h3').each(function(){
629 $(this).find('span').html("+");
630 });
631 if ( $action == "+" ) {
632 $('.wp_all_export_help_tab').slideUp();
633 $('.wp_all_export_help_tab[rel=' + $(this).attr('id') + ']').slideDown();
634 $(this).find('span').html("-");
635 }
636 else{
637 $('.wp_all_export_help_tab[rel=' + $(this).attr('id') + ']').slideUp();
638 $(this).find('span').html("+");
639 }
640 });
641 });
642 })(jQuery);
643
644 </script>
645 <?php require __DIR__.'/CommonJs.php'; ?>
646 <div class="wpallexport-collapsed wpallexport-section wpallexport-file-options closed"
647 style="margin-top: -10px; margin-bottom: 10px;">
648 <div id="scheduling-form">
649
650 <div class="wpallexport-content-section" style="padding-bottom: 15px; margin-bottom: 10px;">
651 <div class="wpallexport-collapsed-header" id="scheduling-options-header" style="padding-left: 25px;">
652 <h3 id="scheduling-title" style="position: relative;">
653 <?php _e('Scheduling Options', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
654 </h3>
655 </div>
656
657 <div class="wpallexport-collapsed-content" style="padding: 0; height: auto; display: none;">
658 <div class="wpallexport-collapsed-content-inner" style="padding-bottom: 0; overflow: auto;">
659 <div style="margin-bottom: 20px;">
660 <label>
661 <input type="radio" name="scheduling_enable" value="0" <?php if(!$post['scheduling_enable']) { ?> checked="checked" <?php } ?>/>
662 <h4 style="display: inline-block; margin-top:3px; margin-bottom:-2px;"><?php _e('Do Not Schedule'); ?></h4>
663 </label>
664 </div>
665 <div>
666 <label>
667 <input type="radio" name="scheduling_enable" value="1" <?php if($post['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
668
669 <h4 style="margin: 0; position: relative; display: inline-block;"><?php _e('Automatic Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
670 <span class="connection-icon">
671 <?php include_once('ConnectionIcon.php'); ?>
672 </span>
673 <?php if (!$scheduling->checkConnection()) { ?>
674 <span class="wpai-license wpai-license-text" style="display: inline-block; font-weight: normal; <?php if(!$hasActiveLicense) { ?> display: none; <?php }?> color: #f2b03d; ">Unable to connect - <a target="_blank" style="text-decoration: underline;" href="http://wpallimport.com/support">please contact support</a>.</span>
675 <?php } ?>
676 </h4>
677 </label>
678 </div>
679 <div style="margin-bottom: 10px; margin-left:26px;">
680 <label style="font-size: 13px;">
681 <?php _e('Run this export on a schedule.'); ?>
682 </label>
683 </div>
684 <div id="automatic-scheduling"
685 style="margin-left: 21px; <?php if ($post['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
686 <div>
687 <div class="input">
688 <label style="color: rgb(68,68,68);">
689 <input
690 type="radio" <?php if ($post['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
691 name="scheduling_run_on" value="weekly"
692 checked="checked"/> <?php _e('Every week on...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
693 </label>
694 </div>
695 <input type="hidden" style="width: 500px;" name="scheduling_weekly_days"
696 value="<?php echo $post['scheduling_weekly_days']; ?>" id="weekly_days"/>
697 <?php
698 if (isset($post['scheduling_weekly_days'])) {
699 $weeklyArray = explode(',', $post['scheduling_weekly_days']);
700 } else {
701 $weeklyArray = array();
702 }
703 ?>
704 <ul class="days-of-week" id="weekly" style="<?php if ($post['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
705 <li data-day="0" <?php if (in_array('0', $weeklyArray)) { ?> class="selected" <?php } ?>>
706 Mon
707 </li>
708 <li data-day="1" <?php if (in_array('1', $weeklyArray)) { ?> class="selected" <?php } ?>>
709 Tue
710 </li>
711 <li data-day="2" <?php if (in_array('2', $weeklyArray)) { ?> class="selected" <?php } ?>>
712 Wed
713 </li>
714 <li data-day="3" <?php if (in_array('3', $weeklyArray)) { ?> class="selected" <?php } ?>>
715 Thu
716 </li>
717 <li data-day="4" <?php if (in_array('4', $weeklyArray)) { ?> class="selected" <?php } ?>>
718 Fri
719 </li>
720 <li data-day="5" <?php if (in_array('5', $weeklyArray)) { ?> class="selected" <?php } ?>>
721 Sat
722 </li>
723 <li data-day="6" <?php if (in_array('6', $weeklyArray)) { ?> class="selected" <?php } ?>>
724 Sun
725 </li>
726 </ul>
727 </div>
728 <div style="clear: both;"></div>
729 <div>
730 <div class="input">
731 <label style="color: rgb(68,68,68);">
732 <input
733 type="radio" <?php if ($post['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
734 name="scheduling_run_on"
735 value="monthly"/> <?php _e('Every month on the first...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
736 </label>
737 </div>
738 <input type="hidden" name="scheduling_monthly_days" value="<?php if (isset($post['scheduling_monthly_days'])) echo $post['scheduling_monthly_days']; ?>" id="monthly_days"/>
739 <?php
740 if (isset($post['scheduling_monthly_days'])) {
741 $monthlyArray = explode(',', $post['scheduling_monthly_days']);
742 } else {
743 $monthlyArray = array();
744 }
745 ?>
746 <ul class="days-of-week" id="monthly"
747 style="<?php if ($post['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
748 <li data-day="0" <?php if (in_array('0', $monthlyArray)) { ?> class="selected" <?php } ?>>
749 Mon
750 </li>
751 <li data-day="1" <?php if (in_array('1', $monthlyArray)) { ?> class="selected" <?php } ?>>
752 Tue
753 </li>
754 <li data-day="2" <?php if (in_array('2', $monthlyArray)) { ?> class="selected" <?php } ?>>
755 Wed
756 </li>
757 <li data-day="3" <?php if (in_array('3', $monthlyArray)) { ?> class="selected" <?php } ?>>
758 Thu
759 </li>
760 <li data-day="4" <?php if (in_array('4', $monthlyArray)) { ?> class="selected" <?php } ?>>
761 Fri
762 </li>
763 <li data-day="5" <?php if (in_array('5', $monthlyArray)) { ?> class="selected" <?php } ?>>
764 Sat
765 </li>
766 <li data-day="6" <?php if (in_array('6', $monthlyArray)) { ?> class="selected" <?php } ?>>
767 Sun
768 </li>
769 </ul>
770 </div>
771 <div style="clear: both;"></div>
772
773 <div id="times-container" style="margin-left: 5px;">
774 <div style="margin-top: 10px; margin-bottom: 5px;">
775 What times do you want this export to run?
776 </div>
777
778 <div id="times" style="margin-bottom: 10px;">
779 <?php if (is_array($post['scheduling_times'])) {
780 foreach ($post['scheduling_times'] as $time) { ?>
781
782 <?php if ($time) { ?>
783 <input class="timepicker" type="text" name="scheduling_times[]"
784 value="<?php echo $time; ?>"/>
785 <?php } ?>
786 <?php } ?>
787 <input class="timepicker" type="text" name="scheduling_times[]"/>
788 <?php } ?>
789 </div>
790 <div style="clear: both;"></div>
791 <div class="timezone-select" style="position:absolute; margin-top: 10px;">
792 <?php
793
794 $timezoneValue = false;
795 if ($post['scheduling_timezone']) {
796 $timezoneValue = $post['scheduling_timezone'];
797 }
798
799 $timezoneSelect = new \Wpae\Scheduling\Timezone\TimezoneSelect();
800 echo $timezoneSelect->getTimezoneSelect($timezoneValue);
801 ?>
802 </div>
803 </div>
804 <div style="height: 60px; margin-top: 30px; <?php if(!$hasActiveLicense) {?>display: none; <?php } ?>" id="subscribe-filler">&nbsp;</div>
805 <?php
806 if (!$hasActiveLicense) {
807 ?>
808 <div class="subscribe" style="margin-left: 5px; margin-top: 65px; margin-bottom: 130px; position: relative;">
809 <div class="button-container">
810
811 <a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=515704" target="_blank" id="subscribe-button">
812 <div class="button button-primary button-hero wpallexport-large-button button-subscribe"
813 style="background-image: none; width: 140px; text-align: center; position: absolute; z-index: 4;">
814 <svg class="success" width="30" height="30" viewBox="0 0 1792 1792"
815 xmlns="http://www.w3.org/2000/svg"
816 style="fill: white; display: none; position: absolute; top: 6px; left: 15px;">
817 <path
818 d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z"
819 fill="white"/>
820 </svg>
821 <svg class="error" width="30" height="30" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"
822 style="fill: red; display: none; position: absolute; top: 6px; left: 15px;">
823 <path d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/></svg>
824 <div class="easing-spinner" style="display: none; position: absolute; left: 37px;">
825 <div class="double-bounce1"></div>
826 <div class="double-bounce2"></div>
827 </div>
828
829 <span class="subscribe-button-text">
830 <?php _e('Subscribe'); ?>
831 </span>
832 </div>
833 </a>
834 </div>
835 <div class="text-container" style="position: absolute; left: 150px; top: 2px;">
836 <p><?php _e('Get automatic scheduling for unlimited sites, just $9/mo.', PMXE_Plugin::LANGUAGE_DOMAIN); ?></p>
837 <p><?php _e('Have a license?', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
838 <a href="#" id="add-subscription"><?php _e('Register this site.'); ?></a> <?php _e('Questions?', PMXE_Plugin::LANGUAGE_DOMAIN); ?> <a href="#" class="help_scheduling">Read more.</a></p>
839 <input type="password" id="add-subscription-field" style="position: absolute; z-index: 2; font-size: 14px;" placeholder="<?php _e('Enter your license', PMXE_Plugin::LANGUAGE_DOMAIN); ?>"/>
840 <div style="position: absolute;" id="find-subscription-link"><a href="http://www.wpallimport.com/portal/automatic-scheduling/" target="_blank"><?php _e('Find your license at the customer portal.', PMXE_Plugin::LANGUAGE_DOMAIN);?></a></div>
841 </div>
842 </div>
843 <?php
844 } ?>
845 </div>
846 <div style="clear:both"></div>
847 <?php require 'ManualScheduling.php'; ?>
848 </div>
849 </div>
850 </div>
851
852 <div style="clear: both;"></div>
853 </div>
854 </div>
855
856 <fieldset class="optionsset column rad4 wp-all-export-scheduling-help">
857
858 <div class="title">
859 <span style="font-size:1.5em;" class="wpallexport-add-row-title"><?php _e('Automatic Scheduling', 'wp_all_export_plugin'); ?></span>
860 </div>
861
862 <?php
863 include_once 'SchedulingHelp.php';
864 ?>
865 </fieldset>
866