PluginProbe ʕ •ᴥ•ʔ
JetBackup – Backup, Restore & Migrate / 2.0.3
JetBackup – Backup, Restore & Migrate v2.0.3
3.1.22.3 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.8.1 1.4.9 1.5.0 1.5.1 1.5.1.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.10 1.6.11 1.6.12 1.6.13 1.6.15 1.6.5.1 1.6.8.8 1.6.9 1.6.9.1 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7.5 2.0.8.7 2.0.9.11 2.0.9.14 2.0.9.15 2.0.9.6 2.0.9.7 2.0.9.9 3.1.10.7 3.1.11.1 3.1.12.3 3.1.13.4 3.1.14.17 3.1.15.4 3.1.16.1 3.1.17.5 3.1.18.10 3.1.18.8 3.1.18.9 3.1.19.8 3.1.20.3 3.1.21.3 3.1.7.9 3.1.9.2 trunk 1.1.90 1.1.91 1.2.0 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2
backup / public / settings.php
backup / public Last commit date
ajax 3 years ago config 3 years ago cron 3 years ago css 3 years ago fonts 3 years ago img 3 years ago include 3 years ago js 3 years ago templates 3 years ago backups.php 3 years ago boot.php 3 years ago cloud.php 3 years ago dashboardWidget.php 3 years ago pagesContent.php 3 years ago proFeatures.php 3 years ago restore_wordpress.php 3 years ago schedule.php 3 years ago settings.php 3 years ago support.php 3 years ago systemInfo.php 3 years ago videoTutorials.php 3 years ago
settings.php
365 lines
1 <?php
2
3 require_once dirname(__FILE__) . '/boot.php';
4 require_once SG_PUBLIC_INCLUDE_PATH . '/header.php';
5 $isNotificationEnabled = SGConfig::get('SG_NOTIFICATIONS_ENABLED');
6 $userEmail = SGConfig::get('SG_NOTIFICATIONS_EMAIL_ADDRESS');
7 $isDeleteBackupAfterUploadEnabled = SGConfig::get('SG_DELETE_BACKUP_AFTER_UPLOAD');
8 $isDeleteBackupFromCloudEnabled = SGConfig::get('SG_DELETE_BACKUP_FROM_CLOUD');
9 $isDisabelAdsEnabled = SGConfig::get('SG_DISABLE_ADS');
10 $isDownloadMode = SGConfig::get('SG_DOWNLOAD_MODE');
11 $isAlertBeforeUpdateEnabled = SGConfig::get('SG_ALERT_BEFORE_UPDATE');
12 $isShowStatisticsWidgetEnabled = SGConfig::get('SG_SHOW_STATISTICS_WIDGET');
13 $isReloadingsEnabled = SGConfig::get('SG_BACKUP_WITH_RELOADINGS');
14 $intervalSelectElement = array(
15 '1000' => '1 second',
16 '2000' => '2 seconds',
17 '3000' => '3 seconds',
18 '5000' => '5 seconds',
19 '7000' => '7 seconds',
20 '10000' => '10 seconds'
21 );
22 $selectedInterval = (int) SGConfig::get('SG_AJAX_REQUEST_FREQUENCY') ? (int) SGConfig::get('SG_AJAX_REQUEST_FREQUENCY') : SG_AJAX_DEFAULT_REQUEST_FREQUENCY;
23
24 $backupFileNamePrefix = SGConfig::get('SG_BACKUP_FILE_NAME_PREFIX') ? SGConfig::get('SG_BACKUP_FILE_NAME_PREFIX') : SG_BACKUP_FILE_NAME_DEFAULT_PREFIX;
25 $backupFileNamePrefix = esc_attr($backupFileNamePrefix);
26
27 $sgBackgroundReloadMethod = SGConfig::get('SG_BACKGROUND_RELOAD_METHOD');
28 $ftpPassiveMode = SGConfig::get('SG_FTP_PASSIVE_MODE');
29 $contentClassName = esc_attr(getBackupPageContentClassName('settings'));
30 $savedCloudUploadChunkSize = getCloudUploadChunkSize();
31 $timezones = getAllTimezones();
32 $timezone = SGConfig::get('SG_TIMEZONE') ? : SG_DEFAULT_TIMEZONE;
33 $licenseKey = esc_html(substr(SGConfig::get('SG_LICENSE_KEY', true), -7));
34 $pluginCapabilities = backupGuardGetCapabilities();
35 ?>
36 <div id="sg-backup-page-content-settings" class="sg-backup-page-content <?php echo $contentClassName; ?>">
37 <div class="row sg-settings-container">
38 <div class="col-md-12">
39 <form class="form-horizontal" method="post" data-sgform="ajax" data-type="sgsettings">
40 <fieldset>
41 <div><h1 class="sg-backup-page-title"><?php _backupGuardT('General settings') ?></h1></div>
42
43 <?php if ($pluginCapabilities != BACKUP_GUARD_CAPABILITIES_FREE && $licenseKey): ?>
44 <div class="form-group">
45 <label class="col-md-4"><?php _backupGuardT('License key'); ?></label>
46 <div class="col-md-6">
47 <span><?php echo '************'.$licenseKey ?></span>
48 </div>
49 <div class="col-md-2">
50 <a class="text-danger" href="javascript:void(0)" onclick="sgBackup.logout()">
51 <?php _backupGuardT('Cleare license')?>
52 </a>
53 </div>
54 </div>
55 <?php endif; ?>
56
57 <div class="form-group">
58 <label class="col-md-4 sg-control-label" for='sg-timezone'>
59 <?php _backupGuardT("Timezone") ?>
60 </label>
61 <div class="col-md-5 text-left">
62 <select class="form-control" id='sg-timezone' name='sg-timezone'>
63 <option value="UTC"<?php echo $timezone == 'UTC' ? ' selected' : '' ?>>(UTC+00:00) UTC
64 </option>
65 <?php foreach ($timezones as $region => $timezoneText) : ?>
66 <option value="<?php echo $region ?>"<?php echo $timezone == $region ? ' selected' : '' ?>><?php echo $timezoneText[0] ?></option>
67 <?php endforeach; ?>
68 </select>
69 </div>
70 </div>
71
72 <?php if (SGBoot::isFeatureAvailable('NOTIFICATIONS')) : ?>
73 <div class="form-group">
74 <label class="col-md-4 sg-control-label">
75 <?php _backupGuardT('Email notifications'); ?><span
76 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
77 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Enable notifications to receive status updates about your backup/restore processes.'); ?></span>
78 <?php if (!empty($userEmail)) : ?>
79 <br/><span
80 class="text-muted sg-user-email sg-helper-block"><?php echo esc_html($userEmail); ?></span>
81 <?php endif ?>
82 </label>
83 <div class="col-md-3 text-left">
84 <label class="sg-switch-container">
85 <input type="checkbox" name="sgIsEmailNotification"
86 class="sg-switch sg-email-switch"
87 sgFeatureName="NOTIFICATIONS" <?php echo $isNotificationEnabled ? 'checked="checked"' : '' ?>
88 data-remote="settings">
89 </label>
90 </div>
91 </div>
92 <div class="sg-general-settings">
93 <div class="form-group">
94 <label class="col-md-4 sg-control-label"
95 for="sg-email"><?php _backupGuardT('Enter email') ?></label>
96 <div class="col-md-5">
97 <input id="sg-email" name="sgUserEmail" type="text"
98 placeholder="<?php _backupGuardT('You can enter multiple emails, just separate them with comma') ?>"
99 class="form-control input-md sg-backup-input"
100 value="<?php echo esc_attr($userEmail) ?>">
101 </div>
102 </div>
103 </div>
104 <?php endif; ?>
105 <div class="form-group">
106 <label class="col-md-4 sg-control-label">
107 <?php _backupGuardT('Reloads enabled'); ?><span
108 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
109 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Enable chunked backup/restore. Recommended to avoid execution timeout errors.') ?></span>
110 </label>
111 <div class="col-md-3 text-left">
112 <label class="sg-switch-container">
113 <input type="checkbox" name="backup-with-reloadings"
114 class="sg-switch" <?php echo $isReloadingsEnabled ? 'checked="checked"' : '' ?>>
115 </label>
116 </div>
117 </div>
118 <?php if (SGBoot::isFeatureAvailable('DELETE_LOCAL_BACKUP_AFTER_UPLOAD')) : ?>
119 <div class="form-group">
120 <label class="col-md-4 sg-control-label">
121 <?php _backupGuardT('Delete local backup after upload'); ?><span
122 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
123 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Delete your local copy of backup once it is successfully uploaded to the connected cloud.') ?></span>
124 </label>
125 <div class="col-md-3 text-left">
126 <label class="sg-switch-container">
127 <input type="checkbox" name="delete-backup-after-upload"
128 sgFeatureName="DELETE_LOCAL_BACKUP_AFTER_UPLOAD"
129 class="sg-switch" <?php echo $isDeleteBackupAfterUploadEnabled ? 'checked="checked"' : '' ?>>
130 </label>
131 </div>
132 </div>
133 <?php endif; ?>
134 <?php if (SGBoot::isFeatureAvailable('ALERT_BEFORE_UPDATE')) : ?>
135 <div class="form-group">
136 <label class="col-md-4 sg-control-label">
137 <?php _backupGuardT('Alert before update'); ?><span
138 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
139 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Receive an alert to backup you website prior to updating installed plugins.') ?></span>
140 </label>
141 <div class="col-md-3 text-left">
142 <label class="sg-switch-container">
143 <input type="checkbox" name="alert-before-update"
144 sgFeatureName="ALERT_BEFORE_UPDATE"
145 class="sg-switch" <?php echo $isAlertBeforeUpdateEnabled ? 'checked="checked"' : '' ?>>
146 </label>
147 </div>
148 </div>
149 <?php endif; ?>
150 <?php if (SGBoot::isFeatureAvailable('BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD')) : ?>
151 <div class="form-group">
152 <label class="col-md-4 sg-control-label">
153 <?php _backupGuardT('Backup deletion will also delete from cloud'); ?><span
154 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
155 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Deleting your local copy of backup will automatically remove it from the connected cloud as well.') ?></span>
156 </label>
157 <div class="col-md-3 text-left">
158 <label class="sg-switch-container">
159 <input type="checkbox" name="delete-backup-from-cloud"
160 sgFeatureName="BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD"
161 class="sg-switch" <?php echo $isDeleteBackupFromCloudEnabled ? 'checked="checked"' : '' ?>>
162 </label>
163 </div>
164 </div>
165 <?php endif; ?>
166 <div class="form-group">
167 <label class="col-md-4 sg-control-label">
168 <?php _backupGuardT('Show statistics'); ?><span
169 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
170 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Backup statistics available in the dashboard.') ?></span>
171 </label>
172 <div class="col-md-3 text-left">
173 <label class="sg-switch-container">
174 <input type="checkbox" name="show-statistics-widget"
175 class="sg-switch" <?php echo $isShowStatisticsWidgetEnabled ? 'checked="checked"' : '' ?>>
176 </label>
177 </div>
178 </div>
179 <?php if (SGBoot::isFeatureAvailable('FTP')) : ?>
180 <div class="form-group">
181 <label class="col-md-4 sg-control-label">
182 <?php _backupGuardT('FTP passive mode'); ?>
183 </label>
184 <div class="col-md-3 text-left">
185 <label class="sg-switch-container">
186 <input type="checkbox" name="ftp-passive-mode" sgFeatureName="FTP"
187 class="sg-switch" <?php echo $ftpPassiveMode ? 'checked="checked"' : '' ?>>
188 </label>
189 </div>
190 </div>
191 <?php endif; ?>
192 <?php if (SGBoot::isFeatureAvailable('MULTI_SCHEDULE')) : ?>
193 <div class="form-group">
194 <label class="col-md-4 sg-control-label">
195 <?php _backupGuardT('Disable ads'); ?><span
196 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
197 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Disable advertisements inside the plugin (e.g. banners)') ?></span>
198 </label>
199 <div class="col-md-3 text-left">
200 <label class="sg-switch-container">
201 <input type="checkbox" name="sg-hide-ads" sgFeatureName="HIDE_ADS"
202 class="sg-switch" <?php echo $isDisabelAdsEnabled ? 'checked="checked"' : '' ?>>
203 </label>
204 </div>
205 </div>
206 <?php endif; ?>
207 <div class="form-group">
208 <label class="col-md-4 sg-control-label" for='sg-download-mode'>
209 <?php _backupGuardT("Download mode") ?><span
210 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
211 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Select what technique to use for downloading the backup files.') ?></span>
212 </label>
213 <div class="col-md-5 text-left">
214 <select class="form-control" id='sg-download-mode' name='sg-download-mode'>
215 <?php if (backupGuardCheckOS() !== 'windows') : ?>
216 <option value="0" <?php echo $isDownloadMode === BACKUP_GUARD_DOWNLOAD_MODE_LINK ? "selected" : "" ?> >
217 Hard link
218 </option>
219 <?php endif; ?>
220 <option value="1" <?php echo $isDownloadMode == BACKUP_GUARD_DOWNLOAD_MODE_PHP ? "selected" : "" ?> >
221 Via PHP
222 </option>
223 <option value="2" <?php echo $isDownloadMode == BACKUP_GUARD_DOWNLOAD_MODE_SYMLINK ? "selected" : "" ?> >
224 Symlink
225 </option>
226 </select>
227 </div>
228 </div>
229 <div class="form-group">
230 <label class="col-md-4 sg-control-label" for='sg-paths-to-exclude'>
231 <?php _backupGuardT("Exclude paths (separated by commas)") ?>
232 </label>
233 <div class="col-md-5 text-left">
234 <input class="form-control sg-backup-input" id='sg-paths-to-exclude'
235 name='sg-paths-to-exclude' type="text"
236 value="<?php echo SGConfig::get('SG_PATHS_TO_EXCLUDE') ? esc_attr(SGConfig::get('SG_PATHS_TO_EXCLUDE')) : '' ?>"
237 placeholder="e.g. wp-content/cache, wp-content/w3tc-cache">
238 </div>
239 </div>
240 <div class="form-group">
241 <label class="col-md-4 sg-control-label" for='sg-tables-to-exclude'>
242 <?php _backupGuardT("Tables to exclude (separated by commas)") ?>
243 </label>
244 <div class="col-md-5 text-left">
245 <input class="form-control sg-backup-input" id='sg-tables-to-exclude'
246 name='sg-tables-to-exclude' type="text"
247 value="<?php echo SGConfig::get('SG_TABLES_TO_EXCLUDE') ? esc_attr(SGConfig::get('SG_TABLES_TO_EXCLUDE')) : '' ?>"
248 placeholder="e.g. wp_comments, wp_commentmeta">
249 </div>
250 </div>
251 <?php if (SGBoot::isFeatureAvailable('NUMBER_OF_BACKUPS_TO_KEEP')) : ?>
252 <div class="form-group">
253 <label class="col-md-4 sg-control-label" for='amount-of-backups-to-keep'>
254 <?php _backupGuardT("Backup retention") ?><span
255 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
256 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Choose number of backups to keep on the website. Each additional backup will replace the oldest backup file') ?></span>
257 </label>
258 <div class="col-md-5 text-left">
259 <input class="form-control sg-backup-input" id='amount-of-backups-to-keep'
260 name='amount-of-backups-to-keep' type="text"
261 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' : '' ?>>
262 </div>
263 </div>
264 <?php endif; ?>
265 <div class="form-group">
266 <label class="col-md-4 sg-control-label" for='sg-number-of-rows-to-backup'>
267 <?php _backupGuardT("Number of rows to backup at once") ?><span
268 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
269 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Choose the number of row during the Databases backup in order not to overload your RAM.') ?></span>
270 </label>
271 <div class="col-md-5 text-left">
272 <input class="form-control sg-backup-input" id='sg-number-of-rows-to-backup'
273 name='sg-number-of-rows-to-backup' type="text"
274 value="<?php echo (int) SGConfig::get('SG_BACKUP_DATABASE_INSERT_LIMIT') ? (int) SGConfig::get('SG_BACKUP_DATABASE_INSERT_LIMIT') : SG_BACKUP_DATABASE_INSERT_LIMIT ?>">
275 </div>
276 </div>
277 <?php if (SGBoot::isFeatureAvailable('STORAGE')) : ?>
278 <div class="form-group">
279 <label class="col-md-4 sg-control-label" for='sg-number-of-rows-to-backup'>
280 <?php _backupGuardT("Upload to cloud chunk size") ?><span
281 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
282 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Change the size of the chunk upload during backup to cloud(s).') ?></span>
283 </label>
284 <div class="col-md-5 text-left">
285 <select class="form-control" id='sg-upload-cloud-chunk-szie'
286 name='sg-upload-cloud-chunk-size'>
287 <option value="4" <?php echo $savedCloudUploadChunkSize == 4 ? "selected" : "" ?> >4MB
288 </option>
289 <option value="8" <?php echo $savedCloudUploadChunkSize == 8 ? "selected" : "" ?> >8MB
290 </option>
291 <option value="16" <?php echo $savedCloudUploadChunkSize == 16 ? "selected" : "" ?> >
292 16MB
293 </option>
294 <option value="32" <?php echo $savedCloudUploadChunkSize == 32 ? "selected" : "" ?> >
295 32MB
296 </option>
297 </select>
298 </div>
299 </div>
300 <?php endif; ?>
301 <div class="form-group">
302 <label class="col-md-4 sg-control-label" for='sg-background-reload-method'>
303 <?php _backupGuardT("Reload method") ?><span
304 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
305 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Choose the right PHP Library for reloads') ?></span>
306 </label>
307 <div class="col-md-5 text-left">
308 <select class="form-control" id='sg-background-reload-method'
309 name='sg-background-reload-method'>
310 <option value="<?php echo SG_RELOAD_METHOD_CURL ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_CURL ? "selected" : "" ?> >
311 Curl
312 </option>
313 <option value="<?php echo SG_RELOAD_METHOD_STREAM ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_STREAM ? "selected" : "" ?> >
314 Stream
315 </option>
316 <option value="<?php echo SG_RELOAD_METHOD_SOCKET ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_SOCKET ? "selected" : "" ?> >
317 Socket
318 </option>
319 </select>
320 </div>
321 </div>
322
323 <div class="form-group">
324 <label class="col-md-4 sg-control-label">
325 <?php _backupGuardT('Backup file name') ?><span
326 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
327 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Name your backups or leave to the default prefixes') ?></span>
328 </label>
329 <div class="col-md-5 text-left">
330 <input id="backup-file-name" name="backup-file-name" type="text"
331 class="form-control input-md sg-backup-input"
332 value="<?php echo $backupFileNamePrefix ?>">
333 </div>
334 </div>
335
336 <div class="form-group">
337 <label class="col-md-4 sg-control-label" for="sg-email">
338 <?php _backupGuardT('Request frequency') ?>
339 </label>
340 <div class="col-md-5">
341 <?php echo selectElement($intervalSelectElement, array('id' => 'sg-ajax-interval',
342 'name' => 'ajaxInterval',
343 'class' => 'form-control'
344 ), '', $selectedInterval); ?>
345 </div>
346 </div>
347 <div class="form-group">
348 <label class="col-md-4"><?php _backupGuardT('Backup destination path'); ?></label>
349 <div class="col-md-6">
350 <span><?php echo str_replace(realpath(SG_APP_ROOT_DIRECTORY) . '/', "", realpath(SG_BACKUP_DIRECTORY)); ?></span>
351 </div>
352 </div>
353 <div class="form-group">
354 <label class="col-md-4 control-label" for="button1id"></label>
355 <div class="col-md-5 text-right">
356 <button type="button" id="sg-save-settings" class="btn btn-success"
357 onclick="sgBackup.sgsettings();"><?php _backupGuardT('Save') ?></button>
358 </div>
359 </div>
360 </fieldset>
361 </form>
362 </div>
363 </div>
364 </div>
365