Version Description
- WordPress 5.5 Backup "Import" Issue Fix
- Improvement in Backup Guard Admin Panel Architecture
Download this release
Release Info
Developer | BackupGuard |
Plugin | WordPress Backup and Migrate Plugin – Backup Guard |
Version | 1.4.4 |
Comparing to | |
See all releases |
Code changes from version 1.4.3 to 1.4.4
- BackupGuard.php +44 -18
- README.txt +5 -1
- backup.php +2 -2
- com/core/functions.php +560 -560
- public/ajax/importBackup.php +1 -0
- public/ajax/modalManualBackup.php +132 -132
- public/backups.php +125 -137
- public/cloud.php +134 -140
- public/config/config.wordpress.php +6 -0
- public/css/bgstyle.less.css +102 -3
- public/css/deactivationSurvey.css +2 -2
- public/fonts/pricingTableFonts.eot +0 -0
- public/fonts/pricingTableFonts.svg +1 -0
- public/fonts/pricingTableFonts.ttf +0 -0
- public/fonts/pricingTableFonts.woff +0 -0
- public/include/sidebar.php +14 -13
- public/include/uninstallSurveyPopup.php +2 -2
- public/js/deactivationSurvey.js +3 -1
- public/js/main.js +26 -0
- public/js/sgbackup.js +0 -1
- public/js/sgcloud.js +7 -7
- public/js/sgschedule.js +3 -3
- public/pagesContent.php +25 -0
- public/proFeatures.php +99 -7
- public/schedule.php +155 -163
- public/services.php +53 -58
- public/settings.php +181 -185
- public/support.php +2 -5
- public/systemInfo.php +93 -101
- public/templates/notices/banner.php +4 -4
BackupGuard.php
CHANGED
@@ -83,43 +83,69 @@ else {
|
|
83 |
|
84 |
function backup_guard_admin_menu()
|
85 |
{
|
86 |
-
add_menu_page('Backups', 'BackupGuard', 'manage_options', 'backup_guard_backups', '
|
87 |
|
88 |
-
add_submenu_page('backup_guard_backups', _backupGuardT('Backups', true), _backupGuardT('Backups', true), 'manage_options', 'backup_guard_backups', '
|
89 |
-
add_submenu_page('backup_guard_backups', _backupGuardT('Cloud', true), _backupGuardT('Cloud', true), 'manage_options', 'backup_guard_cloud', '
|
90 |
-
add_submenu_page('backup_guard_backups', _backupGuardT('Schedule', true), _backupGuardT('Schedule', true), 'manage_options', 'backup_guard_schedule', '
|
91 |
|
92 |
-
add_submenu_page('backup_guard_backups', _backupGuardT('Settings', true), _backupGuardT('Settings', true), 'manage_options', 'backup_guard_settings', '
|
93 |
|
94 |
-
add_submenu_page('backup_guard_backups', _backupGuardT('System Info.', true), _backupGuardT('System Info.', true), 'manage_options', 'backup_guard_system_info', '
|
95 |
|
96 |
-
add_submenu_page('backup_guard_backups', _backupGuardT('Services', true), _backupGuardT('Services', true), 'manage_options', 'backup_guard_services', '
|
97 |
-
add_submenu_page('backup_guard_backups', _backupGuardT('Support', true), _backupGuardT('Support', true), 'manage_options', 'backup_guard_support', '
|
98 |
|
99 |
//Check if should show upgrade page
|
100 |
if (SGBoot::isFeatureAvailable('SHOW_UPGRADE_PAGE')) {
|
101 |
-
add_submenu_page('backup_guard_backups', _backupGuardT('Why upgrade?', true), _backupGuardT('Why upgrade?', true), 'manage_options', 'backup_guard_pro_features', '
|
102 |
}
|
103 |
}
|
104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
function backup_guard_system_info_page()
|
106 |
{
|
107 |
if (backupGuardValidateLicense()) {
|
108 |
-
require_once(plugin_dir_path(__FILE__).'public/systemInfo.php');
|
109 |
}
|
110 |
}
|
111 |
|
112 |
function backup_guard_services_page()
|
113 |
{
|
114 |
if (backupGuardValidateLicense()) {
|
115 |
-
require_once(plugin_dir_path(__FILE__).'public/services.php');
|
116 |
}
|
117 |
}
|
118 |
|
119 |
//Pro features page
|
120 |
function backup_guard_pro_features_page()
|
121 |
{
|
122 |
-
require_once(plugin_dir_path(__FILE__).'public/proFeatures.php');
|
123 |
}
|
124 |
|
125 |
function backup_guard_security_page()
|
@@ -131,7 +157,7 @@ function backup_guard_security_page()
|
|
131 |
function backup_guard_support_page()
|
132 |
{
|
133 |
if (backupGuardValidateLicense()) {
|
134 |
-
|
135 |
}
|
136 |
}
|
137 |
|
@@ -165,7 +191,7 @@ function backup_guard_backups_page()
|
|
165 |
'fileUploadFailed' => _backupGuardT('File upload failed.', true)
|
166 |
));
|
167 |
|
168 |
-
|
169 |
}
|
170 |
}
|
171 |
|
@@ -175,7 +201,7 @@ function backup_guard_cloud_page()
|
|
175 |
if (backupGuardValidateLicense()) {
|
176 |
wp_enqueue_style('backup-guard-switch-css', plugin_dir_url(__FILE__).'public/css/bootstrap-switch.min.css');
|
177 |
wp_enqueue_script('backup-guard-switch-js', plugin_dir_url(__FILE__).'public/js/bootstrap-switch.min.js', array('jquery'), '1.0.0', true);
|
178 |
-
wp_enqueue_script('backup-guard-cloud-js', plugin_dir_url(__FILE__).'public/js/sgcloud.js', array('jquery'), '1.0.0', true);
|
179 |
|
180 |
// Localize the script with new data
|
181 |
wp_localize_script('backup-guard-cloud-js', 'BG_CLOUD_STRINGS', array(
|
@@ -186,7 +212,7 @@ function backup_guard_cloud_page()
|
|
186 |
'successMessage' => _backupGuardT('Successfully saved.', true)
|
187 |
));
|
188 |
|
189 |
-
require_once(plugin_dir_path(__FILE__).'public/cloud.php');
|
190 |
}
|
191 |
}
|
192 |
|
@@ -210,7 +236,7 @@ function backup_guard_schedule_page()
|
|
210 |
'saveButtonText' => _backupGuardT('Save', true)
|
211 |
));
|
212 |
|
213 |
-
|
214 |
}
|
215 |
}
|
216 |
|
@@ -234,7 +260,7 @@ function backup_guard_settings_page()
|
|
234 |
'saveButtonText' => _backupGuardT('Save', true)
|
235 |
));
|
236 |
|
237 |
-
require_once(plugin_dir_path(__FILE__).'public/settings.php');
|
238 |
}
|
239 |
}
|
240 |
|
83 |
|
84 |
function backup_guard_admin_menu()
|
85 |
{
|
86 |
+
add_menu_page('Backups', 'BackupGuard', 'manage_options', 'backup_guard_backups', 'includeAllPages', 'data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MzAuMzQgNjYzLjAzIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPkFydGJvYXJkIDI8L3RpdGxlPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0iTTUzMC4xMSwxODUuNzljLTcxLjktOC44Mi0xMzcuNzMtNDAtMTkwLTg2LjU3djkyLjY1YTI4MC41OSwyODAuNTksMCwwLDAsMTE2LjUyLDUyYy05LjE0LDg5LjQzLTUyLDE2OS41NS0xMTYuNTIsMjI4Ljg3djkwLjRDNDU5Ljg0LDQ3Ny4xMyw1MzAuNiwzMzMuNDIsNTMwLjExLDE4NS43OVoiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0xNzQuMjksMjQ0YTI4MC40NiwyODAuNDYsMCwwLDAsMTE1Ljc3LTUxLjExVjEwMGMtNTIuNDQsNDYuMjgtMTE3LjYyLDc3LTE4OS44Myw4NS4xNUM5OS41NCwzMzMsMTcwLjIyLDQ3Ni44MiwyOTAuMDYsNTYzVjQ3Mi4wOUMyMjYsNDEyLjg2LDE4My40MiwzMzMuMDYsMTc0LjI5LDI0NFoiLz48L3N2Zz4=', 74);
|
87 |
|
88 |
+
add_submenu_page('backup_guard_backups', _backupGuardT('Backups', true), _backupGuardT('Backups', true), 'manage_options', 'backup_guard_backups', 'includeAllPages');
|
89 |
+
add_submenu_page('backup_guard_backups', _backupGuardT('Cloud', true), _backupGuardT('Cloud', true), 'manage_options', 'backup_guard_cloud', 'includeAllPages');
|
90 |
+
add_submenu_page('backup_guard_backups', _backupGuardT('Schedule', true), _backupGuardT('Schedule', true), 'manage_options', 'backup_guard_schedule', 'includeAllPages');
|
91 |
|
92 |
+
add_submenu_page('backup_guard_backups', _backupGuardT('Settings', true), _backupGuardT('Settings', true), 'manage_options', 'backup_guard_settings', 'includeAllPages');
|
93 |
|
94 |
+
add_submenu_page('backup_guard_backups', _backupGuardT('System Info.', true), _backupGuardT('System Info.', true), 'manage_options', 'backup_guard_system_info', 'includeAllPages');
|
95 |
|
96 |
+
add_submenu_page('backup_guard_backups', _backupGuardT('Services', true), _backupGuardT('Services', true), 'manage_options', 'backup_guard_services', 'includeAllPages');
|
97 |
+
add_submenu_page('backup_guard_backups', _backupGuardT('Support', true), _backupGuardT('Support', true), 'manage_options', 'backup_guard_support', 'includeAllPages');
|
98 |
|
99 |
//Check if should show upgrade page
|
100 |
if (SGBoot::isFeatureAvailable('SHOW_UPGRADE_PAGE')) {
|
101 |
+
add_submenu_page('backup_guard_backups', _backupGuardT('Why upgrade?', true), _backupGuardT('Why upgrade?', true), 'manage_options', 'backup_guard_pro_features', 'includeAllPages');
|
102 |
}
|
103 |
}
|
104 |
|
105 |
+
function getBackupPageContentClassName($pageName = '')
|
106 |
+
{
|
107 |
+
$hiddenClassName = 'sg-visibility-hidden';
|
108 |
+
$page = $_GET['page'];
|
109 |
+
|
110 |
+
if (strpos($page, $pageName)) {
|
111 |
+
$hiddenClassName = '';
|
112 |
+
}
|
113 |
+
|
114 |
+
return $hiddenClassName;
|
115 |
+
}
|
116 |
+
|
117 |
+
function includeAllPages()
|
118 |
+
{
|
119 |
+
backup_guard_backups_page();
|
120 |
+
backup_guard_cloud_page();
|
121 |
+
backup_guard_system_info_page();
|
122 |
+
backup_guard_services_page();
|
123 |
+
backup_guard_pro_features_page();
|
124 |
+
backup_guard_support_page();
|
125 |
+
backup_guard_schedule_page();
|
126 |
+
backup_guard_settings_page();
|
127 |
+
|
128 |
+
require_once(plugin_dir_path(__FILE__).'public/pagesContent.php');
|
129 |
+
}
|
130 |
+
|
131 |
function backup_guard_system_info_page()
|
132 |
{
|
133 |
if (backupGuardValidateLicense()) {
|
134 |
+
//require_once(plugin_dir_path(__FILE__).'public/systemInfo.php');
|
135 |
}
|
136 |
}
|
137 |
|
138 |
function backup_guard_services_page()
|
139 |
{
|
140 |
if (backupGuardValidateLicense()) {
|
141 |
+
//require_once(plugin_dir_path(__FILE__).'public/services.php');
|
142 |
}
|
143 |
}
|
144 |
|
145 |
//Pro features page
|
146 |
function backup_guard_pro_features_page()
|
147 |
{
|
148 |
+
// require_once(plugin_dir_path(__FILE__).'public/proFeatures.php');
|
149 |
}
|
150 |
|
151 |
function backup_guard_security_page()
|
157 |
function backup_guard_support_page()
|
158 |
{
|
159 |
if (backupGuardValidateLicense()) {
|
160 |
+
// require_once(plugin_dir_path(__FILE__).'public/support.php');
|
161 |
}
|
162 |
}
|
163 |
|
191 |
'fileUploadFailed' => _backupGuardT('File upload failed.', true)
|
192 |
));
|
193 |
|
194 |
+
// require_once(plugin_dir_path( __FILE__ ).'public/backups.php');
|
195 |
}
|
196 |
}
|
197 |
|
201 |
if (backupGuardValidateLicense()) {
|
202 |
wp_enqueue_style('backup-guard-switch-css', plugin_dir_url(__FILE__).'public/css/bootstrap-switch.min.css');
|
203 |
wp_enqueue_script('backup-guard-switch-js', plugin_dir_url(__FILE__).'public/js/bootstrap-switch.min.js', array('jquery'), '1.0.0', true);
|
204 |
+
wp_enqueue_script('backup-guard-cloud-js', plugin_dir_url(__FILE__).'public/js/sgcloud.js', array('jquery', 'backup-guard-switch-js'), '1.0.0', true);
|
205 |
|
206 |
// Localize the script with new data
|
207 |
wp_localize_script('backup-guard-cloud-js', 'BG_CLOUD_STRINGS', array(
|
212 |
'successMessage' => _backupGuardT('Successfully saved.', true)
|
213 |
));
|
214 |
|
215 |
+
//require_once(plugin_dir_path(__FILE__).'public/cloud.php');
|
216 |
}
|
217 |
}
|
218 |
|
236 |
'saveButtonText' => _backupGuardT('Save', true)
|
237 |
));
|
238 |
|
239 |
+
// require_once(plugin_dir_path( __FILE__ ).'public/schedule.php');
|
240 |
}
|
241 |
}
|
242 |
|
260 |
'saveButtonText' => _backupGuardT('Save', true)
|
261 |
));
|
262 |
|
263 |
+
//require_once(plugin_dir_path(__FILE__).'public/settings.php');
|
264 |
}
|
265 |
}
|
266 |
|
README.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link: https://backup-guard.com/products/backup-wordpress
|
|
6 |
Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
|
7 |
Requires at least: 3.8
|
8 |
Tested up to: 5.5
|
9 |
-
Stable tag: 1.4.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -167,6 +167,10 @@ When you are facing an issue of any kind with any of our products, the first thi
|
|
167 |
6. Site backup customization
|
168 |
|
169 |
== Changelog ==
|
|
|
|
|
|
|
|
|
170 |
= 1.4.3 =
|
171 |
* Admin Panel "Manual Backup" JS error fix on WordPress 5.5 version.
|
172 |
|
6 |
Tags: backup, wordpress backup plugin, backup plugin, database backup, migrate, back up
|
7 |
Requires at least: 3.8
|
8 |
Tested up to: 5.5
|
9 |
+
Stable tag: 1.4.4
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
167 |
6. Site backup customization
|
168 |
|
169 |
== Changelog ==
|
170 |
+
= 1.4.4 =
|
171 |
+
* WordPress 5.5 Backup "Import" Issue Fix
|
172 |
+
* Improvement in Backup Guard Admin Panel Architecture
|
173 |
+
|
174 |
= 1.4.3 =
|
175 |
* Admin Panel "Manual Backup" JS error fix on WordPress 5.5 version.
|
176 |
|
backup.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Backup
|
5 |
* Plugin URI: https://backup-guard.com/products/backup-wordpress
|
6 |
* Description: Backup Guard is the most complete site backup and restore plugin. We offer the easiest way to backup, restore or migrate your site. You can backup your files, database or both.
|
7 |
-
* Version: 1.4.
|
8 |
* Author: BackupGuard
|
9 |
* Author URI: https://backup-guard.com/products/backup-wordpress
|
10 |
* License: GPL-2.0+
|
@@ -16,7 +16,7 @@ if (function_exists('activate_backup_guard')) {
|
|
16 |
}
|
17 |
|
18 |
if (!defined('SG_BACKUP_GUARD_VERSION')) {
|
19 |
-
define('SG_BACKUP_GUARD_VERSION', '1.4.
|
20 |
}
|
21 |
|
22 |
if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
|
4 |
* Plugin Name: Backup
|
5 |
* Plugin URI: https://backup-guard.com/products/backup-wordpress
|
6 |
* Description: Backup Guard is the most complete site backup and restore plugin. We offer the easiest way to backup, restore or migrate your site. You can backup your files, database or both.
|
7 |
+
* Version: 1.4.4
|
8 |
* Author: BackupGuard
|
9 |
* Author URI: https://backup-guard.com/products/backup-wordpress
|
10 |
* License: GPL-2.0+
|
16 |
}
|
17 |
|
18 |
if (!defined('SG_BACKUP_GUARD_VERSION')) {
|
19 |
+
define('SG_BACKUP_GUARD_VERSION', '1.4.4');
|
20 |
}
|
21 |
|
22 |
if (!defined('SG_BACKUP_GUARD_MAIN_FILE')) {
|
com/core/functions.php
CHANGED
@@ -2,751 +2,751 @@
|
|
2 |
|
3 |
function backupGuardGetCapabilities()
|
4 |
{
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
}
|
19 |
|
20 |
function convertToReadableSize($size)
|
21 |
{
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
|
31 |
}
|
32 |
|
33 |
function backupGuardgetSealPopup()
|
34 |
{
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
}
|
60 |
|
61 |
function backupGuardConvertDateTimezone($date, $dateFormat = "Y-m-d H:i:s", $timezone = "UTC")
|
62 |
{
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
|
72 |
-
|
73 |
-
|
74 |
|
75 |
-
|
76 |
}
|
77 |
|
78 |
function backupGuardRemoveSlashes($value)
|
79 |
{
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
|
88 |
-
|
89 |
-
|
90 |
}
|
91 |
|
92 |
function backupGuardSanitizeTextField($value)
|
93 |
{
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
-
|
107 |
-
|
108 |
}
|
109 |
|
110 |
function backupGuardIsMultisite()
|
111 |
{
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
}
|
119 |
|
120 |
function backupGuardGetBanner($env, $type="plugin", $userType = null)
|
121 |
{
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
}
|
126 |
|
127 |
function backupGuardGetFilenameOptions($options)
|
128 |
{
|
129 |
-
|
130 |
-
|
131 |
|
132 |
-
|
133 |
|
134 |
-
|
135 |
-
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
|
157 |
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
|
167 |
-
|
168 |
}
|
169 |
|
170 |
function backupGuardGenerateToken()
|
171 |
{
|
172 |
-
|
173 |
}
|
174 |
|
175 |
// Parse a URL and return its components
|
176 |
function backupGuardParseUrl($url)
|
177 |
{
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
|
186 |
-
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
|
193 |
-
|
194 |
}
|
195 |
|
196 |
function backupGuardIsReloadEnabled()
|
197 |
{
|
198 |
-
|
199 |
-
|
200 |
}
|
201 |
|
202 |
function backupGuardGetBackupOptions($options)
|
203 |
{
|
204 |
-
|
205 |
-
|
206 |
-
|
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 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
}
|
278 |
|
279 |
function backupGuardLoadStateData()
|
280 |
{
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
|
288 |
-
|
289 |
}
|
290 |
|
291 |
function backupGuardValidateApiCall($token)
|
292 |
{
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
|
297 |
-
|
298 |
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
|
311 |
-
|
312 |
}
|
313 |
|
314 |
function backupGuardScanBackupsDirectory($path)
|
315 |
{
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
}
|
331 |
|
332 |
function backupGuardSymlinksCleanup($dir)
|
333 |
{
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
}
|
355 |
|
356 |
function backupGuardRealFilesize($filename)
|
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 |
function backupGuardFormattedDuration($startTs, $endTs)
|
391 |
{
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
|
406 |
-
|
407 |
}
|
408 |
|
409 |
function backupGuardDeleteDirectory($dirName)
|
410 |
{
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
}
|
440 |
|
441 |
function backupGuardDownloadFile($file, $type = 'application/octet-stream')
|
442 |
{
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
|
455 |
-
|
456 |
}
|
457 |
|
458 |
function backupGuardDownloadViaPhp($backupName, $fileName)
|
459 |
{
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
}
|
479 |
|
480 |
function backupGuardMakeSymlinkFolder($filename)
|
481 |
{
|
482 |
-
|
483 |
|
484 |
-
|
485 |
-
|
486 |
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
|
512 |
-
|
513 |
-
|
514 |
|
515 |
-
|
516 |
}
|
517 |
|
518 |
function backupGuardDownloadFileSymlink($safedir, $filename)
|
519 |
{
|
520 |
-
|
521 |
-
|
522 |
|
523 |
-
|
524 |
-
|
525 |
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
}
|
539 |
|
540 |
function backupGuardGetCurrentUrlScheme()
|
541 |
{
|
542 |
-
|
543 |
}
|
544 |
|
545 |
function backupGuardValidateLicense()
|
546 |
{
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
|
558 |
-
|
559 |
|
560 |
-
|
561 |
|
562 |
-
|
563 |
-
|
564 |
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
|
578 |
-
|
579 |
}
|
580 |
|
581 |
//returns true if string $haystack ends with string $needle or $needle is an empty string
|
582 |
function backupGuardStringEndsWith($haystack, $needle)
|
583 |
{
|
584 |
-
|
585 |
|
586 |
-
|
587 |
-
|
588 |
}
|
589 |
//returns true if string $haystack starts with string $needle
|
590 |
function backupGuardStringStartsWith($haystack, $needle)
|
591 |
{
|
592 |
-
|
593 |
-
|
594 |
}
|
595 |
|
596 |
function backupGuardGetDbTables(){
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
}
|
623 |
|
624 |
function backupGuardGetBackupTablesHTML($defaultChecked = false){
|
625 |
-
|
626 |
-
|
627 |
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
<span class="sg-checkbox-label-text"><?php _backupGuardT('Backup database'); ?></span>
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
|
668 |
}
|
669 |
|
670 |
function backupGuardIsAccountGold()
|
671 |
{
|
672 |
-
|
673 |
}
|
674 |
|
675 |
function backupGuardGetProductName()
|
676 |
{
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
}
|
702 |
|
703 |
function backupGuardGetFileSelectiveRestore()
|
704 |
{
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
}
|
725 |
|
726 |
function checkAllMissedTables()
|
727 |
{
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
FROM information_schema.TABLES
|
736 |
WHERE (TABLE_SCHEMA = '".DB_NAME."') AND (TABLE_NAME = '$table')"
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
}
|
746 |
|
747 |
function backupGuardIncludeFile($filePath)
|
748 |
{
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
}
|
2 |
|
3 |
function backupGuardGetCapabilities()
|
4 |
{
|
5 |
+
switch (SG_PRODUCT_IDENTIFIER) {
|
6 |
+
case 'backup-guard-en':
|
7 |
+
case 'backup-guard-wp-platinum':
|
8 |
+
case 'backup-guard-en-regular':
|
9 |
+
case 'backup-guard-en-extended':
|
10 |
+
return BACKUP_GUARD_CAPABILITIES_PLATINUM;
|
11 |
+
case 'backup-guard-wp-gold':
|
12 |
+
return BACKUP_GUARD_CAPABILITIES_GOLD;
|
13 |
+
case 'backup-guard-wp-silver':
|
14 |
+
return BACKUP_GUARD_CAPABILITIES_SILVER;
|
15 |
+
case 'backup-guard-wp-free':
|
16 |
+
return BACKUP_GUARD_CAPABILITIES_FREE;
|
17 |
+
}
|
18 |
}
|
19 |
|
20 |
function convertToReadableSize($size)
|
21 |
{
|
22 |
+
if (!$size) {
|
23 |
+
return '';
|
24 |
+
}
|
25 |
|
26 |
+
$base = log($size) / log(1000);
|
27 |
+
$suffix = array("", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB");
|
28 |
+
$f_base = floor($base);
|
29 |
|
30 |
+
return round(pow(1000, $base - floor($base)), 1) . $suffix[$f_base];
|
31 |
}
|
32 |
|
33 |
function backupGuardgetSealPopup()
|
34 |
{
|
35 |
+
$currentDate = time();
|
36 |
+
$sgShouldShowPopup = SGConfig::get('SG_SHOULD_SHOW_POPUP') == null ? true : SGConfig::get('SG_SHOULD_SHOW_POPUP');
|
37 |
+
$sgPluginInstallUpdateDate = SGConfig::get('SG_PLUGIN_INSTALL_UPDATE_DATE') == null ? time() : SGConfig::get('SG_PLUGIN_INSTALL_UPDATE_DATE');
|
38 |
+
|
39 |
+
// check ig plugin is active for free days show poup
|
40 |
+
if (($currentDate - $sgPluginInstallUpdateDate >= SG_PLUGIN_ACTIVE_INTERVAL) && $sgShouldShowPopup) {
|
41 |
+
?>
|
42 |
+
<script>
|
43 |
+
window.SGPMPopupLoader=window.SGPMPopupLoader||{ids:[],popups:{},call:function(w,d,s,l,id){
|
44 |
+
w['sgp']=w['sgp']||function(){(w['sgp'].q=w['sgp'].q||[]).push(arguments[0]);};
|
45 |
+
var sg1=d.createElement(s),sg0=d.getElementsByTagName(s)[0];
|
46 |
+
if(SGPMPopupLoader && SGPMPopupLoader.ids && SGPMPopupLoader.ids.length > 0){SGPMPopupLoader.ids.push(id); return;}
|
47 |
+
SGPMPopupLoader.ids.push(id);
|
48 |
+
sg1.onload = function(){SGPMPopup.openSGPMPopup();}; sg1.async=true; sg1.src=l;
|
49 |
+
sg0.parentNode.insertBefore(sg1,sg0);
|
50 |
+
return {};
|
51 |
+
}};
|
52 |
+
SGPMPopupLoader.call(window,document,'script','https://popupmaker.com/assets/lib/SGPMPopup.min.js','7c685e17');
|
53 |
+
</script>
|
54 |
+
<?php
|
55 |
+
SGConfig::set('SG_SHOULD_SHOW_POPUP', 0);
|
56 |
+
}
|
57 |
+
|
58 |
+
return;
|
59 |
}
|
60 |
|
61 |
function backupGuardConvertDateTimezone($date, $dateFormat = "Y-m-d H:i:s", $timezone = "UTC")
|
62 |
{
|
63 |
+
if (in_array($timezone, timezone_identifiers_list())) {
|
64 |
+
$date = date_create($date);
|
65 |
+
$timezone = timezone_open($timezone);
|
66 |
+
date_timezone_set($date, $timezone);
|
67 |
|
68 |
+
if (!$dateFormat) {
|
69 |
+
$dateFormat = "Y-m-d H:i:s";
|
70 |
+
}
|
71 |
|
72 |
+
return date_format($date, $dateFormat);
|
73 |
+
}
|
74 |
|
75 |
+
return $date;
|
76 |
}
|
77 |
|
78 |
function backupGuardRemoveSlashes($value)
|
79 |
{
|
80 |
+
if (SG_ENV_ADAPTER == SG_ENV_WORDPRESS) {
|
81 |
+
return wp_unslash($value);
|
82 |
+
}
|
83 |
+
else {
|
84 |
+
if (is_array($value)) {
|
85 |
+
return array_map('stripslashes', $value);
|
86 |
+
}
|
87 |
|
88 |
+
return stripslashes($value);
|
89 |
+
}
|
90 |
}
|
91 |
|
92 |
function backupGuardSanitizeTextField($value)
|
93 |
{
|
94 |
+
if (SG_ENV_ADAPTER == SG_ENV_WORDPRESS) {
|
95 |
+
if (is_array($value)) {
|
96 |
+
return array_map('sanitize_text_field', $value);
|
97 |
+
}
|
98 |
|
99 |
+
return sanitize_text_field($value);
|
100 |
+
}
|
101 |
+
else {
|
102 |
+
if (is_array($value)) {
|
103 |
+
return array_map('strip_tags', $value);
|
104 |
+
}
|
105 |
|
106 |
+
return strip_tags($value);
|
107 |
+
}
|
108 |
}
|
109 |
|
110 |
function backupGuardIsMultisite()
|
111 |
{
|
112 |
+
if (SG_ENV_ADAPTER == SG_ENV_WORDPRESS) {
|
113 |
+
return defined('BG_IS_MULTISITE')?BG_IS_MULTISITE:is_multisite();
|
114 |
+
}
|
115 |
+
else {
|
116 |
+
return false;
|
117 |
+
}
|
118 |
}
|
119 |
|
120 |
function backupGuardGetBanner($env, $type="plugin", $userType = null)
|
121 |
{
|
122 |
+
require_once(SG_LIB_PATH.'BackupGuard/Client.php');
|
123 |
+
$client = new BackupGuard\Client();
|
124 |
+
return $client->getBanner(strtolower($env), $type, $userType);
|
125 |
}
|
126 |
|
127 |
function backupGuardGetFilenameOptions($options)
|
128 |
{
|
129 |
+
$selectedPaths = explode(',', $options['SG_BACKUP_FILE_PATHS']);
|
130 |
+
$pathsToExclude = explode(',', $options['SG_BACKUP_FILE_PATHS_EXCLUDE']);
|
131 |
|
132 |
+
$opt = '';
|
133 |
|
134 |
+
if (SG_ENV_ADAPTER == SG_ENV_WORDPRESS) {
|
135 |
+
$opt .= 'opt(';
|
136 |
|
137 |
+
if ($options['SG_BACKUP_TYPE'] == SG_BACKUP_TYPE_CUSTOM) {
|
138 |
+
if ($options['SG_ACTION_BACKUP_DATABASE_AVAILABLE']) {
|
139 |
+
$opt .= 'db_';
|
140 |
+
}
|
141 |
|
142 |
+
if ($options['SG_ACTION_BACKUP_FILES_AVAILABLE']) {
|
143 |
+
if (in_array('wp-content', $selectedPaths)) {
|
144 |
+
$opt .= 'wpc_';
|
145 |
+
}
|
146 |
+
if (!in_array('wp-content/plugins', $pathsToExclude)) {
|
147 |
+
$opt .= 'plg_';
|
148 |
+
}
|
149 |
+
if (!in_array('wp-content/themes', $pathsToExclude)) {
|
150 |
+
$opt .= 'thm_';
|
151 |
+
}
|
152 |
+
if (!in_array('wp-content/uploads', $pathsToExclude)) {
|
153 |
+
$opt .= 'upl_';
|
154 |
+
}
|
155 |
+
}
|
156 |
|
157 |
|
158 |
+
}
|
159 |
+
else {
|
160 |
+
$opt .= 'full';
|
161 |
+
}
|
162 |
|
163 |
+
$opt = trim($opt, "_");
|
164 |
+
$opt .= ')_';
|
165 |
+
}
|
166 |
|
167 |
+
return $opt;
|
168 |
}
|
169 |
|
170 |
function backupGuardGenerateToken()
|
171 |
{
|
172 |
+
return md5(time());
|
173 |
}
|
174 |
|
175 |
// Parse a URL and return its components
|
176 |
function backupGuardParseUrl($url)
|
177 |
{
|
178 |
+
$urlComponents = parse_url($url);
|
179 |
+
$domain = $urlComponents['host'];
|
180 |
+
$port = '';
|
181 |
|
182 |
+
if (isset($urlComponents['port']) && strlen($urlComponents['port'])) {
|
183 |
+
$port = ":".$urlComponents['port'];
|
184 |
+
}
|
185 |
|
186 |
+
$domain = preg_replace("/(www|\dww|w\dw|ww\d)\./", "", $domain);
|
187 |
|
188 |
+
$path = "";
|
189 |
+
if (isset($urlComponents['path'])) {
|
190 |
+
$path = $urlComponents['path'];
|
191 |
+
}
|
192 |
|
193 |
+
return $domain.$port.$path;
|
194 |
}
|
195 |
|
196 |
function backupGuardIsReloadEnabled()
|
197 |
{
|
198 |
+
// Check if reloads option is turned on
|
199 |
+
return SGConfig::get('SG_BACKUP_WITH_RELOADINGS')?true:false;
|
200 |
}
|
201 |
|
202 |
function backupGuardGetBackupOptions($options)
|
203 |
{
|
204 |
+
$backupOptions = array(
|
205 |
+
'SG_BACKUP_UPLOAD_TO_STORAGES' => '',
|
206 |
+
'SG_BACKUP_FILE_PATHS_EXCLUDE' => '',
|
207 |
+
'SG_BACKUP_FILE_PATHS' => ''
|
208 |
+
);
|
209 |
+
|
210 |
+
if (isset($options['sg-custom-backup-name']) && $options['sg-custom-backup-name']) {
|
211 |
+
SGConfig::set("SG_CUSTOM_BACKUP_NAME", $options['sg-custom-backup-name']);
|
212 |
+
}
|
213 |
+
else {
|
214 |
+
SGConfig::set("SG_CUSTOM_BACKUP_NAME", '');
|
215 |
+
}
|
216 |
+
|
217 |
+
//If background mode
|
218 |
+
$isBackgroundMode = !empty($options['backgroundMode']) ? 1 : 0;
|
219 |
+
|
220 |
+
if ($isBackgroundMode) {
|
221 |
+
$backupOptions['SG_BACKUP_IN_BACKGROUND_MODE'] = $isBackgroundMode;
|
222 |
+
}
|
223 |
+
|
224 |
+
//If cloud backup
|
225 |
+
if (!empty($options['backupCloud']) && count($options['backupStorages'])) {
|
226 |
+
$clouds = $options['backupStorages'];
|
227 |
+
$backupOptions['SG_BACKUP_UPLOAD_TO_STORAGES'] = implode(',', $clouds);
|
228 |
+
}
|
229 |
+
|
230 |
+
$backupOptions['SG_BACKUP_TYPE'] = $options['backupType'];
|
231 |
+
|
232 |
+
if ($options['backupType'] == SG_BACKUP_TYPE_FULL) {
|
233 |
+
$backupOptions['SG_ACTION_BACKUP_DATABASE_AVAILABLE']= 1;
|
234 |
+
$backupOptions['SG_ACTION_BACKUP_FILES_AVAILABLE'] = 1;
|
235 |
+
$backupOptions['SG_BACKUP_FILE_PATHS_EXCLUDE'] = SG_BACKUP_FILE_PATHS_EXCLUDE;
|
236 |
+
$backupOptions['SG_BACKUP_FILE_PATHS'] = 'wp-content';
|
237 |
+
}
|
238 |
+
else if ($options['backupType'] == SG_BACKUP_TYPE_CUSTOM) {
|
239 |
+
//If database backup
|
240 |
+
$isDatabaseBackup = !empty($options['backupDatabase']) ? 1 : 0;
|
241 |
+
$backupOptions['SG_ACTION_BACKUP_DATABASE_AVAILABLE'] = $isDatabaseBackup;
|
242 |
+
|
243 |
+
//If db backup
|
244 |
+
if($options['backupDBType']){
|
245 |
+
$tablesToBackup = implode(',', $options['table']);
|
246 |
+
$backupOptions['SG_BACKUP_TABLES_TO_BACKUP'] = $tablesToBackup;
|
247 |
+
}
|
248 |
+
|
249 |
+
//If files backup
|
250 |
+
if (!empty($options['backupFiles']) && count($options['directory'])) {
|
251 |
+
$backupFiles = explode(',', SG_BACKUP_FILE_PATHS);
|
252 |
+
$filesToExclude = @array_diff($backupFiles, $options['directory']);
|
253 |
+
|
254 |
+
if (in_array('wp-content', $options['directory'])) {
|
255 |
+
$options['directory'] = array('wp-content');
|
256 |
+
}
|
257 |
+
else {
|
258 |
+
$filesToExclude = array_diff($filesToExclude, array('wp-content'));
|
259 |
+
}
|
260 |
+
|
261 |
+
$filesToExclude = implode(',', $filesToExclude);
|
262 |
+
if (strlen($filesToExclude)) {
|
263 |
+
$filesToExclude = ','.$filesToExclude;
|
264 |
+
}
|
265 |
+
|
266 |
+
$backupOptions['SG_BACKUP_FILE_PATHS_EXCLUDE'] = SG_BACKUP_FILE_PATHS_EXCLUDE.$filesToExclude;
|
267 |
+
$options['directory'] = backupGuardSanitizeTextField($options['directory']);
|
268 |
+
$backupOptions['SG_BACKUP_FILE_PATHS'] = implode(',', $options['directory']);
|
269 |
+
$backupOptions['SG_ACTION_BACKUP_FILES_AVAILABLE'] = 1;
|
270 |
+
}
|
271 |
+
else {
|
272 |
+
$backupOptions['SG_ACTION_BACKUP_FILES_AVAILABLE'] = 0;
|
273 |
+
$backupOptions['SG_BACKUP_FILE_PATHS'] = 0;
|
274 |
+
}
|
275 |
+
}
|
276 |
+
return $backupOptions;
|
277 |
}
|
278 |
|
279 |
function backupGuardLoadStateData()
|
280 |
{
|
281 |
+
if (file_exists(SG_BACKUP_DIRECTORY.SG_STATE_FILE_NAME)) {
|
282 |
+
$sgState = new SGState();
|
283 |
+
$stateFile = file_get_contents(SG_BACKUP_DIRECTORY.SG_STATE_FILE_NAME);
|
284 |
+
$sgState = $sgState->factory($stateFile);
|
285 |
+
return $sgState;
|
286 |
+
}
|
287 |
|
288 |
+
return false;
|
289 |
}
|
290 |
|
291 |
function backupGuardValidateApiCall($token)
|
292 |
{
|
293 |
+
if (!strlen($token)) {
|
294 |
+
exit();
|
295 |
+
}
|
296 |
|
297 |
+
$statePath = SG_BACKUP_DIRECTORY.SG_STATE_FILE_NAME;
|
298 |
|
299 |
+
if (!file_exists($statePath)) {
|
300 |
+
exit();
|
301 |
+
}
|
302 |
|
303 |
+
$state = file_get_contents($statePath);
|
304 |
+
$state = json_decode($state, true);
|
305 |
+
$stateToken = $state['token'];
|
306 |
|
307 |
+
if ($stateToken != $token) {
|
308 |
+
exit();
|
309 |
+
}
|
310 |
|
311 |
+
return true;
|
312 |
}
|
313 |
|
314 |
function backupGuardScanBackupsDirectory($path)
|
315 |
{
|
316 |
+
$backups = scandir($path);
|
317 |
+
$backupFolders = array();
|
318 |
+
foreach ($backups as $key => $backup) {
|
319 |
+
if ($backup == "." || $backup == "..") {
|
320 |
+
continue;
|
321 |
+
}
|
322 |
|
323 |
+
if (is_dir($path.$backup)) {
|
324 |
+
$backupFolders[$backup] = filemtime($path.$backup);
|
325 |
+
}
|
326 |
+
}
|
327 |
+
// Sort(from low to high) backups by creation date
|
328 |
+
asort($backupFolders);
|
329 |
+
return $backupFolders;
|
330 |
}
|
331 |
|
332 |
function backupGuardSymlinksCleanup($dir)
|
333 |
{
|
334 |
+
if (is_dir($dir)) {
|
335 |
+
$objects = scandir($dir);
|
336 |
+
foreach ($objects as $object) {
|
337 |
+
if ($object == "." || $object == "..") {
|
338 |
+
continue;
|
339 |
+
}
|
340 |
+
|
341 |
+
if (filetype($dir.$object) != "dir") {
|
342 |
+
@unlink($dir.$object);
|
343 |
+
}
|
344 |
+
else {
|
345 |
+
backupGuardSymlinksCleanup($dir.$object.'/');
|
346 |
+
@rmdir($dir.$object);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
}
|
350 |
+
else if (file_exists($dir)) {
|
351 |
+
@unlink($dir);
|
352 |
+
}
|
353 |
+
return;
|
354 |
}
|
355 |
|
356 |
function backupGuardRealFilesize($filename)
|
357 |
{
|
358 |
+
$fp = fopen($filename, 'r');
|
359 |
+
$return = false;
|
360 |
+
if (is_resource($fp))
|
361 |
+
{
|
362 |
+
if (PHP_INT_SIZE < 8) // 32 bit
|
363 |
+
{
|
364 |
+
if (0 === fseek($fp, 0, SEEK_END))
|
365 |
+
{
|
366 |
+
$return = 0.0;
|
367 |
+
$step = 0x7FFFFFFF;
|
368 |
+
while ($step > 0)
|
369 |
+
{
|
370 |
+
if (0 === fseek($fp, - $step, SEEK_CUR))
|
371 |
+
{
|
372 |
+
$return += floatval($step);
|
373 |
+
}
|
374 |
+
else
|
375 |
+
{
|
376 |
+
$step >>= 1;
|
377 |
+
}
|
378 |
+
}
|
379 |
+
}
|
380 |
+
}
|
381 |
+
else if (0 === fseek($fp, 0, SEEK_END)) // 64 bit
|
382 |
+
{
|
383 |
+
$return = ftell($fp);
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
return $return;
|
388 |
}
|
389 |
|
390 |
function backupGuardFormattedDuration($startTs, $endTs)
|
391 |
{
|
392 |
+
$unit = 'seconds';
|
393 |
+
$duration = $endTs-$startTs;
|
394 |
+
if ($duration>=60 && $duration<3600)
|
395 |
+
{
|
396 |
+
$duration /= 60.0;
|
397 |
+
$unit = 'minutes';
|
398 |
+
}
|
399 |
+
else if ($duration>=3600)
|
400 |
+
{
|
401 |
+
$duration /= 3600.0;
|
402 |
+
$unit = 'hours';
|
403 |
+
}
|
404 |
+
$duration = number_format($duration, 2, '.', '');
|
405 |
|
406 |
+
return $duration.' '.$unit;
|
407 |
}
|
408 |
|
409 |
function backupGuardDeleteDirectory($dirName)
|
410 |
{
|
411 |
+
$dirHandle = null;
|
412 |
+
if (is_dir($dirName))
|
413 |
+
{
|
414 |
+
$dirHandle = opendir($dirName);
|
415 |
+
}
|
416 |
+
|
417 |
+
if (!$dirHandle)
|
418 |
+
{
|
419 |
+
return false;
|
420 |
+
}
|
421 |
+
|
422 |
+
while ($file = readdir($dirHandle))
|
423 |
+
{
|
424 |
+
if ($file != "." && $file != "..")
|
425 |
+
{
|
426 |
+
if (!is_dir($dirName."/".$file))
|
427 |
+
{
|
428 |
+
@unlink($dirName."/".$file);
|
429 |
+
}
|
430 |
+
else
|
431 |
+
{
|
432 |
+
backupGuardDeleteDirectory($dirName.'/'.$file);
|
433 |
+
}
|
434 |
+
}
|
435 |
+
}
|
436 |
+
|
437 |
+
closedir($dirHandle);
|
438 |
+
return @rmdir($dirName);
|
439 |
}
|
440 |
|
441 |
function backupGuardDownloadFile($file, $type = 'application/octet-stream')
|
442 |
{
|
443 |
+
$file = backupGuardRemoveSlashes($file);
|
444 |
+
if (file_exists($file)) {
|
445 |
+
header('Content-Description: File Transfer');
|
446 |
+
header('Content-Type: '.$type);
|
447 |
+
header('Content-Disposition: attachment; filename="'.basename($file).'";');
|
448 |
+
header('Expires: 0');
|
449 |
+
header('Cache-Control: must-revalidate');
|
450 |
+
header('Pragma: public');
|
451 |
+
header('Content-Length: ' . filesize($file));
|
452 |
+
readfile($file);
|
453 |
+
}
|
454 |
|
455 |
+
exit;
|
456 |
}
|
457 |
|
458 |
function backupGuardDownloadViaPhp($backupName, $fileName)
|
459 |
{
|
460 |
+
$str = backupGuardMakeSymlinkFolder($fileName);
|
461 |
+
@copy(SG_BACKUP_DIRECTORY.$backupName.'/'.$fileName, SG_SYMLINK_PATH.$str.'/'.$fileName);
|
462 |
+
|
463 |
+
if (file_exists(SG_SYMLINK_PATH.$str.'/'.$fileName)) {
|
464 |
+
$remoteGet = wp_remote_get(SG_SYMLINK_URL.$str.'/'.$fileName);
|
465 |
+
if (!is_wp_error($remoteGet)) {
|
466 |
+
$content = wp_remote_retrieve_body($remoteGet);
|
467 |
+
header('Pragma: public');
|
468 |
+
header('Expires: 0');
|
469 |
+
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
470 |
+
header('Cache-Control: private', false);
|
471 |
+
header('Content-Type: application/octet-stream');
|
472 |
+
header('Content-Disposition: attachment; filename='.$fileName.';');
|
473 |
+
header('Content-Transfer-Encoding: binary');
|
474 |
+
echo $content;
|
475 |
+
exit;
|
476 |
+
}
|
477 |
+
}
|
478 |
}
|
479 |
|
480 |
function backupGuardMakeSymlinkFolder($filename)
|
481 |
{
|
482 |
+
$filename = backupGuardRemoveSlashes($filename);
|
483 |
|
484 |
+
$downloaddir = SG_SYMLINK_PATH;
|
485 |
+
$downloadURL = SG_SYMLINK_URL;
|
486 |
|
487 |
+
if (!file_exists($downloaddir)) {
|
488 |
+
mkdir($downloaddir, 0777);
|
489 |
+
}
|
490 |
|
491 |
+
$letters = 'abcdefghijklmnopqrstuvwxyz';
|
492 |
+
srand((double) microtime() * 1000000);
|
493 |
+
$string = '';
|
494 |
|
495 |
+
for ($i = 1; $i <= rand(4,12); $i++) {
|
496 |
+
$q = rand(1,24);
|
497 |
+
$string = $string.$letters[$q];
|
498 |
+
}
|
499 |
|
500 |
+
$handle = opendir($downloaddir);
|
501 |
+
while ($dir = readdir($handle)) {
|
502 |
+
if ($dir == "." || $dir == "..") {
|
503 |
+
continue;
|
504 |
+
}
|
505 |
|
506 |
+
if (is_dir($downloaddir.$dir)) {
|
507 |
+
@unlink($downloaddir . $dir . "/" . $filename);
|
508 |
+
@rmdir($downloaddir . $dir);
|
509 |
+
}
|
510 |
+
}
|
511 |
|
512 |
+
closedir($handle);
|
513 |
+
mkdir($downloaddir . $string, 0777);
|
514 |
|
515 |
+
return $string;
|
516 |
}
|
517 |
|
518 |
function backupGuardDownloadFileSymlink($safedir, $filename)
|
519 |
{
|
520 |
+
$downloaddir = SG_SYMLINK_PATH;
|
521 |
+
$downloadURL = SG_SYMLINK_URL;
|
522 |
|
523 |
+
$safedir = backupGuardRemoveSlashes($safedir);
|
524 |
+
$string = backupGuardMakeSymlinkFolder($filename);
|
525 |
|
526 |
+
$res = @symlink($safedir . $filename, $downloaddir . $string . "/" . $filename);
|
527 |
+
if ($res) {
|
528 |
+
header('Content-Description: File Transfer');
|
529 |
+
header('Content-Type: application/octet-stream');
|
530 |
+
header('Content-Disposition: attachment;filename="'.$filename.'"');
|
531 |
+
header('Content-Transfer-Encoding: binary');
|
532 |
+
header("Location: " . $downloadURL . $string . "/" . $filename);
|
533 |
+
}
|
534 |
+
else{
|
535 |
+
wp_die(_backupGuardT("Symlink / shortcut creation failed! Seems your server configurations don't allow symlink creation, so we're unable to provide you the direct download url. You can download your backup using any FTP client. All backups and related stuff we locate '/wp-content/uploads/backup-guard' directory. If you need this functionality, you should check out your server configurations and make sure you don't have any limitation related to symlink creation.", true));
|
536 |
+
}
|
537 |
+
exit;
|
538 |
}
|
539 |
|
540 |
function backupGuardGetCurrentUrlScheme()
|
541 |
{
|
542 |
+
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')?'https':'http';
|
543 |
}
|
544 |
|
545 |
function backupGuardValidateLicense()
|
546 |
{
|
547 |
+
$pluginCapabilities = backupGuardGetCapabilities();
|
548 |
+
if ($pluginCapabilities == BACKUP_GUARD_CAPABILITIES_FREE) {
|
549 |
+
return true;
|
550 |
+
}
|
551 |
|
552 |
+
//only check once per day
|
553 |
+
$ts = (int)SGConfig::get('SG_LICENSE_CHECK_TS');
|
554 |
+
if (time() - $ts < SG_LICENSE_CHECK_TIMEOUT) {
|
555 |
+
return true;
|
556 |
+
}
|
557 |
|
558 |
+
require_once(SG_LIB_PATH.'SGAuthClient.php');
|
559 |
|
560 |
+
$url = site_url();
|
561 |
|
562 |
+
$auth = SGAuthClient::getInstance();
|
563 |
+
$res = $auth->validateUrl($url);
|
564 |
|
565 |
+
if ($res === -1) { //login is required
|
566 |
+
backup_guard_login_page();
|
567 |
+
return false;
|
568 |
+
}
|
569 |
+
else if ($res === false) { //invalid license
|
570 |
+
backup_guard_link_license_page();
|
571 |
+
return false;
|
572 |
+
}
|
573 |
+
else {
|
574 |
+
SGConfig::set('SG_LICENSE_CHECK_TS', time(), true);
|
575 |
+
SGConfig::set('SG_LICENSE_KEY', $res, true);
|
576 |
+
}
|
577 |
|
578 |
+
return true;
|
579 |
}
|
580 |
|
581 |
//returns true if string $haystack ends with string $needle or $needle is an empty string
|
582 |
function backupGuardStringEndsWith($haystack, $needle)
|
583 |
{
|
584 |
+
$length = strlen($needle);
|
585 |
|
586 |
+
return $length === 0 ||
|
587 |
+
(substr($haystack, -$length) === $needle);
|
588 |
}
|
589 |
//returns true if string $haystack starts with string $needle
|
590 |
function backupGuardStringStartsWith($haystack, $needle)
|
591 |
{
|
592 |
+
$length = strlen($needle);
|
593 |
+
return (substr($haystack, 0, $length) === $needle);
|
594 |
}
|
595 |
|
596 |
function backupGuardGetDbTables(){
|
597 |
+
$sgdb = SGDatabase::getInstance();
|
598 |
+
$tables = $sgdb->query("SHOW TABLES");
|
599 |
+
$tablesKey = 'Tables_in_'.SG_DB_NAME;
|
600 |
+
$tableNames = array();
|
601 |
+
$customTablesToExclude = str_replace(' ', '', SGConfig::get('SG_TABLES_TO_EXCLUDE'));
|
602 |
+
$tablesToExclude = explode(',', $customTablesToExclude);
|
603 |
+
foreach ($tables as $table):
|
604 |
+
$tableName = $table[$tablesKey];
|
605 |
+
if($tableName != SG_ACTION_TABLE_NAME && $tableName != SG_CONFIG_TABLE_NAME && $tableName != SG_SCHEDULE_TABLE_NAME){
|
606 |
+
array_push($tableNames, array('name'=>$tableName,
|
607 |
+
'current'=> backupGuardStringStartsWith($tableName, SG_ENV_DB_PREFIX)? 'true':'false',
|
608 |
+
'disabled'=>in_array($tableName,$tablesToExclude)? 'disabled':''
|
609 |
+
));
|
610 |
+
}
|
611 |
+
endforeach;
|
612 |
+
usort($tableNames, function ($name1, $name2){
|
613 |
+
if(backupGuardStringStartsWith($name1['name'], SG_ENV_DB_PREFIX)){
|
614 |
+
if(backupGuardStringStartsWith($name2['name'], SG_ENV_DB_PREFIX)){
|
615 |
+
return 0;
|
616 |
+
}
|
617 |
+
return -1;
|
618 |
+
}
|
619 |
+
return 1;
|
620 |
+
});
|
621 |
+
return $tableNames;
|
622 |
}
|
623 |
|
624 |
function backupGuardGetBackupTablesHTML($defaultChecked = false){
|
625 |
+
$tables = backupGuardGetDbTables();
|
626 |
+
?>
|
627 |
|
628 |
+
<div class="checkbox">
|
629 |
+
<label for="custombackupdb-chbx">
|
630 |
+
<input type="checkbox" class="sg-custom-option" name="backupDatabase" id="custombackupdb-chbx" <?php echo $defaultChecked?'checked':'' ?>>
|
631 |
<span class="sg-checkbox-label-text"><?php _backupGuardT('Backup database'); ?></span>
|
632 |
+
</label>
|
633 |
+
<div class="col-md-12 sg-checkbox sg-backup-db-options">
|
634 |
+
<div class="checkbox">
|
635 |
+
<label for="custombackupdbfull-radio" class="sg-backup-db-mode" title="<?php _backupGuardT('Backup all tables found in the database')?>">
|
636 |
+
<input type="radio" name="backupDBType" id="custombackupdbfull-radio" value="0" checked>
|
637 |
+
<?php _backupGuardT('Full'); ?>
|
638 |
+
</label>
|
639 |
+
<label for="custombackupdbcurent-radio" class="sg-backup-db-mode" title="<?php echo _backupGuardT('Backup tables related to the current WordPress installation. Only tables with', true).' '.SG_ENV_DB_PREFIX.' '._backupGuardT('will be backed up', true)?>">
|
640 |
+
<input type="radio" name="backupDBType" id="custombackupdbcurent-radio" value="1">
|
641 |
+
<?php _backupGuardT('Only WordPress'); ?>
|
642 |
+
</label>
|
643 |
+
<label for="custombackupdbcustom-radio" class="sg-backup-db-mode" title="<?php _backupGuardT('Select tables you want to include in your backup') ?>">
|
644 |
+
<input type="radio" name="backupDBType" id="custombackupdbcustom-radio" value="2">
|
645 |
+
<?php _backupGuardT('Custom'); ?>
|
646 |
+
</label>
|
647 |
+
<!--Tables-->
|
648 |
+
<div class="col-md-12 sg-custom-backup-tables">
|
649 |
+
<?php foreach ($tables as $table): ?>
|
650 |
+
<div class="checkbox">
|
651 |
+
<label for="<?php echo $table['name']?>">
|
652 |
+
<input type="checkbox" name="table[]" current="<?php echo $table['current'] ?>" <?php echo $table['disabled'] ?> id="<?php echo $table['name']?>" value="<?php echo $table['name'];?>">
|
653 |
+
<span class="sg-checkbox-label-text"><?php echo basename($table['name']);?></span>
|
654 |
+
<?php if($table['disabled']) {?>
|
655 |
+
<span class="sg-disableText"><?php _backupGuardT('(excluded from settings)') ?></span>
|
656 |
+
<?php } ?>
|
657 |
+
</label>
|
658 |
+
</div>
|
659 |
+
<?php endforeach;?>
|
660 |
+
</div>
|
661 |
+
</div>
|
662 |
+
</div>
|
663 |
+
|
664 |
+
</div>
|
665 |
+
|
666 |
+
<?php
|
667 |
|
668 |
}
|
669 |
|
670 |
function backupGuardIsAccountGold()
|
671 |
{
|
672 |
+
return strpos("gold", SG_PRODUCT_IDENTIFIER)!== false;
|
673 |
}
|
674 |
|
675 |
function backupGuardGetProductName()
|
676 |
{
|
677 |
+
$name = '';
|
678 |
+
switch (SG_PRODUCT_IDENTIFIER) {
|
679 |
+
case 'backup-guard-wp-silver':
|
680 |
+
$name = 'Silver';
|
681 |
+
break;
|
682 |
+
case 'backup-guard-wp-platinum':
|
683 |
+
$name = 'Platinum';
|
684 |
+
break;
|
685 |
+
case 'backup-guard-en':
|
686 |
+
case 'backup-guard-en-regular':
|
687 |
+
$name = 'Regular';
|
688 |
+
break;
|
689 |
+
case 'backup-guard-en-extended':
|
690 |
+
$name = 'Extended';
|
691 |
+
break;
|
692 |
+
case 'backup-guard-wp-gold':
|
693 |
+
$name = 'Gold';
|
694 |
+
break;
|
695 |
+
case 'backup-guard-wp-free':
|
696 |
+
$name = 'Free';
|
697 |
+
break;
|
698 |
+
}
|
699 |
+
|
700 |
+
return $name;
|
701 |
}
|
702 |
|
703 |
function backupGuardGetFileSelectiveRestore()
|
704 |
{
|
705 |
+
?>
|
706 |
+
<div class="col-md-12 sg-checkbox sg-restore-files-options">
|
707 |
+
<div class="checkbox">
|
708 |
+
<label for="restorefilesfull-radio" class="sg-restore-files-mode" >
|
709 |
+
<input type="radio" name="restoreFilesType" checked id="restorefilesfull-radio" value="0">
|
710 |
+
<?php _backupGuardT('Full'); ?>
|
711 |
+
</label>
|
712 |
+
|
713 |
+
<label for="restorefilescustom-radio" class="sg-restore-files-mode">
|
714 |
+
<input type="radio" name="restoreFilesType" id="restorefilescustom-radio" value="1">
|
715 |
+
<?php _backupGuardT('Custom'); ?>
|
716 |
+
</label>
|
717 |
+
<!--Files-->
|
718 |
+
<div class="col-md-12 sg-file-selective-restore">
|
719 |
+
<div id="fileSystemTreeContainer"></div>
|
720 |
+
</div>
|
721 |
+
</div>
|
722 |
+
</div>
|
723 |
+
<?php
|
724 |
}
|
725 |
|
726 |
function checkAllMissedTables()
|
727 |
{
|
728 |
+
$sgdb = SGDatabase::getInstance();
|
729 |
+
$allTables = array(SG_CONFIG_TABLE_NAME, SG_SCHEDULE_TABLE_NAME, SG_ACTION_TABLE_NAME);
|
730 |
+
$missedTables = array();
|
731 |
+
$status = true;
|
732 |
+
|
733 |
+
foreach ($allTables as $table) {
|
734 |
+
$query = $sgdb->query("SELECT count(*) as isExists
|
735 |
FROM information_schema.TABLES
|
736 |
WHERE (TABLE_SCHEMA = '".DB_NAME."') AND (TABLE_NAME = '$table')"
|
737 |
+
);
|
738 |
+
|
739 |
+
if (empty($query[0]['isExists'])) {
|
740 |
+
$status = false;
|
741 |
+
}
|
742 |
+
}
|
743 |
+
|
744 |
+
return $status;
|
745 |
}
|
746 |
|
747 |
function backupGuardIncludeFile($filePath)
|
748 |
{
|
749 |
+
if (file_exists($filePath)) {
|
750 |
+
include_once($filePath);
|
751 |
+
}
|
752 |
}
|
public/ajax/importBackup.php
CHANGED
@@ -14,4 +14,5 @@ catch (SGException $exception) {
|
|
14 |
die(json_encode($error));
|
15 |
}
|
16 |
|
|
|
17 |
die();
|
14 |
die(json_encode($error));
|
15 |
}
|
16 |
|
17 |
+
echo json_encode($success);
|
18 |
die();
|
public/ajax/modalManualBackup.php
CHANGED
@@ -1,138 +1,138 @@
|
|
1 |
<?php
|
2 |
-
require_once(dirname(__FILE__).'/../boot.php');
|
3 |
|
4 |
-
$directories = SG_BACKUP_FILE_PATHS;
|
5 |
-
$directories = explode(',', $directories);
|
6 |
-
$dropbox = SGConfig::get('SG_DROPBOX_ACCESS_TOKEN');
|
7 |
-
$gdrive = SGConfig::get('SG_GOOGLE_DRIVE_REFRESH_TOKEN');
|
8 |
-
$ftp = SGConfig::get('SG_STORAGE_FTP_CONNECTED');
|
9 |
-
$amazon = SGConfig::get('SG_AMAZON_KEY');
|
10 |
-
$oneDrive = SGConfig::get('SG_ONE_DRIVE_REFRESH_TOKEN');
|
11 |
|
12 |
-
$backupType = (int)@$_GET['backupType'];
|
13 |
?>
|
14 |
<div class="modal-dialog">
|
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 |
-
|
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 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
</div>
|
1 |
<?php
|
2 |
+
require_once(dirname(__FILE__).'/../boot.php');
|
3 |
|
4 |
+
$directories = SG_BACKUP_FILE_PATHS;
|
5 |
+
$directories = explode(',', $directories);
|
6 |
+
$dropbox = SGConfig::get('SG_DROPBOX_ACCESS_TOKEN');
|
7 |
+
$gdrive = SGConfig::get('SG_GOOGLE_DRIVE_REFRESH_TOKEN');
|
8 |
+
$ftp = SGConfig::get('SG_STORAGE_FTP_CONNECTED');
|
9 |
+
$amazon = SGConfig::get('SG_AMAZON_KEY');
|
10 |
+
$oneDrive = SGConfig::get('SG_ONE_DRIVE_REFRESH_TOKEN');
|
11 |
|
12 |
+
$backupType = (int)@$_GET['backupType'];
|
13 |
?>
|
14 |
<div class="modal-dialog">
|
15 |
+
<div class="modal-content">
|
16 |
+
<div class="modal-header">
|
17 |
+
<div id="sg-modal-manual-backup-header">
|
18 |
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
19 |
+
<h4 class="modal-title"><?php ($backupType == SG_BACKUP_METHOD_MIGRATE)?_backupGuardT("Prepare migration package"):_backupGuardT("Manual Backup") ?></h4>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
<form class="form-horizontal" method="post" id="manualBackup">
|
23 |
+
<div class="modal-body sg-modal-body">
|
24 |
+
<!-- Multiple Radios -->
|
25 |
+
<div class="form-group">
|
26 |
+
<div class="col-md-12">
|
27 |
+
<input type="text" name="sg-custom-backup-name" id="sg-custom-backup-name" class="sg-backup-input" placeholder="Custom backup name (optional)">
|
28 |
+
</div>
|
29 |
+
<div class="col-md-12">
|
30 |
+
<div class="radio">
|
31 |
+
<label for="fullbackup-radio">
|
32 |
+
<input type="radio" name="backupType" id="fullbackup-radio" value="1" checked="checked">
|
33 |
+
<?php _backupGuardT('Full backup'); ?>
|
34 |
+
</label>
|
35 |
+
</div>
|
36 |
+
<div class="radio">
|
37 |
+
<label for="custombackup-radio">
|
38 |
+
<input type="radio" name="backupType" id="custombackup-radio" value="2">
|
39 |
+
<?php _backupGuardT('Custom backup'); ?>
|
40 |
+
</label>
|
41 |
+
</div>
|
42 |
+
<div class="col-md-12 sg-custom-backup">
|
43 |
+
<?php backupGuardGetBackupTablesHTML(); ?>
|
44 |
+
<div class="checkbox sg-no-padding-top">
|
45 |
+
<label for="custombackupfiles-chbx">
|
46 |
+
<input type="checkbox" class="sg-custom-option" name="backupFiles" id="custombackupfiles-chbx">
|
47 |
+
<span class="sg-checkbox-label-text"><?php _backupGuardT('Backup files'); ?></span>
|
48 |
+
</label>
|
49 |
+
<!--Files-->
|
50 |
+
<div class="col-md-12 sg-checkbox sg-custom-backup-files">
|
51 |
+
<?php foreach ($directories as $directory): ?>
|
52 |
+
<div class="checkbox">
|
53 |
+
<label for="<?php echo 'sg'.$directory?>">
|
54 |
+
<input type="checkbox" name="directory[]" id="<?php echo 'sg'.$directory;?>" value="<?php echo $directory;?>">
|
55 |
+
<span class="sg-checkbox-label-text"><?php echo basename($directory);?></span>
|
56 |
+
</label>
|
57 |
+
</div>
|
58 |
+
<?php endforeach;?>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
<div class="clearfix"></div>
|
63 |
+
<?php if(SGBoot::isFeatureAvailable('STORAGE')): ?>
|
64 |
+
<!--Cloud-->
|
65 |
+
<div class="checkbox sg-no-padding-top">
|
66 |
+
<label for="custombackupcloud-chbx">
|
67 |
+
<input type="checkbox" name="backupCloud" id="custombackupcloud-chbx">
|
68 |
+
<span class="sg-checkbox-label-text"><?php _backupGuardT('Upload to cloud'); ?></span>
|
69 |
+
</label>
|
70 |
+
<!--Storages-->
|
71 |
+
<div class="col-md-12 sg-checkbox sg-custom-backup-cloud">
|
72 |
+
<?php if(SGBoot::isFeatureAvailable('FTP')): ?>
|
73 |
+
<div class="checkbox">
|
74 |
+
<label for="cloud-ftp" <?php echo empty($ftp)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('FTP is not active.',true).'"':''?>>
|
75 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-ftp" value="<?php echo SG_STORAGE_FTP ?>" <?php echo empty($ftp)?'disabled="disabled"':''?>>
|
76 |
+
<span class="sg-checkbox-label-text"><?php echo 'FTP' ?></span>
|
77 |
+
</label>
|
78 |
+
</div>
|
79 |
+
<?php endif; ?>
|
80 |
+
<?php if(SGBoot::isFeatureAvailable('DROPBOX')): ?>
|
81 |
+
<div class="checkbox">
|
82 |
+
<label for="cloud-dropbox" <?php echo empty($dropbox)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('Dropbox is not active.',true).'"':''?>>
|
83 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-dropbox" value="<?php echo SG_STORAGE_DROPBOX ?>"
|
84 |
+
<?php echo empty($dropbox)?'disabled="disabled"':''?>>
|
85 |
+
<span class="sg-checkbox-label-text"><?php echo 'Dropbox' ?></span>
|
86 |
+
</label>
|
87 |
+
</div>
|
88 |
+
<?php endif; ?>
|
89 |
+
<?php if(SGBoot::isFeatureAvailable('GOOGLE_DRIVE')): ?>
|
90 |
+
<div class="checkbox">
|
91 |
+
<label for="cloud-gdrive" <?php echo empty($gdrive)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('Google Drive is not active.',true).'"':''?>>
|
92 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-gdrive" value="<?php echo SG_STORAGE_GOOGLE_DRIVE?>"
|
93 |
+
<?php echo empty($gdrive)?'disabled="disabled"':''?>>
|
94 |
+
<span class="sg-checkbox-label-text"><?php echo 'Google Drive' ?></span>
|
95 |
+
</label>
|
96 |
+
</div>
|
97 |
+
<?php endif; ?>
|
98 |
+
<?php if(SGBoot::isFeatureAvailable('AMAZON')): ?>
|
99 |
+
<div class="checkbox">
|
100 |
+
<label for="cloud-amazon" <?php echo empty($amazon)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT((backupGuardIsAccountGold()? 'Amazon ':'').'S3 is not active.',true).'"':''?>>
|
101 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-amazon" value="<?php echo SG_STORAGE_AMAZON?>"
|
102 |
+
<?php echo empty($amazon)?'disabled="disabled"':''?>>
|
103 |
+
<span class="sg-checkbox-label-text"><?php echo (backupGuardIsAccountGold()? 'Amazon ':'').'S3' ?></span>
|
104 |
+
</label>
|
105 |
+
</div>
|
106 |
+
<?php endif; ?>
|
107 |
+
<?php if(SGBoot::isFeatureAvailable('ONE_DRIVE')): ?>
|
108 |
+
<div class="checkbox">
|
109 |
+
<label for="cloud-one-drive" <?php echo empty($oneDrive)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('One Drive is not active.', true).'"':''?>>
|
110 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-one-drive" value="<?php echo SG_STORAGE_ONE_DRIVE?>" <?php echo empty($oneDrive)?'disabled="disabled"':''?>>
|
111 |
+
<span class="sg-checkbox-label-text"><?php echo 'One Drive' ?></span>
|
112 |
+
</label>
|
113 |
+
</div>
|
114 |
+
<?php endif;?>
|
115 |
+
</div>
|
116 |
+
<div class="clearfix"></div>
|
117 |
+
</div>
|
118 |
+
<?php endif; ?>
|
119 |
+
<!-- Background mode -->
|
120 |
+
<?php if(SGBoot::isFeatureAvailable('BACKGROUND_MODE')): ?>
|
121 |
+
<div class="checkbox">
|
122 |
+
<label for="background-chbx">
|
123 |
+
<input type="checkbox" name="backgroundMode" id="background-chbx">
|
124 |
+
<span class="sg-checkbox-label-text"><?php _backupGuardT('Background mode'); ?></span>
|
125 |
+
</label>
|
126 |
+
</div>
|
127 |
+
<?php endif; ?>
|
128 |
+
</div>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
<div class="modal-footer">
|
132 |
+
<input type="text" name="backup-type" value="<?php echo $backupType?>" hidden>
|
133 |
+
<span class="modal-close-button" data-dismiss="modal">Close</span>
|
134 |
+
<button type="button" onclick="sgBackup.manualBackup()" class="btn btn-success"><?php _backupGuardT('Backup')?></button>
|
135 |
+
</div>
|
136 |
+
</form>
|
137 |
+
</div>
|
138 |
</div>
|
public/backups.php
CHANGED
@@ -1,14 +1,9 @@
|
|
1 |
<?php
|
2 |
-
require_once(dirname(__FILE__).'/boot.php');
|
3 |
-
require_once(SG_BACKUP_PATH.'SGBackup.php');
|
4 |
-
require_once(SG_PUBLIC_INCLUDE_PATH.'header.php');
|
5 |
-
require_once(SG_PUBLIC_INCLUDE_PATH.'sidebar.php');
|
6 |
$backups = SGBackup::getAllBackups();
|
7 |
-
$pluginCapabilities = backupGuardGetCapabilities();
|
8 |
$downloadUrl = admin_url('admin-post.php?action=backup_guard_downloadBackup&');
|
9 |
-
|
10 |
-
$pluginCapabilities = backupGuardGetCapabilities();
|
11 |
?>
|
|
|
12 |
<?php if(SGConfig::get('SG_REVIEW_POPUP_STATE') == SG_SHOW_REVIEW_POPUP): ?>
|
13 |
<!-- Review Box -->
|
14 |
<script type="text/javascript">sgShowReview = 1;</script>
|
@@ -76,138 +71,131 @@ $pluginCapabilities = backupGuardGetCapabilities();
|
|
76 |
</div>
|
77 |
|
78 |
<?php endif; ?>
|
79 |
-
<
|
80 |
-
<div
|
81 |
-
<div class="container-fluid">
|
82 |
-
<fieldset>
|
83 |
-
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('Backups')?></h1></div>
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
</a>
|
168 |
-
<ul class="dropdown-menu">
|
169 |
-
<?php if($backup['files']):?>
|
170 |
-
<li>
|
171 |
-
<a href="<?php echo $downloadUrl.'backupName='.htmlspecialchars(@$backup['name']).'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_SGBP ?>">
|
172 |
-
<i class="glyphicon glyphicon-hdd" aria-hidden="true"></i> <?php _backupGuardT('Backup')?>
|
173 |
-
</a>
|
174 |
-
</li>
|
175 |
-
<?php endif;?>
|
176 |
-
<?php if($backup['backup_log']):?>
|
177 |
-
<li>
|
178 |
-
<a href="<?php echo $downloadUrl.'backupName='.htmlspecialchars(@$backup['name']).'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_BACKUP_LOG ?>">
|
179 |
-
<i class="glyphicon glyphicon-list-alt" aria-hidden="true"></i> <?php _backupGuardT('Backup log')?>
|
180 |
-
</a>
|
181 |
-
</li>
|
182 |
-
<?php endif;?>
|
183 |
-
<?php if($backup['restore_log']):?>
|
184 |
-
<li>
|
185 |
-
<a href="<?php echo $downloadUrl.'backupName='.@$backup['name'].'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_RESTORE_LOG ?>">
|
186 |
-
<i class="glyphicon glyphicon-th-list" aria-hidden="true"></i> <?php _backupGuardT('Restore log')?>
|
187 |
-
</a>
|
188 |
-
</li>
|
189 |
-
<?php endif;?>
|
190 |
-
</ul>
|
191 |
-
</div>
|
192 |
-
<?php if(file_exists(SG_BACKUP_DIRECTORY.$backup['name'].'/'.$backup['name'].'.sgbp')):?>
|
193 |
-
<a href="javascript:void(0)" title="<?php _backupGuardT('Restore')?>" class="sg-restore-button btn-xs" data-toggle="modal" data-modal-name="manual-restore" data-remote="modalManualRestore" data-sgbp-params="<?php echo htmlspecialchars($backup['name']) ?>">
|
194 |
-
|
195 |
-
</a>
|
196 |
-
<?php endif;?>
|
197 |
-
<?php endif; ?>
|
198 |
-
</td>
|
199 |
-
</tr>
|
200 |
-
<?php endforeach; ?>
|
201 |
-
</tbody>
|
202 |
-
</table>
|
203 |
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
<div class="clearfix"></div>
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
$backups = SGBackup::getAllBackups();
|
|
|
3 |
$downloadUrl = admin_url('admin-post.php?action=backup_guard_downloadBackup&');
|
4 |
+
$contentClassName = getBackupPageContentClassName('backups');
|
|
|
5 |
?>
|
6 |
+
<div id="sg-backup-page-content-backups" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
7 |
<?php if(SGConfig::get('SG_REVIEW_POPUP_STATE') == SG_SHOW_REVIEW_POPUP): ?>
|
8 |
<!-- Review Box -->
|
9 |
<script type="text/javascript">sgShowReview = 1;</script>
|
71 |
</div>
|
72 |
|
73 |
<?php endif; ?>
|
74 |
+
<fieldset>
|
75 |
+
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('Backups')?></h1></div>
|
|
|
|
|
|
|
76 |
|
77 |
+
<a href="javascript:void(0)" id="sg-manual-backup" class="pull-left btn btn-success sg-backup-action-buttons" data-toggle="modal" data-modal-name="manual-backup" data-remote="modalManualBackup" sg-data-backup-type="<?php echo SG_BACKUP_METHOD_STANDARD ?>">
|
78 |
+
<span class="sg-backup-start sg-backup-buttons-content"></span>
|
79 |
+
<span class="sg-backup-buttons-content sg-backup-buttons-text"><?php _backupGuardT('Backup')?></span>
|
80 |
+
</a>
|
81 |
|
82 |
+
<a href="javascript:void(0)" id="sg-backup-with-migration" class="pull-left btn btn-primary sg-backup-action-buttons" data-toggle="modal" data-modal-name="manual-backup" data-remote="modalManualBackup" sg-data-backup-type="<?php echo SG_BACKUP_METHOD_MIGRATE ?>"<?php echo SGBoot::isFeatureAvailable('BACKUP_WITH_MIGRATION')?'':'disabled' ?>>
|
83 |
+
<span class="sg-backup-migrate sg-backup-buttons-content"></span>
|
84 |
+
<span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Migrate')?></span>
|
85 |
+
</a>
|
86 |
+
<a href="javascript:void(0)" id="sg-import" class="btn btn-primary sg-margin-left-12 pull-left sg-backup-action-buttons" data-toggle="modal" data-modal-name="import" data-remote="modalImport">
|
87 |
+
<span class="sg-backup-import sg-backup-buttons-content"></span>
|
88 |
+
<span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Import')?><span>
|
89 |
+
</a>
|
90 |
+
<?php if ($pluginCapabilities == BACKUP_GUARD_CAPABILITIES_FREE): ?>
|
91 |
+
<a href="<?php echo BACKUP_GUARD_WORDPRESS_SUPPORT_URL; ?>" target="_blank">
|
92 |
+
<button type="button" id="sg-report-problem-button" class="btn btn btn-primary sg-margin-left-12 pull-right sg-backup-action-buttons sg-button-red pull-right">
|
93 |
+
<span class="sg-backup-report"></span>
|
94 |
|
95 |
+
<span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Report issue')?></span>
|
96 |
+
</button>
|
97 |
+
</a>
|
98 |
+
<?php endif; ?>
|
99 |
+
<a id="sg-delete-multi-backups" class="pull-right btn btn-danger sg-margin-left-12 sg-backup-action-buttons">
|
100 |
+
<span class="sg-backup-delete sg-backup-buttons-content"></span>
|
101 |
+
<span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Delete')?></span>
|
102 |
+
</a>
|
103 |
+
<div class="clearfix"></div><br/>
|
104 |
+
<table class="table table-striped paginated sg-backup-table">
|
105 |
+
<thead>
|
106 |
+
<tr>
|
107 |
+
<th><input type="checkbox" id="sg-checkbox-select-all" autocomplete="off"></th>
|
108 |
+
<th><?php _backupGuardT('Filename')?></th>
|
109 |
+
<th><?php _backupGuardT('Size')?></th>
|
110 |
+
<th><?php _backupGuardT('Date')?></th>
|
111 |
+
<th><?php _backupGuardT('Status')?></th>
|
112 |
+
<th><?php _backupGuardT('Actions')?></th>
|
113 |
+
</tr>
|
114 |
+
</thead>
|
115 |
+
<tbody>
|
116 |
+
<?php if(empty($backups)):?>
|
117 |
+
<tr>
|
118 |
+
<td colspan="6"><?php _backupGuardT('No backups found.')?></td>
|
119 |
+
</tr>
|
120 |
+
<?php endif;?>
|
121 |
+
<?php foreach($backups as $backup): ?>
|
122 |
+
<tr>
|
123 |
+
<td><input type="checkbox" autocomplete="off" value="<?php echo $backup['name']?>" <?php echo $backup['active']?'disabled':''?>></td>
|
124 |
+
<td><?php echo $backup['name'] ?></td>
|
125 |
+
<td><?php echo !$backup['active']?$backup['size']:'' ?></td>
|
126 |
+
<td><?php echo backupGuardConvertDateTimezone($backup['date']) ?></td>
|
127 |
+
<td id="sg-status-tabe-data-<?php echo $backup['id']?>" <?php echo $backup['active']?'data-toggle="tooltip" data-placement="top" data-original-title="" data-container="#sg-wrapper"':''?>>
|
128 |
+
<?php if($backup['active']):
|
129 |
+
$filteredStatuses = backupGuardFilterStatusesByActionType($backup, $backup['options']);
|
130 |
+
?>
|
131 |
+
<input type="hidden" class="sg-active-action-id" value="<?php echo $backup['id'];?>"/>
|
132 |
+
<?php foreach ($filteredStatuses as $statusCode): ?>
|
133 |
+
<span class="btn-xs sg-status-icon sg-status-<?php echo $statusCode; ?>"> </span>
|
134 |
+
<?php endforeach; ?>
|
135 |
+
<div class="sg-progress progress">
|
136 |
+
<div class="progress-bar"></div>
|
137 |
+
</div>
|
138 |
+
<?php else: ?>
|
139 |
+
<?php if ($backup['status'] == SG_ACTION_STATUS_FINISHED_WARNINGS): ?>
|
140 |
+
<span class="btn-xs text-warning" data-toggle="tooltip" data-placement="top" data-original-title="<?php if($backup['type']==SG_ACTION_TYPE_BACKUP): echo _backupGuardT('Warnings found during backup',true); elseif($backup['type']==SG_ACTION_TYPE_RESTORE): echo _backupGuardT('Warnings found during restore',true); else: echo _backupGuardT('Warnings found during upload',true); endif; ?>" data-container="#sg-wrapper"><?php _backupGuardT('Warning')?></span>
|
141 |
+
<?php elseif ($backup['status'] == SG_ACTION_STATUS_ERROR): ?>
|
142 |
+
<span class="btn-xs text-danger" data-toggle="tooltip" data-placement="top" data-original-title="<?php if($backup['type']==SG_ACTION_TYPE_BACKUP): echo _backupGuardT('Errors found during backup',true); elseif($backup['type']==SG_ACTION_TYPE_RESTORE): echo _backupGuardT('Errors found during restore',true); else: echo _backupGuardT('Errors found during upload',true);
|
143 |
+
endif; ?>" data-container="#sg-wrapper"><?php _backupGuardT('Failed')?></span>
|
144 |
+
<?php else: ?>
|
145 |
+
<span class="btn-xs sg-text-success"><?php _backupGuardT('Success')?></span>
|
146 |
+
<?php endif;?>
|
147 |
+
<?php endif; ?>
|
148 |
+
</td>
|
149 |
+
<td class="sg-backup-actions-td">
|
150 |
+
<?php if($backup['active']): ?>
|
151 |
+
<?php if($backup['type'] != SG_ACTION_TYPE_RESTORE): ?>
|
152 |
+
<a class="btn-xs sg-cancel-backup" sg-data-backup-id="<?php echo $backup['id']?>" href="javascript:void(0)" title="<?php _backupGuardT('Stop')?>"> </a>
|
153 |
+
<?php endif; ?>
|
154 |
+
<?php else: ?>
|
155 |
+
<a href="javascript:void(0)" data-sgbackup-name="<?php echo htmlspecialchars($backup['name']);?>" data-remote="deleteBackup" class="sg-remove-backup btn-xs" title="<?php _backupGuardT('Delete')?>"> </a>
|
156 |
+
<div class="btn-group">
|
157 |
+
<a href="javascript:void(0)" class="sg-bg-download-button btn-xs" data-toggle="dropdown1" aria-expanded="false" title="<?php _backupGuardT('Download')?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
|
159 |
+
</a>
|
160 |
+
<ul class="dropdown-menu">
|
161 |
+
<?php if($backup['files']):?>
|
162 |
+
<li>
|
163 |
+
<a href="<?php echo $downloadUrl.'backupName='.htmlspecialchars(@$backup['name']).'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_SGBP ?>">
|
164 |
+
<i class="glyphicon glyphicon-hdd" aria-hidden="true"></i> <?php _backupGuardT('Backup')?>
|
165 |
+
</a>
|
166 |
+
</li>
|
167 |
+
<?php endif;?>
|
168 |
+
<?php if($backup['backup_log']):?>
|
169 |
+
<li>
|
170 |
+
<a href="<?php echo $downloadUrl.'backupName='.htmlspecialchars(@$backup['name']).'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_BACKUP_LOG ?>">
|
171 |
+
<i class="glyphicon glyphicon-list-alt" aria-hidden="true"></i> <?php _backupGuardT('Backup log')?>
|
172 |
+
</a>
|
173 |
+
</li>
|
174 |
+
<?php endif;?>
|
175 |
+
<?php if($backup['restore_log']):?>
|
176 |
+
<li>
|
177 |
+
<a href="<?php echo $downloadUrl.'backupName='.@$backup['name'].'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_RESTORE_LOG ?>">
|
178 |
+
<i class="glyphicon glyphicon-th-list" aria-hidden="true"></i> <?php _backupGuardT('Restore log')?>
|
179 |
+
</a>
|
180 |
+
</li>
|
181 |
+
<?php endif;?>
|
182 |
+
</ul>
|
183 |
+
</div>
|
184 |
+
<?php if(file_exists(SG_BACKUP_DIRECTORY.$backup['name'].'/'.$backup['name'].'.sgbp')):?>
|
185 |
+
<a href="javascript:void(0)" title="<?php _backupGuardT('Restore')?>" class="sg-restore-button btn-xs" data-toggle="modal" data-modal-name="manual-restore" data-remote="modalManualRestore" data-sgbp-params="<?php echo htmlspecialchars($backup['name']) ?>">
|
186 |
+
|
187 |
+
</a>
|
188 |
+
<?php endif;?>
|
189 |
+
<?php endif; ?>
|
190 |
+
</td>
|
191 |
+
</tr>
|
192 |
+
<?php endforeach; ?>
|
193 |
+
</tbody>
|
194 |
+
</table>
|
195 |
+
|
196 |
+
<div class="text-right">
|
197 |
+
<ul class="pagination"></ul>
|
198 |
+
</div>
|
199 |
+
</fieldset>
|
200 |
<div class="clearfix"></div>
|
201 |
+
</div>
|
public/cloud.php
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
<?php
|
2 |
-
require_once(dirname(__FILE__).'/boot.php');
|
3 |
-
require_once(SG_PUBLIC_INCLUDE_PATH.'/header.php');
|
4 |
$dropbox = SGConfig::get('SG_DROPBOX_ACCESS_TOKEN');
|
5 |
$gdrive = SGConfig::get('SG_GOOGLE_DRIVE_REFRESH_TOKEN');
|
6 |
$ftp = SGConfig::get('SG_STORAGE_FTP_CONNECTED');
|
@@ -13,143 +11,139 @@ $dropboxUsername = SGConfig::get('SG_DROPBOX_CONNECTION_STRING');
|
|
13 |
$amazonInfo = SGConfig::get('SG_AMAZON_BUCKET');
|
14 |
|
15 |
$oneDriveInfo = SGConfig::get('SG_ONE_DRIVE_CONNECTION_STRING');
|
|
|
16 |
?>
|
17 |
-
<?php
|
18 |
-
<div class="sg-
|
19 |
-
<div
|
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 |
-
|
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 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
<
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
<
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
<
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
</form>
|
151 |
-
</div>
|
152 |
-
</div>
|
153 |
-
</div>
|
154 |
-
<?php require_once(SG_PUBLIC_INCLUDE_PATH.'/footer.php'); ?>
|
155 |
</div>
|
1 |
<?php
|
|
|
|
|
2 |
$dropbox = SGConfig::get('SG_DROPBOX_ACCESS_TOKEN');
|
3 |
$gdrive = SGConfig::get('SG_GOOGLE_DRIVE_REFRESH_TOKEN');
|
4 |
$ftp = SGConfig::get('SG_STORAGE_FTP_CONNECTED');
|
11 |
$amazonInfo = SGConfig::get('SG_AMAZON_BUCKET');
|
12 |
|
13 |
$oneDriveInfo = SGConfig::get('SG_ONE_DRIVE_CONNECTION_STRING');
|
14 |
+
$contentClassName = getBackupPageContentClassName('cloud');
|
15 |
?>
|
16 |
+
<div id="sg-backup-page-content-cloud" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
17 |
+
<div class="row sg-cloud-container">
|
18 |
+
<div class="col-md-12">
|
19 |
+
<form class="form-horizontal">
|
20 |
+
<fieldset>
|
21 |
+
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('Cloud settings')?></h1></div>
|
22 |
+
<?php if (SGBoot::isFeatureAvailable('SUBDIRECTORIES')): ?>
|
23 |
+
<div class="form-group form-inline">
|
24 |
+
<label class="col-md-3 sg-control-label">
|
25 |
+
<?php _backupGuardT('Destination folder')?>
|
26 |
+
</label>
|
27 |
+
<div class="col-md-3">
|
28 |
+
<input id="cloudFolder" name="cloudFolder" type="text" class="form-control input-md sg-backup-input" value="<?php echo esc_html(SGConfig::get('SG_STORAGE_BACKUPS_FOLDER_NAME'))?>">
|
29 |
+
<button type="button" id="sg-save-cloud-folder" class="btn btn-success pull-right"><?php _backupGuardT('Save');?></button>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
<?php endif; ?>
|
33 |
+
<!-- Dropbox -->
|
34 |
+
<?php if (SGBoot::isFeatureAvailable('DROPBOX')): ?>
|
35 |
+
<div class="form-group">
|
36 |
+
<label class="col-md-3 sg-control-label">
|
37 |
+
<div class="sg-cloud-icon-wrapper">
|
38 |
+
<span class="sg-cloud-icon sg-cloud-dropbox"></span>
|
39 |
+
</div>
|
40 |
+
<div class="sg-cloud-label-wrapper">
|
41 |
+
<span><?php echo 'Dropbox' ?></span>
|
42 |
+
<?php if(!empty($dropboxUsername)): ?>
|
43 |
+
<br/>
|
44 |
+
<span class="text-muted sg-dropbox-user sg-helper-block"><?php echo $dropboxUsername;?></span>
|
45 |
+
<?php endif;?>
|
46 |
+
</div>
|
47 |
+
</label>
|
48 |
+
<div class="col-md-3">
|
49 |
+
<label class="sg-switch-container">
|
50 |
+
<input data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="DROPBOX" data-remote="cloudDropbox" type="checkbox" class="sg-switch" <?php echo !empty($dropbox)?'checked="checked"':''?>>
|
51 |
+
</label>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
<?php endif; ?>
|
55 |
+
<!-- Google Drive -->
|
56 |
+
<?php if (SGBoot::isFeatureAvailable('GOOGLE_DRIVE')): ?>
|
57 |
+
<div class="form-group">
|
58 |
+
<label class="col-md-3 sg-control-label">
|
59 |
+
<div class="sg-cloud-icon-wrapper">
|
60 |
+
<span class="sg-cloud-icon sg-cloud-google-drive"></span>
|
61 |
+
</div>
|
62 |
+
<div class="sg-cloud-label-wrapper">
|
63 |
+
<?php echo 'Google Drive' ?>
|
64 |
+
<?php if(!empty($gdriveUsername)): ?>
|
65 |
+
<br/>
|
66 |
+
<span class="text-muted sg-gdrive-user sg-helper-block"><?php echo $gdriveUsername;?></span>
|
67 |
+
<?php endif;?>
|
68 |
+
</div>
|
69 |
+
</label>
|
70 |
+
<div class="col-md-3">
|
71 |
+
<label class="sg-switch-container">
|
72 |
+
<input data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="GOOGLE_DRIVE" data-remote="cloudGdrive" type="checkbox" class="sg-switch" <?php echo !empty($gdrive)?'checked="checked"':''?>>
|
73 |
+
</label>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
<?php endif; ?>
|
77 |
+
<!-- FTP -->
|
78 |
+
<?php if (SGBoot::isFeatureAvailable('FTP')): ?>
|
79 |
+
<div class="form-group">
|
80 |
+
<label class="col-md-3 sg-control-label sg-user-info">
|
81 |
+
<div class="sg-cloud-icon-wrapper">
|
82 |
+
<span class="sg-cloud-icon sg-cloud-ftp"></span>
|
83 |
+
</div>
|
84 |
+
<div class="sg-cloud-label-wrapper">
|
85 |
+
<?php echo 'FTP / SFTP' ?>
|
86 |
+
<?php if(!empty($ftpUsername)): ?>
|
87 |
+
<br/>
|
88 |
+
<span class="text-muted sg-ftp-user sg-helper-block"><?php echo $ftpUsername;?></span>
|
89 |
+
<?php endif;?>
|
90 |
+
</div>
|
91 |
+
</label>
|
92 |
+
<div class="col-md-3">
|
93 |
+
<label class="sg-switch-container">
|
94 |
+
<input type="checkbox" data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="FTP" data-remote="cloudFtp" class="sg-switch" <?php echo !empty($ftp)?'checked="checked"':''?>>
|
95 |
+
<a id="ftp-settings" href="javascript:void(0)" class="hide" data-toggle="modal" data-modal-name="ftp-settings" data-remote="modalFtpSettings"><?php echo 'FTP '._backupGuardT('Settings', true) ?></a>
|
96 |
+
</label>
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
<?php endif; ?>
|
100 |
+
<!-- Amazon S3 -->
|
101 |
+
<?php if (SGBoot::isFeatureAvailable('AMAZON')): ?>
|
102 |
+
<div class="form-group">
|
103 |
+
<label class="col-md-3 sg-control-label">
|
104 |
+
<div class="sg-cloud-icon-wrapper">
|
105 |
+
<span class="sg-cloud-icon sg-cloud-amazon"></span>
|
106 |
+
</div>
|
107 |
+
<div class="sg-cloud-label-wrapper">
|
108 |
+
<?php echo (backupGuardIsAccountGold()? 'Amazon ':'').'S3'?>
|
109 |
+
<?php if (!empty($amazonInfo)):?>
|
110 |
+
<br/>
|
111 |
+
<span class="text-muted sg-amazonr-user sg-helper-block"><?php echo $amazonInfo;?></span>
|
112 |
+
<?php endif;?>
|
113 |
+
</div>
|
114 |
+
</label>
|
115 |
+
<div class="col-md-3">
|
116 |
+
<label class="sg-switch-container">
|
117 |
+
<input type="checkbox" data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="AMAZON" data-remote="cloudAmazon" class="sg-switch" <?php echo !empty($amazon)?'checked="checked"':''?>>
|
118 |
+
<a id="amazon-settings" href="javascript:void(0)" class="hide" data-toggle="modal" data-modal-name="amazon-settings" data-remote="modalAmazonSettings"><?php echo 'Amazon'._backupGuardT('Settings', true)?></a>
|
119 |
+
</label>
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
<?php endif; ?>
|
123 |
+
<!-- One Drive -->
|
124 |
+
<?php if (SGBoot::isFeatureAvailable('ONE_DRIVE')): ?>
|
125 |
+
<div class="form-group">
|
126 |
+
<label class="col-md-3 sg-control-label">
|
127 |
+
<div class="sg-cloud-icon-wrapper">
|
128 |
+
<span class="sg-cloud-icon sg-cloud-one-drive"></span>
|
129 |
+
</div>
|
130 |
+
<div class="sg-cloud-label-wrapper">
|
131 |
+
<?php echo 'One Drive' ?>
|
132 |
+
<?php if(!empty($oneDriveInfo)): ?>
|
133 |
+
<br/>
|
134 |
+
<span class="text-muted sg-gdrive-user sg-helper-block"><?php echo $oneDriveInfo;?></span>
|
135 |
+
<?php endif;?>
|
136 |
+
</div>
|
137 |
+
</label>
|
138 |
+
<div class="col-md-3">
|
139 |
+
<label class="sg-switch-container">
|
140 |
+
<input data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="ONE_DRIVE" data-remote="cloudOneDrive" type="checkbox" class="sg-switch" <?php echo !empty($oneDrive)?'checked="checked"':''?>>
|
141 |
+
</label>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
<?php endif; ?>
|
145 |
+
</fieldset>
|
146 |
+
</form>
|
147 |
+
</div>
|
148 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
149 |
</div>
|
public/config/config.wordpress.php
CHANGED
@@ -20,3 +20,9 @@ define('SG_BACKUP_UPGRADE_URL', 'https://backup-guard.com/products/backup-wordpr
|
|
20 |
define('SG_BACKUP_SITE_PRICING_URL', 'https://backup-guard.com/products/backup-wordpress#pricing');
|
21 |
|
22 |
define('SG_BACKUP_ADMIN_LOGIN_URL', 'https://backup-guard.com/admin');
|
|
|
|
|
|
|
|
|
|
|
|
20 |
define('SG_BACKUP_SITE_PRICING_URL', 'https://backup-guard.com/products/backup-wordpress#pricing');
|
21 |
|
22 |
define('SG_BACKUP_ADMIN_LOGIN_URL', 'https://backup-guard.com/admin');
|
23 |
+
|
24 |
+
// banner URLS
|
25 |
+
define('SG_BACKUP_KNOWLEDGE_BASE_URL', 'https://help.backup-guard.com/en/');
|
26 |
+
define('SG_BACKUP_DEMO_URL', 'https://backup-guard.com/wordpress/wp-login.php');
|
27 |
+
define('SG_BACKUP_FAQ_URL', 'https://backup-guard.com/products/backup-wordpress/faq');
|
28 |
+
define('SG_BACKUP_CONTACT_US_URL', 'https://wordpress.org/support/plugin/backup/');
|
public/css/bgstyle.less.css
CHANGED
@@ -8155,8 +8155,107 @@ input.sg-backup-input[readonly] {
|
|
8155 |
box-shadow: none;
|
8156 |
}
|
8157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8158 |
.sg-checkbox-label-text {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8159 |
display: inline-block;
|
8160 |
-
|
8161 |
-
|
8162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8155 |
box-shadow: none;
|
8156 |
}
|
8157 |
|
8158 |
+
a#sg-logo:focus {
|
8159 |
+
box-shadow: none !important;
|
8160 |
+
}
|
8161 |
+
|
8162 |
+
.sg-visibility-hidden {
|
8163 |
+
display: none;
|
8164 |
+
}
|
8165 |
+
|
8166 |
.sg-checkbox-label-text {
|
8167 |
+
display: inline-block;
|
8168 |
+
margin-left: 5px;
|
8169 |
+
margin-top: 3px;
|
8170 |
+
}
|
8171 |
+
|
8172 |
+
/*Pricing table page CSS*/
|
8173 |
+
.sg-backup-table-row div {
|
8174 |
+
border-bottom: 1px solid #C9C9C9;
|
8175 |
+
border-right: 1px solid #C9C9C9;
|
8176 |
+
padding-top: 25px;
|
8177 |
+
padding-bottom: 25px;
|
8178 |
+
padding-left: 25px !important;
|
8179 |
+
}
|
8180 |
+
.sg-backup-table-row div:last-child {
|
8181 |
+
border-right: 0px !important;
|
8182 |
+
}
|
8183 |
+
.sg-pricing-table-header-label {
|
8184 |
+
font-size: 25px;
|
8185 |
+
color: #000000;
|
8186 |
+
font-weight: bold;
|
8187 |
+
display: block;
|
8188 |
+
margin-bottom: 20px;
|
8189 |
+
}
|
8190 |
+
.sg-pricing-table-blue-label {
|
8191 |
+
color: #0021C8;
|
8192 |
+
font-size: 39px;
|
8193 |
+
line-height: 1;
|
8194 |
+
}
|
8195 |
+
.sg-pricing-table-header-first-column {
|
8196 |
+
height: 145px;
|
8197 |
+
}
|
8198 |
+
@font-face {
|
8199 |
+
font-family: 'pricingTableFonts';
|
8200 |
+
src: url('../fonts/pricingTableFonts.eot');
|
8201 |
+
src: url('../fonts/pricingTableFonts.eot?#iefix') format('embedded-opentype'),
|
8202 |
+
url('../fonts/pricingTableFonts.woff') format('woff'),
|
8203 |
+
url('../fonts/pricingTableFonts.ttf') format('truetype'),
|
8204 |
+
url('../fonts/pricingTableFonts.svg#Glyphter') format('svg');
|
8205 |
+
font-weight: normal;
|
8206 |
+
font-style: normal;
|
8207 |
+
}
|
8208 |
+
[class*='backup-plan-']:before{
|
8209 |
display: inline-block;
|
8210 |
+
font-family: 'pricingTableFonts' !important;
|
8211 |
+
font-style: normal;
|
8212 |
+
font-weight: normal;
|
8213 |
+
line-height: 1;
|
8214 |
+
-webkit-font-smoothing: antialiased;
|
8215 |
+
-moz-osx-font-smoothing: grayscale
|
8216 |
+
}
|
8217 |
+
.sg-backup-plan-included:before{content:'\0057';}
|
8218 |
+
.sg-backup-plan-excluded:before{content:'\0058';}
|
8219 |
+
|
8220 |
+
.sg-backup-plan-excluded, .sg-backup-plan-included {
|
8221 |
+
color: #0021C8;
|
8222 |
+
}
|
8223 |
+
.sg-backup-table-options-wrapper {
|
8224 |
+
text-align: center;
|
8225 |
+
}
|
8226 |
+
|
8227 |
+
.sg-backup-table-options-wrapper .sg-backup-table-row:last-child div {
|
8228 |
+
border-bottom: 0;
|
8229 |
+
margin-bottom: 30px;
|
8230 |
+
}
|
8231 |
+
|
8232 |
+
.sg-pricing-table-wrapper {
|
8233 |
+
box-shadow: 0px 0px 20px #0000000D;
|
8234 |
+
margin-top: 10px;
|
8235 |
+
padding: 10px 10px 30px 10px;
|
8236 |
+
}
|
8237 |
+
.sg-backup-guard-plans-title {
|
8238 |
+
text-align: center;
|
8239 |
+
color: #0021C8 !important;
|
8240 |
+
font-size: 24px !important;
|
8241 |
+
margin-top: 37px !important;
|
8242 |
+
font-weight: bold !important;
|
8243 |
+
margin-bottom: 60px !important;
|
8244 |
+
}
|
8245 |
+
.sg-pricing-table-option-wrapper {
|
8246 |
+
text-align: left;
|
8247 |
+
}
|
8248 |
+
.sg-backup-pricing-currency {
|
8249 |
+
font-size: 28px;
|
8250 |
+
vertical-align: top;
|
8251 |
+
}
|
8252 |
+
@media (max-width: 1284px) {
|
8253 |
+
.sg-pricing-table-blue-label {
|
8254 |
+
font-size: 31px;
|
8255 |
+
vertical-align: top;
|
8256 |
+
}
|
8257 |
+
.sg-pricing-table-header-first-column {
|
8258 |
+
height: 137px;
|
8259 |
+
}
|
8260 |
+
}
|
8261 |
+
/*Pricing table page CSS*/
|
public/css/deactivationSurvey.css
CHANGED
@@ -68,7 +68,7 @@
|
|
68 |
|
69 |
border: 2px solid grey;
|
70 |
border-radius: 50%;
|
71 |
-
width:
|
72 |
}
|
73 |
.bg-deactivation-survey-popup-container .bg-deactivation-survey-popup-tbl .bg-deactivation-survey-popup-cel .bg-deactivation-survey-popup-content a.bg-deactivation-survey-popup-cancel:hover{
|
74 |
/*color:#fff;
|
@@ -138,7 +138,7 @@
|
|
138 |
border: none;
|
139 |
font-size: 16px;
|
140 |
text-transform: uppercase;
|
141 |
-
margin-right:
|
142 |
font-weight: 700;
|
143 |
}
|
144 |
.bg-deactivation-survey-popup-container .bg-deactivation-survey-popup-control-buttons-container .bg-deactivation-survey-result-submit .btn-text {
|
68 |
|
69 |
border: 2px solid grey;
|
70 |
border-radius: 50%;
|
71 |
+
width: 16px;
|
72 |
}
|
73 |
.bg-deactivation-survey-popup-container .bg-deactivation-survey-popup-tbl .bg-deactivation-survey-popup-cel .bg-deactivation-survey-popup-content a.bg-deactivation-survey-popup-cancel:hover{
|
74 |
/*color:#fff;
|
138 |
border: none;
|
139 |
font-size: 16px;
|
140 |
text-transform: uppercase;
|
141 |
+
margin-right: 0px;
|
142 |
font-weight: 700;
|
143 |
}
|
144 |
.bg-deactivation-survey-popup-container .bg-deactivation-survey-popup-control-buttons-container .bg-deactivation-survey-result-submit .btn-text {
|
public/fonts/pricingTableFonts.eot
ADDED
Binary file
|
public/fonts/pricingTableFonts.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" ><svg xmlns="http://www.w3.org/2000/svg"><metadata>Generated by Glyphter</metadata><defs><font id="Glyphter" horiz-adv-x="0"><font-face units-per-em="1024" ascent="1024" descent="0" font-family="Glyphter" font-weight="normal" /><missing-glyph horiz-adv-x="0" /><glyph unicode="W" d="M0,554.351C0,554.351,381.49,80.5,381.49,80.5C381.49,80.5,1024,943.873,1024,943.873C1024,943.873,345.349,353.567,345.349,353.567C345.349,353.567,0,554.351,0,554.351C0,554.351,0,554.351,0,554.351" class="icon-Path 16"/><glyph unicode="X" d="M0,628.727C0,628.727,0,396,0,396C0,396,1024,396,1024,396C1024,396,1024,628.727,1024,628.727C1024,628.727,0,628.727,0,628.727" class="icon-Rectangle 29"/></font></defs></svg>
|
public/fonts/pricingTableFonts.ttf
ADDED
Binary file
|
public/fonts/pricingTableFonts.woff
ADDED
Binary file
|
public/include/sidebar.php
CHANGED
@@ -31,59 +31,60 @@
|
|
31 |
}
|
32 |
?>
|
33 |
<div id="sg-sidebar-wrapper" class="metro">
|
34 |
-
<
|
35 |
-
<
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
39 |
<ul>
|
40 |
<li class="<?php echo strpos($page,'backups')?'active':''?>">
|
41 |
-
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_backups'); ?>">
|
42 |
<span class="glyphicon glyphicon-hdd"></span><?php _backupGuardT('Backups')?>
|
43 |
</a>
|
44 |
<span class="sg-action-menu-arrow"></span>
|
45 |
</li>
|
46 |
<li class="<?php echo strpos($page,'cloud')?'active':''?>">
|
47 |
-
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_cloud'); ?>">
|
48 |
<span class="glyphicon glyphicon-cloud" aria-hidden="true"></span><?php _backupGuardT('Cloud')?>
|
49 |
</a>
|
50 |
<span class="sg-action-menu-arrow"></span>
|
51 |
</li>
|
52 |
<?php if (SGBoot::isFeatureAvailable('SCHEDULE')):?>
|
53 |
<li class="<?php echo strpos($page,'schedule')?'active':''?>">
|
54 |
-
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_schedule'); ?>">
|
55 |
<span class="glyphicon glyphicon-time" aria-hidden="true"></span><?php _backupGuardT('Schedule')?>
|
56 |
</a>
|
57 |
<span class="sg-action-menu-arrow"></span>
|
58 |
</li>
|
59 |
<?php endif;?>
|
60 |
<li class="<?php echo strpos($page,'settings')?'active':''?>">
|
61 |
-
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_settings'); ?>">
|
62 |
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span><?php _backupGuardT('Settings')?>
|
63 |
</a>
|
64 |
<span class="sg-action-menu-arrow"></span>
|
65 |
</li>
|
66 |
<li class="<?php echo strpos($page,'system_info')?'active':''?>">
|
67 |
-
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_system_info'); ?>">
|
68 |
<span class="glyphicon glyphicon-equalizer" aria-hidden="true"></span><?php _backupGuardT('System Info.')?>
|
69 |
</a>
|
70 |
<span class="sg-action-menu-arrow"></span>
|
71 |
</li>
|
72 |
<li class="<?php echo strpos($page,'services')?'active':''?>">
|
73 |
-
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_services'); ?>">
|
74 |
<span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span><?php _backupGuardT('Services')?>
|
75 |
</a>
|
76 |
<span class="sg-action-menu-arrow"></span>
|
77 |
</li>
|
78 |
<li class="<?php echo strpos($page,'support')?'active':''?>">
|
79 |
-
<a href="<?php echo $supportUrl; ?>">
|
80 |
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span><?php _backupGuardT('Support')?>
|
81 |
</a>
|
82 |
<span class="sg-action-menu-arrow"></span>
|
83 |
</li>
|
84 |
<?php if (SGBoot::isFeatureAvailable('SHOW_UPGRADE_PAGE')):?>
|
85 |
<li class="<?php echo strpos($page,'pro_features')?'active':''?>">
|
86 |
-
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_pro_features'); ?>">
|
87 |
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span><?php _backupGuardT('Why upgrade?')?>
|
88 |
</a>
|
89 |
<span class="sg-action-menu-arrow"></span>
|
31 |
}
|
32 |
?>
|
33 |
<div id="sg-sidebar-wrapper" class="metro">
|
34 |
+
<a class="sg-site-url" href="<?php echo network_admin_url('admin.php?page=backup_guard_backups'); ?>">
|
35 |
+
<div class="title">
|
36 |
+
<span class="sg-action-menu-arrow"></span>
|
37 |
+
</div>
|
38 |
+
<a class="sg-site-url" target="_blank" href="<?php echo SG_BACKUP_SITE_URL;?>">
|
39 |
+
<nav class="sidebar dark sg-backup-sidebar-nav">
|
40 |
<ul>
|
41 |
<li class="<?php echo strpos($page,'backups')?'active':''?>">
|
42 |
+
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_backups'); ?>" data-page-key="backups">
|
43 |
<span class="glyphicon glyphicon-hdd"></span><?php _backupGuardT('Backups')?>
|
44 |
</a>
|
45 |
<span class="sg-action-menu-arrow"></span>
|
46 |
</li>
|
47 |
<li class="<?php echo strpos($page,'cloud')?'active':''?>">
|
48 |
+
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_cloud'); ?>" data-page-key="cloud">
|
49 |
<span class="glyphicon glyphicon-cloud" aria-hidden="true"></span><?php _backupGuardT('Cloud')?>
|
50 |
</a>
|
51 |
<span class="sg-action-menu-arrow"></span>
|
52 |
</li>
|
53 |
<?php if (SGBoot::isFeatureAvailable('SCHEDULE')):?>
|
54 |
<li class="<?php echo strpos($page,'schedule')?'active':''?>">
|
55 |
+
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_schedule'); ?>" data-page-key="schedule">
|
56 |
<span class="glyphicon glyphicon-time" aria-hidden="true"></span><?php _backupGuardT('Schedule')?>
|
57 |
</a>
|
58 |
<span class="sg-action-menu-arrow"></span>
|
59 |
</li>
|
60 |
<?php endif;?>
|
61 |
<li class="<?php echo strpos($page,'settings')?'active':''?>">
|
62 |
+
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_settings'); ?>" data-page-key="settings">
|
63 |
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span><?php _backupGuardT('Settings')?>
|
64 |
</a>
|
65 |
<span class="sg-action-menu-arrow"></span>
|
66 |
</li>
|
67 |
<li class="<?php echo strpos($page,'system_info')?'active':''?>">
|
68 |
+
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_system_info'); ?>" data-page-key="system_info">
|
69 |
<span class="glyphicon glyphicon-equalizer" aria-hidden="true"></span><?php _backupGuardT('System Info.')?>
|
70 |
</a>
|
71 |
<span class="sg-action-menu-arrow"></span>
|
72 |
</li>
|
73 |
<li class="<?php echo strpos($page,'services')?'active':''?>">
|
74 |
+
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_services'); ?>" data-page-key="services">
|
75 |
<span class="glyphicon glyphicon-briefcase" aria-hidden="true"></span><?php _backupGuardT('Services')?>
|
76 |
</a>
|
77 |
<span class="sg-action-menu-arrow"></span>
|
78 |
</li>
|
79 |
<li class="<?php echo strpos($page,'support')?'active':''?>">
|
80 |
+
<a href="<?php echo $supportUrl; ?>" data-page-key="support">
|
81 |
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span><?php _backupGuardT('Support')?>
|
82 |
</a>
|
83 |
<span class="sg-action-menu-arrow"></span>
|
84 |
</li>
|
85 |
<?php if (SGBoot::isFeatureAvailable('SHOW_UPGRADE_PAGE')):?>
|
86 |
<li class="<?php echo strpos($page,'pro_features')?'active':''?>">
|
87 |
+
<a href="<?php echo network_admin_url('admin.php?page=backup_guard_pro_features'); ?>" data-page-key="pro_features">
|
88 |
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span><?php _backupGuardT('Why upgrade?')?>
|
89 |
</a>
|
90 |
<span class="sg-action-menu-arrow"></span>
|
public/include/uninstallSurveyPopup.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<div class="bg-deactivation-survey-popup-tbl">
|
5 |
<div class="bg-deactivation-survey-popup-cel">
|
6 |
<div class="bg-deactivation-survey-popup-content">
|
7 |
-
<a href="javascript:void(0)" class="bg-deactivation-survey-popup-cancel"><img src="<?php echo SG_IMAGE_URL."close.png" ?>" class="wp_fm_loader"></a>
|
8 |
<div class="bg-deactivation-survey-popup-inner-content">
|
9 |
<h3>We are sorry to see that you intend to</h3>
|
10 |
<h3>deactivate BackupGuard plugin.</h3>
|
@@ -51,7 +51,7 @@
|
|
51 |
</div>
|
52 |
<div class="bg-deactivation-survey-popup-control-buttons-container">
|
53 |
<button class="bg-deactivation-survey-result-submit button button-primary">Submit</button>
|
54 |
-
<button id="bg-skip-and-deactivate" class="bg-deactivation-survey-popup-cancel button button-secondary">Skip and deactivate</button>
|
55 |
</div>
|
56 |
</form>
|
57 |
</div>
|
4 |
<div class="bg-deactivation-survey-popup-tbl">
|
5 |
<div class="bg-deactivation-survey-popup-cel">
|
6 |
<div class="bg-deactivation-survey-popup-content">
|
7 |
+
<a href="javascript:void(0)" class="bg-deactivation-survey-popup-cancel" id="bg-close-and-deactivate"><img src="<?php echo SG_IMAGE_URL."close.png" ?>" class="wp_fm_loader"></a>
|
8 |
<div class="bg-deactivation-survey-popup-inner-content">
|
9 |
<h3>We are sorry to see that you intend to</h3>
|
10 |
<h3>deactivate BackupGuard plugin.</h3>
|
51 |
</div>
|
52 |
<div class="bg-deactivation-survey-popup-control-buttons-container">
|
53 |
<button class="bg-deactivation-survey-result-submit button button-primary">Submit</button>
|
54 |
+
<!-- <button id="bg-skip-and-deactivate" class="bg-deactivation-survey-popup-cancel button button-secondary">Skip and deactivate</button> -->
|
55 |
</div>
|
56 |
</form>
|
57 |
</div>
|
public/js/deactivationSurvey.js
CHANGED
@@ -12,12 +12,14 @@ jQuery("tr[data-slug='backup'] .deactivate a").click(function() {
|
|
12 |
jQuery("#bg-deactivation-survey-popup-container").show();
|
13 |
});
|
14 |
|
|
|
15 |
jQuery('.bg-deactivation-survey-popup-cancel').click(function(e) {
|
16 |
jQuery('.bg-deactivation-survey-popup-container').slideUp();
|
17 |
jQuery('.bg-deactivation-survey-popup-overlay').hide();
|
18 |
});
|
|
|
19 |
|
20 |
-
jQuery("#bg-
|
21 |
event.preventDefault();
|
22 |
|
23 |
var data = {
|
12 |
jQuery("#bg-deactivation-survey-popup-container").show();
|
13 |
});
|
14 |
|
15 |
+
/*
|
16 |
jQuery('.bg-deactivation-survey-popup-cancel').click(function(e) {
|
17 |
jQuery('.bg-deactivation-survey-popup-container').slideUp();
|
18 |
jQuery('.bg-deactivation-survey-popup-overlay').hide();
|
19 |
});
|
20 |
+
*/
|
21 |
|
22 |
+
jQuery("#bg-close-and-deactivate").on("click", function () {
|
23 |
event.preventDefault();
|
24 |
|
25 |
var data = {
|
public/js/main.js
CHANGED
@@ -72,6 +72,32 @@ sgBackup.awake = function(){
|
|
72 |
sgBackup.init = function(){
|
73 |
sgBackup.initModals();
|
74 |
sgBackup.downloadButton();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
};
|
76 |
|
77 |
sgBackup.downloadButton = function()
|
72 |
sgBackup.init = function(){
|
73 |
sgBackup.initModals();
|
74 |
sgBackup.downloadButton();
|
75 |
+
sgBackup.navMenu();
|
76 |
+
};
|
77 |
+
|
78 |
+
sgBackup.navMenu = function ()
|
79 |
+
{
|
80 |
+
var navMenu = jQuery('.sg-backup-sidebar-nav a');
|
81 |
+
|
82 |
+
if (!navMenu.length) {
|
83 |
+
return false;
|
84 |
+
}
|
85 |
+
|
86 |
+
navMenu.bind('click', function (event) {
|
87 |
+
event.preventDefault();
|
88 |
+
sgBackup.init();
|
89 |
+
jQuery('.sg-backup-page-content').addClass('sg-visibility-hidden');
|
90 |
+
jQuery('.sg-backup-sidebar-nav li').removeClass('active');
|
91 |
+
|
92 |
+
var currentKey = jQuery(this).data('page-key');
|
93 |
+
var currentPageContent = jQuery('#sg-backup-page-content-'+currentKey);
|
94 |
+
|
95 |
+
if (!currentPageContent.length) {
|
96 |
+
return false;
|
97 |
+
}
|
98 |
+
jQuery(this).parent().addClass('active');
|
99 |
+
currentPageContent.removeClass('sg-visibility-hidden');
|
100 |
+
});
|
101 |
};
|
102 |
|
103 |
sgBackup.downloadButton = function()
|
public/js/sgbackup.js
CHANGED
@@ -149,7 +149,6 @@ sgBackup.getSelectedBackupsNumber = function() {
|
|
149 |
sgBackup.toggleMultiDeleteButton = function() {
|
150 |
var numberOfChoosenBackups = sgBackup.getSelectedBackupsNumber();
|
151 |
var target = jQuery('#sg-delete-multi-backups');
|
152 |
-
|
153 |
if (numberOfChoosenBackups > 0) {
|
154 |
target.removeAttr('disabled');
|
155 |
}
|
149 |
sgBackup.toggleMultiDeleteButton = function() {
|
150 |
var numberOfChoosenBackups = sgBackup.getSelectedBackupsNumber();
|
151 |
var target = jQuery('#sg-delete-multi-backups');
|
|
|
152 |
if (numberOfChoosenBackups > 0) {
|
153 |
target.removeAttr('disabled');
|
154 |
}
|
public/js/sgcloud.js
CHANGED
@@ -76,7 +76,7 @@ sgBackup.initCloudSwitchButtons = function(){
|
|
76 |
jQuery('.sg-switch').on('switchChange.bootstrapSwitch', function(event, state) {
|
77 |
var storage = jQuery(this).attr('data-storage'),
|
78 |
url = jQuery(this).attr('data-remote');
|
79 |
-
that = jQuery(this);
|
80 |
//If switch is on
|
81 |
if(state) {
|
82 |
jQuery('.alert').remove();
|
@@ -92,7 +92,7 @@ sgBackup.initCloudSwitchButtons = function(){
|
|
92 |
}
|
93 |
else {
|
94 |
var alert = sgBackup.alertGenerator(response.error, 'alert-warning');
|
95 |
-
jQuery('.sg-cloud-container
|
96 |
that.bootstrapSwitch('state', false);
|
97 |
}
|
98 |
}
|
@@ -101,7 +101,7 @@ sgBackup.initCloudSwitchButtons = function(){
|
|
101 |
}
|
102 |
else{
|
103 |
var alert = sgBackup.alertGenerator(response.error, 'alert-danger');
|
104 |
-
jQuery('.sg-cloud-container
|
105 |
that.bootstrapSwitch('state',false);
|
106 |
}
|
107 |
};
|
@@ -267,7 +267,7 @@ sgBackup.initCloudFolderSettings = function(){
|
|
267 |
var alert = sgBackup.alertGenerator(BG_CLOUD_STRINGS.invalidDestinationFolder,'alert-danger');
|
268 |
if(cloudFolderName.length<=0)
|
269 |
{
|
270 |
-
jQuery('.sg-cloud-container
|
271 |
return;
|
272 |
}
|
273 |
saveBtn.attr('disabled','disabled');
|
@@ -275,11 +275,11 @@ sgBackup.initCloudFolderSettings = function(){
|
|
275 |
cloundFolderRequest.callback = function(response){
|
276 |
if(typeof response.success !== 'undefined'){
|
277 |
var successAlert = sgBackup.alertGenerator(BG_CLOUD_STRINGS.successMessage,'alert-success');
|
278 |
-
jQuery('.sg-cloud-container
|
279 |
saveBtn.fadeOut();
|
280 |
}
|
281 |
else{
|
282 |
-
jQuery('.sg-cloud-container
|
283 |
}
|
284 |
saveBtn.removeAttr('disabled');
|
285 |
saveBtn.html('Save');
|
@@ -292,7 +292,7 @@ sgBackup.initCloudFolderSettings = function(){
|
|
292 |
}
|
293 |
else {
|
294 |
var alert = sgBackup.alertGenerator(response.error, 'alert-warning');
|
295 |
-
jQuery('.sg-cloud-container
|
296 |
saveBtn.fadeOut();
|
297 |
}
|
298 |
}
|
76 |
jQuery('.sg-switch').on('switchChange.bootstrapSwitch', function(event, state) {
|
77 |
var storage = jQuery(this).attr('data-storage'),
|
78 |
url = jQuery(this).attr('data-remote');
|
79 |
+
var that = jQuery(this);
|
80 |
//If switch is on
|
81 |
if(state) {
|
82 |
jQuery('.alert').remove();
|
92 |
}
|
93 |
else {
|
94 |
var alert = sgBackup.alertGenerator(response.error, 'alert-warning');
|
95 |
+
jQuery('.sg-cloud-container').before(alert);
|
96 |
that.bootstrapSwitch('state', false);
|
97 |
}
|
98 |
}
|
101 |
}
|
102 |
else{
|
103 |
var alert = sgBackup.alertGenerator(response.error, 'alert-danger');
|
104 |
+
jQuery('.sg-cloud-container').before(alert);
|
105 |
that.bootstrapSwitch('state',false);
|
106 |
}
|
107 |
};
|
267 |
var alert = sgBackup.alertGenerator(BG_CLOUD_STRINGS.invalidDestinationFolder,'alert-danger');
|
268 |
if(cloudFolderName.length<=0)
|
269 |
{
|
270 |
+
jQuery('.sg-cloud-container').before(alert);
|
271 |
return;
|
272 |
}
|
273 |
saveBtn.attr('disabled','disabled');
|
275 |
cloundFolderRequest.callback = function(response){
|
276 |
if(typeof response.success !== 'undefined'){
|
277 |
var successAlert = sgBackup.alertGenerator(BG_CLOUD_STRINGS.successMessage,'alert-success');
|
278 |
+
jQuery('.sg-cloud-container').before(successAlert);
|
279 |
saveBtn.fadeOut();
|
280 |
}
|
281 |
else{
|
282 |
+
jQuery('.sg-cloud-container').before(alert);
|
283 |
}
|
284 |
saveBtn.removeAttr('disabled');
|
285 |
saveBtn.html('Save');
|
292 |
}
|
293 |
else {
|
294 |
var alert = sgBackup.alertGenerator(response.error, 'alert-warning');
|
295 |
+
jQuery('.sg-cloud-container').before(alert);
|
296 |
saveBtn.fadeOut();
|
297 |
}
|
298 |
}
|
public/js/sgschedule.js
CHANGED
@@ -5,7 +5,7 @@ BG_SCHEDULE_INTERVAL_MONTHLY = 3;
|
|
5 |
BG_SCHEDULE_INTERVAL_YEARLY = 4;
|
6 |
|
7 |
jQuery(document).ready( function() {
|
8 |
-
|
9 |
sgBackup.initScheduleCreation();
|
10 |
});
|
11 |
|
@@ -147,9 +147,9 @@ sgBackup.schedule = function(){
|
|
147 |
|
148 |
sgBackup.initScheduleSwitchButtons = function() {
|
149 |
jQuery('.sg-switch').bootstrapSwitch();
|
150 |
-
if(jQuery('.sg-switch').is(':checked'))
|
151 |
{
|
152 |
-
jQuery('.sg-schedule-settings').show();
|
153 |
}
|
154 |
jQuery('.sg-switch').on('switchChange.bootstrapSwitch', function (event, state) {
|
155 |
var url = jQuery(this).attr('data-remote');
|
5 |
BG_SCHEDULE_INTERVAL_YEARLY = 4;
|
6 |
|
7 |
jQuery(document).ready( function() {
|
8 |
+
// sgBackup.initTablePagination();
|
9 |
sgBackup.initScheduleCreation();
|
10 |
});
|
11 |
|
147 |
|
148 |
sgBackup.initScheduleSwitchButtons = function() {
|
149 |
jQuery('.sg-switch').bootstrapSwitch();
|
150 |
+
if(jQuery('#sg-backup-page-content-schedule .sg-switch').is(':checked'))
|
151 |
{
|
152 |
+
jQuery('sg-backup-page-content-schedule .sg-schedule-settings').show();
|
153 |
}
|
154 |
jQuery('.sg-switch').on('switchChange.bootstrapSwitch', function (event, state) {
|
155 |
var url = jQuery(this).attr('data-remote');
|
public/pagesContent.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
require_once(dirname(__FILE__).'/boot.php');
|
3 |
+
require_once(SG_BACKUP_PATH.'SGBackup.php');
|
4 |
+
require_once(SG_PUBLIC_INCLUDE_PATH.'header.php');
|
5 |
+
require_once(SG_PUBLIC_INCLUDE_PATH.'sidebar.php');
|
6 |
+
|
7 |
+
$pluginCapabilities = backupGuardGetCapabilities();
|
8 |
+
?>
|
9 |
+
<div class="sg-top-info"><?php echo backupGuardLoggedMessage(); ?></div>
|
10 |
+
<div id="sg-content-wrapper">
|
11 |
+
<div class="container-fluid">
|
12 |
+
<?php require_once(plugin_dir_path( __FILE__ ).'backups.php'); ?>
|
13 |
+
<?php require_once(plugin_dir_path(__FILE__).'cloud.php'); ?>
|
14 |
+
<?php require_once(plugin_dir_path(__FILE__).'schedule.php'); ?>
|
15 |
+
<?php require_once(plugin_dir_path(__FILE__).'settings.php'); ?>
|
16 |
+
<?php require_once(plugin_dir_path(__FILE__).'systemInfo.php'); ?>
|
17 |
+
<?php require_once(plugin_dir_path(__FILE__).'services.php'); ?>
|
18 |
+
<?php require_once(plugin_dir_path(__FILE__).'support.php'); ?>
|
19 |
+
<?php require_once(plugin_dir_path(__FILE__).'proFeatures.php'); ?>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
<div class="clearfix"></div>
|
23 |
+
<?php
|
24 |
+
require_once(SG_PUBLIC_INCLUDE_PATH.'/footer.php');
|
25 |
+
?>
|
public/proFeatures.php
CHANGED
@@ -1,11 +1,103 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
?>
|
6 |
-
<div id="sg-content-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
</div>
|
10 |
-
<?php require_once(SG_PUBLIC_INCLUDE_PATH . 'footer.php'); ?>
|
11 |
</div>
|
1 |
<?php
|
2 |
+
$contentClassName = getBackupPageContentClassName('pro_features');
|
3 |
+
$optionsAvailability = array();
|
4 |
+
$optionsAvailability['Website Backup & Restore'] = array('free' => 1, 'silver' => 1, 'gold' => 1, 'platinum' => 1);
|
5 |
+
$optionsAvailability['Website Migration'] = array('free' => 0, 'silver' => 1, 'gold' => 1, 'platinum' => 1);
|
6 |
+
$optionsAvailability['Backup to Dropbox (64-bit OS)'] = array('free' => 1, 'silver' => 1, 'gold' => 1, 'platinum' => 1);
|
7 |
+
$optionsAvailability['Backup Download & Import'] = array('free' => 1, 'silver' => 1, 'gold' => 1, 'platinum' => 1);
|
8 |
+
$optionsAvailability['Automatic Backups (single profile)'] = array('free' => 0, 'silver' => 1, 'gold' => 1, 'platinum' => 1);
|
9 |
+
$optionsAvailability['E-mail Notifications'] = array('free' => 0, 'silver' => 1, 'gold' => 1, 'platinum' => 1);
|
10 |
+
$optionsAvailability['Backup to SFTP/FTP'] = array('free' => 0, 'silver' => 1, 'gold' => 1, 'platinum' => 1);
|
11 |
+
/// start Gold
|
12 |
+
$optionsAvailability['Backup to Google Drive'] = array('free' => 0, 'silver' => 0, 'gold' => 1, 'platinum' => 1);
|
13 |
+
$optionsAvailability['Backup to Amazon S3'] = array('free' => 0, 'silver' => 0, 'gold' => 1, 'platinum' => 1);
|
14 |
+
$optionsAvailability['Backup to OneDrive'] = array('free' => 0, 'silver' => 0, 'gold' => 1, 'platinum' => 1);
|
15 |
+
$optionsAvailability['Backup Retention'] = array('free' => 0, 'silver' => 0, 'gold' => 1, 'platinum' => 1);
|
16 |
+
$optionsAvailability['Restore from all Supported Clouds'] = array('free' => 0, 'silver' => 0, 'gold' => 1, 'platinum' => 1);
|
17 |
+
$optionsAvailability['Delete Local Copy after Upload'] = array('free' => 0, 'silver' => 0, 'gold' => 1, 'platinum' => 1);
|
18 |
+
$optionsAvailability['Customize Backup Name'] = array('free' => 0, 'silver' => 0, 'gold' => 1, 'platinum' => 1);
|
19 |
+
// start Platinum
|
20 |
+
$optionsAvailability['Multiple Automatic Backups'] = array('free' => 0, 'silver' => 0, 'gold' => 0, 'platinum' => 1);
|
21 |
+
$optionsAvailability['Multiple Automatic Backups'] = array('free' => 0, 'silver' => 0, 'gold' => 0, 'platinum' => 1);
|
22 |
?>
|
23 |
+
<div id="sg-backup-page-content-pro_features" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
24 |
+
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('Why upgrade?')?></h1></div>
|
25 |
+
<div class="sg-wrap-container sg-pricing-table-wrapper">
|
26 |
+
<h3 class="sg-backup-guard-plans-title"><?php _backupGuardT('Backup Guard Plans')?></h3>
|
27 |
+
<div class="sg-backup-header-row sg-backup-table-row">
|
28 |
+
<div class="col-md-4 sg-pricing-table-header-first-column">
|
29 |
+
<span class="sg-pricing-table-header-label"></span>
|
30 |
+
</div>
|
31 |
+
<div class="col-md-2">
|
32 |
+
<span class="sg-pricing-table-header-label"><?php _backupGuardT('Free'); ?></span>
|
33 |
+
<span class="sg-pricing-table-blue-label"><b><?php _backupGuardT('0'); ?></b> <span class="sg-backup-pricing-currency">US$</span></span>
|
34 |
+
</div>
|
35 |
+
<div class="col-md-2">
|
36 |
+
<span class="sg-pricing-table-header-label"><?php _backupGuardT('Silver'); ?></span>
|
37 |
+
<span class="sg-pricing-table-blue-label"><b><?php _backupGuardT('25'); ?></b> <span class="sg-backup-pricing-currency">US$</span></span>
|
38 |
+
</div>
|
39 |
+
<div class="col-md-2">
|
40 |
+
<span class="sg-pricing-table-header-label"><?php _backupGuardT('Gold'); ?></span>
|
41 |
+
<span class="sg-pricing-table-blue-label"><b><?php _backupGuardT('39'); ?></b> <span class="sg-backup-pricing-currency">US$</span></span>
|
42 |
+
</div>
|
43 |
+
<div class="col-md-2">
|
44 |
+
<span class="sg-pricing-table-header-label"><?php _backupGuardT('Platinum'); ?></span>
|
45 |
+
<span class="sg-pricing-table-blue-label"><b><?php _backupGuardT('99'); ?></b> <span class="sg-backup-pricing-currency">US$</span></span>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
<div class="sg-backup-table-row">
|
49 |
+
<div class="col-md-4">
|
50 |
+
<span class="sg-pricng-table-option"><?php _backupGuardT('Licences:')?></span>
|
51 |
+
</div>
|
52 |
+
<div class="col-md-2" style="text-align: center">
|
53 |
+
<span class="sg-backup-plan-excluded"></span>
|
54 |
+
</div>
|
55 |
+
<div class="col-md-2">
|
56 |
+
<span class="sg-pricing-table-includes"><?php _backupGuardT('Up to 2 Websites')?></span>
|
57 |
+
</div>
|
58 |
+
<div class="col-md-2">
|
59 |
+
<span class="sg-pricing-table-includes"><?php _backupGuardT('Up to 5 Websites')?></span>
|
60 |
+
</div>
|
61 |
+
<div class="col-md-2">
|
62 |
+
<span class="sg-pricing-table-includes"><?php _backupGuardT('Unlimited Websites')?></span>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<div class="sg-backup-table-options-wrapper">
|
66 |
+
<?php foreach ($optionsAvailability as $label => $availability): ?>
|
67 |
+
<div class="sg-backup-table-row">
|
68 |
+
<div class="col-md-4 sg-pricing-table-option-wrapper">
|
69 |
+
<span class="sg-pricing-table-option"><?php _backupGuardT($label); ?></span>
|
70 |
+
</div>
|
71 |
+
<div class="col-md-2">
|
72 |
+
<?php if ($availability['free'] == 1): ?>
|
73 |
+
<span class="sg-backup-plan-included"></span>
|
74 |
+
<?php else: ?>
|
75 |
+
<span class="sg-backup-plan-excluded"></span>
|
76 |
+
<?php endif;?>
|
77 |
+
</div>
|
78 |
+
<div class="col-md-2">
|
79 |
+
<?php if ($availability['silver'] == 1): ?>
|
80 |
+
<span class="sg-backup-plan-included"></span>
|
81 |
+
<?php else: ?>
|
82 |
+
<span class="sg-backup-plan-excluded"></span>
|
83 |
+
<?php endif;?>
|
84 |
+
</div>
|
85 |
+
<div class="col-md-2">
|
86 |
+
<?php if ($availability['gold'] == 1): ?>
|
87 |
+
<span class="sg-backup-plan-included"></span>
|
88 |
+
<?php else: ?>
|
89 |
+
<span class="sg-backup-plan-excluded"></span>
|
90 |
+
<?php endif;?>
|
91 |
+
</div>
|
92 |
+
<div class="col-md-2">
|
93 |
+
<?php if ($availability['platinum'] == 1): ?>
|
94 |
+
<span class="sg-backup-plan-included"></span>
|
95 |
+
<?php else: ?>
|
96 |
+
<span class="sg-backup-plan-excluded"></span>
|
97 |
+
<?php endif;?>
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
<?php endforeach;?>
|
101 |
+
</div>
|
102 |
</div>
|
|
|
103 |
</div>
|
public/schedule.php
CHANGED
@@ -1,9 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
require_once(dirname(__FILE__).'/boot.php');
|
4 |
-
require_once(SG_PUBLIC_INCLUDE_PATH.'header.php');
|
5 |
-
require_once(SG_BACKUP_PATH.'SGBackup.php');
|
6 |
-
|
7 |
$id = '';
|
8 |
$directories = SG_BACKUP_FILE_PATHS;
|
9 |
$directories = explode(',', $directories);
|
@@ -20,162 +16,158 @@ $sgb = new SGBackup();
|
|
20 |
$scheduleParams = $sgb->getScheduleParamsById(SG_SCHEDULER_DEFAULT_ID);
|
21 |
$scheduleParams = backupGuardParseBackupOptions($scheduleParams);
|
22 |
?>
|
23 |
-
<?php
|
24 |
-
<div
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
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 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
</form>
|
177 |
-
</div>
|
178 |
-
</div>
|
179 |
-
</div>
|
180 |
-
<?php require_once(SG_PUBLIC_INCLUDE_PATH.'/footer.php'); ?>
|
181 |
</div>
|
|
1 |
<?php
|
2 |
+
$contentClassName = getBackupPageContentClassName('schedule');
|
|
|
|
|
|
|
|
|
3 |
$id = '';
|
4 |
$directories = SG_BACKUP_FILE_PATHS;
|
5 |
$directories = explode(',', $directories);
|
16 |
$scheduleParams = $sgb->getScheduleParamsById(SG_SCHEDULER_DEFAULT_ID);
|
17 |
$scheduleParams = backupGuardParseBackupOptions($scheduleParams);
|
18 |
?>
|
19 |
+
<div id="sg-backup-page-content-schedule" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
20 |
+
<div class="row sg-schedule-container">
|
21 |
+
<div class="col-md-12">
|
22 |
+
<form class="form-horizontal" method="post" data-sgform="ajax" data-type="schedule">
|
23 |
+
<fieldset>
|
24 |
+
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('Schedule settings')?></h1></div>
|
25 |
+
<?php if (!SGBoot::isFeatureAvailable('MULTI_SCHEDULE')): ?>
|
26 |
+
<div class="form-group">
|
27 |
+
<div class="col-md-12 sg-feature-alert-text">
|
28 |
+
<?php _backupGuardT('*Multiple schedule profiles are available only in')?> <a href="<?php echo SG_BACKUP_SITE_PRICING_URL?>" target="_blank"><?php _backupGuardT('Platinum')?></a> <?php _backupGuardT('version.')?>
|
29 |
+
</div>
|
30 |
+
</div>
|
31 |
+
<?php endif; ?>
|
32 |
+
<div class="form-group">
|
33 |
+
<label class="col-md-8 sg-control-label">
|
34 |
+
<?php _backupGuardT('Scheduled backup')?>
|
35 |
+
</label>
|
36 |
+
<div class="col-md-3 pull-right text-right">
|
37 |
+
<label class="sg-switch-container">
|
38 |
+
<input type="checkbox" class="sg-switch" <?php echo strlen($scheduleParams['label'])?'checked':''?> data-remote="schedule">
|
39 |
+
</label>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<div class="sg-schedule-settings sg-schedule-settings-<?php echo strlen($scheduleParams['label'])?'opened':'closed'; ?>">
|
43 |
+
<div class="form-group">
|
44 |
+
<label class="col-md-4 sg-control-label" for="sg-schedule-label"><?php _backupGuardT('Schedule label')?></label>
|
45 |
+
<div class="col-md-8">
|
46 |
+
<input class="form-control sg-backup-input" name="sg-schedule-label" id="sg-schedule-label" value="<?php echo esc_html($scheduleParams['label'])?>">
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
<!-- Schedule interval -->
|
50 |
+
<div class="form-group">
|
51 |
+
<label class="col-md-4 sg-control-label" for="sg-schedule-interval"><?php _backupGuardT('Perform backup every')?></label>
|
52 |
+
<div class="col-md-8">
|
53 |
+
<?php echo selectElement($intervalSelectElement, array('id'=>'sg-schedule-interval', 'name'=>'scheduleInterval', 'class'=>'form-control'), '', esc_html($scheduleParams['interval']));?>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<!-- Schedule options -->
|
57 |
+
<div class="form-group sg-custom-backup-schedule">
|
58 |
+
<div class="col-md-8 col-md-offset-4">
|
59 |
+
<div class="radio sg-no-padding-top">
|
60 |
+
<label for="fullbackup-radio">
|
61 |
+
<input type="radio" name="backupType" id="fullbackup-radio" value="1" checked>
|
62 |
+
<?php _backupGuardT('Full backup'); ?>
|
63 |
+
</label>
|
64 |
+
</div>
|
65 |
+
<div class="radio sg-no-padding-top">
|
66 |
+
<label for="custombackup-radio">
|
67 |
+
<input type="radio" name="backupType" id="custombackup-radio" value="2" <?php echo $scheduleParams['isCustomBackup']?'checked':'' ?>>
|
68 |
+
<?php _backupGuardT('Custom backup'); ?>
|
69 |
+
</label>
|
70 |
+
</div>
|
71 |
+
<div class="col-md-12 sg-custom-backup <?php echo $scheduleParams['isCustomBackup']?'sg-open':'' ?>">
|
72 |
+
<div class="checkbox">
|
73 |
+
<label for="custombackupdb-chbx">
|
74 |
+
<input type="checkbox" name="backupDatabase" class="sg-custom-option" id="custombackupdb-chbx" <?php echo $scheduleParams['isDatabaseSelected']?'checked':'' ?>>
|
75 |
+
<span class="sg-checkbox-label-text"><?php _backupGuardT('Backup database'); ?></span>
|
76 |
+
</label>
|
77 |
+
</div>
|
78 |
+
<div class="checkbox">
|
79 |
+
<label for="custombackupfiles-chbx">
|
80 |
+
<input type="checkbox" name="backupFiles" class="sg-custom-option" id="custombackupfiles-chbx" <?php echo $scheduleParams['isFilesSelected']?'checked':'' ?>>
|
81 |
+
<span class="sg-checkbox-label-text"><?php _backupGuardT('Backup files'); ?></span>
|
82 |
+
</label>
|
83 |
+
<!--Files-->
|
84 |
+
<div class="col-md-12 sg-checkbox sg-custom-backup-files <?php echo $scheduleParams['isFilesSelected']?'sg-open':'' ?>">
|
85 |
+
<?php foreach ($directories as $directory): ?>
|
86 |
+
<div class="checkbox">
|
87 |
+
<label for="<?php echo 'sg'.$directory?>">
|
88 |
+
<input type="checkbox" name="directory[]" id="<?php echo 'sg'.$directory;?>" value="<?php echo $directory;?>" <?php if($directory == 'wp-content' && in_array($directory, $scheduleParams['selectedDirectories'])){ echo 'checked=checked'; } elseif ($directory != 'wp-content' && !in_array($directory, $scheduleParams['excludeDirectories'])){ echo 'checked=checked'; } ?> >
|
89 |
+
<?php echo basename($directory);?>
|
90 |
+
</label>
|
91 |
+
</div>
|
92 |
+
<?php endforeach;?>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
<div class="clearfix"></div>
|
97 |
+
<!--Cloud-->
|
98 |
+
<?php if(SGBoot::isFeatureAvailable('STORAGE')): ?>
|
99 |
+
<div class="checkbox">
|
100 |
+
<label for="custombackupcloud-chbx">
|
101 |
+
<input type="checkbox" name="backupCloud" id="custombackupcloud-chbx" <?php echo count($scheduleParams['selectedClouds'])?'checked':''?>>
|
102 |
+
<span class="sg-checkbox-label-text"><?php _backupGuardT('Upload to cloud'); ?></span>
|
103 |
+
</label>
|
104 |
+
<!--Storages-->
|
105 |
+
<div class="col-md-12 sg-checkbox sg-custom-backup-cloud <?php echo count($scheduleParams['selectedClouds'])?'sg-open':'';?>">
|
106 |
+
<?php if(SGBoot::isFeatureAvailable('FTP')): ?>
|
107 |
+
<div class="checkbox">
|
108 |
+
<label for="cloud-ftp" <?php echo empty($ftp)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('FTP is not active.',true).'"':''?>>
|
109 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-ftp" value="<?php echo SG_STORAGE_FTP ?>" <?php echo in_array(SG_STORAGE_FTP, $scheduleParams['selectedClouds'])?'checked="checked"':''?> <?php echo empty($ftp)?'disabled="disabled"':''?>>
|
110 |
+
<span class="sg-checkbox-label-text"><?php echo 'FTP' ?></span>
|
111 |
+
</label>
|
112 |
+
</div>
|
113 |
+
<?php endif; ?>
|
114 |
+
<?php if(SGBoot::isFeatureAvailable('DROPBOX')): ?>
|
115 |
+
<div class="checkbox">
|
116 |
+
<label for="cloud-dropbox" <?php echo empty($dropbox)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('Dropbox is not active.',true).'"':''?>>
|
117 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-dropbox" value="<?php echo SG_STORAGE_DROPBOX ?>" <?php echo in_array(SG_STORAGE_DROPBOX, $scheduleParams['selectedClouds'])?'checked="checked"':''?> <?php echo empty($dropbox)?'disabled="disabled"':''?>>
|
118 |
+
<span class="sg-checkbox-label-text"><?php echo 'Dropbox' ?></span>
|
119 |
+
</label>
|
120 |
+
</div>
|
121 |
+
<?php endif; ?>
|
122 |
+
<?php if(SGBoot::isFeatureAvailable('GOOGLE_DRIVE')): ?>
|
123 |
+
<div class="checkbox">
|
124 |
+
<label for="cloud-gdrive" <?php echo empty($gdrive)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('Google Drive is not active.',true).'"':''?>>
|
125 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-gdrive" value="<?php echo SG_STORAGE_GOOGLE_DRIVE?>" <?php echo in_array(SG_STORAGE_GOOGLE_DRIVE, $scheduleParams['selectedClouds'])?'checked="checked"':''?> <?php echo empty($gdrive)?'disabled="disabled"':''?>>
|
126 |
+
<span class="sg-checkbox-label-text"><?php echo 'Google Drive' ?></span>
|
127 |
+
</label>
|
128 |
+
</div>
|
129 |
+
<?php endif; ?>
|
130 |
+
<?php if(SGBoot::isFeatureAvailable('AMAZON')): ?>
|
131 |
+
<div class="checkbox">
|
132 |
+
<label for="cloud-amazon" <?php echo empty($amazon)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('Amazon S3 Drive is not active.',true).'"':''?>>
|
133 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-amazon" value="<?php echo SG_STORAGE_AMAZON?>" <?php echo in_array(SG_STORAGE_AMAZON, $scheduleParams['selectedClouds'])?'checked="checked"':''?> <?php echo empty($amazon)?'disabled="disabled"':''?>>
|
134 |
+
<span class="sg-checkbox-label-text"><?php echo 'Amazon S3' ?></span>
|
135 |
+
</label>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
<?php if(SGBoot::isFeatureAvailable('ONE_DRIVE')): ?>
|
139 |
+
<div class="checkbox">
|
140 |
+
<label for="cloud-one-drive" <?php echo empty($oneDrive)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('One Drive is not active.', true).'"':''?>>
|
141 |
+
<input type="checkbox" name="backupStorages[]" id="cloud-one-drive" value="<?php echo SG_STORAGE_ONE_DRIVE?>" <?php echo in_array(SG_STORAGE_ONE_DRIVE, $scheduleParams['selectedClouds'])?'checked="checked"':''?> <?php echo empty($oneDrive)?'disabled="disabled"':''?>>
|
142 |
+
<span class="sg-checkbox-label-text"><?php echo 'One Drive' ?></span>
|
143 |
+
</label>
|
144 |
+
</div>
|
145 |
+
<?php endif;?>
|
146 |
+
</div>
|
147 |
+
<div class="clearfix"></div>
|
148 |
+
</div>
|
149 |
+
<?php endif; ?>
|
150 |
+
<!-- Background mode -->
|
151 |
+
<?php if(SGBoot::isFeatureAvailable('BACKGROUND_MODE')): ?>
|
152 |
+
<div class="checkbox">
|
153 |
+
<label for="background-chbx">
|
154 |
+
<input type="checkbox" name="backgroundMode" id="background-chbx" <?php echo $scheduleParams['isBackgroundMode']?'checked':''?>>
|
155 |
+
<span class="sg-checkbox-label-text"><?php _backupGuardT('Background mode'); ?></span>
|
156 |
+
</label>
|
157 |
+
</div>
|
158 |
+
<?php endif;?>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
<!-- Button (Double) -->
|
162 |
+
<div class="form-group">
|
163 |
+
<label class="col-md-4 sg-control-label" for="button1id"></label>
|
164 |
+
<div class="col-md-8">
|
165 |
+
<button type="button" id="sg-save-schedule" onclick="sgBackup.schedule()" class="btn btn-success pull-right"><?php _backupGuardT('Save');?></button>
|
166 |
+
</div>
|
167 |
+
</div>
|
168 |
+
</div>
|
169 |
+
</fieldset>
|
170 |
+
</form>
|
171 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
172 |
</div>
|
173 |
+
</div>
|
public/services.php
CHANGED
@@ -2,67 +2,62 @@
|
|
2 |
require_once(dirname(__FILE__).'/boot.php');
|
3 |
require_once(SG_PUBLIC_INCLUDE_PATH.'header.php');
|
4 |
?>
|
5 |
-
<?php
|
6 |
-
<div class="sg-
|
7 |
-
<div
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
16 |
</div>
|
17 |
-
<div class="
|
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 |
-
<?php _backupGuardT('Refactoring of all file names and image paths')?>
|
44 |
-
</p>
|
45 |
-
<p class="sg-migration-features">
|
46 |
-
<span class="sg-right-arrow sg-services-arrow"></span>
|
47 |
-
<?php _backupGuardT('Serialized data refactoring')?>
|
48 |
-
</p>
|
49 |
-
</div>
|
50 |
</div>
|
51 |
</div>
|
52 |
</div>
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
</
|
61 |
-
</
|
62 |
</div>
|
63 |
</div>
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
</div>
|
2 |
require_once(dirname(__FILE__).'/boot.php');
|
3 |
require_once(SG_PUBLIC_INCLUDE_PATH.'header.php');
|
4 |
?>
|
5 |
+
<div id="sg-backup-page-content-services" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
6 |
+
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('Special services')?></h1></div>
|
7 |
+
<div class="sg-service-container">
|
8 |
+
<div class="plugin-card-top">
|
9 |
+
<div class="row">
|
10 |
+
<div class="col-md-3">
|
11 |
+
<div class="sg-migration-icon"></div>
|
12 |
+
<!-- <img src="<?php echo SG_PUBLIC_URL."img/wordPress-migration-service-product.png"?>" class="" alt=""> -->
|
13 |
+
</div>
|
14 |
+
<div class="col-md-7 sg-migration-info">
|
15 |
+
<div class="column-name">
|
16 |
+
<h1>
|
17 |
+
<a href="<?php echo SG_MIGRATION_SERVICE_URL?>" class="thickbox" target="_blank"><?php _backupGuardT('WordPress'); ?> <b><?php _backupGuardT('Migration Service'); ?></b></a>
|
18 |
+
</h1>
|
19 |
</div>
|
20 |
+
<div class="column-description">
|
21 |
+
<p class="column-description-p"><?php _backupGuardT('Our professionals will migrate all of your files and database and ensure <br> everything is working properly on your new server. With our migration service, you can expect:')?></p>
|
22 |
+
<div class="row">
|
23 |
+
<div class="col-md-5">
|
24 |
+
<p class="sg-migration-features">
|
25 |
+
<span class="sg-right-arrow sg-services-arrow"></span>
|
26 |
+
<?php _backupGuardT('Migration of your files')?>
|
27 |
+
</p>
|
28 |
+
<p class="sg-migration-features">
|
29 |
+
<span class="sg-right-arrow sg-services-arrow"></span>
|
30 |
+
<?php _backupGuardT('Migration of your database')?>
|
31 |
+
</p>
|
32 |
+
<p class="sg-migration-features">
|
33 |
+
<span class="sg-right-arrow sg-services-arrow"></span>
|
34 |
+
<?php _backupGuardT('Refactoring of all urls')?>
|
35 |
+
</p>
|
36 |
+
</div>
|
37 |
+
<div class="col-md-7">
|
38 |
+
<p class="sg-migration-features">
|
39 |
+
<span class="sg-right-arrow sg-services-arrow"></span>
|
40 |
+
<?php _backupGuardT('Refactoring of all file names and image paths')?>
|
41 |
+
</p>
|
42 |
+
<p class="sg-migration-features">
|
43 |
+
<span class="sg-right-arrow sg-services-arrow"></span>
|
44 |
+
<?php _backupGuardT('Serialized data refactoring')?>
|
45 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
</div>
|
47 |
</div>
|
48 |
</div>
|
49 |
+
</div>
|
50 |
+
<div class="col-md-2 sg-migration-right-column">
|
51 |
+
<div class="migration-price-wrapper">
|
52 |
+
<ul class="sg-migration-price-ul">
|
53 |
+
<li><p id="sg-migration-service-price">$<b>84.95</b></p></li>
|
54 |
+
<li>
|
55 |
+
<a class="btn btn-success" target="_blank" data-slug="" href="<?php echo SG_MIGRATION_SERVICE_URL?>" aria-label="" data-name=""><?php _backupGuardT('Order now')?></a>
|
56 |
+
</li>
|
57 |
+
</ul>
|
58 |
</div>
|
59 |
</div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
</div>
|
|
public/settings.php
CHANGED
@@ -24,203 +24,199 @@ $backupFileNamePrefix = esc_html($backupFileNamePrefix);
|
|
24 |
|
25 |
$sgBackgroundReloadMethod = SGConfig::get('SG_BACKGROUND_RELOAD_METHOD');
|
26 |
$ftpPassiveMode = SGConfig::get('SG_FTP_PASSIVE_MODE');
|
|
|
27 |
?>
|
28 |
-
<?php
|
29 |
-
<div class="sg-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
<
|
36 |
-
<
|
37 |
-
|
38 |
-
|
39 |
-
<
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
<div class="col-md-3 text-left">
|
46 |
-
<label class="sg-switch-container">
|
47 |
-
<input type="checkbox" name="sgIsEmailNotification" class="sg-switch sg-email-switch" sgFeatureName="NOTIFICATIONS" <?php echo $isNotificationEnabled?'checked="checked"':''?> data-remote="settings">
|
48 |
-
</label>
|
49 |
-
</div>
|
50 |
-
</div>
|
51 |
-
<div class="sg-general-settings">
|
52 |
-
<div class="form-group">
|
53 |
-
<label class="col-md-3 sg-control-label" for="sg-email"><?php _backupGuardT('Enter email')?></label>
|
54 |
-
<div class="col-md-5">
|
55 |
-
<input id="sg-email" name="sgUserEmail" type="text" placeholder="<?php _backupGuardT('You can enter multiple emails, just separate them with comma')?>" class="form-control input-md sg-backup-input" value="<?php echo @$userEmail?>">
|
56 |
-
</div>
|
57 |
-
</div>
|
58 |
-
</div>
|
59 |
-
<?php endif; ?>
|
60 |
-
<div class="form-group">
|
61 |
-
<label class="col-md-3 sg-control-label">
|
62 |
-
<?php _backupGuardT('Reloads enabled'); ?>
|
63 |
</label>
|
64 |
-
<div class="col-md-3 text-left">
|
65 |
-
<label class="sg-switch-container">
|
66 |
-
<input type="checkbox" name="backup-with-reloadings" class="sg-switch" <?php echo $isReloadingsEnabled?'checked="checked"':''?>>
|
67 |
-
</label>
|
68 |
-
</div>
|
69 |
</div>
|
70 |
-
|
71 |
-
|
72 |
-
<label class="col-md-3 sg-control-label">
|
73 |
-
<?php _backupGuardT('Delete local backup after upload'); ?>
|
74 |
-
</label>
|
75 |
-
<div class="col-md-3 text-left">
|
76 |
-
<label class="sg-switch-container">
|
77 |
-
<input type="checkbox" name="delete-backup-after-upload" sgFeatureName="DELETE_LOCAL_BACKUP_AFTER_UPLOAD" class="sg-switch" <?php echo $isDeleteBackupAfterUploadEnabled?'checked="checked"':''?>>
|
78 |
-
</label>
|
79 |
-
</div>
|
80 |
-
</div>
|
81 |
-
<?php endif; ?>
|
82 |
-
<?php if (SGBoot::isFeatureAvailable('ALERT_BEFORE_UPDATE')): ?>
|
83 |
-
<div class="form-group">
|
84 |
-
<label class="col-md-3 sg-control-label">
|
85 |
-
<?php _backupGuardT('Alert before update'); ?>
|
86 |
-
</label>
|
87 |
-
<div class="col-md-3 text-left">
|
88 |
-
<label class="sg-switch-container">
|
89 |
-
<input type="checkbox" name="alert-before-update" sgFeatureName="ALERT_BEFORE_UPDATE" class="sg-switch" <?php echo $isAlertBeforeUpdateEnabled?'checked="checked"':''?>>
|
90 |
-
</label>
|
91 |
-
</div>
|
92 |
-
</div>
|
93 |
-
<?php endif; ?>
|
94 |
-
<?php if (SGBoot::isFeatureAvailable('BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD')): ?>
|
95 |
-
<div class="form-group">
|
96 |
-
<label class="col-md-3 sg-control-label">
|
97 |
-
<?php _backupGuardT('Backup deletion will also delete from cloud'); ?>
|
98 |
-
</label>
|
99 |
-
<div class="col-md-3 text-left">
|
100 |
-
<label class="sg-switch-container">
|
101 |
-
<input type="checkbox" name="delete-backup-from-cloud" sgFeatureName="BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD" class="sg-switch" <?php echo $isDeleteBackupFromCloudEnabled?'checked="checked"':''?>>
|
102 |
-
</label>
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
<?php endif; ?>
|
106 |
<div class="form-group">
|
107 |
-
<label class="col-md-3 sg-control-label">
|
108 |
-
|
109 |
-
|
110 |
-
<div class="col-md-3 text-left">
|
111 |
-
<label class="sg-switch-container">
|
112 |
-
<input type="checkbox" name="show-statistics-widget" class="sg-switch" <?php echo $isShowStatisticsWidgetEnabled?'checked="checked"':''?>>
|
113 |
-
</label>
|
114 |
</div>
|
115 |
</div>
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
</div>
|
138 |
-
</div>
|
139 |
-
<?php endif; ?>
|
140 |
-
<div class="form-group">
|
141 |
-
<label class="col-md-3 sg-control-label">
|
142 |
-
<?php _backupGuardT('Download via PHP'); ?>
|
143 |
-
</label>
|
144 |
-
<div class="col-md-3 text-left">
|
145 |
-
<label class="sg-switch-container">
|
146 |
-
<input type="checkbox" name="sg-download-via-php" sgFeatureName="DOWNLOAD_VIA_PHP" class="sg-switch" <?php echo $isDownloadViaPhp?'checked="checked"':''?>>
|
147 |
-
</label>
|
148 |
-
</div>
|
149 |
-
</div>
|
150 |
-
|
151 |
-
<div class="form-group">
|
152 |
-
<label class="col-md-3 sg-control-label" for='sg-paths-to-exclude'><?php _backupGuardT("Exclude paths (separated by commas)")?></label>
|
153 |
-
<div class="col-md-5 text-left">
|
154 |
-
<input class="form-control sg-backup-input" id='sg-paths-to-exclude' name='sg-paths-to-exclude' type="text" value="<?php echo SGConfig::get('SG_PATHS_TO_EXCLUDE')?SGConfig::get('SG_PATHS_TO_EXCLUDE'):''?>" placeholder="e.g. wp-content/cache, wp-content/w3tc-cache">
|
155 |
-
</div>
|
156 |
</div>
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
163 |
</div>
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
<label class="col-md-3 sg-control-label" for='sg-number-of-rows-to-backup'><?php _backupGuardT("Number of rows to backup at once")?></label>
|
176 |
-
<div class="col-md-5 text-left">
|
177 |
-
<input class="form-control sg-backup-input" id='sg-number-of-rows-to-backup' name='sg-number-of-rows-to-backup' type="text" value="<?php echo (int)SGConfig::get('SG_BACKUP_DATABASE_INSERT_LIMIT')?(int)SGConfig::get('SG_BACKUP_DATABASE_INSERT_LIMIT'):SG_BACKUP_DATABASE_INSERT_LIMIT?>">
|
178 |
-
</div>
|
179 |
</div>
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
</div>
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
<div class="form-group">
|
203 |
-
<label class="col-md-3 sg-control-label" for="sg-email"><?php _backupGuardT('Request frequency')?></label>
|
204 |
-
<div class="col-md-5">
|
205 |
-
<?php echo selectElement($intervalSelectElement, array('id'=>'sg-ajax-interval', 'name'=>'ajaxInterval', 'class'=>'form-control'), '', $selectedInterval);?>
|
206 |
-
</div>
|
207 |
</div>
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
</div>
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
</div>
|
220 |
-
</
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
</div>
|
225 |
-
<?php require_once(SG_PUBLIC_INCLUDE_PATH . '/footer.php'); ?>
|
226 |
</div>
|
|
24 |
|
25 |
$sgBackgroundReloadMethod = SGConfig::get('SG_BACKGROUND_RELOAD_METHOD');
|
26 |
$ftpPassiveMode = SGConfig::get('SG_FTP_PASSIVE_MODE');
|
27 |
+
$contentClassName = getBackupPageContentClassName('settings');
|
28 |
?>
|
29 |
+
<div id="sg-backup-page-content-settings" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
30 |
+
<div class="row sg-settings-container">
|
31 |
+
<div class="col-md-12">
|
32 |
+
<form class="form-horizontal" method="post" data-sgform="ajax" data-type="sgsettings">
|
33 |
+
<fieldset>
|
34 |
+
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('General settings')?></h1></div>
|
35 |
+
<?php if (SGBoot::isFeatureAvailable('NOTIFICATIONS')): ?>
|
36 |
+
<div class="form-group">
|
37 |
+
<label class="col-md-3 sg-control-label">
|
38 |
+
<?php _backupGuardT('Email notifications'); ?>
|
39 |
+
<?php if(!empty($userEmail)): ?>
|
40 |
+
<br/><span class="text-muted sg-user-email sg-helper-block"><?php echo esc_html($userEmail); ?></span>
|
41 |
+
<?php endif?>
|
42 |
+
</label>
|
43 |
+
<div class="col-md-3 text-left">
|
44 |
+
<label class="sg-switch-container">
|
45 |
+
<input type="checkbox" name="sgIsEmailNotification" class="sg-switch sg-email-switch" sgFeatureName="NOTIFICATIONS" <?php echo $isNotificationEnabled?'checked="checked"':''?> data-remote="settings">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
</label>
|
|
|
|
|
|
|
|
|
|
|
47 |
</div>
|
48 |
+
</div>
|
49 |
+
<div class="sg-general-settings">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<div class="form-group">
|
51 |
+
<label class="col-md-3 sg-control-label" for="sg-email"><?php _backupGuardT('Enter email')?></label>
|
52 |
+
<div class="col-md-5">
|
53 |
+
<input id="sg-email" name="sgUserEmail" type="text" placeholder="<?php _backupGuardT('You can enter multiple emails, just separate them with comma')?>" class="form-control input-md sg-backup-input" value="<?php echo @$userEmail?>">
|
|
|
|
|
|
|
|
|
54 |
</div>
|
55 |
</div>
|
56 |
+
</div>
|
57 |
+
<?php endif; ?>
|
58 |
+
<div class="form-group">
|
59 |
+
<label class="col-md-3 sg-control-label">
|
60 |
+
<?php _backupGuardT('Reloads enabled'); ?>
|
61 |
+
</label>
|
62 |
+
<div class="col-md-3 text-left">
|
63 |
+
<label class="sg-switch-container">
|
64 |
+
<input type="checkbox" name="backup-with-reloadings" class="sg-switch" <?php echo $isReloadingsEnabled?'checked="checked"':''?>>
|
65 |
+
</label>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
<?php if (SGBoot::isFeatureAvailable('DELETE_LOCAL_BACKUP_AFTER_UPLOAD')): ?>
|
69 |
+
<div class="form-group">
|
70 |
+
<label class="col-md-3 sg-control-label">
|
71 |
+
<?php _backupGuardT('Delete local backup after upload'); ?>
|
72 |
+
</label>
|
73 |
+
<div class="col-md-3 text-left">
|
74 |
+
<label class="sg-switch-container">
|
75 |
+
<input type="checkbox" name="delete-backup-after-upload" sgFeatureName="DELETE_LOCAL_BACKUP_AFTER_UPLOAD" class="sg-switch" <?php echo $isDeleteBackupAfterUploadEnabled?'checked="checked"':''?>>
|
76 |
+
</label>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
</div>
|
78 |
+
</div>
|
79 |
+
<?php endif; ?>
|
80 |
+
<?php if (SGBoot::isFeatureAvailable('ALERT_BEFORE_UPDATE')): ?>
|
81 |
+
<div class="form-group">
|
82 |
+
<label class="col-md-3 sg-control-label">
|
83 |
+
<?php _backupGuardT('Alert before update'); ?>
|
84 |
+
</label>
|
85 |
+
<div class="col-md-3 text-left">
|
86 |
+
<label class="sg-switch-container">
|
87 |
+
<input type="checkbox" name="alert-before-update" sgFeatureName="ALERT_BEFORE_UPDATE" class="sg-switch" <?php echo $isAlertBeforeUpdateEnabled?'checked="checked"':''?>>
|
88 |
+
</label>
|
89 |
</div>
|
90 |
+
</div>
|
91 |
+
<?php endif; ?>
|
92 |
+
<?php if (SGBoot::isFeatureAvailable('BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD')): ?>
|
93 |
+
<div class="form-group">
|
94 |
+
<label class="col-md-3 sg-control-label">
|
95 |
+
<?php _backupGuardT('Backup deletion will also delete from cloud'); ?>
|
96 |
+
</label>
|
97 |
+
<div class="col-md-3 text-left">
|
98 |
+
<label class="sg-switch-container">
|
99 |
+
<input type="checkbox" name="delete-backup-from-cloud" sgFeatureName="BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD" class="sg-switch" <?php echo $isDeleteBackupFromCloudEnabled?'checked="checked"':''?>>
|
100 |
+
</label>
|
|
|
|
|
|
|
|
|
101 |
</div>
|
102 |
+
</div>
|
103 |
+
<?php endif; ?>
|
104 |
+
<div class="form-group">
|
105 |
+
<label class="col-md-3 sg-control-label">
|
106 |
+
<?php _backupGuardT('Show statistics'); ?>
|
107 |
+
</label>
|
108 |
+
<div class="col-md-3 text-left">
|
109 |
+
<label class="sg-switch-container">
|
110 |
+
<input type="checkbox" name="show-statistics-widget" class="sg-switch" <?php echo $isShowStatisticsWidgetEnabled?'checked="checked"':''?>>
|
111 |
+
</label>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
<?php if (SGBoot::isFeatureAvailable('FTP')): ?>
|
115 |
+
<div class="form-group">
|
116 |
+
<label class="col-md-3 sg-control-label">
|
117 |
+
<?php _backupGuardT('FTP passive mode'); ?>
|
118 |
+
</label>
|
119 |
+
<div class="col-md-3 text-left">
|
120 |
+
<label class="sg-switch-container">
|
121 |
+
<input type="checkbox" name="ftp-passive-mode" sgFeatureName="FTP" class="sg-switch" <?php echo $ftpPassiveMode?'checked="checked"':''?>>
|
122 |
+
</label>
|
123 |
</div>
|
124 |
+
</div>
|
125 |
+
<?php endif; ?>
|
126 |
+
<?php if (SGBoot::isFeatureAvailable('MULTI_SCHEDULE')): ?>
|
127 |
+
<div class="form-group">
|
128 |
+
<label class="col-md-3 sg-control-label">
|
129 |
+
<?php _backupGuardT('Disable ads'); ?>
|
130 |
+
</label>
|
131 |
+
<div class="col-md-3 text-left">
|
132 |
+
<label class="sg-switch-container">
|
133 |
+
<input type="checkbox" name="sg-hide-ads" sgFeatureName="HIDE_ADS" class="sg-switch" <?php echo $isDisabelAdsEnabled?'checked="checked"':''?>>
|
134 |
+
</label>
|
|
|
|
|
|
|
|
|
|
|
135 |
</div>
|
136 |
+
</div>
|
137 |
+
<?php endif; ?>
|
138 |
+
<div class="form-group">
|
139 |
+
<label class="col-md-3 sg-control-label">
|
140 |
+
<?php _backupGuardT('Download via PHP'); ?>
|
141 |
+
</label>
|
142 |
+
<div class="col-md-3 text-left">
|
143 |
+
<label class="sg-switch-container">
|
144 |
+
<input type="checkbox" name="sg-download-via-php" sgFeatureName="DOWNLOAD_VIA_PHP" class="sg-switch" <?php echo $isDownloadViaPhp?'checked="checked"':''?>>
|
145 |
+
</label>
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
|
149 |
+
<div class="form-group">
|
150 |
+
<label class="col-md-3 sg-control-label" for='sg-paths-to-exclude'><?php _backupGuardT("Exclude paths (separated by commas)")?></label>
|
151 |
+
<div class="col-md-5 text-left">
|
152 |
+
<input class="form-control sg-backup-input" id='sg-paths-to-exclude' name='sg-paths-to-exclude' type="text" value="<?php echo SGConfig::get('SG_PATHS_TO_EXCLUDE')?SGConfig::get('SG_PATHS_TO_EXCLUDE'):''?>" placeholder="e.g. wp-content/cache, wp-content/w3tc-cache">
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
|
156 |
+
<div class="form-group">
|
157 |
+
<label class="col-md-3 sg-control-label" for='sg-tables-to-exclude'><?php _backupGuardT("Tables to exclude (separated by commas)")?></label>
|
158 |
+
<div class="col-md-5 text-left">
|
159 |
+
<input class="form-control sg-backup-input" id='sg-tables-to-exclude' name='sg-tables-to-exclude' type="text" value="<?php echo SGConfig::get('SG_TABLES_TO_EXCLUDE')?SGConfig::get('SG_TABLES_TO_EXCLUDE'):''?>" placeholder="e.g. wp_comments, wp_commentmeta">
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
|
163 |
+
<?php if (SGBoot::isFeatureAvailable('NUMBER_OF_BACKUPS_TO_KEEP')): ?>
|
164 |
+
<div class="form-group">
|
165 |
+
<label class="col-md-3 sg-control-label" for='amount-of-backups-to-keep'><?php _backupGuardT("Backup retention")?>
|
166 |
+
</label>
|
167 |
+
<div class="col-md-5 text-left">
|
168 |
+
<input class="form-control sg-backup-input" id='amount-of-backups-to-keep' name='amount-of-backups-to-keep' type="text" value="<?php echo (int)SGConfig::get('SG_AMOUNT_OF_BACKUPS_TO_KEEP')?(int)SGConfig::get('SG_AMOUNT_OF_BACKUPS_TO_KEEP'):SG_NUMBER_OF_BACKUPS_TO_KEEP?>" <?php echo (!SGBoot::isFeatureAvailable('NUMBER_OF_BACKUPS_TO_KEEP'))? 'disabled' : '' ?>>
|
169 |
</div>
|
170 |
+
</div>
|
171 |
+
<?php endif; ?>
|
172 |
+
<div class="form-group">
|
173 |
+
<label class="col-md-3 sg-control-label" for='sg-number-of-rows-to-backup'><?php _backupGuardT("Number of rows to backup at once")?></label>
|
174 |
+
<div class="col-md-5 text-left">
|
175 |
+
<input class="form-control sg-backup-input" id='sg-number-of-rows-to-backup' name='sg-number-of-rows-to-backup' type="text" value="<?php echo (int)SGConfig::get('SG_BACKUP_DATABASE_INSERT_LIMIT')?(int)SGConfig::get('SG_BACKUP_DATABASE_INSERT_LIMIT'):SG_BACKUP_DATABASE_INSERT_LIMIT?>">
|
176 |
+
</div>
|
177 |
+
</div>
|
178 |
+
|
179 |
+
<div class="form-group">
|
180 |
+
<label class="col-md-3 sg-control-label" for='sg-background-reload-method'><?php _backupGuardT("Reload method")?></label>
|
181 |
+
<div class="col-md-5 text-left">
|
182 |
+
<select class="form-control" id='sg-background-reload-method' name='sg-background-reload-method'>
|
183 |
+
<option value="<?php echo SG_RELOAD_METHOD_CURL ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_CURL ? "selected" : "" ?> >Curl</option>
|
184 |
+
<option value="<?php echo SG_RELOAD_METHOD_STREAM ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_STREAM ? "selected" : "" ?> >Stream</option>
|
185 |
+
<option value="<?php echo SG_RELOAD_METHOD_SOCKET ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_SOCKET ? "selected" : "" ?> >Socket</option>
|
186 |
+
</select>
|
187 |
+
</div>
|
188 |
+
</div>
|
189 |
+
<?php if (SGBoot::isFeatureAvailable('CUSTOM_BACKUP_NAME')): ?>
|
190 |
+
<div class="form-group">
|
191 |
+
<label class="col-md-3 sg-control-label">
|
192 |
+
<?php _backupGuardT('Backup file name')?>
|
193 |
+
</label>
|
194 |
+
<div class="col-md-5 text-left">
|
195 |
+
<input id="backup-file-name" name="backup-file-name" type="text" class="form-control input-md sg-backup-input" value="<?php echo $backupFileNamePrefix?>" <?php echo (!SGBoot::isFeatureAvailable('CUSTOM_BACKUP_NAME'))? 'disabled' : '' ?>>
|
196 |
</div>
|
197 |
+
</div>
|
198 |
+
<?php endif; ?>
|
199 |
+
|
200 |
+
<div class="form-group">
|
201 |
+
<label class="col-md-3 sg-control-label" for="sg-email"><?php _backupGuardT('Request frequency')?></label>
|
202 |
+
<div class="col-md-5">
|
203 |
+
<?php echo selectElement($intervalSelectElement, array('id'=>'sg-ajax-interval', 'name'=>'ajaxInterval', 'class'=>'form-control'), '', $selectedInterval);?>
|
204 |
+
</div>
|
205 |
+
</div>
|
206 |
+
<div class="form-group">
|
207 |
+
<label class="col-md-3"><?php _backupGuardT('Backup destination path'); ?></label>
|
208 |
+
<div class="col-md-6">
|
209 |
+
<span><?php echo str_replace(realpath(SG_APP_ROOT_DIRECTORY).'/', "" ,realpath(SG_BACKUP_DIRECTORY)); ?></span>
|
210 |
+
</div>
|
211 |
+
</div>
|
212 |
+
<div class="form-group">
|
213 |
+
<label class="col-md-3 control-label" for="button1id"></label>
|
214 |
+
<div class="col-md-5 text-right">
|
215 |
+
<button type="button" id="sg-save-settings" class="btn btn-success" onclick="sgBackup.sgsettings();"><?php _backupGuardT('Save')?></button>
|
216 |
+
</div>
|
217 |
+
</div>
|
218 |
+
</fieldset>
|
219 |
+
</form>
|
220 |
</div>
|
|
|
221 |
</div>
|
222 |
+
</div>
|
public/support.php
CHANGED
@@ -1,11 +1,8 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
require_once(SG_PUBLIC_INCLUDE_PATH . 'header.php');
|
4 |
-
require_once(SG_PUBLIC_INCLUDE_PATH . 'sidebar.php');
|
5 |
?>
|
6 |
-
<div id="sg-content-
|
7 |
<div class="sg-wrap-container">
|
8 |
<iframe id="sg-backup-guard-iframe" src="<?php echo SG_BACKUP_SUPPORT_URL?>"></iframe>
|
9 |
</div>
|
10 |
-
<?php require_once(SG_PUBLIC_INCLUDE_PATH . 'footer.php'); ?>
|
11 |
</div>
|
1 |
<?php
|
2 |
+
$contentClassName = getBackupPageContentClassName('support');
|
|
|
|
|
3 |
?>
|
4 |
+
<div id="sg-backup-page-content-support" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
5 |
<div class="sg-wrap-container">
|
6 |
<iframe id="sg-backup-guard-iframe" src="<?php echo SG_BACKUP_SUPPORT_URL?>"></iframe>
|
7 |
</div>
|
|
|
8 |
</div>
|
public/systemInfo.php
CHANGED
@@ -1,104 +1,96 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
require_once(dirname(__FILE__).'/boot.php');
|
4 |
-
require_once(SG_PUBLIC_INCLUDE_PATH.'header.php');
|
5 |
-
require_once(SG_PUBLIC_INCLUDE_PATH.'sidebar.php');
|
6 |
require_once(SG_SCHEDULE_PATH.'SGSchedule.php');
|
7 |
-
|
8 |
?>
|
9 |
-
<div class="sg-
|
10 |
-
<div
|
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 |
-
|
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 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
</div>
|
102 |
-
</div>
|
103 |
-
<?php require_once(SG_PUBLIC_INCLUDE_PATH . '/footer.php'); ?>
|
104 |
-
</div>
|
1 |
<?php
|
|
|
|
|
|
|
|
|
2 |
require_once(SG_SCHEDULE_PATH.'SGSchedule.php');
|
3 |
+
$contentClassName = getBackupPageContentClassName('system_info');
|
4 |
?>
|
5 |
+
<div id="sg-backup-page-content-system_info" class="sg-backup-page-content <?php echo $contentClassName; ?>">
|
6 |
+
<div class="row">
|
7 |
+
<div class="col-md-12">
|
8 |
+
<form class="form-horizontal" method="post" data-sgform="ajax" data-type="sgsettings">
|
9 |
+
<fieldset>
|
10 |
+
<div><h1 class="sg-backup-page-title"><?php _backupGuardT('System information')?></h1></div>
|
11 |
+
<div class="form-group">
|
12 |
+
<label class="col-md-3 sg-control-label sg-user-info"><?php _backupGuardT('Disk free space'); ?></label>
|
13 |
+
<div class="col-md-3 text-left">
|
14 |
+
<label class="sg-control-label">
|
15 |
+
<?php echo convertToReadableSize(@disk_free_space(SG_APP_ROOT_DIRECTORY)); ?>
|
16 |
+
</label>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
<div class="form-group sg-info-wrapper">
|
20 |
+
<label class="col-md-3 sg-control-label sg-user-info"><?php _backupGuardT('Memory limit'); ?></label>
|
21 |
+
<div class="col-md-3 text-left">
|
22 |
+
<label class="sg-control-label"><?php echo SGBoot::$memoryLimit; ?></label>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
<div class="form-group sg-info-wrapper">
|
26 |
+
<label class="col-md-3 sg-control-label sg-user-info">
|
27 |
+
<?php _backupGuardT('Max execution time'); ?>
|
28 |
+
</label>
|
29 |
+
<div class="col-md-3 text-left">
|
30 |
+
<label class="sg-control-label"><?php echo SGBoot::$executionTimeLimit; ?></label>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
<div class="form-group sg-info-wrapper">
|
34 |
+
<label class="col-md-3 sg-control-label sg-user-info">
|
35 |
+
<?php _backupGuardT('PHP version'); ?>
|
36 |
+
</label>
|
37 |
+
<div class="col-md-3 text-left">
|
38 |
+
<label class="sg-control-label"><?php echo PHP_VERSION; ?></label>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<div class="form-group sg-info-wrapper">
|
42 |
+
<label class="col-md-3 sg-control-label sg-user-info"><?php _backupGuardT('MySQL version'); ?></label>
|
43 |
+
<div class="col-md-3 text-left">
|
44 |
+
<label class="sg-control-label"><?php echo SG_MYSQL_VERSION; ?></label>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
<div class="form-group sg-info-wrapper">
|
48 |
+
<label class="col-md-3 sg-control-label sg-user-info">
|
49 |
+
<?php _backupGuardT('Int size'); ?>
|
50 |
+
</label>
|
51 |
+
<div class="col-md-3 text-left">
|
52 |
+
<?php echo '<label class="sg-control-label">'.PHP_INT_SIZE.'</label>'; ?>
|
53 |
+
<?php
|
54 |
+
if (PHP_INT_SIZE < 8) {
|
55 |
+
echo '<label class="sg-control-label backup-guard-label-warning">Notice that archive size cannot be bigger than 2GB. This limitaion is comming from system.</label>';
|
56 |
+
}
|
57 |
+
?>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
<div class="form-group sg-info-wrapper">
|
61 |
+
<div class="col-md-3 ">
|
62 |
+
<label class="sg-control-label sg-user-info"><?php _backupGuardT('Curl version'); ?></label>
|
63 |
+
</div>
|
64 |
+
<div class="col-md-8 text-left">
|
65 |
+
<?php
|
66 |
+
if (function_exists('curl_version') && function_exists('curl_exec')) {
|
67 |
+
$cv = curl_version();
|
68 |
+
echo '<label class="sg-control-label sg-blue-label">'.$cv['version'].' / SSL: '.$cv['ssl_version'].' / libz: '.$cv['libz_version'].'</label>';
|
69 |
+
}
|
70 |
+
else {
|
71 |
+
echo '<label class="sg-control-label backup-guard-label-warning">Curl required for BackupGuard for better functioning.</label>';
|
72 |
+
}
|
73 |
+
?>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
<div class="form-group sg-info-wrapper">
|
77 |
+
<div class="col-md-3 ">
|
78 |
+
<label class="sg-control-label sg-user-info"><?php _backupGuardT('Is cron available'); ?></label>
|
79 |
+
</div>
|
80 |
+
<div class="col-md-3 text-left">
|
81 |
+
<?php
|
82 |
+
$isCronAvailable = SGSchedule::isCronAvailable();
|
83 |
+
if ($isCronAvailable) {
|
84 |
+
echo '<label class="sg-control-label">Yes</label>';
|
85 |
+
}
|
86 |
+
else {
|
87 |
+
echo '<label class="sg-control-label backup-guard-label-warning">Please consider enabling WP Cron in order to be able to setup schedules.</label>';
|
88 |
+
}
|
89 |
+
?>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
</fieldset>
|
93 |
+
</form>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
</div>
|
|
|
|
|
|
|
|
public/templates/notices/banner.php
CHANGED
@@ -16,20 +16,20 @@
|
|
16 |
<div id="sg-left-column">
|
17 |
<ul>
|
18 |
<li class="hvr-bounce-in">
|
19 |
-
<a target="_blank" href="
|
20 |
<img class="sg-img-class" src="<?php echo SG_PUBLIC_URL; ?>img/user-manual.png"> User manual
|
21 |
</a>
|
22 |
</li>
|
23 |
<li class="hvr-bounce-in">
|
24 |
-
<a target="_blank" href="
|
25 |
<img class="sg-img-class" src="<?php echo SG_PUBLIC_URL; ?>img/full-demo.png"> Full demo</a>
|
26 |
</li>
|
27 |
<li class="hvr-bounce-in">
|
28 |
-
<a target="_blank" href="
|
29 |
<img class="sg-img-class" src="<?php echo SG_PUBLIC_URL;?>img/FAQ.png"> F.A.Q.</a>
|
30 |
</li>
|
31 |
<li class="hvr-bounce-in">
|
32 |
-
<a target="_blank" href="
|
33 |
<img class="sg-img-class" src="<?php echo SG_PUBLIC_URL; ?>img/contact-us.png"> Contact us
|
34 |
</a>
|
35 |
</li>
|
16 |
<div id="sg-left-column">
|
17 |
<ul>
|
18 |
<li class="hvr-bounce-in">
|
19 |
+
<a target="_blank" href="<?php echo SG_BACKUP_KNOWLEDGE_BASE_URL; ?>">
|
20 |
<img class="sg-img-class" src="<?php echo SG_PUBLIC_URL; ?>img/user-manual.png"> User manual
|
21 |
</a>
|
22 |
</li>
|
23 |
<li class="hvr-bounce-in">
|
24 |
+
<a target="_blank" href="<?php echo SG_BACKUP_DEMO_URL; ?>">
|
25 |
<img class="sg-img-class" src="<?php echo SG_PUBLIC_URL; ?>img/full-demo.png"> Full demo</a>
|
26 |
</li>
|
27 |
<li class="hvr-bounce-in">
|
28 |
+
<a target="_blank" href="<?php echo SG_BACKUP_FAQ_URL; ?>">
|
29 |
<img class="sg-img-class" src="<?php echo SG_PUBLIC_URL;?>img/FAQ.png"> F.A.Q.</a>
|
30 |
</li>
|
31 |
<li class="hvr-bounce-in">
|
32 |
+
<a target="_blank" href="<?php echo SG_BACKUP_CONTACT_US_URL; ?>">
|
33 |
<img class="sg-img-class" src="<?php echo SG_PUBLIC_URL; ?>img/contact-us.png"> Contact us
|
34 |
</a>
|
35 |
</li>
|