PluginProbe ʕ •ᴥ•ʔ
JetBackup – Backup, Restore & Migrate / 1.6.15
JetBackup – Backup, Restore & Migrate v1.6.15
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 4 years ago cron 6 years ago css 3 years ago fonts 5 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 security.php 3 years ago services.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
359 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 ?>
34 <div id="sg-backup-page-content-settings" class="sg-backup-page-content <?php echo $contentClassName; ?>">
35 <div class="row sg-settings-container">
36 <div class="col-md-12">
37 <form class="form-horizontal" method="post" data-sgform="ajax" data-type="sgsettings">
38 <fieldset>
39 <div><h1 class="sg-backup-page-title"><?php _backupGuardT('General settings') ?></h1></div>
40 <div class="form-group">
41 <label class="col-md-4 sg-control-label" for='sg-timezone'>
42 <?php _backupGuardT("Timezone") ?>
43 </label>
44 <div class="col-md-5 text-left">
45 <select class="form-control" id='sg-timezone' name='sg-timezone'>
46 <option value="UTC"<?php echo $timezone == 'UTC' ? ' selected' : '' ?>>(UTC+00:00) UTC
47 </option>
48 <?php foreach ($timezones as $region => $timezoneText) : ?>
49 <option value="<?php echo $region ?>"<?php echo $timezone == $region ? ' selected' : '' ?>><?php echo $timezoneText[0] ?></option>
50 <?php endforeach; ?>
51 </select>
52 </div>
53 </div>
54
55 <?php if (SGBoot::isFeatureAvailable('NOTIFICATIONS')) : ?>
56 <div class="form-group">
57 <label class="col-md-4 sg-control-label">
58 <?php _backupGuardT('Email notifications'); ?><span
59 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
60 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Enable notifications to receive status updates about your backup/restore processes.'); ?></span>
61 <?php if (!empty($userEmail)) : ?>
62 <br/><span
63 class="text-muted sg-user-email sg-helper-block"><?php echo esc_html($userEmail); ?></span>
64 <?php endif ?>
65 </label>
66 <div class="col-md-3 text-left">
67 <label class="sg-switch-container">
68 <input type="checkbox" name="sgIsEmailNotification"
69 class="sg-switch sg-email-switch"
70 sgFeatureName="NOTIFICATIONS" <?php echo $isNotificationEnabled ? 'checked="checked"' : '' ?>
71 data-remote="settings">
72 </label>
73 </div>
74 </div>
75 <div class="sg-general-settings">
76 <div class="form-group">
77 <label class="col-md-4 sg-control-label"
78 for="sg-email"><?php _backupGuardT('Enter email') ?></label>
79 <div class="col-md-5">
80 <input id="sg-email" name="sgUserEmail" type="text"
81 placeholder="<?php _backupGuardT('You can enter multiple emails, just separate them with comma') ?>"
82 class="form-control input-md sg-backup-input"
83 value="<?php echo esc_attr($userEmail) ?>">
84 </div>
85 </div>
86 </div>
87 <?php endif; ?>
88 <div class="form-group">
89 <label class="col-md-4 sg-control-label">
90 <?php _backupGuardT('Reloads enabled'); ?><span
91 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
92 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Enable chunked backup/restore. Recommended to avoid execution timeout errors.') ?></span>
93 </label>
94 <div class="col-md-3 text-left">
95 <label class="sg-switch-container">
96 <input type="checkbox" name="backup-with-reloadings"
97 class="sg-switch" <?php echo $isReloadingsEnabled ? 'checked="checked"' : '' ?>>
98 </label>
99 </div>
100 </div>
101 <?php if (SGBoot::isFeatureAvailable('DELETE_LOCAL_BACKUP_AFTER_UPLOAD')) : ?>
102 <div class="form-group">
103 <label class="col-md-4 sg-control-label">
104 <?php _backupGuardT('Delete local backup after upload'); ?><span
105 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
106 <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>
107 </label>
108 <div class="col-md-3 text-left">
109 <label class="sg-switch-container">
110 <input type="checkbox" name="delete-backup-after-upload"
111 sgFeatureName="DELETE_LOCAL_BACKUP_AFTER_UPLOAD"
112 class="sg-switch" <?php echo $isDeleteBackupAfterUploadEnabled ? 'checked="checked"' : '' ?>>
113 </label>
114 </div>
115 </div>
116 <?php endif; ?>
117 <?php if (SGBoot::isFeatureAvailable('ALERT_BEFORE_UPDATE')) : ?>
118 <div class="form-group">
119 <label class="col-md-4 sg-control-label">
120 <?php _backupGuardT('Alert before update'); ?><span
121 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
122 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Receive an alert to backup you website prior to updating installed plugins.') ?></span>
123 </label>
124 <div class="col-md-3 text-left">
125 <label class="sg-switch-container">
126 <input type="checkbox" name="alert-before-update"
127 sgFeatureName="ALERT_BEFORE_UPDATE"
128 class="sg-switch" <?php echo $isAlertBeforeUpdateEnabled ? 'checked="checked"' : '' ?>>
129 </label>
130 </div>
131 </div>
132 <?php endif; ?>
133 <?php if (SGBoot::isFeatureAvailable('BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD')) : ?>
134 <div class="form-group">
135 <label class="col-md-4 sg-control-label">
136 <?php _backupGuardT('Backup deletion will also delete from cloud'); ?><span
137 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
138 <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>
139 </label>
140 <div class="col-md-3 text-left">
141 <label class="sg-switch-container">
142 <input type="checkbox" name="delete-backup-from-cloud"
143 sgFeatureName="BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD"
144 class="sg-switch" <?php echo $isDeleteBackupFromCloudEnabled ? 'checked="checked"' : '' ?>>
145 </label>
146 </div>
147 </div>
148 <?php endif; ?>
149 <div class="form-group">
150 <label class="col-md-4 sg-control-label">
151 <?php _backupGuardT('Show statistics'); ?><span
152 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
153 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Backup statistics available in the dashboard.') ?></span>
154 </label>
155 <div class="col-md-3 text-left">
156 <label class="sg-switch-container">
157 <input type="checkbox" name="show-statistics-widget"
158 class="sg-switch" <?php echo $isShowStatisticsWidgetEnabled ? 'checked="checked"' : '' ?>>
159 </label>
160 </div>
161 </div>
162 <?php if (SGBoot::isFeatureAvailable('FTP')) : ?>
163 <div class="form-group">
164 <label class="col-md-4 sg-control-label">
165 <?php _backupGuardT('FTP passive mode'); ?>
166 </label>
167 <div class="col-md-3 text-left">
168 <label class="sg-switch-container">
169 <input type="checkbox" name="ftp-passive-mode" sgFeatureName="FTP"
170 class="sg-switch" <?php echo $ftpPassiveMode ? 'checked="checked"' : '' ?>>
171 </label>
172 </div>
173 </div>
174 <?php endif; ?>
175 <?php if (SGBoot::isFeatureAvailable('MULTI_SCHEDULE')) : ?>
176 <div class="form-group">
177 <label class="col-md-4 sg-control-label">
178 <?php _backupGuardT('Disable ads'); ?><span
179 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
180 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Disable advertisements inside the plugin (e.g. banners)') ?></span>
181 </label>
182 <div class="col-md-3 text-left">
183 <label class="sg-switch-container">
184 <input type="checkbox" name="sg-hide-ads" sgFeatureName="HIDE_ADS"
185 class="sg-switch" <?php echo $isDisabelAdsEnabled ? 'checked="checked"' : '' ?>>
186 </label>
187 </div>
188 </div>
189 <?php endif; ?>
190 <div class="form-group">
191 <label class="col-md-4 sg-control-label" for='sg-download-mode'>
192 <?php _backupGuardT("Download mode") ?><span
193 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
194 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Select what technique to use for downloading the backup files.') ?></span>
195 </label>
196 <div class="col-md-5 text-left">
197 <select class="form-control" id='sg-download-mode' name='sg-download-mode'>
198 <?php if (backupGuardCheckOS() !== 'windows') : ?>
199 <option value="0" <?php echo $isDownloadMode === BACKUP_GUARD_DOWNLOAD_MODE_LINK ? "selected" : "" ?> >
200 Hard link
201 </option>
202 <?php endif; ?>
203 <option value="1" <?php echo $isDownloadMode == BACKUP_GUARD_DOWNLOAD_MODE_PHP ? "selected" : "" ?> >
204 Via PHP
205 </option>
206 <option value="2" <?php echo $isDownloadMode == BACKUP_GUARD_DOWNLOAD_MODE_SYMLINK ? "selected" : "" ?> >
207 Symlink
208 </option>
209 </select>
210 </div>
211 </div>
212 <div class="form-group">
213 <label class="col-md-4 sg-control-label">
214 <?php _backupGuardT('Send usage data'); ?><span
215 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
216 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Allow us to receive usage data in order to improve plugin functionality') ?></span>
217 </label>
218 <div class="col-md-3 text-left">
219 <label class="sg-switch-container">
220 <input type="checkbox" name="backup-send-usage-data-status"
221 class="sg-switch backup-send-usage-data-status" <?php echo $allowDataCollection ? 'checked="checked"' : '' ?>>
222 </label>
223 </div>
224 </div>
225 <div class="form-group">
226 <label class="col-md-4 sg-control-label" for='sg-paths-to-exclude'>
227 <?php _backupGuardT("Exclude paths (separated by commas)") ?>
228 </label>
229 <div class="col-md-5 text-left">
230 <input class="form-control sg-backup-input" id='sg-paths-to-exclude'
231 name='sg-paths-to-exclude' type="text"
232 value="<?php echo SGConfig::get('SG_PATHS_TO_EXCLUDE') ? esc_attr(SGConfig::get('SG_PATHS_TO_EXCLUDE')) : '' ?>"
233 placeholder="e.g. wp-content/cache, wp-content/w3tc-cache">
234 </div>
235 </div>
236 <div class="form-group">
237 <label class="col-md-4 sg-control-label" for='sg-tables-to-exclude'>
238 <?php _backupGuardT("Tables to exclude (separated by commas)") ?>
239 </label>
240 <div class="col-md-5 text-left">
241 <input class="form-control sg-backup-input" id='sg-tables-to-exclude'
242 name='sg-tables-to-exclude' type="text"
243 value="<?php echo SGConfig::get('SG_TABLES_TO_EXCLUDE') ? esc_attr(SGConfig::get('SG_TABLES_TO_EXCLUDE')) : '' ?>"
244 placeholder="e.g. wp_comments, wp_commentmeta">
245 </div>
246 </div>
247 <?php if (SGBoot::isFeatureAvailable('NUMBER_OF_BACKUPS_TO_KEEP')) : ?>
248 <div class="form-group">
249 <label class="col-md-4 sg-control-label" for='amount-of-backups-to-keep'>
250 <?php _backupGuardT("Backup retention") ?><span
251 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
252 <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>
253 </label>
254 <div class="col-md-5 text-left">
255 <input class="form-control sg-backup-input" id='amount-of-backups-to-keep'
256 name='amount-of-backups-to-keep' type="text"
257 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' : '' ?>>
258 </div>
259 </div>
260 <?php endif; ?>
261 <div class="form-group">
262 <label class="col-md-4 sg-control-label" for='sg-number-of-rows-to-backup'>
263 <?php _backupGuardT("Number of rows to backup at once") ?><span
264 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
265 <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>
266 </label>
267 <div class="col-md-5 text-left">
268 <input class="form-control sg-backup-input" id='sg-number-of-rows-to-backup'
269 name='sg-number-of-rows-to-backup' type="text"
270 value="<?php echo (int) SGConfig::get('SG_BACKUP_DATABASE_INSERT_LIMIT') ? (int) SGConfig::get('SG_BACKUP_DATABASE_INSERT_LIMIT') : SG_BACKUP_DATABASE_INSERT_LIMIT ?>">
271 </div>
272 </div>
273 <div class="form-group">
274 <label class="col-md-4 sg-control-label" for='sg-number-of-rows-to-backup'>
275 <?php _backupGuardT("Upload to cloud chunk size") ?><span
276 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
277 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Change the size of the chunk upload during backup to cloud(s).') ?></span>
278 </label>
279 <div class="col-md-5 text-left">
280 <select class="form-control" id='sg-upload-cloud-chunk-szie'
281 name='sg-upload-cloud-chunk-size'>
282 <option value="4" <?php echo $savedCloudUploadChunkSize == 4 ? "selected" : "" ?> >4MB
283 </option>
284 <option value="8" <?php echo $savedCloudUploadChunkSize == 8 ? "selected" : "" ?> >8MB
285 </option>
286 <option value="16" <?php echo $savedCloudUploadChunkSize == 16 ? "selected" : "" ?> >
287 16MB
288 </option>
289 <option value="32" <?php echo $savedCloudUploadChunkSize == 32 ? "selected" : "" ?> >
290 32MB
291 </option>
292 </select>
293 </div>
294 </div>
295 <div class="form-group">
296 <label class="col-md-4 sg-control-label" for='sg-background-reload-method'>
297 <?php _backupGuardT("Reload method") ?><span
298 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
299 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Choose the right PHP Library for reloads') ?></span>
300 </label>
301 <div class="col-md-5 text-left">
302 <select class="form-control" id='sg-background-reload-method'
303 name='sg-background-reload-method'>
304 <option value="<?php echo SG_RELOAD_METHOD_CURL ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_CURL ? "selected" : "" ?> >
305 Curl
306 </option>
307 <option value="<?php echo SG_RELOAD_METHOD_STREAM ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_STREAM ? "selected" : "" ?> >
308 Stream
309 </option>
310 <option value="<?php echo SG_RELOAD_METHOD_SOCKET ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_SOCKET ? "selected" : "" ?> >
311 Socket
312 </option>
313 </select>
314 </div>
315 </div>
316 <?php if (SGBoot::isFeatureAvailable('CUSTOM_BACKUP_NAME')) : ?>
317 <div class="form-group">
318 <label class="col-md-4 sg-control-label">
319 <?php _backupGuardT('Backup file name') ?><span
320 class="dashicons dashicons-editor-help sgbg-info-icon"></span>
321 <span class="infoSelectRepeat samefontStyle sgbg-info-text"><?php _backupGuardT('Name your backups or leave to the default prefixes') ?></span>
322 </label>
323 <div class="col-md-5 text-left">
324 <input id="backup-file-name" name="backup-file-name" type="text"
325 class="form-control input-md sg-backup-input"
326 value="<?php echo $backupFileNamePrefix ?>" <?php echo (!SGBoot::isFeatureAvailable('CUSTOM_BACKUP_NAME')) ? 'disabled' : '' ?>>
327 </div>
328 </div>
329 <?php endif; ?>
330 <div class="form-group">
331 <label class="col-md-4 sg-control-label" for="sg-email">
332 <?php _backupGuardT('Request frequency') ?>
333 </label>
334 <div class="col-md-5">
335 <?php echo selectElement($intervalSelectElement, array('id' => 'sg-ajax-interval',
336 'name' => 'ajaxInterval',
337 'class' => 'form-control'
338 ), '', $selectedInterval); ?>
339 </div>
340 </div>
341 <div class="form-group">
342 <label class="col-md-4"><?php _backupGuardT('Backup destination path'); ?></label>
343 <div class="col-md-6">
344 <span><?php echo str_replace(realpath(SG_APP_ROOT_DIRECTORY) . '/', "", realpath(SG_BACKUP_DIRECTORY)); ?></span>
345 </div>
346 </div>
347 <div class="form-group">
348 <label class="col-md-4 control-label" for="button1id"></label>
349 <div class="col-md-5 text-right">
350 <button type="button" id="sg-save-settings" class="btn btn-success"
351 onclick="sgBackup.sgsettings();"><?php _backupGuardT('Save') ?></button>
352 </div>
353 </div>
354 </fieldset>
355 </form>
356 </div>
357 </div>
358 </div>
359