Migration, Backup, Staging – WPvivid - Version 0.9.4

Version Description

Added support for responsive design. Now the plugin is compatible with smartphones, tablets and PC. Fixed some UI bugs.

Download this release

Release Info

Developer wpvivid
Plugin Icon 128x128 Migration, Backup, Staging – WPvivid
Version 0.9.4
Comparing to
See all releases

Code changes from version 0.9.3 to 0.9.4

admin/css/wpvivid-admin.css CHANGED
@@ -7,19 +7,19 @@
7
  .list-top-chip::after{content:" "}
8
  .backup-basic-info{min-width:300px; margin:10px; float:left;}
9
  .list-top-chip-button{position:absolute; top:8px; right:10px;}
10
- .quickbackup{width:65%;float:left; box-sizing:border-box;min-width:350px; margin-right:1%;}
11
  .quickbackup label{display:inline-block;margin-bottom:10px;}
12
- .qucikbackup-schedule{width:34%; padding-left:1%; float:left; box-sizing:border-box; min-width:350px;}
13
- .quickstart-archive-block{width:33%;padding:10px; float:left; position:relative; box-sizing:border-box; min-width:260px;}
14
  .schedule-archive-block{width:100%;padding:10px 10px 10px 0;float:left;box-sizing:border-box; min-width:260px;}
15
- .quickstart-storage-block{width:33%;padding:10px; float:left; position:relative; box-sizing:border-box; min-width:260px;}
16
- .quickstart-btn{width:33%;padding:10px; float:left; position:relative; box-sizing:border-box; min-width:260px;}
17
  .quickbackup-btn{display:block !important; margin:0 auto !important;width:150px;height:50px !important; line-height:48px !important; font-size:20px !important;}
18
  .schedule-block{float:left;width:100%;padding:0 10px 10px 10px;}
19
  .postbox:after{content: ".";display: block;height: 0;clear: both;visibility: hidden;}
20
  .quickbackup-block .fieldset label{margin-bottom:5px;}
21
  .custom-info{padding:10px;}
22
- .quickstart-storage-setting{width:100%; padding-left:25px;padding-top:10px; padding-bottom:10px;float:left;}
23
  .storage-column-left{width:15%;float:left;height:100%;min-width:100px;}
24
  .storage-column-right{margin-left:15%; width:auto;height:100%;position:relative;min-width:350px;box-sizing:border-box;}
25
  .storage-menu{background-color: #e5e5e5;display: block;padding: 5px;text-decoration: none; }
@@ -72,3 +72,79 @@
72
  .remote-storage-set-default-block input, span{display:line-block; margin-top:10px; margin-bottom:10px;margin-right:10px;}
73
  .remote-storage-ftp-passive-block{padding-left:10px;}
74
  .remote-storage-ftp-passive-block input, span{display:line-block; margin-top:10px; margin-bottom:10px;margin-right:10px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  .list-top-chip::after{content:" "}
8
  .backup-basic-info{min-width:300px; margin:10px; float:left;}
9
  .list-top-chip-button{position:absolute; top:8px; right:10px;}
10
+ .quickbackup{width:calc(100% - 290px);float:left; box-sizing:border-box;margin-right:10px;}
11
  .quickbackup label{display:inline-block;margin-bottom:10px;}
12
+ .qucikbackup-schedule{width:280px; float:left; box-sizing:border-box; min-width:280px;}
13
+ .quickstart-archive-block{width:33%;padding:10px; float:left; position:relative; box-sizing:border-box; }
14
  .schedule-archive-block{width:100%;padding:10px 10px 10px 0;float:left;box-sizing:border-box; min-width:260px;}
15
+ .quickstart-storage-block{width:33%;padding:10px; float:left; position:relative; box-sizing:border-box;}
16
+ .quickstart-btn{width:33%;padding:10px; float:left; position:relative; box-sizing:border-box;}
17
  .quickbackup-btn{display:block !important; margin:0 auto !important;width:150px;height:50px !important; line-height:48px !important; font-size:20px !important;}
18
  .schedule-block{float:left;width:100%;padding:0 10px 10px 10px;}
19
  .postbox:after{content: ".";display: block;height: 0;clear: both;visibility: hidden;}
20
  .quickbackup-block .fieldset label{margin-bottom:5px;}
21
  .custom-info{padding:10px;}
22
+ .quickstart-storage-setting{width:100%; padding-left:10px;padding-top:10px; padding-bottom:10px;float:left;}
23
  .storage-column-left{width:15%;float:left;height:100%;min-width:100px;}
24
  .storage-column-right{margin-left:15%; width:auto;height:100%;position:relative;min-width:350px;box-sizing:border-box;}
25
  .storage-menu{background-color: #e5e5e5;display: block;padding: 5px;text-decoration: none; }
72
  .remote-storage-set-default-block input, span{display:line-block; margin-top:10px; margin-bottom:10px;margin-right:10px;}
73
  .remote-storage-ftp-passive-block{padding-left:10px;}
74
  .remote-storage-ftp-passive-block input, span{display:line-block; margin-top:10px; margin-bottom:10px;margin-right:10px;}
75
+ .backup-list-head{}
76
+ .download-website-info{float:left;}
77
+
78
+ @media screen and (max-width:1650px) {
79
+ .qucikbackup-schedule{
80
+ float:none;
81
+ width:100%;
82
+ }
83
+ .quickbackup{
84
+ float:none;
85
+ width:100%;
86
+ }
87
+ }
88
+ @media only screen and (max-width: 1350px){
89
+ #poststuff #post-body.columns-2 {
90
+ margin:0;
91
+ }
92
+ #wpbody-content #post-body.columns-2 #postbox-container-1 {
93
+ margin-right: 0;
94
+ width: 100%;
95
+ }
96
+
97
+ }
98
+ @media screen and (max-width:1315px) {
99
+ .quickstart-storage-block{
100
+ width:50%;
101
+ }
102
+ .quickstart-archive-block{
103
+ width:50%;
104
+ }
105
+ .quickstart-btn{
106
+ clear:both;
107
+ float:none;
108
+ width:100%;
109
+ }
110
+ }
111
+ @media screen and (max-width:600px) {
112
+ .quickstart-storage-block{
113
+ float:none;
114
+ width:100%;
115
+ }
116
+ .quickstart-archive-block{
117
+ float:none;
118
+ width:100%;
119
+ }
120
+ .quickstart-btn{
121
+ float:none;
122
+ width:100%;
123
+ }
124
+ }
125
+ @media screen and (max-width:800px){
126
+ .tablelistcolumn{
127
+ display:block;
128
+ }
129
+ .backup-list-head{
130
+ display:none;
131
+ }
132
+ .backuptime{
133
+ font-size:16px;
134
+ }
135
+ .backuplist-delete-backup{
136
+ display:none;
137
+ }
138
+ .website-info-head{
139
+ display:none;
140
+ }
141
+ .log-head{
142
+ display:none;
143
+ }
144
+ .lafowef{
145
+ display:none;
146
+ }
147
+ .storage-account-form input{
148
+ width:360px;
149
+ }
150
+ }
admin/js/wpvivid-admin.js CHANGED
@@ -85,13 +85,13 @@ var wpvivid_location_href=false;
85
  });
86
 
