Version Description
= 3.0.3 = Please check changelog!
Download this release
Release Info
Developer | watchful |
Plugin | XCloner – Backup and Restore |
Version | 4.2.16 |
Comparing to | |
See all releases |
Code changes from version 4.2.154 to 4.2.16
- README.txt +1 -1
- admin/assets/btn_google_signin_dark_pressed_web.png +0 -0
- admin/class-xcloner-admin.php +48 -47
- admin/css/xcloner-admin.css +58 -2
- admin/images/xcloner-logo.svg +36 -0
- admin/partials/remote_storage/aws.php +144 -0
- admin/partials/remote_storage/azure.php +84 -0
- admin/partials/remote_storage/backblaze.php +89 -0
- admin/partials/remote_storage/dropbox.php +86 -0
- admin/partials/remote_storage/ftp.php +144 -0
- admin/partials/remote_storage/gdrive.php +171 -0
- admin/partials/remote_storage/index.html +0 -0
- admin/partials/remote_storage/local.php +59 -0
- admin/partials/remote_storage/onedrive.php +98 -0
- admin/partials/remote_storage/sftp.php +115 -0
- admin/partials/remote_storage/webdav.php +100 -0
- admin/partials/xcloner_console_page.php +20 -20
- admin/partials/xcloner_generate_backups_page.php +525 -478
- admin/partials/xcloner_header.php +47 -0
- admin/partials/xcloner_init_page.php +128 -115
- admin/partials/xcloner_manage_backups_page.php +216 -201
- admin/partials/xcloner_remote_storage_page.php +112 -1132
- admin/partials/xcloner_restore_page.php +152 -143
- admin/partials/xcloner_scheduled_backups_page.php +135 -126
- composer.lock +21 -19
- includes/class-xcloner.php +15 -9
- vendor/composer/installed.json +25 -23
- vendor/sabre/dav/CHANGELOG.md +6 -0
- vendor/sabre/dav/composer.json +1 -1
- vendor/sabre/dav/examples/groupwareserver.php +1 -1
- vendor/sabre/dav/lib/DAV/Locks/Plugin.php +1 -1
- vendor/sabre/dav/lib/DAV/Server.php +4 -2
- vendor/sabre/dav/lib/DAV/Tree.php +0 -2
- vendor/sabre/dav/lib/DAV/Version.php +1 -1
- vendor/sabre/event/composer.json +23 -4
- vendor/sabre/event/lib/Promise.php +3 -0
- vendor/sabre/event/lib/Version.php +1 -1
- vendor/sabre/event/lib/coroutine.php +4 -0
- vendor/sabre/http/lib/Client.php +5 -0
- vendor/sabre/vobject/.travis.yml +20 -9
- vendor/sabre/vobject/CHANGELOG.md +8 -0
- vendor/sabre/vobject/composer.json +17 -3
- vendor/sabre/vobject/lib/Component.php +1 -1
- vendor/sabre/vobject/lib/Version.php +1 -1
- vendor/sabre/vobject/tests/VObject/CliTest.php +9 -1
- vendor/sabre/vobject/tests/phpunit.xml +1 -4
- vendor/watchfulli/xcloner-core/lib/mock_wp_functions.php +7 -0
- vendor/watchfulli/xcloner-core/src/Xcloner_Api.php +1 -1
- vendor/watchfulli/xcloner-core/src/Xcloner_Archive.php +41 -40
- vendor/watchfulli/xcloner-core/src/Xcloner_Remote_Storage.php +112 -21
- xcloner.php +60 -7
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: backup, database backup, cloud backup, WordPress backup, WordPress migrati
|
|
5 |
Requires at least: 3.0.1
|
6 |
Requires PHP: 7.1
|
7 |
Tested up to: 5.5
|
8 |
-
Stable tag: 4.2.
|
9 |
|
10 |
XCloner is a backup plugin that allows you to safely back up and restore your WordPress sites. You can send site backups to SFTP, Dropbox, Amazon, Google Drive, Backblaze and other locations.
|
11 |
|
5 |
Requires at least: 3.0.1
|
6 |
Requires PHP: 7.1
|
7 |
Tested up to: 5.5
|
8 |
+
Stable tag: 4.2.16
|
9 |
|
10 |
XCloner is a backup plugin that allows you to safely back up and restore your WordPress sites. You can send site backups to SFTP, Dropbox, Amazon, Google Drive, Backblaze and other locations.
|
11 |
|
admin/assets/btn_google_signin_dark_pressed_web.png
ADDED
Binary file
|
admin/class-xcloner-admin.php
CHANGED
@@ -153,7 +153,6 @@ class Xcloner_Admin {
|
|
153 |
$xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
|
154 |
$remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
|
155 |
|
156 |
-
|
157 |
if (isset($_POST['action'])) {
|
158 |
$_POST['action'] = $xcloner_sanitization->sanitize_input_as_string($_POST['action']);
|
159 |
$remote_storage->save($_POST['action']);
|
@@ -245,53 +244,55 @@ class Xcloner_Admin {
|
|
245 |
}
|
246 |
|
247 |
?>
|
248 |
-
<h1><?= esc_html(get_admin_page_title()); ?></h1>
|
249 |
-
|
250 |
-
<ul class="nav-tab-wrapper row">
|
251 |
-
<li><a href="?page=xcloner_settings_page&tab=general_options"
|
252 |
-
class="nav-tab col s12 m3 l2 <?php echo $active_tab == 'general_options' ? 'nav-tab-active' : ''; ?>"><?php echo __('General Options', 'xcloner-backup-and-restore') ?></a>
|
253 |
-
</li>
|
254 |
-
<li><a href="?page=xcloner_settings_page&tab=mysql_options"
|
255 |
-
class="nav-tab col s12 m3 l2 <?php echo $active_tab == 'mysql_options' ? 'nav-tab-active' : ''; ?>"><?php echo __('Mysql Options', 'xcloner-backup-and-restore') ?></a>
|
256 |
-
</li>
|
257 |
-
<li><a href="?page=xcloner_settings_page&tab=system_options"
|
258 |
-
class="nav-tab col s12 m3 l2 <?php echo $active_tab == 'system_options' ? 'nav-tab-active' : ''; ?>"><?php echo __('System Options', 'xcloner-backup-and-restore') ?></a>
|
259 |
-
</li>
|
260 |
-
<!--<li><a href="?page=xcloner_settings_page&tab=cleanup_options"
|
261 |
-
class="nav-tab col s12 m3 l2 <?php echo $active_tab == 'cleanup_options' ? 'nav-tab-active' : ''; ?>"><?php echo __('Cleanup Options', 'xcloner-backup-and-restore') ?></a>
|
262 |
-
</li>-->
|
263 |
-
</ul>
|
264 |
-
|
265 |
-
<div class="wrap">
|
266 |
-
|
267 |
-
<form action="options.php" method="post">
|
268 |
-
<?php
|
269 |
-
|
270 |
-
if ($active_tab == 'general_options') {
|
271 |
-
|
272 |
-
settings_fields('xcloner_general_settings_group');
|
273 |
-
do_settings_sections('xcloner_settings_page');
|
274 |
-
|
275 |
-
} elseif ($active_tab == 'mysql_options') {
|
276 |
-
|
277 |
-
settings_fields('xcloner_mysql_settings_group');
|
278 |
-
do_settings_sections('xcloner_mysql_settings_page');
|
279 |
-
} elseif ($active_tab == 'system_options') {
|
280 |
-
|
281 |
-
settings_fields('xcloner_system_settings_group');
|
282 |
-
do_settings_sections('xcloner_system_settings_page');
|
283 |
-
} elseif ($active_tab == 'cleanup_options') {
|
284 |
-
|
285 |
-
settings_fields('xcloner_cleanup_settings_group');
|
286 |
-
do_settings_sections('xcloner_cleanup_settings_page');
|
287 |
-
}
|
288 |
-
|
289 |
-
// output save settings button
|
290 |
-
submit_button('Save Settings');
|
291 |
-
?>
|
292 |
-
</form>
|
293 |
|
294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
<?php
|
296 |
|
297 |
}
|
153 |
$xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
|
154 |
$remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
|
155 |
|
|
|
156 |
if (isset($_POST['action'])) {
|
157 |
$_POST['action'] = $xcloner_sanitization->sanitize_input_as_string($_POST['action']);
|
158 |
$remote_storage->save($_POST['action']);
|
244 |
}
|
245 |
|
246 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
+
<div class="row">
|
249 |
+
<div class="col s12 l9">
|
250 |
+
<?php include_once(__DIR__ . "/partials/xcloner_header.php")?>
|
251 |
+
</div>
|
252 |
+
|
253 |
+
<ul class="nav-tab-wrapper col s12 ">
|
254 |
+
<li><a href="?page=xcloner_settings_page&tab=general_options"
|
255 |
+
class="nav-tab col s12 m3 l3 <?php echo $active_tab == 'general_options' ? 'nav-tab-active' : ''; ?>"><?php echo __('General Options', 'xcloner-backup-and-restore') ?></a>
|
256 |
+
</li>
|
257 |
+
<li><a href="?page=xcloner_settings_page&tab=mysql_options"
|
258 |
+
class="nav-tab col s12 m3 l3 <?php echo $active_tab == 'mysql_options' ? 'nav-tab-active' : ''; ?>"><?php echo __('Mysql Options', 'xcloner-backup-and-restore') ?></a>
|
259 |
+
</li>
|
260 |
+
<li><a href="?page=xcloner_settings_page&tab=system_options"
|
261 |
+
class="nav-tab col s12 m3 l3 <?php echo $active_tab == 'system_options' ? 'nav-tab-active' : ''; ?>"><?php echo __('System Options', 'xcloner-backup-and-restore') ?></a>
|
262 |
+
</li>
|
263 |
+
</ul>
|
264 |
+
|
265 |
+
<div class="wrap col s12">
|
266 |
+
|
267 |
+
<form action="options.php" method="post">
|
268 |
+
<?php
|
269 |
+
|
270 |
+
if ($active_tab == 'general_options') {
|
271 |
+
|
272 |
+
settings_fields('xcloner_general_settings_group');
|
273 |
+
do_settings_sections('xcloner_settings_page');
|
274 |
+
|
275 |
+
} elseif ($active_tab == 'mysql_options') {
|
276 |
+
|
277 |
+
settings_fields('xcloner_mysql_settings_group');
|
278 |
+
do_settings_sections('xcloner_mysql_settings_page');
|
279 |
+
} elseif ($active_tab == 'system_options') {
|
280 |
+
|
281 |
+
settings_fields('xcloner_system_settings_group');
|
282 |
+
do_settings_sections('xcloner_system_settings_page');
|
283 |
+
} elseif ($active_tab == 'cleanup_options') {
|
284 |
+
|
285 |
+
settings_fields('xcloner_cleanup_settings_group');
|
286 |
+
do_settings_sections('xcloner_cleanup_settings_page');
|
287 |
+
}
|
288 |
+
|
289 |
+
// output save settings button
|
290 |
+
submit_button('Save Settings');
|
291 |
+
?>
|
292 |
+
</form>
|
293 |
+
|
294 |
+
</div>
|
295 |
+
</div>
|
296 |
<?php
|
297 |
|
298 |
}
|
admin/css/xcloner-admin.css
CHANGED
@@ -391,7 +391,7 @@ ul.files-list.error{
|
|
391 |
}
|
392 |
|
393 |
#manage_backups_wrapper #manage_backups_filter {
|
394 |
-
min-width:
|
395 |
}
|
396 |
|
397 |
#generate_backup_form .progress, .xcloner-restore .progress {
|
@@ -404,7 +404,8 @@ i.backup_warning {
|
|
404 |
}
|
405 |
|
406 |
.col.remote-storage-selection {
|
407 |
-
padding-top:
|
|
|
408 |
}
|
409 |
|
410 |
.remote-storage #authentification_code {
|
@@ -443,8 +444,63 @@ i.backup_warning {
|
|
443 |
max-width: initial;
|
444 |
}
|
445 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
@media only screen and (min-width: 993px) {
|
447 |
.dashboard .backup-ready {
|
448 |
float: right;
|
449 |
}
|
450 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
}
|
392 |
|
393 |
#manage_backups_wrapper #manage_backups_filter {
|
394 |
+
min-width: 277px;
|
395 |
}
|
396 |
|
397 |
#generate_backup_form .progress, .xcloner-restore .progress {
|
404 |
}
|
405 |
|
406 |
.col.remote-storage-selection {
|
407 |
+
padding-top: 0px;
|
408 |
+
margin-bottom: -54px;
|
409 |
}
|
410 |
|
411 |
.remote-storage #authentification_code {
|
444 |
max-width: initial;
|
445 |
}
|
446 |
|
447 |
+
.xcloner-menu.dropdown-trigger i.material-icons{
|
448 |
+
vertical-align: middle;
|
449 |
+
}
|
450 |
+
|
451 |
+
.xcloner-menu.dropdown-content {
|
452 |
+
min-width: 250px;
|
453 |
+
}
|
454 |
+
|
455 |
+
h1.xcloner-menu {
|
456 |
+
margin: 1.68rem 0 1.68rem 0;
|
457 |
+
}
|
458 |
+
|
459 |
+
.xcloner-logo {
|
460 |
+
max-height: 75px;
|
461 |
+
max-width: 225px;
|
462 |
+
float: right;
|
463 |
+
margin-top: 15px;
|
464 |
+
}
|
465 |
+
|
466 |
+
.row.remote-storage .collapsible.popout>li {
|
467 |
+
margin: 0px;
|
468 |
+
}
|
469 |
+
|
470 |
+
#generate_backup_form .nav-tab-wrapper-content {
|
471 |
+
margin-top: 15px;
|
472 |
+
}
|
473 |
+
|
474 |
+
.row .nav-tab-wrapper{
|
475 |
+
border-bottom: 0px;
|
476 |
+
}
|
477 |
+
|
478 |
+
.form-table tr{
|
479 |
+
border-bottom: 0px;
|
480 |
+
}
|
481 |
+
|
482 |
+
#gdrive input#authentification_code::placeholder {
|
483 |
+
color: red;
|
484 |
+
}
|
485 |
+
|
486 |
+
a:focus {
|
487 |
+
box-shadow: none;
|
488 |
+
}
|
489 |
+
|
490 |
@media only screen and (min-width: 993px) {
|
491 |
.dashboard .backup-ready {
|
492 |
float: right;
|
493 |
}
|
494 |
}
|
495 |
+
|
496 |
+
|
497 |
+
@media only screen and (max-width: 993px) {
|
498 |
+
.xcloner-logo {
|
499 |
+
display: none
|
500 |
+
}
|
501 |
+
|
502 |
+
.col.remote-storage-selection {
|
503 |
+
padding-top: 0px;
|
504 |
+
margin-bottom: 0px;
|
505 |
+
}
|
506 |
+
}
|
admin/images/xcloner-logo.svg
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 24.1.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 234.14 64" style="enable-background:new 0 0 234.14 64;" xml:space="preserve">
|
3 |
+
<style type="text/css">
|
4 |
+
.st0 {
|
5 |
+
fill: #648CC5;
|
6 |
+
}
|
7 |
+
|
8 |
+
.st1 {
|
9 |
+
fill: #4CB6AC;
|
10 |
+
}
|
11 |
+
|
12 |
+
</style>
|
13 |
+
<g>
|
14 |
+
<g>
|
15 |
+
<path class="st0" d="M34.39,27.19l-6.77-11.87c-0.48-0.82-1.26-1.32-2.1-1.34c-0.02,0-0.03,0-0.05,0c-0.77,0-1.46,0.4-1.92,1.11 c-0.52,0.81-0.49,1.65,0.09,2.66c1.27,2.2,3.23,5.65,5.13,8.98c1.07,1.88,2.1,3.69,2.94,5.16L34.39,27.19z"></path>
|
16 |
+
<path class="st0" d="M31.72,32.1c-0.84,1.47-1.88,3.29-2.95,5.17c-1.9,3.33-3.86,6.78-5.13,8.98c-0.58,1-0.61,1.85-0.09,2.66 c0.46,0.72,1.17,1.13,1.97,1.11c0.84-0.02,1.62-0.52,2.1-1.34c1.54-2.66,4.44-7.76,6.77-11.87c-0.97-1.71-1.85-3.25-2.48-4.36 L31.72,32.1z"></path>
|
17 |
+
</g>
|
18 |
+
<g>
|
19 |
+
<g>
|
20 |
+
<path class="st1" d="M87.71,14.8c1.43,0.29,2.71,0.78,3.84,1.46c1.13,0.68,2.05,1.56,2.75,2.65c0.7,1.09,1.05,2.42,1.05,4.01 c0,0.54-0.16,0.94-0.48,1.19s-0.66,0.37-1.02,0.37c-0.36,0-0.7-0.14-1.02-0.41c-0.32-0.27-0.48-0.66-0.48-1.16 c0-0.14-0.07-0.52-0.2-1.16c-0.14-0.63-0.49-1.29-1.05-1.97c-0.57-0.68-1.45-1.29-2.65-1.84c-1.2-0.54-2.89-0.82-5.06-0.82 c-3.4,0-5.87,0.71-7.41,2.14c-1.54,1.43-2.31,3.75-2.31,6.97v16.38c0,3.26,0.86,5.51,2.58,6.73c1.72,1.22,4.1,1.84,7.14,1.84 c3.13,0,5.51-0.67,7.14-2c1.63-1.34,2.45-3.55,2.45-6.63c0-0.5,0.15-0.87,0.44-1.12c0.29-0.25,0.62-0.37,0.99-0.37 c0.36,0,0.69,0.12,0.99,0.37c0.29,0.25,0.44,0.62,0.44,1.12c0,2.13-0.28,3.93-0.85,5.4c-0.57,1.47-1.39,2.65-2.48,3.53 c-1.09,0.88-2.4,1.52-3.94,1.9c-1.54,0.39-3.26,0.58-5.17,0.58c-4.17,0-7.3-0.85-9.38-2.55c-2.08-1.7-3.13-4.63-3.13-8.8V26.25 c0-2.27,0.28-4.16,0.85-5.68c0.57-1.52,1.38-2.74,2.45-3.67c1.07-0.93,2.37-1.59,3.91-1.97c1.54-0.39,3.31-0.58,5.3-0.58 C84.84,14.36,86.28,14.5,87.71,14.8z"></path>
|
21 |
+
<path class="st1" d="M103.14,14.83c0.29-0.23,0.61-0.34,0.95-0.34c0.34,0,0.66,0.11,0.95,0.34c0.29,0.23,0.44,0.57,0.44,1.02v35 h14.34c0.5,0,0.87,0.15,1.12,0.44c0.25,0.29,0.37,0.63,0.37,1.02c0,0.39-0.12,0.73-0.37,1.02c-0.25,0.29-0.62,0.44-1.12,0.44 h-15.7c-0.45,0-0.8-0.14-1.05-0.41c-0.25-0.27-0.37-0.59-0.37-0.95V15.85C102.7,15.4,102.84,15.06,103.14,14.83z"></path>
|
22 |
+
<path class="st1" d="M127.74,16.97c1.93-1.97,4.81-2.96,8.67-2.96h1.77c3.81,0,6.68,0.99,8.63,2.96 c1.95,1.97,2.92,4.88,2.92,8.73v16.86c0,3.53-1.05,6.34-3.16,8.43c-2.11,2.08-4.91,3.13-8.39,3.13h-1.77 c-1.77,0-3.36-0.27-4.79-0.82c-1.43-0.54-2.64-1.33-3.64-2.34c-1-1.02-1.77-2.24-2.31-3.67c-0.54-1.43-0.82-3-0.82-4.72V25.71 C124.85,21.85,125.82,18.94,127.74,16.97z M144.53,48.85c1.52-1.56,2.28-3.66,2.28-6.29V25.71c0-5.89-2.88-8.84-8.63-8.84h-1.77 c-2.85,0-5.04,0.75-6.56,2.24c-1.52,1.5-2.28,3.69-2.28,6.59v16.86c0,2.76,0.79,4.89,2.38,6.39c1.59,1.5,3.74,2.24,6.46,2.24 h1.77C140.9,51.2,143.01,50.41,144.53,48.85z"></path>
|
23 |
+
<path class="st1" d="M177.84,53.37c-0.25,0.23-0.53,0.35-0.85,0.37c-0.32,0.02-0.65-0.05-0.99-0.2c-0.34-0.16-0.6-0.42-0.78-0.78 l-15.57-30.72v30.38c0,0.45-0.15,0.79-0.44,1.02c-0.29,0.23-0.62,0.34-0.99,0.34c-0.36,0-0.69-0.11-0.99-0.34 c-0.29-0.23-0.44-0.57-0.44-1.02V15.85c0-0.36,0.11-0.66,0.34-0.88c0.23-0.23,0.49-0.36,0.78-0.41c0.29-0.05,0.58-0.02,0.85,0.07 c0.27,0.09,0.48,0.25,0.61,0.48l15.9,31.33V15.85c0-0.45,0.15-0.79,0.44-1.02c0.29-0.23,0.63-0.33,1.02-0.31 c0.39,0.02,0.73,0.15,1.02,0.37c0.29,0.23,0.44,0.54,0.44,0.95v36.57C178.21,52.83,178.09,53.14,177.84,53.37z"></path>
|
24 |
+
<path class="st1" d="M186.67,14.9c0.34-0.27,0.69-0.41,1.05-0.41h15.63c0.5,0,0.86,0.15,1.09,0.44c0.23,0.29,0.34,0.63,0.34,1.02 c0,0.39-0.12,0.73-0.37,1.02c-0.25,0.29-0.6,0.44-1.05,0.44h-14.27v14.82h11.49c0.5,0,0.87,0.16,1.12,0.48 c0.25,0.32,0.37,0.66,0.37,1.02c0,0.36-0.14,0.7-0.41,1.02s-0.63,0.48-1.09,0.48h-11.49v15.7h14.27c0.45,0,0.79,0.15,1.02,0.44 c0.23,0.29,0.34,0.62,0.34,0.99c0,0.36-0.11,0.69-0.34,0.99c-0.23,0.29-0.57,0.44-1.02,0.44h-15.63c-0.36,0-0.71-0.1-1.05-0.31 c-0.34-0.2-0.51-0.62-0.51-1.26V16.05C186.16,15.56,186.33,15.17,186.67,14.9z"></path>
|
25 |
+
<path class="st1" d="M213.66,53.44c-0.29,0.23-0.62,0.34-0.99,0.34s-0.69-0.11-0.99-0.34c-0.29-0.23-0.44-0.57-0.44-1.02v-36.5 c0-0.95,0.48-1.43,1.43-1.43h9.18c0.59,0,1.44,0.08,2.55,0.24s2.21,0.54,3.3,1.16c1.09,0.61,2.04,1.53,2.85,2.75 c0.82,1.22,1.22,2.88,1.22,4.96v8.5c0,5.08-2.22,8.18-6.66,9.31l5.1,10.2c0.23,0.5,0.26,0.93,0.1,1.29 c-0.16,0.36-0.41,0.61-0.75,0.75c-0.34,0.14-0.73,0.14-1.16,0c-0.43-0.14-0.78-0.5-1.05-1.09l-5.17-10.67h-8.09v10.54 C214.1,52.87,213.95,53.21,213.66,53.44z M228.71,21.83c-0.14-0.73-0.44-1.4-0.92-2.04c-0.48-0.63-1.19-1.19-2.14-1.67 c-0.95-0.48-2.22-0.71-3.81-0.71h-7.75v21.55h7.14c0.95,0,1.88-0.08,2.79-0.24c0.91-0.16,1.72-0.48,2.45-0.95 c0.72-0.48,1.31-1.17,1.77-2.07c0.45-0.91,0.68-2.11,0.68-3.6v-8.5C228.92,23.15,228.85,22.56,228.71,21.83z"></path>
|
26 |
+
</g>
|
27 |
+
<g>
|
28 |
+
<g>
|
29 |
+
<path class="st1" d="M34.67,36.74c-0.99-1.74-1.88-3.3-2.52-4.43l-0.18-0.31l2.74-4.8l-6.85-12c-0.52-0.91-1.39-1.46-2.33-1.48 c-0.88-0.02-1.69,0.43-2.2,1.23c-0.57,0.89-0.55,1.85,0.08,2.94c1.27,2.2,3.23,5.64,5.13,8.98c1.06,1.87,2.09,3.67,2.93,5.14 c-0.84,1.47-1.87,3.27-2.93,5.14c-1.9,3.33-3.86,6.78-5.13,8.98c-0.63,1.08-0.65,2.05-0.08,2.94c0.5,0.79,1.28,1.23,2.15,1.23 c0.02,0,0.04,0,0.06,0c0.93-0.02,1.8-0.57,2.33-1.48c1.55-2.67,4.46-7.79,6.81-11.94l0.04-0.07L34.67,36.74z M28.77,26.72 c-1.9-3.33-3.86-6.78-5.13-8.98c-0.58-1-0.61-1.85-0.09-2.66c0.45-0.71,1.15-1.11,1.92-1.11c0.02,0,0.03,0,0.05,0 c0.84,0.02,1.62,0.52,2.1,1.34l6.77,11.87l-2.68,4.69C30.87,30.41,29.84,28.6,28.77,26.72z M27.62,48.67 c-0.48,0.82-1.26,1.33-2.1,1.34c-0.8,0.02-1.51-0.39-1.97-1.11c-0.52-0.81-0.49-1.65,0.09-2.66c1.27-2.2,3.24-5.65,5.13-8.98 c1.07-1.88,2.1-3.69,2.95-5.17l0.19,0.33c0.64,1.12,1.51,2.65,2.48,4.36C32.06,40.91,29.16,46.01,27.62,48.67z"></path>
|
30 |
+
<path class="st1" d="M32.69,31.99c2.22,3.9,7.3,12.86,9.55,16.75c1.03,1.78,3.24,1.9,4.3,0.24c0.6-0.94,0.45-1.87-0.08-2.8 c-2.01-3.47-5.78-10.13-8.1-14.19c2.32-4.06,6.1-10.72,8.1-14.19c0.54-0.93,0.69-1.86,0.08-2.8c-1.06-1.65-3.27-1.54-4.3,0.24 L32.69,31.99z"></path>
|
31 |
+
</g>
|
32 |
+
<path class="st1" d="M34.99,3.07C19.07,3.07,6.12,15.99,6.06,31.9H2.08c-1.08,0-1.41,0.69-0.73,1.53l5.79,7.24 c0.67,0.84,1.77,0.84,2.45,0l5.79-7.24c0.67-0.84,0.34-1.53-0.73-1.53h-3.97c0.06-13.38,10.92-24.2,24.31-24.2 C48.42,7.69,59.3,18.57,59.3,32c0,13.43-10.88,24.31-24.31,24.31c0,0,0,0-0.01,0c0,0-2.66-0.01-2.66,2.3 c0,2.32,2.66,2.32,2.66,2.32c0,0,0,0,0.01,0c15.95,0,28.93-12.98,28.93-28.93S50.94,3.07,34.99,3.07z"></path>
|
33 |
+
</g>
|
34 |
+
</g>
|
35 |
+
</g>
|
36 |
+
</svg>
|
admin/partials/remote_storage/aws.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("Amazon S3 Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" name="xcloner_aws_enable" class="status" value="1" <?php if (get_option("xcloner_aws_enable")) {
|
13 |
+
echo "checked";
|
14 |
+
} ?> >
|
15 |
+
<span class="lever"></span>
|
16 |
+
On
|
17 |
+
</label>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
<div class="collapsible-body">
|
21 |
+
|
22 |
+
<div class="row">
|
23 |
+
<div class="col s12 m3 label">
|
24 |
+
|
25 |
+
</div>
|
26 |
+
<div class=" col s12 m6">
|
27 |
+
<p>
|
28 |
+
<?php echo sprintf(__('Visit %s and get your "Key" and "Secret <br />Visit %s to install your own S3 like service.'), "<a href='https://aws.amazon.com/s3/' target='_blank'>https://aws.amazon.com/s3/</a>", "<a href='https://minio.io/' target='_blank'>https://minio.io/</a>") ?>
|
29 |
+
</p>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
<div class="row">
|
34 |
+
<div class="col s12 m3 label">
|
35 |
+
<label for="aws_key"><?php echo __("S3 Key", 'xcloner-backup-and-restore') ?></label>
|
36 |
+
</div>
|
37 |
+
<div class=" col s12 m6">
|
38 |
+
<input placeholder="<?php echo __("S3 Key", 'xcloner-backup-and-restore') ?>" id="aws_key" type="text"
|
39 |
+
name="xcloner_aws_key" class="validate" value="<?php echo get_option("xcloner_aws_key") ?>"
|
40 |
+
autocomplete="off">
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
<div class="row">
|
45 |
+
<div class="col s12 m3 label">
|
46 |
+
<label for="aws_secret"><?php echo __("S3 Secret", 'xcloner-backup-and-restore') ?></label>
|
47 |
+
</div>
|
48 |
+
<div class=" col s12 m6">
|
49 |
+
<input placeholder="<?php echo __("S3 Secret", 'xcloner-backup-and-restore') ?>" id="aws_secret" type="text"
|
50 |
+
name="xcloner_aws_secret" class="validate"
|
51 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_aws_secret"))) ?>" autocomplete="off">
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
|
55 |
+
<div class="row">
|
56 |
+
<div class="col s12 m3 label">
|
57 |
+
<label for="aws_region"><?php echo __("S3 Region", 'xcloner-backup-and-restore') ?></label>
|
58 |
+
</div>
|
59 |
+
<div class=" col s12 m6">
|
60 |
+
<select placeholder="<?php echo __("example: us-east-1", 'xcloner-backup-and-restore') ?>" id="aws_region"
|
61 |
+
type="text" name="xcloner_aws_region" class="validate"
|
62 |
+
value="<?php echo get_option("xcloner_aws_region") ?>" autocomplete="off">
|
63 |
+
<option readonly value="">
|
64 |
+
<?php echo __("Please Select AWS S3 Region or Leave Unselected for Custom Endpoint") ?></option>
|
65 |
+
<?php
|
66 |
+
$aws_regions = $remote_storage->get_aws_regions();
|
67 |
+
|
68 |
+
foreach ($aws_regions as $key => $region) {
|
69 |
+
?>
|
70 |
+
<option value="<?php echo $key ?>"
|
71 |
+
<?php echo($key == get_option('xcloner_aws_region') ? "selected" : "") ?>><?php echo $region ?>
|
72 |
+
= <?php echo $key ?></option>
|
73 |
+
<?php
|
74 |
+
}
|
75 |
+
?>
|
76 |
+
</select>
|
77 |
+
</div>
|
78 |
+
</div>
|
79 |
+
|
80 |
+
<div id="custom_aws_endpoint">
|
81 |
+
<div class="row">
|
82 |
+
<div class="col s12 m3 label">
|
83 |
+
<label for="aws_endpoint"><?php echo __("S3 EndPoint", 'xcloner-backup-and-restore') ?></label>
|
84 |
+
</div>
|
85 |
+
<div class=" col s12 m6">
|
86 |
+
<input
|
87 |
+
placeholder="<?php echo __("S3 EndPoint, leave blank if you want to use the default Amazon AWS Service", 'xcloner-backup-and-restore') ?>"
|
88 |
+
id="aws_endpoint" type="text" name="xcloner_aws_endpoint" class="validate"
|
89 |
+
value="<?php echo get_option("xcloner_aws_endpoint") ?>" autocomplete="off">
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<div class="row">
|
93 |
+
<div class="col s12 m3 label">
|
94 |
+
<label for="aws_region"><?php echo __("S3 Custom Region", 'xcloner-backup-and-restore') ?></label>
|
95 |
+
</div>
|
96 |
+
<div class=" col s12 m6">
|
97 |
+
<input placeholder="<?php echo __("S3 Custom Region, ex: af-south-1", 'xcloner-backup-and-restore') ?>"
|
98 |
+
id="aws_region" type="text" name="xcloner_aws_region" class="validate"
|
99 |
+
value="<?php echo get_option("xcloner_aws_region") ?>" autocomplete="off">
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
|
104 |
+
<div class="row">
|
105 |
+
<div class="col s12 m3 label">
|
106 |
+
<label for="aws_bucket_name"><?php echo __("S3 Bucket Name", 'xcloner-backup-and-restore') ?></label>
|
107 |
+
</div>
|
108 |
+
<div class=" col s12 m6">
|
109 |
+
<input placeholder="<?php echo __("S3 Bucket Name", 'xcloner-backup-and-restore') ?>" id="aws_bucket_name"
|
110 |
+
type="text" name="xcloner_aws_bucket_name" class="validate"
|
111 |
+
value="<?php echo get_option("xcloner_aws_bucket_name") ?>" autocomplete="off">
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<div class="row">
|
116 |
+
<div class="col s12 m3 label">
|
117 |
+
<label for="aws_prefix"><?php echo __("S3 Prefix", 'xcloner-backup-and-restore') ?></label>
|
118 |
+
</div>
|
119 |
+
<div class=" col s12 m6">
|
120 |
+
<input
|
121 |
+
placeholder="<?php echo __("S3 Prefix, use / ending to define a folder", 'xcloner-backup-and-restore') ?>"
|
122 |
+
id="aws_prefix" type="text" name="xcloner_aws_prefix" class="validate"
|
123 |
+
value="<?php echo get_option("xcloner_aws_prefix") ?>" autocomplete="off">
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<?=common_cleanup_html('aws')?>
|
128 |
+
|
129 |
+
<div class="row">
|
130 |
+
<div class="col s6 m4">
|
131 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
132 |
+
value="aws"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
133 |
+
<i class="material-icons right">save</i>
|
134 |
+
</button>
|
135 |
+
</div>
|
136 |
+
<div class="col s6 m4">
|
137 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="aws"
|
138 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
139 |
+
<i class="material-icons right">import_export</i>
|
140 |
+
</button>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
|
144 |
+
</div>
|
admin/partials/remote_storage/azure.php
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("Azure Blob Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" name="xcloner_azure_enable" class="status" value="1" <?php if (get_option("xcloner_azure_enable")) {
|
13 |
+
echo "checked";
|
14 |
+
} ?> >
|
15 |
+
<span class="lever"></span>
|
16 |
+
On
|
17 |
+
</label>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
<div class="collapsible-body">
|
21 |
+
|
22 |
+
<div class="row">
|
23 |
+
<div class="col s12 m3 label">
|
24 |
+
|
25 |
+
</div>
|
26 |
+
<div class=" col s12 m6">
|
27 |
+
<p>
|
28 |
+
<?php echo sprintf(__('Visit %s and get your "Api Key".', 'xcloner-backup-and-restore'), '<a href="https://azure.microsoft.com/en-us/services/storage/blobs/" target="_blank">https://azure.microsoft.com/en-us/services/storage/blobs/</a>') ?>
|
29 |
+
</p>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
<div class="row">
|
34 |
+
<div class="col s12 m3 label">
|
35 |
+
<label for="azure_account_name"><?php echo __("Azure Account Name", 'xcloner-backup-and-restore') ?></label>
|
36 |
+
</div>
|
37 |
+
<div class=" col s12 m6">
|
38 |
+
<input placeholder="<?php echo __("Azure Account Name", 'xcloner-backup-and-restore') ?>"
|
39 |
+
id="azure_account_name" type="text" name="xcloner_azure_account_name" class="validate"
|
40 |
+
value="<?php echo get_option("xcloner_azure_account_name") ?>" autocomplete="off">
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
|
44 |
+
|
45 |
+
<div class="row">
|
46 |
+
<div class="col s12 m3 label">
|
47 |
+
<label for="azure_api_key"><?php echo __("Azure Api Key", 'xcloner-backup-and-restore') ?></label>
|
48 |
+
</div>
|
49 |
+
<div class=" col s12 m6">
|
50 |
+
<input placeholder="<?php echo __("Azure Api Key", 'xcloner-backup-and-restore') ?>" id="azure_api_key"
|
51 |
+
type="text" name="xcloner_azure_api_key" class="validate"
|
52 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_azure_api_key"))) ?>" autocomplete="off">
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<div class="row">
|
57 |
+
<div class="col s12 m3 label">
|
58 |
+
<label for="azure_container"><?php echo __("Azure Container", 'xcloner-backup-and-restore') ?></label>
|
59 |
+
</div>
|
60 |
+
<div class=" col s12 m6">
|
61 |
+
<input placeholder="<?php echo __("Azure Container", 'xcloner-backup-and-restore') ?>" id="azure_container"
|
62 |
+
type="text" name="xcloner_azure_container" class="validate"
|
63 |
+
value="<?php echo get_option("xcloner_azure_container") ?>">
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<?=common_cleanup_html('azure')?>
|
68 |
+
|
69 |
+
<div class="row">
|
70 |
+
<div class="col s6 m4">
|
71 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
72 |
+
value="azure"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
73 |
+
<i class="material-icons right">save</i>
|
74 |
+
</button>
|
75 |
+
</div>
|
76 |
+
<div class="col s6 m4">
|
77 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="azure"
|
78 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
79 |
+
<i class="material-icons right">import_export</i>
|
80 |
+
</button>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
|
84 |
+
</div>
|
admin/partials/remote_storage/backblaze.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("Backblaze B2 Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" name="xcloner_backblaze_enable" class="status" value="1" <?php if (get_option("xcloner_backblaze_enable")) {
|
13 |
+
echo "checked";
|
14 |
+
} ?> >
|
15 |
+
<span class="lever"></span>
|
16 |
+
On
|
17 |
+
</label>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
<div class="collapsible-body">
|
21 |
+
|
22 |
+
<div class="row">
|
23 |
+
<div class="col s12 m3 label">
|
24 |
+
|
25 |
+
</div>
|
26 |
+
<div class=" col s12 m6">
|
27 |
+
<p>
|
28 |
+
<?php echo sprintf(__('Visit %s and get your KeyID and applicationKey.', 'xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>') ?>
|
29 |
+
</p>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
<div class="row">
|
34 |
+
<div class="col s12 m3 label">
|
35 |
+
<label
|
36 |
+
for="backblaze_account_id"><?php echo __("Backblaze KeyID", 'xcloner-backup-and-restore') ?></label>
|
37 |
+
</div>
|
38 |
+
<div class=" col s12 m6">
|
39 |
+
<input placeholder="<?php echo __("Backblaze KeyID", 'xcloner-backup-and-restore') ?>"
|
40 |
+
id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id" class="validate"
|
41 |
+
value="<?php echo get_option("xcloner_backblaze_account_id") ?>" autocomplete="off">
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
|
46 |
+
<div class="row">
|
47 |
+
<div class="col s12 m3 label">
|
48 |
+
<label
|
49 |
+
for="backblaze_application_key"><?php echo __("Backblaze applicationKey", 'xcloner-backup-and-restore') ?></label>
|
50 |
+
</div>
|
51 |
+
<div class=" col s12 m6">
|
52 |
+
<input placeholder="<?php echo __("Backblaze applicationKey", 'xcloner-backup-and-restore') ?>"
|
53 |
+
id="backblaze_application_key" type="text" name="xcloner_backblaze_application_key" class="validate"
|
54 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_backblaze_application_key"))) ?>"
|
55 |
+
autocomplete="off">
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<div class="row">
|
60 |
+
<div class="col s12 m3 label">
|
61 |
+
<label
|
62 |
+
for="backblaze_bucket_name"><?php echo __("Backblaze Bucket Name", 'xcloner-backup-and-restore') ?></label>
|
63 |
+
</div>
|
64 |
+
<div class=" col s12 m6">
|
65 |
+
<input placeholder="<?php echo __("Backblaze Bucket Name", 'xcloner-backup-and-restore') ?>"
|
66 |
+
id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name" class="validate"
|
67 |
+
value="<?php echo get_option("xcloner_backblaze_bucket_name") ?>" autocomplete="off">
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<?=common_cleanup_html('backblaze')?>
|
72 |
+
|
73 |
+
<div class="row">
|
74 |
+
<div class="col s6 m4">
|
75 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
76 |
+
value="backblaze"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
77 |
+
<i class="material-icons right">save</i>
|
78 |
+
</button>
|
79 |
+
</div>
|
80 |
+
<div class="col s6 m4">
|
81 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"
|
82 |
+
value="backblaze"
|
83 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
84 |
+
<i class="material-icons right">import_export</i>
|
85 |
+
</button>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
|
89 |
+
</div>
|
admin/partials/remote_storage/dropbox.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("Dropbox Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" name="xcloner_dropbox_enable" class="status" value="1" <?php if (get_option("xcloner_dropbox_enable")) {
|
13 |
+
echo "checked";
|
14 |
+
} ?> >
|
15 |
+
<span class="lever"></span>
|
16 |
+
On
|
17 |
+
</label>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
<div class="collapsible-body">
|
21 |
+
|
22 |
+
<div class="row">
|
23 |
+
<div class="col s12 m3 label">
|
24 |
+
|
25 |
+
</div>
|
26 |
+
<div class=" col s12 m6">
|
27 |
+
<p>
|
28 |
+
<?php echo sprintf(__('Visit %s and get your "App secret".'), "<a href='https://www.dropbox.com/developers/apps' target='_blank'>https://www.dropbox.com/developers/apps</a>") ?>
|
29 |
+
</p>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
<div class="row">
|
34 |
+
<div class="col s12 m3 label">
|
35 |
+
<label
|
36 |
+
for="dropbox_access_token"><?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore') ?></label>
|
37 |
+
</div>
|
38 |
+
<div class=" col s12 m6">
|
39 |
+
<input placeholder="<?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore') ?>"
|
40 |
+
id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token" class="validate"
|
41 |
+
value="<?php echo get_option("xcloner_dropbox_access_token") ?>" autocomplete="off">
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
|
46 |
+
<div class="row">
|
47 |
+
<div class="col s12 m3 label">
|
48 |
+
<label for="dropbox_app_secret"><?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore') ?></label>
|
49 |
+
</div>
|
50 |
+
<div class=" col s12 m6">
|
51 |
+
<input placeholder="<?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore') ?>"
|
52 |
+
id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret" class="validate"
|
53 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_dropbox_app_secret"))) ?>"
|
54 |
+
autocomplete="off">
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<div class="row">
|
59 |
+
<div class="col s12 m3 label">
|
60 |
+
<label for="dropbox_prefix"><?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore') ?></label>
|
61 |
+
</div>
|
62 |
+
<div class=" col s12 m6">
|
63 |
+
<input placeholder="<?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore') ?>" id="dropbox_prefix"
|
64 |
+
type="text" name="xcloner_dropbox_prefix" class="validate"
|
65 |
+
value="<?php echo get_option("xcloner_dropbox_prefix") ?>">
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
|
69 |
+
<?=common_cleanup_html('dropbox')?>
|
70 |
+
|
71 |
+
<div class="row">
|
72 |
+
<div class="col s6 m4">
|
73 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
74 |
+
value="dropbox"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
75 |
+
<i class="material-icons right">save</i>
|
76 |
+
</button>
|
77 |
+
</div>
|
78 |
+
<div class="col s6 m4">
|
79 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="dropbox"
|
80 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
81 |
+
<i class="material-icons right">import_export</i>
|
82 |
+
</button>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
|
86 |
+
</div>
|
admin/partials/remote_storage/ftp.php
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("FTP Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" name="xcloner_ftp_enable" class="status" value="1" <?php if (get_option("xcloner_ftp_enable")) {
|
13 |
+
echo "checked";
|
14 |
+
} ?> >
|
15 |
+
<span class="lever"></span>
|
16 |
+
On
|
17 |
+
</label>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
<div class="collapsible-body">
|
21 |
+
<div class="row">
|
22 |
+
<div class="col s12 m3 label">
|
23 |
+
<label for="ftp_host"><?php echo __("Ftp Hostname", 'xcloner-backup-and-restore') ?></label>
|
24 |
+
</div>
|
25 |
+
<div class="col s12 m6">
|
26 |
+
<input placeholder="<?php echo __("Ftp Hostname", 'xcloner-backup-and-restore') ?>" id="ftp_host"
|
27 |
+
type="text" name="xcloner_ftp_hostname" class="validate"
|
28 |
+
value="<?php echo get_option("xcloner_ftp_hostname") ?>">
|
29 |
+
</div>
|
30 |
+
<div class=" col s12 m2">
|
31 |
+
<input placeholder="<?php echo __("Ftp Port", 'xcloner-backup-and-restore') ?>" id="ftp_port" type="text"
|
32 |
+
name="xcloner_ftp_port" class="validate" value="<?php echo get_option("xcloner_ftp_port", 21) ?>">
|
33 |
+
</div>
|
34 |
+
</div>
|
35 |
+
|
36 |
+
<div class="row">
|
37 |
+
<div class="col s12 m3 label">
|
38 |
+
<label for="ftp_username"><?php echo __("Ftp Username", 'xcloner-backup-and-restore') ?></label>
|
39 |
+
</div>
|
40 |
+
<div class=" col s12 m6">
|
41 |
+
<input placeholder="<?php echo __("Ftp Username", 'xcloner-backup-and-restore') ?>" id="ftp_username"
|
42 |
+
type="text" name="xcloner_ftp_username" class="validate"
|
43 |
+
value="<?php echo get_option("xcloner_ftp_username") ?>" autocomplete="off">
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
|
48 |
+
<div class="row">
|
49 |
+
<div class="col s12 m3 label">
|
50 |
+
<label for="ftp_password"><?php echo __("Ftp Password", 'xcloner-backup-and-restore') ?></label>
|
51 |
+
</div>
|
52 |
+
<div class=" col s12 m6">
|
53 |
+
<input placeholder="<?php echo __("Ftp Password", 'xcloner-backup-and-restore') ?>" id="ftp_password"
|
54 |
+
type="text" name="xcloner_ftp_password" class="validate"
|
55 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_ftp_password"))) ?>" autocomplete="off">
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<div class="row">
|
60 |
+
<div class="col s12 m3 label">
|
61 |
+
<label for="ftp_root"><?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore') ?></label>
|
62 |
+
</div>
|
63 |
+
<div class=" col s12 m6">
|
64 |
+
<input placeholder="<?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore') ?>" id="ftp_root"
|
65 |
+
type="text" name="xcloner_ftp_path" class="validate"
|
66 |
+
value="<?php echo get_option("xcloner_ftp_path") ?>">
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
|
70 |
+
<div class="row">
|
71 |
+
<div class="col s12 m3 label">
|
72 |
+
<label for="ftp_root"><?php echo __("Ftp Transfer Mode", 'xcloner-backup-and-restore') ?></label>
|
73 |
+
</div>
|
74 |
+
<div class=" col s12 m6 input-field inline">
|
75 |
+
<p>
|
76 |
+
<label for="passive">
|
77 |
+
<input name="xcloner_ftp_transfer_mode" type="radio" id="passive" value="1" <?php if (get_option("xcloner_ftp_transfer_mode", 1)) {
|
78 |
+
echo "checked";
|
79 |
+
} ?> />
|
80 |
+
<span><?php echo __("Passive", 'xcloner-backup-and-restore') ?></span>
|
81 |
+
</label>
|
82 |
+
</p>
|
83 |
+
<p>
|
84 |
+
<label for="active">
|
85 |
+
<input name="xcloner_ftp_transfer_mode" type="radio" id="active" value="0" <?php if (!get_option("xcloner_ftp_transfer_mode", 1)) {
|
86 |
+
echo "checked";
|
87 |
+
} ?> />
|
88 |
+
<span><?php echo __("Active", 'xcloner-backup-and-restore') ?></span>
|
89 |
+
</label>
|
90 |
+
</p>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
|
94 |
+
<div class="row">
|
95 |
+
<div class="col s12 m3 label">
|
96 |
+
<label for="ftp_ssl_mode"><?php echo __("Ftp Secure Connection", 'xcloner-backup-and-restore') ?></label>
|
97 |
+
</div>
|
98 |
+
<div class=" col s12 m6 input-field inline">
|
99 |
+
<p>
|
100 |
+
<label for="ftp_ssl_mode_inactive">
|
101 |
+
<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_inactive" value="0" <?php if (!get_option("xcloner_ftp_ssl_mode")) {
|
102 |
+
echo "checked";
|
103 |
+
} ?> />
|
104 |
+
<span><?php echo __("Disable", 'xcloner-backup-and-restore') ?></span>
|
105 |
+
</label></p>
|
106 |
+
<p>
|
107 |
+
<label for="ftp_ssl_mode_active">
|
108 |
+
<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_active" value="1" <?php if (get_option("xcloner_ftp_ssl_mode")) {
|
109 |
+
echo "checked";
|
110 |
+
} ?> />
|
111 |
+
<span><?php echo __("Enable", 'xcloner-backup-and-restore') ?></span>
|
112 |
+
</label></p>
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
+
|
116 |
+
<div class="row">
|
117 |
+
<div class="col s12 m3 label">
|
118 |
+
<label for="ftp_timeout"><?php echo __("Ftp Timeout", 'xcloner-backup-and-restore') ?></label>
|
119 |
+
</div>
|
120 |
+
<div class=" col s12 m2">
|
121 |
+
<input placeholder="<?php echo __("Ftp Timeout", 'xcloner-backup-and-restore') ?>" id="ftp_timeout"
|
122 |
+
type="text" name="xcloner_ftp_timeout" class="validate"
|
123 |
+
value="<?php echo get_option("xcloner_ftp_timeout", 30) ?>">
|
124 |
+
</div>
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<?=common_cleanup_html('ftp')?>
|
128 |
+
|
129 |
+
<div class="row">
|
130 |
+
<div class="col s6 m4">
|
131 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
132 |
+
value="ftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
133 |
+
<i class="material-icons right">save</i>
|
134 |
+
</button>
|
135 |
+
</div>
|
136 |
+
<div class="col s6 m4">
|
137 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="ftp"
|
138 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
139 |
+
<i class="material-icons right">import_export</i>
|
140 |
+
</button>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
|
144 |
+
</div>
|
admin/partials/remote_storage/gdrive.php
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("Google Drive Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<?php if ($gdrive_construct): ?>
|
10 |
+
<div class="switch right">
|
11 |
+
<label>
|
12 |
+
Off
|
13 |
+
<input type="checkbox" name="xcloner_gdrive_enable" class="status" value="1" <?php if (get_option("xcloner_gdrive_enable")) {
|
14 |
+
echo "checked";
|
15 |
+
} ?> >
|
16 |
+
<span class="lever"></span>
|
17 |
+
On
|
18 |
+
</label>
|
19 |
+
</div>
|
20 |
+
<?php endif ?>
|
21 |
+
</div>
|
22 |
+
<div class="collapsible-body">
|
23 |
+
|
24 |
+
<?php if ($gdrive_construct) : ?>
|
25 |
+
|
26 |
+
<div class="row">
|
27 |
+
<div class="col s12 m3 label">
|
28 |
+
|
29 |
+
</div>
|
30 |
+
<div class=" col s12 m9">
|
31 |
+
<p>
|
32 |
+
<?php echo sprintf(__('Click the Google Sign-in button below to complete the 1-time integration. If you would like to create your own custom app, please visit %s to create a new application and get your Client ID and Client Secret and enter it below. ', 'xcloner-backup-and-restore'), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>') ?>
|
33 |
+
<a href="https://youtu.be/kBxf-39F4Nw" target="_blank" class="btn-floating tooltipped btn-small"
|
34 |
+
data-position="right" data-delay="50" data-html="true"
|
35 |
+
data-tooltip="<?php echo sprintf(__('Click here to view a short video explaining how to create the Client ID and Client Secret as well as connecting XCloner with the Google Drive API %s', 'xcloner-backup-and-restore'), "<br />https://youtu.be/kBxf-39F4Nw") ?>"
|
36 |
+
data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i
|
37 |
+
class="material-icons">help_outline</i></a>
|
38 |
+
</p>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<div class="row">
|
43 |
+
<div class="col s12 m3 label">
|
44 |
+
|
45 |
+
</div>
|
46 |
+
<div class=" col s12 m6">
|
47 |
+
<a class="" target="_blank" id="gdrive_authorization_click"
|
48 |
+
onclick="jQuery('#authentification_code').show()"
|
49 |
+
href="<?php echo $gdrive_auth_url ?>">
|
50 |
+
<img src="<?=plugin_dir_url(__DIR__)?>/../../assets/btn_google_signin_dark_pressed_web.png"
|
51 |
+
alt="<?php echo sprintf(__('Authorize Google Drive', 'xcloner-backup-and-restore')) ?>"/>
|
52 |
+
</a>
|
53 |
+
<input type="text" name="authentification_code" id="authentification_code"
|
54 |
+
placeholder="<?php echo __("Paste Authorization Code Here", "xcloner-backup-and-restore") ?>">
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<div class="row">
|
59 |
+
<div class="col s12 m3 label">
|
60 |
+
<label for="gdrive_client_id"><?php echo __("Client ID", 'xcloner-backup-and-restore') ?></label>
|
61 |
+
</div>
|
62 |
+
<div class=" col s12 m6">
|
63 |
+
<input
|
64 |
+
placeholder="<?php echo __("Leave blank unless you wish to set up Google Drive integration manually", 'xcloner-backup-and-restore') ?>"
|
65 |
+
id="gdrive_client_id" type="text" name="xcloner_gdrive_client_id" class="validate"
|
66 |
+
value="<?php echo get_option("xcloner_gdrive_client_id") ?>"
|
67 |
+
default-client-id=<?=$remote_storage::GDRIVE_AUTH_WATCHFUL?>>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="row" id="gdrive_client_secret_wrapper">
|
72 |
+
<div class="col s12 m3 label">
|
73 |
+
<label for="gdrive_client_secret"><?php echo __("Client Secret", 'xcloner-backup-and-restore') ?></label>
|
74 |
+
</div>
|
75 |
+
<div class=" col s12 m6">
|
76 |
+
<input placeholder="<?php echo __("Google Client Secret", 'xcloner-backup-and-restore') ?>"
|
77 |
+
id="gdrive_client_secret" type="text" name="xcloner_gdrive_client_secret" class="validate"
|
78 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_gdrive_client_secret"))) ?>">
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<div class="row">
|
83 |
+
<div class="col s12 m3 label">
|
84 |
+
<label for="gdrive_target_folder"><?php echo __("Folder ID or Root Path", 'xcloner-backup-and-restore') ?>
|
85 |
+
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-html="true" \
|
86 |
+
data-tooltip="<?php echo __('Folder ID can be found by right clicking on the folder name and selecting \'Get shareable link\' menu, format https://drive.google.com/open?id={FOLDER_ID}<br />
|
87 |
+
If you supply a folder name, it has to exists in the drive root and start with / , example /backups.xcloner.com/', 'xcloner-backup-and-restore') ?>"
|
88 |
+
data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i
|
89 |
+
class="material-icons">help_outline</i></a>
|
90 |
+
</label>
|
91 |
+
</div>
|
92 |
+
<div class=" col s12 m6">
|
93 |
+
<input placeholder="<?php echo __("Target Folder ID or Root Path", 'xcloner-backup-and-restore') ?>"
|
94 |
+
id="gdrive_target_folder" type="text" name="xcloner_gdrive_target_folder" class="validate"
|
95 |
+
value="<?php echo get_option("xcloner_gdrive_target_folder") ?>" autocomplete="off">
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<?=common_cleanup_html('gdrive')?>
|
100 |
+
|
101 |
+
<div class="row">
|
102 |
+
<div class="col s12 m3 label">
|
103 |
+
<label
|
104 |
+
for="gdrive_empty_trash"><?php echo __("Automatically Empty Trash?", 'xcloner-backup-and-restore') ?></label>
|
105 |
+
</div>
|
106 |
+
<div class=" col s12 m6 input-field inline">
|
107 |
+
<p>
|
108 |
+
<label for="gdrive_empty_trash_off">
|
109 |
+
<input name="xcloner_gdrive_empty_trash" type="radio" value="0" id="gdrive_empty_trash_off" <?php if (!get_option("xcloner_gdrive_empty_trash", 0)) {
|
110 |
+
echo "checked";
|
111 |
+
} ?> />
|
112 |
+
<span><?php echo __("Disabled", 'xcloner-backup-and-restore') ?></span>
|
113 |
+
</label>
|
114 |
+
</p>
|
115 |
+
<p>
|
116 |
+
<label for="gdrive_empty_trash_on">
|
117 |
+
<input name="xcloner_gdrive_empty_trash" type="radio" value="1" id="gdrive_empty_trash_on" <?php if (get_option("xcloner_gdrive_empty_trash", 0)) {
|
118 |
+
echo "checked";
|
119 |
+
} ?> />
|
120 |
+
<span><?php echo __("Enabled", 'xcloner-backup-and-restore') ?></span>
|
121 |
+
</label>
|
122 |
+
</p>
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
|
126 |
+
<div class="row">
|
127 |
+
<div class="col s6 m4">
|
128 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
129 |
+
value="gdrive"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
130 |
+
<i class="material-icons right">save</i>
|
131 |
+
</button>
|
132 |
+
</div>
|
133 |
+
<div class="col s6 m4">
|
134 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="gdrive"
|
135 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
136 |
+
<i class="material-icons right">import_export</i>
|
137 |
+
</button>
|
138 |
+
</div>
|
139 |
+
</div>
|
140 |
+
<?php else: ?>
|
141 |
+
|
142 |
+
<div class="row">
|
143 |
+
<div class=" col s12">
|
144 |
+
<div class="center">
|
145 |
+
<?php
|
146 |
+
$url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=xcloner-google-drive'), 'install-plugin_xcloner-google-drive');
|
147 |
+
?>
|
148 |
+
<h6><?php echo __("This storage option requires the XCloner-Google-Drive Wordpress Plugin to be installed and activated.") ?>
|
149 |
+
</h6>
|
150 |
+
<h6><?php echo __("PHP 5.5 minimum version is required.") ?></h6>
|
151 |
+
<br />
|
152 |
+
<a class="install-now btn" data-slug="xcloner-google-drive" href="<?php echo $url; ?>"
|
153 |
+
aria-label="Install XCloner Google Drive 1.0.0 now" data-name="XCloner Google Drive 1.0.0">
|
154 |
+
<?php echo sprintf(__('Install Now', 'xcloner-backup-and-restore')) ?>
|
155 |
+
</a>
|
156 |
+
|
157 |
+
<a href="<?php echo admin_url("plugin-install.php") ?>?tab=plugin-information&plugin=xcloner-google-drive&TB_iframe=true&width=772&height=499"
|
158 |
+
class="btn thickbox open-plugin-details-modal"
|
159 |
+
aria-label="More information about Theme Check 20160523.1" data-title="Theme Check 20160523.1">
|
160 |
+
<!--
|
161 |
+
<a class="btn" href="https://github.com/ovidiul/XCloner-Google-Drive/archive/master.zip">
|
162 |
+
-->
|
163 |
+
<?php echo sprintf(__('More Details', 'xcloner-backup-and-restore')) ?>
|
164 |
+
</a>
|
165 |
+
</div>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
|
169 |
+
<?php endif; ?>
|
170 |
+
|
171 |
+
</div>
|
admin/partials/remote_storage/index.html
ADDED
File without changes
|
admin/partials/remote_storage/local.php
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("Local Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" checked disabled class="disabled readonly" >
|
13 |
+
<span class="lever"></span>
|
14 |
+
On
|
15 |
+
</label>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
<div class="collapsible-body">
|
19 |
+
|
20 |
+
<div class="row">
|
21 |
+
<div class="col s12 m3 label">
|
22 |
+
<label for="aws_key"><?php echo __("Backup Start Location", 'xcloner-backup-and-restore') ?></label>
|
23 |
+
</div>
|
24 |
+
<div class=" col s12 m6">
|
25 |
+
<input placeholder="<?php echo __("Backup Start Location", 'xcloner-backup-and-restore') ?>" id="aws_key"
|
26 |
+
type="text" name="xcloner_start_path" class="validate"
|
27 |
+
value="<?php echo get_option("xcloner_start_path") ?>" autocomplete="off">
|
28 |
+
</div>
|
29 |
+
</div>
|
30 |
+
|
31 |
+
<div class="row">
|
32 |
+
<div class="col s12 m3 label">
|
33 |
+
<label for="aws_key"><?php echo __("Backup Storage Location", 'xcloner-backup-and-restore') ?></label>
|
34 |
+
</div>
|
35 |
+
<div class=" col s12 m6">
|
36 |
+
<input placeholder="<?php echo __("Backup Storage Location", 'xcloner-backup-and-restore') ?>" id="aws_key"
|
37 |
+
type="text" name="xcloner_store_path" class="validate"
|
38 |
+
value="<?php echo get_option("xcloner_store_path") ?>" autocomplete="off">
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<?=common_cleanup_html('local')?>
|
43 |
+
|
44 |
+
<div class="row">
|
45 |
+
<div class="col s6 m4">
|
46 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
47 |
+
value="local"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
48 |
+
<i class="material-icons right">save</i>
|
49 |
+
</button>
|
50 |
+
</div>
|
51 |
+
<div class="col s6 m4">
|
52 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="local"
|
53 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
54 |
+
<i class="material-icons right">import_export</i>
|
55 |
+
</button>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
</div>
|
admin/partials/remote_storage/onedrive.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("OneDrive Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" name="xcloner_onedrive_enable" class="status" value="1" <?php if (get_option("xcloner_onedrive_enable")) {
|
13 |
+
echo "checked";
|
14 |
+
} ?> >
|
15 |
+
<span class="lever"></span>
|
16 |
+
On
|
17 |
+
</label>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
<div class="collapsible-body">
|
21 |
+
|
22 |
+
<div class="row">
|
23 |
+
<div class="col s12 m3 label">
|
24 |
+
|
25 |
+
</div>
|
26 |
+
<div class=" col s12 m6">
|
27 |
+
<p>
|
28 |
+
<?php echo sprintf(__('Visit <a href="%s" target="_blank">Microsoft Azure App Registrations</a> and get your Client ID and Client Secret. More details on setting up the code flow authentication can be found <a href="%s">here</a>.
|
29 |
+
Make sure to also add the %s to the Authentication->Redirect URIs area', 'xcloner-backup-and-restore'), 'https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade', 'https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online#code-flow', get_admin_url()) ?>
|
30 |
+
</p>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<div class="row">
|
35 |
+
<div class="col s12 m3 label">
|
36 |
+
<label for="onedrive_client_id"><?php echo __("OneDrive Client ID", 'xcloner-backup-and-restore') ?></label>
|
37 |
+
</div>
|
38 |
+
<div class=" col s12 m6">
|
39 |
+
<input placeholder="<?php echo __("OneDrive Client ID", 'xcloner-backup-and-restore') ?>"
|
40 |
+
id="onedrive_client_id" type="text" name="xcloner_onedrive_client_id" class="validate"
|
41 |
+
value="<?=get_option("xcloner_onedrive_client_id") ?>" autocomplete="off">
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<div class="row">
|
46 |
+
<div class="col s12 m3 label">
|
47 |
+
<label
|
48 |
+
for="onedrive_client_secret"><?php echo __("OneDrive Client Secret", 'xcloner-backup-and-restore') ?></label>
|
49 |
+
</div>
|
50 |
+
<div class=" col s12 m6">
|
51 |
+
<input placeholder="<?php echo __("OneDrive Client Secret", 'xcloner-backup-and-restore') ?>"
|
52 |
+
id="onedrive_client_secret" type="text" name="xcloner_onedrive_client_secret" class="validate"
|
53 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_onedrive_client_secret"))) ?>"
|
54 |
+
autocomplete="off">
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<div class="row">
|
59 |
+
<div class="col s12 m3 label">
|
60 |
+
|
61 |
+
</div>
|
62 |
+
<div class=" col s12 m6">
|
63 |
+
<a class="btn" target="_blank" id="onedrive_authorization_click" onclick="jQuery(this).attr('href', jQuery(this).attr('target_href') + '&client_id=' + jQuery('#onedrive_client_id').val());
|
64 |
+
jQuery('.onedrive-action').click()" href="#"
|
65 |
+
target_href="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=offline_access files.readwrite.all files.read files.read.all files.readwrite&response_type=code&redirect_uri=<?=get_admin_url('')?>"><?php echo sprintf(__('Authorize OneDrive', 'xcloner-backup-and-restore')) ?></a>
|
66 |
+
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
|
70 |
+
<div class="row">
|
71 |
+
<div class="col s12 m3 label">
|
72 |
+
<label for="onedrive_path"><?php echo __("OneDrive Storage Folder", 'xcloner-backup-and-restore') ?></label>
|
73 |
+
</div>
|
74 |
+
<div class=" col s12 m6">
|
75 |
+
<input placeholder="<?php echo __("OneDrive Storage Folder Path", 'xcloner-backup-and-restore') ?>"
|
76 |
+
id="onedrive_path" type="text" name="xcloner_onedrive_path" class="validate"
|
77 |
+
value="<?php echo get_option("xcloner_onedrive_path") ?>">
|
78 |
+
</div>
|
79 |
+
</div>
|
80 |
+
|
81 |
+
<?=common_cleanup_html('onedrive')?>
|
82 |
+
|
83 |
+
<div class="row">
|
84 |
+
<div class="col s6 m4">
|
85 |
+
<button class="btn waves-effect waves-light onedrive-action" type="submit" name="action" id="action"
|
86 |
+
value="onedrive"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
87 |
+
<i class="material-icons right">save</i>
|
88 |
+
</button>
|
89 |
+
</div>
|
90 |
+
<div class="col s6 m4">
|
91 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action" value="onedrive"
|
92 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
93 |
+
<i class="material-icons right">import_export</i>
|
94 |
+
</button>
|
95 |
+
</div>
|
96 |
+
</div>
|
97 |
+
|
98 |
+
</div>
|
admin/partials/remote_storage/sftp.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("SFTP Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" name="xcloner_sftp_enable" class="status"
|
13 |
+
value="1" <?php if (get_option("xcloner_sftp_enable")) {
|
14 |
+
echo "checked";
|
15 |
+
} ?> \>
|
16 |
+
<span class="lever"></span>
|
17 |
+
On
|
18 |
+
</label>
|
19 |
+
</div>
|
20 |
+
</div>
|
21 |
+
<div class="collapsible-body">
|
22 |
+
<div class="row">
|
23 |
+
<div class="col s12 m3 label">
|
24 |
+
<label for="sftp_host"><?php echo __("SFTP Hostname", 'xcloner-backup-and-restore') ?></label>
|
25 |
+
</div>
|
26 |
+
<div class="col s12 m6">
|
27 |
+
<input placeholder="<?php echo __("SFTP Hostname", 'xcloner-backup-and-restore') ?>"
|
28 |
+
id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate"
|
29 |
+
value="<?php echo get_option("xcloner_sftp_hostname") ?>">
|
30 |
+
</div>
|
31 |
+
<div class=" col s12 m2">
|
32 |
+
<input placeholder="<?php echo __("SFTP Port", 'xcloner-backup-and-restore') ?>"
|
33 |
+
id="sftp_port" type="text" name="xcloner_sftp_port" class="validate"
|
34 |
+
value="<?php echo get_option("xcloner_sftp_port", 22) ?>">
|
35 |
+
</div>
|
36 |
+
</div>
|
37 |
+
|
38 |
+
<div class="row">
|
39 |
+
<div class="col s12 m3 label">
|
40 |
+
<label for="sftp_username"><?php echo __("SFTP Username", 'xcloner-backup-and-restore') ?></label>
|
41 |
+
</div>
|
42 |
+
<div class=" col s12 m6">
|
43 |
+
<input placeholder="<?php echo __("SFTP Username", 'xcloner-backup-and-restore') ?>"
|
44 |
+
id="sftp_username" type="text" name="xcloner_sftp_username" class="validate"
|
45 |
+
value="<?php echo get_option("xcloner_sftp_username") ?>" autocomplete="off">
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
|
49 |
+
|
50 |
+
<div class="row">
|
51 |
+
<div class="col s12 m3 label">
|
52 |
+
<label for="sftp_password"><?php echo __("SFTP or Private Key Password", 'xcloner-backup-and-restore') ?></label>
|
53 |
+
</div>
|
54 |
+
<div class=" col s12 m6">
|
55 |
+
<input placeholder="<?php echo __("SFTP or Private Key Password", 'xcloner-backup-and-restore') ?>"
|
56 |
+
id="ftp_spassword" type="text" name="xcloner_sftp_password" class="validate"
|
57 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_sftp_password"))) ?>"
|
58 |
+
autocomplete="off">
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
|
62 |
+
<div class="row">
|
63 |
+
<div class="col s12 m3 label">
|
64 |
+
<label for="sftp_private_key"><?php echo __("SFTP Private Key(RSA)", 'xcloner-backup-and-restore') ?></label>
|
65 |
+
</div>
|
66 |
+
<div class=" col s12 m6">
|
67 |
+
<textarea rows="5"
|
68 |
+
placeholder="<?php echo __("Local Server Path or Contents of the SFTP Private Key RSA File", 'xcloner-backup-and-restore') ?>"
|
69 |
+
id="sftp_private_key" type="text" name="xcloner_sftp_private_key"
|
70 |
+
class="validate"
|
71 |
+
value=""><?php echo get_option("xcloner_sftp_private_key") ?></textarea>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
|
75 |
+
<div class="row">
|
76 |
+
<div class="col s12 m3 label">
|
77 |
+
<label for="sftp_root"><?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore') ?></label>
|
78 |
+
</div>
|
79 |
+
<div class=" col s12 m6">
|
80 |
+
<input placeholder="<?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore') ?>"
|
81 |
+
id="sftp_root" type="text" name="xcloner_sftp_path" class="validate"
|
82 |
+
value="<?php echo get_option("xcloner_sftp_path") ?>">
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
|
86 |
+
<div class="row">
|
87 |
+
<div class="col s12 m3 label">
|
88 |
+
<label for="sftp_timeout"><?php echo __("SFTP Timeout", 'xcloner-backup-and-restore') ?></label>
|
89 |
+
</div>
|
90 |
+
<div class=" col s12 m2">
|
91 |
+
<input placeholder="<?php echo __("SFTP Timeout", 'xcloner-backup-and-restore') ?>"
|
92 |
+
id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate"
|
93 |
+
value="<?php echo get_option("xcloner_sftp_timeout", 30) ?>">
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
|
97 |
+
<?=common_cleanup_html('sftp')?>
|
98 |
+
|
99 |
+
<div class="row">
|
100 |
+
<div class="col s6 m4">
|
101 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
102 |
+
value="sftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
103 |
+
<i class="material-icons right">save</i>
|
104 |
+
</button>
|
105 |
+
</div>
|
106 |
+
<div class="col s6 m4">
|
107 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
108 |
+
id="action" value="sftp"
|
109 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
110 |
+
<i class="material-icons right">import_export</i>
|
111 |
+
</button>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
</div>
|
admin/partials/remote_storage/webdav.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// If this file is called directly, abort.
|
3 |
+
if (!defined('WPINC')) {
|
4 |
+
die;
|
5 |
+
}
|
6 |
+
?>
|
7 |
+
<div class="collapsible-header">
|
8 |
+
<i class="material-icons">computer</i><?php echo __("WebDAV Storage", 'xcloner-backup-and-restore') ?>
|
9 |
+
<div class="switch right">
|
10 |
+
<label>
|
11 |
+
Off
|
12 |
+
<input type="checkbox" name="xcloner_webdav_enable" class="status"
|
13 |
+
value="1" <?php if (get_option("xcloner_webdav_enable")) {
|
14 |
+
echo "checked";
|
15 |
+
} ?> \>
|
16 |
+
<span class="lever"></span>
|
17 |
+
On
|
18 |
+
</label>
|
19 |
+
</div>
|
20 |
+
</div>
|
21 |
+
<div class="collapsible-body">
|
22 |
+
|
23 |
+
<div class="row">
|
24 |
+
<div class="col s12 m3 label">
|
25 |
+
|
26 |
+
</div>
|
27 |
+
<div class=" col s12 m6">
|
28 |
+
<p>
|
29 |
+
<?php //echo sprintf(__('Visit %s and get your Account Id and Application Key.','xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>')?>
|
30 |
+
</p>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<div class="row">
|
35 |
+
<div class="col s12 m3 label">
|
36 |
+
<label for="webdav_url"><?php echo __("WebDAV Base Url", 'xcloner-backup-and-restore') ?></label>
|
37 |
+
</div>
|
38 |
+
<div class=" col s12 m6">
|
39 |
+
<input placeholder="<?php echo __("WebDAV Service Url like https://webdav.yandex.com", 'xcloner-backup-and-restore') ?>"
|
40 |
+
id="webdav_url" type="text" name="xcloner_webdav_url" class="validate"
|
41 |
+
value="<?php echo get_option("xcloner_webdav_url") ?>" autocomplete="off">
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<div class="row">
|
46 |
+
<div class="col s12 m3 label">
|
47 |
+
<label for="webdav_username"><?php echo __("WebDAV Username", 'xcloner-backup-and-restore') ?></label>
|
48 |
+
</div>
|
49 |
+
<div class=" col s12 m6">
|
50 |
+
<input placeholder="<?php echo __("WebDAV Username", 'xcloner-backup-and-restore') ?>"
|
51 |
+
id="webdav_username" type="text" name="xcloner_webdav_username" class="validate"
|
52 |
+
value="<?php echo get_option("xcloner_webdav_username") ?>" autocomplete="off">
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<div class="row">
|
57 |
+
<div class="col s12 m3 label">
|
58 |
+
<label for="webdav_password"><?php echo __("WebDAV Password", 'xcloner-backup-and-restore') ?></label>
|
59 |
+
</div>
|
60 |
+
<div class=" col s12 m6">
|
61 |
+
<input placeholder="<?php echo __("WebDAV Password", 'xcloner-backup-and-restore') ?>"
|
62 |
+
id="webdav_password" type="text" name="xcloner_webdav_password"
|
63 |
+
class="validate"
|
64 |
+
value="<?php echo str_repeat('*', strlen(get_option("xcloner_webdav_password"))) ?>"
|
65 |
+
autocomplete="off">
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
|
69 |
+
<div class="row">
|
70 |
+
<div class="col s12 m3 label">
|
71 |
+
<label for="webdav_target_folder"><?php echo __("WebDAV Target Path", 'xcloner-backup-and-restore') ?></label>
|
72 |
+
</div>
|
73 |
+
<div class=" col s12 m6">
|
74 |
+
<input placeholder="<?php echo __("WebDAV Target Path", 'xcloner-backup-and-restore') ?>"
|
75 |
+
id="webdav_target_folder" type="text" name="xcloner_webdav_target_folder"
|
76 |
+
class="validate"
|
77 |
+
value="<?php echo get_option("xcloner_webdav_target_folder") ?>"
|
78 |
+
autocomplete="off">
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
|
82 |
+
<?=common_cleanup_html('webdav')?>
|
83 |
+
|
84 |
+
<div class="row">
|
85 |
+
<div class="col s6 m4">
|
86 |
+
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
87 |
+
value="webdav"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
88 |
+
<i class="material-icons right">save</i>
|
89 |
+
</button>
|
90 |
+
</div>
|
91 |
+
<div class="col s6 m4">
|
92 |
+
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
93 |
+
id="action" value="webdav"
|
94 |
+
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
95 |
+
<i class="material-icons right">import_export</i>
|
96 |
+
</button>
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
|
100 |
+
</div>
|
admin/partials/xcloner_console_page.php
CHANGED
@@ -7,30 +7,30 @@ $logger_content = $logger->getLastDebugLines();
|
|
7 |
<div class="col s12 ">
|
8 |
<div>
|
9 |
<h5 class="left-align">
|
10 |
-
|
11 |
</h5>
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
echo implode("<br />\n", $logger_content);
|
21 |
} ?></div>
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
getXclonerLog();
|
31 |
}, 2000);*/
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
</div>
|
36 |
-
</div>
|
7 |
<div class="col s12 ">
|
8 |
<div>
|
9 |
<h5 class="left-align">
|
10 |
+
<?php echo __('XCloner Debugger Dashboard', 'xcloner-backup-and-restore') ?>
|
11 |
</h5>
|
12 |
|
13 |
+
<?php if ($xcloner_settings->get_xcloner_option('xcloner_enable_log')) : ?>
|
14 |
+
<ul class="collapsible xcloner-debugger" data-collapsible="accordion">
|
15 |
+
<li class="active">
|
16 |
+
<div class="collapsible-header active"><i class="material-icons">bug_report</i>XCloner Debugger
|
17 |
+
</div>
|
18 |
+
<div class="collapsible-body">
|
19 |
+
<div class="console" id="xcloner-console"><?php if (isset($logger_content)) {
|
20 |
echo implode("<br />\n", $logger_content);
|
21 |
} ?></div>
|
22 |
+
</div>
|
23 |
+
</li>
|
24 |
+
</ul>
|
25 |
+
<script>
|
26 |
+
jQuery(document).ready(function () {
|
27 |
+
var objDiv = document.getElementById("xcloner-console");
|
28 |
+
objDiv.scrollTop = objDiv.scrollHeight;
|
29 |
+
/*setInterval(function(){
|
30 |
getXclonerLog();
|
31 |
}, 2000);*/
|
32 |
+
})
|
33 |
+
</script>
|
34 |
+
<?php endif; ?>
|
35 |
</div>
|
36 |
+
</div>
|
admin/partials/xcloner_generate_backups_page.php
CHANGED
@@ -6,435 +6,472 @@ $xcloner_scheduler = $this->get_xcloner_container()->get_xcloner_scheduler(
|
|
6 |
$tab = 1;
|
7 |
?>
|
8 |
|
9 |
-
<
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
<
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
</
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
<
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
46 |
-
data-tooltip="<?php echo __('The default backup name, supported tags [time], [hostname], [domain]', 'xcloner-backup-and-restore') ?>"
|
47 |
-
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
48 |
-
</div>
|
49 |
-
</div>
|
50 |
-
|
51 |
-
<div class="row">
|
52 |
-
<div class="input-field inline col s12 m10 l6">
|
53 |
-
<i class="material-icons prefix">email</i>
|
54 |
-
<input name="email_notification" id="email_notification" type="text"
|
55 |
-
value="<?php echo get_option('admin_email'); ?>">
|
56 |
-
<label for="email_notification"><?php echo __('Send Email Notification To', 'xcloner-backup-and-restore') ?></label>
|
57 |
-
</div>
|
58 |
-
<div class="hide-on-small-only m2">
|
59 |
-
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
60 |
-
data-tooltip="<?php echo __('If left blank, no notification will be sent', 'xcloner-backup-and-restore') ?>"
|
61 |
-
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
62 |
-
</div>
|
63 |
-
</div>
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
|
|
93 |
</div>
|
94 |
-
</div>
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
</div>
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
</div>
|
115 |
|
116 |
-
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
<?php foreach ($available_storages as $storage => $text): ?>
|
124 |
-
|
125 |
<?php endforeach ?>
|
126 |
</select>
|
127 |
<label><?php echo __('Send To Remote Storage', 'xcloner-backup-and-restore') ?></label>
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
</div>
|
129 |
-
<div class="hide-on-small-only m2">
|
130 |
-
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
131 |
-
data-tooltip="<?php echo __('Transfer backup to the remote storage destintion once finished.', 'xcloner-backup-and-restore') ?>"
|
132 |
-
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
133 |
-
</div>
|
134 |
-
</div>
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
140 |
|
141 |
-
</div>
|
142 |
-
<div class="input-field col s6 m5 l2">
|
143 |
-
<div class="switch">
|
144 |
-
<label>
|
145 |
-
Off
|
146 |
-
<input type="checkbox" name="backup_delete_after_remote_transfer" id="backup_delete_after_remote_transfer" value="1">
|
147 |
-
<span class="lever"></span>
|
148 |
-
On
|
149 |
-
</label>
|
150 |
</div>
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
|
|
157 |
</div>
|
158 |
-
|
159 |
-
<?php endif ?>
|
160 |
|
161 |
-
<div class="row">
|
162 |
-
<div class="input-field col s12 m10 l6 right-align">
|
163 |
-
<a class="waves-effect waves-light btn" onclick="next_tab('#database_options');"><i
|
164 |
-
class="material-icons right">skip_next</i>Next</a>
|
165 |
-
</div>
|
166 |
-
</div>
|
167 |
-
</div>
|
168 |
-
|
169 |
-
<?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
|
170 |
-
<div id="database_options" class="tab-content">
|
171 |
-
<h2><?php echo __('Select database data to include in the backup', 'xcloner-backup-and-restore') ?>:
|
172 |
-
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
173 |
-
data-tooltip="<?php echo __('Enable the \'Backup only WP tables\' setting if you don\'t want to show all other databases and tables not related to this Wordpress install', 'xcloner-backup-and-restore'); ?>"
|
174 |
-
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
175 |
-
</h2>
|
176 |
|
177 |
-
<!-- database/tables tree -->
|
178 |
-
<div class="row">
|
179 |
-
<div class="col s12 l6">
|
180 |
-
<div id="jstree_database_container"></div>
|
181 |
-
</div>
|
182 |
</div>
|
183 |
|
184 |
-
|
185 |
-
|
186 |
-
|
|
|
|
|
187 |
class="material-icons right">skip_next</i>Next</a>
|
|
|
188 |
</div>
|
189 |
-
</div>
|
190 |
-
|
191 |
-
</div>
|
192 |
-
<?php endif ?>
|
193 |
-
|
194 |
-
<div id="files_options" class="tab-content">
|
195 |
-
<h2><?php echo __('Select from below the files/folders you want to exclude from your Backup Archive', 'xcloner-backup-and-restore') ?>
|
196 |
-
:
|
197 |
-
<a class="btn-floating tooltipped btn-small" data-position="bottom" data-delay="50" data-html="true"
|
198 |
-
data-tooltip="<?php echo __('You can navigate below through all your site structure(Backup Start Location) to exclude any file/folder you need by clicking the checkbox near it. <br />If the checkobx is disabled, then it matches a Regex Exclude File option and it can\'t be unchecked', 'xcloner-backup-and-restore'); ?>"
|
199 |
-
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
200 |
-
</h2>
|
201 |
-
|
202 |
-
<!-- Files System Container -->
|
203 |
-
<div class="row">
|
204 |
-
<div class="col s12 l6">
|
205 |
-
<div id="jstree_files_container"></div>
|
206 |
-
</div>
|
207 |
-
</div>
|
208 |
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
|
216 |
-
</div>
|
217 |
-
<div id="generate_backup" class="tab-content">
|
218 |
-
<div class="row ">
|
219 |
-
<div class="col s12 l10 center action-buttons">
|
220 |
-
<a class="waves-effect waves-light btn-large teal darken-1 start"
|
221 |
-
onclick="xcloner_backup.start_backup()">Start Backup<i
|
222 |
-
class="material-icons left">forward</i></a>
|
223 |
-
<a class="waves-effect waves-light btn-large teal darken-1 restart"
|
224 |
-
onclick="xcloner_backup.restart_backup()">Restart Backup<i class="material-icons left">cached</i></a>
|
225 |
-
<a class="waves-effect waves-light btn-large red darken-1 cancel"
|
226 |
-
onclick="xcloner_backup.cancel_backup()">Cancel Backup<i
|
227 |
-
class="material-icons left">cancel</i></a>
|
228 |
</div>
|
229 |
-
|
230 |
-
<ul class="backup-status collapsible collapsible-accordion" data-collapsible="accordion">
|
231 |
-
<li class="file-system">
|
232 |
-
<div class="collapsible-header">
|
233 |
-
<i class="material-icons">folder</i><?php echo __('Scanning The File System...', 'xcloner-backup-and-restore') ?>
|
234 |
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
|
|
|
|
240 |
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
<
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
|
|
|
|
|
|
|
|
251 |
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
|
254 |
-
|
255 |
-
|
|
|
256 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
</div>
|
261 |
-
</div>
|
262 |
-
<div class="collapsible-body status-body">
|
263 |
-
<div class="row">
|
264 |
-
<div class="col l7 s12">
|
265 |
-
<ul class="logged-tables"></ul>
|
266 |
</div>
|
267 |
-
|
268 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
</div>
|
270 |
</div>
|
271 |
-
</
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
<div class="row">
|
290 |
-
<div class="col l3 s12">
|
291 |
-
<h2><?php echo __("Backup Parts", 'xcloner-backup-and-restore') ?>: </h2>
|
292 |
</div>
|
293 |
-
<div class="
|
294 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
</div>
|
296 |
-
</
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
<i class="material-icons">enhanced_encryption</i><?php echo __('Encrypting Backup Data...', 'xcloner-backup-and-restore') ?>
|
302 |
|
303 |
-
|
304 |
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
|
|
318 |
|
319 |
-
|
320 |
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
|
|
339 |
class="material-icons">swap_horiz</i></a>
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
|
|
|
|
|
|
370 |
|
371 |
-
|
372 |
-
|
373 |
|
374 |
-
|
375 |
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
|
|
384 |
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
|
|
391 |
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
|
|
|
|
402 |
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
|
|
|
|
428 |
</div>
|
429 |
</div>
|
430 |
-
</
|
431 |
</div>
|
432 |
-
</
|
433 |
|
434 |
<!-- Error Modal Structure -->
|
435 |
<div id="error_modal" class="modal">
|
436 |
<a title="Online Help" href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank"><i
|
437 |
-
|
438 |
<div class="modal-content">
|
439 |
<h4 class="title_line"><span class="title"></span></h4>
|
440 |
<!--<h5 class="title_line"><?php echo __('Message') ?>: <span class="msg.old"></span></h5>-->
|
@@ -442,7 +479,8 @@ $tab = 1;
|
|
442 |
<textarea class="body" rows="5"></textarea>
|
443 |
</div>
|
444 |
<div class="modal-footer">
|
445 |
-
<a
|
|
|
446 |
</div>
|
447 |
</div>
|
448 |
|
@@ -466,34 +504,35 @@ $tab = 1;
|
|
466 |
<div class="modal-content">
|
467 |
<h4><?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore') ?></h4>
|
468 |
<p>
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
<option value="<?php echo $storage ?>"><?php echo $text ?></option>
|
480 |
-
|
481 |
-
|
482 |
|
483 |
-
|
484 |
-
|
485 |
-
|
|
|
486 |
class="material-icons">file_upload</i></submit>
|
|
|
487 |
</div>
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
</div>
|
495 |
-
|
496 |
-
<?php endif ?>
|
497 |
</p>
|
498 |
</div>
|
499 |
</form>
|
@@ -503,7 +542,13 @@ $tab = 1;
|
|
503 |
jQuery(function () {
|
504 |
|
505 |
jQuery('.col select').formSelect();
|
506 |
-
jQuery("select[required]").css({
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
jQuery(".backup-done .cloud-upload").on("click", function (e) {
|
508 |
//var xcloner_manage_backups = new Xcloner_Manage_Backups();
|
509 |
var hash = jQuery(this).attr('href');
|
@@ -513,9 +558,9 @@ $tab = 1;
|
|
513 |
xcloner_manage_backups.cloud_upload(id)
|
514 |
})
|
515 |
|
516 |
-
jQuery('#schedule_storage').on('change', function(){
|
517 |
jQuery('#delete_remote_storage').hide();
|
518 |
-
if(jQuery(this).val()) {
|
519 |
jQuery('#delete_remote_storage').show();
|
520 |
}
|
521 |
})
|
@@ -579,92 +624,94 @@ $tab = 1;
|
|
579 |
}
|
580 |
});
|
581 |
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
|
|
|
|
594 |
}
|
595 |
-
|
596 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
},
|
598 |
-
|
599 |
-
|
600 |
-
//alert("We have encountered a communication error with the server, please review the javascript console.");
|
601 |
-
var json = jQuery.parseJSON(err.data)
|
602 |
-
show_ajax_error("Error Loading Database Structure ", err.reason, json.xhr);
|
603 |
},
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
"
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
'method': 'POST',
|
631 |
-
'dataType': 'json',
|
632 |
-
'url': XCLONER_AJAXURL,
|
633 |
-
'data': function (node) {
|
634 |
-
var data = {
|
635 |
-
'action': 'get_file_system_action',
|
636 |
-
'id': node.id
|
637 |
}
|
638 |
-
|
639 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
},
|
641 |
-
|
642 |
-
|
643 |
-
//alert("We have encountered a communication error with the server, please review the javascript console.");
|
644 |
-
var json = jQuery.parseJSON(err.data)
|
645 |
-
show_ajax_error("Error Loading Files Structure ", err.reason, json.xhr);
|
646 |
},
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
"
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
"massload",
|
659 |
-
"search",
|
660 |
-
//"sort",
|
661 |
-
//"state",
|
662 |
-
"types",
|
663 |
-
"unique",
|
664 |
-
"wholerow"
|
665 |
-
]
|
666 |
-
});
|
667 |
});
|
668 |
-
|
669 |
-
|
670 |
-
</script>
|
6 |
$tab = 1;
|
7 |
?>
|
8 |
|
9 |
+
<div class="row">
|
10 |
+
<div class="col s12 l10">
|
11 |
+
<?php include_once(__DIR__ . "/xcloner_header.php")?>
|
12 |
+
</div>
|
13 |
+
<div class="col s12">
|
14 |
+
<ul class="nav-tab-wrapper content">
|
15 |
+
<li><a href="#backup_options"
|
16 |
+
class="nav-tab col s12 m3 l2 nav-tab-active"><?php echo $tab.". ".__('Backup Options', 'xcloner-backup-and-restore') ?></a>
|
17 |
+
</li>
|
18 |
+
<?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
|
19 |
+
<li><a href="#database_options"
|
20 |
+
class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Database Options', 'xcloner-backup-and-restore') ?></a>
|
21 |
+
</li>
|
22 |
+
<?php endif ?>
|
23 |
+
<li><a href="#files_options"
|
24 |
+
class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Files Options', 'xcloner-backup-and-restore') ?></a>
|
25 |
+
</li>
|
26 |
+
<li><a href="#generate_backup"
|
27 |
+
class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Generate Backup', 'xcloner-backup-and-restore') ?></a>
|
28 |
+
</li>
|
29 |
+
<li><a href="#schedule_backup"
|
30 |
+
class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Schedule Backup', 'xcloner-backup-and-restore') ?></a>
|
31 |
+
</li>
|
32 |
+
</ul>
|
33 |
+
|
34 |
+
<form action="" method="POST" id="generate_backup_form">
|
35 |
+
<div class="nav-tab-wrapper-content">
|
36 |
+
<!-- Backup Options Content Tab-->
|
37 |
+
<div id="backup_options" class="tab-content active">
|
38 |
+
|
39 |
+
<div class="row">
|
40 |
+
<div class="input-field col s12 m10 l10 right-align">
|
41 |
+
<a class="waves-effect waves-light btn" onclick="next_tab('#database_options');"><i
|
42 |
+
class="material-icons right">skip_next</i>Next</a>
|
43 |
+
</div>
|
44 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
+
<div class="row">
|
47 |
+
<div class="input-field inline col s12 m10 l6">
|
48 |
+
<i class="material-icons prefix">input</i>
|
49 |
+
<input name="backup_name" id="backup_name" type="text"
|
50 |
+
value=<?php echo $xcloner_settings->get_default_backup_name() ?>>
|
51 |
+
<label
|
52 |
+
for="backup_name"><?php echo __('Backup Name', 'xcloner-backup-and-restore') ?></label>
|
53 |
+
</div>
|
54 |
+
<div class="hide-on-small-only m2">
|
55 |
+
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
56 |
+
data-tooltip="<?php echo __('The default backup name, supported tags [time], [hostname], [domain]', 'xcloner-backup-and-restore') ?>"
|
57 |
+
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
|
61 |
+
<div class="row">
|
62 |
+
<div class="input-field inline col s12 m10 l6">
|
63 |
+
<i class="material-icons prefix">email</i>
|
64 |
+
<input name="email_notification" id="email_notification" type="text"
|
65 |
+
value="<?php echo get_option('admin_email'); ?>">
|
66 |
+
<label
|
67 |
+
for="email_notification"><?php echo __('Send Email Notification To', 'xcloner-backup-and-restore') ?></label>
|
68 |
+
</div>
|
69 |
+
<div class="hide-on-small-only m2">
|
70 |
+
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
71 |
+
data-tooltip="<?php echo __('If left blank, no notification will be sent', 'xcloner-backup-and-restore') ?>"
|
72 |
+
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
|
76 |
+
<div class="row">
|
77 |
+
<div class="input-field inline col s10 m10 l6">
|
78 |
+
<i class="material-icons prefix">access_time</i>
|
79 |
+
<input type="text" id="diff_start_date" class="datepicker_max_today" name="diff_start_date">
|
80 |
+
<label
|
81 |
+
for="diff_start_date"><?php echo __('Backup Only Files Modified/Created After', 'xcloner-backup-and-restore') ?></label>
|
82 |
+
</div>
|
83 |
+
<div class="hide-on-small-only m2">
|
84 |
+
<a class="btn-floating tooltipped btn-small" data-html="true" data-position="center"
|
85 |
+
data-delay="50"
|
86 |
+
data-tooltip="<?php echo __("This option allows you to create a differential backup that will include only <br> changed files since the set date, leave blank to include all files", "xcloner-backup-and-restore") ?>"><i
|
87 |
+
class="material-icons">help_outline</i></a>
|
88 |
+
</div>
|
89 |
</div>
|
|
|
90 |
|
91 |
+
<div class="row">
|
92 |
+
<div class="input-field col s6 m5 l4">
|
93 |
+
<i class="material-icons prefix">enhanced_encryption</i>
|
94 |
+
<label
|
95 |
+
for="backup_comments"><?php echo __('Encrypt Backup', 'xcloner-backup-and-restore') ?></label>
|
|
|
96 |
|
97 |
+
</div>
|
98 |
+
<div class="input-field col s6 m5 l2">
|
99 |
+
<div class="switch">
|
100 |
+
<label>
|
101 |
+
Off
|
102 |
+
<input type="checkbox" name="backup_encrypt" id="backup_encrypt" value="1">
|
103 |
+
<span class="lever"></span>
|
104 |
+
On
|
105 |
+
</label>
|
106 |
+
</div>
|
107 |
+
</div>
|
|
|
108 |
|
109 |
+
<div class="hide-on-small-only s12 m2">
|
110 |
+
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
111 |
+
data-tooltip="<?php echo __('Enable this option if you want to encrypt the final backup', 'xcloner-backup-and-restore') ?>"
|
112 |
+
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
|
116 |
+
<div class="row">
|
117 |
+
<div class="input-field col s12 m10 l6">
|
118 |
+
<i class="material-icons prefix">input</i>
|
119 |
+
<textarea name="backup_comments" id="backup_comments"
|
120 |
+
class="materialize-textarea"></textarea>
|
121 |
+
<label
|
122 |
+
for="backup_comments"><?php echo __('Backup Comments', 'xcloner-backup-and-restore') ?></label>
|
123 |
+
</div>
|
124 |
+
<div class="hide-on-small-only m2">
|
125 |
+
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
126 |
+
data-tooltip="<?php echo __('Some default backup comments that will be stored inside the backup archive', 'xcloner-backup-and-restore') ?>"
|
127 |
+
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
|
131 |
+
<?php if (sizeof($available_storages)): ?>
|
132 |
+
|
133 |
+
<div class="row">
|
134 |
+
<div class="input-field col s12 m10 l6">
|
135 |
+
<i class="material-icons prefix">swap_horiz</i>
|
136 |
+
<select name="schedule_storage" id="schedule_storage" class="schedule_storage validate">
|
137 |
+
<option value="" selected><?php echo __('none', 'xcloner-backup-and-restore') ?>
|
138 |
+
</option>
|
139 |
<?php foreach ($available_storages as $storage => $text): ?>
|
140 |
+
<option value="<?php echo $storage ?>"><?php echo $text ?></option>
|
141 |
<?php endforeach ?>
|
142 |
</select>
|
143 |
<label><?php echo __('Send To Remote Storage', 'xcloner-backup-and-restore') ?></label>
|
144 |
+
</div>
|
145 |
+
<div class="hide-on-small-only m2">
|
146 |
+
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
147 |
+
data-tooltip="<?php echo __('Transfer backup to the remote storage destintion once finished.', 'xcloner-backup-and-restore') ?>"
|
148 |
+
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
149 |
+
</div>
|
150 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
+
<div class="row" id="delete_remote_storage" style="display:none">
|
153 |
+
<div class="input-field col s6 m5 l4">
|
154 |
+
<i class="material-icons prefix">delete</i>
|
155 |
+
<label
|
156 |
+
for="backup_comments"><?php echo __('Delete local copy after transfer', 'xcloner-backup-and-restore') ?></label>
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
</div>
|
159 |
+
<div class="input-field col s6 m5 l2">
|
160 |
+
<div class="switch">
|
161 |
+
<label>
|
162 |
+
Off
|
163 |
+
<input type="checkbox" name="backup_delete_after_remote_transfer"
|
164 |
+
id="backup_delete_after_remote_transfer" value="1">
|
165 |
+
<span class="lever"></span>
|
166 |
+
On
|
167 |
+
</label>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
|
171 |
+
<div class="hide-on-small-only s12 m2">
|
172 |
+
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
173 |
+
data-tooltip="<?php echo __('Delete local backup file after transfer', 'xcloner-backup-and-restore') ?>"
|
174 |
+
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
175 |
+
</div>
|
176 |
</div>
|
177 |
+
<?php endif ?>
|
|
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
|
|
|
|
|
|
|
|
|
|
|
180 |
</div>
|
181 |
|
182 |
+
<?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
|
183 |
+
<div id="database_options" class="tab-content">
|
184 |
+
<div class="row">
|
185 |
+
<div class="input-field col s12 m10 l10 right-align">
|
186 |
+
<a class="waves-effect waves-light btn" onclick="next_tab('#files_options');"><i
|
187 |
class="material-icons right">skip_next</i>Next</a>
|
188 |
+
</div>
|
189 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
|
191 |
+
<h2><?php echo __('Select database data to include in the backup', 'xcloner-backup-and-restore') ?>:
|
192 |
+
<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50"
|
193 |
+
data-tooltip="<?php echo __('Enable the \'Backup only WP tables\' setting if you don\'t want to show all other databases and tables not related to this Wordpress install', 'xcloner-backup-and-restore'); ?>"
|
194 |
+
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
195 |
+
</h2>
|
196 |
+
|
197 |
+
<!-- database/tables tree -->
|
198 |
+
<div class="row">
|
199 |
+
<div class="col s12 l6">
|
200 |
+
<div id="jstree_database_container"></div>
|
201 |
+
</div>
|
202 |
+
</div>
|
203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
</div>
|
205 |
+
<?php endif ?>
|
|
|
|
|
|
|
|
|
206 |
|
207 |
+
<div id="files_options" class="tab-content">
|
208 |
+
<div class="row">
|
209 |
+
<div class="input-field col s12 m10 l10 right-align">
|
210 |
+
<a class="waves-effect waves-light btn" onclick="next_tab('#generate_backup');"><i
|
211 |
+
class="material-icons right">skip_next</i>Next</a>
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
|
215 |
+
<h2><?php echo __('Select from below the files/folders you want to exclude from your Backup Archive', 'xcloner-backup-and-restore') ?>
|
216 |
+
:
|
217 |
+
<a class="btn-floating tooltipped btn-small" data-position="bottom" data-delay="50"
|
218 |
+
data-html="true"
|
219 |
+
data-tooltip="<?php echo __('You can navigate below through all your site structure(Backup Start Location) to exclude any file/folder you need by clicking the checkbox near it. <br />If the checkobx is disabled, then it matches a Regex Exclude File option and it can\'t be unchecked', 'xcloner-backup-and-restore'); ?>"
|
220 |
+
data-tooltip-id=""><i class="material-icons">help_outline</i></a>
|
221 |
+
</h2>
|
222 |
+
|
223 |
+
<!-- Files System Container -->
|
224 |
+
<div class="row">
|
225 |
+
<div class="col s12 l6">
|
226 |
+
<div id="jstree_files_container"></div>
|
227 |
+
</div>
|
228 |
+
</div>
|
229 |
|
230 |
+
</div>
|
231 |
+
<div id="generate_backup" class="tab-content">
|
232 |
+
<div class="row ">
|
233 |
+
<div class="col s12 l10 action-buttons right-align">
|
234 |
+
<a class="waves-effect waves-light btn-large teal darken-1 start"
|
235 |
+
onclick="xcloner_backup.start_backup()">Start Backup<i
|
236 |
+
class="material-icons left">forward</i></a>
|
237 |
+
<a class="waves-effect waves-light btn-large teal darken-1 restart"
|
238 |
+
onclick="xcloner_backup.restart_backup()">Restart Backup<i
|
239 |
+
class="material-icons left">cached</i></a>
|
240 |
+
<a class="waves-effect waves-light btn-large red darken-1 cancel"
|
241 |
+
onclick="xcloner_backup.cancel_backup()">Cancel Backup<i
|
242 |
+
class="material-icons left">cancel</i></a>
|
243 |
+
</div>
|
244 |
+
<div class="col l10 s12">
|
245 |
+
<ul class="backup-status collapsible collapsible-accordion" data-collapsible="accordion">
|
246 |
+
<li class="file-system">
|
247 |
+
<div class="collapsible-header">
|
248 |
+
<i
|
249 |
+
class="material-icons">folder</i><?php echo __('Scanning The File System...', 'xcloner-backup-and-restore') ?>
|
250 |
+
|
251 |
+
<p class="right">
|
252 |
+
<?php echo sprintf(__('Found %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span class="file-size-total">0</span>MB') ?>
|
253 |
+
</p>
|
254 |
+
|
255 |
+
<div>
|
256 |
+
<p class="right"><span class="last-logged-file"></span></p>
|
257 |
+
</div>
|
258 |
|
259 |
+
<div class="progress">
|
260 |
+
<div class="indeterminate"></div>
|
261 |
+
</div>
|
262 |
</div>
|
263 |
+
<div class="collapsible-body status-body"></div>
|
264 |
+
</li>
|
265 |
+
<?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
|
266 |
+
<li class="database-backup">
|
267 |
+
<div class="collapsible-header">
|
268 |
+
<i
|
269 |
+
class="material-icons">storage</i><?php echo __('Generating the Mysql Backup...', 'xcloner-backup-and-restore') ?>
|
270 |
+
|
271 |
+
<p class="right">
|
272 |
+
<?php echo sprintf(__('Found %s tables in %s databases (%s)', 'xcloner-backup-and-restore'), '<span class="table-counter">0</span>', '<span class="database-counter">0</span>', '<span data-processed="0" class="total-records">0</span> records', 'xcloner-backup-and-restore') ?>
|
273 |
+
</p>
|
274 |
+
|
275 |
+
<div>
|
276 |
+
<p class="right"><span class="last-logged-table"></span></p>
|
277 |
+
</div>
|
278 |
|
279 |
+
<div class="progress">
|
280 |
+
<div class="determinate" style="width:0%"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
</div>
|
282 |
+
</div>
|
283 |
+
<div class="collapsible-body status-body">
|
284 |
+
<div class="row">
|
285 |
+
<div class="col l7 s12">
|
286 |
+
<ul class="logged-tables"></ul>
|
287 |
+
</div>
|
288 |
+
<div class="col l5 s12">
|
289 |
+
<ul class="logged-databases right"></ul>
|
290 |
+
</div>
|
291 |
</div>
|
292 |
</div>
|
293 |
+
</li>
|
294 |
+
<?php endif ?>
|
295 |
+
<li class="files-backup">
|
296 |
+
<div class="collapsible-header">
|
297 |
+
<i
|
298 |
+
class="material-icons">archive</i><?php echo __('Adding Files to Archive...', 'xcloner-backup-and-restore') ?>
|
299 |
+
|
300 |
+
<p class="right">
|
301 |
+
<?php echo sprintf(__('Adding %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span data-processed="0" class="file-size-total">0</span>MB') ?>
|
302 |
+
</p>
|
303 |
+
|
304 |
+
<div>
|
305 |
+
<p class="right"><span class="last-logged-file"></span></p>
|
306 |
+
</div>
|
307 |
+
|
308 |
+
<div class="progress">
|
309 |
+
<div class="determinate" style="width:0%"></div>
|
310 |
+
</div>
|
|
|
|
|
|
|
311 |
</div>
|
312 |
+
<div class="collapsible-body status-body">
|
313 |
+
<div class="row">
|
314 |
+
<div class="col l3 s12">
|
315 |
+
<h2><?php echo __("Backup Parts", 'xcloner-backup-and-restore') ?>:
|
316 |
+
</h2>
|
317 |
+
</div>
|
318 |
+
<div class="col l9 s12">
|
319 |
+
<ul class="backup-name"></ul>
|
320 |
+
</div>
|
321 |
+
</div>
|
322 |
</div>
|
323 |
+
</li>
|
324 |
+
<li class="backup-encryption">
|
325 |
+
<div class="collapsible-header">
|
326 |
+
<i
|
327 |
+
class="material-icons">enhanced_encryption</i><?php echo __('Encrypting Backup Data...', 'xcloner-backup-and-restore') ?>
|
|
|
328 |
|
329 |
+
<p class="right"><span class="status"></span></p>
|
330 |
|
331 |
+
<div>
|
332 |
+
<p class="right"><span class="last-logged-file"></span></p>
|
333 |
+
</div>
|
334 |
|
335 |
+
<div class="progress">
|
336 |
+
<div class="determinate" style="width:0%"></div>
|
337 |
+
</div>
|
338 |
+
</div>
|
339 |
+
<div class="collapsible-body status-body"></div>
|
340 |
+
</li>
|
341 |
+
<li class="remote-storage-transfer">
|
342 |
+
<div class="collapsible-header">
|
343 |
+
<i
|
344 |
+
class="material-icons">swap_horiz</i><?php echo __('Transferrring backup to remote storage...', 'xcloner-backup-and-restore') ?>
|
345 |
|
346 |
+
<p class="right"><span class="status"></span></p>
|
347 |
|
348 |
+
<div>
|
349 |
+
<p class="right"><span class="last-logged-file"></span></p>
|
350 |
+
</div>
|
351 |
|
352 |
+
<div class="progress">
|
353 |
+
<div class="indeterminate"></div>
|
354 |
+
</div>
|
355 |
+
</div>
|
356 |
+
<div class="collapsible-body status-body"></div>
|
357 |
+
</li>
|
358 |
+
<li class="backup-done">
|
359 |
+
<div class="collapsible-header">
|
360 |
+
<i
|
361 |
+
class="material-icons">done</i><?php echo __('Backup Done', 'xcloner-backup-and-restore') ?>
|
362 |
+
|
363 |
+
<p class="right">
|
364 |
+
<?php if (sizeof($available_storages)): ?>
|
365 |
+
<a href="#" class="cloud-upload"
|
366 |
+
title="<?php echo __("Send Backup To Remote Storage", 'xcloner-backup-and-restore') ?>"><i
|
367 |
class="material-icons">swap_horiz</i></a>
|
368 |
+
<?php endif ?>
|
369 |
+
<a href="#" class="download"
|
370 |
+
title="<?php echo __("Download Backup", 'xcloner-backup-and-restore') ?>"><i
|
371 |
+
class="material-icons">file_download</i></a>
|
372 |
+
<a href="#" class="list-backup-content"
|
373 |
+
title="<?php echo __("List Backup Content", 'xcloner-backup-and-restore') ?>"><i
|
374 |
+
class="material-icons">folder_open</i></a>
|
375 |
+
</p>
|
376 |
+
<div class="clear"></div>
|
377 |
+
<div class="progress">
|
378 |
+
<div class="determinate" style="width:100%"></div>
|
379 |
+
</div>
|
380 |
|
381 |
+
</div>
|
382 |
+
<div class="collapsible-body center-align">
|
383 |
+
<div class="row">
|
384 |
+
<h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore') ?>
|
385 |
+
</h5>
|
386 |
+
<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore/reviews/" target="_blank">Wordpress XCloner Reviews Section</a>') ?>
|
387 |
+
</h6>
|
388 |
+
<a class="twitter-follow-button" href="https://twitter.com/WatchfulDashbrd"
|
389 |
+
data-show-count="false">Follow @WatchfulDashbrd</a>
|
390 |
+
<script src="//platform.twitter.com/widgets.js" async="" charset="utf-8">
|
391 |
+
</script>
|
392 |
+
|
393 |
+
<br />
|
394 |
+
<!-- XCLONER SPONSORS AREA-->
|
395 |
+
<!-- END XCLONER SPONSORS AREA-->
|
396 |
+
</div>
|
397 |
+
</div>
|
398 |
+
</li>
|
399 |
+
</ul>
|
400 |
+
</div>
|
401 |
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
|
405 |
+
<div id="schedule_backup" class="tab-content">
|
406 |
|
407 |
+
<div class="row">
|
408 |
+
<div id="schedule_backup_success"
|
409 |
+
class="col s12 l6 updated settings-error notice is-dismissible">
|
410 |
+
<p><strong><?php echo __('Schedule Saved', 'xcloner-backup-and-restore') ?></strong></p>
|
411 |
+
<button type="button" class="notice-dismiss"><span
|
412 |
+
class="screen-reader-text"><?php echo __('(Dismiss this notice.', 'xcloner-backup-and-restore') ?></span>
|
413 |
+
</button>
|
414 |
+
</div>
|
415 |
+
</div>
|
416 |
|
417 |
+
<div class="row">
|
418 |
+
<div class="input-field inline col s12 l7">
|
419 |
+
<input type="text" id="schedule_name" class="" name="schedule_name" required>
|
420 |
+
<label
|
421 |
+
for="schedule_name"><?php echo __('Profile Name', 'xcloner-backup-and-restore') ?></label>
|
422 |
+
</div>
|
423 |
+
</div>
|
424 |
|
425 |
+
<div class="row">
|
426 |
+
<div class="input-field inline col s12 m8 l4">
|
427 |
+
<input type="text" id="datepicker" class="datepicker" name="schedule_start_date">
|
428 |
+
<label
|
429 |
+
for="datepicker"><?php echo __('Schedule Backup To Start On:', 'xcloner-backup-and-restore') ?></label>
|
430 |
+
</div>
|
431 |
+
<div class="input-field inline col s12 m4 l3">
|
432 |
+
<input id="timepicker_ampm_dark" class="timepicker" type="text" name="schedule_start_time">
|
433 |
+
<label
|
434 |
+
for="timepicker_ampm_dark"><?php echo __('At:', 'xcloner-backup-and-restore') ?></label>
|
435 |
+
</div>
|
436 |
+
</div>
|
437 |
|
438 |
+
<div class="row">
|
439 |
+
<div class="input-field col s12 l7">
|
440 |
+
<select name="schedule_frequency" id="schedule_frequency" class="validate" required>
|
441 |
+
<option value="" disabled selected>
|
442 |
+
<?php echo __('please select', 'xcloner-backup-and-restore') ?></option>
|
443 |
+
<?php
|
444 |
+
$schedules = $xcloner_scheduler->get_available_intervals();
|
445 |
+
|
446 |
+
foreach ($schedules as $key => $schedule) {
|
447 |
+
?>
|
448 |
+
<option value="<?php echo $key ?>"><?php echo $schedule['display'] ?></option>
|
449 |
+
<?php
|
450 |
+
}
|
451 |
+
?>
|
452 |
+
</select>
|
453 |
+
<label><?php echo __('Schedule Frequency', 'xcloner-backup-and-restore') ?></label>
|
454 |
+
</div>
|
455 |
+
</div>
|
456 |
|
457 |
+
<div class="row">
|
458 |
+
<div class="col s12 l7">
|
459 |
+
<button class="right btn waves-effect waves-light submit_schedule" type="submit"
|
460 |
+
name="action"><?php echo __("Save Schedule", 'xcloner-backup-and-restore') ?>
|
461 |
+
<i class="material-icons right">send</i>
|
462 |
+
</button>
|
463 |
+
</div>
|
464 |
+
</div>
|
465 |
</div>
|
466 |
</div>
|
467 |
+
</form>
|
468 |
</div>
|
469 |
+
</div>
|
470 |
|
471 |
<!-- Error Modal Structure -->
|
472 |
<div id="error_modal" class="modal">
|
473 |
<a title="Online Help" href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank"><i
|
474 |
+
class="material-icons medium right">help</i></a>
|
475 |
<div class="modal-content">
|
476 |
<h4 class="title_line"><span class="title"></span></h4>
|
477 |
<!--<h5 class="title_line"><?php echo __('Message') ?>: <span class="msg.old"></span></h5>-->
|
479 |
<textarea class="body" rows="5"></textarea>
|
480 |
</div>
|
481 |
<div class="modal-footer">
|
482 |
+
<a
|
483 |
+
class=" modal-action modal-close waves-effect waves-green btn-flat red darken-2"><?php echo __('Close', 'xcloner-backup-and-restore') ?></a>
|
484 |
</div>
|
485 |
</div>
|
486 |
|
504 |
<div class="modal-content">
|
505 |
<h4><?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore') ?></h4>
|
506 |
<p>
|
507 |
+
<?php if (sizeof($available_storages)): ?>
|
508 |
+
<div class="row">
|
509 |
+
<div class="col s12 label">
|
510 |
+
<label><?php echo __(sprintf('Send %s to remote storage', "<span class='backup_name'></span>"), 'xcloner-backup-and-restore') ?></label>
|
511 |
+
</div>
|
512 |
+
<div class="input-field col s8 m10">
|
513 |
+
<select name="transfer_storage" id="transfer_storage" class="validate" required>
|
514 |
+
<option value="" selected><?php echo __('please select...', 'xcloner-backup-and-restore') ?>
|
515 |
+
</option>
|
516 |
+
<?php foreach ($available_storages as $storage => $text): ?>
|
517 |
<option value="<?php echo $storage ?>"><?php echo $text ?></option>
|
518 |
+
<?php endforeach ?>
|
519 |
+
</select>
|
520 |
|
521 |
+
</div>
|
522 |
+
<div class="s4 m2 right">
|
523 |
+
<button type="submit"
|
524 |
+
class="upload-submit btn-floating btn-large waves-effect waves-light teal"><i
|
525 |
class="material-icons">file_upload</i></submit>
|
526 |
+
</div>
|
527 |
</div>
|
528 |
+
<div class="row status">
|
529 |
+
<?php echo __("Uploading backup to the selected remote storage...", 'xcloner-backup-and-restore') ?>
|
530 |
+
<span class="status-text"></span>
|
531 |
+
<div class="progress">
|
532 |
+
<div class="indeterminate"></div>
|
533 |
+
</div>
|
534 |
</div>
|
535 |
+
<?php endif ?>
|
|
|
536 |
</p>
|
537 |
</div>
|
538 |
</form>
|
542 |
jQuery(function () {
|
543 |
|
544 |
jQuery('.col select').formSelect();
|
545 |
+
jQuery("select[required]").css({
|
546 |
+
display: "block",
|
547 |
+
height: 0,
|
548 |
+
padding: 0,
|
549 |
+
width: 0,
|
550 |
+
position: 'absolute'
|
551 |
+
});
|
552 |
jQuery(".backup-done .cloud-upload").on("click", function (e) {
|
553 |
//var xcloner_manage_backups = new Xcloner_Manage_Backups();
|
554 |
var hash = jQuery(this).attr('href');
|
558 |
xcloner_manage_backups.cloud_upload(id)
|
559 |
})
|
560 |
|
561 |
+
jQuery('#schedule_storage').on('change', function () {
|
562 |
jQuery('#delete_remote_storage').hide();
|
563 |
+
if (jQuery(this).val()) {
|
564 |
jQuery('#delete_remote_storage').show();
|
565 |
}
|
566 |
})
|
624 |
}
|
625 |
});
|
626 |
|
627 |
+
<?php if ($xcloner_settings->get_enable_mysql_backup()): ?>
|
628 |
+
jQuery('#jstree_database_container').jstree({
|
629 |
+
'core': {
|
630 |
+
'check_callback': true,
|
631 |
+
'data': {
|
632 |
+
'method': 'POST',
|
633 |
+
'dataType': 'json',
|
634 |
+
'url': XCLONER_AJAXURL,
|
635 |
+
'data': function (node) {
|
636 |
+
var data = {
|
637 |
+
'action': 'get_database_tables_action',
|
638 |
+
'id': node.id
|
639 |
+
}
|
640 |
+
return data;
|
641 |
}
|
642 |
+
},
|
643 |
+
|
644 |
+
'error': function (err) {
|
645 |
+
//alert("We have encountered a communication error with the server, please review the javascript console.");
|
646 |
+
var json = jQuery.parseJSON(err.data)
|
647 |
+
show_ajax_error("Error Loading Database Structure ", err.reason, json.xhr);
|
648 |
+
},
|
649 |
+
|
650 |
+
'strings': {
|
651 |
+
'Loading ...': 'Loading the database structure...'
|
652 |
+
},
|
653 |
+
'themes': {
|
654 |
+
"variant": "default"
|
655 |
+
},
|
656 |
},
|
657 |
+
'checkbox': {
|
658 |
+
three_state: true
|
|
|
|
|
|
|
659 |
},
|
660 |
+
'plugins': [
|
661 |
+
"checkbox",
|
662 |
+
"massload",
|
663 |
+
"search",
|
664 |
+
//"sort",
|
665 |
+
//"state",
|
666 |
+
"types",
|
667 |
+
"unique",
|
668 |
+
"wholerow"
|
669 |
+
]
|
670 |
+
});
|
671 |
+
<?php endif ?>
|
672 |
+
|
673 |
+
jQuery('#jstree_files_container').jstree({
|
674 |
+
'core': {
|
675 |
+
'check_callback': true,
|
676 |
+
'data': {
|
677 |
+
'method': 'POST',
|
678 |
+
'dataType': 'json',
|
679 |
+
'url': XCLONER_AJAXURL,
|
680 |
+
'data': function (node) {
|
681 |
+
var data = {
|
682 |
+
'action': 'get_file_system_action',
|
683 |
+
'id': node.id
|
684 |
+
}
|
685 |
+
return data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
}
|
687 |
+
},
|
688 |
+
|
689 |
+
'error': function (err) {
|
690 |
+
//alert("We have encountered a communication error with the server, please review the javascript console.");
|
691 |
+
var json = jQuery.parseJSON(err.data)
|
692 |
+
show_ajax_error("Error Loading Files Structure ", err.reason, json.xhr);
|
693 |
+
},
|
694 |
+
|
695 |
+
'strings': {
|
696 |
+
'Loading ...': 'Loading the database structure...'
|
697 |
+
},
|
698 |
+
'themes': {
|
699 |
+
"variant": "default"
|
700 |
+
},
|
701 |
},
|
702 |
+
'checkbox': {
|
703 |
+
three_state: true
|
|
|
|
|
|
|
704 |
},
|
705 |
+
'plugins': [
|
706 |
+
"checkbox",
|
707 |
+
"massload",
|
708 |
+
"search",
|
709 |
+
//"sort",
|
710 |
+
//"state",
|
711 |
+
"types",
|
712 |
+
"unique",
|
713 |
+
"wholerow"
|
714 |
+
]
|
715 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
716 |
});
|
717 |
+
</script>
|
|
|
|
admin/partials/xcloner_header.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<a href="https://www.xcloner.com" target="_blank" title="XCloner.com">
|
2 |
+
<img src="<?=plugin_dir_url((__DIR__))?>/images/xcloner-logo.svg" class="xcloner-logo"
|
3 |
+
alt="XCloner backup and restore plugin" />
|
4 |
+
</a>
|
5 |
+
<!-- Dropdown Trigger -->
|
6 |
+
<h1 class="xcloner-menu dropdown-trigger btn" href="#" data-target="dropdown1">
|
7 |
+
<?= esc_html(get_admin_page_title()); ?><i class="material-icons">expand_more</i>
|
8 |
+
</h1>
|
9 |
+
|
10 |
+
<!-- Dropdown Structure -->
|
11 |
+
<ul id="dropdown1" class="xcloner-menu dropdown-content" style="width: 250px">
|
12 |
+
<li>
|
13 |
+
<a href="<?=menu_page_url('xcloner_init_page', false)?>"><i
|
14 |
+
class="material-icons">dashboard</i><?=__('Dashboard', 'xcloner-backup-and-restore')?></a>
|
15 |
+
</li>
|
16 |
+
<li>
|
17 |
+
<a href="<?=menu_page_url('xcloner_settings_page', false)?>"><i
|
18 |
+
class="material-icons">settings</i><?=__('Settings', 'xcloner-backup-and-restore')?></a>
|
19 |
+
</li>
|
20 |
+
<li class="divider" tabindex="-1"></li>
|
21 |
+
<li>
|
22 |
+
<a href="<?=menu_page_url('xcloner_remote_storage_page', false)?>"><i
|
23 |
+
class="material-icons">swap_horiz</i><?=__('Storage Locations', 'xcloner-backup-and-restore')?></a>
|
24 |
+
</li>
|
25 |
+
<li>
|
26 |
+
<a href="<?=menu_page_url('xcloner_scheduled_backups_page', false)?>"><i
|
27 |
+
class="material-icons">schedule</i><?=__('Schedules & Profiles', 'xcloner-backup-and-restore')?></a>
|
28 |
+
</li>
|
29 |
+
<li>
|
30 |
+
<a href="<?=menu_page_url('xcloner_manage_backups_page', false)?>"><i
|
31 |
+
class="material-icons">archive</i><?=__('Manage Backups', 'xcloner-backup-and-restore')?></a>
|
32 |
+
</li>
|
33 |
+
<li>
|
34 |
+
<a href="<?=menu_page_url('xcloner_generate_backups_page', false)?>"><i
|
35 |
+
class="material-icons">create</i><?=__('Generate Backups', 'xcloner-backup-and-restore')?></a>
|
36 |
+
</li>
|
37 |
+
<li>
|
38 |
+
<a href="<?=menu_page_url('xcloner_restore_page', false)?>"><i
|
39 |
+
class="material-icons">restore</i><?=__('Restore Backups', 'xcloner-backup-and-restore')?></a>
|
40 |
+
</li>
|
41 |
+
</ul>
|
42 |
+
|
43 |
+
<script>
|
44 |
+
jQuery(".dropdown-trigger").dropdown({
|
45 |
+
constrainWidth: true
|
46 |
+
});
|
47 |
+
</script>
|
admin/partials/xcloner_init_page.php
CHANGED
@@ -33,52 +33,52 @@ if ($requirements->check_backup_ready_status()) {
|
|
33 |
|
34 |
<div class="row">
|
35 |
<div class="col s12">
|
36 |
-
|
37 |
-
<?php echo __('Backup Dashboard', 'xcloner-backup-and-restore') ?>
|
38 |
-
</h5>
|
39 |
</div>
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
<?php if (isset($latest_backup['timestamp'])
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
<?php endif ?>
|
52 |
|
53 |
-
<?php if (
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
<?php endif ?>
|
63 |
|
64 |
-
<?php
|
65 |
-
<div id="setting-error-" class="error settings-error notice is-dismissible">
|
66 |
-
<p><strong>
|
67 |
-
<?php echo __('Backup system not ready, please check and fix the issues marked in red', 'xcloner-backup-and-restore') ?>
|
68 |
-
</strong>
|
69 |
-
</p>
|
70 |
-
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
|
71 |
-
</button>
|
72 |
</div>
|
|
|
73 |
|
74 |
-
<?php endif ?>
|
75 |
|
76 |
|
77 |
<!-- This file should primarily consist of HTML with a little bit of PHP. -->
|
78 |
<div class="row dashboard">
|
79 |
<div class="col s12 m12 l7">
|
80 |
|
81 |
-
<div class="
|
82 |
|
83 |
<ul class="collapsible xcloner-debugger" data-collapsible="accordion">
|
84 |
|
@@ -89,47 +89,49 @@ if ($requirements->check_backup_ready_status()) {
|
|
89 |
<div class="">
|
90 |
<h5><?php echo __("Latest Backup", 'xcloner-backup-and-restore') ?></h5>
|
91 |
<blockquote>
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
</div>
|
97 |
-
<?php echo $latest_backup['basename'] ?>
|
98 |
</div>
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
</div>
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
110 |
echo date($date_format." ".$time_format, $latest_backup['timestamp'] + (get_option('gmt_offset') * HOUR_IN_SECONDS))
|
111 |
?>
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
|
|
118 |
</blockquote>
|
119 |
<div>
|
120 |
<h5><?php echo __("Backup Storage Usage", 'xcloner-backup-and-restore') ?></h5>
|
121 |
<blockquote>
|
122 |
<div class="item">
|
123 |
-
<div class="title"
|
|
|
124 |
:
|
125 |
</div>
|
126 |
-
|
127 |
</div>
|
128 |
</blockquote>
|
129 |
<h5><?php echo __("Next Scheduled Backup", 'xcloner-backup-and-restore') ?></h5>
|
130 |
<blockquote>
|
131 |
<div class="item">
|
132 |
-
|
133 |
$list = ($xcloner_scheduler->get_next_run_schedule());
|
134 |
|
135 |
if (is_array($list)) {
|
@@ -140,18 +142,20 @@ if ($requirements->check_backup_ready_status()) {
|
|
140 |
$latest_schedule = $list[0];
|
141 |
}
|
142 |
?>
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
149 |
</div>
|
150 |
<div class="item">
|
151 |
-
<div class="title"
|
|
|
152 |
:
|
153 |
</div>
|
154 |
-
|
155 |
echo date($date_format." ".$time_format, $latest_schedule->next_run_time);
|
156 |
} else {
|
157 |
echo __("Unscheduled", 'xcloner-backup-and-restore');
|
@@ -163,33 +167,34 @@ if ($requirements->check_backup_ready_status()) {
|
|
163 |
</div>
|
164 |
</li>
|
165 |
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
</
|
176 |
</div>
|
177 |
-
|
178 |
-
|
179 |
-
|
|
|
180 |
} ?></div>
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
getXclonerLog();
|
189 |
}, 2000);*/
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
|
194 |
</ul>
|
195 |
|
@@ -203,72 +208,80 @@ if ($requirements->check_backup_ready_status()) {
|
|
203 |
<div class="card-content white-text">
|
204 |
<span class="card-title"><?php echo __("System Check", 'xcloner-backup-and-restore') ?></span>
|
205 |
<ul>
|
206 |
-
<li
|
207 |
-
|
208 |
-
|
|
|
209 |
</li>
|
210 |
-
<li
|
211 |
-
|
212 |
-
|
|
|
213 |
</li>
|
214 |
-
<li
|
215 |
-
|
216 |
-
|
|
|
217 |
</li>
|
218 |
|
219 |
-
<li
|
220 |
-
|
|
|
221 |
: <?php echo $requirements->check_min_php_version(); ?>
|
222 |
( >= <?php echo $requirements->get_constant('min_php_version') ?>)
|
223 |
</li>
|
224 |
-
<li
|
225 |
-
|
|
|
226 |
: <?php echo $requirements->check_safe_mode(); ?>
|
227 |
( <?php echo $requirements->get_constant('safe_mode') ?>)
|
228 |
</li>
|
229 |
-
<li
|
230 |
-
|
231 |
-
|
|
|
|
|
232 |
</li>
|
233 |
</ul>
|
234 |
<ul class="additional_system_info">
|
235 |
<li class="card-panel grey darken-1">
|
236 |
-
|
237 |
: <?php echo $requirements->get_max_execution_time(); ?>
|
238 |
</li>
|
239 |
<li class="card-panel grey darken-1">
|
240 |
-
|
241 |
: <?php echo $requirements->get_memory_limit(); ?>
|
242 |
</li>
|
243 |
<li class="card-panel grey darken-1">
|
244 |
-
|
245 |
: <?php echo $requirements->get_open_basedir(); ?>
|
246 |
</li>
|
247 |
-
|
248 |
$data = array();
|
249 |
if ($requirements->check_backup_ready_status()) {
|
250 |
$data = $xcloner_file_system->estimate_read_write_time();
|
251 |
}
|
252 |
?>
|
253 |
<li class="card-panel grey darken-1">
|
254 |
-
|
255 |
: <?php echo(isset($data['reading_time']) ? $data['reading_time'] : __("unknown")); ?>
|
256 |
</li>
|
257 |
<li class="card-panel grey darken-1">
|
258 |
-
|
259 |
: <?php echo(isset($data['writing_time']) ? $data['writing_time'] : __("unknown")); ?>
|
260 |
</li>
|
261 |
<li class="card-panel grey darken-1">
|
262 |
-
|
263 |
: <?php echo $requirements->get_free_disk_space(); ; ?>
|
264 |
</li>
|
265 |
</ul>
|
266 |
</div>
|
267 |
<div class="card-action">
|
268 |
-
<a class="waves-effect waves-light btn system_info_toggle blue darken-1"><i
|
|
|
269 |
</a>
|
270 |
</div>
|
271 |
</div>
|
272 |
|
273 |
</div>
|
274 |
-
</div>
|
33 |
|
34 |
<div class="row">
|
35 |
<div class="col s12">
|
36 |
+
<?php include_once( __DIR__ . "/xcloner_header.php")?>
|
|
|
|
|
37 |
</div>
|
38 |
+
<div class="col s12">
|
39 |
+
<?php if (isset($latest_backup['timestamp']) and $latest_backup['timestamp'] < strtotime("-1 day")): ?>
|
40 |
+
<div id="setting-error-" class="error settings-error notice is-dismissible">
|
41 |
+
<p><strong>
|
42 |
+
<?php echo __('Your latest backup is older than 24 hours, please create a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?>
|
43 |
+
</strong>
|
44 |
+
</p>
|
45 |
+
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
|
46 |
+
</button>
|
47 |
+
</div>
|
48 |
+
<?php endif ?>
|
49 |
|
50 |
+
<?php if (!isset($latest_backup['timestamp'])): ?>
|
51 |
+
<div id="setting-error-" class="error settings-error notice is-dismissible">
|
52 |
+
<p><strong>
|
53 |
+
<?php echo __('You have no backup that I could find, please generate a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?>
|
54 |
+
</strong>
|
55 |
+
</p>
|
56 |
+
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
|
57 |
+
</button>
|
58 |
+
</div>
|
59 |
+
<?php endif ?>
|
60 |
|
61 |
+
<?php if (!$requirements->check_backup_ready_status()): ?>
|
62 |
+
<div id="setting-error-" class="error settings-error notice is-dismissible">
|
63 |
+
<p><strong>
|
64 |
+
<?php echo __('Backup system not ready, please check and fix the issues marked in red', 'xcloner-backup-and-restore') ?>
|
65 |
+
</strong>
|
66 |
+
</p>
|
67 |
+
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
|
68 |
+
</button>
|
69 |
+
</div>
|
|
|
70 |
|
71 |
+
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
</div>
|
73 |
+
</div>
|
74 |
|
|
|
75 |
|
76 |
|
77 |
<!-- This file should primarily consist of HTML with a little bit of PHP. -->
|
78 |
<div class="row dashboard">
|
79 |
<div class="col s12 m12 l7">
|
80 |
|
81 |
+
<div class="">
|
82 |
|
83 |
<ul class="collapsible xcloner-debugger" data-collapsible="accordion">
|
84 |
|
89 |
<div class="">
|
90 |
<h5><?php echo __("Latest Backup", 'xcloner-backup-and-restore') ?></h5>
|
91 |
<blockquote>
|
92 |
+
<?php if (isset($latest_backup)): ?>
|
93 |
+
<div class="item">
|
94 |
+
<div class="title"><?php echo __("Backup Name", 'xcloner-backup-and-restore') ?>
|
95 |
+
:
|
|
|
|
|
96 |
</div>
|
97 |
+
<?php echo $latest_backup['basename'] ?>
|
98 |
+
</div>
|
99 |
+
<div class="item">
|
100 |
+
<div class="title">
|
101 |
+
<?php echo __("Backup Size", 'xcloner-backup-and-restore') ?>:
|
102 |
</div>
|
103 |
+
<?php echo size_format($latest_backup['size']) ?>
|
104 |
+
</div>
|
105 |
+
<div class="item">
|
106 |
+
<div class="title"><?php echo __("Backup Date", 'xcloner-backup-and-restore') ?>
|
107 |
+
:
|
108 |
+
</div>
|
109 |
+
<?php
|
110 |
echo date($date_format." ".$time_format, $latest_backup['timestamp'] + (get_option('gmt_offset') * HOUR_IN_SECONDS))
|
111 |
?>
|
112 |
+
</div>
|
113 |
+
<?php else: ?>
|
114 |
+
<div class="item">
|
115 |
+
<div class="title">
|
116 |
+
<?php echo __("No Backup Yet", 'xcloner-backup-and-restore') ?></div>
|
117 |
+
</div>
|
118 |
+
<?php endif ?>
|
119 |
</blockquote>
|
120 |
<div>
|
121 |
<h5><?php echo __("Backup Storage Usage", 'xcloner-backup-and-restore') ?></h5>
|
122 |
<blockquote>
|
123 |
<div class="item">
|
124 |
+
<div class="title">
|
125 |
+
<?php echo __("Total Size", 'xcloner-backup-and-restore') ?>
|
126 |
:
|
127 |
</div>
|
128 |
+
<?php echo size_format($xcloner_file_system->get_storage_usage()); ?>
|
129 |
</div>
|
130 |
</blockquote>
|
131 |
<h5><?php echo __("Next Scheduled Backup", 'xcloner-backup-and-restore') ?></h5>
|
132 |
<blockquote>
|
133 |
<div class="item">
|
134 |
+
<?php
|
135 |
$list = ($xcloner_scheduler->get_next_run_schedule());
|
136 |
|
137 |
if (is_array($list)) {
|
142 |
$latest_schedule = $list[0];
|
143 |
}
|
144 |
?>
|
145 |
+
<?php if (isset($latest_schedule->name)): ?>
|
146 |
+
<div class="title">
|
147 |
+
<?php echo __("Schedule Name", 'xcloner-backup-and-restore') ?>
|
148 |
+
:
|
149 |
+
</div>
|
150 |
+
<?php echo $latest_schedule->name; ?>
|
151 |
+
<?php endif; ?>
|
152 |
</div>
|
153 |
<div class="item">
|
154 |
+
<div class="title">
|
155 |
+
<?php echo __("Next Call", 'xcloner-backup-and-restore') ?>
|
156 |
:
|
157 |
</div>
|
158 |
+
<?php if (isset($latest_schedule->next_run_time)) {
|
159 |
echo date($date_format." ".$time_format, $latest_schedule->next_run_time);
|
160 |
} else {
|
161 |
echo __("Unscheduled", 'xcloner-backup-and-restore');
|
167 |
</div>
|
168 |
</li>
|
169 |
|
170 |
+
<?php if ($xcloner_settings->get_xcloner_option('xcloner_enable_log')) : ?>
|
171 |
+
<li class="active">
|
172 |
+
<div class="collapsible-header active">
|
173 |
+
<i
|
174 |
+
class="material-icons">bug_report</i><?php echo __('XCloner Debugger', 'xcloner-backup-and-restore') ?>
|
175 |
+
<div class="right">
|
176 |
+
<a href="#<?php echo $logger_basename = basename($logger->get_main_logger_url()) ?>"
|
177 |
+
class="download-logger" title="<?php echo $logger_basename ?>">
|
178 |
+
<span class="shorten_string"><?php echo $logger_basename ?> </span>
|
179 |
+
</a>
|
180 |
</div>
|
181 |
+
</div>
|
182 |
+
<div class="collapsible-body">
|
183 |
+
<div class="console" id="xcloner-console"><?php if ($logger_content) {
|
184 |
+
echo strip_tags(implode("<br />\n", array_reverse($logger_content)), "<br><a>");
|
185 |
} ?></div>
|
186 |
+
</div>
|
187 |
+
</li>
|
188 |
+
<script>
|
189 |
+
jQuery(document).ready(function () {
|
190 |
+
var objDiv = document.getElementById("xcloner-console");
|
191 |
+
objDiv.scrollTop = objDiv.scrollHeight;
|
192 |
+
/*setInterval(function(){
|
193 |
getXclonerLog();
|
194 |
}, 2000);*/
|
195 |
+
})
|
196 |
+
</script>
|
197 |
+
<?php endif; ?>
|
198 |
|
199 |
</ul>
|
200 |
|
208 |
<div class="card-content white-text">
|
209 |
<span class="card-title"><?php echo __("System Check", 'xcloner-backup-and-restore') ?></span>
|
210 |
<ul>
|
211 |
+
<li
|
212 |
+
class="card-panel <?php echo($requirements->check_xcloner_start_path(1) ? "teal" : "red") ?> lighten-2">
|
213 |
+
<?php echo __('Backup Start Location', 'xcloner-backup-and-restore') ?>: <span
|
214 |
+
class="shorten_string "><?php echo $requirements->check_xcloner_start_path(); ?></span>
|
215 |
</li>
|
216 |
+
<li
|
217 |
+
class="card-panel <?php echo($requirements->check_xcloner_store_path(1) ? "teal" : "red") ?> lighten-2">
|
218 |
+
<?php echo __('Backup Storage Location', 'xcloner-backup-and-restore') ?>: <span
|
219 |
+
class="shorten_string"><?php echo $requirements->check_xcloner_store_path(); ?></span>
|
220 |
</li>
|
221 |
+
<li
|
222 |
+
class="card-panel <?php echo($requirements->check_xcloner_tmp_path(1) ? "teal" : "red") ?> lighten-2">
|
223 |
+
<?php echo __('Temporary Location', 'xcloner-backup-and-restore') ?>: <span
|
224 |
+
class="shorten_string"><?php echo $requirements->check_xcloner_tmp_path(); ?></span>
|
225 |
</li>
|
226 |
|
227 |
+
<li
|
228 |
+
class="card-panel <?php echo($requirements->check_min_php_version(1) ? "teal" : "red") ?> lighten-2">
|
229 |
+
<?php echo __('PHP Version Check', 'xcloner-backup-and-restore') ?>
|
230 |
: <?php echo $requirements->check_min_php_version(); ?>
|
231 |
( >= <?php echo $requirements->get_constant('min_php_version') ?>)
|
232 |
</li>
|
233 |
+
<li
|
234 |
+
class="card-panel <?php echo($requirements->check_safe_mode(1) ? "teal" : "orange") ?> lighten-2">
|
235 |
+
<?php echo __('PHP Safe Mode', 'xcloner-backup-and-restore') ?>
|
236 |
: <?php echo $requirements->check_safe_mode(); ?>
|
237 |
( <?php echo $requirements->get_constant('safe_mode') ?>)
|
238 |
</li>
|
239 |
+
<li
|
240 |
+
class="card-panel <?php echo($requirements->check_backup_ready_status() ? "teal" : "red") ?> lighten-2">
|
241 |
+
<?php echo($requirements->check_backup_ready_status() ? __('BACKUP READY', 'xcloner-backup-and-restore') : __('Backup not ready, please check above requirements', 'xcloner-backup-and-restore')) ?>
|
242 |
+
<i
|
243 |
+
class="material-icons right tiny"><?php echo($requirements->check_backup_ready_status() ? 'thumb_up' : 'thumb_down') ?></i>
|
244 |
</li>
|
245 |
</ul>
|
246 |
<ul class="additional_system_info">
|
247 |
<li class="card-panel grey darken-1">
|
248 |
+
<?php echo __('PHP max_execution_time', 'xcloner-backup-and-restore') ?>
|
249 |
: <?php echo $requirements->get_max_execution_time(); ?>
|
250 |
</li>
|
251 |
<li class="card-panel grey darken-1">
|
252 |
+
<?php echo __('PHP memory_limit', 'xcloner-backup-and-restore') ?>
|
253 |
: <?php echo $requirements->get_memory_limit(); ?>
|
254 |
</li>
|
255 |
<li class="card-panel grey darken-1">
|
256 |
+
<?php echo __('PHP open_basedir', 'xcloner-backup-and-restore') ?>
|
257 |
: <?php echo $requirements->get_open_basedir(); ?>
|
258 |
</li>
|
259 |
+
<?php
|
260 |
$data = array();
|
261 |
if ($requirements->check_backup_ready_status()) {
|
262 |
$data = $xcloner_file_system->estimate_read_write_time();
|
263 |
}
|
264 |
?>
|
265 |
<li class="card-panel grey darken-1">
|
266 |
+
<?php echo __('Reading Time 1MB Block', 'xcloner-backup-and-restore') ?>
|
267 |
: <?php echo(isset($data['reading_time']) ? $data['reading_time'] : __("unknown")); ?>
|
268 |
</li>
|
269 |
<li class="card-panel grey darken-1">
|
270 |
+
<?php echo __('Writing Time 1MB Block', 'xcloner-backup-and-restore') ?>
|
271 |
: <?php echo(isset($data['writing_time']) ? $data['writing_time'] : __("unknown")); ?>
|
272 |
</li>
|
273 |
<li class="card-panel grey darken-1">
|
274 |
+
<?php echo __('Free Disk Space', 'xcloner-backup-and-restore') ?>
|
275 |
: <?php echo $requirements->get_free_disk_space(); ; ?>
|
276 |
</li>
|
277 |
</ul>
|
278 |
</div>
|
279 |
<div class="card-action">
|
280 |
+
<a class="waves-effect waves-light btn system_info_toggle blue darken-1"><i
|
281 |
+
class="material-icons left">list</i><?php echo __('Toggle Additional System Info', 'xcloner-backup-and-restore') ?>
|
282 |
</a>
|
283 |
</div>
|
284 |
</div>
|
285 |
|
286 |
</div>
|
287 |
+
</div>
|
admin/partials/xcloner_manage_backups_page.php
CHANGED
@@ -21,59 +21,61 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
|
|
21 |
</script>
|
22 |
|
23 |
<div class="row">
|
24 |
-
<div class="col s12
|
25 |
-
|
26 |
</div>
|
|
|
27 |
<?php if (sizeof($available_storages)): ?>
|
28 |
-
<div class="input-field col s12
|
29 |
<select name="storage_selection" id="storage_selection" class="validate" required>
|
30 |
|
31 |
<?php if ($storage_selection): ?>
|
32 |
-
|
33 |
-
|
34 |
<?php else: ?>
|
35 |
-
|
36 |
-
|
37 |
<?php endif; ?>
|
38 |
|
39 |
<?php foreach ($available_storages as $storage => $text): ?>
|
40 |
-
|
41 |
-
|
42 |
-
} ?>><?php echo $text
|
|
|
43 |
<?php endforeach ?>
|
44 |
</select>
|
45 |
<?php endif ?>
|
46 |
</div>
|
47 |
-
|
48 |
<div class="col s12">
|
49 |
<table id="manage_backups" style="width:100%">
|
50 |
<thead>
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
</thead>
|
68 |
|
69 |
<tbody>
|
70 |
|
71 |
</tbody>
|
72 |
</table>
|
73 |
-
|
74 |
<a class="waves-effect waves-light btn delete-all"><i
|
75 |
class="material-icons left">delete</i><?php echo __("Delete", 'xcloner-backup-and-restore') ?></a>
|
76 |
-
</div>
|
77 |
|
78 |
|
79 |
<!-- List Backup Content Modal-->
|
@@ -103,7 +105,8 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
|
|
103 |
<?php echo __("This option will encrypt your backup archive with your current XCloner Encryption Key.", 'xcloner-backup-and-restore') ?>
|
104 |
</p>
|
105 |
<p class="center-align">
|
106 |
-
<a
|
|
|
107 |
</p>
|
108 |
</div>
|
109 |
<ul class="files-list">
|
@@ -126,13 +129,12 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
|
|
126 |
</p>
|
127 |
<p>
|
128 |
<?=__('Provide Alternative Decryption Key:')?>
|
129 |
-
<input type="text"
|
130 |
-
|
131 |
-
id="decryption_key"
|
132 |
-
placeholder="<?=__('Decryption Key', 'xcloner-backup-and-restore')?>" />
|
133 |
</p>
|
134 |
<p class="center-align">
|
135 |
-
<a
|
|
|
136 |
</p>
|
137 |
</div>
|
138 |
<ul class="files-list">
|
@@ -167,195 +169,208 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
|
|
167 |
<h4><?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore') ?></h4>
|
168 |
<p>
|
169 |
<?php if (sizeof($available_storages)): ?>
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
__('Send %s to remote storage', 'xcloner-backup-and-restore'),
|
174 |
"<span class='backup_name'></span>"
|
175 |
) ?></label>
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
<?php foreach ($available_storages as $storage => $text): ?>
|
182 |
<option value="<?php echo $storage ?>"><?php echo $text ?></option>
|
183 |
-
|
184 |
-
|
185 |
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
class="upload-submit btn-floating btn-large waves-effect waves-light teal"><i
|
190 |
class="material-icons">file_upload</i></submit>
|
|
|
191 |
</div>
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
</div>
|
199 |
-
|
200 |
-
<?php endif ?>
|
201 |
</p>
|
202 |
</div>
|
203 |
</form>
|
204 |
</div>
|
205 |
|
206 |
-
<script>
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
});
|
265 |
|
266 |
-
|
267 |
-
|
268 |
-
.on("click", ".download", function (e) {
|
269 |
-
var hash = jQuery(this).attr("href");
|
270 |
-
var id = hash.substr(1);
|
271 |
-
xcloner_manage_backups.download_backup_by_name(id);
|
272 |
-
e.preventDefault();
|
273 |
});
|
274 |
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
});
|
283 |
|
284 |
-
|
285 |
-
|
286 |
-
.on("click", ".copy-remote-to-local", function (e) {
|
287 |
-
var hash = jQuery(this).attr("href");
|
288 |
-
var id = hash.substr(1);
|
289 |
-
xcloner_manage_backups.copy_remote_to_local(id);
|
290 |
-
e.preventDefault();
|
291 |
-
});
|
292 |
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
xcloner_manage_backups.list_backup_content(id);
|
299 |
-
e.preventDefault();
|
300 |
});
|
301 |
|
302 |
-
|
303 |
-
|
304 |
-
.on("click", ".backup-encryption", function (e) {
|
305 |
-
var hash = jQuery(this).attr("href");
|
306 |
-
var id = hash.substr(1);
|
307 |
-
xcloner_manage_backups.backup_encryption(id);
|
308 |
-
e.preventDefault();
|
309 |
});
|
310 |
|
311 |
-
|
312 |
-
.off("click", ".backup-decryption")
|
313 |
-
.on("click", ".backup-decryption", function (e) {
|
314 |
-
var hash = jQuery(this).attr("href");
|
315 |
-
var id = hash.substr(1);
|
316 |
-
xcloner_manage_backups.backup_decryption(id);
|
317 |
-
e.preventDefault();
|
318 |
-
});
|
319 |
-
},
|
320 |
-
});
|
321 |
-
|
322 |
-
jQuery("#select_all").click(function () {
|
323 |
-
jQuery("input:checkbox").prop("checked", this.checked);
|
324 |
-
});
|
325 |
-
|
326 |
-
jQuery(".delete-all").click(function () {
|
327 |
-
if (confirm("Are you sure you want to delete selected items?")) {
|
328 |
-
show_delete_alert = 0;
|
329 |
-
jQuery("input:checkbox").each(function () {
|
330 |
-
if (jQuery(this).is(":checked")) {
|
331 |
-
jQuery(this)
|
332 |
-
.parent()
|
333 |
-
.parent()
|
334 |
-
.parent()
|
335 |
-
.parent()
|
336 |
-
.find(".delete")
|
337 |
-
.trigger("click");
|
338 |
-
}
|
339 |
});
|
340 |
-
|
341 |
-
}
|
342 |
-
});
|
343 |
-
|
344 |
-
//jQuery("#remote_storage_modal").modal();
|
345 |
-
//jQuery("#local_storage_upload_modal").modal();
|
346 |
-
|
347 |
-
jQuery("#storage_selection").on("change", function () {
|
348 |
-
window.location =
|
349 |
-
window.location.href.split("&storage_selection")[0] +
|
350 |
-
"&storage_selection=" +
|
351 |
-
jQuery(this).val();
|
352 |
-
});
|
353 |
-
|
354 |
-
jQuery(".modal").on("hide", function () {
|
355 |
-
alert("ok");
|
356 |
-
});
|
357 |
-
|
358 |
-
var show_delete_alert = 1;
|
359 |
-
});
|
360 |
-
|
361 |
-
</script>
|
21 |
</script>
|
22 |
|
23 |
<div class="row">
|
24 |
+
<div class="col s12">
|
25 |
+
<?php include_once(__DIR__ . "/xcloner_header.php")?>
|
26 |
</div>
|
27 |
+
|
28 |
<?php if (sizeof($available_storages)): ?>
|
29 |
+
<div class="input-field col s12 l4 left remote-storage-selection">
|
30 |
<select name="storage_selection" id="storage_selection" class="validate" required>
|
31 |
|
32 |
<?php if ($storage_selection): ?>
|
33 |
+
<option value="" selected><?php echo __('Change To Local Storage...', 'xcloner-backup-and-restore') ?>
|
34 |
+
</option>
|
35 |
<?php else: ?>
|
36 |
+
<option value="" selected><?php echo __('Change To Remote Storage...', 'xcloner-backup-and-restore') ?>
|
37 |
+
</option>
|
38 |
<?php endif; ?>
|
39 |
|
40 |
<?php foreach ($available_storages as $storage => $text): ?>
|
41 |
+
<option value="<?php echo $storage ?>" <?php if ($storage == $storage_selection) {
|
42 |
+
echo "selected";
|
43 |
+
} ?>><?php echo $text ?>
|
44 |
+
</option>
|
45 |
<?php endforeach ?>
|
46 |
</select>
|
47 |
<?php endif ?>
|
48 |
</div>
|
49 |
+
|
50 |
<div class="col s12">
|
51 |
<table id="manage_backups" style="width:100%">
|
52 |
<thead>
|
53 |
+
<tr class="grey lighten-2">
|
54 |
+
<th class="no-sort">
|
55 |
+
<p>
|
56 |
+
<label for="select_all">
|
57 |
+
<input name="select_all" class="" id="select_all" value="1" type="checkbox">
|
58 |
+
<span> </span>
|
59 |
+
</label>
|
60 |
+
|
61 |
+
</p>
|
62 |
+
</th>
|
63 |
+
<th data-field="id"><?php echo __("Backup Name", 'xcloner-backup-and-restore') ?></th>
|
64 |
+
<th data-field="name"><?php echo __("Created Time", 'xcloner-backup-and-restore') ?></th>
|
65 |
+
<th data-field="name"><?php echo __("Size", 'xcloner-backup-and-restore') ?></th>
|
66 |
+
<th class="no-sort" data-field="price"><?php echo __("Action", 'xcloner-backup-and-restore') ?></th>
|
67 |
+
|
68 |
+
</tr>
|
69 |
</thead>
|
70 |
|
71 |
<tbody>
|
72 |
|
73 |
</tbody>
|
74 |
</table>
|
75 |
+
|
76 |
<a class="waves-effect waves-light btn delete-all"><i
|
77 |
class="material-icons left">delete</i><?php echo __("Delete", 'xcloner-backup-and-restore') ?></a>
|
78 |
+
</div>
|
79 |
|
80 |
|
81 |
<!-- List Backup Content Modal-->
|
105 |
<?php echo __("This option will encrypt your backup archive with your current XCloner Encryption Key.", 'xcloner-backup-and-restore') ?>
|
106 |
</p>
|
107 |
<p class="center-align">
|
108 |
+
<a
|
109 |
+
class="waves-effect waves-light btn"><?php echo __("START ENCRYPTION", 'xcloner-backup-and-restore') ?></a>
|
110 |
</p>
|
111 |
</div>
|
112 |
<ul class="files-list">
|
129 |
</p>
|
130 |
<p>
|
131 |
<?=__('Provide Alternative Decryption Key:')?>
|
132 |
+
<input type="text" name="decryption_key" id="decryption_key"
|
133 |
+
placeholder="<?=__('Decryption Key', 'xcloner-backup-and-restore')?>" />
|
|
|
|
|
134 |
</p>
|
135 |
<p class="center-align">
|
136 |
+
<a
|
137 |
+
class="waves-effect waves-light btn"><?php echo __("START DECRYPTION", 'xcloner-backup-and-restore') ?></a>
|
138 |
</p>
|
139 |
</div>
|
140 |
<ul class="files-list">
|
169 |
<h4><?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore') ?></h4>
|
170 |
<p>
|
171 |
<?php if (sizeof($available_storages)): ?>
|
172 |
+
<div class="row">
|
173 |
+
<div class="col s12 label">
|
174 |
+
<label><?php echo sprintf(
|
175 |
__('Send %s to remote storage', 'xcloner-backup-and-restore'),
|
176 |
"<span class='backup_name'></span>"
|
177 |
) ?></label>
|
178 |
+
</div>
|
179 |
+
<div class="input-field col s8 m10">
|
180 |
+
<select name="transfer_storage" id="transfer_storage" class="validate" required>
|
181 |
+
<option value="" selected><?php echo __('please select...', 'xcloner-backup-and-restore') ?></option>
|
182 |
+
<?php foreach ($available_storages as $storage => $text): ?>
|
|
|
183 |
<option value="<?php echo $storage ?>"><?php echo $text ?></option>
|
184 |
+
<?php endforeach ?>
|
185 |
+
</select>
|
186 |
|
187 |
+
</div>
|
188 |
+
<div class="s4 m2 right">
|
189 |
+
<button type="submit"
|
190 |
class="upload-submit btn-floating btn-large waves-effect waves-light teal"><i
|
191 |
class="material-icons">file_upload</i></submit>
|
192 |
+
</div>
|
193 |
</div>
|
194 |
+
<div class="row status">
|
195 |
+
<?php echo __("Uploading backup to the selected remote storage...", 'xcloner-backup-and-restore') ?>
|
196 |
+
<span class="status-text"></span>
|
197 |
+
<div class="progress">
|
198 |
+
<div class="indeterminate"></div>
|
199 |
+
</div>
|
200 |
</div>
|
201 |
+
<?php endif ?>
|
|
|
202 |
</p>
|
203 |
</div>
|
204 |
</form>
|
205 |
</div>
|
206 |
|
207 |
+
<script>
|
208 |
+
jQuery(document).ready(function () {
|
209 |
+
|
210 |
+
xcloner_manage_backups.storage_selection = getUrlParam("storage_selection");
|
211 |
+
|
212 |
+
dataTable = jQuery("#manage_backups").DataTable({
|
213 |
+
responsive: true,
|
214 |
+
bFilter: true,
|
215 |
+
order: [
|
216 |
+
[2, "desc"]
|
217 |
+
],
|
218 |
+
buttons: ["selectAll", "selectNone"],
|
219 |
+
language: {
|
220 |
+
emptyTable: "No backups available",
|
221 |
+
buttons: {
|
222 |
+
selectAll: "Select all items",
|
223 |
+
selectNone: "Select none",
|
224 |
+
},
|
225 |
+
},
|
226 |
+
columnDefs: [{
|
227 |
+
targets: "no-sort",
|
228 |
+
orderable: false
|
229 |
+
}],
|
230 |
+
columns: [{
|
231 |
+
width: "1%"
|
232 |
+
},
|
233 |
+
{
|
234 |
+
width: "25%"
|
235 |
+
},
|
236 |
+
{
|
237 |
+
width: "5%"
|
238 |
+
},
|
239 |
+
{
|
240 |
+
width: "5%"
|
241 |
+
},
|
242 |
+
{
|
243 |
+
width: "9%"
|
244 |
+
},
|
245 |
+
],
|
246 |
+
oLanguage: {
|
247 |
+
sSearch: "",
|
248 |
+
sSearchPlaceholder: "Search Backups",
|
249 |
+
},
|
250 |
+
ajax: {
|
251 |
+
url: XCLONER_AJAXURL +
|
252 |
+
"&action=get_manage_backups_list&storage_selection=" +
|
253 |
+
xcloner_manage_backups.storage_selection,
|
254 |
+
},
|
255 |
+
fnDrawCallback: function (oSettings) {
|
256 |
+
jQuery("a.expand-multipart").on("click", function () {
|
257 |
+
jQuery(this).parent().find("ul.multipart").toggle();
|
258 |
+
jQuery(this).parent().find("a.expand-multipart.remove").toggle();
|
259 |
+
jQuery(this).parent().find("a.expand-multipart.add").toggle();
|
260 |
+
});
|
261 |
+
|
262 |
+
jQuery(this)
|
263 |
+
.off("click", ".delete")
|
264 |
+
.on("click", ".delete", function (e) {
|
265 |
+
var hash = jQuery(this).attr("href");
|
266 |
+
var id = hash.substr(1);
|
267 |
+
var data = "";
|
268 |
+
|
269 |
+
if (show_delete_alert) {
|
270 |
+
if (confirm("Are you sure you want to delete it?")) {
|
271 |
+
xcloner_manage_backups.delete_backup_by_name(id, this,
|
272 |
+
dataTable);
|
273 |
+
}
|
274 |
+
} else {
|
275 |
+
xcloner_manage_backups.delete_backup_by_name(id, this,
|
276 |
+
dataTable);
|
277 |
+
}
|
278 |
+
|
279 |
+
e.preventDefault();
|
280 |
+
});
|
281 |
+
|
282 |
+
jQuery(this)
|
283 |
+
.off("click", ".download")
|
284 |
+
.on("click", ".download", function (e) {
|
285 |
+
var hash = jQuery(this).attr("href");
|
286 |
+
var id = hash.substr(1);
|
287 |
+
xcloner_manage_backups.download_backup_by_name(id);
|
288 |
+
e.preventDefault();
|
289 |
+
});
|
290 |
+
|
291 |
+
jQuery(this)
|
292 |
+
.off("click", ".cloud-upload")
|
293 |
+
.on("click", ".cloud-upload", function (e) {
|
294 |
+
var hash = jQuery(this).attr("href");
|
295 |
+
var id = hash.substr(1);
|
296 |
+
xcloner_manage_backups.cloud_upload(id);
|
297 |
+
e.preventDefault();
|
298 |
+
});
|
299 |
+
|
300 |
+
jQuery(this)
|
301 |
+
.off("click", ".copy-remote-to-local")
|
302 |
+
.on("click", ".copy-remote-to-local", function (e) {
|
303 |
+
var hash = jQuery(this).attr("href");
|
304 |
+
var id = hash.substr(1);
|
305 |
+
xcloner_manage_backups.copy_remote_to_local(id);
|
306 |
+
e.preventDefault();
|
307 |
+
});
|
308 |
+
|
309 |
+
jQuery(this)
|
310 |
+
.off("click", ".list-backup-content")
|
311 |
+
.on("click", ".list-backup-content", function (e) {
|
312 |
+
var hash = jQuery(this).attr("href");
|
313 |
+
var id = hash.substr(1);
|
314 |
+
xcloner_manage_backups.list_backup_content(id);
|
315 |
+
e.preventDefault();
|
316 |
+
});
|
317 |
+
|
318 |
+
jQuery(this)
|
319 |
+
.off("click", ".backup-encryption")
|
320 |
+
.on("click", ".backup-encryption", function (e) {
|
321 |
+
var hash = jQuery(this).attr("href");
|
322 |
+
var id = hash.substr(1);
|
323 |
+
xcloner_manage_backups.backup_encryption(id);
|
324 |
+
e.preventDefault();
|
325 |
+
});
|
326 |
+
|
327 |
+
jQuery(this)
|
328 |
+
.off("click", ".backup-decryption")
|
329 |
+
.on("click", ".backup-decryption", function (e) {
|
330 |
+
var hash = jQuery(this).attr("href");
|
331 |
+
var id = hash.substr(1);
|
332 |
+
xcloner_manage_backups.backup_decryption(id);
|
333 |
+
e.preventDefault();
|
334 |
+
});
|
335 |
+
},
|
336 |
});
|
337 |
|
338 |
+
jQuery("#select_all").click(function () {
|
339 |
+
jQuery("input:checkbox").prop("checked", this.checked);
|
|
|
|
|
|
|
|
|
|
|
340 |
});
|
341 |
|
342 |
+
jQuery(".delete-all").click(function () {
|
343 |
+
if (confirm("Are you sure you want to delete selected items?")) {
|
344 |
+
show_delete_alert = 0;
|
345 |
+
jQuery("input:checkbox").each(function () {
|
346 |
+
if (jQuery(this).is(":checked")) {
|
347 |
+
jQuery(this)
|
348 |
+
.parent()
|
349 |
+
.parent()
|
350 |
+
.parent()
|
351 |
+
.parent()
|
352 |
+
.find(".delete")
|
353 |
+
.trigger("click");
|
354 |
+
}
|
355 |
+
});
|
356 |
+
show_delete_alert = 1;
|
357 |
+
}
|
358 |
});
|
359 |
|
360 |
+
//jQuery("#remote_storage_modal").modal();
|
361 |
+
//jQuery("#local_storage_upload_modal").modal();
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
|
363 |
+
jQuery("#storage_selection").on("change", function () {
|
364 |
+
window.location =
|
365 |
+
window.location.href.split("&storage_selection")[0] +
|
366 |
+
"&storage_selection=" +
|
367 |
+
jQuery(this).val();
|
|
|
|
|
368 |
});
|
369 |
|
370 |
+
jQuery(".modal").on("hide", function () {
|
371 |
+
alert("ok");
|
|
|
|
|
|
|
|
|
|
|
372 |
});
|
373 |
|
374 |
+
var show_delete_alert = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
375 |
});
|
376 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/partials/xcloner_remote_storage_page.php
CHANGED
@@ -15,60 +15,63 @@ function common_cleanup_html($type)
|
|
15 |
{
|
16 |
if ($type == "local") {
|
17 |
$type = "";
|
18 |
-
}else{
|
19 |
$type .= "_";
|
20 |
}
|
21 |
ob_start(); ?>
|
22 |
<!-- Cleanup by Days -->
|
23 |
<div class="row">
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
<div class="row">
|
36 |
-
<div class="col s12 m3 label">
|
37 |
-
<label for="xcloner_{type}_cleanup_retention_limit_archives"><?php echo __("Cleanup by Quantity", 'xcloner-backup-and-restore') ?></label>
|
38 |
-
</div>
|
39 |
-
<div class=" col s12 m6">
|
40 |
-
<input placeholder="<?php echo __("how many backup files to keep", 'xcloner-backup-and-restore') ?>"
|
41 |
-
id="xcloner_{type}cleanup_retention_limit_archives" type="number" name="xcloner_{type}cleanup_retention_limit_archives"
|
42 |
-
class="validate"
|
43 |
-
value="<?php echo get_option("xcloner_".$type."cleanup_retention_limit_archives") ?>">
|
44 |
-
</div>
|
45 |
-
</div>
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
<?php
|
73 |
$common_cleanup_html = ob_get_contents();
|
74 |
ob_end_clean();
|
@@ -76,1118 +79,67 @@ $common_cleanup_html = ob_get_contents();
|
|
76 |
return str_replace("{type}", $type, $common_cleanup_html);
|
77 |
}
|
78 |
|
79 |
-
?>
|
80 |
-
<h1><?= esc_html(get_admin_page_title()); ?></h1>
|
81 |
-
|
82 |
<form class="remote-storage-form" method="POST">
|
83 |
|
84 |
<input type="hidden" id="connection_check" name="connection_check" value="">
|
85 |
|
86 |
<div class="row remote-storage">
|
|
|
|
|
|
|
87 |
<div class="col s12 m12 l10">
|
88 |
<ul class="collapsible popout" data-collapsible="accordion">
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
<i class="material-icons">computer</i><?php echo __("Local Storage", 'xcloner-backup-and-restore') ?>
|
94 |
-
<div class="switch right">
|
95 |
-
<label>
|
96 |
-
Off
|
97 |
-
<input type="checkbox" checked disabled class="disabled readonly" \>
|
98 |
-
<span class="lever"></span>
|
99 |
-
On
|
100 |
-
</label>
|
101 |
-
</div>
|
102 |
-
</div>
|
103 |
-
<div class="collapsible-body">
|
104 |
-
|
105 |
-
<div class="row">
|
106 |
-
<div class="col s12 m3 label">
|
107 |
-
<label for="aws_key"><?php echo __("Backup Start Location", 'xcloner-backup-and-restore') ?></label>
|
108 |
-
</div>
|
109 |
-
<div class=" col s12 m6">
|
110 |
-
<input placeholder="<?php echo __("Backup Start Location", 'xcloner-backup-and-restore') ?>"
|
111 |
-
id="aws_key" type="text" name="xcloner_start_path" class="validate"
|
112 |
-
value="<?php echo get_option("xcloner_start_path") ?>" autocomplete="off">
|
113 |
-
</div>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<div class="row">
|
117 |
-
<div class="col s12 m3 label">
|
118 |
-
<label for="aws_key"><?php echo __("Backup Storage Location", 'xcloner-backup-and-restore') ?></label>
|
119 |
-
</div>
|
120 |
-
<div class=" col s12 m6">
|
121 |
-
<input placeholder="<?php echo __("Backup Storage Location", 'xcloner-backup-and-restore') ?>"
|
122 |
-
id="aws_key" type="text" name="xcloner_store_path" class="validate"
|
123 |
-
value="<?php echo get_option("xcloner_store_path") ?>" autocomplete="off">
|
124 |
-
</div>
|
125 |
-
</div>
|
126 |
-
|
127 |
-
<?=common_cleanup_html('local')?>
|
128 |
-
|
129 |
-
<div class="row">
|
130 |
-
<div class="col s6 m4">
|
131 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
132 |
-
value="local"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
133 |
-
<i class="material-icons right">save</i>
|
134 |
-
</button>
|
135 |
-
</div>
|
136 |
-
<div class="col s6 m4">
|
137 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
138 |
-
id="action" value="local"
|
139 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
140 |
-
<i class="material-icons right">import_export</i>
|
141 |
-
</button>
|
142 |
-
</div>
|
143 |
-
</div>
|
144 |
-
|
145 |
-
</div>
|
146 |
-
</li>
|
147 |
-
|
148 |
-
|
149 |
-
<!-- FTP STORAGE-->
|
150 |
-
<li id="ftp">
|
151 |
-
<div class="collapsible-header">
|
152 |
-
<i class="material-icons">computer</i><?php echo __("FTP Storage", 'xcloner-backup-and-restore') ?>
|
153 |
-
<div class="switch right">
|
154 |
-
<label>
|
155 |
-
Off
|
156 |
-
<input type="checkbox" name="xcloner_ftp_enable" class="status"
|
157 |
-
value="1" <?php if (get_option("xcloner_ftp_enable")) {
|
158 |
-
echo "checked";
|
159 |
-
} ?> \>
|
160 |
-
<span class="lever"></span>
|
161 |
-
On
|
162 |
-
</label>
|
163 |
-
</div>
|
164 |
-
</div>
|
165 |
-
<div class="collapsible-body">
|
166 |
-
<div class="row">
|
167 |
-
<div class="col s12 m3 label">
|
168 |
-
<label for="ftp_host"><?php echo __("Ftp Hostname", 'xcloner-backup-and-restore') ?></label>
|
169 |
-
</div>
|
170 |
-
<div class="col s12 m6">
|
171 |
-
<input placeholder="<?php echo __("Ftp Hostname", 'xcloner-backup-and-restore') ?>"
|
172 |
-
id="ftp_host" type="text" name="xcloner_ftp_hostname" class="validate"
|
173 |
-
value="<?php echo get_option("xcloner_ftp_hostname") ?>">
|
174 |
-
</div>
|
175 |
-
<div class=" col s12 m2">
|
176 |
-
<input placeholder="<?php echo __("Ftp Port", 'xcloner-backup-and-restore') ?>"
|
177 |
-
id="ftp_port" type="text" name="xcloner_ftp_port" class="validate"
|
178 |
-
value="<?php echo get_option("xcloner_ftp_port", 21) ?>">
|
179 |
-
</div>
|
180 |
-
</div>
|
181 |
-
|
182 |
-
<div class="row">
|
183 |
-
<div class="col s12 m3 label">
|
184 |
-
<label for="ftp_username"><?php echo __("Ftp Username", 'xcloner-backup-and-restore') ?></label>
|
185 |
-
</div>
|
186 |
-
<div class=" col s12 m6">
|
187 |
-
<input placeholder="<?php echo __("Ftp Username", 'xcloner-backup-and-restore') ?>"
|
188 |
-
id="ftp_username" type="text" name="xcloner_ftp_username" class="validate"
|
189 |
-
value="<?php echo get_option("xcloner_ftp_username") ?>" autocomplete="off">
|
190 |
-
</div>
|
191 |
-
</div>
|
192 |
-
|
193 |
-
|
194 |
-
<div class="row">
|
195 |
-
<div class="col s12 m3 label">
|
196 |
-
<label for="ftp_password"><?php echo __("Ftp Password", 'xcloner-backup-and-restore') ?></label>
|
197 |
-
</div>
|
198 |
-
<div class=" col s12 m6">
|
199 |
-
<input placeholder="<?php echo __("Ftp Password", 'xcloner-backup-and-restore') ?>"
|
200 |
-
id="ftp_password" type="text" name="xcloner_ftp_password" class="validate"
|
201 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_ftp_password"))) ?>"
|
202 |
-
autocomplete="off">
|
203 |
-
</div>
|
204 |
-
</div>
|
205 |
-
|
206 |
-
<div class="row">
|
207 |
-
<div class="col s12 m3 label">
|
208 |
-
<label for="ftp_root"><?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore') ?></label>
|
209 |
-
</div>
|
210 |
-
<div class=" col s12 m6">
|
211 |
-
<input placeholder="<?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore') ?>"
|
212 |
-
id="ftp_root" type="text" name="xcloner_ftp_path" class="validate"
|
213 |
-
value="<?php echo get_option("xcloner_ftp_path") ?>">
|
214 |
-
</div>
|
215 |
-
</div>
|
216 |
-
|
217 |
-
<div class="row">
|
218 |
-
<div class="col s12 m3 label">
|
219 |
-
<label for="ftp_root"><?php echo __("Ftp Transfer Mode", 'xcloner-backup-and-restore') ?></label>
|
220 |
-
</div>
|
221 |
-
<div class=" col s12 m6 input-field inline">
|
222 |
-
<p>
|
223 |
-
<label for="passive">
|
224 |
-
<input name="xcloner_ftp_transfer_mode" type="radio" id="passive"
|
225 |
-
value="1" <?php if (get_option("xcloner_ftp_transfer_mode", 1)) {
|
226 |
-
echo "checked";
|
227 |
-
} ?> />
|
228 |
-
<span><?php echo __("Passive", 'xcloner-backup-and-restore') ?></span>
|
229 |
-
</label>
|
230 |
-
</p>
|
231 |
-
<p>
|
232 |
-
<label for="active">
|
233 |
-
<input name="xcloner_ftp_transfer_mode" type="radio" id="active"
|
234 |
-
value="0" <?php if (!get_option("xcloner_ftp_transfer_mode", 1)) {
|
235 |
-
echo "checked";
|
236 |
-
} ?> />
|
237 |
-
<span><?php echo __("Active", 'xcloner-backup-and-restore') ?></span>
|
238 |
-
</label>
|
239 |
-
</p>
|
240 |
-
</div>
|
241 |
-
</div>
|
242 |
-
|
243 |
-
<div class="row">
|
244 |
-
<div class="col s12 m3 label">
|
245 |
-
<label for="ftp_ssl_mode"><?php echo __("Ftp Secure Connection", 'xcloner-backup-and-restore') ?></label>
|
246 |
-
</div>
|
247 |
-
<div class=" col s12 m6 input-field inline">
|
248 |
-
<p>
|
249 |
-
<label for="ftp_ssl_mode_inactive">
|
250 |
-
<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_inactive"
|
251 |
-
value="0" <?php if (!get_option("xcloner_ftp_ssl_mode")) {
|
252 |
-
echo "checked";
|
253 |
-
} ?> />
|
254 |
-
<span><?php echo __("Disable", 'xcloner-backup-and-restore') ?></span>
|
255 |
-
</label></p>
|
256 |
-
<p>
|
257 |
-
<label for="ftp_ssl_mode_active">
|
258 |
-
<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_active"
|
259 |
-
value="1" <?php if (get_option("xcloner_ftp_ssl_mode")) {
|
260 |
-
echo "checked";
|
261 |
-
} ?> />
|
262 |
-
<span><?php echo __("Enable", 'xcloner-backup-and-restore') ?></span>
|
263 |
-
</label></p>
|
264 |
-
</div>
|
265 |
-
</div>
|
266 |
-
|
267 |
-
<div class="row">
|
268 |
-
<div class="col s12 m3 label">
|
269 |
-
<label for="ftp_timeout"><?php echo __("Ftp Timeout", 'xcloner-backup-and-restore') ?></label>
|
270 |
-
</div>
|
271 |
-
<div class=" col s12 m2">
|
272 |
-
<input placeholder="<?php echo __("Ftp Timeout", 'xcloner-backup-and-restore') ?>"
|
273 |
-
id="ftp_timeout" type="text" name="xcloner_ftp_timeout" class="validate"
|
274 |
-
value="<?php echo get_option("xcloner_ftp_timeout", 30) ?>">
|
275 |
-
</div>
|
276 |
-
</div>
|
277 |
-
|
278 |
-
<?=common_cleanup_html('ftp')?>
|
279 |
-
|
280 |
-
<div class="row">
|
281 |
-
<div class="col s6 m4">
|
282 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
283 |
-
value="ftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
284 |
-
<i class="material-icons right">save</i>
|
285 |
-
</button>
|
286 |
-
</div>
|
287 |
-
<div class="col s6 m4">
|
288 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
289 |
-
id="action" value="ftp"
|
290 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
291 |
-
<i class="material-icons right">import_export</i>
|
292 |
-
</button>
|
293 |
-
</div>
|
294 |
-
</div>
|
295 |
-
|
296 |
-
</div>
|
297 |
-
</li>
|
298 |
-
<!-- SFTP STORAGE-->
|
299 |
-
<li id="sftp">
|
300 |
-
<div class="collapsible-header">
|
301 |
-
<i class="material-icons">computer</i><?php echo __("SFTP Storage", 'xcloner-backup-and-restore') ?>
|
302 |
-
<div class="switch right">
|
303 |
-
<label>
|
304 |
-
Off
|
305 |
-
<input type="checkbox" name="xcloner_sftp_enable" class="status"
|
306 |
-
value="1" <?php if (get_option("xcloner_sftp_enable")) {
|
307 |
-
echo "checked";
|
308 |
-
} ?> \>
|
309 |
-
<span class="lever"></span>
|
310 |
-
On
|
311 |
-
</label>
|
312 |
-
</div>
|
313 |
-
</div>
|
314 |
-
<div class="collapsible-body">
|
315 |
-
<div class="row">
|
316 |
-
<div class="col s12 m3 label">
|
317 |
-
<label for="sftp_host"><?php echo __("SFTP Hostname", 'xcloner-backup-and-restore') ?></label>
|
318 |
-
</div>
|
319 |
-
<div class="col s12 m6">
|
320 |
-
<input placeholder="<?php echo __("SFTP Hostname", 'xcloner-backup-and-restore') ?>"
|
321 |
-
id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate"
|
322 |
-
value="<?php echo get_option("xcloner_sftp_hostname") ?>">
|
323 |
-
</div>
|
324 |
-
<div class=" col s12 m2">
|
325 |
-
<input placeholder="<?php echo __("SFTP Port", 'xcloner-backup-and-restore') ?>"
|
326 |
-
id="sftp_port" type="text" name="xcloner_sftp_port" class="validate"
|
327 |
-
value="<?php echo get_option("xcloner_sftp_port", 22) ?>">
|
328 |
-
</div>
|
329 |
-
</div>
|
330 |
-
|
331 |
-
<div class="row">
|
332 |
-
<div class="col s12 m3 label">
|
333 |
-
<label for="sftp_username"><?php echo __("SFTP Username", 'xcloner-backup-and-restore') ?></label>
|
334 |
-
</div>
|
335 |
-
<div class=" col s12 m6">
|
336 |
-
<input placeholder="<?php echo __("SFTP Username", 'xcloner-backup-and-restore') ?>"
|
337 |
-
id="sftp_username" type="text" name="xcloner_sftp_username" class="validate"
|
338 |
-
value="<?php echo get_option("xcloner_sftp_username") ?>" autocomplete="off">
|
339 |
-
</div>
|
340 |
-
</div>
|
341 |
-
|
342 |
-
|
343 |
-
<div class="row">
|
344 |
-
<div class="col s12 m3 label">
|
345 |
-
<label for="sftp_password"><?php echo __("SFTP or Private Key Password", 'xcloner-backup-and-restore') ?></label>
|
346 |
-
</div>
|
347 |
-
<div class=" col s12 m6">
|
348 |
-
<input placeholder="<?php echo __("SFTP or Private Key Password", 'xcloner-backup-and-restore') ?>"
|
349 |
-
id="ftp_spassword" type="text" name="xcloner_sftp_password" class="validate"
|
350 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_sftp_password"))) ?>"
|
351 |
-
autocomplete="off">
|
352 |
-
</div>
|
353 |
-
</div>
|
354 |
-
|
355 |
-
<div class="row">
|
356 |
-
<div class="col s12 m3 label">
|
357 |
-
<label for="sftp_private_key"><?php echo __("SFTP Private Key(RSA)", 'xcloner-backup-and-restore') ?></label>
|
358 |
-
</div>
|
359 |
-
<div class=" col s12 m6">
|
360 |
-
<textarea rows="5"
|
361 |
-
placeholder="<?php echo __("Local Server Path or Contents of the SFTP Private Key RSA File", 'xcloner-backup-and-restore') ?>"
|
362 |
-
id="sftp_private_key" type="text" name="xcloner_sftp_private_key"
|
363 |
-
class="validate"
|
364 |
-
value=""><?php echo get_option("xcloner_sftp_private_key") ?></textarea>
|
365 |
-
</div>
|
366 |
-
</div>
|
367 |
-
|
368 |
-
<div class="row">
|
369 |
-
<div class="col s12 m3 label">
|
370 |
-
<label for="sftp_root"><?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore') ?></label>
|
371 |
-
</div>
|
372 |
-
<div class=" col s12 m6">
|
373 |
-
<input placeholder="<?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore') ?>"
|
374 |
-
id="sftp_root" type="text" name="xcloner_sftp_path" class="validate"
|
375 |
-
value="<?php echo get_option("xcloner_sftp_path") ?>">
|
376 |
-
</div>
|
377 |
-
</div>
|
378 |
-
|
379 |
-
<div class="row">
|
380 |
-
<div class="col s12 m3 label">
|
381 |
-
<label for="sftp_timeout"><?php echo __("SFTP Timeout", 'xcloner-backup-and-restore') ?></label>
|
382 |
-
</div>
|
383 |
-
<div class=" col s12 m2">
|
384 |
-
<input placeholder="<?php echo __("SFTP Timeout", 'xcloner-backup-and-restore') ?>"
|
385 |
-
id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate"
|
386 |
-
value="<?php echo get_option("xcloner_sftp_timeout", 30) ?>">
|
387 |
-
</div>
|
388 |
-
</div>
|
389 |
-
|
390 |
-
<?=common_cleanup_html('sftp')?>
|
391 |
-
|
392 |
-
<div class="row">
|
393 |
-
<div class="col s6 m4">
|
394 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
395 |
-
value="sftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
396 |
-
<i class="material-icons right">save</i>
|
397 |
-
</button>
|
398 |
-
</div>
|
399 |
-
<div class="col s6 m4">
|
400 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
401 |
-
id="action" value="sftp"
|
402 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
403 |
-
<i class="material-icons right">import_export</i>
|
404 |
-
</button>
|
405 |
-
</div>
|
406 |
-
</div>
|
407 |
-
|
408 |
-
</div>
|
409 |
</li>
|
410 |
|
411 |
<!-- AWS STORAGE-->
|
412 |
<li id="aws">
|
413 |
-
|
414 |
-
<i class="material-icons">computer</i><?php echo __("Amazon S3 Storage", 'xcloner-backup-and-restore') ?>
|
415 |
-
<div class="switch right">
|
416 |
-
<label>
|
417 |
-
Off
|
418 |
-
<input type="checkbox" name="xcloner_aws_enable" class="status"
|
419 |
-
value="1" <?php if (get_option("xcloner_aws_enable")) {
|
420 |
-
echo "checked";
|
421 |
-
} ?> \>
|
422 |
-
<span class="lever"></span>
|
423 |
-
On
|
424 |
-
</label>
|
425 |
-
</div>
|
426 |
-
</div>
|
427 |
-
<div class="collapsible-body">
|
428 |
-
|
429 |
-
<div class="row">
|
430 |
-
<div class="col s12 m3 label">
|
431 |
-
|
432 |
-
</div>
|
433 |
-
<div class=" col s12 m6">
|
434 |
-
<p>
|
435 |
-
<?php echo sprintf(__('Visit %s and get your "Key" and "Secret <br />Visit %s to install your own S3 like service.'), "<a href='https://aws.amazon.com/s3/' target='_blank'>https://aws.amazon.com/s3/</a>", "<a href='https://minio.io/' target='_blank'>https://minio.io/</a>") ?>
|
436 |
-
</p>
|
437 |
-
</div>
|
438 |
-
</div>
|
439 |
-
|
440 |
-
<div class="row">
|
441 |
-
<div class="col s12 m3 label">
|
442 |
-
<label for="aws_key"><?php echo __("S3 Key", 'xcloner-backup-and-restore') ?></label>
|
443 |
-
</div>
|
444 |
-
<div class=" col s12 m6">
|
445 |
-
<input placeholder="<?php echo __("S3 Key", 'xcloner-backup-and-restore') ?>"
|
446 |
-
id="aws_key" type="text" name="xcloner_aws_key" class="validate"
|
447 |
-
value="<?php echo get_option("xcloner_aws_key") ?>" autocomplete="off">
|
448 |
-
</div>
|
449 |
-
</div>
|
450 |
-
|
451 |
-
<div class="row">
|
452 |
-
<div class="col s12 m3 label">
|
453 |
-
<label for="aws_secret"><?php echo __("S3 Secret", 'xcloner-backup-and-restore') ?></label>
|
454 |
-
</div>
|
455 |
-
<div class=" col s12 m6">
|
456 |
-
<input placeholder="<?php echo __("S3 Secret", 'xcloner-backup-and-restore') ?>"
|
457 |
-
id="aws_secret" type="text" name="xcloner_aws_secret" class="validate"
|
458 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_aws_secret"))) ?>"
|
459 |
-
autocomplete="off">
|
460 |
-
</div>
|
461 |
-
</div>
|
462 |
-
|
463 |
-
<div class="row">
|
464 |
-
<div class="col s12 m3 label">
|
465 |
-
<label for="aws_region"><?php echo __("S3 Region", 'xcloner-backup-and-restore') ?></label>
|
466 |
-
</div>
|
467 |
-
<div class=" col s12 m6">
|
468 |
-
<select placeholder="<?php echo __("example: us-east-1", 'xcloner-backup-and-restore') ?>"
|
469 |
-
id="aws_region" type="text" name="xcloner_aws_region" class="validate"
|
470 |
-
value="<?php echo get_option("xcloner_aws_region") ?>" autocomplete="off">
|
471 |
-
<option readonly
|
472 |
-
value=""><?php echo __("Please Select AWS S3 Region or Leave Unselected for Custom Endpoint") ?></option>
|
473 |
-
<?php
|
474 |
-
$aws_regions = $remote_storage->get_aws_regions();
|
475 |
-
|
476 |
-
foreach ($aws_regions as $key => $region) {
|
477 |
-
?>
|
478 |
-
<option value="<?php echo $key ?>" <?php echo($key == get_option('xcloner_aws_region') ? "selected" : "") ?>><?php echo $region ?>
|
479 |
-
= <?php echo $key ?></option>
|
480 |
-
<?php
|
481 |
-
}
|
482 |
-
?>
|
483 |
-
</select>
|
484 |
-
</div>
|
485 |
-
</div>
|
486 |
-
|
487 |
-
<div id="custom_aws_endpoint">
|
488 |
-
<div class="row">
|
489 |
-
<div class="col s12 m3 label">
|
490 |
-
<label for="aws_endpoint"><?php echo __("S3 EndPoint", 'xcloner-backup-and-restore') ?></label>
|
491 |
-
</div>
|
492 |
-
<div class=" col s12 m6">
|
493 |
-
<input placeholder="<?php echo __("S3 EndPoint, leave blank if you want to use the default Amazon AWS Service", 'xcloner-backup-and-restore') ?>"
|
494 |
-
id="aws_endpoint" type="text" name="xcloner_aws_endpoint" class="validate"
|
495 |
-
value="<?php echo get_option("xcloner_aws_endpoint") ?>" autocomplete="off">
|
496 |
-
</div>
|
497 |
-
</div>
|
498 |
-
<div class="row">
|
499 |
-
<div class="col s12 m3 label">
|
500 |
-
<label for="aws_region"><?php echo __("S3 Custom Region", 'xcloner-backup-and-restore') ?></label>
|
501 |
-
</div>
|
502 |
-
<div class=" col s12 m6">
|
503 |
-
<input placeholder="<?php echo __("S3 Custom Region, ex: af-south-1", 'xcloner-backup-and-restore') ?>"
|
504 |
-
id="aws_region" type="text" name="xcloner_aws_region" class="validate"
|
505 |
-
value="<?php echo get_option("xcloner_aws_region") ?>" autocomplete="off">
|
506 |
-
</div>
|
507 |
-
</div>
|
508 |
-
</div>
|
509 |
-
|
510 |
-
<div class="row">
|
511 |
-
<div class="col s12 m3 label">
|
512 |
-
<label for="aws_bucket_name"><?php echo __("S3 Bucket Name", 'xcloner-backup-and-restore') ?></label>
|
513 |
-
</div>
|
514 |
-
<div class=" col s12 m6">
|
515 |
-
<input placeholder="<?php echo __("S3 Bucket Name", 'xcloner-backup-and-restore') ?>"
|
516 |
-
id="aws_bucket_name" type="text" name="xcloner_aws_bucket_name" class="validate"
|
517 |
-
value="<?php echo get_option("xcloner_aws_bucket_name") ?>" autocomplete="off">
|
518 |
-
</div>
|
519 |
-
</div>
|
520 |
-
|
521 |
-
<div class="row">
|
522 |
-
<div class="col s12 m3 label">
|
523 |
-
<label for="aws_prefix"><?php echo __("S3 Prefix", 'xcloner-backup-and-restore') ?></label>
|
524 |
-
</div>
|
525 |
-
<div class=" col s12 m6">
|
526 |
-
<input placeholder="<?php echo __("S3 Prefix, use / ending to define a folder", 'xcloner-backup-and-restore') ?>"
|
527 |
-
id="aws_prefix" type="text" name="xcloner_aws_prefix" class="validate"
|
528 |
-
value="<?php echo get_option("xcloner_aws_prefix") ?>" autocomplete="off">
|
529 |
-
</div>
|
530 |
-
</div>
|
531 |
-
|
532 |
-
<?=common_cleanup_html('aws')?>
|
533 |
-
|
534 |
-
<div class="row">
|
535 |
-
<div class="col s6 m4">
|
536 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
537 |
-
value="aws"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
538 |
-
<i class="material-icons right">save</i>
|
539 |
-
</button>
|
540 |
-
</div>
|
541 |
-
<div class="col s6 m4">
|
542 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
543 |
-
id="action" value="aws"
|
544 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
545 |
-
<i class="material-icons right">import_export</i>
|
546 |
-
</button>
|
547 |
-
</div>
|
548 |
-
</div>
|
549 |
-
|
550 |
-
</div>
|
551 |
-
</li>
|
552 |
-
|
553 |
-
<!-- DROPBOX STORAGE-->
|
554 |
-
<li id="dropbox">
|
555 |
-
<div class="collapsible-header">
|
556 |
-
<i class="material-icons">computer</i><?php echo __("Dropbox Storage", 'xcloner-backup-and-restore') ?>
|
557 |
-
<div class="switch right">
|
558 |
-
<label>
|
559 |
-
Off
|
560 |
-
<input type="checkbox" name="xcloner_dropbox_enable" class="status"
|
561 |
-
value="1" <?php if (get_option("xcloner_dropbox_enable")) {
|
562 |
-
echo "checked";
|
563 |
-
} ?> \>
|
564 |
-
<span class="lever"></span>
|
565 |
-
On
|
566 |
-
</label>
|
567 |
-
</div>
|
568 |
-
</div>
|
569 |
-
<div class="collapsible-body">
|
570 |
-
|
571 |
-
<div class="row">
|
572 |
-
<div class="col s12 m3 label">
|
573 |
-
|
574 |
-
</div>
|
575 |
-
<div class=" col s12 m6">
|
576 |
-
<p>
|
577 |
-
<?php echo sprintf(__('Visit %s and get your "App secret".'), "<a href='https://www.dropbox.com/developers/apps' target='_blank'>https://www.dropbox.com/developers/apps</a>") ?>
|
578 |
-
</p>
|
579 |
-
</div>
|
580 |
-
</div>
|
581 |
-
|
582 |
-
<div class="row">
|
583 |
-
<div class="col s12 m3 label">
|
584 |
-
<label for="dropbox_access_token"><?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore') ?></label>
|
585 |
-
</div>
|
586 |
-
<div class=" col s12 m6">
|
587 |
-
<input placeholder="<?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore') ?>"
|
588 |
-
id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token"
|
589 |
-
class="validate"
|
590 |
-
value="<?php echo get_option("xcloner_dropbox_access_token") ?>"
|
591 |
-
autocomplete="off">
|
592 |
-
</div>
|
593 |
-
</div>
|
594 |
-
|
595 |
-
|
596 |
-
<div class="row">
|
597 |
-
<div class="col s12 m3 label">
|
598 |
-
<label for="dropbox_app_secret"><?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore') ?></label>
|
599 |
-
</div>
|
600 |
-
<div class=" col s12 m6">
|
601 |
-
<input placeholder="<?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore') ?>"
|
602 |
-
id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret"
|
603 |
-
class="validate"
|
604 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_dropbox_app_secret"))) ?>"
|
605 |
-
autocomplete="off">
|
606 |
-
</div>
|
607 |
-
</div>
|
608 |
-
|
609 |
-
<div class="row">
|
610 |
-
<div class="col s12 m3 label">
|
611 |
-
<label for="dropbox_prefix"><?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore') ?></label>
|
612 |
-
</div>
|
613 |
-
<div class=" col s12 m6">
|
614 |
-
<input placeholder="<?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore') ?>"
|
615 |
-
id="dropbox_prefix" type="text" name="xcloner_dropbox_prefix" class="validate"
|
616 |
-
value="<?php echo get_option("xcloner_dropbox_prefix") ?>">
|
617 |
-
</div>
|
618 |
-
</div>
|
619 |
-
|
620 |
-
<?=common_cleanup_html('dropbox')?>
|
621 |
-
|
622 |
-
<div class="row">
|
623 |
-
<div class="col s6 m4">
|
624 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
625 |
-
value="dropbox"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
626 |
-
<i class="material-icons right">save</i>
|
627 |
-
</button>
|
628 |
-
</div>
|
629 |
-
<div class="col s6 m4">
|
630 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
631 |
-
id="action" value="dropbox"
|
632 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
633 |
-
<i class="material-icons right">import_export</i>
|
634 |
-
</button>
|
635 |
-
</div>
|
636 |
-
</div>
|
637 |
-
|
638 |
-
</div>
|
639 |
-
</li>
|
640 |
-
|
641 |
-
<!-- ONEDRIVE STORAGE-->
|
642 |
-
<li id="onedrive">
|
643 |
-
<div class="collapsible-header">
|
644 |
-
<i class="material-icons">computer</i><?php echo __("OneDrive Storage", 'xcloner-backup-and-restore') ?>
|
645 |
-
<div class="switch right">
|
646 |
-
<label>
|
647 |
-
Off
|
648 |
-
<input type="checkbox" name="xcloner_onedrive_enable" class="status"
|
649 |
-
value="1" <?php if (get_option("xcloner_onedrive_enable")) {
|
650 |
-
echo "checked";
|
651 |
-
} ?> \>
|
652 |
-
<span class="lever"></span>
|
653 |
-
On
|
654 |
-
</label>
|
655 |
-
</div>
|
656 |
-
</div>
|
657 |
-
<div class="collapsible-body">
|
658 |
-
|
659 |
-
<div class="row">
|
660 |
-
<div class="col s12 m3 label">
|
661 |
-
|
662 |
-
</div>
|
663 |
-
<div class=" col s12 m6">
|
664 |
-
<p>
|
665 |
-
<?php echo sprintf(__('Visit <a href="%s" target="_blank">Microsoft Azure App Registrations</a> and get your Client ID and Client Secret. More details on setting up the code flow authentication can be found <a href="%s">here</a>.
|
666 |
-
Make sure to also add the %s to the Authentication->Redirect URIs area', 'xcloner-backup-and-restore'), 'https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade', 'https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online#code-flow', get_admin_url()) ?>
|
667 |
-
</p>
|
668 |
-
</div>
|
669 |
-
</div>
|
670 |
-
|
671 |
-
<div class="row">
|
672 |
-
<div class="col s12 m3 label">
|
673 |
-
<label for="onedrive_client_id"><?php echo __("OneDrive Client ID", 'xcloner-backup-and-restore') ?></label>
|
674 |
-
</div>
|
675 |
-
<div class=" col s12 m6">
|
676 |
-
<input placeholder="<?php echo __("OneDrive Client ID", 'xcloner-backup-and-restore') ?>"
|
677 |
-
id="onedrive_client_id" type="text" name="xcloner_onedrive_client_id" class="validate"
|
678 |
-
value="<?=get_option("xcloner_onedrive_client_id") ?>"
|
679 |
-
autocomplete="off">
|
680 |
-
</div>
|
681 |
-
</div>
|
682 |
-
|
683 |
-
<div class="row">
|
684 |
-
<div class="col s12 m3 label">
|
685 |
-
<label for="onedrive_client_secret"><?php echo __("OneDrive Client Secret", 'xcloner-backup-and-restore') ?></label>
|
686 |
-
</div>
|
687 |
-
<div class=" col s12 m6">
|
688 |
-
<input placeholder="<?php echo __("OneDrive Client Secret", 'xcloner-backup-and-restore') ?>"
|
689 |
-
id="onedrive_client_secret" type="text" name="xcloner_onedrive_client_secret" class="validate"
|
690 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_onedrive_client_secret"))) ?>"
|
691 |
-
autocomplete="off">
|
692 |
-
</div>
|
693 |
-
</div>
|
694 |
-
|
695 |
-
<div class="row">
|
696 |
-
<div class="col s12 m3 label">
|
697 |
-
|
698 |
-
</div>
|
699 |
-
<div class=" col s12 m6">
|
700 |
-
<a class="btn" target="_blank" id="onedrive_authorization_click"
|
701 |
-
onclick="jQuery(this).attr('href', jQuery(this).attr('target_href') + '&client_id=' + jQuery('#onedrive_client_id').val());
|
702 |
-
jQuery('.onedrive-action').click()"
|
703 |
-
href="#"
|
704 |
-
target_href="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=offline_access files.readwrite.all files.read files.read.all files.readwrite&response_type=code&redirect_uri=<?=get_admin_url('')?>"><?php echo sprintf(__('Authorize OneDrive', 'xcloner-backup-and-restore')) ?></a>
|
705 |
-
|
706 |
-
</div>
|
707 |
-
</div>
|
708 |
-
|
709 |
-
<div class="row">
|
710 |
-
<div class="col s12 m3 label">
|
711 |
-
<label for="onedrive_path"><?php echo __("OneDrive Storage Folder", 'xcloner-backup-and-restore') ?></label>
|
712 |
-
</div>
|
713 |
-
<div class=" col s12 m6">
|
714 |
-
<input placeholder="<?php echo __("OneDrive Storage Folder Path", 'xcloner-backup-and-restore') ?>"
|
715 |
-
id="onedrive_path" type="text" name="xcloner_onedrive_path" class="validate"
|
716 |
-
value="<?php echo get_option("xcloner_onedrive_path") ?>">
|
717 |
-
</div>
|
718 |
-
</div>
|
719 |
-
|
720 |
-
<?=common_cleanup_html('onedrive')?>
|
721 |
-
|
722 |
-
<div class="row">
|
723 |
-
<div class="col s6 m4">
|
724 |
-
<button class="btn waves-effect waves-light onedrive-action" type="submit" name="action" id="action"
|
725 |
-
value="onedrive"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
726 |
-
<i class="material-icons right">save</i>
|
727 |
-
</button>
|
728 |
-
</div>
|
729 |
-
<div class="col s6 m4">
|
730 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
731 |
-
id="action" value="onedrive"
|
732 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
733 |
-
<i class="material-icons right">import_export</i>
|
734 |
-
</button>
|
735 |
-
</div>
|
736 |
-
</div>
|
737 |
-
|
738 |
-
</div>
|
739 |
</li>
|
740 |
|
741 |
<!-- AZURE STORAGE-->
|
742 |
<li id="azure">
|
743 |
-
|
744 |
-
<i class="material-icons">computer</i><?php echo __("Azure Blob Storage", 'xcloner-backup-and-restore') ?>
|
745 |
-
<div class="switch right">
|
746 |
-
<label>
|
747 |
-
Off
|
748 |
-
<input type="checkbox" name="xcloner_azure_enable" class="status"
|
749 |
-
value="1" <?php if (get_option("xcloner_azure_enable")) {
|
750 |
-
echo "checked";
|
751 |
-
} ?> \>
|
752 |
-
<span class="lever"></span>
|
753 |
-
On
|
754 |
-
</label>
|
755 |
-
</div>
|
756 |
-
</div>
|
757 |
-
<div class="collapsible-body">
|
758 |
-
|
759 |
-
<div class="row">
|
760 |
-
<div class="col s12 m3 label">
|
761 |
-
|
762 |
-
</div>
|
763 |
-
<div class=" col s12 m6">
|
764 |
-
<p>
|
765 |
-
<?php echo sprintf(__('Visit %s and get your "Api Key".', 'xcloner-backup-and-restore'), '<a href="https://azure.microsoft.com/en-us/services/storage/blobs/" target="_blank">https://azure.microsoft.com/en-us/services/storage/blobs/</a>') ?>
|
766 |
-
</p>
|
767 |
-
</div>
|
768 |
-
</div>
|
769 |
-
|
770 |
-
<div class="row">
|
771 |
-
<div class="col s12 m3 label">
|
772 |
-
<label for="azure_account_name"><?php echo __("Azure Account Name", 'xcloner-backup-and-restore') ?></label>
|
773 |
-
</div>
|
774 |
-
<div class=" col s12 m6">
|
775 |
-
<input placeholder="<?php echo __("Azure Account Name", 'xcloner-backup-and-restore') ?>"
|
776 |
-
id="azure_account_name" type="text" name="xcloner_azure_account_name"
|
777 |
-
class="validate" value="<?php echo get_option("xcloner_azure_account_name") ?>"
|
778 |
-
autocomplete="off">
|
779 |
-
</div>
|
780 |
-
</div>
|
781 |
-
|
782 |
-
|
783 |
-
<div class="row">
|
784 |
-
<div class="col s12 m3 label">
|
785 |
-
<label for="azure_api_key"><?php echo __("Azure Api Key", 'xcloner-backup-and-restore') ?></label>
|
786 |
-
</div>
|
787 |
-
<div class=" col s12 m6">
|
788 |
-
<input placeholder="<?php echo __("Azure Api Key", 'xcloner-backup-and-restore') ?>"
|
789 |
-
id="azure_api_key" type="text" name="xcloner_azure_api_key" class="validate"
|
790 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_azure_api_key"))) ?>"
|
791 |
-
autocomplete="off">
|
792 |
-
</div>
|
793 |
-
</div>
|
794 |
-
|
795 |
-
<div class="row">
|
796 |
-
<div class="col s12 m3 label">
|
797 |
-
<label for="azure_container"><?php echo __("Azure Container", 'xcloner-backup-and-restore') ?></label>
|
798 |
-
</div>
|
799 |
-
<div class=" col s12 m6">
|
800 |
-
<input placeholder="<?php echo __("Azure Container", 'xcloner-backup-and-restore') ?>"
|
801 |
-
id="azure_container" type="text" name="xcloner_azure_container" class="validate"
|
802 |
-
value="<?php echo get_option("xcloner_azure_container") ?>">
|
803 |
-
</div>
|
804 |
-
</div>
|
805 |
-
|
806 |
-
<?=common_cleanup_html('azure')?>
|
807 |
-
|
808 |
-
<div class="row">
|
809 |
-
<div class="col s6 m4">
|
810 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
811 |
-
value="azure"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
812 |
-
<i class="material-icons right">save</i>
|
813 |
-
</button>
|
814 |
-
</div>
|
815 |
-
<div class="col s6 m4">
|
816 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
817 |
-
id="action" value="azure"
|
818 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
819 |
-
<i class="material-icons right">import_export</i>
|
820 |
-
</button>
|
821 |
-
</div>
|
822 |
-
</div>
|
823 |
-
|
824 |
-
</div>
|
825 |
</li>
|
826 |
|
827 |
<!-- BACKBLAZE STORAGE-->
|
828 |
<li id="backblaze">
|
829 |
-
|
830 |
-
<i class="material-icons">computer</i><?php echo __("Backblaze B2 Storage", 'xcloner-backup-and-restore') ?>
|
831 |
-
<div class="switch right">
|
832 |
-
<label>
|
833 |
-
Off
|
834 |
-
<input type="checkbox" name="xcloner_backblaze_enable" class="status"
|
835 |
-
value="1" <?php if (get_option("xcloner_backblaze_enable")) {
|
836 |
-
echo "checked";
|
837 |
-
} ?> \>
|
838 |
-
<span class="lever"></span>
|
839 |
-
On
|
840 |
-
</label>
|
841 |
-
</div>
|
842 |
-
</div>
|
843 |
-
<div class="collapsible-body">
|
844 |
-
|
845 |
-
<div class="row">
|
846 |
-
<div class="col s12 m3 label">
|
847 |
-
|
848 |
-
</div>
|
849 |
-
<div class=" col s12 m6">
|
850 |
-
<p>
|
851 |
-
<?php echo sprintf(__('Visit %s and get your KeyID and applicationKey.', 'xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>') ?>
|
852 |
-
</p>
|
853 |
-
</div>
|
854 |
-
</div>
|
855 |
-
|
856 |
-
<div class="row">
|
857 |
-
<div class="col s12 m3 label">
|
858 |
-
<label for="backblaze_account_id"><?php echo __("Backblaze KeyID", 'xcloner-backup-and-restore') ?></label>
|
859 |
-
</div>
|
860 |
-
<div class=" col s12 m6">
|
861 |
-
<input placeholder="<?php echo __("Backblaze KeyID", 'xcloner-backup-and-restore') ?>"
|
862 |
-
id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id"
|
863 |
-
class="validate"
|
864 |
-
value="<?php echo get_option("xcloner_backblaze_account_id") ?>"
|
865 |
-
autocomplete="off">
|
866 |
-
</div>
|
867 |
-
</div>
|
868 |
-
|
869 |
-
|
870 |
-
<div class="row">
|
871 |
-
<div class="col s12 m3 label">
|
872 |
-
<label for="backblaze_application_key"><?php echo __("Backblaze applicationKey", 'xcloner-backup-and-restore') ?></label>
|
873 |
-
</div>
|
874 |
-
<div class=" col s12 m6">
|
875 |
-
<input placeholder="<?php echo __("Backblaze applicationKey", 'xcloner-backup-and-restore') ?>"
|
876 |
-
id="backblaze_application_key" type="text"
|
877 |
-
name="xcloner_backblaze_application_key" class="validate"
|
878 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_backblaze_application_key"))) ?>"
|
879 |
-
autocomplete="off">
|
880 |
-
</div>
|
881 |
-
</div>
|
882 |
-
|
883 |
-
<div class="row">
|
884 |
-
<div class="col s12 m3 label">
|
885 |
-
<label for="backblaze_bucket_name"><?php echo __("Backblaze Bucket Name", 'xcloner-backup-and-restore') ?></label>
|
886 |
-
</div>
|
887 |
-
<div class=" col s12 m6">
|
888 |
-
<input placeholder="<?php echo __("Backblaze Bucket Name", 'xcloner-backup-and-restore') ?>"
|
889 |
-
id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name"
|
890 |
-
class="validate"
|
891 |
-
value="<?php echo get_option("xcloner_backblaze_bucket_name") ?>"
|
892 |
-
autocomplete="off">
|
893 |
-
</div>
|
894 |
-
</div>
|
895 |
-
|
896 |
-
<?=common_cleanup_html('backblaze')?>
|
897 |
-
|
898 |
-
<div class="row">
|
899 |
-
<div class="col s6 m4">
|
900 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
901 |
-
value="backblaze"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
902 |
-
<i class="material-icons right">save</i>
|
903 |
-
</button>
|
904 |
-
</div>
|
905 |
-
<div class="col s6 m4">
|
906 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
907 |
-
id="action" value="backblaze"
|
908 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
909 |
-
<i class="material-icons right">import_export</i>
|
910 |
-
</button>
|
911 |
-
</div>
|
912 |
-
</div>
|
913 |
-
|
914 |
-
</div>
|
915 |
</li>
|
916 |
|
917 |
-
<!--
|
918 |
-
<li id="
|
919 |
-
|
920 |
-
|
921 |
-
<div class="switch right">
|
922 |
-
<label>
|
923 |
-
Off
|
924 |
-
<input type="checkbox" name="xcloner_webdav_enable" class="status"
|
925 |
-
value="1" <?php if (get_option("xcloner_webdav_enable")) {
|
926 |
-
echo "checked";
|
927 |
-
} ?> \>
|
928 |
-
<span class="lever"></span>
|
929 |
-
On
|
930 |
-
</label>
|
931 |
-
</div>
|
932 |
-
</div>
|
933 |
-
<div class="collapsible-body">
|
934 |
-
|
935 |
-
<div class="row">
|
936 |
-
<div class="col s12 m3 label">
|
937 |
-
|
938 |
-
</div>
|
939 |
-
<div class=" col s12 m6">
|
940 |
-
<p>
|
941 |
-
<?php //echo sprintf(__('Visit %s and get your Account Id and Application Key.','xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>')?>
|
942 |
-
</p>
|
943 |
-
</div>
|
944 |
-
</div>
|
945 |
-
|
946 |
-
<div class="row">
|
947 |
-
<div class="col s12 m3 label">
|
948 |
-
<label for="webdav_url"><?php echo __("WebDAV Base Url", 'xcloner-backup-and-restore') ?></label>
|
949 |
-
</div>
|
950 |
-
<div class=" col s12 m6">
|
951 |
-
<input placeholder="<?php echo __("WebDAV Base Url", 'xcloner-backup-and-restore') ?>"
|
952 |
-
id="webdav_url" type="text" name="xcloner_webdav_url" class="validate"
|
953 |
-
value="<?php echo get_option("xcloner_webdav_url") ?>" autocomplete="off">
|
954 |
-
</div>
|
955 |
-
</div>
|
956 |
-
|
957 |
-
<div class="row">
|
958 |
-
<div class="col s12 m3 label">
|
959 |
-
<label for="webdav_username"><?php echo __("WebDAV Username", 'xcloner-backup-and-restore') ?></label>
|
960 |
-
</div>
|
961 |
-
<div class=" col s12 m6">
|
962 |
-
<input placeholder="<?php echo __("WebDAV Username", 'xcloner-backup-and-restore') ?>"
|
963 |
-
id="webdav_username" type="text" name="xcloner_webdav_username" class="validate"
|
964 |
-
value="<?php echo get_option("xcloner_webdav_username") ?>" autocomplete="off">
|
965 |
-
</div>
|
966 |
-
</div>
|
967 |
-
|
968 |
-
<div class="row">
|
969 |
-
<div class="col s12 m3 label">
|
970 |
-
<label for="webdav_password"><?php echo __("WebDAV Password", 'xcloner-backup-and-restore') ?></label>
|
971 |
-
</div>
|
972 |
-
<div class=" col s12 m6">
|
973 |
-
<input placeholder="<?php echo __("WebDAV Password", 'xcloner-backup-and-restore') ?>"
|
974 |
-
id="webdav_password" type="text" name="xcloner_webdav_password"
|
975 |
-
class="validate"
|
976 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_webdav_password"))) ?>"
|
977 |
-
autocomplete="off">
|
978 |
-
</div>
|
979 |
-
</div>
|
980 |
-
|
981 |
-
<div class="row">
|
982 |
-
<div class="col s12 m3 label">
|
983 |
-
<label for="webdav_target_folder"><?php echo __("WebDAV Target Folder", 'xcloner-backup-and-restore') ?></label>
|
984 |
-
</div>
|
985 |
-
<div class=" col s12 m6">
|
986 |
-
<input placeholder="<?php echo __("WebDAV Target Folder", 'xcloner-backup-and-restore') ?>"
|
987 |
-
id="webdav_target_folder" type="text" name="xcloner_webdav_target_folder"
|
988 |
-
class="validate"
|
989 |
-
value="<?php echo get_option("xcloner_webdav_target_folder") ?>"
|
990 |
-
autocomplete="off">
|
991 |
-
</div>
|
992 |
-
</div>
|
993 |
-
|
994 |
-
<?=common_cleanup_html('webdav')?>
|
995 |
-
|
996 |
-
<div class="row">
|
997 |
-
<div class="col s6 m4">
|
998 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
999 |
-
value="webdav"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
1000 |
-
<i class="material-icons right">save</i>
|
1001 |
-
</button>
|
1002 |
-
</div>
|
1003 |
-
<div class="col s6 m4">
|
1004 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
1005 |
-
id="action" value="webdav"
|
1006 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
1007 |
-
<i class="material-icons right">import_export</i>
|
1008 |
-
</button>
|
1009 |
-
</div>
|
1010 |
-
</div>
|
1011 |
|
1012 |
-
|
|
|
|
|
1013 |
</li>
|
1014 |
|
1015 |
<!-- Google DRIVE STORAGE-->
|
1016 |
<li id="gdrive">
|
1017 |
-
|
1018 |
-
|
1019 |
-
<?php if ($gdrive_construct): ?>
|
1020 |
-
<div class="switch right">
|
1021 |
-
<label>
|
1022 |
-
Off
|
1023 |
-
<input type="checkbox" name="xcloner_gdrive_enable" class="status"
|
1024 |
-
value="1" <?php if (get_option("xcloner_gdrive_enable")) {
|
1025 |
-
echo "checked";
|
1026 |
-
} ?> \>
|
1027 |
-
<span class="lever"></span>
|
1028 |
-
On
|
1029 |
-
</label>
|
1030 |
-
</div>
|
1031 |
-
<?php endif ?>
|
1032 |
-
</div>
|
1033 |
-
<div class="collapsible-body">
|
1034 |
-
|
1035 |
-
<?php if ($gdrive_construct) : ?>
|
1036 |
-
|
1037 |
-
<div class="row">
|
1038 |
-
<div class="col s12 m3 label">
|
1039 |
-
|
1040 |
-
</div>
|
1041 |
-
<div class=" col s12 m9">
|
1042 |
-
<p>
|
1043 |
-
<?php echo sprintf(__('Visit %s to create a new application and get your Client ID and Client Secret.', 'xcloner-backup-and-restore'), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>') ?>
|
1044 |
-
<a href="https://youtu.be/kBxf-39F4Nw" target="_blank"
|
1045 |
-
class="btn-floating tooltipped btn-small" data-position="right"
|
1046 |
-
data-delay="50" data-html="true"
|
1047 |
-
data-tooltip="<?php echo sprintf(__('Click here to view a short video explaining how to create the Client ID and Client Secret as well as connecting XCloner with the Google Drive API %s', 'xcloner-backup-and-restore'), "<br />https://youtu.be/kBxf-39F4Nw") ?>"
|
1048 |
-
data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i
|
1049 |
-
class="material-icons">help_outline</i></a>
|
1050 |
-
</p>
|
1051 |
-
</div>
|
1052 |
-
</div>
|
1053 |
-
|
1054 |
-
<div class="row">
|
1055 |
-
<div class="col s12 m3 label">
|
1056 |
-
<label for="gdrive_client_id"><?php echo __("Client ID", 'xcloner-backup-and-restore') ?></label>
|
1057 |
-
</div>
|
1058 |
-
<div class=" col s12 m6">
|
1059 |
-
<input placeholder="<?php echo __("Google Client ID", 'xcloner-backup-and-restore') ?>"
|
1060 |
-
id="gdrive_client_id" type="text" name="xcloner_gdrive_client_id"
|
1061 |
-
class="validate"
|
1062 |
-
value="<?php echo get_option("xcloner_gdrive_client_id") ?>">
|
1063 |
-
</div>
|
1064 |
-
</div>
|
1065 |
-
|
1066 |
-
<div class="row">
|
1067 |
-
<div class="col s12 m3 label">
|
1068 |
-
<label for="gdrive_client_secret"><?php echo __("Client Secret", 'xcloner-backup-and-restore') ?></label>
|
1069 |
-
</div>
|
1070 |
-
<div class=" col s12 m6">
|
1071 |
-
<input placeholder="<?php echo __("Google Client Secret", 'xcloner-backup-and-restore') ?>"
|
1072 |
-
id="gdrive_client_secret" type="text" name="xcloner_gdrive_client_secret"
|
1073 |
-
class="validate"
|
1074 |
-
value="<?php echo str_repeat('*', strlen(get_option("xcloner_gdrive_client_secret"))) ?>">
|
1075 |
-
</div>
|
1076 |
-
</div>
|
1077 |
-
|
1078 |
-
|
1079 |
-
<div class="row">
|
1080 |
-
<div class="col s12 m3 label">
|
1081 |
-
|
1082 |
-
</div>
|
1083 |
-
<div class=" col s12 m6">
|
1084 |
-
<a class="btn" target="_blank" id="gdrive_authorization_click"
|
1085 |
-
onclick="jQuery('#authentification_code').show()"
|
1086 |
-
href="<?php echo $gdrive_auth_url ?>"><?php echo sprintf(__('Authorize Google Drive', 'xcloner-backup-and-restore')) ?></a>
|
1087 |
-
<input type="text" name="authentification_code" id="authentification_code"
|
1088 |
-
placeholder="<?php echo __("Paste Authorization Code Here", "xcloner-backup-and-restore") ?>">
|
1089 |
-
</div>
|
1090 |
-
</div>
|
1091 |
-
|
1092 |
-
<div class="row">
|
1093 |
-
<div class="col s12 m3 label">
|
1094 |
-
<label for="gdrive_target_folder"><?php echo __("Folder ID or Root Path", 'xcloner-backup-and-restore') ?>
|
1095 |
-
<a class="btn-floating tooltipped btn-small" data-position="right"
|
1096 |
-
data-delay="50" data-html="true" \
|
1097 |
-
data-tooltip="<?php echo __('Folder ID can be found by right clicking on the folder name and selecting \'Get shareable link\' menu, format https://drive.google.com/open?id={FOLDER_ID}<br />
|
1098 |
-
If you supply a folder name, it has to exists in the drive root and start with / , example /backups.xcloner.com/', 'xcloner-backup-and-restore') ?>"
|
1099 |
-
data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i
|
1100 |
-
class="material-icons">help_outline</i></a>
|
1101 |
-
</label>
|
1102 |
-
</div>
|
1103 |
-
<div class=" col s12 m6">
|
1104 |
-
<input placeholder="<?php echo __("Target Folder ID or Root Path", 'xcloner-backup-and-restore') ?>"
|
1105 |
-
id="gdrive_target_folder" type="text" name="xcloner_gdrive_target_folder"
|
1106 |
-
class="validate"
|
1107 |
-
value="<?php echo get_option("xcloner_gdrive_target_folder") ?>"
|
1108 |
-
autocomplete="off">
|
1109 |
-
</div>
|
1110 |
-
</div>
|
1111 |
-
|
1112 |
-
<?=common_cleanup_html('gdrive')?>
|
1113 |
-
|
1114 |
-
<div class="row">
|
1115 |
-
<div class="col s12 m3 label">
|
1116 |
-
<label for="gdrive_empty_trash"><?php echo __("Automatically Empty Trash?", 'xcloner-backup-and-restore') ?></label>
|
1117 |
-
</div>
|
1118 |
-
<div class=" col s12 m6 input-field inline">
|
1119 |
-
<p>
|
1120 |
-
<label for="gdrive_empty_trash_off">
|
1121 |
-
<input name="xcloner_gdrive_empty_trash" type="radio" value="0"
|
1122 |
-
id="gdrive_empty_trash_off" <?php if (!get_option("xcloner_gdrive_empty_trash", 0)) {
|
1123 |
-
echo "checked";
|
1124 |
-
} ?> />
|
1125 |
-
<span><?php echo __("Disabled", 'xcloner-backup-and-restore') ?></span>
|
1126 |
-
</label>
|
1127 |
-
</p>
|
1128 |
-
<p>
|
1129 |
-
<label for="gdrive_empty_trash_on">
|
1130 |
-
<input name="xcloner_gdrive_empty_trash" type="radio" value="1"
|
1131 |
-
id="gdrive_empty_trash_on" <?php if (get_option("xcloner_gdrive_empty_trash", 0)) {
|
1132 |
-
echo "checked";
|
1133 |
-
} ?> />
|
1134 |
-
<span><?php echo __("Enabled", 'xcloner-backup-and-restore') ?></span>
|
1135 |
-
</label>
|
1136 |
-
</p>
|
1137 |
-
</div>
|
1138 |
-
</div>
|
1139 |
-
|
1140 |
-
<div class="row">
|
1141 |
-
<div class="col s6 m4">
|
1142 |
-
<button class="btn waves-effect waves-light" type="submit" name="action" id="action"
|
1143 |
-
value="gdrive"><?php echo __("Save Settings", 'xcloner-backup-and-restore') ?>
|
1144 |
-
<i class="material-icons right">save</i>
|
1145 |
-
</button>
|
1146 |
-
</div>
|
1147 |
-
<div class="col s6 m4">
|
1148 |
-
<button class="btn waves-effect waves-light orange" type="submit" name="action"
|
1149 |
-
id="action" value="gdrive"
|
1150 |
-
onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore') ?>
|
1151 |
-
<i class="material-icons right">import_export</i>
|
1152 |
-
</button>
|
1153 |
-
</div>
|
1154 |
-
</div>
|
1155 |
-
<?php else: ?>
|
1156 |
-
|
1157 |
-
<div class="row">
|
1158 |
-
<div class=" col s12">
|
1159 |
-
<div class="center">
|
1160 |
-
<?php
|
1161 |
-
$url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=xcloner-google-drive'), 'install-plugin_xcloner-google-drive');
|
1162 |
-
?>
|
1163 |
-
<h6><?php echo __("This storage option requires the XCloner-Google-Drive Wordpress Plugin to be installed and activated.") ?></h6>
|
1164 |
-
<h6><?php echo __("PHP 5.5 minimum version is required.") ?></h6>
|
1165 |
-
<br/>
|
1166 |
-
<a class="install-now btn" data-slug="xcloner-google-drive"
|
1167 |
-
href="<?php echo $url; ?>"
|
1168 |
-
aria-label="Install XCloner Google Drive 1.0.0 now"
|
1169 |
-
data-name="XCloner Google Drive 1.0.0">
|
1170 |
-
<?php echo sprintf(__('Install Now', 'xcloner-backup-and-restore')) ?>
|
1171 |
-
</a>
|
1172 |
-
|
1173 |
-
<a href="<?php echo admin_url("plugin-install.php") ?>?tab=plugin-information&plugin=xcloner-google-drive&TB_iframe=true&width=772&height=499"
|
1174 |
-
class="btn thickbox open-plugin-details-modal"
|
1175 |
-
aria-label="More information about Theme Check 20160523.1"
|
1176 |
-
data-title="Theme Check 20160523.1">
|
1177 |
-
<!--
|
1178 |
-
<a class="btn" href="https://github.com/ovidiul/XCloner-Google-Drive/archive/master.zip">
|
1179 |
-
-->
|
1180 |
-
<?php echo sprintf(__('More Details', 'xcloner-backup-and-restore')) ?>
|
1181 |
-
</a>
|
1182 |
-
</div>
|
1183 |
-
</div>
|
1184 |
-
</div>
|
1185 |
|
1186 |
-
|
|
|
|
|
|
|
1187 |
|
1188 |
-
|
|
|
|
|
1189 |
</li>
|
1190 |
|
|
|
|
|
|
|
|
|
1191 |
|
1192 |
</ul>
|
1193 |
</div>
|
@@ -1199,7 +151,7 @@ $common_cleanup_html = ob_get_contents();
|
|
1199 |
function checkEndpoint() {
|
1200 |
if (jQuery("#aws_region").val() != "") {
|
1201 |
jQuery('#custom_aws_endpoint').hide();
|
1202 |
-
jQuery('#custom_aws_endpoint input').attr('disabled','disabled')
|
1203 |
} else {
|
1204 |
jQuery('#custom_aws_endpoint').show();
|
1205 |
jQuery('#custom_aws_endpoint input').removeAttr('disabled')
|
@@ -1210,6 +162,9 @@ $common_cleanup_html = ob_get_contents();
|
|
1210 |
|
1211 |
//var remote_storage = new Xcloner_Remote_Storage();
|
1212 |
|
|
|
|
|
|
|
1213 |
checkEndpoint()
|
1214 |
jQuery("#aws_region").on("change", function () {
|
1215 |
checkEndpoint();
|
@@ -1225,12 +180,38 @@ $common_cleanup_html = ob_get_contents();
|
|
1225 |
window.location.hash = "#" + tag;
|
1226 |
})
|
1227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1228 |
jQuery("#gdrive_authorization_click").on("click", function (e) {
|
1229 |
|
1230 |
var href = (jQuery(this).attr("href"))
|
1231 |
|
1232 |
-
var
|
|
|
1233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1234 |
jQuery(this).attr("href", new_href)
|
1235 |
|
1236 |
});
|
@@ -1245,5 +226,4 @@ $common_cleanup_html = ob_get_contents();
|
|
1245 |
|
1246 |
|
1247 |
});
|
1248 |
-
|
1249 |
-
</script>
|
15 |
{
|
16 |
if ($type == "local") {
|
17 |
$type = "";
|
18 |
+
} else {
|
19 |
$type .= "_";
|
20 |
}
|
21 |
ob_start(); ?>
|
22 |
<!-- Cleanup by Days -->
|
23 |
<div class="row">
|
24 |
+
<div class="col s12 m3 label">
|
25 |
+
<label
|
26 |
+
for="xcloner_{type}_cleanup_retention_limit_days"><?php echo __("Cleanup by Age", 'xcloner-backup-and-restore') ?></label>
|
27 |
+
</div>
|
28 |
+
<div class=" col s12 m6">
|
29 |
+
<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore') ?>"
|
30 |
+
id="xcloner_{type}cleanup_retention_limit_days" type="text"
|
31 |
+
name="xcloner_{type}cleanup_retention_limit_days" class="validate"
|
32 |
+
value="<?php echo get_option("xcloner_".$type."cleanup_retention_limit_days") ?>">
|
33 |
+
</div>
|
34 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
<!-- Cleanup by Quantity -->
|
37 |
+
<div class="row">
|
38 |
+
<div class="col s12 m3 label">
|
39 |
+
<label
|
40 |
+
for="xcloner_{type}_cleanup_retention_limit_archives"><?php echo __("Cleanup by Quantity", 'xcloner-backup-and-restore') ?></label>
|
41 |
+
</div>
|
42 |
+
<div class=" col s12 m6">
|
43 |
+
<input placeholder="<?php echo __("how many backup files to keep", 'xcloner-backup-and-restore') ?>"
|
44 |
+
id="xcloner_{type}cleanup_retention_limit_archives" type="number"
|
45 |
+
name="xcloner_{type}cleanup_retention_limit_archives" class="validate"
|
46 |
+
value="<?php echo get_option("xcloner_".$type."cleanup_retention_limit_archives") ?>">
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
<!-- Cleanup by Capacity -->
|
51 |
+
<div class="row">
|
52 |
+
<div class="col s12 m3 label">
|
53 |
+
<label
|
54 |
+
for="xcloner_{type}_cleanup_capacity_limit"><?php echo __("Cleanup by Capacity(MB)", 'xcloner-backup-and-restore') ?></label>
|
55 |
+
</div>
|
56 |
+
<div class=" col s12 m6">
|
57 |
+
<input placeholder="<?php echo __("delete backup over specified limit", 'xcloner-backup-and-restore') ?>"
|
58 |
+
id="xcloner_{type}cleanup_capacity_limit" type="number" name="xcloner_{type}cleanup_capacity_limit"
|
59 |
+
class="validate" value="<?php echo get_option("xcloner_".$type."cleanup_capacity_limit") ?>">
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
|
63 |
+
<!-- Keep backups taken on days -->
|
64 |
+
<div class="row">
|
65 |
+
<div class="col s12 m3 label">
|
66 |
+
<label
|
67 |
+
for="xcloner_{type}_cleanup_exclude_days"><?php echo __("Keep backups taken on days", 'xcloner-backup-and-restore') ?></label>
|
68 |
+
</div>
|
69 |
+
<div class=" col s12 m6">
|
70 |
+
<input placeholder="<?php echo __("days of month, comma separated", 'xcloner-backup-and-restore') ?>"
|
71 |
+
id="xcloner_{type}cleanup_exclude_days" type="text" name="xcloner_{type}cleanup_exclude_days"
|
72 |
+
class="validate" value="<?php echo get_option("xcloner_".$type."cleanup_exclude_days") ?>">
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
<?php
|
76 |
$common_cleanup_html = ob_get_contents();
|
77 |
ob_end_clean();
|
79 |
return str_replace("{type}", $type, $common_cleanup_html);
|
80 |
}
|
81 |
|
82 |
+
?>
|
|
|
|
|
83 |
<form class="remote-storage-form" method="POST">
|
84 |
|
85 |
<input type="hidden" id="connection_check" name="connection_check" value="">
|
86 |
|
87 |
<div class="row remote-storage">
|
88 |
+
<div class="col s12 m12 l10">
|
89 |
+
<?php include_once(__DIR__ . "/xcloner_header.php")?>
|
90 |
+
</div>
|
91 |
<div class="col s12 m12 l10">
|
92 |
<ul class="collapsible popout" data-collapsible="accordion">
|
93 |
|
94 |
+
<!-- LOCAL STORAGE-->
|
95 |
+
<li id="local">
|
96 |
+
<?php include_once(__DIR__ ."/remote_storage/local.php") ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
</li>
|
98 |
|
99 |
<!-- AWS STORAGE-->
|
100 |
<li id="aws">
|
101 |
+
<?php include_once(__DIR__ ."/remote_storage/aws.php") ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
</li>
|
103 |
|
104 |
<!-- AZURE STORAGE-->
|
105 |
<li id="azure">
|
106 |
+
<?php include_once(__DIR__ ."/remote_storage/azure.php") ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
</li>
|
108 |
|
109 |
<!-- BACKBLAZE STORAGE-->
|
110 |
<li id="backblaze">
|
111 |
+
<?php include_once(__DIR__ ."/remote_storage/backblaze.php") ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
</li>
|
113 |
|
114 |
+
<!-- DROPBOX STORAGE-->
|
115 |
+
<li id="dropbox">
|
116 |
+
<?php include_once(__DIR__ ."/remote_storage/dropbox.php") ?>
|
117 |
+
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
|
119 |
+
<!-- FTP STORAGE-->
|
120 |
+
<li id="ftp">
|
121 |
+
<?php include_once(__DIR__ ."/remote_storage/ftp.php") ?>
|
122 |
</li>
|
123 |
|
124 |
<!-- Google DRIVE STORAGE-->
|
125 |
<li id="gdrive">
|
126 |
+
<?php include_once(__DIR__ ."/remote_storage/gdrive.php") ?>
|
127 |
+
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
129 |
+
<!-- SFTP STORAGE-->
|
130 |
+
<li id="sftp">
|
131 |
+
<?php include_once(__DIR__ ."/remote_storage/sftp.php") ?>
|
132 |
+
</li>
|
133 |
|
134 |
+
<!-- ONEDRIVE STORAGE-->
|
135 |
+
<li id="onedrive">
|
136 |
+
<?php include_once(__DIR__ ."/remote_storage/onedrive.php") ?>
|
137 |
</li>
|
138 |
|
139 |
+
<!-- WEBDAV STORAGE-->
|
140 |
+
<li id="webdav">
|
141 |
+
<?php include_once(__DIR__ ."/remote_storage/webdav.php") ?>
|
142 |
+
</li>
|
143 |
|
144 |
</ul>
|
145 |
</div>
|
151 |
function checkEndpoint() {
|
152 |
if (jQuery("#aws_region").val() != "") {
|
153 |
jQuery('#custom_aws_endpoint').hide();
|
154 |
+
jQuery('#custom_aws_endpoint input').attr('disabled', 'disabled')
|
155 |
} else {
|
156 |
jQuery('#custom_aws_endpoint').show();
|
157 |
jQuery('#custom_aws_endpoint input').removeAttr('disabled')
|
162 |
|
163 |
//var remote_storage = new Xcloner_Remote_Storage();
|
164 |
|
165 |
+
var watchful_gdrive_redirect_uri = "<?=$remote_storage::GDRIVE_REDIRECT_URL_WATCHFUL?>";
|
166 |
+
var default_gdrive_redirect_uri = "<?=$remote_storage::GDRIVE_REDIRECT_URL?>";
|
167 |
+
|
168 |
checkEndpoint()
|
169 |
jQuery("#aws_region").on("change", function () {
|
170 |
checkEndpoint();
|
180 |
window.location.hash = "#" + tag;
|
181 |
})
|
182 |
|
183 |
+
if (!jQuery("#gdrive_client_id").val()) {
|
184 |
+
jQuery("#gdrive_client_secret_wrapper").hide();
|
185 |
+
}
|
186 |
+
|
187 |
+
jQuery("#gdrive_client_id").on('keyup', function () {
|
188 |
+
|
189 |
+
if (jQuery("#gdrive_client_id").val()) {
|
190 |
+
jQuery("#gdrive_client_secret_wrapper").show();
|
191 |
+
} else {
|
192 |
+
jQuery("#gdrive_client_secret_wrapper").hide();
|
193 |
+
}
|
194 |
+
|
195 |
+
})
|
196 |
+
|
197 |
jQuery("#gdrive_authorization_click").on("click", function (e) {
|
198 |
|
199 |
var href = (jQuery(this).attr("href"))
|
200 |
|
201 |
+
var client_id = jQuery("#gdrive_client_id").val() || jQuery("#gdrive_client_id").attr(
|
202 |
+
'default-client-id')
|
203 |
|
204 |
+
var redirect_uri = default_gdrive_redirect_uri;
|
205 |
+
|
206 |
+
if (client_id === jQuery("#gdrive_client_id").attr('default-client-id')) {
|
207 |
+
redirect_uri = watchful_gdrive_redirect_uri
|
208 |
+
}
|
209 |
+
|
210 |
+
var new_href = href.
|
211 |
+
replace(/(client_id=).*?(&)/, '$1' + client_id + '$2').
|
212 |
+
replace(/(redirect_uri=).*?(&)/, '$1' + redirect_uri + '$2');
|
213 |
+
|
214 |
+
console.log(new_href)
|
215 |
jQuery(this).attr("href", new_href)
|
216 |
|
217 |
});
|
226 |
|
227 |
|
228 |
});
|
229 |
+
</script>
|
|
admin/partials/xcloner_restore_page.php
CHANGED
@@ -8,21 +8,23 @@ $xcloner_file_transfer = $this->get_xcloner_container()->get_xcloner_file_transf
|
|
8 |
$start = 0;
|
9 |
|
10 |
$backup_list = $xcloner_file_system->get_latest_backups();
|
11 |
-
|
12 |
?>
|
13 |
|
14 |
-
<h1><?= esc_html(get_admin_page_title()); ?></h1>
|
15 |
-
|
16 |
<script>
|
17 |
let xcloner_auth_key = '<?php echo md5(AUTH_KEY)?>';
|
18 |
</script>
|
19 |
|
20 |
<div class="row xcloner-restore">
|
|
|
|
|
|
|
|
|
|
|
21 |
<div class="col s12">
|
22 |
<ul class="collapsible xcloner-restore collapsible-accordion" data-collapsible="accordion">
|
23 |
<li data-step="1" class="restore-script-upload-step steps active show">
|
24 |
<div class="collapsible-header active"><i
|
25 |
-
|
26 |
</div>
|
27 |
<div class="collapsible-body row">
|
28 |
|
@@ -30,40 +32,40 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
30 |
<li><?php echo __("If you want to do a <strong>Local Target System Restore</strong>, leave Url field below empty and click 'Check Connection' button, next steps can be skipped.", 'xcloner-backup-and-restore') ?>
|
31 |
</li>
|
32 |
<li><?php echo __("If you want to do a <strong>Remote Target System Restore</strong>, please ", 'xcloner-backup-and-restore') ?>
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
|
39 |
</li>
|
40 |
<li>
|
41 |
-
|
42 |
</li>
|
43 |
<li>
|
44 |
-
|
45 |
</li>
|
46 |
<li>
|
47 |
-
|
|
|
|
|
|
|
|
|
48 |
</li>
|
49 |
-
|
50 |
-
<li class="warning">
|
51 |
-
<?php echo __("We have detected your connection to the site as being secure, so your restore script address must start with https://.") ?>
|
52 |
-
</li>
|
53 |
-
<?php endif ?>
|
54 |
|
55 |
</ul>
|
56 |
|
57 |
<div class="input-field col l9 s12">
|
58 |
-
<input value="<?php echo (is_ssl()) ? "https://" : "" ?>" autocomplete="false"
|
59 |
-
|
60 |
-
|
61 |
<label for="restore_script_url"></label>
|
62 |
<div id="url_validation_status" class="status"></div>
|
63 |
</div>
|
64 |
<div class="col l3 s12 right-align">
|
65 |
<button class="btn waves-effect waves-light" type="submit" id="validate_url"
|
66 |
-
|
67 |
<i class="material-icons right">send</i>
|
68 |
</button>
|
69 |
</div>
|
@@ -72,21 +74,23 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
72 |
|
73 |
<li data-step="2" class="backup-upload-step steps">
|
74 |
<div class="collapsible-header "><i
|
75 |
-
|
76 |
</div>
|
77 |
<div class="collapsible-body row">
|
78 |
-
<p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.", 'xcloner-backup-and-restore')
|
|
|
79 |
<div class="input-field col s12 l7">
|
80 |
<select id="backup_file" name="backup_file" class="browser-default">
|
81 |
-
<option value="" disabled
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
90 |
</select>
|
91 |
|
92 |
<label> </label>
|
@@ -98,18 +102,17 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
98 |
<div class="col s12 l5 right-align">
|
99 |
<div class="toggler">
|
100 |
<button class="btn waves-effect waves-light upload-backup normal" type="submit" id=""
|
101 |
-
|
102 |
<i class="material-icons left">navigate_before</i>
|
103 |
</button>
|
104 |
<button class="btn waves-effect waves-light red upload-backup cancel" type="submit" id=""
|
105 |
-
|
106 |
<i class="material-icons right">close</i>
|
107 |
</button>
|
108 |
</div>
|
109 |
<button class="btn waves-effect waves-light grey" type="submit"
|
110 |
-
|
111 |
-
|
112 |
-
name="action"><?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>
|
113 |
<i class="material-icons right">navigate_next</i>
|
114 |
</button>
|
115 |
</div>
|
@@ -118,15 +121,15 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
118 |
|
119 |
<li data-step="3" class="restore-remote-backup-step steps ">
|
120 |
<div class="collapsible-header"><i
|
121 |
-
|
122 |
<i class="material-icons right" title="Refresh Target Backup Files List"
|
123 |
-
|
124 |
|
125 |
<div class="switch right">
|
126 |
<label>
|
127 |
-
|
128 |
<input type="checkbox" id="toggle_file_restore_display" name="toggle_file_restore_display"
|
129 |
-
|
130 |
<span class="lever"></span>
|
131 |
|
132 |
</label>
|
@@ -138,14 +141,13 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
138 |
<div class="input-field row">
|
139 |
<div class="col s12">
|
140 |
<a class="btn-floating tooltipped btn-small right" data-html="true" data-position="left"
|
141 |
-
|
142 |
-
data-tooltip="<?php echo __("This is the directory where you would like to restore the backup archive files.<br />
|
143 |
Please use this with caution when restoring to a live site.", 'xcloner-backup-and-restore') ?>"><i
|
144 |
-
|
145 |
</a>
|
146 |
<h5><?php echo __("Restore Target Path:", 'xcloner-backup-and-restore') ?></h5>
|
147 |
<input type="text" name="remote_restore_path" id="remote_restore_path" class="validate"
|
148 |
-
|
149 |
<label></label>
|
150 |
</div>
|
151 |
|
@@ -154,77 +156,78 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
154 |
<div class="input-field row">
|
155 |
<div class="col s12">
|
156 |
<a href="#backup_localhost-2017-04-03_10-58-sql-diff2017-03-22_00-00-5b6c4.tgz"
|
157 |
-
|
158 |
-
|
159 |
<i class="material-icons">folder_open</i>
|
160 |
</a>
|
161 |
<h5><?php echo __("Restore Backup Archive:", 'xcloner-backup-and-restore') ?></h5>
|
162 |
<select id="remote_backup_file" name="remote_backup_file" class="browser-default">
|
163 |
-
<option value="" disabled
|
164 |
-
|
|
|
165 |
</select>
|
166 |
<label></label>
|
167 |
</div>
|
168 |
|
169 |
<div class="col s12">
|
170 |
-
|
171 |
<label for="filter_files_all" class="tooltipped" data-position="right"
|
172 |
-
|
173 |
-
|
174 |
-
value="" disabled/>
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
</label>
|
179 |
-
|
180 |
-
|
181 |
<label for="filter_files_wp_content" class="tooltipped"
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
</label>
|
189 |
|
190 |
-
|
191 |
<label for="filter_files_plugins" class="tooltipped"
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
</label>
|
199 |
|
200 |
-
|
201 |
<label for="filter_files_uploads" class="tooltipped"
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
</label>
|
209 |
|
210 |
-
|
211 |
<label for="filter_files_themes" class="tooltipped"
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
</label>
|
219 |
|
220 |
-
|
221 |
<label for="filter_files_database" class="tooltipped"
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
</label>
|
229 |
</div>
|
230 |
</div>
|
@@ -240,18 +243,18 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
240 |
<div class="col s12 l5 right-align">
|
241 |
<div class="toggler">
|
242 |
<button class="btn waves-effect waves-light restore_remote_backup normal " type="submit"
|
243 |
-
|
244 |
<i class="material-icons left">navigate_before</i>
|
245 |
</button>
|
246 |
<button class="btn waves-effect waves-light red restore_remote_backup cancel" type="submit"
|
247 |
-
|
248 |
<i class="material-icons right">close</i>
|
249 |
</button>
|
250 |
</div>
|
251 |
<button class="btn waves-effect waves-light grey" type="submit"
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
<i class="material-icons right">navigate_next</i>
|
256 |
</button>
|
257 |
</div>
|
@@ -260,81 +263,83 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
260 |
|
261 |
<li data-step="4" class="restore-remote-database-step steps ">
|
262 |
<div class="collapsible-header"><i
|
263 |
-
|
264 |
<i class="material-icons right" title="Refresh Database Backup Files List"
|
265 |
-
|
266 |
</div>
|
267 |
<div class="collapsible-body row">
|
268 |
|
269 |
<div id="remote-restore-options">
|
270 |
<div class="col s12">
|
271 |
<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50"
|
272 |
-
|
273 |
-
|
274 |
-
|
|
|
275 |
<h5><?php echo __('Target Mysql Details', 'xcloner-backup-and-restore') ?></h5>
|
276 |
</div>
|
277 |
<div class=" col s12">
|
278 |
<div class="input-field col s12 m6">
|
279 |
<input type="text" name="remote_mysql_host" id="remote_mysql_host" class="validate"
|
280 |
-
|
281 |
<label><?php echo __("Target Mysql Hostname", 'xcloner-backup-and-restore') ?></label>
|
282 |
</div>
|
283 |
|
284 |
<div class="input-field col s12 m6">
|
285 |
<input type="text" name="remote_mysql_db" id="remote_mysql_db" class="validate"
|
286 |
-
|
287 |
<label><?php echo __("Target Mysql Database", 'xcloner-backup-and-restore') ?></label>
|
288 |
</div>
|
289 |
|
290 |
<div class="input-field col s12 m6">
|
291 |
<input type="text" name="remote_mysql_user" id="remote_mysql_user" class="validate"
|
292 |
-
|
293 |
<label><?php echo __("Target Mysql Username", 'xcloner-backup-and-restore') ?></label>
|
294 |
</div>
|
295 |
|
296 |
|
297 |
<div class="input-field col s12 m6">
|
298 |
<input type="password" name="remote_mysql_pass" id="remote_mysql_pass" class="validate"
|
299 |
-
|
300 |
<label><?php echo __("Target Mysql Password", 'xcloner-backup-and-restore') ?></label>
|
301 |
</div>
|
302 |
|
303 |
</div>
|
304 |
<div class="col s12">
|
305 |
<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50"
|
306 |
-
|
307 |
-
|
308 |
-
|
|
|
309 |
<h5><?php echo __('Target Mysql Search and Replace', 'xcloner-backup-and-restore') ?></h5>
|
310 |
</div>
|
311 |
<div class="col s12">
|
312 |
<div class="input-field col s12 m6 ">
|
313 |
<input type="text" name="wp_home_url" id="wp_home_url" class="validate"
|
314 |
-
|
315 |
<label><?php echo __("Source Home Url", 'xcloner-backup-and-restore') ?></label>
|
316 |
</div>
|
317 |
|
318 |
<div class="input-field col s12 m6 ">
|
319 |
<input type="text" name="remote_restore_url" id="remote_restore_url" class="validate"
|
320 |
-
|
321 |
<label><?php echo __("With Target Home Url", 'xcloner-backup-and-restore') ?></label>
|
322 |
</div>
|
323 |
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
|
337 |
-
|
338 |
</div>
|
339 |
|
340 |
</div>
|
@@ -342,8 +347,9 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
342 |
<div class=" col s12 l7">
|
343 |
<div class="input-field row">
|
344 |
<select id="remote_database_file" name="remote_database_file" class="browser-default">
|
345 |
-
<option value="" disabled
|
346 |
-
|
|
|
347 |
</select>
|
348 |
|
349 |
<label></label>
|
@@ -355,7 +361,8 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
355 |
|
356 |
<div class="status"></div>
|
357 |
<div class="query-box">
|
358 |
-
<h6><?php echo __('Use the field below to fix your mysql query and Retry again the Restore, or replace with # to Skip next', 'xcloner-backup-and-restore')
|
|
|
359 |
<textarea class="query-list" cols="5"></textarea>
|
360 |
</div>
|
361 |
</div>
|
@@ -363,20 +370,20 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
363 |
<div class="col s12 l5 right-align">
|
364 |
<div class="toggler">
|
365 |
<button class="btn waves-effect waves-light restore_remote_mysqldump normal " type="submit"
|
366 |
-
|
367 |
<i class="material-icons left">navigate_before</i>
|
368 |
</button>
|
369 |
<button class="btn waves-effect waves-light red restore_remote_mysqldump cancel"
|
370 |
-
|
371 |
-
|
372 |
<i class="material-icons right">close</i>
|
373 |
</button>
|
374 |
</div>
|
375 |
|
376 |
<button class="btn waves-effect waves-light grey" type="submit"
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
<i class="material-icons right">navigate_next</i>
|
381 |
</button>
|
382 |
|
@@ -387,7 +394,7 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
387 |
|
388 |
<li data-step="5" class="restore-finish-step steps ">
|
389 |
<div class="collapsible-header"><i
|
390 |
-
|
391 |
</div>
|
392 |
<div class="collapsible-body row" style="padding-left:40px;">
|
393 |
|
@@ -401,7 +408,7 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
401 |
<label>
|
402 |
Off
|
403 |
<input type="checkbox" id="update_remote_site_url" name="update_remote_site_url"
|
404 |
-
|
405 |
<span class="lever"></span>
|
406 |
On
|
407 |
</label>
|
@@ -418,7 +425,7 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
418 |
<label>
|
419 |
Off
|
420 |
<input type="checkbox" id="delete_backup_temporary_folder"
|
421 |
-
|
422 |
<span class="lever"></span>
|
423 |
On
|
424 |
</label>
|
@@ -435,7 +442,7 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
435 |
<label>
|
436 |
Off
|
437 |
<input type="checkbox" id="delete_backup_archive" name="delete_backup_archive"
|
438 |
-
|
439 |
<span class="lever"></span>
|
440 |
On
|
441 |
</label>
|
@@ -452,14 +459,14 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
452 |
<label>
|
453 |
Off
|
454 |
<input type="checkbox" id="delete_restore_script" name="delete_restore_script"
|
455 |
-
|
456 |
<span class="lever"></span>
|
457 |
On
|
458 |
</label>
|
459 |
</div>
|
460 |
</div>
|
461 |
</div>
|
462 |
-
|
463 |
|
464 |
<div class=" row col s12">
|
465 |
<div class="status"></div>
|
@@ -467,8 +474,10 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
467 |
|
468 |
<div class=" row col s12 center-align" id="xcloner_restore_finish">
|
469 |
<h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore') ?></h5>
|
470 |
-
<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank">Wordpress XCloner forums</a>')
|
471 |
-
|
|
|
|
|
472 |
@thinkovi</a>
|
473 |
<script src="//platform.twitter.com/widgets.js" async="" charset="utf-8"></script>
|
474 |
</div>
|
@@ -477,14 +486,14 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
477 |
<div class="row">
|
478 |
<div class="col s6 right-align">
|
479 |
<button class="btn waves-effect waves-light teal" type="submit" id="restore_finish"
|
480 |
-
|
481 |
<i class="material-icons right">navigate_next</i>
|
482 |
</button>
|
483 |
</div>
|
484 |
|
485 |
<div id="open_target_site" class="col s6 left-align">
|
486 |
<a disabled="disabled" href="#" class="btn waves-effect waves-light teal" type="button"
|
487 |
-
|
488 |
<i class="material-icons right">navigate_next</i>
|
489 |
</a>
|
490 |
</div>
|
@@ -509,4 +518,4 @@ $backup_list = $xcloner_file_system->get_latest_backups();
|
|
509 |
</div>
|
510 |
<ul class="files-list"></ul>
|
511 |
</div>
|
512 |
-
</div>
|
8 |
$start = 0;
|
9 |
|
10 |
$backup_list = $xcloner_file_system->get_latest_backups();
|
|
|
11 |
?>
|
12 |
|
|
|
|
|
13 |
<script>
|
14 |
let xcloner_auth_key = '<?php echo md5(AUTH_KEY)?>';
|
15 |
</script>
|
16 |
|
17 |
<div class="row xcloner-restore">
|
18 |
+
|
19 |
+
<div class="col s12">
|
20 |
+
<?php include_once(__DIR__ . "/xcloner_header.php")?>
|
21 |
+
</div>
|
22 |
+
|
23 |
<div class="col s12">
|
24 |
<ul class="collapsible xcloner-restore collapsible-accordion" data-collapsible="accordion">
|
25 |
<li data-step="1" class="restore-script-upload-step steps active show">
|
26 |
<div class="collapsible-header active"><i
|
27 |
+
class="material-icons">settings_remote</i><?php echo __("Restore Script Upload", 'xcloner-backup-and-restore') ?>
|
28 |
</div>
|
29 |
<div class="collapsible-body row">
|
30 |
|
32 |
<li><?php echo __("If you want to do a <strong>Local Target System Restore</strong>, leave Url field below empty and click 'Check Connection' button, next steps can be skipped.", 'xcloner-backup-and-restore') ?>
|
33 |
</li>
|
34 |
<li><?php echo __("If you want to do a <strong>Remote Target System Restore</strong>, please ", 'xcloner-backup-and-restore') ?>
|
35 |
+
|
36 |
+
<button class="btn waves-effect waves-light" type="submit"
|
37 |
+
onclick="window.location=XCLONER_AJAXURL+'&action=download_restore_script&phar=true'">
|
38 |
+
<?php echo __("download the restore script", 'xcloner-backup-and-restore') ?>
|
39 |
+
</button>
|
40 |
|
41 |
</li>
|
42 |
<li>
|
43 |
+
<?php echo __("Extract the restore script archive files on your new host", 'xcloner-backup-and-restore') ?>
|
44 |
</li>
|
45 |
<li>
|
46 |
+
<?php echo __("Provide url below to the <u>xcloner_restore.php</u> restore script, like http://my_restore_site.com/xcloner_restore.php", 'xcloner-backup-and-restore') ?>
|
47 |
</li>
|
48 |
<li>
|
49 |
+
<?php echo __("If your server is not web accessible, like a localhost computer, you can use a DynDNS service or install a blank copy of Wordpress with XCloner in the same environment and start the restore from there.", 'xcloner-backup-and-restore') ?>
|
50 |
+
</li>
|
51 |
+
<?php if (is_ssl()): ?>
|
52 |
+
<li class="warning">
|
53 |
+
<?php echo __("We have detected your connection to the site as being secure, so your restore script address must start with https://.") ?>
|
54 |
</li>
|
55 |
+
<?php endif ?>
|
|
|
|
|
|
|
|
|
56 |
|
57 |
</ul>
|
58 |
|
59 |
<div class="input-field col l9 s12">
|
60 |
+
<input value="<?php echo (is_ssl()) ? "https://" : "" ?>" autocomplete="false"
|
61 |
+
id="restore_script_url" type="text" class="validate"
|
62 |
+
placeholder="Url to XCloner Restore Script, example http://myddns.com/xcloner/xcloner_restore.php">
|
63 |
<label for="restore_script_url"></label>
|
64 |
<div id="url_validation_status" class="status"></div>
|
65 |
</div>
|
66 |
<div class="col l3 s12 right-align">
|
67 |
<button class="btn waves-effect waves-light" type="submit" id="validate_url"
|
68 |
+
name="action"><?php echo __("Check Connection", 'xcloner-backup-and-restore') ?>
|
69 |
<i class="material-icons right">send</i>
|
70 |
</button>
|
71 |
</div>
|
74 |
|
75 |
<li data-step="2" class="backup-upload-step steps">
|
76 |
<div class="collapsible-header "><i
|
77 |
+
class="material-icons">file_upload</i><?php echo __("Upload Local Backup Archive To Target Host", 'xcloner-backup-and-restore') ?>
|
78 |
</div>
|
79 |
<div class="collapsible-body row">
|
80 |
+
<p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.", 'xcloner-backup-and-restore') ?>
|
81 |
+
</p>
|
82 |
<div class="input-field col s12 l7">
|
83 |
<select id="backup_file" name="backup_file" class="browser-default">
|
84 |
+
<option value="" disabled selected>
|
85 |
+
<?php echo __("Please select a local backup archive to upload to target host", 'xcloner-backup-and-restore') ?>
|
86 |
+
</option>
|
87 |
+
<?php if (is_array($backup_list)): ?>
|
88 |
+
<?php foreach ($backup_list as $file): ?>
|
89 |
+
<option value="<?php echo $file['basename'] ?>">
|
90 |
+
<?php echo $file['basename'] ?> (<?php echo size_format($file['size']) ?>)
|
91 |
+
</option>
|
92 |
+
<?php endforeach ?>
|
93 |
+
<?php endif ?>
|
94 |
</select>
|
95 |
|
96 |
<label> </label>
|
102 |
<div class="col s12 l5 right-align">
|
103 |
<div class="toggler">
|
104 |
<button class="btn waves-effect waves-light upload-backup normal" type="submit" id=""
|
105 |
+
name="action"><?php echo __("Upload", 'xcloner-backup-and-restore') ?>
|
106 |
<i class="material-icons left">navigate_before</i>
|
107 |
</button>
|
108 |
<button class="btn waves-effect waves-light red upload-backup cancel" type="submit" id=""
|
109 |
+
name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore') ?>
|
110 |
<i class="material-icons right">close</i>
|
111 |
</button>
|
112 |
</div>
|
113 |
<button class="btn waves-effect waves-light grey" type="submit"
|
114 |
+
title="<?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>" id="skip_upload_backup"
|
115 |
+
name="action"><?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>
|
|
|
116 |
<i class="material-icons right">navigate_next</i>
|
117 |
</button>
|
118 |
</div>
|
121 |
|
122 |
<li data-step="3" class="restore-remote-backup-step steps ">
|
123 |
<div class="collapsible-header"><i
|
124 |
+
class="material-icons">folder_open</i><?php echo __("Restore Files Backup Available On Target Location", 'xcloner-backup-and-restore') ?>
|
125 |
<i class="material-icons right" title="Refresh Target Backup Files List"
|
126 |
+
id="refresh_remote_backup_file">cached</i>
|
127 |
|
128 |
<div class="switch right">
|
129 |
<label>
|
130 |
+
<?php echo __('Verbose Output', 'xcloner-backup-and-restore') ?>
|
131 |
<input type="checkbox" id="toggle_file_restore_display" name="toggle_file_restore_display"
|
132 |
+
class="" checked value="1">
|
133 |
<span class="lever"></span>
|
134 |
|
135 |
</label>
|
141 |
<div class="input-field row">
|
142 |
<div class="col s12">
|
143 |
<a class="btn-floating tooltipped btn-small right" data-html="true" data-position="left"
|
144 |
+
data-delay="50" data-tooltip="<?php echo __("This is the directory where you would like to restore the backup archive files.<br />
|
|
|
145 |
Please use this with caution when restoring to a live site.", 'xcloner-backup-and-restore') ?>"><i
|
146 |
+
class="material-icons">help_outline</i>
|
147 |
</a>
|
148 |
<h5><?php echo __("Restore Target Path:", 'xcloner-backup-and-restore') ?></h5>
|
149 |
<input type="text" name="remote_restore_path" id="remote_restore_path" class="validate"
|
150 |
+
placeholder="Restore Target Path">
|
151 |
<label></label>
|
152 |
</div>
|
153 |
|
156 |
<div class="input-field row">
|
157 |
<div class="col s12">
|
158 |
<a href="#backup_localhost-2017-04-03_10-58-sql-diff2017-03-22_00-00-5b6c4.tgz"
|
159 |
+
class="list-backup-content btn-floating tooltipped btn-small right"
|
160 |
+
data-tooltip="<?php echo __('Click To List The Selected Backup Content', 'xcloner-backup-and-restore') ?>">
|
161 |
<i class="material-icons">folder_open</i>
|
162 |
</a>
|
163 |
<h5><?php echo __("Restore Backup Archive:", 'xcloner-backup-and-restore') ?></h5>
|
164 |
<select id="remote_backup_file" name="remote_backup_file" class="browser-default">
|
165 |
+
<option value="" disabled selected>
|
166 |
+
<?php echo __("Please select the target backup file to restore", 'xcloner-backup-and-restore') ?>
|
167 |
+
</option>
|
168 |
</select>
|
169 |
<label></label>
|
170 |
</div>
|
171 |
|
172 |
<div class="col s12">
|
173 |
+
|
174 |
<label for="filter_files_all" class="tooltipped" data-position="right"
|
175 |
+
data-tooltip="<?php echo __("Restore all backup files. Available only when doing a Remote Target System Restore", 'xcloner-backup-and-restore') ?>">
|
176 |
+
<input class="with-gap" name="filter_files" type="radio" id="filter_files_all"
|
177 |
+
checked value="" disabled />
|
178 |
+
<span>
|
179 |
+
<?php echo __("Restore All Files", "xcloner-backup-and-restore") ?>
|
180 |
+
</span>
|
181 |
</label>
|
182 |
+
|
183 |
+
|
184 |
<label for="filter_files_wp_content" class="tooltipped"
|
185 |
+
data-tooltip="<?php echo __('Restore the files only of the wp-content/ folder', 'xcloner-backup-and-restore') ?>">
|
186 |
+
<input class="with-gap" name="filter_files" type="radio"
|
187 |
+
id="filter_files_wp_content" value="/^wp-content\/(.*)/" />
|
188 |
+
<span>
|
189 |
+
<?php echo __("Only wp-content", "xcloner-backup-and-restore") ?>
|
190 |
+
</span>
|
191 |
</label>
|
192 |
|
193 |
+
|
194 |
<label for="filter_files_plugins" class="tooltipped"
|
195 |
+
data-tooltip="<?php echo __('Restore the files only of the wp-content/plugins/ folder', 'xcloner-backup-and-restore') ?>">
|
196 |
+
<input class="with-gap" name="filter_files" type="radio" id="filter_files_plugins"
|
197 |
+
value="/^wp-content\/plugins(.*)/" />
|
198 |
+
<span>
|
199 |
+
<?php echo __("Only Plugins", "xcloner-backup-and-restore") ?>
|
200 |
+
</span>
|
201 |
</label>
|
202 |
|
203 |
+
|
204 |
<label for="filter_files_uploads" class="tooltipped"
|
205 |
+
data-tooltip="<?php echo __('Restore the files only of the wp-content/uploads/ folder only', 'xcloner-backup-and-restore') ?>">
|
206 |
+
<input class="with-gap" name="filter_files" type="radio" id="filter_files_uploads"
|
207 |
+
value="/^wp-content\/uploads(.*)/" />
|
208 |
+
<span>
|
209 |
+
<?php echo __("Only Uploads", "xcloner-backup-and-restore") ?>
|
210 |
+
</span>
|
211 |
</label>
|
212 |
|
213 |
+
|
214 |
<label for="filter_files_themes" class="tooltipped"
|
215 |
+
data-tooltip="<?php echo __('Restore the files only of the wp-content/themes/ folder', 'xcloner-backup-and-restore') ?>">
|
216 |
+
<input class="with-gap" name="filter_files" type="radio" id="filter_files_themes"
|
217 |
+
value="/^wp-content\/themes(.*)/" />
|
218 |
+
<span>
|
219 |
+
<?php echo __("Only Themes", "xcloner-backup-and-restore") ?>
|
220 |
+
</span>
|
221 |
</label>
|
222 |
|
223 |
+
|
224 |
<label for="filter_files_database" class="tooltipped"
|
225 |
+
data-tooltip="<?php echo __('Restore the database-sql.sql mysql backup from the xcloner-xxxxx/ folder', 'xcloner-backup-and-restore') ?>">
|
226 |
+
<input class="with-gap" name="filter_files" type="radio" id="filter_files_database"
|
227 |
+
value="/^xcloner-(.*)\/(.*)\.sql/" />
|
228 |
+
<span>
|
229 |
+
<?php echo __("Only Database Backup", "xcloner-backup-and-restore") ?>
|
230 |
+
</span>
|
231 |
</label>
|
232 |
</div>
|
233 |
</div>
|
243 |
<div class="col s12 l5 right-align">
|
244 |
<div class="toggler">
|
245 |
<button class="btn waves-effect waves-light restore_remote_backup normal " type="submit"
|
246 |
+
id="" name="action"><?php echo __("Restore", 'xcloner-backup-and-restore') ?>
|
247 |
<i class="material-icons left">navigate_before</i>
|
248 |
</button>
|
249 |
<button class="btn waves-effect waves-light red restore_remote_backup cancel" type="submit"
|
250 |
+
id="" name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore') ?>
|
251 |
<i class="material-icons right">close</i>
|
252 |
</button>
|
253 |
</div>
|
254 |
<button class="btn waves-effect waves-light grey" type="submit"
|
255 |
+
title="<?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>"
|
256 |
+
id="skip_remote_backup_step"
|
257 |
+
name="action"><?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>
|
258 |
<i class="material-icons right">navigate_next</i>
|
259 |
</button>
|
260 |
</div>
|
263 |
|
264 |
<li data-step="4" class="restore-remote-database-step steps ">
|
265 |
<div class="collapsible-header"><i
|
266 |
+
class="material-icons">list</i><?php echo __("Restore Target Database - Search and Replace", 'xcloner-backup-and-restore') ?>
|
267 |
<i class="material-icons right" title="Refresh Database Backup Files List"
|
268 |
+
id="refresh_database_file">cached</i>
|
269 |
</div>
|
270 |
<div class="collapsible-body row">
|
271 |
|
272 |
<div id="remote-restore-options">
|
273 |
<div class="col s12">
|
274 |
<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50"
|
275 |
+
data-html="true"
|
276 |
+
data-tooltip="<?php echo __('Please provide below the mysql connection details for the target host database.<br />For live sites we recommend using a new separate database.', 'xcloner-backup-and-restore') ?>"
|
277 |
+
data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i
|
278 |
+
class="material-icons">help_outline</i></a>
|
279 |
<h5><?php echo __('Target Mysql Details', 'xcloner-backup-and-restore') ?></h5>
|
280 |
</div>
|
281 |
<div class=" col s12">
|
282 |
<div class="input-field col s12 m6">
|
283 |
<input type="text" name="remote_mysql_host" id="remote_mysql_host" class="validate"
|
284 |
+
placeholder="Target Mysql Hostname">
|
285 |
<label><?php echo __("Target Mysql Hostname", 'xcloner-backup-and-restore') ?></label>
|
286 |
</div>
|
287 |
|
288 |
<div class="input-field col s12 m6">
|
289 |
<input type="text" name="remote_mysql_db" id="remote_mysql_db" class="validate"
|
290 |
+
placeholder="Target Mysql Database">
|
291 |
<label><?php echo __("Target Mysql Database", 'xcloner-backup-and-restore') ?></label>
|
292 |
</div>
|
293 |
|
294 |
<div class="input-field col s12 m6">
|
295 |
<input type="text" name="remote_mysql_user" id="remote_mysql_user" class="validate"
|
296 |
+
placeholder="Target Mysql Username">
|
297 |
<label><?php echo __("Target Mysql Username", 'xcloner-backup-and-restore') ?></label>
|
298 |
</div>
|
299 |
|
300 |
|
301 |
<div class="input-field col s12 m6">
|
302 |
<input type="password" name="remote_mysql_pass" id="remote_mysql_pass" class="validate"
|
303 |
+
placeholder="Target Mysql Password">
|
304 |
<label><?php echo __("Target Mysql Password", 'xcloner-backup-and-restore') ?></label>
|
305 |
</div>
|
306 |
|
307 |
</div>
|
308 |
<div class="col s12">
|
309 |
<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50"
|
310 |
+
data-html="true"
|
311 |
+
data-tooltip="<?php echo __('I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.', 'xcloner-backup-and-restore') ?>"
|
312 |
+
data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i
|
313 |
+
class="material-icons">help_outline</i></a>
|
314 |
<h5><?php echo __('Target Mysql Search and Replace', 'xcloner-backup-and-restore') ?></h5>
|
315 |
</div>
|
316 |
<div class="col s12">
|
317 |
<div class="input-field col s12 m6 ">
|
318 |
<input type="text" name="wp_home_url" id="wp_home_url" class="validate"
|
319 |
+
placeholder="WP Home Url" value="<?php echo home_url(); ?>">
|
320 |
<label><?php echo __("Source Home Url", 'xcloner-backup-and-restore') ?></label>
|
321 |
</div>
|
322 |
|
323 |
<div class="input-field col s12 m6 ">
|
324 |
<input type="text" name="remote_restore_url" id="remote_restore_url" class="validate"
|
325 |
+
placeholder="Restore Target Url">
|
326 |
<label><?php echo __("With Target Home Url", 'xcloner-backup-and-restore') ?></label>
|
327 |
</div>
|
328 |
|
329 |
+
<?php if (site_url() != home_url()) : ?>
|
330 |
+
<div class="input-field col s12 m6 ">
|
331 |
+
<input type="text" name="wp_site_url" id="wp_site_url" class="validate"
|
332 |
+
placeholder="WP Site Url" value="<?php echo site_url(); ?>">
|
333 |
+
<label><?php echo __("Source Site Url", 'xcloner-backup-and-restore') ?></label>
|
334 |
+
</div>
|
335 |
|
336 |
+
<div class="input-field col s12 m6 ">
|
337 |
+
<input type="text" name="remote_restore_site_url" id="remote_restore_site_url"
|
338 |
+
class="validate" placeholder="Restore Target Url">
|
339 |
+
<label><?php echo __("With Target Site Url", 'xcloner-backup-and-restore') ?></label>
|
340 |
+
</div>
|
341 |
|
342 |
+
<?php endif; ?>
|
343 |
</div>
|
344 |
|
345 |
</div>
|
347 |
<div class=" col s12 l7">
|
348 |
<div class="input-field row">
|
349 |
<select id="remote_database_file" name="remote_database_file" class="browser-default">
|
350 |
+
<option value="" disabled selected>
|
351 |
+
<?php echo __("Please select the target database backup file to restore", 'xcloner-backup-and-restore') ?>
|
352 |
+
</option>
|
353 |
</select>
|
354 |
|
355 |
<label></label>
|
361 |
|
362 |
<div class="status"></div>
|
363 |
<div class="query-box">
|
364 |
+
<h6><?php echo __('Use the field below to fix your mysql query and Retry again the Restore, or replace with # to Skip next', 'xcloner-backup-and-restore') ?>
|
365 |
+
</h6>
|
366 |
<textarea class="query-list" cols="5"></textarea>
|
367 |
</div>
|
368 |
</div>
|
370 |
<div class="col s12 l5 right-align">
|
371 |
<div class="toggler">
|
372 |
<button class="btn waves-effect waves-light restore_remote_mysqldump normal " type="submit"
|
373 |
+
id="" name="action"><?php echo __("Restore", 'xcloner-backup-and-restore') ?>
|
374 |
<i class="material-icons left">navigate_before</i>
|
375 |
</button>
|
376 |
<button class="btn waves-effect waves-light red restore_remote_mysqldump cancel"
|
377 |
+
type="submit" id=""
|
378 |
+
name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore') ?>
|
379 |
<i class="material-icons right">close</i>
|
380 |
</button>
|
381 |
</div>
|
382 |
|
383 |
<button class="btn waves-effect waves-light grey" type="submit"
|
384 |
+
title="<?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>"
|
385 |
+
id="skip_restore_remote_database_step"
|
386 |
+
name="action"><?php echo __("Skip Next", 'xcloner-backup-and-restore') ?>
|
387 |
<i class="material-icons right">navigate_next</i>
|
388 |
</button>
|
389 |
|
394 |
|
395 |
<li data-step="5" class="restore-finish-step steps ">
|
396 |
<div class="collapsible-header"><i
|
397 |
+
class="material-icons">folder_open</i><?php echo __("Finishing up...", 'xcloner-backup-and-restore') ?>
|
398 |
</div>
|
399 |
<div class="collapsible-body row" style="padding-left:40px;">
|
400 |
|
408 |
<label>
|
409 |
Off
|
410 |
<input type="checkbox" id="update_remote_site_url" name="update_remote_site_url"
|
411 |
+
checked value="1">
|
412 |
<span class="lever"></span>
|
413 |
On
|
414 |
</label>
|
425 |
<label>
|
426 |
Off
|
427 |
<input type="checkbox" id="delete_backup_temporary_folder"
|
428 |
+
name="delete_backup_temporary_folder" checked value="1">
|
429 |
<span class="lever"></span>
|
430 |
On
|
431 |
</label>
|
442 |
<label>
|
443 |
Off
|
444 |
<input type="checkbox" id="delete_backup_archive" name="delete_backup_archive"
|
445 |
+
value="1">
|
446 |
<span class="lever"></span>
|
447 |
On
|
448 |
</label>
|
459 |
<label>
|
460 |
Off
|
461 |
<input type="checkbox" id="delete_restore_script" name="delete_restore_script"
|
462 |
+
checked value="1">
|
463 |
<span class="lever"></span>
|
464 |
On
|
465 |
</label>
|
466 |
</div>
|
467 |
</div>
|
468 |
</div>
|
469 |
+
|
470 |
|
471 |
<div class=" row col s12">
|
472 |
<div class="status"></div>
|
474 |
|
475 |
<div class=" row col s12 center-align" id="xcloner_restore_finish">
|
476 |
<h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore') ?></h5>
|
477 |
+
<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank">Wordpress XCloner forums</a>') ?>
|
478 |
+
</h6>
|
479 |
+
<a class="twitter-follow-button" href="https://twitter.com/thinkovi"
|
480 |
+
data-show-count="false">Follow
|
481 |
@thinkovi</a>
|
482 |
<script src="//platform.twitter.com/widgets.js" async="" charset="utf-8"></script>
|
483 |
</div>
|
486 |
<div class="row">
|
487 |
<div class="col s6 right-align">
|
488 |
<button class="btn waves-effect waves-light teal" type="submit" id="restore_finish"
|
489 |
+
name="action"><?php echo __("Finish", 'xcloner-backup-and-restore') ?>
|
490 |
<i class="material-icons right">navigate_next</i>
|
491 |
</button>
|
492 |
</div>
|
493 |
|
494 |
<div id="open_target_site" class="col s6 left-align">
|
495 |
<a disabled="disabled" href="#" class="btn waves-effect waves-light teal" type="button"
|
496 |
+
target="_blank"><?php echo __("Open Target Site", 'xcloner-backup-and-restore') ?>
|
497 |
<i class="material-icons right">navigate_next</i>
|
498 |
</a>
|
499 |
</div>
|
518 |
</div>
|
519 |
<ul class="files-list"></ul>
|
520 |
</div>
|
521 |
+
</div>
|
admin/partials/xcloner_scheduled_backups_page.php
CHANGED
@@ -5,43 +5,44 @@ $xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_sto
|
|
5 |
$available_storages = $xcloner_remote_storage->get_available_storages();
|
6 |
?>
|
7 |
<?php if (!defined("DISABLE_WP_CRON") || !DISABLE_WP_CRON): ?>
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
<?php endif ?>
|
17 |
|
18 |
-
<h1><?= esc_html(get_admin_page_title()); ?></h1>
|
19 |
-
|
20 |
<div class="row">
|
|
|
|
|
|
|
21 |
<table id="scheduled_backups" class="col s12" cellspacing="0" width="100%">
|
22 |
<thead>
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
</thead>
|
34 |
<tfoot>
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
</tfoot>
|
46 |
<tbody>
|
47 |
</tbody>
|
@@ -51,7 +52,7 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
|
|
51 |
<div class="row">
|
52 |
<div class="col s12 m6 offset-m6 teal lighten-1" id="server_time">
|
53 |
<h2><?php echo __('Current Server Time', 'xcloner-backup-and-restore') ?>: <span
|
54 |
-
|
55 |
</div>
|
56 |
</div>
|
57 |
|
@@ -65,17 +66,17 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
|
|
65 |
|
66 |
<div class="row">
|
67 |
<div class="col s12 m6">
|
68 |
-
<h4><?php echo __('Edit Schedule', 'xcloner-backup-and-restore') ?> #<span
|
69 |
-
|
70 |
</div>
|
71 |
|
72 |
<div class="col s12 m6 right-align">
|
73 |
<div class="switch">
|
74 |
<label>
|
75 |
-
|
76 |
<input type="checkbox" id="status" name="status" value="1">
|
77 |
<span class="lever"></span>
|
78 |
-
|
79 |
</label>
|
80 |
</div>
|
81 |
</div>
|
@@ -83,70 +84,74 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
|
|
83 |
|
84 |
<p>
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
<div
|
96 |
-
|
97 |
-
|
98 |
-
<div class="
|
99 |
-
<
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
<
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
</div>
|
111 |
-
<label style="top:-1.8em"><?php echo __('Encrypt Backup', 'xcloner-backup-and-restore') ?></label>
|
112 |
</div>
|
113 |
-
</div>
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
$schedules = $xcloner_scheduler->get_available_intervals();
|
130 |
|
131 |
foreach ($schedules as $key => $schedule) {
|
132 |
?>
|
133 |
<option value="<?php echo $key ?>"><?php echo $schedule['display'] ?></option>
|
134 |
-
|
135 |
}
|
136 |
?>
|
137 |
-
|
|
|
138 |
</div>
|
139 |
-
</div>
|
140 |
|
141 |
-
|
142 |
<div class="row">
|
143 |
<div class="input-field col s12 l6">
|
144 |
<select name="schedule_storage" id="schedule_storage" class="validate">
|
145 |
-
<option value=""
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
</select>
|
151 |
<label><?php echo __('Send To Remote Storage', 'xcloner-backup-and-restore') ?></label>
|
152 |
</div>
|
@@ -155,74 +160,78 @@ $available_storages = $xcloner_remote_storage->get_available_storages();
|
|
155 |
<div class="switch">
|
156 |
<label>
|
157 |
Off
|
158 |
-
<input type="checkbox" name="backup_delete_after_remote_transfer"
|
|
|
159 |
<span class="lever"></span>
|
160 |
On
|
161 |
</label>
|
162 |
</div>
|
163 |
-
<label
|
|
|
164 |
</div>
|
165 |
</div>
|
166 |
|
167 |
|
168 |
-
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
|
|
|
|
175 |
</div>
|
176 |
-
</div>
|
177 |
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
|
|
|
|
183 |
</div>
|
184 |
</div>
|
185 |
-
</div>
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
192 |
</div>
|
193 |
-
</div>
|
194 |
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
|
|
201 |
</div>
|
202 |
-
</div>
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
|
|
210 |
</div>
|
211 |
</div>
|
212 |
</div>
|
213 |
-
</div>
|
214 |
|
215 |
-
|
216 |
|
217 |
-
|
218 |
-
|
219 |
name="action"><?php echo __('Save', 'xcloner-backup-and-restore') ?>
|
220 |
-
|
221 |
-
|
|
|
222 |
</div>
|
223 |
-
</div>
|
224 |
</p>
|
225 |
</div>
|
226 |
</form>
|
227 |
-
</div>
|
228 |
-
|
5 |
$available_storages = $xcloner_remote_storage->get_available_storages();
|
6 |
?>
|
7 |
<?php if (!defined("DISABLE_WP_CRON") || !DISABLE_WP_CRON): ?>
|
8 |
+
<div id="setting-error-" class="error settings-error notice is-dismissible">
|
9 |
+
<p><strong>
|
10 |
+
<?php echo sprintf(__('We have noticed that DISABLE_WP_CRON is disabled, we recommend enabling that and setting up wp-cron.php to run manually through your hosting account scheduler as explained <a href="%s" target="_blank">here</a>', 'xcloner-backup-and-restore'), "http://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-in-wordpress") ?>
|
11 |
+
</strong>
|
12 |
+
</p>
|
13 |
+
<button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span>
|
14 |
+
</button>
|
15 |
+
</div>
|
16 |
<?php endif ?>
|
17 |
|
|
|
|
|
18 |
<div class="row">
|
19 |
+
<div class="col s12">
|
20 |
+
<?php include_once(__DIR__ . "/xcloner_header.php")?>
|
21 |
+
</div>
|
22 |
<table id="scheduled_backups" class="col s12" cellspacing="0" width="100%">
|
23 |
<thead>
|
24 |
+
<tr class="grey lighten-2">
|
25 |
+
<th><?php echo __('ID', 'xcloner-backup-and-restore') ?></th>
|
26 |
+
<th><?php echo __('Profile Name', 'xcloner-backup-and-restore') ?></th>
|
27 |
+
<th><?php echo __('Recurrence', 'xcloner-backup-and-restore') ?></th>
|
28 |
+
<th class="hide-on-med-and-down"><?php echo __('Next Execution', 'xcloner-backup-and-restore') ?></th>
|
29 |
+
<th><?php echo __('Remote Storage', 'xcloner-backup-and-restore') ?></th>
|
30 |
+
<th class="hide-on-med-and-down"><?php echo __('Last Backup', 'xcloner-backup-and-restore') ?></th>
|
31 |
+
<th><?php echo __('Status', 'xcloner-backup-and-restore') ?></th>
|
32 |
+
<th class="no-sort"><?php echo __('Action', 'xcloner-backup-and-restore') ?></th>
|
33 |
+
</tr>
|
34 |
</thead>
|
35 |
<tfoot>
|
36 |
+
<tr>
|
37 |
+
<th><?php echo __('ID', 'xcloner-backup-and-restore') ?></th>
|
38 |
+
<th><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></th>
|
39 |
+
<th><?php echo __('Recurrence', 'xcloner-backup-and-restore') ?></th>
|
40 |
+
<th class="hide-on-med-and-down"><?php echo __('Next Execution', 'xcloner-backup-and-restore') ?></th>
|
41 |
+
<th><?php echo __('Remote Storage', 'xcloner-backup-and-restore') ?></th>
|
42 |
+
<th class="hide-on-med-and-down"><?php echo __('Last Backup', 'xcloner-backup-and-restore') ?></th>
|
43 |
+
<th><?php echo __('Status', 'xcloner-backup-and-restore') ?></th>
|
44 |
+
<th><?php echo __('Action', 'xcloner-backup-and-restore') ?></th>
|
45 |
+
</tr>
|
46 |
</tfoot>
|
47 |
<tbody>
|
48 |
</tbody>
|
52 |
<div class="row">
|
53 |
<div class="col s12 m6 offset-m6 teal lighten-1" id="server_time">
|
54 |
<h2><?php echo __('Current Server Time', 'xcloner-backup-and-restore') ?>: <span
|
55 |
+
class="right"><?php echo current_time('mysql'); ?></span></h2>
|
56 |
</div>
|
57 |
</div>
|
58 |
|
66 |
|
67 |
<div class="row">
|
68 |
<div class="col s12 m6">
|
69 |
+
<h4><?php echo __('Edit Schedule', 'xcloner-backup-and-restore') ?> #<span id="schedule_id"></span>
|
70 |
+
</h4>
|
71 |
</div>
|
72 |
|
73 |
<div class="col s12 m6 right-align">
|
74 |
<div class="switch">
|
75 |
<label>
|
76 |
+
<?php echo __('Off', 'xcloner-backup-and-restore') ?>
|
77 |
<input type="checkbox" id="status" name="status" value="1">
|
78 |
<span class="lever"></span>
|
79 |
+
<?php echo __('On', 'xcloner-backup-and-restore') ?>
|
80 |
</label>
|
81 |
</div>
|
82 |
</div>
|
84 |
|
85 |
<p>
|
86 |
|
87 |
+
<ul class="nav-tab-wrapper content row">
|
88 |
+
<li><a href="#scheduler_settings"
|
89 |
+
class="nav-tab col s12 m6 nav-tab-active"><?php echo __('Scheduler Settings', 'xcloner-backup-and-restore') ?></a>
|
90 |
+
</li>
|
91 |
+
<li><a href="#advanced_scheduler_settings"
|
92 |
+
class="nav-tab col s12 m6"><?php echo __('Advanced', 'xcloner-backup-and-restore') ?></a>
|
93 |
+
</li>
|
94 |
+
</ul>
|
95 |
+
|
96 |
+
<div class="nav-tab-wrapper-content">
|
97 |
+
<div id="scheduler_settings" class="tab-content active">
|
98 |
+
|
99 |
+
<div class="row">
|
100 |
+
<div class="input-field col s12 l6">
|
101 |
+
<input placeholder="" name="schedule_name" id="schedule_name" type="text" required
|
102 |
+
value="">
|
103 |
+
<label
|
104 |
+
for="schedule_name"><?php echo __('Schedule Name', 'xcloner-backup-and-restore') ?></label>
|
105 |
+
</div>
|
106 |
+
<div class="input-field col s12 l6">
|
107 |
+
<div class="switch">
|
108 |
+
<label>
|
109 |
+
Off
|
110 |
+
<input type="checkbox" name="backup_encrypt" id="backup_encrypt" value="1">
|
111 |
+
<span class="lever"></span>
|
112 |
+
On
|
113 |
+
</label>
|
114 |
+
</div>
|
115 |
+
<label
|
116 |
+
style="top:-1.8em"><?php echo __('Encrypt Backup', 'xcloner-backup-and-restore') ?></label>
|
117 |
</div>
|
|
|
118 |
</div>
|
|
|
119 |
|
120 |
+
<div class="row">
|
121 |
+
<div class="input-field col s12 l6">
|
122 |
+
<input placeholder="" name="schedule_start_date" id="schedule_start_date"
|
123 |
+
type="datetime" value="">
|
124 |
+
<label for="schedule_start_date"
|
125 |
+
class="active"><?php echo __('Schedule Start At', 'xcloner-backup-and-restore') ?>
|
126 |
+
:</label>
|
127 |
+
</div>
|
128 |
|
129 |
+
<div class="input-field col s12 l6">
|
130 |
+
<select name="schedule_frequency" id="schedule_frequency" class="validate" required>
|
131 |
+
<option value="" disabled selected>
|
132 |
+
<?php echo __('Schedule Recurrence', 'xcloner-backup-and-restore') ?></option>
|
133 |
+
<?php
|
134 |
$schedules = $xcloner_scheduler->get_available_intervals();
|
135 |
|
136 |
foreach ($schedules as $key => $schedule) {
|
137 |
?>
|
138 |
<option value="<?php echo $key ?>"><?php echo $schedule['display'] ?></option>
|
139 |
+
<?php
|
140 |
}
|
141 |
?>
|
142 |
+
</select>
|
143 |
+
</div>
|
144 |
</div>
|
|
|
145 |
|
146 |
+
<?php if (sizeof($available_storages)): ?>
|
147 |
<div class="row">
|
148 |
<div class="input-field col s12 l6">
|
149 |
<select name="schedule_storage" id="schedule_storage" class="validate">
|
150 |
+
<option value="" selected><?php echo __('none', 'xcloner-backup-and-restore') ?>
|
151 |
+
</option>
|
152 |
+
<?php foreach ($available_storages as $storage => $text): ?>
|
153 |
+
<option value="<?php echo $storage ?>"><?php echo $text ?></option>
|
154 |
+
<?php endforeach ?>
|
155 |
</select>
|
156 |
<label><?php echo __('Send To Remote Storage', 'xcloner-backup-and-restore') ?></label>
|
157 |
</div>
|
160 |
<div class="switch">
|
161 |
<label>
|
162 |
Off
|
163 |
+
<input type="checkbox" name="backup_delete_after_remote_transfer"
|
164 |
+
id="backup_delete_after_remote_transfer" value="1">
|
165 |
<span class="lever"></span>
|
166 |
On
|
167 |
</label>
|
168 |
</div>
|
169 |
+
<label
|
170 |
+
style="top:-1.8em"><?php echo __('Delete Local Copy After Transfer', 'xcloner-backup-and-restore') ?></label>
|
171 |
</div>
|
172 |
</div>
|
173 |
|
174 |
|
175 |
+
<?php endif ?>
|
176 |
|
177 |
+
<div class="row">
|
178 |
+
<div class="input-field col s12 l12">
|
179 |
+
<input placeholder="" name="email_notification" id="email_notification" type="text"
|
180 |
+
value="">
|
181 |
+
<label
|
182 |
+
for="email_notification"><?php echo __('Email Notification Address', 'xcloner-backup-and-restore') ?></label>
|
183 |
+
</div>
|
184 |
</div>
|
|
|
185 |
|
186 |
+
<div class="row">
|
187 |
+
<div class="input-field col s12 l12">
|
188 |
+
<input placeholder="" name="diff_start_date" id="diff_start_date" type="text"
|
189 |
+
class="datepicker_max_today" value="">
|
190 |
+
<label
|
191 |
+
for="diff_start_date"><?php echo __('Backup Only Files Modified/Created After', 'xcloner-backup-and-restore') ?></label>
|
192 |
+
</div>
|
193 |
</div>
|
194 |
</div>
|
|
|
195 |
|
196 |
+
<div id="advanced_scheduler_settings" class="tab-content">
|
197 |
+
<div class="row">
|
198 |
+
<div class="input-field col s12 l12">
|
199 |
+
<input placeholder="" name="backup_name" id="backup_name" type="text" required value="">
|
200 |
+
<label
|
201 |
+
for="backup_name"><?php echo __('Backup Name', 'xcloner-backup-and-restore') ?></label>
|
202 |
+
</div>
|
203 |
</div>
|
|
|
204 |
|
205 |
+
<div class="row">
|
206 |
+
<div class="input-field col s12 l12">
|
207 |
+
<textarea id="table_params" name="table_params" class="materialize-textarea"
|
208 |
+
rows="15"></textarea>
|
209 |
+
<label for="table_params"
|
210 |
+
class="active"><?php echo __('Included Database Data', 'xcloner-backup-and-restore') ?></label>
|
211 |
+
</div>
|
212 |
</div>
|
|
|
213 |
|
214 |
+
<div class="row">
|
215 |
+
<div class="input-field col s12 l12">
|
216 |
+
<textarea id="excluded_files" name="excluded_files" class="materialize-textarea"
|
217 |
+
rows="15"></textarea>
|
218 |
+
<label for="excluded_files"
|
219 |
+
class="active"><?php echo __('Excluded Files', 'xcloner-backup-and-restore') ?></label>
|
220 |
+
</div>
|
221 |
</div>
|
222 |
</div>
|
223 |
</div>
|
|
|
224 |
|
225 |
+
<div class="row">
|
226 |
|
227 |
+
<div class="input-field col s12 ">
|
228 |
+
<button class="right btn waves-effect waves-light" type="submit"
|
229 |
name="action"><?php echo __('Save', 'xcloner-backup-and-restore') ?>
|
230 |
+
<i class="material-icons right">send</i>
|
231 |
+
</button>
|
232 |
+
</div>
|
233 |
</div>
|
|
|
234 |
</p>
|
235 |
</div>
|
236 |
</form>
|
237 |
+
</div>
|
|
composer.lock
CHANGED
@@ -1394,16 +1394,16 @@
|
|
1394 |
},
|
1395 |
{
|
1396 |
"name": "sabre/dav",
|
1397 |
-
"version": "4.1.
|
1398 |
"source": {
|
1399 |
"type": "git",
|
1400 |
"url": "https://github.com/sabre-io/dav.git",
|
1401 |
-
"reference": "
|
1402 |
},
|
1403 |
"dist": {
|
1404 |
"type": "zip",
|
1405 |
-
"url": "https://api.github.com/repos/sabre-io/dav/zipball/
|
1406 |
-
"reference": "
|
1407 |
"shasum": ""
|
1408 |
},
|
1409 |
"require": {
|
@@ -1427,7 +1427,7 @@
|
|
1427 |
},
|
1428 |
"require-dev": {
|
1429 |
"evert/phpdoc-md": "~0.1.0",
|
1430 |
-
"friendsofphp/php-cs-fixer": "
|
1431 |
"monolog/monolog": "^1.18",
|
1432 |
"phpstan/phpstan": "^0.12",
|
1433 |
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
@@ -1471,28 +1471,29 @@
|
|
1471 |
"framework",
|
1472 |
"iCalendar"
|
1473 |
],
|
1474 |
-
"time": "2020-
|
1475 |
},
|
1476 |
{
|
1477 |
"name": "sabre/event",
|
1478 |
-
"version": "5.1.
|
1479 |
"source": {
|
1480 |
"type": "git",
|
1481 |
"url": "https://github.com/sabre-io/event.git",
|
1482 |
-
"reference": "
|
1483 |
},
|
1484 |
"dist": {
|
1485 |
"type": "zip",
|
1486 |
-
"url": "https://api.github.com/repos/sabre-io/event/zipball/
|
1487 |
-
"reference": "
|
1488 |
"shasum": ""
|
1489 |
},
|
1490 |
"require": {
|
1491 |
-
"php": "^7.1"
|
1492 |
},
|
1493 |
"require-dev": {
|
1494 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
1495 |
-
"
|
|
|
1496 |
},
|
1497 |
"type": "library",
|
1498 |
"autoload": {
|
@@ -1531,7 +1532,7 @@
|
|
1531 |
"reactor",
|
1532 |
"signal"
|
1533 |
],
|
1534 |
-
"time": "2020-
|
1535 |
},
|
1536 |
{
|
1537 |
"name": "sabre/http",
|
@@ -1643,16 +1644,16 @@
|
|
1643 |
},
|
1644 |
{
|
1645 |
"name": "sabre/vobject",
|
1646 |
-
"version": "4.3.
|
1647 |
"source": {
|
1648 |
"type": "git",
|
1649 |
"url": "https://github.com/sabre-io/vobject.git",
|
1650 |
-
"reference": "
|
1651 |
},
|
1652 |
"dist": {
|
1653 |
"type": "zip",
|
1654 |
-
"url": "https://api.github.com/repos/sabre-io/vobject/zipball/
|
1655 |
-
"reference": "
|
1656 |
"shasum": ""
|
1657 |
},
|
1658 |
"require": {
|
@@ -1662,7 +1663,8 @@
|
|
1662 |
},
|
1663 |
"require-dev": {
|
1664 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
1665 |
-
"
|
|
|
1666 |
},
|
1667 |
"suggest": {
|
1668 |
"hoa/bench": "If you would like to run the benchmark scripts"
|
@@ -1736,7 +1738,7 @@
|
|
1736 |
"xCal",
|
1737 |
"xCard"
|
1738 |
],
|
1739 |
-
"time": "2020-
|
1740 |
},
|
1741 |
{
|
1742 |
"name": "sabre/xml",
|
1394 |
},
|
1395 |
{
|
1396 |
"name": "sabre/dav",
|
1397 |
+
"version": "4.1.1",
|
1398 |
"source": {
|
1399 |
"type": "git",
|
1400 |
"url": "https://github.com/sabre-io/dav.git",
|
1401 |
+
"reference": "5736f943c90d8d73d04cd8944d8c913811dc7360"
|
1402 |
},
|
1403 |
"dist": {
|
1404 |
"type": "zip",
|
1405 |
+
"url": "https://api.github.com/repos/sabre-io/dav/zipball/5736f943c90d8d73d04cd8944d8c913811dc7360",
|
1406 |
+
"reference": "5736f943c90d8d73d04cd8944d8c913811dc7360",
|
1407 |
"shasum": ""
|
1408 |
},
|
1409 |
"require": {
|
1427 |
},
|
1428 |
"require-dev": {
|
1429 |
"evert/phpdoc-md": "~0.1.0",
|
1430 |
+
"friendsofphp/php-cs-fixer": "^2.16.3",
|
1431 |
"monolog/monolog": "^1.18",
|
1432 |
"phpstan/phpstan": "^0.12",
|
1433 |
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
1471 |
"framework",
|
1472 |
"iCalendar"
|
1473 |
],
|
1474 |
+
"time": "2020-07-13T13:38:16+00:00"
|
1475 |
},
|
1476 |
{
|
1477 |
"name": "sabre/event",
|
1478 |
+
"version": "5.1.1",
|
1479 |
"source": {
|
1480 |
"type": "git",
|
1481 |
"url": "https://github.com/sabre-io/event.git",
|
1482 |
+
"reference": "a37c73e535ddab02bd892f4bdab4867f9778cbea"
|
1483 |
},
|
1484 |
"dist": {
|
1485 |
"type": "zip",
|
1486 |
+
"url": "https://api.github.com/repos/sabre-io/event/zipball/a37c73e535ddab02bd892f4bdab4867f9778cbea",
|
1487 |
+
"reference": "a37c73e535ddab02bd892f4bdab4867f9778cbea",
|
1488 |
"shasum": ""
|
1489 |
},
|
1490 |
"require": {
|
1491 |
+
"php": "^7.1|^8.0"
|
1492 |
},
|
1493 |
"require-dev": {
|
1494 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
1495 |
+
"phpstan/phpstan": "^0.12",
|
1496 |
+
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
1497 |
},
|
1498 |
"type": "library",
|
1499 |
"autoload": {
|
1532 |
"reactor",
|
1533 |
"signal"
|
1534 |
],
|
1535 |
+
"time": "2020-09-19T20:29:54+00:00"
|
1536 |
},
|
1537 |
{
|
1538 |
"name": "sabre/http",
|
1644 |
},
|
1645 |
{
|
1646 |
"name": "sabre/vobject",
|
1647 |
+
"version": "4.3.1",
|
1648 |
"source": {
|
1649 |
"type": "git",
|
1650 |
"url": "https://github.com/sabre-io/vobject.git",
|
1651 |
+
"reference": "a7feca8311462e5da16952454e420b92c20d3586"
|
1652 |
},
|
1653 |
"dist": {
|
1654 |
"type": "zip",
|
1655 |
+
"url": "https://api.github.com/repos/sabre-io/vobject/zipball/a7feca8311462e5da16952454e420b92c20d3586",
|
1656 |
+
"reference": "a7feca8311462e5da16952454e420b92c20d3586",
|
1657 |
"shasum": ""
|
1658 |
},
|
1659 |
"require": {
|
1663 |
},
|
1664 |
"require-dev": {
|
1665 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
1666 |
+
"phpstan/phpstan": "^0.12",
|
1667 |
+
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
1668 |
},
|
1669 |
"suggest": {
|
1670 |
"hoa/bench": "If you would like to run the benchmark scripts"
|
1738 |
"xCal",
|
1739 |
"xCard"
|
1740 |
],
|
1741 |
+
"time": "2020-07-13T11:23:30+00:00"
|
1742 |
},
|
1743 |
{
|
1744 |
"name": "sabre/xml",
|
includes/class-xcloner.php
CHANGED
@@ -558,6 +558,8 @@ class Xcloner extends watchfulli\XClonerCore\Xcloner
|
|
558 |
$onedrive_expire_in = get_option('xcloner_onedrive_expires_in');
|
559 |
$onedrive_refresh_token = get_option('xcloner_onedrive_refresh_token');
|
560 |
|
|
|
|
|
561 |
if ($onedrive_refresh_token && time()> $onedrive_expire_in) {
|
562 |
$parameters = array(
|
563 |
'client_id' => get_option("xcloner_onedrive_client_id"),
|
@@ -566,6 +568,8 @@ class Xcloner extends watchfulli\XClonerCore\Xcloner
|
|
566 |
'refresh_token'=> $onedrive_refresh_token,
|
567 |
'grant_type'=> 'refresh_token'
|
568 |
);
|
|
|
|
|
569 |
}
|
570 |
|
571 |
if (isset($_REQUEST['code']) && $_REQUEST['code']) {
|
@@ -578,7 +582,7 @@ class Xcloner extends watchfulli\XClonerCore\Xcloner
|
|
578 |
);
|
579 |
}
|
580 |
|
581 |
-
if ($parameters) {
|
582 |
$response = wp_remote_post("https://login.microsoftonline.com/common/oauth2/v2.0/token", array('body' => $parameters));
|
583 |
|
584 |
if (is_wp_error($response)) {
|
@@ -591,11 +595,13 @@ class Xcloner extends watchfulli\XClonerCore\Xcloner
|
|
591 |
update_option('xcloner_onedrive_access_token', $response['access_token']);
|
592 |
update_option('xcloner_onedrive_refresh_token', $response['refresh_token']);
|
593 |
update_option('xcloner_onedrive_expires_in', time()+$response['expires_in']);
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
|
|
|
|
599 |
} else {
|
600 |
$this->trigger_message(__('There was a communication error with the OneDrive API details.'));
|
601 |
}
|
@@ -680,7 +686,7 @@ class Xcloner extends watchfulli\XClonerCore\Xcloner
|
|
680 |
if (function_exists('add_submenu_page')) {
|
681 |
add_submenu_page(
|
682 |
'xcloner_init_page',
|
683 |
-
__('
|
684 |
__('Dashboard', 'xcloner-backup-and-restore'),
|
685 |
'manage_options',
|
686 |
'xcloner_init_page',
|
@@ -688,7 +694,7 @@ class Xcloner extends watchfulli\XClonerCore\Xcloner
|
|
688 |
);
|
689 |
add_submenu_page(
|
690 |
'xcloner_init_page',
|
691 |
-
__('
|
692 |
__('Settings', 'xcloner-backup-and-restore'),
|
693 |
'manage_options',
|
694 |
'xcloner_settings_page',
|
@@ -696,7 +702,7 @@ class Xcloner extends watchfulli\XClonerCore\Xcloner
|
|
696 |
);
|
697 |
add_submenu_page(
|
698 |
'xcloner_init_page',
|
699 |
-
__('Storage Locations
|
700 |
__('Storage Locations', 'xcloner-backup-and-restore'),
|
701 |
'manage_options',
|
702 |
'xcloner_remote_storage_page',
|
558 |
$onedrive_expire_in = get_option('xcloner_onedrive_expires_in');
|
559 |
$onedrive_refresh_token = get_option('xcloner_onedrive_refresh_token');
|
560 |
|
561 |
+
$is_refresh = false;
|
562 |
+
|
563 |
if ($onedrive_refresh_token && time()> $onedrive_expire_in) {
|
564 |
$parameters = array(
|
565 |
'client_id' => get_option("xcloner_onedrive_client_id"),
|
568 |
'refresh_token'=> $onedrive_refresh_token,
|
569 |
'grant_type'=> 'refresh_token'
|
570 |
);
|
571 |
+
|
572 |
+
$is_refresh = true;
|
573 |
}
|
574 |
|
575 |
if (isset($_REQUEST['code']) && $_REQUEST['code']) {
|
582 |
);
|
583 |
}
|
584 |
|
585 |
+
if (isset($parameters) && $parameters) {
|
586 |
$response = wp_remote_post("https://login.microsoftonline.com/common/oauth2/v2.0/token", array('body' => $parameters));
|
587 |
|
588 |
if (is_wp_error($response)) {
|
595 |
update_option('xcloner_onedrive_access_token', $response['access_token']);
|
596 |
update_option('xcloner_onedrive_refresh_token', $response['refresh_token']);
|
597 |
update_option('xcloner_onedrive_expires_in', time()+$response['expires_in']);
|
598 |
+
|
599 |
+
if (!$is_refresh) {
|
600 |
+
$this->trigger_message(
|
601 |
+
sprintf(__('OneDrive successfully authenticated, please click <a href="%s">here</a> to continue', 'xcloner-backup-and-restore'), get_admin_url()."admin.php?page=xcloner_remote_storage_page#onedrive"),
|
602 |
+
'success'
|
603 |
+
);
|
604 |
+
}
|
605 |
} else {
|
606 |
$this->trigger_message(__('There was a communication error with the OneDrive API details.'));
|
607 |
}
|
686 |
if (function_exists('add_submenu_page')) {
|
687 |
add_submenu_page(
|
688 |
'xcloner_init_page',
|
689 |
+
__('Dashboard', 'xcloner-backup-and-restore'),
|
690 |
__('Dashboard', 'xcloner-backup-and-restore'),
|
691 |
'manage_options',
|
692 |
'xcloner_init_page',
|
694 |
);
|
695 |
add_submenu_page(
|
696 |
'xcloner_init_page',
|
697 |
+
__('Backup Settings', 'xcloner-backup-and-restore'),
|
698 |
__('Settings', 'xcloner-backup-and-restore'),
|
699 |
'manage_options',
|
700 |
'xcloner_settings_page',
|
702 |
);
|
703 |
add_submenu_page(
|
704 |
'xcloner_init_page',
|
705 |
+
__('Storage Locations', 'xcloner-backup-and-restore'),
|
706 |
__('Storage Locations', 'xcloner-backup-and-restore'),
|
707 |
'manage_options',
|
708 |
'xcloner_remote_storage_page',
|
vendor/composer/installed.json
CHANGED
@@ -1437,17 +1437,17 @@
|
|
1437 |
},
|
1438 |
{
|
1439 |
"name": "sabre/dav",
|
1440 |
-
"version": "4.1.
|
1441 |
-
"version_normalized": "4.1.
|
1442 |
"source": {
|
1443 |
"type": "git",
|
1444 |
"url": "https://github.com/sabre-io/dav.git",
|
1445 |
-
"reference": "
|
1446 |
},
|
1447 |
"dist": {
|
1448 |
"type": "zip",
|
1449 |
-
"url": "https://api.github.com/repos/sabre-io/dav/zipball/
|
1450 |
-
"reference": "
|
1451 |
"shasum": ""
|
1452 |
},
|
1453 |
"require": {
|
@@ -1471,7 +1471,7 @@
|
|
1471 |
},
|
1472 |
"require-dev": {
|
1473 |
"evert/phpdoc-md": "~0.1.0",
|
1474 |
-
"friendsofphp/php-cs-fixer": "
|
1475 |
"monolog/monolog": "^1.18",
|
1476 |
"phpstan/phpstan": "^0.12",
|
1477 |
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
@@ -1481,13 +1481,13 @@
|
|
1481 |
"ext-imap": "*",
|
1482 |
"ext-pdo": "*"
|
1483 |
},
|
1484 |
-
"time": "2020-
|
1485 |
"bin": [
|
1486 |
"bin/sabredav",
|
1487 |
"bin/naturalselection"
|
1488 |
],
|
1489 |
"type": "library",
|
1490 |
-
"installation-source": "
|
1491 |
"autoload": {
|
1492 |
"psr-4": {
|
1493 |
"Sabre\\DAV\\": "lib/DAV/",
|
@@ -1520,27 +1520,28 @@
|
|
1520 |
},
|
1521 |
{
|
1522 |
"name": "sabre/event",
|
1523 |
-
"version": "5.1.
|
1524 |
-
"version_normalized": "5.1.
|
1525 |
"source": {
|
1526 |
"type": "git",
|
1527 |
"url": "https://github.com/sabre-io/event.git",
|
1528 |
-
"reference": "
|
1529 |
},
|
1530 |
"dist": {
|
1531 |
"type": "zip",
|
1532 |
-
"url": "https://api.github.com/repos/sabre-io/event/zipball/
|
1533 |
-
"reference": "
|
1534 |
"shasum": ""
|
1535 |
},
|
1536 |
"require": {
|
1537 |
-
"php": "^7.1"
|
1538 |
},
|
1539 |
"require-dev": {
|
1540 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
1541 |
-
"
|
|
|
1542 |
},
|
1543 |
-
"time": "2020-
|
1544 |
"type": "library",
|
1545 |
"installation-source": "dist",
|
1546 |
"autoload": {
|
@@ -1694,17 +1695,17 @@
|
|
1694 |
},
|
1695 |
{
|
1696 |
"name": "sabre/vobject",
|
1697 |
-
"version": "4.3.
|
1698 |
-
"version_normalized": "4.3.
|
1699 |
"source": {
|
1700 |
"type": "git",
|
1701 |
"url": "https://github.com/sabre-io/vobject.git",
|
1702 |
-
"reference": "
|
1703 |
},
|
1704 |
"dist": {
|
1705 |
"type": "zip",
|
1706 |
-
"url": "https://api.github.com/repos/sabre-io/vobject/zipball/
|
1707 |
-
"reference": "
|
1708 |
"shasum": ""
|
1709 |
},
|
1710 |
"require": {
|
@@ -1714,12 +1715,13 @@
|
|
1714 |
},
|
1715 |
"require-dev": {
|
1716 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
1717 |
-
"
|
|
|
1718 |
},
|
1719 |
"suggest": {
|
1720 |
"hoa/bench": "If you would like to run the benchmark scripts"
|
1721 |
},
|
1722 |
-
"time": "2020-
|
1723 |
"bin": [
|
1724 |
"bin/vobject",
|
1725 |
"bin/generate_vcards"
|
1437 |
},
|
1438 |
{
|
1439 |
"name": "sabre/dav",
|
1440 |
+
"version": "4.1.1",
|
1441 |
+
"version_normalized": "4.1.1.0",
|
1442 |
"source": {
|
1443 |
"type": "git",
|
1444 |
"url": "https://github.com/sabre-io/dav.git",
|
1445 |
+
"reference": "5736f943c90d8d73d04cd8944d8c913811dc7360"
|
1446 |
},
|
1447 |
"dist": {
|
1448 |
"type": "zip",
|
1449 |
+
"url": "https://api.github.com/repos/sabre-io/dav/zipball/5736f943c90d8d73d04cd8944d8c913811dc7360",
|
1450 |
+
"reference": "5736f943c90d8d73d04cd8944d8c913811dc7360",
|
1451 |
"shasum": ""
|
1452 |
},
|
1453 |
"require": {
|
1471 |
},
|
1472 |
"require-dev": {
|
1473 |
"evert/phpdoc-md": "~0.1.0",
|
1474 |
+
"friendsofphp/php-cs-fixer": "^2.16.3",
|
1475 |
"monolog/monolog": "^1.18",
|
1476 |
"phpstan/phpstan": "^0.12",
|
1477 |
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
1481 |
"ext-imap": "*",
|
1482 |
"ext-pdo": "*"
|
1483 |
},
|
1484 |
+
"time": "2020-07-13T13:38:16+00:00",
|
1485 |
"bin": [
|
1486 |
"bin/sabredav",
|
1487 |
"bin/naturalselection"
|
1488 |
],
|
1489 |
"type": "library",
|
1490 |
+
"installation-source": "source",
|
1491 |
"autoload": {
|
1492 |
"psr-4": {
|
1493 |
"Sabre\\DAV\\": "lib/DAV/",
|
1520 |
},
|
1521 |
{
|
1522 |
"name": "sabre/event",
|
1523 |
+
"version": "5.1.1",
|
1524 |
+
"version_normalized": "5.1.1.0",
|
1525 |
"source": {
|
1526 |
"type": "git",
|
1527 |
"url": "https://github.com/sabre-io/event.git",
|
1528 |
+
"reference": "a37c73e535ddab02bd892f4bdab4867f9778cbea"
|
1529 |
},
|
1530 |
"dist": {
|
1531 |
"type": "zip",
|
1532 |
+
"url": "https://api.github.com/repos/sabre-io/event/zipball/a37c73e535ddab02bd892f4bdab4867f9778cbea",
|
1533 |
+
"reference": "a37c73e535ddab02bd892f4bdab4867f9778cbea",
|
1534 |
"shasum": ""
|
1535 |
},
|
1536 |
"require": {
|
1537 |
+
"php": "^7.1|^8.0"
|
1538 |
},
|
1539 |
"require-dev": {
|
1540 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
1541 |
+
"phpstan/phpstan": "^0.12",
|
1542 |
+
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
1543 |
},
|
1544 |
+
"time": "2020-09-19T20:29:54+00:00",
|
1545 |
"type": "library",
|
1546 |
"installation-source": "dist",
|
1547 |
"autoload": {
|
1695 |
},
|
1696 |
{
|
1697 |
"name": "sabre/vobject",
|
1698 |
+
"version": "4.3.1",
|
1699 |
+
"version_normalized": "4.3.1.0",
|
1700 |
"source": {
|
1701 |
"type": "git",
|
1702 |
"url": "https://github.com/sabre-io/vobject.git",
|
1703 |
+
"reference": "a7feca8311462e5da16952454e420b92c20d3586"
|
1704 |
},
|
1705 |
"dist": {
|
1706 |
"type": "zip",
|
1707 |
+
"url": "https://api.github.com/repos/sabre-io/vobject/zipball/a7feca8311462e5da16952454e420b92c20d3586",
|
1708 |
+
"reference": "a7feca8311462e5da16952454e420b92c20d3586",
|
1709 |
"shasum": ""
|
1710 |
},
|
1711 |
"require": {
|
1715 |
},
|
1716 |
"require-dev": {
|
1717 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
1718 |
+
"phpstan/phpstan": "^0.12",
|
1719 |
+
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.0"
|
1720 |
},
|
1721 |
"suggest": {
|
1722 |
"hoa/bench": "If you would like to run the benchmark scripts"
|
1723 |
},
|
1724 |
+
"time": "2020-07-13T11:23:30+00:00",
|
1725 |
"bin": [
|
1726 |
"bin/vobject",
|
1727 |
"bin/generate_vcards"
|
vendor/sabre/dav/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
ChangeLog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
4.1.0 (2020-03-20)
|
5 |
-------------------------
|
6 |
* Support PHP 7.4
|
1 |
ChangeLog
|
2 |
=========
|
3 |
|
4 |
+
4.1.1 (2020-07-13)
|
5 |
+
-------------------------
|
6 |
+
* Fix PHPdoc of Tree:move method
|
7 |
+
* Allow using custom SAPI implementations
|
8 |
+
* Include baseUri in lock responses
|
9 |
+
|
10 |
4.1.0 (2020-03-20)
|
11 |
-------------------------
|
12 |
* Support PHP 7.4
|
vendor/sabre/dav/composer.json
CHANGED
@@ -33,7 +33,7 @@
|
|
33 |
"ext-json": "*"
|
34 |
},
|
35 |
"require-dev" : {
|
36 |
-
"friendsofphp/php-cs-fixer": "
|
37 |
"phpstan/phpstan": "^0.12",
|
38 |
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
|
39 |
"evert/phpdoc-md" : "~0.1.0",
|
33 |
"ext-json": "*"
|
34 |
},
|
35 |
"require-dev" : {
|
36 |
+
"friendsofphp/php-cs-fixer": "^2.16.3",
|
37 |
"phpstan/phpstan": "^0.12",
|
38 |
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
|
39 |
"evert/phpdoc-md" : "~0.1.0",
|
vendor/sabre/dav/examples/groupwareserver.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* statement.
|
13 |
*/
|
14 |
|
15 |
-
|
16 |
* UTC or GMT is easy to work with, and usually recommended for any
|
17 |
* application.
|
18 |
*/
|
12 |
* statement.
|
13 |
*/
|
14 |
|
15 |
+
/*
|
16 |
* UTC or GMT is easy to work with, and usually recommended for any
|
17 |
* application.
|
18 |
*/
|
vendor/sabre/dav/lib/DAV/Locks/Plugin.php
CHANGED
@@ -371,7 +371,7 @@ class Plugin extends DAV\ServerPlugin
|
|
371 |
{
|
372 |
return $this->server->xml->write('{DAV:}prop', [
|
373 |
'{DAV:}lockdiscovery' => new DAV\Xml\Property\LockDiscovery([$lockInfo]),
|
374 |
-
]);
|
375 |
}
|
376 |
|
377 |
/**
|
371 |
{
|
372 |
return $this->server->xml->write('{DAV:}prop', [
|
373 |
'{DAV:}lockdiscovery' => new DAV\Xml\Property\LockDiscovery([$lockInfo]),
|
374 |
+
], $this->server->getBaseUri());
|
375 |
}
|
376 |
|
377 |
/**
|
vendor/sabre/dav/lib/DAV/Server.php
CHANGED
@@ -208,8 +208,10 @@ class Server implements LoggerAwareInterface, EmitterInterface
|
|
208 |
* the nodes in the array as top-level children.
|
209 |
*
|
210 |
* @param Tree|INode|array|null $treeOrNode The tree object
|
|
|
|
|
211 |
*/
|
212 |
-
public function __construct($treeOrNode = null)
|
213 |
{
|
214 |
if ($treeOrNode instanceof Tree) {
|
215 |
$this->tree = $treeOrNode;
|
@@ -226,7 +228,7 @@ class Server implements LoggerAwareInterface, EmitterInterface
|
|
226 |
}
|
227 |
|
228 |
$this->xml = new Xml\Service();
|
229 |
-
$this->sapi = new HTTP\Sapi();
|
230 |
$this->httpResponse = new HTTP\Response();
|
231 |
$this->httpRequest = $this->sapi->getRequest();
|
232 |
$this->addPlugin(new CorePlugin());
|
208 |
* the nodes in the array as top-level children.
|
209 |
*
|
210 |
* @param Tree|INode|array|null $treeOrNode The tree object
|
211 |
+
*
|
212 |
+
* @throws Exception
|
213 |
*/
|
214 |
+
public function __construct($treeOrNode = null, HTTP\Sapi $sapi = null)
|
215 |
{
|
216 |
if ($treeOrNode instanceof Tree) {
|
217 |
$this->tree = $treeOrNode;
|
228 |
}
|
229 |
|
230 |
$this->xml = new Xml\Service();
|
231 |
+
$this->sapi = $sapi ?? new HTTP\Sapi();
|
232 |
$this->httpResponse = new HTTP\Response();
|
233 |
$this->httpRequest = $this->sapi->getRequest();
|
234 |
$this->addPlugin(new CorePlugin());
|
vendor/sabre/dav/lib/DAV/Tree.php
CHANGED
@@ -141,8 +141,6 @@ class Tree
|
|
141 |
*
|
142 |
* @param string $sourcePath The path to the file which should be moved
|
143 |
* @param string $destinationPath The full destination path, so not just the destination parent node
|
144 |
-
*
|
145 |
-
* @return int
|
146 |
*/
|
147 |
public function move($sourcePath, $destinationPath)
|
148 |
{
|
141 |
*
|
142 |
* @param string $sourcePath The path to the file which should be moved
|
143 |
* @param string $destinationPath The full destination path, so not just the destination parent node
|
|
|
|
|
144 |
*/
|
145 |
public function move($sourcePath, $destinationPath)
|
146 |
{
|
vendor/sabre/dav/lib/DAV/Version.php
CHANGED
@@ -16,5 +16,5 @@ class Version
|
|
16 |
/**
|
17 |
* Full version number.
|
18 |
*/
|
19 |
-
public const VERSION = '4.1.
|
20 |
}
|
16 |
/**
|
17 |
* Full version number.
|
18 |
*/
|
19 |
+
public const VERSION = '4.1.1';
|
20 |
}
|
vendor/sabre/event/composer.json
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
"homepage": "http://sabre.io/event/",
|
17 |
"license": "BSD-3-Clause",
|
18 |
"require": {
|
19 |
-
"php": "^7.1"
|
20 |
},
|
21 |
"authors": [
|
22 |
{
|
@@ -40,11 +40,30 @@
|
|
40 |
"lib/Promise/functions.php"
|
41 |
]
|
42 |
},
|
|
|
|
|
|
|
|
|
|
|
43 |
"require-dev": {
|
44 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
45 |
-
"
|
|
|
46 |
},
|
47 |
-
"
|
48 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
}
|
16 |
"homepage": "http://sabre.io/event/",
|
17 |
"license": "BSD-3-Clause",
|
18 |
"require": {
|
19 |
+
"php": "^7.1|^8.0"
|
20 |
},
|
21 |
"authors": [
|
22 |
{
|
40 |
"lib/Promise/functions.php"
|
41 |
]
|
42 |
},
|
43 |
+
"autoload-dev": {
|
44 |
+
"psr-4" : {
|
45 |
+
"Sabre\\Event\\" : "tests/Event"
|
46 |
+
}
|
47 |
+
},
|
48 |
"require-dev": {
|
49 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
50 |
+
"phpstan/phpstan": "^0.12",
|
51 |
+
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0"
|
52 |
},
|
53 |
+
"scripts": {
|
54 |
+
"phpstan": [
|
55 |
+
"phpstan analyse lib tests"
|
56 |
+
],
|
57 |
+
"cs-fixer": [
|
58 |
+
"php-cs-fixer fix"
|
59 |
+
],
|
60 |
+
"phpunit": [
|
61 |
+
"phpunit --configuration tests/phpunit.xml"
|
62 |
+
],
|
63 |
+
"test": [
|
64 |
+
"composer phpstan",
|
65 |
+
"composer cs-fixer",
|
66 |
+
"composer phpunit"
|
67 |
+
]
|
68 |
}
|
69 |
}
|
vendor/sabre/event/lib/Promise.php
CHANGED
@@ -22,6 +22,8 @@ use Throwable;
|
|
22 |
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
|
23 |
* @author Evert Pot (http://evertpot.com/)
|
24 |
* @license http://sabre.io/license/ Modified BSD License
|
|
|
|
|
25 |
*/
|
26 |
class Promise
|
27 |
{
|
@@ -168,6 +170,7 @@ class Promise
|
|
168 |
* chain.
|
169 |
*
|
170 |
* @return mixed
|
|
|
171 |
*/
|
172 |
public function wait()
|
173 |
{
|
22 |
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
|
23 |
* @author Evert Pot (http://evertpot.com/)
|
24 |
* @license http://sabre.io/license/ Modified BSD License
|
25 |
+
*
|
26 |
+
* @psalm-template TReturn
|
27 |
*/
|
28 |
class Promise
|
29 |
{
|
170 |
* chain.
|
171 |
*
|
172 |
* @return mixed
|
173 |
+
* @psalm-return TReturn
|
174 |
*/
|
175 |
public function wait()
|
176 |
{
|
vendor/sabre/event/lib/Version.php
CHANGED
@@ -16,5 +16,5 @@ class Version
|
|
16 |
/**
|
17 |
* Full version number.
|
18 |
*/
|
19 |
-
const VERSION = '5.1.
|
20 |
}
|
16 |
/**
|
17 |
* Full version number.
|
18 |
*/
|
19 |
+
const VERSION = '5.1.1';
|
20 |
}
|
vendor/sabre/event/lib/coroutine.php
CHANGED
@@ -44,6 +44,10 @@ use Throwable;
|
|
44 |
*
|
45 |
* @return \Sabre\Event\Promise
|
46 |
*
|
|
|
|
|
|
|
|
|
47 |
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
|
48 |
* @author Evert Pot (http://evertpot.com/)
|
49 |
* @license http://sabre.io/license/ Modified BSD License
|
44 |
*
|
45 |
* @return \Sabre\Event\Promise
|
46 |
*
|
47 |
+
* @psalm-template TReturn
|
48 |
+
* @psalm-param callable():\Generator<mixed, mixed, mixed, TReturn> $gen
|
49 |
+
* @psalm-return Promise<TReturn>
|
50 |
+
*
|
51 |
* @copyright Copyright (C) fruux GmbH (https://fruux.com/)
|
52 |
* @author Evert Pot (http://evertpot.com/)
|
53 |
* @license http://sabre.io/license/ Modified BSD License
|
vendor/sabre/http/lib/Client.php
CHANGED
@@ -381,6 +381,11 @@ class Client extends EventEmitter
|
|
381 |
// reason.
|
382 |
$settings[CURLOPT_PUT] = true;
|
383 |
$settings[CURLOPT_INFILE] = $request->getBody();
|
|
|
|
|
|
|
|
|
|
|
384 |
} else {
|
385 |
// For security we cast this to a string. If somehow an array could
|
386 |
// be passed here, it would be possible for an attacker to use @ to
|
381 |
// reason.
|
382 |
$settings[CURLOPT_PUT] = true;
|
383 |
$settings[CURLOPT_INFILE] = $request->getBody();
|
384 |
+
|
385 |
+
$file_stats = fstat($settings[CURLOPT_INFILE]);
|
386 |
+
if (isset($file_stats['size'])) {
|
387 |
+
$settings[CURLOPT_INFILESIZE] = $file_stats['size'];
|
388 |
+
}
|
389 |
} else {
|
390 |
// For security we cast this to a string. If somehow an array could
|
391 |
// be passed here, it would be possible for an attacker to use @ to
|
vendor/sabre/vobject/.travis.yml
CHANGED
@@ -5,22 +5,33 @@ php:
|
|
5 |
- 7.3
|
6 |
- 7.4
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
matrix:
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
fast_finish: true
|
10 |
|
11 |
-
install:
|
12 |
-
- composer require --dev phpstan/phpstan:^0.12
|
13 |
-
|
14 |
before_script:
|
15 |
-
- composer
|
16 |
|
17 |
script:
|
18 |
-
-
|
19 |
-
- php
|
20 |
-
-
|
21 |
-
|
22 |
after_success:
|
23 |
-
- bash <(curl -s https://codecov.io/bash)
|
24 |
|
25 |
cache:
|
26 |
directories:
|
5 |
- 7.3
|
6 |
- 7.4
|
7 |
|
8 |
+
env:
|
9 |
+
global:
|
10 |
+
- MEMCACHED_SERVER=127.0.0.1
|
11 |
+
- RUN_PHPSTAN="FALSE"
|
12 |
+
matrix:
|
13 |
+
- PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
|
14 |
+
- PREFER_LOWEST="--prefer-lowest" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""
|
15 |
+
|
16 |
matrix:
|
17 |
+
include:
|
18 |
+
- name: 'PHPStan'
|
19 |
+
php: 7.4
|
20 |
+
env:
|
21 |
+
- RUN_PHPSTAN="TRUE"
|
22 |
+
- REPORT_COVERAGE="FALSE"
|
23 |
fast_finish: true
|
24 |
|
|
|
|
|
|
|
25 |
before_script:
|
26 |
+
- composer update $PREFER_LOWEST
|
27 |
|
28 |
script:
|
29 |
+
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
|
30 |
+
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE; fi
|
31 |
+
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi
|
32 |
+
|
33 |
after_success:
|
34 |
+
- if [ $REPORT_COVERAGE == "TRUE" ]; then bash <(curl -s https://codecov.io/bash); fi
|
35 |
|
36 |
cache:
|
37 |
directories:
|
vendor/sabre/vobject/CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1 |
ChangeLog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
4.3.0 (2020-01-31)
|
5 |
------------------
|
6 |
|
1 |
ChangeLog
|
2 |
=========
|
3 |
|
4 |
+
4.3.1 (2020-07-13)
|
5 |
+
------------------
|
6 |
+
|
7 |
+
* #510: Fix an incomplete phpdoc type annotation (@mstilkerich)
|
8 |
+
* #505: Refactor unit test code for phpunit9 (@phil-davis)
|
9 |
+
* #500: Standardize CI (@phil-davis)
|
10 |
+
* #496: CI tooling changes (@JeroenVanOort)
|
11 |
+
|
12 |
4.3.0 (2020-01-31)
|
13 |
------------------
|
14 |
|
vendor/sabre/vobject/composer.json
CHANGED
@@ -38,7 +38,8 @@
|
|
38 |
},
|
39 |
"require-dev" : {
|
40 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
41 |
-
"phpunit/phpunit" : "^7 || ^8"
|
|
|
42 |
},
|
43 |
"suggest" : {
|
44 |
"hoa/bench" : "If you would like to run the benchmark scripts"
|
@@ -86,7 +87,20 @@
|
|
86 |
"dev-master" : "4.0.x-dev"
|
87 |
}
|
88 |
},
|
89 |
-
"
|
90 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
92 |
}
|
38 |
},
|
39 |
"require-dev" : {
|
40 |
"friendsofphp/php-cs-fixer": "~2.16.1",
|
41 |
+
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
|
42 |
+
"phpstan/phpstan": "^0.12"
|
43 |
},
|
44 |
"suggest" : {
|
45 |
"hoa/bench" : "If you would like to run the benchmark scripts"
|
87 |
"dev-master" : "4.0.x-dev"
|
88 |
}
|
89 |
},
|
90 |
+
"scripts": {
|
91 |
+
"phpstan": [
|
92 |
+
"phpstan analyse lib tests"
|
93 |
+
],
|
94 |
+
"cs-fixer": [
|
95 |
+
"php-cs-fixer fix"
|
96 |
+
],
|
97 |
+
"phpunit": [
|
98 |
+
"phpunit --configuration tests/phpunit.xml"
|
99 |
+
],
|
100 |
+
"test": [
|
101 |
+
"composer phpstan",
|
102 |
+
"composer cs-fixer",
|
103 |
+
"composer phpunit"
|
104 |
+
]
|
105 |
}
|
106 |
}
|
vendor/sabre/vobject/lib/Component.php
CHANGED
@@ -431,7 +431,7 @@ class Component extends Node
|
|
431 |
*
|
432 |
* @param string $name
|
433 |
*
|
434 |
-
* @return Property
|
435 |
*/
|
436 |
public function __get($name)
|
437 |
{
|
431 |
*
|
432 |
* @param string $name
|
433 |
*
|
434 |
+
* @return Property|null
|
435 |
*/
|
436 |
public function __get($name)
|
437 |
{
|
vendor/sabre/vobject/lib/Version.php
CHANGED
@@ -14,5 +14,5 @@ class Version
|
|
14 |
/**
|
15 |
* Full version number.
|
16 |
*/
|
17 |
-
const VERSION = '4.3.
|
18 |
}
|
14 |
/**
|
15 |
* Full version number.
|
16 |
*/
|
17 |
+
const VERSION = '4.3.1';
|
18 |
}
|
vendor/sabre/vobject/tests/VObject/CliTest.php
CHANGED
@@ -483,7 +483,15 @@ VCARD
|
|
483 |
);
|
484 |
|
485 |
rewind($this->cli->stdout);
|
486 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
}
|
488 |
|
489 |
public function testRepairNothing()
|
483 |
);
|
484 |
|
485 |
rewind($this->cli->stdout);
|
486 |
+
$regularExpression = "/^BEGIN:VCARD\r\nVERSION:2.1\r\nUID:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\r\nEND:VCARD\r\n$/";
|
487 |
+
$data = stream_get_contents($this->cli->stdout);
|
488 |
+
// ToDo: when we do not need to run phpunit 7 or 8, remove this 'if' block and just use
|
489 |
+
// the new assertMatchesRegularExpression that exists since phpunit 9.
|
490 |
+
if (method_exists($this, 'assertMatchesRegularExpression')) {
|
491 |
+
$this->assertMatchesRegularExpression($regularExpression, $data);
|
492 |
+
} else {
|
493 |
+
$this->assertRegExp($regularExpression, $data);
|
494 |
+
}
|
495 |
}
|
496 |
|
497 |
public function testRepairNothing()
|
vendor/sabre/vobject/tests/phpunit.xml
CHANGED
@@ -9,16 +9,13 @@
|
|
9 |
>
|
10 |
<testsuites>
|
11 |
<testsuite name="Sabre\VObject">
|
12 |
-
<directory
|
13 |
</testsuite>
|
14 |
</testsuites>
|
15 |
|
16 |
<filter>
|
17 |
<whitelist addUncoveredFilesFromWhitelist="true">
|
18 |
<directory suffix=".php">../lib/</directory>
|
19 |
-
<exclude>
|
20 |
-
<file>../lib/Sabre/VObject/includes.php</file>
|
21 |
-
</exclude>
|
22 |
</whitelist>
|
23 |
</filter>
|
24 |
</phpunit>
|
9 |
>
|
10 |
<testsuites>
|
11 |
<testsuite name="Sabre\VObject">
|
12 |
+
<directory>.</directory>
|
13 |
</testsuite>
|
14 |
</testsuites>
|
15 |
|
16 |
<filter>
|
17 |
<whitelist addUncoveredFilesFromWhitelist="true">
|
18 |
<directory suffix=".php">../lib/</directory>
|
|
|
|
|
|
|
19 |
</whitelist>
|
20 |
</filter>
|
21 |
</phpunit>
|
vendor/watchfulli/xcloner-core/lib/mock_wp_functions.php
CHANGED
@@ -75,6 +75,13 @@ if (!function_exists('get_site_url')) {
|
|
75 |
}
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
if (!function_exists('admin_url')) {
|
79 |
function admin_url()
|
80 |
{
|
75 |
}
|
76 |
}
|
77 |
|
78 |
+
if (!function_exists('get_home_url')) {
|
79 |
+
function get_home_url()
|
80 |
+
{
|
81 |
+
return __DIR__;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
if (!function_exists('admin_url')) {
|
86 |
function admin_url()
|
87 |
{
|
vendor/watchfulli/xcloner-core/src/Xcloner_Api.php
CHANGED
@@ -443,7 +443,7 @@ class Xcloner_Api
|
|
443 |
*/
|
444 |
private function process_params($params)
|
445 |
{
|
446 |
-
if ($params && $params->processed) {
|
447 |
$this->form_params = json_decode(json_encode((array)$params), true);
|
448 |
return;
|
449 |
}
|
443 |
*/
|
444 |
private function process_params($params)
|
445 |
{
|
446 |
+
if ($params && property_exists($params, 'processed') && $params->processed) {
|
447 |
$this->form_params = json_decode(json_encode((array)$params), true);
|
448 |
return;
|
449 |
}
|
vendor/watchfulli/xcloner-core/src/Xcloner_Archive.php
CHANGED
@@ -31,6 +31,7 @@ namespace watchfulli\XClonerCore;
|
|
31 |
use splitbrain\PHPArchive\Tar;
|
32 |
use splitbrain\PHPArchive\Archive;
|
33 |
use splitbrain\PHPArchive\FileInfo;
|
|
|
34 |
|
35 |
/**
|
36 |
* Class responsible for adding files to Tar
|
@@ -230,7 +231,7 @@ class Xcloner_Archive extends Tar
|
|
230 |
public function send_notification_error($to, $from, $subject, $backup_name, $params, $error_message)
|
231 |
{
|
232 |
$body = "";
|
233 |
-
$body .= sprintf(__("Backup Site Url: %s"),
|
234 |
$body .= "<br /><>";
|
235 |
|
236 |
$body .= sprintf(__("Error Message: %s"), $error_message);
|
@@ -286,8 +287,9 @@ class Xcloner_Archive extends Tar
|
|
286 |
if (!$subject) {
|
287 |
$subject = sprintf(__("New backup generated %s"), $backup_name);
|
288 |
}
|
289 |
-
|
290 |
-
|
|
|
291 |
$body = sprintf(__("Generated Backup Size: %s"), $additional['backup_size']);
|
292 |
$body .= "<br /><br />";
|
293 |
|
@@ -312,7 +314,7 @@ class Xcloner_Archive extends Tar
|
|
312 |
|
313 |
$body .= "<br />";
|
314 |
|
315 |
-
$body .= sprintf(__("Backup Site Url: %s"),
|
316 |
$body .= "<br />";
|
317 |
|
318 |
if (isset($params['backup_params']->backup_comments)) {
|
@@ -864,7 +866,7 @@ class Xcloner_Archive extends Tar
|
|
864 |
|
865 |
public function open($file, $start_byte = 0)
|
866 |
{
|
867 |
-
|
868 |
|
869 |
if ($start_byte) {
|
870 |
fseek($this->fh, $start_byte);
|
@@ -924,7 +926,7 @@ class Xcloner_Archive extends Tar
|
|
924 |
throw new ArchiveIOException('Can not read from a closed archive');
|
925 |
}
|
926 |
|
927 |
-
|
928 |
$result = array();
|
929 |
|
930 |
while ($read = $this->readbytes(512)) {
|
@@ -933,24 +935,23 @@ class Xcloner_Archive extends Tar
|
|
933 |
continue;
|
934 |
}
|
935 |
|
936 |
-
if($files_limit)
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
}
|
944 |
-
}
|
945 |
|
946 |
-
|
947 |
-
|
|
|
948 |
|
949 |
$this->skipbytes(ceil($header['size'] / 512) * 512);
|
950 |
$result[] = $this->header2fileinfo($header);
|
951 |
}
|
952 |
|
953 |
-
|
954 |
|
955 |
$this->close();
|
956 |
return $return;
|
@@ -968,16 +969,16 @@ class Xcloner_Archive extends Tar
|
|
968 |
*/
|
969 |
public function extract($outdir, $strip = '', $exclude = '', $include = '', $files_limit = 0)
|
970 |
{
|
971 |
-
|
972 |
if ($this->closed || !$this->file) {
|
973 |
throw new ArchiveIOException('Can not read from a closed archive');
|
974 |
}
|
975 |
|
976 |
$outdir = rtrim($outdir, '/');
|
977 |
-
if(!is_dir($outdir))
|
978 |
-
|
979 |
-
|
980 |
-
|
|
|
981 |
|
982 |
//@mkdir($outdir, 0777, true);
|
983 |
|
@@ -985,8 +986,8 @@ class Xcloner_Archive extends Tar
|
|
985 |
throw new ArchiveIOException("Could not create directory '$outdir'");
|
986 |
}
|
987 |
|
988 |
-
|
989 |
-
|
990 |
|
991 |
$extracted = array();
|
992 |
while ($dat = $this->readbytes(512)) {
|
@@ -996,15 +997,13 @@ class Xcloner_Archive extends Tar
|
|
996 |
continue;
|
997 |
}
|
998 |
|
999 |
-
if($files_limit)
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
}
|
1007 |
-
}
|
1008 |
|
1009 |
$fileinfo = $this->header2fileinfo($header);
|
1010 |
|
@@ -1020,15 +1019,17 @@ class Xcloner_Archive extends Tar
|
|
1020 |
// create output directory
|
1021 |
$output = $outdir.'/'.$fileinfo->getPath();
|
1022 |
$directory = ($fileinfo->getIsdir()) ? $output : dirname($output);
|
1023 |
-
if(!is_dir($directory))
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
|
|
1027 |
|
1028 |
// extract data
|
1029 |
if (!$fileinfo->getIsdir()) {
|
1030 |
-
|
1031 |
-
|
|
|
1032 |
|
1033 |
$fp = fopen($output, "wb");
|
1034 |
if (!$fp) {
|
31 |
use splitbrain\PHPArchive\Tar;
|
32 |
use splitbrain\PHPArchive\Archive;
|
33 |
use splitbrain\PHPArchive\FileInfo;
|
34 |
+
use splitbrain\PHPArchive\ArchiveIOException;
|
35 |
|
36 |
/**
|
37 |
* Class responsible for adding files to Tar
|
231 |
public function send_notification_error($to, $from, $subject, $backup_name, $params, $error_message)
|
232 |
{
|
233 |
$body = "";
|
234 |
+
$body .= sprintf(__("Backup Site Url: %s"), get_home_url());
|
235 |
$body .= "<br /><>";
|
236 |
|
237 |
$body .= sprintf(__("Error Message: %s"), $error_message);
|
287 |
if (!$subject) {
|
288 |
$subject = sprintf(__("New backup generated %s"), $backup_name);
|
289 |
}
|
290 |
+
if (!isset($additional['backup_size'])) {
|
291 |
+
$additional['backup_size'] = size_format($this->filesystem->get_backup_size($backup_name));
|
292 |
+
}
|
293 |
$body = sprintf(__("Generated Backup Size: %s"), $additional['backup_size']);
|
294 |
$body .= "<br /><br />";
|
295 |
|
314 |
|
315 |
$body .= "<br />";
|
316 |
|
317 |
+
$body .= sprintf(__("Backup Site Url: %s"), get_home_url());
|
318 |
$body .= "<br />";
|
319 |
|
320 |
if (isset($params['backup_params']->backup_comments)) {
|
866 |
|
867 |
public function open($file, $start_byte = 0)
|
868 |
{
|
869 |
+
parent::open($file);
|
870 |
|
871 |
if ($start_byte) {
|
872 |
fseek($this->fh, $start_byte);
|
926 |
throw new ArchiveIOException('Can not read from a closed archive');
|
927 |
}
|
928 |
|
929 |
+
$files_counter = 0;
|
930 |
$result = array();
|
931 |
|
932 |
while ($read = $this->readbytes(512)) {
|
935 |
continue;
|
936 |
}
|
937 |
|
938 |
+
if ($files_limit) {
|
939 |
+
if (++$files_counter > $files_limit) {
|
940 |
+
$return['extracted_files'] = $result;
|
941 |
+
$return['start'] = ftell($this->fh)-512;
|
942 |
+
return $return;
|
943 |
+
}
|
944 |
+
}
|
|
|
|
|
945 |
|
946 |
+
if ($header['typeflag'] == 5) {
|
947 |
+
$header['size'] = 0;
|
948 |
+
}
|
949 |
|
950 |
$this->skipbytes(ceil($header['size'] / 512) * 512);
|
951 |
$result[] = $this->header2fileinfo($header);
|
952 |
}
|
953 |
|
954 |
+
$return['extracted_files'] = $result;
|
955 |
|
956 |
$this->close();
|
957 |
return $return;
|
969 |
*/
|
970 |
public function extract($outdir, $strip = '', $exclude = '', $include = '', $files_limit = 0)
|
971 |
{
|
|
|
972 |
if ($this->closed || !$this->file) {
|
973 |
throw new ArchiveIOException('Can not read from a closed archive');
|
974 |
}
|
975 |
|
976 |
$outdir = rtrim($outdir, '/');
|
977 |
+
if (!is_dir($outdir)) {
|
978 |
+
@mkdir($outdir, 0755, true);
|
979 |
+
} else {
|
980 |
+
@chmod($outdir, 0777);
|
981 |
+
}
|
982 |
|
983 |
//@mkdir($outdir, 0777, true);
|
984 |
|
986 |
throw new ArchiveIOException("Could not create directory '$outdir'");
|
987 |
}
|
988 |
|
989 |
+
$files_counter = 0;
|
990 |
+
$return = array();
|
991 |
|
992 |
$extracted = array();
|
993 |
while ($dat = $this->readbytes(512)) {
|
997 |
continue;
|
998 |
}
|
999 |
|
1000 |
+
if ($files_limit) {
|
1001 |
+
if (++$files_counter > $files_limit) {
|
1002 |
+
$return['extracted_files'] = $extracted;
|
1003 |
+
$return['start'] = ftell($this->fh)-512;
|
1004 |
+
return $return;
|
1005 |
+
}
|
1006 |
+
}
|
|
|
|
|
1007 |
|
1008 |
$fileinfo = $this->header2fileinfo($header);
|
1009 |
|
1019 |
// create output directory
|
1020 |
$output = $outdir.'/'.$fileinfo->getPath();
|
1021 |
$directory = ($fileinfo->getIsdir()) ? $output : dirname($output);
|
1022 |
+
if (!is_dir($directory)) {
|
1023 |
+
@mkdir($directory, 0755, true);
|
1024 |
+
} else {
|
1025 |
+
@chmod($directory, 0755);
|
1026 |
+
}
|
1027 |
|
1028 |
// extract data
|
1029 |
if (!$fileinfo->getIsdir()) {
|
1030 |
+
if (file_exists($output)) {
|
1031 |
+
unlink($output);
|
1032 |
+
}
|
1033 |
|
1034 |
$fp = fopen($output, "wb");
|
1035 |
if (!$fp) {
|
vendor/watchfulli/xcloner-core/src/Xcloner_Remote_Storage.php
CHANGED
@@ -47,19 +47,24 @@ use League\Flysystem\AwsS3v3\AwsS3Adapter;
|
|
47 |
|
48 |
use Mhetreramesh\Flysystem\BackblazeAdapter;
|
49 |
use BackblazeB2\Client as B2Client;
|
50 |
-
|
51 |
#use Sabre\DAV\Client as SabreClient;
|
52 |
#use League\Flysystem\WebDAV\WebDAVAdapter;
|
53 |
|
54 |
use Microsoft\Graph\Graph;
|
55 |
use NicolasBeauvais\FlysystemOneDrive\OneDriveAdapter;
|
56 |
|
|
|
|
|
57 |
/**
|
58 |
* Class Xcloner_Remote_Storage
|
59 |
*/
|
60 |
class Xcloner_Remote_Storage
|
61 |
{
|
62 |
-
|
|
|
|
|
|
|
63 |
|
64 |
private $storage_fields = array(
|
65 |
"option_prefix" => "xcloner_",
|
@@ -640,14 +645,10 @@ class Xcloner_Remote_Storage
|
|
640 |
'version' => 'latest',
|
641 |
);
|
642 |
|
643 |
-
if ($this->xcloner_settings->get_xcloner_option('xcloner_aws_endpoint')
|
644 |
/*&& !$this->xcloner_settings->get_xcloner_option("xcloner_aws_region")*/) {
|
645 |
$credentials['endpoint'] = $this->xcloner_settings->get_xcloner_option('xcloner_aws_endpoint');
|
646 |
-
#$credentials['use_path_style_endpoint'] = true;
|
647 |
-
#$credentials['bucket_endpoint'] = false;
|
648 |
}
|
649 |
-
//echo $this->xcloner_settings->get_xcloner_option('xcloner_aws_endpoint');
|
650 |
-
//print_r($credentials);exit;
|
651 |
$client = new S3Client($credentials);
|
652 |
|
653 |
$adapter = new AwsS3Adapter($client, $this->xcloner_settings->get_xcloner_option("xcloner_aws_bucket_name"), $this->xcloner_settings->get_xcloner_option("xcloner_aws_prefix"));
|
@@ -666,7 +667,6 @@ class Xcloner_Remote_Storage
|
|
666 |
throw new \Exception("BACKBLAZE API requires PHP 7.1 to be installed!");
|
667 |
}
|
668 |
|
669 |
-
|
670 |
$client = new B2Client(
|
671 |
$this->xcloner_settings->get_xcloner_option("xcloner_backblaze_account_id"),
|
672 |
$this->xcloner_settings->get_xcloner_option("xcloner_backblaze_application_key")
|
@@ -692,9 +692,10 @@ class Xcloner_Remote_Storage
|
|
692 |
'baseUri' => $this->xcloner_settings->get_xcloner_option("xcloner_webdav_url"),
|
693 |
'userName' => $this->xcloner_settings->get_xcloner_option("xcloner_webdav_username"),
|
694 |
'password' => $this->xcloner_settings->get_xcloner_option("xcloner_webdav_password"),
|
|
|
695 |
//'proxy' => 'locahost:8888',
|
696 |
);
|
697 |
-
|
698 |
$client = new \Sabre\DAV\Client($settings);
|
699 |
$adapter = new \League\Flysystem\WebDAV\WebDAVAdapter($client, $this->xcloner_settings->get_xcloner_option("xcloner_webdav_target_folder"));
|
700 |
$filesystem = new Filesystem($adapter, new Config([
|
@@ -706,14 +707,13 @@ class Xcloner_Remote_Storage
|
|
706 |
|
707 |
/**
|
708 |
* OneDrive connector
|
709 |
-
*
|
710 |
* https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online#token-flow
|
711 |
*
|
712 |
* @return void
|
713 |
*/
|
714 |
public function get_onedrive_filesystem()
|
715 |
{
|
716 |
-
|
717 |
$accessToken = get_option('xcloner_onedrive_access_token');
|
718 |
|
719 |
$graph = new Graph();
|
@@ -736,16 +736,21 @@ class Xcloner_Remote_Storage
|
|
736 |
}
|
737 |
|
738 |
$client = new \Google_Client();
|
739 |
-
$client->setApplicationName($this
|
740 |
$client->setClientId($this->xcloner_settings->get_xcloner_option("xcloner_gdrive_client_id"));
|
741 |
$client->setClientSecret($this->xcloner_settings->get_xcloner_option("xcloner_gdrive_client_secret"));
|
742 |
|
743 |
//$redirect_uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']."?page=xcloner_remote_storage_page&action=set_gdrive_code";
|
744 |
-
$redirect_uri = "urn:ietf:wg:oauth:2.0:oob";
|
745 |
|
746 |
-
$
|
|
|
|
|
|
|
|
|
|
|
747 |
$client->addScope("https://www.googleapis.com/auth/drive");
|
748 |
$client->setAccessType('offline');
|
|
|
749 |
|
750 |
return $client;
|
751 |
}
|
@@ -761,10 +766,61 @@ class Xcloner_Remote_Storage
|
|
761 |
return $authUrl = $client->createAuthUrl();
|
762 |
}
|
763 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
764 |
public function set_access_token($code)
|
765 |
{
|
766 |
$client = $this->gdrive_construct();
|
767 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
768 |
if (!$client) {
|
769 |
$error_msg = "Could not initialize the Google Drive Class, please check that the xcloner-google-drive plugin is enabled...";
|
770 |
$this->logger->error($error_msg);
|
@@ -773,16 +829,41 @@ class Xcloner_Remote_Storage
|
|
773 |
}
|
774 |
|
775 |
$token = $client->fetchAccessTokenWithAuthCode($code);
|
|
|
776 |
$client->setAccessToken($token);
|
777 |
|
778 |
-
update_option("xcloner_gdrive_access_token", $token
|
779 |
update_option("xcloner_gdrive_refresh_token", $token['refresh_token']);
|
780 |
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
}
|
787 |
|
788 |
/*
|
@@ -805,7 +886,17 @@ class Xcloner_Remote_Storage
|
|
805 |
throw new \Exception($error_msg);
|
806 |
}
|
807 |
|
808 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
809 |
|
810 |
$service = new \Google_Service_Drive($client);
|
811 |
|
47 |
|
48 |
use Mhetreramesh\Flysystem\BackblazeAdapter;
|
49 |
use BackblazeB2\Client as B2Client;
|
50 |
+
use Exception;
|
51 |
#use Sabre\DAV\Client as SabreClient;
|
52 |
#use League\Flysystem\WebDAV\WebDAVAdapter;
|
53 |
|
54 |
use Microsoft\Graph\Graph;
|
55 |
use NicolasBeauvais\FlysystemOneDrive\OneDriveAdapter;
|
56 |
|
57 |
+
use GuzzleHttp\Client;
|
58 |
+
|
59 |
/**
|
60 |
* Class Xcloner_Remote_Storage
|
61 |
*/
|
62 |
class Xcloner_Remote_Storage
|
63 |
{
|
64 |
+
const GDRIVE_APP_NAME = "XCloner Backup and Restore";
|
65 |
+
const GDRIVE_REDIRECT_URL = "urn:ietf:wg:oauth:2.0:oob";
|
66 |
+
const GDRIVE_REDIRECT_URL_WATCHFUL = "https://oauth.xcloner.com/google-drive/";
|
67 |
+
const GDRIVE_AUTH_WATCHFUL = "899538417626-5v4t611i8m99315nrslhu061cm1va0e6.apps.googleusercontent.com";
|
68 |
|
69 |
private $storage_fields = array(
|
70 |
"option_prefix" => "xcloner_",
|
645 |
'version' => 'latest',
|
646 |
);
|
647 |
|
648 |
+
if ($this->xcloner_settings->get_xcloner_option('xcloner_aws_endpoint')
|
649 |
/*&& !$this->xcloner_settings->get_xcloner_option("xcloner_aws_region")*/) {
|
650 |
$credentials['endpoint'] = $this->xcloner_settings->get_xcloner_option('xcloner_aws_endpoint');
|
|
|
|
|
651 |
}
|
|
|
|
|
652 |
$client = new S3Client($credentials);
|
653 |
|
654 |
$adapter = new AwsS3Adapter($client, $this->xcloner_settings->get_xcloner_option("xcloner_aws_bucket_name"), $this->xcloner_settings->get_xcloner_option("xcloner_aws_prefix"));
|
667 |
throw new \Exception("BACKBLAZE API requires PHP 7.1 to be installed!");
|
668 |
}
|
669 |
|
|
|
670 |
$client = new B2Client(
|
671 |
$this->xcloner_settings->get_xcloner_option("xcloner_backblaze_account_id"),
|
672 |
$this->xcloner_settings->get_xcloner_option("xcloner_backblaze_application_key")
|
692 |
'baseUri' => $this->xcloner_settings->get_xcloner_option("xcloner_webdav_url"),
|
693 |
'userName' => $this->xcloner_settings->get_xcloner_option("xcloner_webdav_username"),
|
694 |
'password' => $this->xcloner_settings->get_xcloner_option("xcloner_webdav_password"),
|
695 |
+
'authType' => \Sabre\DAV\Client::AUTH_BASIC,
|
696 |
//'proxy' => 'locahost:8888',
|
697 |
);
|
698 |
+
|
699 |
$client = new \Sabre\DAV\Client($settings);
|
700 |
$adapter = new \League\Flysystem\WebDAV\WebDAVAdapter($client, $this->xcloner_settings->get_xcloner_option("xcloner_webdav_target_folder"));
|
701 |
$filesystem = new Filesystem($adapter, new Config([
|
707 |
|
708 |
/**
|
709 |
* OneDrive connector
|
710 |
+
*
|
711 |
* https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth?view=odsp-graph-online#token-flow
|
712 |
*
|
713 |
* @return void
|
714 |
*/
|
715 |
public function get_onedrive_filesystem()
|
716 |
{
|
|
|
717 |
$accessToken = get_option('xcloner_onedrive_access_token');
|
718 |
|
719 |
$graph = new Graph();
|
736 |
}
|
737 |
|
738 |
$client = new \Google_Client();
|
739 |
+
$client->setApplicationName($this::GDRIVE_APP_NAME);
|
740 |
$client->setClientId($this->xcloner_settings->get_xcloner_option("xcloner_gdrive_client_id"));
|
741 |
$client->setClientSecret($this->xcloner_settings->get_xcloner_option("xcloner_gdrive_client_secret"));
|
742 |
|
743 |
//$redirect_uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']."?page=xcloner_remote_storage_page&action=set_gdrive_code";
|
|
|
744 |
|
745 |
+
$gdrive_redirect_url = $this::GDRIVE_REDIRECT_URL;
|
746 |
+
if(!$this->xcloner_settings->get_xcloner_option("xcloner_gdrive_client_id") ) {
|
747 |
+
$gdrive_redirect_url = $this::GDRIVE_REDIRECT_URL_WATCHFUL;
|
748 |
+
}
|
749 |
+
|
750 |
+
$client->setRedirectUri($gdrive_redirect_url);
|
751 |
$client->addScope("https://www.googleapis.com/auth/drive");
|
752 |
$client->setAccessType('offline');
|
753 |
+
$client->setApprovalPrompt("force");
|
754 |
|
755 |
return $client;
|
756 |
}
|
766 |
return $authUrl = $client->createAuthUrl();
|
767 |
}
|
768 |
|
769 |
+
public function gdrive_app_fetch_access_token($code, $param = "gdrive_auth_code")
|
770 |
+
{
|
771 |
+
$client = new Client([
|
772 |
+
// Base URI is used with relative requests
|
773 |
+
//'base_uri' => $this->gdrive_redirect_url,
|
774 |
+
// You can set any number of default request options.
|
775 |
+
'timeout' => 2.0,
|
776 |
+
//'headers' => [ 'Content-Type' => 'application/json' ],
|
777 |
+
//'debug' => true
|
778 |
+
]);
|
779 |
+
|
780 |
+
$response = $client->request(
|
781 |
+
'POST',
|
782 |
+
$this::GDRIVE_REDIRECT_URL_WATCHFUL,
|
783 |
+
[
|
784 |
+
'form_params' => [
|
785 |
+
$param => $code
|
786 |
+
]
|
787 |
+
]
|
788 |
+
);
|
789 |
+
|
790 |
+
$token = json_decode($response->getBody()->getContents(), true);
|
791 |
+
|
792 |
+
if ($response->getStatusCode() == 200 && $token['access_token']) {
|
793 |
+
update_option("xcloner_gdrive_access_token", json_encode($token));
|
794 |
+
} else {
|
795 |
+
$this->xcloner->trigger_message(
|
796 |
+
"%s connection error: Failed to get the AUTH code (".$token['error'].")",
|
797 |
+
"error"
|
798 |
+
);
|
799 |
+
}
|
800 |
+
|
801 |
+
return $token;
|
802 |
+
}
|
803 |
+
|
804 |
public function set_access_token($code)
|
805 |
{
|
806 |
$client = $this->gdrive_construct();
|
807 |
|
808 |
+
$client->setApplicationName($this::GDRIVE_APP_NAME);
|
809 |
+
|
810 |
+
$client_id = $this->xcloner_settings->get_xcloner_option("xcloner_gdrive_client_id");
|
811 |
+
if(!$client_id) {
|
812 |
+
$client_id = $this::GDRIVE_AUTH_WATCHFUL;
|
813 |
+
|
814 |
+
return $this->gdrive_app_fetch_access_token($code);
|
815 |
+
}
|
816 |
+
$client->setClientId($client_id);
|
817 |
+
|
818 |
+
$client->setClientSecret($this->xcloner_settings->get_xcloner_option("xcloner_gdrive_client_secret"));
|
819 |
+
$client->addScope("https://www.googleapis.com/auth/drive");
|
820 |
+
|
821 |
+
$client->setRedirectUri($this::GDRIVE_REDIRECT_URL);
|
822 |
+
$client->setAccessType('offline');
|
823 |
+
|
824 |
if (!$client) {
|
825 |
$error_msg = "Could not initialize the Google Drive Class, please check that the xcloner-google-drive plugin is enabled...";
|
826 |
$this->logger->error($error_msg);
|
829 |
}
|
830 |
|
831 |
$token = $client->fetchAccessTokenWithAuthCode($code);
|
832 |
+
|
833 |
$client->setAccessToken($token);
|
834 |
|
835 |
+
update_option("xcloner_gdrive_access_token", $token);
|
836 |
update_option("xcloner_gdrive_refresh_token", $token['refresh_token']);
|
837 |
|
838 |
+
return $token;
|
839 |
+
}
|
840 |
+
|
841 |
+
public function gdrive_refresh_token($client){
|
842 |
+
|
843 |
+
$auth_token = $this->xcloner_settings->get_xcloner_option("xcloner_gdrive_access_token");
|
844 |
+
$refresh_token = $this->xcloner_settings->get_xcloner_option("xcloner_gdrive_refresh_token");
|
845 |
+
|
846 |
+
if(!$refresh_token) {
|
847 |
+
$refresh_token = $auth_token['refreh_token'];
|
848 |
+
}
|
849 |
+
|
850 |
+
if (!$this->xcloner_settings->get_xcloner_option("xcloner_gdrive_client_id")) {
|
851 |
+
$auth_token =$this->gdrive_app_fetch_access_token($auth_token, 'gdrive_auth_refresh');
|
852 |
+
}else{
|
853 |
+
$auth_token = $client->refreshToken($refresh_token);
|
854 |
+
|
855 |
+
if ($auth_token['access_token']) {
|
856 |
+
update_option("xcloner_gdrive_access_token", $auth_token);
|
857 |
+
update_option("xcloner_gdrive_refresh_token", $auth_token['refresh_token']);
|
858 |
+
}else{
|
859 |
+
$this->xcloner->trigger_message(
|
860 |
+
"%s connection error: Failed to REFRESH the AUTH code - ".$auth_token['error_description'],
|
861 |
+
"error"
|
862 |
+
);
|
863 |
+
}
|
864 |
+
}
|
865 |
+
|
866 |
+
return $auth_token;
|
867 |
}
|
868 |
|
869 |
/*
|
886 |
throw new \Exception($error_msg);
|
887 |
}
|
888 |
|
889 |
+
$auth_token = $this->xcloner_settings->get_xcloner_option("xcloner_gdrive_access_token");
|
890 |
+
$client->setAccessToken($auth_token);
|
891 |
+
|
892 |
+
//refresh token if expired
|
893 |
+
if ($client->isAccessTokenExpired()) {
|
894 |
+
$auth_token = $this->gdrive_refresh_token($client);
|
895 |
+
|
896 |
+
if ($auth_token) {
|
897 |
+
$client->setAccessToken($auth_token);
|
898 |
+
}
|
899 |
+
}
|
900 |
|
901 |
$service = new \Google_Service_Drive($client);
|
902 |
|
xcloner.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: XCloner - Site Backup and Restore
|
16 |
* Plugin URI: https://xcloner.com/
|
17 |
* Description: XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured! With XCloner you will be able to clone your site to any other location with just a few clicks, as well as transfer the backup archives to remote FTP, SFTP, DropBox, Amazon S3, Google Drive, WebDAV, Backblaze, Azure accounts.
|
18 |
-
* Version: 4.2.
|
19 |
* Author: watchful
|
20 |
* Author URI: https://watchful.net/
|
21 |
* License: GPL-2.0+
|
@@ -64,7 +64,7 @@ require_once(__DIR__.'/vendor/autoload.php');
|
|
64 |
function do_cli_execution($args = array(), $opts = array())
|
65 |
{
|
66 |
if (!sizeof($opts)) {
|
67 |
-
$opts = getopt('v::p:h::q::e:d:k:', array('verbose::','profile:','help::', 'quiet::', 'encrypt:', 'decrypt:', 'key:'));
|
68 |
}
|
69 |
|
70 |
if (!sizeof($opts)) {
|
@@ -77,6 +77,7 @@ function do_cli_execution($args = array(), $opts = array())
|
|
77 |
echo sprintf("-e <backup name> Encrypt backup file\n");
|
78 |
echo sprintf("-d <backup name> Decrypt backup file\n");
|
79 |
echo sprintf("-k <encryption key> Encryption/Decryption Key\n");
|
|
|
80 |
echo sprintf("-v Verbose output\n");
|
81 |
echo sprintf("-q Disable output\n");
|
82 |
return;
|
@@ -104,29 +105,77 @@ function do_cli_execution($args = array(), $opts = array())
|
|
104 |
|
105 |
$profile_name = "";
|
106 |
|
|
|
107 |
if (isset($opts['p']) && $opts['p']) {
|
108 |
$profile_name = $opts['p'];
|
109 |
} elseif (isset($opts['profile']) && $opts['profile']) {
|
110 |
$profile_name = $opts['profile'];
|
111 |
}
|
112 |
|
113 |
-
//pass json config to Xcloner_Standalone lib
|
114 |
$xcloner_backup = new watchfulli\XClonerCore\Xcloner_Standalone();
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
$encryption_key = "";
|
117 |
if (isset($opts['k']) || isset($opts['key'])) {
|
118 |
$encryption_key = $opts['key'].$opts['k'];
|
119 |
}
|
120 |
|
|
|
121 |
if (isset($opts['e']) || isset($opts['encrypt'])) {
|
122 |
$backup_name = $opts['encrypt'].$opts['e'];
|
123 |
if (!$xcloner_backup->get_xcloner_encryption()->is_encrypted_file($backup_name)) {
|
124 |
-
$xcloner_backup->get_xcloner_encryption()->encrypt_file($backup_name, "", $encryption_key, 0, 0
|
125 |
} else {
|
126 |
die(sprintf('File %s is already encrypted\n', $backup_name));
|
127 |
}
|
128 |
}
|
129 |
|
|
|
130 |
if (isset($opts['d']) || isset($opts['decrypt'])) {
|
131 |
$backup_name = $opts['decrypt'].$opts['d'];
|
132 |
if ($xcloner_backup->get_xcloner_encryption()->is_encrypted_file($backup_name)) {
|
@@ -136,6 +185,7 @@ function do_cli_execution($args = array(), $opts = array())
|
|
136 |
}
|
137 |
}
|
138 |
|
|
|
139 |
if (isset($profile_name) && $profile_name) {
|
140 |
$profile = ($xcloner_backup->get_xcloner_scheduler()->get_schedule_by_id_or_name($profile_name));
|
141 |
|
@@ -164,15 +214,18 @@ if (php_sapi_name() == "cli") {
|
|
164 |
*
|
165 |
* [--profile=<profile>]
|
166 |
* : backup profile name or id
|
167 |
-
*
|
168 |
* [--encrypt=<backup_name>]
|
169 |
* : encrypt backup archive
|
170 |
-
*
|
171 |
* [--decrypt=<backup_name>]
|
172 |
* : decrypt backup archive
|
173 |
-
*
|
174 |
* [--key=<encryption_key>]
|
175 |
* : custom encryption/decryption key
|
|
|
|
|
|
|
176 |
*
|
177 |
* @when before_wp_load
|
178 |
*/
|
15 |
* Plugin Name: XCloner - Site Backup and Restore
|
16 |
* Plugin URI: https://xcloner.com/
|
17 |
* Description: XCloner is a tool that will help you manage your website backups, generate/restore/move so your website will be always secured! With XCloner you will be able to clone your site to any other location with just a few clicks, as well as transfer the backup archives to remote FTP, SFTP, DropBox, Amazon S3, Google Drive, WebDAV, Backblaze, Azure accounts.
|
18 |
+
* Version: 4.2.16
|
19 |
* Author: watchful
|
20 |
* Author URI: https://watchful.net/
|
21 |
* License: GPL-2.0+
|
64 |
function do_cli_execution($args = array(), $opts = array())
|
65 |
{
|
66 |
if (!sizeof($opts)) {
|
67 |
+
$opts = getopt('v::p:h::q::e:d:k:l:', array('verbose::','profile:','help::', 'quiet::', 'encrypt:', 'decrypt:', 'key:', 'list:'));
|
68 |
}
|
69 |
|
70 |
if (!sizeof($opts)) {
|
77 |
echo sprintf("-e <backup name> Encrypt backup file\n");
|
78 |
echo sprintf("-d <backup name> Decrypt backup file\n");
|
79 |
echo sprintf("-k <encryption key> Encryption/Decryption Key\n");
|
80 |
+
echo sprintf("-l <backup name> List files inside backup\n");
|
81 |
echo sprintf("-v Verbose output\n");
|
82 |
echo sprintf("-q Disable output\n");
|
83 |
return;
|
105 |
|
106 |
$profile_name = "";
|
107 |
|
108 |
+
// --profile|p profile name
|
109 |
if (isset($opts['p']) && $opts['p']) {
|
110 |
$profile_name = $opts['p'];
|
111 |
} elseif (isset($opts['profile']) && $opts['profile']) {
|
112 |
$profile_name = $opts['profile'];
|
113 |
}
|
114 |
|
|
|
115 |
$xcloner_backup = new watchfulli\XClonerCore\Xcloner_Standalone();
|
116 |
|
117 |
+
// --list|l list backup archive
|
118 |
+
if (isset($opts['l']) || isset($opts['list'])) {
|
119 |
+
$backup_file_path= $opts['list'].$opts['l'];
|
120 |
+
|
121 |
+
// function to list backup content recursively
|
122 |
+
$list_backup_archive_contents = function ($backup_name, $start=0)
|
123 |
+
{
|
124 |
+
$xcloner_settings = $xcloner_backup->get_xcloner_settings();
|
125 |
+
$xcloner_file_system = $xcloner_backup->get_xcloner_filesystem();
|
126 |
+
|
127 |
+
if( $xcloner_backup->get_xcloner_encryption()->is_encrypted_file($backup_name) ) {
|
128 |
+
die(sprintf("%s file is encrypted, please decrypt it first! \n", $backup_name));
|
129 |
+
}
|
130 |
+
|
131 |
+
$tar = $xcloner_backup->get_archive_system();
|
132 |
+
|
133 |
+
$backup_parts = [$backup_name];
|
134 |
+
|
135 |
+
if ($xcloner_file_system->is_multipart($backup_name)) {
|
136 |
+
$backup_parts = $xcloner_file_system->get_multipart_files($backup_name);
|
137 |
+
}
|
138 |
+
|
139 |
+
foreach ($backup_parts as $backup_name) {
|
140 |
+
if ( !$start) {
|
141 |
+
echo sprintf("Processing %s \n", $backup_name);
|
142 |
+
}
|
143 |
+
$tar->open($xcloner_settings->get_xcloner_store_path().DS.$backup_name, $start);
|
144 |
+
|
145 |
+
$data = $tar->contents($xcloner_settings->get_xcloner_option('xcloner_files_to_process_per_request')) ;
|
146 |
+
|
147 |
+
foreach ($data['extracted_files'] as $key=>$file) {
|
148 |
+
echo sprintf("%s (%s) \n", $file->getPath(), size_format($file->getSize()));
|
149 |
+
}
|
150 |
+
|
151 |
+
if (isset($data['start'])) {
|
152 |
+
call_user_func(__FUNCTION__, $backup_name, $data['start']);
|
153 |
+
}
|
154 |
+
}
|
155 |
+
};
|
156 |
+
|
157 |
+
$list_backup_archive_contents($backup_file_path);
|
158 |
+
|
159 |
+
exit;
|
160 |
+
}
|
161 |
+
|
162 |
+
// --key|k encryption key
|
163 |
$encryption_key = "";
|
164 |
if (isset($opts['k']) || isset($opts['key'])) {
|
165 |
$encryption_key = $opts['key'].$opts['k'];
|
166 |
}
|
167 |
|
168 |
+
// --encrypt|e encrypt backup archive
|
169 |
if (isset($opts['e']) || isset($opts['encrypt'])) {
|
170 |
$backup_name = $opts['encrypt'].$opts['e'];
|
171 |
if (!$xcloner_backup->get_xcloner_encryption()->is_encrypted_file($backup_name)) {
|
172 |
+
$xcloner_backup->get_xcloner_encryption()->encrypt_file($backup_name, "", $encryption_key, 0, 0, true, true);
|
173 |
} else {
|
174 |
die(sprintf('File %s is already encrypted\n', $backup_name));
|
175 |
}
|
176 |
}
|
177 |
|
178 |
+
// --decrypt|d decrypt backup archive
|
179 |
if (isset($opts['d']) || isset($opts['decrypt'])) {
|
180 |
$backup_name = $opts['decrypt'].$opts['d'];
|
181 |
if ($xcloner_backup->get_xcloner_encryption()->is_encrypted_file($backup_name)) {
|
185 |
}
|
186 |
}
|
187 |
|
188 |
+
// start schedule based on profile name
|
189 |
if (isset($profile_name) && $profile_name) {
|
190 |
$profile = ($xcloner_backup->get_xcloner_scheduler()->get_schedule_by_id_or_name($profile_name));
|
191 |
|
214 |
*
|
215 |
* [--profile=<profile>]
|
216 |
* : backup profile name or id
|
217 |
+
*
|
218 |
* [--encrypt=<backup_name>]
|
219 |
* : encrypt backup archive
|
220 |
+
*
|
221 |
* [--decrypt=<backup_name>]
|
222 |
* : decrypt backup archive
|
223 |
+
*
|
224 |
* [--key=<encryption_key>]
|
225 |
* : custom encryption/decryption key
|
226 |
+
*
|
227 |
+
* [--list=<backup_name>]
|
228 |
+
* : list backup archive contents
|
229 |
*
|
230 |
* @when before_wp_load
|
231 |
*/
|