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