87
  $('#backup_list_all_check').click(function(){
88
- var name = "";
89
  if($('#backup_list_all_check').prop('checked')) {
90
  $('#wpvivid_backuplist tr').each(function (i) {
91
- $(this).children('td').each(function (j) {
92
  if (j == 0) {
93
- name = jQuery(this).parent().children('td').eq(1).find("img").attr("name");
94
- if(name === "unlock") {
95
  $(this).find("input[type=checkbox]").prop('checked', true);
96
  }
97
  else{
@@ -103,7 +103,7 @@ var wpvivid_location_href=false;
103
  }
104
  else{
105
  $('#wpvivid_backuplist tr').each(function (i) {
106
- $(this).children('td').each(function (j) {
107
  if (j == 0) {
108
  $(this).find("input[type=checkbox]").prop('checked', false);
109
  }
@@ -252,77 +252,71 @@ function wpvivid_check_runningtask(){
252
  wpvivid_prepare_backup = false;
253
  jQuery.each(jsonarray.backup.data, function (index, value) {
254
  if (value.size != false) {
255
- if (typeof(value.size.db_size) !== "undefined" && value.size.db_size !== "") {
256
  jQuery('#wpvivid_backup_database_size').html(value.size.db_size);
257
  }
258
  else {
259
- jQuery('#wpvivid_backup_database_size').html("");
260
  }
261
- if (typeof(value.size.files_size.sum) !== "undefined" && value.size.files_size.sum !== "") {
262
  jQuery('#wpvivid_backup_file_size').html(value.size.files_size.sum);
263
  }
264
  else {
265
- jQuery('#wpvivid_backup_file_size').html("");
266
  }
267
  }
268
- if (value.status.str === "ready") {
269
- jQuery('#wpvivid_current_doing').html("Ready to backup. Progress: 0%, running time: 0second.");
270
- var percent = "0%";
271
- jQuery('#wpvivid_action_progress_bar_percent').css("width", percent);
272
  m_need_update = true;
273
  }
274
- else if (value.status.str === "running") {
275
  running_backup_taskid = index;
276
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
277
  jQuery('#wpvivid_postbox_backup_percent').show();
278
  if (value.is_canceled === false) {
279
- jQuery('#wpvivid_backup_cancel_btn').css({
280
- 'pointer-events': 'auto',
281
- 'opacity': '1'
282
- });
283
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
284
- if (value.data.doing !== "") {
285
  var percent = 0;
286
- if (value.data.type === "backup") {
287
  percent = value.data.progress / 2;
288
  }
289
- else if (value.data.type === "upload") {
290
  percent = (100 + value.data.progress) / 2;
291
  }
292
- percent = percent + "%";
293
- jQuery('#wpvivid_action_progress_bar_percent').css("width", percent);
294
  var time = wpvivid_calc_backup_elapsed_time(value.data.running_time);
295
  if (value.is_canceled === false) {
296
- jQuery('#wpvivid_current_doing').html(value.data.descript + " Progress: " + percent + ", running time: " + time + ".");
297
  }
298
  }
299
  }
300
  else {
301
- jQuery('#wpvivid_backup_cancel_btn').css({
302
- 'pointer-events': 'nano',
303
- 'opacity': '0.4'
304
- });
305
- jQuery('#wpvivid_current_doing').html("The backup will be canceled after backing up the current chunk ends.");
306
  }
307
  m_need_update = true;
308
  }
309
- else if (value.status.str === "wait_resume") {
310
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
311
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
312
- var info = "Task " + index + " timed out, backup task will retry in " + value.data.next_resume_time + " seconds, retry times: " + value.status.resume_count + ".";
313
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
314
  jQuery('#wpvivid_postbox_backup_percent').show();
315
  var percent = 0;
316
- if (value.data.type === "backup") {
317
  percent = value.data.progress / 2;
318
  }
319
- else if (value.data.type === "upload") {
320
  percent = (100 + value.data.progress) / 2;
321
  }
322
- percent = percent + "%";
323
- jQuery('#wpvivid_action_progress_bar_percent').css("width", percent);
324
  jQuery('#wpvivid_current_doing').html(info);
325
- if (value.data.next_resume_time !== "get next resume time failed.") {
326
  wpvivid_resume_backup(index, value.data.next_resume_time);
327
  }
328
  else {
@@ -330,42 +324,39 @@ function wpvivid_check_runningtask(){
330
  wpvivid_delete_backup_task(index);
331
  }
332
  }
333
- else if (value.status.str === "no_responds") {
334
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
335
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
336
  running_backup_taskid = index;
337
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
338
  jQuery('#wpvivid_postbox_backup_percent').show();
339
  if (value.is_canceled === false) {
340
- if (value.data.doing !== "") {
341
  var percent = 0;
342
- if (value.data.type === "backup") {
343
  percent = value.data.progress / 2;
344
  }
345
- else if (value.data.type === "upload") {
346
  percent = (100 + value.data.progress) / 2;
347
  }
348
- percent = percent + "%";
349
- jQuery('#wpvivid_action_progress_bar_percent').css("width", percent);
350
  var time = wpvivid_calc_backup_elapsed_time(value.data.running_time);
351
  if (value.is_canceled === false) {
352
- jQuery('#wpvivid_current_doing').html("Task , " + value.data.doing + " is not responding. Progress: " + percent + ", running time: " + time);
353
  }
354
  }
355
  }
356
  else {
357
- jQuery('#wpvivid_backup_cancel_btn').css({
358
- 'pointer-events': 'nano',
359
- 'opacity': '0.4'
360
- });
361
- jQuery('#wpvivid_current_doing').html("The backup will be canceled after backing up the current chunk ends.");
362
  }
363
  m_need_update = true;
364
  }
365
- else if (value.status.str === "completed") {
366
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
367
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
368
- var info = "Task " + index + " completed.";
369
  wpvivid_add_notice('Backup', 'Success', info);
370
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
371
  jQuery('#wpvivid_postbox_backup_percent').hide();
@@ -374,10 +365,10 @@ function wpvivid_check_runningtask(){
374
  wpvivid_retrieve_log_list();
375
  wpvivid_delete_backup_task(index);
376
  }
377
- else if (value.status.str === "error") {
378
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
379
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
380
- var info = "Backup error: " + value.status.error + ", task id: " + index;
381
  wpvivid_add_notice('Backup', 'Error', info);
382
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
383
  jQuery('#wpvivid_postbox_backup_percent').hide();
@@ -392,7 +383,7 @@ function wpvivid_check_runningtask(){
392
  task_retry_times = 0;
393
  var download_array = new Array('backup_type', 'download_type', 'delete_button_id', 'download_button_id', 'progress_id', 'download_text_id', 'split_file_id');
394
  var i = 0;
395
- var file_part = "";
396
  jQuery.each(jsonarray.download.data.type, function (index, value) {
397
  download_array = wpvivid_get_download_info(index, download_array);
398
  var file_name = '';
@@ -404,7 +395,7 @@ function wpvivid_check_runningtask(){
404
  var progress = '0%';
405
  if (value1.status === 'need_download') {
406
  progress = '0%';
407
- jQuery("#" + tmp_current_click_backupid + "-progress-part-" + i).css('width', progress);
408
  if (m_downloading_file_name === file_name) {
409
  m_need_update = true;
410
  }
@@ -414,8 +405,8 @@ function wpvivid_check_runningtask(){
414
  wpvivid_lock_download(tmp_current_click_backupid);
415
  }
416
  progress = value1.progress_text + '%';
417
- jQuery("#" + tmp_current_click_backupid + "-text-part-" + i).html("<a>Retriving(remote storage to web server)</a>");
418
- jQuery("#" + tmp_current_click_backupid + "-progress-part-" + i).css('width', progress);
419
  m_need_update = true;
420
  }
421
  else if (value1.status === 'completed') {
@@ -423,8 +414,8 @@ function wpvivid_check_runningtask(){
423
  wpvivid_unlock_download(tmp_current_click_backupid);
424
  }
425
  progress = '100%';
426
- jQuery("#" + tmp_current_click_backupid + "-text-part-" + i).html("<a onclick=\"wpvivid_download('" + tmp_current_click_backupid + "', '" + index + "', '" + file_name + "');\" style=\"cursor: pointer\">Download</a>");
427
- jQuery("#" + tmp_current_click_backupid + "-progress-part-" + i).css('width', progress);
428
  }
429
  else if (value1.status === 'error') {
430
  if (m_downloading_file_name === file_name) {
@@ -432,27 +423,22 @@ function wpvivid_check_runningtask(){
432
  }
433
  alert(value1.error);
434
  progress = '0%';
435
- jQuery("#" + tmp_current_click_backupid + "-text-part-" + i).html("<a onclick=\"wpvivid_prepare_download('" + i + "', '" + tmp_current_click_backupid + "', '" + file_name + "');\" style=\"cursor: pointer\">Prepare to Download</a>");
436
- jQuery("#" + tmp_current_click_backupid + "-progress-part-" + i).css('width', progress);
437
  }
438
  else if (value1.stauts === 'timeout') {
439
  if (m_downloading_file_name === file_name) {
440
  wpvivid_unlock_download(tmp_current_click_backupid);
441
  }
442
- alert("Download timeout, please retry.");
443
  progress = '0%';
444
- jQuery("#" + tmp_current_click_backupid + "-text-part-" + i).html("<a onclick=\"wpvivid_prepare_download('" + i + "', '" + tmp_current_click_backupid + "', '" + file_name + "');\" style=\"cursor: pointer\">Prepare to Download</a>");
445
- jQuery("#" + tmp_current_click_backupid + "-progress-part-" + i).css('width', progress);
446
  }
447
  });
448
  });
449
  }
450
  if (!b_has_data) {
451
- if (wpvivid_prepare_backup === false) {
452
- jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
453
- jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
454
- jQuery('#wpvivid_postbox_backup_percent').hide();
455
- }
456
  task_retry_times++;
457
  if (task_retry_times <= 5) {
458
  m_need_update = true;
@@ -484,7 +470,7 @@ function wpvivid_cancel_backup(){
484
  'task_id': running_backup_taskid
485
  };
486
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
487
- jQuery('#wpvivid_current_doing').html("The backup will be canceled after backing up the current chunk ends.");
488
  wpvivid_post_request(ajax_data, function(data){
489
  }, function(XMLHttpRequest, textStatus, errorThrown) {
490
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
@@ -506,7 +492,7 @@ function wpvivid_read_backup_log(){
506
  wpvivid_post_request(ajax_data, function(data){
507
  wpvivid_show_log(data);
508
  }, function(XMLHttpRequest, textStatus, errorThrown) {
509
- var div = "Reading the log failed. Please try again.";
510
  jQuery('#wpvivid_display_log_content').html(div);
511
  });
512
  }
@@ -519,18 +505,18 @@ function wpvivid_start_backup(){
519
  var local;
520
  var remote;
521
  if (jQuery('#wpvivid_backup_local').prop('checked')) {
522
- local = "1";
523
  } else {
524
- local = "0";
525
  }
526
  if (jQuery('#wpvivid_backup_remote').prop('checked')) {
527
- remote = "1"
528
  } else {
529
- remote = "0";
530
  }
531
- if(backup_type !== ""){
532
- if(local !== "0" || remote !== "0") {
533
- var lock=0;
534
  if(jQuery('#wpvivid_backup_lock').prop('checked') === true){
535
  lock = 1;
536
  }
@@ -539,7 +525,7 @@ function wpvivid_start_backup(){
539
  }
540
  var remote_options = new Array();
541
  remote_options[0] = wpvivid_default_remote_storage;
542
- if(remote !== "1" || wpvivid_default_remote_storage !== "") {
543
  var json = JSON.stringify(remote_options);
544
  var ajax_data = {
545
  'action': 'wpvivid_prepare_backup',
@@ -554,32 +540,32 @@ function wpvivid_start_backup(){
554
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
555
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
556
  jQuery('#wpvivid_postbox_backup_percent').show();
557
- jQuery('#wpvivid_current_doing').html("Ready to backup. Progress: 0%, running time: 0second.");
558
- var percent = "0%";
559
- jQuery('#wpvivid_action_progress_bar_percent').css("width", percent);
560
- jQuery('#wpvivid_backup_database_size').html("");
561
- jQuery('#wpvivid_backup_file_size').html("");
562
- jQuery('#wpvivid_current_doing').html("");
563
  wpvivid_completed_backup = 1;
564
  wpvivid_prepare_backup = true;
565
  wpvivid_post_request(ajax_data, function(data){
566
  try {
567
  var jsonarray = jQuery.parseJSON(data);
568
- if (jsonarray.result === "failed") {
569
  wpvivid_delete_ready_task(jsonarray.error);
570
  }
571
- else if(jsonarray.result === "success") {
572
  m_backup_task_id = jsonarray.task_id;
573
  if(jsonarray.check.alert_db === false && jsonarray.check.alter_files === false && jsonarray.check.alter_fcgi === false){
574
  wpvivid_retrieve_backup_list();
575
  wpvivid_backup_now(jsonarray.task_id);
576
  }
577
  else{
578
- var descript = "";
579
  if(jsonarray.check.alert_db === true || jsonarray.check.alter_files === true){
580
- descript = "The database (the dumping SQL file) might be too large, backing up the database may run out of server memory and result in a backup failure.\n" +
581
- "One or more files might be too large, backing up the file(s) may run out of server memory and result in a backup failure.\n" +
582
- "Click OK button and continue to back up.";
583
  var ret = confirm(descript);
584
  if(ret === true){
585
  wpvivid_retrieve_backup_list();
@@ -623,7 +609,7 @@ function wpvivid_delete_ready_task(error){
623
  wpvivid_post_request(ajax_data, function (data) {
624
  try {
625
  var jsonarray = jQuery.parseJSON(data);
626
- if (jsonarray.result === "success") {
627
  wpvivid_add_notice('Backup', 'Error', error);
628
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
629
  jQuery('#wpvivid_postbox_backup_percent').hide();
@@ -648,25 +634,25 @@ function wpvivid_delete_ready_task(error){
648
  * @param backup_id - A unique ID for a backup
649
  */
650
  function wpvivid_delete_selected_backup(backup_id){
651
- var name = "";
652
  jQuery('#wpvivid_backuplist tr').each(function(i){
653
  jQuery(this).children('td').each(function (j) {
654
  if (j == 0) {
655
- var id = jQuery(this).find("input[type=checkbox]").attr("id");
656
  if(id === backup_id){
657
- name = jQuery(this).parent().children('td').eq(1).find("img").attr("name");
658
  }
659
  }
660
  });
661
  });
662
- var descript = "";
663
  var force_del = 0;
664
- if(name === "lock") {
665
- descript = "This backup is locked, are you sure to remove it? This backup will be deleted permanently from your hosting (localhost) and remote storages.";
666
  force_del = 1;
667
  }
668
  else{
669
- descript = "Are you sure to remove this backup? This backup will be deleted permanently from your hosting (localhost) and remote storages.";
670
  force_del = 0;
671
  }
672
  var ret = confirm(descript);
@@ -679,7 +665,7 @@ function wpvivid_delete_selected_backup(backup_id){
679
  wpvivid_post_request(ajax_data, function(data){
680
  try {
681
  var jsonarray = jQuery.parseJSON(data);
682
- if (jsonarray.result === "failed") {
683
  alert(jsonarray.error);
684
  }
685
  wpvivid_retrieve_backup_list();
@@ -704,40 +690,44 @@ function wpvivid_delete_backups_inbatches(){
704
  var delete_backup_array = new Array();
705
  var count = 0;
706
  jQuery('#wpvivid_backuplist tr').each(function (i) {
707
- jQuery(this).children('td').each(function (j) {
708
  if (j == 0) {
709
- if(jQuery(this).find("input[type=checkbox]").prop('checked')){
710
- delete_backup_array[count] = jQuery(this).find("input[type=checkbox]").attr("id");
711
  count++;
712
  }
713
  }
714
  });
715
  });
716
- var descript = "Are you sure to remove the selected backups? These backups will be deleted permanently from your hosting (localhost).";
717
- var ret = confirm(descript);
718
- if(ret === true) {
719
- var ajax_data = {
720
- 'action': 'wpvivid_delete_backup_array',
721
- 'backup_id': delete_backup_array
722
- };
723
- wpvivid_post_request(ajax_data, function (data) {
724
- try {
725
- var jsonarray = jQuery.parseJSON(data);
726
- if (jsonarray.result === "failed") {
727
- alert(jsonarray.error);
 
 
 
 
 
 
728
  }
729
- wpvivid_retrieve_backup_list();
730
- }
731
- catch(err){
732
- setTimeout(function()
733
- {
734
- wpvivid_delete_backups_inbatches();
735
- }, 1000);
736
- }
737
- }, function (XMLHttpRequest, textStatus, errorThrown) {
738
- var error_message = wpvivid_output_ajaxerror('deleting the backup', textStatus, errorThrown);
739
- alert(error_message);
740
- });
741
  }
742
  }
743
 
@@ -769,29 +759,29 @@ function wpvivid_retrieve_last_backup_message(){
769
  wpvivid_post_request(ajax_data, function(data){
770
  try {
771
  var jsonarray = jQuery.parseJSON(data);
772
- if (jsonarray.result === "success") {
773
- if (jsonarray.data.status.str === "completed") {
774
- var backup_status = "Succeed";
775
- var last_backup_msg = "Last backup: " + jsonarray.data.status.start_time + " " + backup_status + " <a onclick=\"wpvivid_retrieve_last_backup_log();\" style=\"cursor:pointer;\"> Log</a>";
776
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
777
  }
778
- else if (jsonarray.data.status.str === "error") {
779
- var backup_status = "Failed";
780
- var last_backup_msg = "Last backup: " + jsonarray.data.status.start_time + " " + backup_status + " <a onclick=\"wpvivid_retrieve_last_backup_log();\" style=\"cursor:pointer;\"> Log</a>";
781
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
782
  }
783
- else if (jsonarray.data.status.str === "cancel") {
784
- var backup_status = "Failed";
785
- var last_backup_msg = "Last backup: " + jsonarray.data.status.start_time + " " + backup_status + " <a onclick=\"wpvivid_retrieve_last_backup_log();\" style=\"cursor:pointer;\"> Log</a>";
786
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
787
  }
788
  else {
789
  jQuery('#wpvivid_last_backup_msg_log').hide();
790
- var last_backup_msg = "Last backup: The last backup message not found.";
791
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
792
  }
793
  }
794
- else if (jsonarray.result === "failed") {
795
  jQuery('#wpvivid_last_backup_msg_log').hide();
796
  var last_backup_msg = jsonarray.data;
797
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
@@ -816,13 +806,13 @@ function wpvivid_retrieve_last_backup_message(){
816
  * @param storage_type - Remote storage types (Amazon S3, SFTP and FTP server)
817
  */
818
  function wpvivid_add_remote_storage(action, storage_type){
819
- if(storage_type === "ftp"){
820
  var storage_array = new Array('storage_name', 'storage_server', 'storage_login', 'storage_password', 'storage_path');
821
  }
822
- else if(storage_type === "sftp"){
823
  var storage_array = new Array('storage_name', 'storage_ip', 'storage_username', 'storage_password', 'storage_port', 'storage_path');
824
  }
825
- else if(storage_type === "amazonS3"){
826
  var storage_array = new Array('storage_name', 'storage_access', 'storage_secret', 'storage_path', 'storage_region');
827
  }
828
  storage_array = wpvivid_get_storage_info(storage_type, storage_array);
@@ -835,8 +825,8 @@ function wpvivid_add_remote_storage(action, storage_type){
835
  ftp_passive=false;
836
  }
837
  var default_storage = 1;
838
- if(ret === "success"){
839
- if(storage_type === "ftp"){
840
  var remote = {
841
  'type': storage_type,
842
  'options': {
@@ -855,7 +845,7 @@ function wpvivid_add_remote_storage(action, storage_type){
855
  default_storage = 0;
856
  }
857
  }
858
- else if(storage_type === "sftp"){
859
  var remote = {
860
  'type': storage_type,
861
  'options': {
@@ -874,7 +864,7 @@ function wpvivid_add_remote_storage(action, storage_type){
874
  default_storage = 0;
875
  }
876
  }
877
- else if(storage_type === "amazonS3"){
878
  var remote = {
879
  'type': storage_type,
880
  'options': {
@@ -911,10 +901,10 @@ function wpvivid_add_remote_storage(action, storage_type){
911
  if(action === 'wpvivid_test_remote_connection') {
912
  try {
913
  var jsonarray = jQuery.parseJSON(data);
914
- if (jsonarray.result === "succeed") {
915
  wpvivid_add_remote_storage('wpvivid_add_remote', storage_type);
916
  }
917
- else if (jsonarray.result === "failed") {
918
  alert(jsonarray.error);
919
  jQuery('#storage_account_button').css({'pointer-events': 'auto', 'opacity': '1'});
920
  }
@@ -979,81 +969,81 @@ function wpvivid_retrieve_storage_list() {
979
  }
980
 
981
  function wpvivid_handle_remote_storage_data(data){
982
- jQuery('#wpvivid_remote_storage_list').html("");
983
  var i = 0;
984
  try {
985
  var jsonarray = jQuery.parseJSON(data);
986
- if (jsonarray.result === "success") {
987
  jQuery.each(jsonarray.data, function (index, value) {
988
- var check_status = "";
989
- var default_storage = "";
990
  i++;
991
  if (jsonarray.data.remote_selected.length !== 0) {
992
  jQuery.each(jsonarray.data.remote_selected, function (index1, value1) {
993
  default_storage = value1;
994
  wpvivid_default_remote_storage = value1;
995
  if (index === default_storage) {
996
- check_status = "checked";
997
- if (value.type === "ftp") {
998
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
999
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp.png");
1000
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
1001
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
1002
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp.png");
1003
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
1004
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
1005
  }
1006
- else if (value.type === "sftp") {
1007
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
1008
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp.png");
1009
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
1010
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
1011
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
1012
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp.png");
1013
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
1014
  }
1015
- else if (value.type === "amazonS3") {
1016
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.s3Path);
1017
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3.png");
1018
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
1019
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
1020
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
1021
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
1022
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3.png");
1023
  }
1024
  }
1025
  });
1026
  }
1027
  else {
1028
  wpvivid_default_remote_storage = '';
1029
- jQuery('#wpvivid_out_of_date_remote_path').html("There is no path for remote storage, please set it up first.");
1030
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
1031
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
1032
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
1033
- jQuery('#wpvivid_schedule_storage_type_ftp').attr("src", wpvivid_plugurl + "/images/storage-ftp(gray).png");
1034
- jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + "/images/storage-sftp(gray).png");
1035
- jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr("src", wpvivid_plugurl + "/images/storage-amazon-s3(gray).png");
1036
  }
1037
- if (index !== "remote_selected") {
1038
  var storage_type = '';
1039
- if (value.type === "ftp") {
1040
- storage_type = "FTP";
1041
  }
1042
- else if (value.type === "sftp") {
1043
- storage_type = "SFTP";
1044
  }
1045
- else if (value.type === "amazonS3") {
1046
- storage_type = "Amazon S3";
1047
  }
1048
- var $remote_storage_tr = jQuery("<tr>" +
1049
- "<td>" + i + "</td>" +
1050
- "<td><input type=\"checkbox\" name=\"remote_storage\" value=\"" + index + "\" " + check_status + " /></td>" +
1051
- "<td>" + storage_type + "</td>" +
1052
- "<td class=\"row-title\"><label for=\"tablecell\">" + value.options.name + "</label></td>" +
1053
- "<td onclick=\"wpvivid_delete_remote_storage('" + index + "');\">" +
1054
- "<img src=\"" + wpvivid_plugurl + "/images/Delete.png\" style=\"vertical-align:middle; cursor:pointer;\" title=\"Delete the backup\"/>" +
1055
- "</td>" +
1056
- "</tr>");
1057
  var $remote_storage_table = jQuery('#wpvivid_remote_storage_list');
1058
  $remote_storage_table.append($remote_storage_tr);
1059
  }
@@ -1075,7 +1065,7 @@ function wpvivid_handle_remote_storage_data(data){
1075
  * @param storage_id - A unique ID for a remote storage
1076
  */
1077
  function wpvivid_delete_remote_storage(storage_id){
1078
- var descript = "Deleting a remote storage will make it unavailable until it is added again. Are you sure to continue?";
1079
  var ret = confirm(descript);
1080
  if(ret === true){
1081
  var ajax_data = {
@@ -1084,7 +1074,7 @@ function wpvivid_delete_remote_storage(storage_id){
1084
  };
1085
  wpvivid_post_request(ajax_data, function(data){
1086
  if(storage_id === wpvivid_default_remote_storage){
1087
- wpvivid_default_remote_storage = "";
1088
  }
1089
  wpvivid_retrieve_storage_list();
1090
  },function(XMLHttpRequest, textStatus, errorThrown) {
@@ -1105,72 +1095,74 @@ function wpvivid_retrieve_backup_list(){
1105
  try {
1106
  var jsonarray = jQuery.parseJSON(data);
1107
  jQuery('#wpvivid_backuplist').html("");
1108
- var amazon_s3_url = "/images/storage-amazon-s3(gray).png";
1109
- var ftp_url = "/images/storage-ftp(gray).png";
1110
- var sftp_url = "/images/storage-sftp(gray).png";
1111
- var backup_lock_img = "/images/unlocked.png";
1112
- var backup_lock_status = "unlock";
1113
- if (jsonarray.result === "success") {
1114
  jQuery.each(jsonarray.data, function (index, value1) {
1115
- amazon_s3_url = "/images/storage-amazon-s3(gray).png";
1116
- ftp_url = "/images/storage-ftp(gray).png";
1117
- sftp_url = "/images/storage-sftp(gray).png";
1118
- if (typeof(value1.lock) == "undefined") {
1119
- backup_lock_img = "/images/unlocked.png";
1120
- backup_lock_status = "unlock";
1121
  }
1122
  else {
1123
  if (value1.lock === 0) {
1124
- backup_lock_img = "/images/unlocked.png";
1125
- backup_lock_status = "unlock";
1126
  }
1127
  else {
1128
- backup_lock_img = "/images/locked.png";
1129
- backup_lock_status = "lock";
1130
  }
1131
  }
1132
  jQuery.each(value1.remote, function (index2, value2) {
1133
- if (value2.type === "amazonS3") {
1134
- amazon_s3_url = "/images/storage-amazon-s3.png";
1135
  }
1136
- if (value2.type === "ftp") {
1137
- ftp_url = "/images/storage-ftp.png";
1138
  }
1139
- if (value2.type === "sftp") {
1140
- sftp_url = "/images/storage-sftp.png";
1141
  }
1142
  });
1143
- var $backuptr = jQuery("<tr>" +
1144
- "<td><input name=\"\" type=\"checkbox\" id=\"" + index + "\" value=\"" + index + "\" onclick=\"wpvivid_click_check_backup('" + index + "');\" /></td>" +
1145
- "<td style=\"min-width:300px;\">" +
1146
- "<div style=\"float:left;padding:10px 10px 10px 0px;min-width:300px;\">" +
1147
- "<span><strong>" + value1.create_time + "</strong></span></br>" +
1148
- "<span title=\"Lock the backup, it won\'t be deleted automatically\">" +
1149
- "<img src=\"" + wpvivid_plugurl + backup_lock_img + "\" name=\"" + backup_lock_status + "\" onclick=\"wpvivid_set_backup_lock('" + index + "','" + backup_lock_status + "');\" style=\"vertical-align:middle; cursor:pointer;\"/>" +
1150
- "</span> | <span>Type: </span><span>" + value1.type + "</span></br>" +
1151
- "<span><span><a href=\"#\" onclick=\"wpvivid_initialize_log('" + index + "');\"><img src=\"" + wpvivid_plugurl + "/images/Log.png\" name=\"" + backup_lock_status + "\" style=\"vertical-align:middle;cursor:pointer;\"/>Log</a></span>|<a href=\"#\" onclick=\"wpvivid_initialize_restore('" + index + "', '" + value1.create_time + "');\"><img src=\"" + wpvivid_plugurl + "/images/Restore.png\" style=\"vertical-align:middle;cursor:pointer;\"/>Restore</a></span>" +
1152
- "</td>" +
1153
- "<td style=\"min-width:300px;\">" +
1154
- "<div style=\"float:left;padding:10px 10px 10px 0px;\">" +
1155
- "<img src=\"" + wpvivid_plugurl + amazon_s3_url + "\" style=\"vertical-align:middle;\" title=\"Amazon S3\"/>" +
1156
- "<img src=\"" + wpvivid_plugurl + ftp_url + "\" style=\"vertical-align:middle;\" title=\"FTP\"/>" +
1157
- "<img src=\"" + wpvivid_plugurl + sftp_url + "\" style=\"vertical-align:middle;\" title=\"SFTP\"/>" +
1158
- "</div>" +
1159
- "</td>" +
1160
- "<td>" +
1161
- "<div id=\"wpvivid_file_part_" + index + "\" style=\"float:left;padding:10px 10px 10px 0px; min-width:290px;\">" +
1162
- "<div style=\"cursor:pointer;\" onclick=\"wpvivid_initialize_download('" + index + "');\">" +
1163
- "<img id=\"wpvivid_download_btn_" + index + "\" src=\"" + wpvivid_plugurl + "/images/download.png\" style=\"vertical-align:middle;\" />Download" +
1164
- "<div class=\"spinner\" id=\"wpvivid_download_loading_" + index + "\" style=\"float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;\"></div>" +
1165
- "</div>" +
1166
- "</div>" +
1167
- "</td>" +
1168
- "<td>" +
1169
- "<div onclick=\"wpvivid_delete_selected_backup('" + index + "');\">" +
1170
- "<img src=\"" + wpvivid_plugurl + "/images/Delete.png\" style=\"vertical-align:middle; cursor:pointer;\" title=\"Delete the backup\"/>" +
1171
- "</div>" +
1172
- "</td>" +
1173
- "</tr>");
 
 
1174
  var $backuptable = jQuery('#wpvivid_backuplist');
1175
  $backuptable.append($backuptr);
1176
  });
@@ -1195,7 +1187,7 @@ function wpvivid_retrieve_backup_list(){
1195
  function wpvivid_set_general_settings(){
1196
  var package_method = jQuery('input[name="choose-package-method"]:checked').val();
1197
  var no_compress = false;
1198
- if(package_method === "method-no-compress"){
1199
  no_compress = true;
1200
  }
1201
  else{
@@ -1210,7 +1202,7 @@ function wpvivid_set_general_settings(){
1210
  var mail = jQuery('#wpvivid_mail').val();
1211
  var send_method = jQuery('input[name="send_email_report"]:checked').val();
1212
  var always_send = false;
1213
- if(send_method === "send_mail_always"){
1214
  always_send = true;
1215
  }
1216
  else{
@@ -1239,30 +1231,30 @@ function wpvivid_set_general_settings(){
1239
  }
1240
 
1241
  var email_setting = {
1242
- "email_enable": email_enable,
1243
- "send_to": [mail],
1244
- "always": always_send
1245
  };
1246
  var compress_setting = {
1247
- "compress_type": "zip",
1248
- "max_file_size": max_file_size + "M",
1249
- "no_compress": no_compress,
1250
- "exclude_file_size": exclude_file_size,
1251
- "use_temp_file":1,
1252
- "use_temp_size":16
1253
  };
1254
  var local_setting = {
1255
- "path": local_storage_path,
1256
- "save_local": save_local
1257
  };
1258
  var common_setting = {
1259
  'max_execution_time': max_exec_time,
1260
- 'log_save_location': local_storage_path + "/wpvivid_log",
1261
  'max_backup_count': max_backup_count,
1262
  'estimate_backup': estimate_backup
1263
  };
1264
  var options = {
1265
- "wpvivid_email_setting": email_setting,
1266
  'wpvivid_compress_setting': compress_setting,
1267
  'wpvivid_local_setting': local_setting,
1268
  'wpvivid_common_setting': common_setting
@@ -1270,47 +1262,47 @@ function wpvivid_set_general_settings(){
1270
 
1271
  var json_options=JSON.stringify(options);
1272
 
1273
- var enable_schedule = "1";
1274
 
1275
- if(max_file_size != "") {
1276
- if(exclude_file_size != "") {
1277
- if(max_exec_time != "") {
1278
- if (local_storage_path !== "") {
1279
- if (mail != "" || email_enable === false) {
1280
  if (jQuery('#wpvivid_schedule_enable').prop('checked') === true) {
1281
  var backup_time = jQuery('input[name="schedule"]:checked').val();
1282
  var backup_type = jQuery('input[name="schedule-backup-files"]:checked').val();
1283
  switch (backup_time) {
1284
- case "Hours":
1285
- backup_time = "wpvivid_12hours";
1286
  break;
1287
- case "Daily":
1288
- backup_time = "wpvivid_daily";
1289
  break;
1290
- case "Weekly":
1291
- backup_time = "wpvivid_weekly";
1292
  break;
1293
- case "Fortnightly":
1294
- backup_time = "wpvivid_fortnightly";
1295
  break;
1296
- case "Monthly":
1297
- backup_time = "wpvivid_monthly";
1298
  break;
1299
  }
1300
 
1301
  var wpvivid_schedule_local = 0;
1302
  var remote = 0;
1303
  var save_local_remote = jQuery('input[name="save_local_remote"]:checked').val();
1304
- if (save_local_remote === "local") {
1305
  wpvivid_schedule_local = 1;
1306
  remote = 0;
1307
  }
1308
- else if (save_local_remote === "remote") {
1309
  wpvivid_schedule_local = 0;
1310
  remote = 1;
1311
  }
1312
  var b_has_default = true;
1313
- if (remote === 1 && wpvivid_default_remote_storage === "") {
1314
  b_has_default = false;
1315
  }
1316
  var remote_options = new Array();
@@ -1335,7 +1327,7 @@ function wpvivid_set_general_settings(){
1335
  }
1336
  };
1337
 
1338
- enable_schedule = "1";
1339
  var json_schedule = JSON.stringify(schedule);
1340
  var ajax_data = {
1341
  'action': 'wpvivid_set_general_setting',
@@ -1343,18 +1335,12 @@ function wpvivid_set_general_settings(){
1343
  'schedule': json_schedule,
1344
  'enable_schedule': enable_schedule
1345
  };
1346
- jQuery('#wpvivid_setting_general_save').css({
1347
- 'pointer-events': 'none',
1348
- 'opacity': '0.4'
1349
- });
1350
  wpvivid_post_request(ajax_data, function (data) {
1351
  try {
1352
  var jsonarray = jQuery.parseJSON(data);
1353
- jQuery('#wpvivid_setting_general_save').css({
1354
- 'pointer-events': 'auto',
1355
- 'opacity': '1'
1356
- });
1357
- if (jsonarray.result === "success") {
1358
  location.reload();
1359
  }
1360
  else {
@@ -1368,20 +1354,17 @@ function wpvivid_set_general_settings(){
1368
  }, 1000);
1369
  }
1370
  }, function (XMLHttpRequest, textStatus, errorThrown) {
1371
- jQuery('#wpvivid_setting_general_save').css({
1372
- 'pointer-events': 'auto',
1373
- 'opacity': '1'
1374
- });
1375
  var error_message = wpvivid_output_ajaxerror('changing base settings', textStatus, errorThrown);
1376
  alert(error_message);
1377
  });
1378
  }
1379
  else {
1380
- alert("There is no default remote storage configured. Please set it up first.");
1381
  }
1382
  }
1383
  else {
1384
- enable_schedule = "0";
1385
  var ajax_data = {
1386
  'action': 'wpvivid_set_general_setting',
1387
  'options': json_options,
@@ -1392,7 +1375,7 @@ function wpvivid_set_general_settings(){
1392
  try {
1393
  var jsonarray = jQuery.parseJSON(data);
1394
  jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
1395
- if (jsonarray.result === "success") {
1396
  location.reload();
1397
  }
1398
  else {
@@ -1413,23 +1396,23 @@ function wpvivid_set_general_settings(){
1413
  }
1414
  }
1415
  else {
1416
- alert("An email address is required.");
1417
  }
1418
  }
1419
  else {
1420
- alert("The local storage path is required.");
1421
  }
1422
  }
1423
  else{
1424
- alert("The maximum execution time for PHP script is required.");
1425
  }
1426
  }
1427
  else{
1428
- alert("The size for excluded files is required.");
1429
  }
1430
  }
1431
  else{
1432
- alert("The maximum zip file size is required.");
1433
  }
1434
  }
1435
 
@@ -1445,11 +1428,11 @@ function wpvivid_email_test(){
1445
  wpvivid_post_request(ajax_data, function(data){
1446
  try {
1447
  var jsonarray = jQuery.parseJSON(data);
1448
- if (jsonarray.result === "success") {
1449
- jQuery('#wpvivid_send_email_res').html("Test successed.");
1450
  }
1451
  else {
1452
- jQuery('#wpvivid_send_email_res').html("Test failed, " + jsonarray.error);
1453
  }
1454
  }
1455
  catch(err){
@@ -1494,11 +1477,11 @@ function wpvivid_import_settings(){
1494
  wpvivid_post_request(ajax_data, function(data){
1495
  try {
1496
  var jsonarray = jQuery.parseJSON(data);
1497
- if (jsonarray.result === "success") {
1498
  location.reload();
1499
  }
1500
  else {
1501
- alert("Error: " + jsonarray.error);
1502
  }
1503
  }
1504
  catch(err){
@@ -1527,7 +1510,7 @@ function wpvivid_retrieve_last_backup_log(){
1527
  wpvivid_post_request(ajax_data, function(data){
1528
  try {
1529
  var jsonarray = jQuery.parseJSON(data);
1530
- if (jsonarray.result !== "failed") {
1531
  if (jsonarray.data.length !== 0) {
1532
  ajax_data = {
1533
  'action': 'wpvivid_read_last_backup_log',
@@ -1536,11 +1519,11 @@ function wpvivid_retrieve_last_backup_log(){
1536
  wpvivid_post_request(ajax_data, function (data) {
1537
  try {
1538
  var jsonarray = jQuery.parseJSON(data);
1539
- if (jsonarray.result === "success") {
1540
  wpvivid_show_log(data);
1541
  }
1542
  else {
1543
- var div = "Reading the log failed. Please try again.";
1544
  jQuery('#wpvivid_display_log_content').html(div);
1545
  }
1546
  }
@@ -1551,7 +1534,7 @@ function wpvivid_retrieve_last_backup_log(){
1551
  }, 1000);
1552
  }
1553
  }, function (XMLHttpRequest, textStatus, errorThrown) {
1554
- var div = "Reading the log failed. Please try again.";
1555
  jQuery('#wpvivid_display_log_content').html(div);
1556
  });
1557
  }
@@ -1564,7 +1547,7 @@ function wpvivid_retrieve_last_backup_log(){
1564
  }, 1000);
1565
  }
1566
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1567
- var div = "Reading the log failed. Please try again.";
1568
  jQuery('#wpvivid_display_log_content').html(div);
1569
  });
1570
  }
@@ -1588,14 +1571,14 @@ function wpvivid_interface_flow_control(){
1588
  jQuery(this).children('td').each(function(j){
1589
  if(j == 0){
1590
  if (jQuery(this).find("input[type=checkbox]").prop('checked')) {
1591
- if (jQuery(this).next().text() === "FTP"){
1592
- jQuery('#wpvivid_upload_storage_type_ftp').attr("src", wpvivid_plugurl+"/images/storage-ftp.png");
1593
  }
1594
- else if(jQuery(this).next().text() === "SFTP"){
1595
- jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl+"/images/storage-sftp.png");
1596
  }
1597
- else if(jQuery(this).next().text() === "Amazon S3"){
1598
- jQuery('#wpvivid_upload_storage_type_amazon_s3').attr("src", wpvivid_plugurl+"/images/storage-amazon-s3.png");
1599
  }
1600
  }
1601
  }
@@ -1626,20 +1609,20 @@ function wpvivid_interface_flow_control(){
1626
  }
1627
  });
1628
 
1629
- jQuery("input[name='remote_storage']").on("click", function(){
1630
  var check_status = true;
1631
- if(jQuery(this).prop("checked") === true){
1632
  check_status = true;
1633
  }
1634
  else {
1635
  check_status = false;
1636
  }
1637
- jQuery("input[name='remote_storage']").prop("checked", false);
1638
  if(check_status === true){
1639
- jQuery(this).prop("checked", true);
1640
  }
1641
  else {
1642
- jQuery(this).prop("checked", false);
1643
  }
1644
  });
1645
 
@@ -1812,23 +1795,23 @@ function wpvivid_calc_backup_elapsed_time(carry_out_time){
1812
  var time = carry_out_time;
1813
  if (null != time && "" != time) {
1814
  if (time > 60 && time < 60 * 60) {
1815
- time = parseInt(time / 60.0) + "min" + parseInt((parseFloat(time / 60.0) -
1816
- parseInt(time / 60.0)) * 60) + "second";
1817
  }
1818
  else if (time >= 60 * 60 && time < 60 * 60 * 24) {
1819
- time = parseInt(time / 3600.0) + "hour" + parseInt((parseFloat(time / 3600.0) -
1820
- parseInt(time / 3600.0)) * 60) + "min" +
1821
  parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) -
1822
- parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "second";
1823
  } else if (time >= 60 * 60 * 24) {
1824
- time = parseInt(time / 3600.0/24) + "day" +parseInt((parseFloat(time / 3600.0/24)-
1825
- parseInt(time / 3600.0/24))*24) + "hour" + parseInt((parseFloat(time / 3600.0) -
1826
- parseInt(time / 3600.0)) * 60) + "min" +
1827
  parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) -
1828
- parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "second";
1829
  }
1830
  else {
1831
- time = parseInt(time) + "second";
1832
  }
1833
  }
1834
  return time;
@@ -1855,7 +1838,7 @@ function wpvivid_initialize_download(backup_id){
1855
  try {
1856
  var jsonarray = jQuery.parseJSON(data);
1857
  jQuery('#wpvivid_download_loading_'+backup_id).removeClass('is-active');
1858
- if (jsonarray.result === "success") {
1859
  jQuery('#wpvivid_file_part_' + backup_id).html("");
1860
  var download_array = new Array('backup_type', 'download_type', 'delete_button_id', 'download_button_id', 'progress_id', 'download_text_id', 'split_file_id');
1861
  var i = 0;
@@ -1967,14 +1950,14 @@ function wpvivid_initialize_download(backup_id){
1967
  function wpvivid_reset_backup_list(){
1968
  jQuery('#wpvivid_backuplist tr').each(function(i){
1969
  jQuery(this).children('td').each(function (j) {
1970
- if (j == 3) {
1971
- var backup_id = jQuery(this).parent().children('td').eq(0).find("input[type=checkbox]").attr("id");
1972
- var download_btn = "<div id=\"wpvivid_file_part_"+backup_id+"\" style=\"float:left;padding:10px 10px 10px 0px; min-width:290px;\">" +
1973
- "<div style=\"cursor:pointer;\" onclick=\"wpvivid_initialize_download('"+backup_id+"');\">" +
1974
- "<img id=\"wpvivid_download_btn_"+backup_id+"\" src=\""+wpvivid_plugurl+"/images/download.png\" style=\"vertical-align:middle;\" />Download" +
1975
- "<div class=\"spinner\" id=\"wpvivid_download_loading_"+backup_id+"\" style=\"float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;\"></div>" +
1976
- "</div>" +
1977
- "</div>";
1978
  jQuery(this).html(download_btn);
1979
  }
1980
  });
@@ -1984,7 +1967,7 @@ function wpvivid_reset_backup_list(){
1984
  function wpvivid_lock_download(backup_id){
1985
  jQuery('#wpvivid_backuplist tr').each(function(i){
1986
  jQuery(this).children('td').each(function (j) {
1987
- if (j == 3) {
1988
  jQuery(this).css({'pointer-events': 'none', 'opacity': '0.4'});
1989
  }
1990
  });
@@ -1994,7 +1977,7 @@ function wpvivid_lock_download(backup_id){
1994
  function wpvivid_unlock_download(backup_id){
1995
  jQuery('#wpvivid_backuplist tr').each(function(i){
1996
  jQuery(this).children('td').each(function (j) {
1997
- if (j == 3) {
1998
  jQuery(this).css({'pointer-events': 'auto', 'opacity': '1'});
1999
  }
2000
  });
@@ -2360,22 +2343,22 @@ function wpvivid_click_check_backup(backup_id){
2360
  var name = "";
2361
  var all_check = true;
2362
  jQuery('#wpvivid_backuplist tr').each(function (i) {
2363
- jQuery(this).children('td').each(function (j) {
2364
- if (j === 0) {
2365
  var id = jQuery(this).find("input[type=checkbox]").attr("id");
2366
- if(id === backup_id){
2367
- name = jQuery(this).parent().children('td').eq(1).find("img").attr("name");
2368
- if(name === "unlock") {
2369
  if (jQuery(this).find("input[type=checkbox]").prop('checked') === false) {
2370
  all_check = false;
2371
  }
2372
  }
2373
- else{
2374
  jQuery(this).find("input[type=checkbox]").prop('checked', false);
2375
  all_check = false;
2376
  }
2377
  }
2378
- else{
2379
  if (jQuery(this).find("input[type=checkbox]").prop('checked') === false) {
2380
  all_check = false;
2381
  }
@@ -2760,6 +2743,7 @@ function wpvivid_prepare_restore(){
2760
  jQuery('#wpvivid_restore_btn').show();
2761
  jQuery('#wpvivid_clean_restore').hide();
2762
  jQuery('#wpvivid_rollback_btn').hide();
 
2763
  wpvivid_post_request(ajax_data, function(data) {
2764
  try {
2765
  var jsonarray = jQuery.parseJSON(data);
85
  });
86
 
87
  $('#backup_list_all_check').click(function(){
88
+ var name = '';
89
  if($('#backup_list_all_check').prop('checked')) {
90
  $('#wpvivid_backuplist tr').each(function (i) {
91
+ $(this).children('th').each(function (j) {
92
  if (j == 0) {
93
+ name = jQuery(this).parent().children('td').eq(0).find("img").attr("name");
94
+ if(name === 'unlock') {
95
  $(this).find("input[type=checkbox]").prop('checked', true);
96
  }
97
  else{
103
  }
104
  else{
105
  $('#wpvivid_backuplist tr').each(function (i) {
106
+ $(this).children('th').each(function (j) {
107
  if (j == 0) {
108
  $(this).find("input[type=checkbox]").prop('checked', false);
109
  }
252
  wpvivid_prepare_backup = false;
253
  jQuery.each(jsonarray.backup.data, function (index, value) {
254
  if (value.size != false) {
255
+ if (typeof(value.size.db_size) !== 'undefined' && value.size.db_size !== '') {
256
  jQuery('#wpvivid_backup_database_size').html(value.size.db_size);
257
  }
258
  else {
259
+ jQuery('#wpvivid_backup_database_size').html('');
260
  }
261
+ if (typeof(value.size.files_size.sum) !== 'undefined' && value.size.files_size.sum !== '') {
262
  jQuery('#wpvivid_backup_file_size').html(value.size.files_size.sum);
263
  }
264
  else {
265
+ jQuery('#wpvivid_backup_file_size').html('');
266
  }
267
  }
268
+ if (value.status.str === 'ready') {
269
+ jQuery('#wpvivid_current_doing').html('Ready to backup. Progress: 0%, running time: 0second.');
270
+ var percent = '0%';
271
+ jQuery('#wpvivid_action_progress_bar_percent').css('width', percent);
272
  m_need_update = true;
273
  }
274
+ else if (value.status.str === 'running') {
275
  running_backup_taskid = index;
276
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
277
  jQuery('#wpvivid_postbox_backup_percent').show();
278
  if (value.is_canceled === false) {
279
+ jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
 
 
 
280
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
281
+ if (value.data.doing !== '') {
282
  var percent = 0;
283
+ if (value.data.type === 'backup') {
284
  percent = value.data.progress / 2;
285
  }
286
+ else if (value.data.type === 'upload') {
287
  percent = (100 + value.data.progress) / 2;
288
  }
289
+ percent = percent + '%';
290
+ jQuery('#wpvivid_action_progress_bar_percent').css('width', percent);
291
  var time = wpvivid_calc_backup_elapsed_time(value.data.running_time);
292
  if (value.is_canceled === false) {
293
+ jQuery('#wpvivid_current_doing').html(value.data.descript + ' Progress: ' + percent + ', running time: ' + time + '.');
294
  }
295
  }
296
  }
297
  else {
298
+ jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'nano', 'opacity': '0.4'});
299
+ jQuery('#wpvivid_current_doing').html('The backup will be canceled after backing up the current chunk ends.');
 
 
 
300
  }
301
  m_need_update = true;
302
  }
303
+ else if (value.status.str === 'wait_resume') {
304
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
305
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
306
+ var info = 'Task ' + index + ' timed out, backup task will retry in ' + value.data.next_resume_time + ' seconds, retry times: ' + value.status.resume_count + '.';
307
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
308
  jQuery('#wpvivid_postbox_backup_percent').show();
309
  var percent = 0;
310
+ if (value.data.type === 'backup') {
311
  percent = value.data.progress / 2;
312
  }
313
+ else if (value.data.type === 'upload') {
314
  percent = (100 + value.data.progress) / 2;
315
  }
316
+ percent = percent + '%';
317
+ jQuery('#wpvivid_action_progress_bar_percent').css('width', percent);
318
  jQuery('#wpvivid_current_doing').html(info);
319
+ if (value.data.next_resume_time !== 'get next resume time failed.') {
320
  wpvivid_resume_backup(index, value.data.next_resume_time);
321
  }
322
  else {
324
  wpvivid_delete_backup_task(index);
325
  }
326
  }
327
+ else if (value.status.str === 'no_responds') {
328
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
329
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
330
  running_backup_taskid = index;
331
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
332
  jQuery('#wpvivid_postbox_backup_percent').show();
333
  if (value.is_canceled === false) {
334
+ if (value.data.doing !== '') {
335
  var percent = 0;
336
+ if (value.data.type === 'backup') {
337
  percent = value.data.progress / 2;
338
  }
339
+ else if (value.data.type === 'upload') {
340
  percent = (100 + value.data.progress) / 2;
341
  }
342
+ percent = percent + '%';
343
+ jQuery('#wpvivid_action_progress_bar_percent').css('width', percent);
344
  var time = wpvivid_calc_backup_elapsed_time(value.data.running_time);
345
  if (value.is_canceled === false) {
346
+ jQuery('#wpvivid_current_doing').html('Task , ' + value.data.doing + ' is not responding. Progress: ' + percent + ', running time: ' + time);
347
  }
348
  }
349
  }
350
  else {
351
+ jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'nano', 'opacity': '0.4'});
352
+ jQuery('#wpvivid_current_doing').html('The backup will be canceled after backing up the current chunk ends.');
 
 
 
353
  }
354
  m_need_update = true;
355
  }
356
+ else if (value.status.str === 'completed') {
357
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
358
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
359
+ var info = 'Task ' + index + ' completed.';
360
  wpvivid_add_notice('Backup', 'Success', info);
361
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
362
  jQuery('#wpvivid_postbox_backup_percent').hide();
365
  wpvivid_retrieve_log_list();
366
  wpvivid_delete_backup_task(index);
367
  }
368
+ else if (value.status.str === 'error') {
369
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
370
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'auto', 'opacity': '1'});
371
+ var info = 'Backup error: ' + value.status.error + ', task id: ' + index;
372
  wpvivid_add_notice('Backup', 'Error', info);
373
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
374
  jQuery('#wpvivid_postbox_backup_percent').hide();
383
  task_retry_times = 0;
384
  var download_array = new Array('backup_type', 'download_type', 'delete_button_id', 'download_button_id', 'progress_id', 'download_text_id', 'split_file_id');
385
  var i = 0;
386
+ var file_part = '';
387
  jQuery.each(jsonarray.download.data.type, function (index, value) {
388
  download_array = wpvivid_get_download_info(index, download_array);
389
  var file_name = '';
395
  var progress = '0%';
396
  if (value1.status === 'need_download') {
397
  progress = '0%';
398
+ jQuery('#' + tmp_current_click_backupid + '-progress-part-' + i).css('width', progress);
399
  if (m_downloading_file_name === file_name) {
400
  m_need_update = true;
401
  }
405
  wpvivid_lock_download(tmp_current_click_backupid);
406
  }
407
  progress = value1.progress_text + '%';
408
+ jQuery('#' + tmp_current_click_backupid + '-text-part-' + i).html('<a>Retriving(remote storage to web server)</a>');
409
+ jQuery('#' + tmp_current_click_backupid + '-progress-part-' + i).css('width', progress);
410
  m_need_update = true;
411
  }
412
  else if (value1.status === 'completed') {
414
  wpvivid_unlock_download(tmp_current_click_backupid);
415
  }
416
  progress = '100%';
417
+ jQuery('#' + tmp_current_click_backupid + '-text-part-' + i).html('<a onclick="wpvivid_download(\'' + tmp_current_click_backupid + '\', \'' + index + '\', \'' + file_name + '\');" style="cursor: pointer">Download</a>');
418
+ jQuery('#' + tmp_current_click_backupid + '-progress-part-' + i).css('width', progress);
419
  }
420
  else if (value1.status === 'error') {
421
  if (m_downloading_file_name === file_name) {
423
  }
424
  alert(value1.error);
425
  progress = '0%';
426
+ jQuery('#' + tmp_current_click_backupid + '-text-part-' + i).html('<a onclick="wpvivid_prepare_download(\'' + i + '\', \'' + tmp_current_click_backupid + '\', \'' + file_name + '\');" style="cursor: pointer">Prepare to Download</a>');
427
+ jQuery('#' + tmp_current_click_backupid + '-progress-part-' + i).css('width', progress);
428
  }
429
  else if (value1.stauts === 'timeout') {
430
  if (m_downloading_file_name === file_name) {
431
  wpvivid_unlock_download(tmp_current_click_backupid);
432
  }
433
+ alert('Download timeout, please retry.');
434
  progress = '0%';
435
+ jQuery('#' + tmp_current_click_backupid + '-text-part-' + i).html('<a onclick="wpvivid_prepare_download(\'' + i + '\', \'' + tmp_current_click_backupid + '\', \'' + file_name + '\');" style="cursor: pointer">Prepare to Download</a>');
436
+ jQuery('#' + tmp_current_click_backupid + '-progress-part-' + i).css('width', progress);
437
  }
438
  });
439
  });
440
  }
441
  if (!b_has_data) {
 
 
 
 
 
442
  task_retry_times++;
443
  if (task_retry_times <= 5) {
444
  m_need_update = true;
470
  'task_id': running_backup_taskid
471
  };
472
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
473
+ jQuery('#wpvivid_current_doing').html('The backup will be canceled after backing up the current chunk ends.');
474
  wpvivid_post_request(ajax_data, function(data){
475
  }, function(XMLHttpRequest, textStatus, errorThrown) {
476
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'auto', 'opacity': '1'});
492
  wpvivid_post_request(ajax_data, function(data){
493
  wpvivid_show_log(data);
494
  }, function(XMLHttpRequest, textStatus, errorThrown) {
495
+ var div = 'Reading the log failed. Please try again.';
496
  jQuery('#wpvivid_display_log_content').html(div);
497
  });
498
  }
505
  var local;
506
  var remote;
507
  if (jQuery('#wpvivid_backup_local').prop('checked')) {
508
+ local = '1';
509
  } else {
510
+ local = '0';
511
  }
512
  if (jQuery('#wpvivid_backup_remote').prop('checked')) {
513
+ remote = '1';
514
  } else {
515
+ remote = '0';
516
  }
517
+ if(backup_type !== ''){
518
+ if(local !== '0' || remote !== '0') {
519
+ var lock = 0;
520
  if(jQuery('#wpvivid_backup_lock').prop('checked') === true){
521
  lock = 1;
522
  }
525
  }
526
  var remote_options = new Array();
527
  remote_options[0] = wpvivid_default_remote_storage;
528
+ if(remote !== '1' || wpvivid_default_remote_storage !== '') {
529
  var json = JSON.stringify(remote_options);
530
  var ajax_data = {
531
  'action': 'wpvivid_prepare_backup',
540
  jQuery('#wpvivid_backup_cancel_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
541
  jQuery('#wpvivid_backup_log_btn').css({'pointer-events': 'none', 'opacity': '0.4'});
542
  jQuery('#wpvivid_postbox_backup_percent').show();
543
+ jQuery('#wpvivid_current_doing').html('Ready to backup. Progress: 0%, running time: 0second.');
544
+ var percent = '0%';
545
+ jQuery('#wpvivid_action_progress_bar_percent').css('width', percent);
546
+ jQuery('#wpvivid_backup_database_size').html('');
547
+ jQuery('#wpvivid_backup_file_size').html('');
548
+ jQuery('#wpvivid_current_doing').html('');
549
  wpvivid_completed_backup = 1;
550
  wpvivid_prepare_backup = true;
551
  wpvivid_post_request(ajax_data, function(data){
552
  try {
553
  var jsonarray = jQuery.parseJSON(data);
554
+ if (jsonarray.result === 'failed') {
555
  wpvivid_delete_ready_task(jsonarray.error);
556
  }
557
+ else if(jsonarray.result === 'success') {
558
  m_backup_task_id = jsonarray.task_id;
559
  if(jsonarray.check.alert_db === false && jsonarray.check.alter_files === false && jsonarray.check.alter_fcgi === false){
560
  wpvivid_retrieve_backup_list();
561
  wpvivid_backup_now(jsonarray.task_id);
562
  }
563
  else{
564
+ var descript = '';
565
  if(jsonarray.check.alert_db === true || jsonarray.check.alter_files === true){
566
+ descript = 'The database (the dumping SQL file) might be too large, backing up the database may run out of server memory and result in a backup failure.\n' +
567
+ 'One or more files might be too large, backing up the file(s) may run out of server memory and result in a backup failure.\n' +
568
+ 'Click OK button and continue to back up.';
569
  var ret = confirm(descript);
570
  if(ret === true){
571
  wpvivid_retrieve_backup_list();
609
  wpvivid_post_request(ajax_data, function (data) {
610
  try {
611
  var jsonarray = jQuery.parseJSON(data);
612
+ if (jsonarray.result === 'success') {
613
  wpvivid_add_notice('Backup', 'Error', error);
614
  jQuery('#wpvivid_quickbackup_btn').css({'pointer-events': 'auto', 'opacity': '1'});
615
  jQuery('#wpvivid_postbox_backup_percent').hide();
634
  * @param backup_id - A unique ID for a backup
635
  */
636
  function wpvivid_delete_selected_backup(backup_id){
637
+ var name = '';
638
  jQuery('#wpvivid_backuplist tr').each(function(i){
639
  jQuery(this).children('td').each(function (j) {
640
  if (j == 0) {
641
+ var id = jQuery(this).parent().children('th').find("input[type=checkbox]").attr("id");
642
  if(id === backup_id){
643
+ name = jQuery(this).parent().children('td').eq(0).find('img').attr('name');
644
  }
645
  }
646
  });
647
  });
648
+ var descript = '';
649
  var force_del = 0;
650
+ if(name === 'lock') {
651
+ descript = 'This backup is locked, are you sure to remove it? This backup will be deleted permanently from your hosting (localhost) and remote storages.';
652
  force_del = 1;
653
  }
654
  else{
655
+ descript = 'Are you sure to remove this backup? This backup will be deleted permanently from your hosting (localhost) and remote storages.';
656
  force_del = 0;
657
  }
658
  var ret = confirm(descript);
665
  wpvivid_post_request(ajax_data, function(data){
666
  try {
667
  var jsonarray = jQuery.parseJSON(data);
668
+ if (jsonarray.result === 'failed') {
669
  alert(jsonarray.error);
670
  }
671
  wpvivid_retrieve_backup_list();
690
  var delete_backup_array = new Array();
691
  var count = 0;
692
  jQuery('#wpvivid_backuplist tr').each(function (i) {
693
+ jQuery(this).children('th').each(function (j) {
694
  if (j == 0) {
695
+ if(jQuery(this).find('input[type=checkbox]').prop('checked')){
696
+ delete_backup_array[count] = jQuery(this).find('input[type=checkbox]').attr('id');
697
  count++;
698
  }
699
  }
700
  });
701
  });
702
+ if( count === 0 ){
703
+ alert('Please select at least one item.');
704
+ }
705
+ else {
706
+ var descript = 'Are you sure to remove the selected backups? These backups will be deleted permanently from your hosting (localhost).';
707
+ var ret = confirm(descript);
708
+ if (ret === true) {
709
+ var ajax_data = {
710
+ 'action': 'wpvivid_delete_backup_array',
711
+ 'backup_id': delete_backup_array
712
+ };
713
+ wpvivid_post_request(ajax_data, function (data) {
714
+ try {
715
+ var jsonarray = jQuery.parseJSON(data);
716
+ if (jsonarray.result === 'failed') {
717
+ alert(jsonarray.error);
718
+ }
719
+ wpvivid_retrieve_backup_list();
720
  }
721
+ catch (err) {
722
+ setTimeout(function () {
723
+ wpvivid_delete_backups_inbatches();
724
+ }, 1000);
725
+ }
726
+ }, function (XMLHttpRequest, textStatus, errorThrown) {
727
+ var error_message = wpvivid_output_ajaxerror('deleting the backup', textStatus, errorThrown);
728
+ alert(error_message);
729
+ });
730
+ }
 
 
731
  }
732
  }
733
 
759
  wpvivid_post_request(ajax_data, function(data){
760
  try {
761
  var jsonarray = jQuery.parseJSON(data);
762
+ if (jsonarray.result === 'success') {
763
+ if (jsonarray.data.status.str === 'completed') {
764
+ var backup_status = 'Succeed';
765
+ var last_backup_msg = 'Last backup: ' + jsonarray.data.status.start_time + ' ' + backup_status + ' <a onclick="wpvivid_retrieve_last_backup_log();" style="cursor:pointer;"> Log</a>';
766
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
767
  }
768
+ else if (jsonarray.data.status.str === 'error') {
769
+ var backup_status = 'Failed';
770
+ var last_backup_msg = 'Last backup: ' + jsonarray.data.status.start_time + ' ' + backup_status + ' <a onclick="wpvivid_retrieve_last_backup_log();" style="cursor:pointer;"> Log</a>';
771
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
772
  }
773
+ else if (jsonarray.data.status.str === 'cancel') {
774
+ var backup_status = 'Failed';
775
+ var last_backup_msg = 'Last backup: ' + jsonarray.data.status.start_time + ' ' + backup_status + ' <a onclick=\"wpvivid_retrieve_last_backup_log();\" style=\"cursor:pointer;\"> Log</a>';
776
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
777
  }
778
  else {
779
  jQuery('#wpvivid_last_backup_msg_log').hide();
780
+ var last_backup_msg = 'Last backup: The last backup message not found.';
781
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
782
  }
783
  }
784
+ else if (jsonarray.result === 'failed') {
785
  jQuery('#wpvivid_last_backup_msg_log').hide();
786
  var last_backup_msg = jsonarray.data;
787
  jQuery('#wpvivid_last_backup_msg').html(last_backup_msg);
806
  * @param storage_type - Remote storage types (Amazon S3, SFTP and FTP server)
807
  */
808
  function wpvivid_add_remote_storage(action, storage_type){
809
+ if(storage_type === 'ftp'){
810
  var storage_array = new Array('storage_name', 'storage_server', 'storage_login', 'storage_password', 'storage_path');
811
  }
812
+ else if(storage_type === 'sftp'){
813
  var storage_array = new Array('storage_name', 'storage_ip', 'storage_username', 'storage_password', 'storage_port', 'storage_path');
814
  }
815
+ else if(storage_type === 'amazonS3'){
816
  var storage_array = new Array('storage_name', 'storage_access', 'storage_secret', 'storage_path', 'storage_region');
817
  }
818
  storage_array = wpvivid_get_storage_info(storage_type, storage_array);
825
  ftp_passive=false;
826
  }
827
  var default_storage = 1;
828
+ if(ret === 'success'){
829
+ if(storage_type === 'ftp'){
830
  var remote = {
831
  'type': storage_type,
832
  'options': {
845
  default_storage = 0;
846
  }
847
  }
848
+ else if(storage_type === 'sftp'){
849
  var remote = {
850
  'type': storage_type,
851
  'options': {
864
  default_storage = 0;
865
  }
866
  }
867
+ else if(storage_type === 'amazonS3'){
868
  var remote = {
869
  'type': storage_type,
870
  'options': {
901
  if(action === 'wpvivid_test_remote_connection') {
902
  try {
903
  var jsonarray = jQuery.parseJSON(data);
904
+ if (jsonarray.result === 'succeed') {
905
  wpvivid_add_remote_storage('wpvivid_add_remote', storage_type);
906
  }
907
+ else if (jsonarray.result === 'failed') {
908
  alert(jsonarray.error);
909
  jQuery('#storage_account_button').css({'pointer-events': 'auto', 'opacity': '1'});
910
  }
969
  }
970
 
971
  function wpvivid_handle_remote_storage_data(data){
972
+ jQuery('#wpvivid_remote_storage_list').html('');
973
  var i = 0;
974
  try {
975
  var jsonarray = jQuery.parseJSON(data);
976
+ if (jsonarray.result === 'success') {
977
  jQuery.each(jsonarray.data, function (index, value) {
978
+ var check_status = '';
979
+ var default_storage = '';
980
  i++;
981
  if (jsonarray.data.remote_selected.length !== 0) {
982
  jQuery.each(jsonarray.data.remote_selected, function (index1, value1) {
983
  default_storage = value1;
984
  wpvivid_default_remote_storage = value1;
985
  if (index === default_storage) {
986
+ check_status = 'checked';
987
+ if (value.type === 'ftp') {
988
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
989
+ jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp.png');
990
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
991
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
992
+ jQuery('#wpvivid_schedule_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp.png');
993
+ jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
994
+ jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
995
  }
996
+ else if (value.type === 'sftp') {
997
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.path);
998
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp.png');
999
+ jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1000
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1001
+ jQuery('#wpvivid_schedule_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1002
+ jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp.png');
1003
+ jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1004
  }
1005
+ else if (value.type === 'amazonS3') {
1006
  jQuery('#wpvivid_out_of_date_remote_path').html(value.options.s3Path);
1007
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3.png');
1008
+ jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1009
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1010
+ jQuery('#wpvivid_schedule_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1011
+ jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1012
+ jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3.png');
1013
  }
1014
  }
1015
  });
1016
  }
1017
  else {
1018
  wpvivid_default_remote_storage = '';
1019
+ jQuery('#wpvivid_out_of_date_remote_path').html('There is no path for remote storage, please set it up first.');
1020
+ jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1021
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1022
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1023
+ jQuery('#wpvivid_schedule_storage_type_ftp').attr('src', wpvivid_plugurl + '/images/storage-ftp(gray).png');
1024
+ jQuery('#wpvivid_schedule_storage_type_sftp').attr('src', wpvivid_plugurl + '/images/storage-sftp(gray).png');
1025
+ jQuery('#wpvivid_schedule_storage_type_amazon_s3').attr('src', wpvivid_plugurl + '/images/storage-amazon-s3(gray).png');
1026
  }
1027
+ if (index !== 'remote_selected') {
1028
  var storage_type = '';
1029
+ if (value.type === 'ftp') {
1030
+ storage_type = 'FTP';
1031
  }
1032
+ else if (value.type === 'sftp') {
1033
+ storage_type = 'SFTP';
1034
  }
1035
+ else if (value.type === 'amazonS3') {
1036
+ storage_type = 'Amazon S3';
1037
  }
1038
+ var $remote_storage_tr = jQuery('<tr>' +
1039
+ '<td>' + i + '</td>' +
1040
+ '<td><input type="checkbox" name="remote_storage" value=\'' + index + '\' ' + check_status + ' /></td>' +
1041
+ '<td>' + storage_type + '</td>' +
1042
+ '<td class="row-title"><label for="tablecell">' + value.options.name + '</label></td>' +
1043
+ '<td onclick="wpvivid_delete_remote_storage(\'' + index + '\');">' +
1044
+ '<img src="' + wpvivid_plugurl + '/images/Delete.png" style="vertical-align:middle; cursor:pointer;" title="Delete the backup"/>' +
1045
+ '</td>' +
1046
+ '</tr>');
1047
  var $remote_storage_table = jQuery('#wpvivid_remote_storage_list');
1048
  $remote_storage_table.append($remote_storage_tr);
1049
  }
1065
  * @param storage_id - A unique ID for a remote storage
1066
  */
1067
  function wpvivid_delete_remote_storage(storage_id){
1068
+ var descript = 'Deleting a remote storage will make it unavailable until it is added again. Are you sure to continue?';
1069
  var ret = confirm(descript);
1070
  if(ret === true){
1071
  var ajax_data = {
1074
  };
1075
  wpvivid_post_request(ajax_data, function(data){
1076
  if(storage_id === wpvivid_default_remote_storage){
1077
+ wpvivid_default_remote_storage = '';
1078
  }
1079
  wpvivid_retrieve_storage_list();
1080
  },function(XMLHttpRequest, textStatus, errorThrown) {
1095
  try {
1096
  var jsonarray = jQuery.parseJSON(data);
1097
  jQuery('#wpvivid_backuplist').html("");
1098
+ var amazon_s3_url = '/images/storage-amazon-s3(gray).png';
1099
+ var ftp_url = '/images/storage-ftp(gray).png';
1100
+ var sftp_url = '/images/storage-sftp(gray).png';
1101
+ var backup_lock_img = '/images/unlocked.png';
1102
+ var backup_lock_status = 'unlock';
1103
+ if (jsonarray.result === 'success') {
1104
  jQuery.each(jsonarray.data, function (index, value1) {
1105
+ amazon_s3_url = '/images/storage-amazon-s3(gray).png';
1106
+ ftp_url = '/images/storage-ftp(gray).png';
1107
+ sftp_url = '/images/storage-sftp(gray).png';
1108
+ if (typeof(value1.lock) == 'undefined') {
1109
+ backup_lock_img = '/images/unlocked.png';
1110
+ backup_lock_status = 'unlock';
1111
  }
1112
  else {
1113
  if (value1.lock === 0) {
1114
+ backup_lock_img = '/images/unlocked.png';
1115
+ backup_lock_status = 'unlock';
1116
  }
1117
  else {
1118
+ backup_lock_img = '/images/locked.png';
1119
+ backup_lock_status = 'lock';
1120
  }
1121
  }
1122
  jQuery.each(value1.remote, function (index2, value2) {
1123
+ if (value2.type === 'amazonS3') {
1124
+ amazon_s3_url = '/images/storage-amazon-s3.png';
1125
  }
1126
+ if (value2.type === 'ftp') {
1127
+ ftp_url = '/images/storage-ftp.png';
1128
  }
1129
+ if (value2.type === 'sftp') {
1130
+ sftp_url = '/images/storage-sftp.png';
1131
  }
1132
  });
1133
+ var $backuptr = jQuery('<tr>' +
1134
+ '<th class="check-column"><input name="check_backup" type="checkbox" id="' + index + '" value="' + index + '" onclick="wpvivid_click_check_backup(\''+index+'\');" /></th>' +
1135
+ '<td class="tablelistcolumn">' +
1136
+ '<div style="float:left;padding:10px 10px 10px 0px;">' +
1137
+ '<strong>'+ value1.create_time + '</strong></br>' +
1138
+ '<div class="common-table">' +
1139
+ '<span title="Lock the backup, it won\'t be deleted automatically">' +
1140
+ '<img src="' + wpvivid_plugurl + backup_lock_img + '" name="' + backup_lock_status + '" onclick="wpvivid_set_backup_lock(\'' + index + '\', \'' + backup_lock_status + '\');" style="vertical-align:middle; cursor:pointer;"/>' +
1141
+ '</span> | <span>Type: </span><span>' + value1.type + '</span>|<span><a href="#" onclick="wpvivid_initialize_log(\'' + index + '\');"><img src="' + wpvivid_plugurl + '/images/Log.png" name="' + backup_lock_status + '" style="vertical-align:middle;cursor:pointer;"/>Log</a></span>|<a href="#" onclick="wpvivid_initialize_restore(\'' + index + '\', \'' + value1.create_time + '\');"><img src="' + wpvivid_plugurl + '/images/Restore.png" style="vertical-align:middle;cursor:pointer;"/>Restore</a></span>' +
1142
+ '</div>' +
1143
+ '</div>' +
1144
+ '</td>' +
1145
+ '<td class="tablelistcolumn">' +
1146
+ '<div style="float:left;padding:10px 10px 10px 0px;">' +
1147
+ '<img src="' + wpvivid_plugurl + amazon_s3_url + '" style="vertical-align:middle; " title="Amazon S3"/>' +
1148
+ '<img src="' + wpvivid_plugurl + ftp_url + '" style="vertical-align:middle;" title="FTP"/>' +
1149
+ '<img src="' + wpvivid_plugurl + sftp_url + '" style="vertical-align:middle;" title="SFTP"/>' +
1150
+ '</div>' +
1151
+ '</td>' +
1152
+ '<td class="tablelistcolumn">' +
1153
+ '<div id="wpvivid_file_part_' + index + '" style="float:left;padding:10px 10px 10px 0px;">' +
1154
+ '<div style="cursor:pointer;" onclick="wpvivid_initialize_download(\'' + index + '\');">' +
1155
+ '<img id="wpvivid_download_btn_' + index + '" src="' + wpvivid_plugurl + '/images/download.png" style="vertical-align:middle;" />Download' +
1156
+ '<div class="spinner" id="wpvivid_download_loading_' + index + '" style="float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;"></div>' +
1157
+ '</div>' +
1158
+ '</div>' +
1159
+ '</td>' +
1160
+ '<td class="tablelistcolumn">' +
1161
+ '<div class="backuplist-delete-backup">' +
1162
+ '<img src="' + wpvivid_plugurl + '/images/Delete.png" style="vertical-align:middle; cursor:pointer;" title="Delete the backup" onclick="wpvivid_delete_selected_backup(\'' + index + '\');"/>' +
1163
+ '</div>' +
1164
+ '</td>' +
1165
+ '</tr>');
1166
  var $backuptable = jQuery('#wpvivid_backuplist');
1167
  $backuptable.append($backuptr);
1168
  });
1187
  function wpvivid_set_general_settings(){
1188
  var package_method = jQuery('input[name="choose-package-method"]:checked').val();
1189
  var no_compress = false;
1190
+ if(package_method === 'method-no-compress'){
1191
  no_compress = true;
1192
  }
1193
  else{
1202
  var mail = jQuery('#wpvivid_mail').val();
1203
  var send_method = jQuery('input[name="send_email_report"]:checked').val();
1204
  var always_send = false;
1205
+ if(send_method === 'send_mail_always'){
1206
  always_send = true;
1207
  }
1208
  else{
1231
  }
1232
 
1233
  var email_setting = {
1234
+ 'email_enable': email_enable,
1235
+ 'send_to': [mail],
1236
+ 'always': always_send
1237
  };
1238
  var compress_setting = {
1239
+ 'compress_type': 'zip',
1240
+ 'max_file_size': max_file_size + 'M',
1241
+ 'no_compress': no_compress,
1242
+ 'exclude_file_size': exclude_file_size,
1243
+ 'use_temp_file':1,
1244
+ 'use_temp_size':16
1245
  };
1246
  var local_setting = {
1247
+ 'path': local_storage_path,
1248
+ 'save_local': save_local
1249
  };
1250
  var common_setting = {
1251
  'max_execution_time': max_exec_time,
1252
+ 'log_save_location': local_storage_path + '/wpvivid_log',
1253
  'max_backup_count': max_backup_count,
1254
  'estimate_backup': estimate_backup
1255
  };
1256
  var options = {
1257
+ 'wpvivid_email_setting': email_setting,
1258
  'wpvivid_compress_setting': compress_setting,
1259
  'wpvivid_local_setting': local_setting,
1260
  'wpvivid_common_setting': common_setting
1262
 
1263
  var json_options=JSON.stringify(options);
1264
 
1265
+ var enable_schedule = '1';
1266
 
1267
+ if(max_file_size != '') {
1268
+ if(exclude_file_size != '') {
1269
+ if(max_exec_time != '') {
1270
+ if (local_storage_path !== '') {
1271
+ if (mail != '' || email_enable === false) {
1272
  if (jQuery('#wpvivid_schedule_enable').prop('checked') === true) {
1273
  var backup_time = jQuery('input[name="schedule"]:checked').val();
1274
  var backup_type = jQuery('input[name="schedule-backup-files"]:checked').val();
1275
  switch (backup_time) {
1276
+ case 'Hours':
1277
+ backup_time = 'wpvivid_12hours';
1278
  break;
1279
+ case 'Daily':
1280
+ backup_time = 'wpvivid_daily';
1281
  break;
1282
+ case 'Weekly':
1283
+ backup_time = 'wpvivid_weekly';
1284
  break;
1285
+ case 'Fortnightly':
1286
+ backup_time = 'wpvivid_fortnightly';
1287
  break;
1288
+ case 'Monthly':
1289
+ backup_time = 'wpvivid_monthly';
1290
  break;
1291
  }
1292
 
1293
  var wpvivid_schedule_local = 0;
1294
  var remote = 0;
1295
  var save_local_remote = jQuery('input[name="save_local_remote"]:checked').val();
1296
+ if (save_local_remote === 'local') {
1297
  wpvivid_schedule_local = 1;
1298
  remote = 0;
1299
  }
1300
+ else if (save_local_remote === 'remote') {
1301
  wpvivid_schedule_local = 0;
1302
  remote = 1;
1303
  }
1304
  var b_has_default = true;
1305
+ if (remote === 1 && wpvivid_default_remote_storage === '') {
1306
  b_has_default = false;
1307
  }
1308
  var remote_options = new Array();
1327
  }
1328
  };
1329
 
1330
+ enable_schedule = '1';
1331
  var json_schedule = JSON.stringify(schedule);
1332
  var ajax_data = {
1333
  'action': 'wpvivid_set_general_setting',
1335
  'schedule': json_schedule,
1336
  'enable_schedule': enable_schedule
1337
  };
1338
+ jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'none', 'opacity': '0.4'});
 
 
 
1339
  wpvivid_post_request(ajax_data, function (data) {
1340
  try {
1341
  var jsonarray = jQuery.parseJSON(data);
1342
+ jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
1343
+ if (jsonarray.result === 'success') {
 
 
 
1344
  location.reload();
1345
  }
1346
  else {
1354
  }, 1000);
1355
  }
1356
  }, function (XMLHttpRequest, textStatus, errorThrown) {
1357
+ jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
 
 
 
1358
  var error_message = wpvivid_output_ajaxerror('changing base settings', textStatus, errorThrown);
1359
  alert(error_message);
1360
  });
1361
  }
1362
  else {
1363
+ alert('There is no default remote storage configured. Please set it up first.');
1364
  }
1365
  }
1366
  else {
1367
+ enable_schedule = '0';
1368
  var ajax_data = {
1369
  'action': 'wpvivid_set_general_setting',
1370
  'options': json_options,
1375
  try {
1376
  var jsonarray = jQuery.parseJSON(data);
1377
  jQuery('#wpvivid_setting_general_save').css({'pointer-events': 'auto', 'opacity': '1'});
1378
+ if (jsonarray.result === 'success') {
1379
  location.reload();
1380
  }
1381
  else {
1396
  }
1397
  }
1398
  else {
1399
+ alert('An email address is required.');
1400
  }
1401
  }
1402
  else {
1403
+ alert('The local storage path is required.');
1404
  }
1405
  }
1406
  else{
1407
+ alert('The maximum execution time for PHP script is required.');
1408
  }
1409
  }
1410
  else{
1411
+ alert('The size for excluded files is required.');
1412
  }
1413
  }
1414
  else{
1415
+ alert('The maximum zip file size is required.');
1416
  }
1417
  }
1418
 
1428
  wpvivid_post_request(ajax_data, function(data){
1429
  try {
1430
  var jsonarray = jQuery.parseJSON(data);
1431
+ if (jsonarray.result === 'success') {
1432
+ jQuery('#wpvivid_send_email_res').html('Test successed.');
1433
  }
1434
  else {
1435
+ jQuery('#wpvivid_send_email_res').html('Test failed, ' + jsonarray.error);
1436
  }
1437
  }
1438
  catch(err){
1477
  wpvivid_post_request(ajax_data, function(data){
1478
  try {
1479
  var jsonarray = jQuery.parseJSON(data);
1480
+ if (jsonarray.result === 'success') {
1481
  location.reload();
1482
  }
1483
  else {
1484
+ alert('Error: ' + jsonarray.error);
1485
  }
1486
  }
1487
  catch(err){
1510
  wpvivid_post_request(ajax_data, function(data){
1511
  try {
1512
  var jsonarray = jQuery.parseJSON(data);
1513
+ if (jsonarray.result !== 'failed') {
1514
  if (jsonarray.data.length !== 0) {
1515
  ajax_data = {
1516
  'action': 'wpvivid_read_last_backup_log',
1519
  wpvivid_post_request(ajax_data, function (data) {
1520
  try {
1521
  var jsonarray = jQuery.parseJSON(data);
1522
+ if (jsonarray.result === 'success') {
1523
  wpvivid_show_log(data);
1524
  }
1525
  else {
1526
+ var div = 'Reading the log failed. Please try again.';
1527
  jQuery('#wpvivid_display_log_content').html(div);
1528
  }
1529
  }
1534
  }, 1000);
1535
  }
1536
  }, function (XMLHttpRequest, textStatus, errorThrown) {
1537
+ var div = 'Reading the log failed. Please try again.';
1538
  jQuery('#wpvivid_display_log_content').html(div);
1539
  });
1540
  }
1547
  }, 1000);
1548
  }
1549
  }, function(XMLHttpRequest, textStatus, errorThrown) {
1550
+ var div = 'Reading the log failed. Please try again.';
1551
  jQuery('#wpvivid_display_log_content').html(div);
1552
  });
1553
  }
1571
  jQuery(this).children('td').each(function(j){
1572
  if(j == 0){
1573
  if (jQuery(this).find("input[type=checkbox]").prop('checked')) {
1574
+ if (jQuery(this).next().text() === 'FTP'){
1575
+ jQuery('#wpvivid_upload_storage_type_ftp').attr('src', wpvivid_plugurl+'/images/storage-ftp.png');
1576
  }
1577
+ else if(jQuery(this).next().text() === 'SFTP'){
1578
+ jQuery('#wpvivid_upload_storage_type_sftp').attr('src', wpvivid_plugurl+'/images/storage-sftp.png');
1579
  }
1580
+ else if(jQuery(this).next().text() === 'Amazon S3'){
1581
+ jQuery('#wpvivid_upload_storage_type_amazon_s3').attr('src', wpvivid_plugurl+'/images/storage-amazon-s3.png');
1582
  }
1583
  }
1584
  }
1609
  }
1610
  });
1611
 
1612
+ jQuery('input[name="remote_storage"]').on("click", function(){
1613
  var check_status = true;
1614
+ if(jQuery(this).prop('checked') === true){
1615
  check_status = true;
1616
  }
1617
  else {
1618
  check_status = false;
1619
  }
1620
+ jQuery('input[name="remote_storage"]').prop('checked', false);
1621
  if(check_status === true){
1622
+ jQuery(this).prop('checked', true);
1623
  }
1624
  else {
1625
+ jQuery(this).prop('checked', false);
1626
  }
1627
  });
1628
 
1795
  var time = carry_out_time;
1796
  if (null != time && "" != time) {
1797
  if (time > 60 && time < 60 * 60) {
1798
+ time = parseInt(time / 60.0) + 'min' + parseInt((parseFloat(time / 60.0) -
1799
+ parseInt(time / 60.0)) * 60) + 'second';
1800
  }
1801
  else if (time >= 60 * 60 && time < 60 * 60 * 24) {
1802
+ time = parseInt(time / 3600.0) + 'hour' + parseInt((parseFloat(time / 3600.0) -
1803
+ parseInt(time / 3600.0)) * 60) + 'min' +
1804
  parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) -
1805
+ parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + 'second';
1806
  } else if (time >= 60 * 60 * 24) {
1807
+ time = parseInt(time / 3600.0/24) + 'day' +parseInt((parseFloat(time / 3600.0/24)-
1808
+ parseInt(time / 3600.0/24))*24) + 'hour' + parseInt((parseFloat(time / 3600.0) -
1809
+ parseInt(time / 3600.0)) * 60) + 'min' +
1810
  parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) -
1811
+ parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + 'second';
1812
  }
1813
  else {
1814
+ time = parseInt(time) + 'second';
1815
  }
1816
  }
1817
  return time;
1838
  try {
1839
  var jsonarray = jQuery.parseJSON(data);
1840
  jQuery('#wpvivid_download_loading_'+backup_id).removeClass('is-active');
1841
+ if (jsonarray.result === 'success') {
1842
  jQuery('#wpvivid_file_part_' + backup_id).html("");
1843
  var download_array = new Array('backup_type', 'download_type', 'delete_button_id', 'download_button_id', 'progress_id', 'download_text_id', 'split_file_id');
1844
  var i = 0;
1950
  function wpvivid_reset_backup_list(){
1951
  jQuery('#wpvivid_backuplist tr').each(function(i){
1952
  jQuery(this).children('td').each(function (j) {
1953
+ if (j == 2) {
1954
+ var backup_id = jQuery(this).parent().children('th').find("input[type=checkbox]").attr("id");
1955
+ var download_btn = '<div id="wpvivid_file_part_' + backup_id + '" style="float:left;padding:10px 10px 10px 0px;">' +
1956
+ '<div style="cursor:pointer;" onclick="wpvivid_initialize_download(\'' + backup_id + '\');">' +
1957
+ '<img id="wpvivid_download_btn_' + backup_id + '" src="' + wpvivid_plugurl + '/images/download.png" style="vertical-align:middle;" />Download' +
1958
+ '<div class="spinner" id="wpvivid_download_loading_' + backup_id + '" style="float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;"></div>' +
1959
+ '</div>' +
1960
+ '</div>';
1961
  jQuery(this).html(download_btn);
1962
  }
1963
  });
1967
  function wpvivid_lock_download(backup_id){
1968
  jQuery('#wpvivid_backuplist tr').each(function(i){
1969
  jQuery(this).children('td').each(function (j) {
1970
+ if (j == 2) {
1971
  jQuery(this).css({'pointer-events': 'none', 'opacity': '0.4'});
1972
  }
1973
  });
1977
  function wpvivid_unlock_download(backup_id){
1978
  jQuery('#wpvivid_backuplist tr').each(function(i){
1979
  jQuery(this).children('td').each(function (j) {
1980
+ if (j == 2) {
1981
  jQuery(this).css({'pointer-events': 'auto', 'opacity': '1'});
1982
  }
1983
  });
2343
  var name = "";
2344
  var all_check = true;
2345
  jQuery('#wpvivid_backuplist tr').each(function (i) {
2346
+ jQuery(this).children('th').each(function (j) {
2347
+ if(j === 0) {
2348
  var id = jQuery(this).find("input[type=checkbox]").attr("id");
2349
+ if (id === backup_id) {
2350
+ name = jQuery(this).parent().children('td').eq(0).find("img").attr("name");
2351
+ if (name === "unlock") {
2352
  if (jQuery(this).find("input[type=checkbox]").prop('checked') === false) {
2353
  all_check = false;
2354
  }
2355
  }
2356
+ else {
2357
  jQuery(this).find("input[type=checkbox]").prop('checked', false);
2358
  all_check = false;
2359
  }
2360
  }
2361
+ else {
2362
  if (jQuery(this).find("input[type=checkbox]").prop('checked') === false) {
2363
  all_check = false;
2364
  }
2743
  jQuery('#wpvivid_restore_btn').show();
2744
  jQuery('#wpvivid_clean_restore').hide();
2745
  jQuery('#wpvivid_rollback_btn').hide();
2746
+ wpvivid_restoring = true;
2747
  wpvivid_post_request(ajax_data, function(data) {
2748
  try {
2749
  var jsonarray = jQuery.parseJSON(data);
admin/partials/wpvivid-admin-display.php CHANGED
@@ -52,12 +52,13 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
52
  </div>
53
  </a>
54
  </h2>
55
- <div class="wrap">
56
  <div id="poststuff">
57
  <div id="post-body" class="metabox-holder columns-2">
58
  <div id="post-body-content">
59
- <div class="inside">
60
  <div id="general-page" class="tabcontent wpvivid_tab_general" name="tab-backup" style="width:100%;">
 
61
  <?php
62
  $btn_style = 'pointer-events: auto; opacity: 1;';
63
  $estimate_db_size='';
@@ -146,7 +147,7 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
146
  <legend class="screen-reader-text"><span>input type="checkbox"</span></legend>
147
  <label>
148
  <input type="checkbox" id="wpvivid_backup_local" name="backup-storage" value="" checked />
149
- <span><?php _e( 'Save Backup on Your Hosting', 'wpvivid' ); ?></span>
150
  </label>
151
 
152
  <div style="clear:both;"></div>
@@ -182,9 +183,9 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
182
  </div>
183
  </fieldset>
184
  </div>
185
- <div class="quickstart-btn">
186
  <input class="button-primary quickbackup-btn" id="wpvivid_quickbackup_btn" type="submit" value="<?php esc_attr_e( 'Backup Now', 'wpvivid'); ?>" <?php esc_attr_e($btn_style, 'wpvivid'); ?> />
187
- <div class="schedule-tab-block">
188
  <label>
189
  <input type="checkbox" id="wpvivid_backup_lock" name="lock-backup" value="" />
190
  <span><?php _e( 'Lock the backup to avoid to be deleted automatically', 'wpvivid' ); ?></span>
@@ -226,11 +227,11 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
226
  }
227
  }
228
  ?>
229
- <p id="wpvivid_schedule_status"><?php _e('Schedule Status: '); ?><?php _e($schedule_status, 'wpvivid'); ?></p>
230
  <div id="wpvivid_schedule_info">
231
- <p><?php _e('Current Server Time: '); ?><?php _e(date("l, F d, Y H:i",time()), 'wpvivid'); ?></p>
232
- <p><span id="wpvivid_last_backup_msg"><?php _e('Last Backup: '); ?><?php _e($last_backup_msg, 'wpvivid'); ?></span></p>
233
- <p id="wpvivid_next_backup"><?php _e('Next Backup: '); ?><?php _e($next_backup_time, 'wpvivid'); ?></p>
234
  </div>
235
  </div>
236
  </div>
@@ -262,9 +263,9 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
262
  <div style="clear:both;"></div>
263
  <table class="wp-list-table widefat plugins" id="wpvivid_backuplist_table">
264
  <thead>
265
- <tr>
266
- <td></td>
267
- <th class="row-title"><?php _e( 'Backup','wpvivid'); ?></th>
268
  <th><?php _e( 'Storage','wpvivid'); ?></th>
269
  <th><?php _e( 'Download','wpvivid'); ?></th>
270
  <th><?php _e( 'Delete','wpvivid'); ?></th>
@@ -274,9 +275,9 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
274
  <?php
275
  foreach ($backuplist as $key=>$value) { ?>
276
  <tr>
277
- <td><input name="check_backup" type="checkbox" id="<?php esc_attr_e($key, 'wpvivid'); ?>" value="<?php esc_attr_e($key, 'wpvivid'); ?>" onclick="wpvivid_click_check_backup('<?php _e($key, 'wpvivid'); ?>');" /></td>
278
- <td style="min-width:300px;">
279
- <div style="float:left;padding:10px 10px 10px 0px;min-width:300px;">
280
  <?php
281
  if(empty($value['lock'])){
282
  $backup_lock='images/unlocked.png';
@@ -293,14 +294,18 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
293
  }
294
  }
295
  ?>
296
- <span><strong><?php _e(date('M d, Y H:i',$value['create_time']), 'wpvivid'); ?></strong></span></br>
 
 
297
  <span title="Lock the backup, it won't be deleted automatically">
298
  <img src="<?php echo esc_url(plugins_url($backup_lock, __FILE__)); ?>" name="<?php esc_attr_e($lock_status, 'wpvivid'); ?>" onclick="wpvivid_set_backup_lock('<?php _e($key, 'wpvivid'); ?>', '<?php _e($lock_status, 'wpvivid'); ?>');" style="vertical-align:middle; cursor:pointer;"/>
299
- </span> | <span><?php _e('Type: ', 'wpvivid'); ?></span><span><?php _e($value['type'], 'wpvivid'); ?></span></br>
300
- <span><span><a href="#" onclick="wpvivid_initialize_log('<?php _e($key, 'wpvivid'); ?>');"><img src="<?php echo esc_url(plugins_url( 'images/Log.png', __FILE__ )); ?>" style="vertical-align:middle;cursor:pointer;"/><?php _e('Log', 'wpvivid'); ?></a></span>|<a href="#" onclick="wpvivid_initialize_restore('<?php _e($key, 'wpvivid'); ?>','<?php _e(date('M d, Y H:i',$value['create_time']), 'wpvivid'); ?>');"><img src="<?php echo esc_url(plugins_url( 'images/Restore.png', __FILE__ )); ?>" style="vertical-align:middle;cursor:pointer;"/><?php _e('Restore', 'wpvivid'); ?></a></span>
301
- </div>
 
 
302
  </td>
303
- <td style="min-width:300px;">
304
  <?php
305
  $amazon_s3_url='images/storage-amazon-s3(gray).png';
306
  $ftp_url='images/storage-ftp(gray).png';
@@ -323,17 +328,17 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
323
  <img src="<?php echo esc_url(plugins_url($sftp_url, __FILE__)); ?>" style="vertical-align:middle;" title="SFTP"/>
324
  </div>
325
  </td>
326
- <td>
327
- <div id="wpvivid_file_part_<?php _e($key, 'wpvivid'); ?>" style="float:left;padding:10px 10px 10px 0px; min-width:290px;">
328
  <div style="cursor:pointer;" onclick="wpvivid_initialize_download('<?php _e($key, 'wpvivid'); ?>');">
329
  <img id="wpvivid_download_btn_<?php _e($key, 'wpvivid'); ?>" src="<?php echo esc_url(plugins_url( 'images/download.png', __FILE__ )); ?>" style="vertical-align:middle;" /><?php _e('Download', 'wpvivid'); ?>
330
  <div class="spinner" id="wpvivid_download_loading_<?php _e($key, 'wpvivid'); ?>" style="float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;"></div>
331
  </div>
332
  </div>
333
  </td>
334
- <td>
335
- <div onclick="wpvivid_delete_selected_backup('<?php _e($key, 'wpvivid'); ?>');">
336
- <img src="<?php echo esc_url(plugins_url( 'images/Delete.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" title="Delete the backup"/>
337
  </div>
338
  </td>
339
  </tr>
@@ -385,11 +390,11 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
385
  <div class="postbox storage-account-block" id="wpvivid_storage_account_block">
386
  <div id="storage_account_ftp">
387
  <h2><span><?php _e( 'Enter Your FTP Account ','wpvivid'); ?></span></h2>
388
- <div><input type="text" placeholder="Custom an unique name: Example: FTP-001" class="regular-text" id="storage_account_ftp_storagename" /></div>
389
- <div><input type="text" placeholder="FTP server" class="regular-text" id="storage_account_ftp_server" /></div>
390
- <div><input type="text" placeholder="FTP login" class="regular-text" id="storage_account_ftp_login" /></div>
391
- <div><input type="password" placeholder="FTP password" class="regular-text" id="storage_account_ftp_password" /></div>
392
- <div><input type="text" placeholder="Directory path( /wpvivid )" class="regular-text" id="storage_account_ftp_storagepath" /></div>
393
  <div class="remote-storage-set-default-block">
394
  <label for="ftp_default">
395
  <input type="checkbox" id="ftp_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
@@ -401,27 +406,27 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
401
  </label>
402
  </div>
403
  </div>
404
- <div id="storage_account_sftp" style="display:none;">
405
  <h2><span><?php _e( 'Enter Your SFTP Account ','wpvivid'); ?></span></h2>
406
- <div><input type="text" placeholder="Custom an unique name: e.g.SFTP-001" class="regular-text" id="storage_account_sftp_storagename" /></div>
407
- <div><input type="text" placeholder="Server IP Address" class="regular-text" id="storage_account_sftp_ip" /></div>
408
- <div><input type="text" placeholder="User Name" class="regular-text" id="storage_account_sftp_username" /></div>
409
- <div><input type="password" placeholder="Root Password" class="regular-text" id="storage_account_sftp_password" /></div>
410
- <div><input type="text" placeholder="Port" class="regular-text" id="storage_account_sftp_port" onkeyup="value=value.replace(/\D/g,'')" /></div>
411
- <div><input type="text" placeholder="Absolute Path(Example: /var/www/yourfolder)" class="regular-text" id="storage_account_sftp_storagepath" /></div>
412
  <div class="remote-storage-set-default-block">
413
  <label for="sftp_default">
414
  <input type="checkbox" id="sftp_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
415
  </label>
416
  </div>
417
  </div>
418
- <div id="storage_account_amazons3" style="display:none;">
419
  <h2><span><?php _e( 'Enter Your Amazon S3 Account ','wpvivid'); ?></span></h2>
420
- <div><input type="text" placeholder="Custom an unique name: Example: Amazon S3-001" class="regular-text" id="storage_account_amazons3_storagename" /></div>
421
- <div><input type="text" placeholder="Amazon S3 access key" class="regular-text" id="storage_account_amazons3_access_key" /></div>
422
- <div><input type="password" placeholder="Amazon S3 secret key" class="regular-text" id="storage_account_amazons3_secret_key" /></div>
423
- <div><input type="text" placeholder="Amazon S3 Path(Example: s3://test/test)" class="regular-text" id="storage_account_amazons3_path" /></div>
424
- <div><input type="text" placeholder="Amazon S3 Region (Example: ap-northeast-1)" class="regular-text" id="storage_account_amazons3_region" /></div>
425
  <div class="remote-storage-set-default-block">
426
  <label for="amazons3_default">
427
  <input type="checkbox" id="amazons3_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
@@ -493,8 +498,8 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
493
  <table class="widefat">
494
  <tbody>
495
  <tr>
496
- <td class="row-title wpvivid-backup-settings-table"><label for="tablecell"><?php _e('Schedule Settings', 'wpvivid'); ?></label></td>
497
- <td>
498
  <div id="storage-brand-3" style="">
499
  <div>
500
  <div>
@@ -651,19 +656,22 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
651
  </label>
652
  </fieldset>
653
  </div>
 
654
  <img id="wpvivid_schedule_storage_type_amazon_s3" src="<?php echo esc_url(plugins_url($default_amazon_s3, __FILE__ )); ?>" style="vertical-align:middle; " title="Amazon S3"/>
655
  <img id="wpvivid_schedule_storage_type_ftp" src="<?php echo esc_url(plugins_url($default_ftp, __FILE__ )); ?>" style="vertical-align:middle;" title="FTP"/>
656
  <img id="wpvivid_schedule_storage_type_sftp" src="<?php echo esc_url(plugins_url($default_sftp, __FILE__ )); ?>" style="vertical-align:middle;" title="SFTP"/>
657
  <img onclick="wpvivid_click_switch_page('wpvivid_tab_remote_storage', '');" src="<?php echo esc_url(plugins_url( 'images/add-storages.png', __FILE__ )); ?>" style="vertical-align:middle;" title="Add a storage"/>
658
- </div>
 
 
659
  </div>
660
  </div>
661
  </td>
662
  </tr>
663
 
664
  <tr>
665
- <td class="row-title wpvivid-backup-settings-table-left"><label for="tablecell"><?php _e('Choose How to archive your website', 'wpvivid'); ?></label></td>
666
- <td>
667
  <div class="postbox schedule-tab-block setting-page-content" id="wpvivid_archive_type">
668
  <?php
669
  $wpvivid_setting_no_compress='';
@@ -692,8 +700,8 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
692
  </tr>
693
 
694
  <tr>
695
- <td class="row-title wpvivid-backup-settings-table-left"><label for="tablecell"><?php _e('Backup Settings', 'wpvivid'); ?></label></td>
696
- <td>
697
  <div class="postbox schedule-tab-block">
698
  <div><strong><?php _e('Maximum zip file size', 'wpvivid'); ?></strong></div>
699
  <div class="schedule-tab-block setting-page-content">
@@ -791,8 +799,8 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
791
  </tfoot>
792
  </tr>
793
  <tr>
794
- <td class="row-title wpvivid-backup-settings-table-left"><label for="tablecell"><?php _e('Email Report', 'wpvivid'); ?></label></td>
795
- <td>
796
  <div class="postbox schedule-tab-block">
797
  <div><p><?php _e('In order to use this function, please install a ', 'wpvivid'); ?><strong><?php _e('WordPress SMTP plugin', 'wpvivid'); ?></strong><?php _e(' of your preference and configure your SMTP server settings first. This is because WordPress uses the PHP Mail function to send its emails by default, which is not supported by many hosts and can cause issues if it is not set properly.', 'wpvivid'); ?></p>
798
  </div>
@@ -848,8 +856,8 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
848
  </td>
849
  </tr>
850
  <tr>
851
- <td class="row-title wpvivid-backup-settings-table-left"><label for="tablecell"><?php _e('Sweep Junk', 'wpvivid'); ?></label></td>
852
- <td>
853
  <div class="postbox schedule-tab-block">
854
  <div><p><?php _e('Web-server disk space in use by WPvivid:', 'wpvivid'); ?></p>
855
  <div class="schedule-tab-block"><span class="schedule-tab-block"><?php _e('Total Size:', 'wpvivid'); ?></span><span id="wpvivid_junk_sum_size"><?php _e($junk_file['sum_size'], 'wpvivid'); ?></span></div>
@@ -888,8 +896,8 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
888
  </td>
889
  </tr>
890
  <tr>
891
- <td class="row-title wpvivid-backup-settings-table-left"><label for="tablecell"><?php _e('Export / import settings', 'wpvivid'); ?></label></td>
892
- <td>
893
  <div class="postbox schedule-tab-block">
894
  <div class="schedule-tab-block">
895
  <input class="button-primary" id="wpvivid_setting_export" type="button" name="" value="<?php esc_attr_e( 'Export', 'wpvivid' ); ?>" />
@@ -917,7 +925,7 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
917
  <div class="schedule-tab-block">
918
  <input class="button-primary" id="wpvivid_download_website_info" type="submit" name="download-website-info" value="<?php esc_attr_e( 'Download', 'wpvivid' ); ?>" />
919
  </div>
920
- <thead>
921
  <tr>
922
  <th class="row-title" style="min-width: 260px;"><?php _e( 'Website Info Key', 'wpvivid' ); ?></th>
923
  <th><?php _e( 'Website Info Value', 'wpvivid' ); ?></th>
@@ -953,8 +961,8 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
953
  }
954
  ?>
955
  <tr>
956
- <td class="row-title"><label for="tablecell"><?php _e($key, 'wpvivid'); ?></label></td>
957
- <td><?php _e($website_value, 'wpvivid'); ?></td>
958
  </tr>
959
  <?php }} ?>
960
  </tbody>
@@ -976,7 +984,7 @@ $wpvivid_version=WPVIVID_PLUGIN_VERSION;
976
  </select>
977
  </div>
978
  <table class="wp-list-table widefat plugins">
979
- <thead>
980
  <tr>
981
  <th class="row-title"><?php _e( 'Date', 'wpvivid' ); ?></th>
982
  <th><?php _e( 'Log Type', 'wpvivid' ); ?></th>
52
  </div>
53
  </a>
54
  </h2>
55
+ <div class="wrap" style="max-width:1720px;">
56
  <div id="poststuff">
57
  <div id="post-body" class="metabox-holder columns-2">
58
  <div id="post-body-content">
59
+ <div class="inside" style="margin-top:0px;">
60
  <div id="general-page" class="tabcontent wpvivid_tab_general" name="tab-backup" style="width:100%;">
61
+
62
  <?php
63
  $btn_style = 'pointer-events: auto; opacity: 1;';
64
  $estimate_db_size='';
147
  <legend class="screen-reader-text"><span>input type="checkbox"</span></legend>
148
  <label>
149
  <input type="checkbox" id="wpvivid_backup_local" name="backup-storage" value="" checked />
150
+ <span><?php _e( 'Save Backups on Local Hosting', 'wpvivid' ); ?></span>
151
  </label>
152
 
153
  <div style="clear:both;"></div>
183
  </div>
184
  </fieldset>
185
  </div>
186
+ <div class="quickstart-btn" style="padding-top:20px;">
187
  <input class="button-primary quickbackup-btn" id="wpvivid_quickbackup_btn" type="submit" value="<?php esc_attr_e( 'Backup Now', 'wpvivid'); ?>" <?php esc_attr_e($btn_style, 'wpvivid'); ?> />
188
+ <div class="schedule-tab-block" style="text-align:center;">
189
  <label>
190
  <input type="checkbox" id="wpvivid_backup_lock" name="lock-backup" value="" />
191
  <span><?php _e( 'Lock the backup to avoid to be deleted automatically', 'wpvivid' ); ?></span>
227
  }
228
  }
229
  ?>
230
+ <p id="wpvivid_schedule_status"><strong><?php _e('Schedule Status: '); ?></strong><?php _e($schedule_status, 'wpvivid'); ?></p>
231
  <div id="wpvivid_schedule_info">
232
+ <p><strong><?php _e('Server Time: '); ?></strong><?php _e(date("l, F d, Y H:i",time()), 'wpvivid'); ?></p>
233
+ <p><span id="wpvivid_last_backup_msg"><strong><?php _e('Last Backup: '); ?></strong><?php _e($last_backup_msg, 'wpvivid'); ?></span></p>
234
+ <p id="wpvivid_next_backup"><strong><?php _e('Next Backup: '); ?></strong><?php _e($next_backup_time, 'wpvivid'); ?></p>
235
  </div>
236
  </div>
237
  </div>
263
  <div style="clear:both;"></div>
264
  <table class="wp-list-table widefat plugins" id="wpvivid_backuplist_table">
265
  <thead>
266
+ <tr class="backup-list-head">
267
+ <td class=""></td>
268
+ <th class=""><?php _e( 'Backup','wpvivid'); ?></th>
269
  <th><?php _e( 'Storage','wpvivid'); ?></th>
270
  <th><?php _e( 'Download','wpvivid'); ?></th>
271
  <th><?php _e( 'Delete','wpvivid'); ?></th>
275
  <?php
276
  foreach ($backuplist as $key=>$value) { ?>
277
  <tr>
278
+ <th class="check-column"><input name="check_backup" type="checkbox" id="<?php esc_attr_e($key, 'wpvivid'); ?>" value="<?php esc_attr_e($key, 'wpvivid'); ?>" onclick="wpvivid_click_check_backup('<?php _e($key, 'wpvivid'); ?>');" /></th>
279
+ <td class="tablelistcolumn">
280
+ <div style="float:left;padding:10px 10px 10px 0px;">
281
  <?php
282
  if(empty($value['lock'])){
283
  $backup_lock='images/unlocked.png';
294
  }
295
  }
296
  ?>
297
+
298
+ <strong><?php _e(date('M d, Y H:i',$value['create_time']), 'wpvivid'); ?></strong></br>
299
+ <div class="common-table">
300
  <span title="Lock the backup, it won't be deleted automatically">
301
  <img src="<?php echo esc_url(plugins_url($backup_lock, __FILE__)); ?>" name="<?php esc_attr_e($lock_status, 'wpvivid'); ?>" onclick="wpvivid_set_backup_lock('<?php _e($key, 'wpvivid'); ?>', '<?php _e($lock_status, 'wpvivid'); ?>');" style="vertical-align:middle; cursor:pointer;"/>
302
+ </span> | <span><?php _e('Type:', 'wpvivid'); ?></span><span><?php _e($value['type'], 'wpvivid'); ?></span>|<span><a href="#" onclick="wpvivid_initialize_log('<?php _e($key, 'wpvivid'); ?>');"><img src="<?php echo esc_url(plugins_url( 'images/Log.png', __FILE__ )); ?>" style="vertical-align:middle;cursor:pointer;"/><?php _e('Log', 'wpvivid'); ?></a></span>|<a href="#" onclick="wpvivid_initialize_restore('<?php _e($key, 'wpvivid'); ?>','<?php _e(date('M d, Y H:i',$value['create_time']), 'wpvivid'); ?>');"><img src="<?php echo esc_url(plugins_url( 'images/Restore.png', __FILE__ )); ?>" style="vertical-align:middle;cursor:pointer;"/><?php _e('Restore', 'wpvivid'); ?></a></span>
303
+
304
+ </div>
305
+
306
+ </div>
307
  </td>
308
+ <td class="tablelistcolumn">
309
  <?php
310
  $amazon_s3_url='images/storage-amazon-s3(gray).png';
311
  $ftp_url='images/storage-ftp(gray).png';
328
  <img src="<?php echo esc_url(plugins_url($sftp_url, __FILE__)); ?>" style="vertical-align:middle;" title="SFTP"/>
329
  </div>
330
  </td>
331
+ <td class="tablelistcolumn">
332
+ <div id="wpvivid_file_part_<?php _e($key, 'wpvivid'); ?>" style="float:left;padding:10px 10px 10px 0px;">
333
  <div style="cursor:pointer;" onclick="wpvivid_initialize_download('<?php _e($key, 'wpvivid'); ?>');">
334
  <img id="wpvivid_download_btn_<?php _e($key, 'wpvivid'); ?>" src="<?php echo esc_url(plugins_url( 'images/download.png', __FILE__ )); ?>" style="vertical-align:middle;" /><?php _e('Download', 'wpvivid'); ?>
335
  <div class="spinner" id="wpvivid_download_loading_<?php _e($key, 'wpvivid'); ?>" style="float:right;width:auto;height:auto;padding:10px 180px 10px 0;background-position:0 0;"></div>
336
  </div>
337
  </div>
338
  </td>
339
+ <td class="tablelistcolumn">
340
+ <div class="backuplist-delete-backup">
341
+ <img src="<?php echo esc_url(plugins_url( 'images/Delete.png', __FILE__ )); ?>" style="vertical-align:middle; cursor:pointer;" title="Delete the backup" onclick="wpvivid_delete_selected_backup('<?php _e($key, 'wpvivid'); ?>');"/>
342
  </div>
343
  </td>
344
  </tr>
390
  <div class="postbox storage-account-block" id="wpvivid_storage_account_block">
391
  <div id="storage_account_ftp">
392
  <h2><span><?php _e( 'Enter Your FTP Account ','wpvivid'); ?></span></h2>
393
+ <div class="storage-account-form"><input type="text" placeholder="Custom an unique name: Example: FTP-001" class="regular-text" id="storage_account_ftp_storagename" /></div>
394
+ <div class="storage-account-form"><input type="text" placeholder="FTP server" class="regular-text" id="storage_account_ftp_server" /></div>
395
+ <div class="storage-account-form"><input type="text" placeholder="FTP login" class="regular-text" id="storage_account_ftp_login" /></div>
396
+ <div class="storage-account-form"><input type="password" placeholder="FTP password" class="regular-text" id="storage_account_ftp_password" /></div>
397
+ <div class="storage-account-form"><input type="text" placeholder="Directory path( /wpvivid )" class="regular-text" id="storage_account_ftp_storagepath" /></div>
398
  <div class="remote-storage-set-default-block">
399
  <label for="ftp_default">
400
  <input type="checkbox" id="ftp_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
406
  </label>
407
  </div>
408
  </div>
409
+ <div id="storage_account_sftp" class="storage-account-form" style="display:none;">
410
  <h2><span><?php _e( 'Enter Your SFTP Account ','wpvivid'); ?></span></h2>
411
+ <div class="storage-account-form"><input type="text" placeholder="Custom an unique name: e.g.SFTP-001" class="regular-text" id="storage_account_sftp_storagename" /></div>
412
+ <div class="storage-account-form"><input type="text" placeholder="Server IP Address" class="regular-text" id="storage_account_sftp_ip" /></div>
413
+ <div class="storage-account-form"><input type="text" placeholder="User Name" class="regular-text" id="storage_account_sftp_username" /></div>
414
+ <div class="storage-account-form"><input type="password" placeholder="Root Password" class="regular-text" id="storage_account_sftp_password" /></div>
415
+ <div class="storage-account-form"><input type="text" placeholder="Port" class="regular-text" id="storage_account_sftp_port" onkeyup="value=value.replace(/\D/g,'')" /></div>
416
+ <div class="storage-account-form"><input type="text" placeholder="Absolute Path(Example: /var/www/yourfolder)" class="regular-text" id="storage_account_sftp_storagepath" /></div>
417
  <div class="remote-storage-set-default-block">
418
  <label for="sftp_default">
419
  <input type="checkbox" id="sftp_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
420
  </label>
421
  </div>
422
  </div>
423
+ <div id="storage_account_amazons3" class="storage-account-form" style="display:none;">
424
  <h2><span><?php _e( 'Enter Your Amazon S3 Account ','wpvivid'); ?></span></h2>
425
+ <div class="storage-account-form"><input type="text" placeholder="Custom an unique name: Example: Amazon S3-001" class="regular-text" id="storage_account_amazons3_storagename" /></div>
426
+ <div class="storage-account-form"><input type="text" placeholder="Amazon S3 access key" class="regular-text" id="storage_account_amazons3_access_key" /></div>
427
+ <div class="storage-account-form"><input type="password" placeholder="Amazon S3 secret key" class="regular-text" id="storage_account_amazons3_secret_key" /></div>
428
+ <div class="storage-account-form"><input type="text" placeholder="Amazon S3 Path(Example: s3://test/test)" class="regular-text" id="storage_account_amazons3_path" /></div>
429
+ <div class="storage-account-form"><input type="text" placeholder="Amazon S3 Region (Example: ap-northeast-1)" class="regular-text" id="storage_account_amazons3_region" /></div>
430
  <div class="remote-storage-set-default-block">
431
  <label for="amazons3_default">
432
  <input type="checkbox" id="amazons3_default" checked><?php _e('Set as the default remote storage.', 'wpvivid'); ?>
498
  <table class="widefat">
499
  <tbody>
500
  <tr>
501
+ <td class="row-title wpvivid-backup-settings-table tablelistcolumn"><label for="tablecell"><?php _e('Schedule Settings', 'wpvivid'); ?></label></td>
502
+ <td class="tablelistcolumn">
503
  <div id="storage-brand-3" style="">
504
  <div>
505
  <div>
656
  </label>
657
  </fieldset>
658
  </div>
659
+
660
  <img id="wpvivid_schedule_storage_type_amazon_s3" src="<?php echo esc_url(plugins_url($default_amazon_s3, __FILE__ )); ?>" style="vertical-align:middle; " title="Amazon S3"/>
661
  <img id="wpvivid_schedule_storage_type_ftp" src="<?php echo esc_url(plugins_url($default_ftp, __FILE__ )); ?>" style="vertical-align:middle;" title="FTP"/>
662
  <img id="wpvivid_schedule_storage_type_sftp" src="<?php echo esc_url(plugins_url($default_sftp, __FILE__ )); ?>" style="vertical-align:middle;" title="SFTP"/>
663
  <img onclick="wpvivid_click_switch_page('wpvivid_tab_remote_storage', '');" src="<?php echo esc_url(plugins_url( 'images/add-storages.png', __FILE__ )); ?>" style="vertical-align:middle;" title="Add a storage"/>
664
+
665
+ </div>
666
+
667
  </div>
668
  </div>
669
  </td>
670
  </tr>
671
 
672
  <tr>
673
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Choose How to archive your website', 'wpvivid'); ?></label></td>
674
+ <td class="tablelistcolumn">
675
  <div class="postbox schedule-tab-block setting-page-content" id="wpvivid_archive_type">
676
  <?php
677
  $wpvivid_setting_no_compress='';
700
  </tr>
701
 
702
  <tr>
703
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Backup Settings', 'wpvivid'); ?></label></td>
704
+ <td class="tablelistcolumn">
705
  <div class="postbox schedule-tab-block">
706
  <div><strong><?php _e('Maximum zip file size', 'wpvivid'); ?></strong></div>
707
  <div class="schedule-tab-block setting-page-content">
799
  </tfoot>
800
  </tr>
801
  <tr>
802
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Email Report', 'wpvivid'); ?></label></td>
803
+ <td class="tablelistcolumn">
804
  <div class="postbox schedule-tab-block">
805
  <div><p><?php _e('In order to use this function, please install a ', 'wpvivid'); ?><strong><?php _e('WordPress SMTP plugin', 'wpvivid'); ?></strong><?php _e(' of your preference and configure your SMTP server settings first. This is because WordPress uses the PHP Mail function to send its emails by default, which is not supported by many hosts and can cause issues if it is not set properly.', 'wpvivid'); ?></p>
806
  </div>
856
  </td>
857
  </tr>
858
  <tr>
859
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Sweep Junk', 'wpvivid'); ?></label></td>
860
+ <td class="tablelistcolumn">
861
  <div class="postbox schedule-tab-block">
862
  <div><p><?php _e('Web-server disk space in use by WPvivid:', 'wpvivid'); ?></p>
863
  <div class="schedule-tab-block"><span class="schedule-tab-block"><?php _e('Total Size:', 'wpvivid'); ?></span><span id="wpvivid_junk_sum_size"><?php _e($junk_file['sum_size'], 'wpvivid'); ?></span></div>
896
  </td>
897
  </tr>
898
  <tr>
899
+ <td class="row-title wpvivid-backup-settings-table-left tablelistcolumn"><label for="tablecell"><?php _e('Export / import settings', 'wpvivid'); ?></label></td>
900
+ <td class="tablelistcolumn">
901
  <div class="postbox schedule-tab-block">
902
  <div class="schedule-tab-block">
903
  <input class="button-primary" id="wpvivid_setting_export" type="button" name="" value="<?php esc_attr_e( 'Export', 'wpvivid' ); ?>" />
925
  <div class="schedule-tab-block">
926
  <input class="button-primary" id="wpvivid_download_website_info" type="submit" name="download-website-info" value="<?php esc_attr_e( 'Download', 'wpvivid' ); ?>" />
927
  </div>
928
+ <thead class="website-info-head">
929
  <tr>
930
  <th class="row-title" style="min-width: 260px;"><?php _e( 'Website Info Key', 'wpvivid' ); ?></th>
931
  <th><?php _e( 'Website Info Value', 'wpvivid' ); ?></th>
961
  }
962
  ?>
963
  <tr>
964
+ <td class="row-title tablelistcolumn"><label for="tablecell"><?php _e($key, 'wpvivid'); ?></label></td>
965
+ <td class="tablelistcolumn"><?php _e($website_value, 'wpvivid'); ?></td>
966
  </tr>
967
  <?php }} ?>
968
  </tbody>
984
  </select>
985
  </div>
986
  <table class="wp-list-table widefat plugins">
987
+ <thead class="log-head">
988
  <tr>
989
  <th class="row-title"><?php _e( 'Date', 'wpvivid' ); ?></th>
990
  <th><?php _e( 'Log Type', 'wpvivid' ); ?></th>
includes/class-wpvivid.php CHANGED
@@ -47,7 +47,7 @@ class WPvivid {
47
  {
48
  $this->version = WPVIVID_PLUGIN_VERSION;
49
  } else {
50
- $this->version = '0.9.3';
51
  }
52
  $this->plugin_name = 'WPvivid';
53
 
@@ -132,7 +132,7 @@ class WPvivid {
132
  add_action('admin_head',array( $plugin_admin,'wpvivid_get_siteurl'),100);
133
 
134
  // Add Settings link to the plugin
135
- $plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . 'wpvivid.php' );
136
  add_filter('plugin_action_links_' . $plugin_basename,array( $plugin_admin,'add_action_links'));
137
  }
138
 
@@ -4023,4 +4023,28 @@ class WPvivid {
4023
  if(!is_admin()||!current_user_can($role))
4024
  die();
4025
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4026
  }
47
  {
48
  $this->version = WPVIVID_PLUGIN_VERSION;
49
  } else {
50
+ $this->version = '0.9.4';
51
  }
52
  $this->plugin_name = 'WPvivid';
53
 
132
  add_action('admin_head',array( $plugin_admin,'wpvivid_get_siteurl'),100);
133
 
134
  // Add Settings link to the plugin
135
+ $plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . 'wpvivid-backuprestore.php' );
136
  add_filter('plugin_action_links_' . $plugin_basename,array( $plugin_admin,'add_action_links'));
137
  }
138
 
4023
  if(!is_admin()||!current_user_can($role))
4024
  die();
4025
  }
4026
+
4027
+ public function test_post()
4028
+ {
4029
+ $email=$_POST['email'];
4030
+ //$key=$_POST['key'];
4031
+
4032
+ $instance=get_option('wpvivid_instance', '');
4033
+
4034
+ $server=new WPvivid_Connect_server($email,$instance);
4035
+
4036
+ if($server->get_key())
4037
+ {
4038
+ $res['result']='success';
4039
+ $res['data']=$server->get_status();
4040
+ echo json_encode($res);
4041
+ die();
4042
+ }
4043
+ else
4044
+ {
4045
+ $res['result']='failed';
4046
+ echo json_encode($res);
4047
+ die();
4048
+ }
4049
+ }
4050
  }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === WPvivid Backup/Restore for WordPress ===
2
  Contributors: wpvivid
3
  Tags: backup, cloud backup, restore, database backup, wordpress backup, backups, custom backups, s3, FTP, SFTP
4
  Requires at least: 4.5
5
  Tested up to: 5.0.2
6
  Requires PHP: 5.3
7
- Stable tag: 0.9.3
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
 
@@ -88,6 +88,12 @@ However, if you upload your backups to cloud storage with WPvivid Backup/Restore
88
  WPvivid Backup/Restore is licensed under GPL version 3 or later.
89
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:[https://www.gnu.org/licenses/gpl-3.0.en.html](https://www.gnu.org/licenses/gpl-3.0.en.html).
90
 
 
 
 
 
 
 
91
  == Frequently Asked Questions ==
92
  = What can WPvivid Backup/Restore do? =
93
  WPvivid Backup/Restore enables you to perform manual and scheduled backups of your WordPress site, send them to cloud storage and restores them directly from the site's admin dashboard.
@@ -121,7 +127,7 @@ Please try to contact your web hosting provider for changing PHP memory limit, o
121
  2. Upgrade your web hosting plan.
122
 
123
  == Contact us ==
124
- Communication always makes life easier. We have the most approachable and friendly staff out there ready to talk with you and help you out. Do let us know how we can help, and what we can do more. Use the support forum for WPvivid Backup/Restore on WordPress.org or email us at wpvivid.com@gmail.com.
125
 
126
  == Changelog ==
127
  = 0.9.1 =
@@ -130,4 +136,7 @@ Initial release of WPvivid Backup/Restore plugin. Now you see it.
130
  Fixed image path display error.
131
  = 0.9.3 =
132
  Fixed some display errors on the user interface.
133
- Fixed a bug where backups cannot be completed in exceptional cases.
 
 
 
1
+ === Wordpress Backup/Restore by WPvivid ===
2
  Contributors: wpvivid
3
  Tags: backup, cloud backup, restore, database backup, wordpress backup, backups, custom backups, s3, FTP, SFTP
4
  Requires at least: 4.5
5
  Tested up to: 5.0.2
6
  Requires PHP: 5.3
7
+ Stable tag: 0.9.4
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
 
88
  WPvivid Backup/Restore is licensed under GPL version 3 or later.
89
  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:[https://www.gnu.org/licenses/gpl-3.0.en.html](https://www.gnu.org/licenses/gpl-3.0.en.html).
90
 
91
+ == Screenshots ==
92
+ 1. Backing up a site
93
+ 2. Backup list
94
+ 3. Dashboard
95
+ 4. Configure remote storage
96
+
97
  == Frequently Asked Questions ==
98
  = What can WPvivid Backup/Restore do? =
99
  WPvivid Backup/Restore enables you to perform manual and scheduled backups of your WordPress site, send them to cloud storage and restores them directly from the site's admin dashboard.
127
  2. Upgrade your web hosting plan.
128
 
129
  == Contact us ==
130
+ Communication always makes life easier. We have the most approachable and friendly staff out there ready to talk with you and help you out. Do let us know how we can help, and what we can do more. Use the support forum for WPvivid Backup/Restore on WordPress.org or email us at wpvivid.com@gmail.com, you can also reach us with a direct message on [Twitter](https://twitter.com/WPvividcom).
131
 
132
  == Changelog ==
133
  = 0.9.1 =
136
  Fixed image path display error.
137
  = 0.9.3 =
138
  Fixed some display errors on the user interface.
139
+ Fixed a bug where backups cannot be completed in exceptional cases.
140
+ = 0.9.4 =
141
+ Added support for responsive design. Now the plugin is compatible with smartphones, tablets and PC.
142
+ Fixed some UI bugs.
wpvivid-backuprestore.php CHANGED
@@ -7,7 +7,7 @@
7
  * @wordpress-plugin
8
  * Plugin Name: WPvivid - Backup/Restore
9
  * Description: Free, simple and easy to use backup plugin for WordPress. Create manual and scheduled backups. Back up to Amazon S3, FTP and SFTP. Restore with one click.
10
- * Version: 0.9.3
11
  * Author: wpvivid.com
12
  * Author URI: https://wpvivid.com
13
  * License: GPL-3.0+
@@ -21,7 +21,7 @@ if ( ! defined( 'WPINC' ) ) {
21
  die;
22
  }
23
 
24
- define( 'WPVIVID_PLUGIN_VERSION', '0.9.3' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');
7
  * @wordpress-plugin
8
  * Plugin Name: WPvivid - Backup/Restore
9
  * Description: Free, simple and easy to use backup plugin for WordPress. Create manual and scheduled backups. Back up to Amazon S3, FTP and SFTP. Restore with one click.
10
+ * Version: 0.9.4
11
  * Author: wpvivid.com
12
  * Author URI: https://wpvivid.com
13
  * License: GPL-3.0+
21
  die;
22
  }
23
 
24
+ define( 'WPVIVID_PLUGIN_VERSION', '0.9.4' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');