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