ajax
6 years ago
config
6 years ago
cron
6 years ago
css
6 years ago
fonts
6 years ago
img
6 years ago
include
6 years ago
js
6 years ago
templates
6 years ago
backups.php
6 years ago
boot.php
6 years ago
cloud.php
6 years ago
dashboardWidget.php
6 years ago
proFeatures.php
6 years ago
restore_wordpress.php
6 years ago
schedule.php
6 years ago
security.php
6 years ago
services.php
6 years ago
settings.php
6 years ago
support.php
6 years ago
systemInfo.php
6 years ago
settings.php
226 lines
| 1 | <?php |
| 2 | require_once(dirname(__FILE__).'/boot.php'); |
| 3 | require_once(SG_PUBLIC_INCLUDE_PATH . '/header.php'); |
| 4 | $isNotificationEnabled = SGConfig::get('SG_NOTIFICATIONS_ENABLED'); |
| 5 | $userEmail = SGConfig::get('SG_NOTIFICATIONS_EMAIL_ADDRESS'); |
| 6 | $isDeleteBackupAfterUploadEnabled = SGConfig::get('SG_DELETE_BACKUP_AFTER_UPLOAD'); |
| 7 | $isDeleteBackupFromCloudEnabled = SGConfig::get('SG_DELETE_BACKUP_FROM_CLOUD'); |
| 8 | $isDisabelAdsEnabled = SGConfig::get('SG_DISABLE_ADS'); |
| 9 | $isDownloadViaPhp = SGConfig::get('SG_DOWNLOAD_VIA_PHP'); |
| 10 | $isAlertBeforeUpdateEnabled = SGConfig::get('SG_ALERT_BEFORE_UPDATE'); |
| 11 | $isShowStatisticsWidgetEnabled = SGConfig::get('SG_SHOW_STATISTICS_WIDGET'); |
| 12 | $isReloadingsEnabled = SGConfig::get('SG_BACKUP_WITH_RELOADINGS'); |
| 13 | $intervalSelectElement = array( |
| 14 | '1000'=>'1 second', |
| 15 | '2000'=>'2 seconds', |
| 16 | '3000'=>'3 seconds', |
| 17 | '5000'=>'5 seconds', |
| 18 | '7000'=>'7 seconds', |
| 19 | '10000'=>'10 seconds'); |
| 20 | $selectedInterval = (int)SGConfig::get('SG_AJAX_REQUEST_FREQUENCY')?(int)SGConfig::get('SG_AJAX_REQUEST_FREQUENCY'):SG_AJAX_DEFAULT_REQUEST_FREQUENCY; |
| 21 | |
| 22 | $backupFileNamePrefix = SGConfig::get('SG_BACKUP_FILE_NAME_PREFIX')?SGConfig::get('SG_BACKUP_FILE_NAME_PREFIX'):SG_BACKUP_FILE_NAME_DEFAULT_PREFIX; |
| 23 | $backupFileNamePrefix = esc_html($backupFileNamePrefix); |
| 24 | |
| 25 | $sgBackgroundReloadMethod = SGConfig::get('SG_BACKGROUND_RELOAD_METHOD'); |
| 26 | $ftpPassiveMode = SGConfig::get('SG_FTP_PASSIVE_MODE'); |
| 27 | ?> |
| 28 | <?php require_once(SG_PUBLIC_INCLUDE_PATH . 'sidebar.php'); ?> |
| 29 | <div id="sg-content-wrapper"> |
| 30 | <div class="container-fluid"> |
| 31 | <div class="row sg-settings-container"> |
| 32 | <div class="col-md-12"> |
| 33 | <form class="form-horizontal" method="post" data-sgform="ajax" data-type="sgsettings"> |
| 34 | <fieldset> |
| 35 | <legend><?php _backupGuardT('General settings')?><?php echo backupGuardLoggedMessage(); ?></legend> |
| 36 | <?php if (SGBoot::isFeatureAvailable('NOTIFICATIONS')): ?> |
| 37 | <div class="form-group"> |
| 38 | <label class="col-md-8 sg-control-label sg-user-info"> |
| 39 | <?php _backupGuardT('Email notifications'); ?> |
| 40 | <?php if(!empty($userEmail)): ?> |
| 41 | <br/><span class="text-muted sg-user-email sg-helper-block"><?php echo esc_html($userEmail); ?></span> |
| 42 | <?php endif?> |
| 43 | </label> |
| 44 | <div class="col-md-3 pull-right text-right"> |
| 45 | <label class="sg-switch-container"> |
| 46 | <input type="checkbox" name="sgIsEmailNotification" class="sg-switch sg-email-switch" sgFeatureName="NOTIFICATIONS" <?php echo $isNotificationEnabled?'checked="checked"':''?> data-remote="settings"> |
| 47 | </label> |
| 48 | </div> |
| 49 | </div> |
| 50 | <div class="sg-general-settings"> |
| 51 | <div class="form-group"> |
| 52 | <label class="col-md-4 sg-control-label" for="sg-email"><?php _backupGuardT('Enter email')?></label> |
| 53 | <div class="col-md-8"> |
| 54 | <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" value="<?php echo @$userEmail?>"> |
| 55 | </div> |
| 56 | </div> |
| 57 | </div> |
| 58 | <?php endif; ?> |
| 59 | <div class="form-group"> |
| 60 | <label class="col-md-8 sg-control-label"> |
| 61 | <?php _backupGuardT('Reloads enabled'); ?> |
| 62 | </label> |
| 63 | <div class="col-md-3 pull-right text-right"> |
| 64 | <label class="sg-switch-container"> |
| 65 | <input type="checkbox" name="backup-with-reloadings" class="sg-switch" <?php echo $isReloadingsEnabled?'checked="checked"':''?>> |
| 66 | </label> |
| 67 | </div> |
| 68 | </div> |
| 69 | <?php if (SGBoot::isFeatureAvailable('DELETE_LOCAL_BACKUP_AFTER_UPLOAD')): ?> |
| 70 | <div class="form-group"> |
| 71 | <label class="col-md-8 sg-control-label"> |
| 72 | <?php _backupGuardT('Delete local backup after upload'); ?> |
| 73 | </label> |
| 74 | <div class="col-md-3 pull-right text-right"> |
| 75 | <label class="sg-switch-container"> |
| 76 | <input type="checkbox" name="delete-backup-after-upload" sgFeatureName="DELETE_LOCAL_BACKUP_AFTER_UPLOAD" class="sg-switch" <?php echo $isDeleteBackupAfterUploadEnabled?'checked="checked"':''?>> |
| 77 | </label> |
| 78 | </div> |
| 79 | </div> |
| 80 | <?php endif; ?> |
| 81 | <?php if (SGBoot::isFeatureAvailable('ALERT_BEFORE_UPDATE')): ?> |
| 82 | <div class="form-group"> |
| 83 | <label class="col-md-8 sg-control-label"> |
| 84 | <?php _backupGuardT('Alert before update'); ?> |
| 85 | </label> |
| 86 | <div class="col-md-3 pull-right text-right"> |
| 87 | <label class="sg-switch-container"> |
| 88 | <input type="checkbox" name="alert-before-update" sgFeatureName="ALERT_BEFORE_UPDATE" class="sg-switch" <?php echo $isAlertBeforeUpdateEnabled?'checked="checked"':''?>> |
| 89 | </label> |
| 90 | </div> |
| 91 | </div> |
| 92 | <?php endif; ?> |
| 93 | <?php if (SGBoot::isFeatureAvailable('BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD')): ?> |
| 94 | <div class="form-group"> |
| 95 | <label class="col-md-8 sg-control-label"> |
| 96 | <?php _backupGuardT('Backup deletion will also delete from cloud'); ?> |
| 97 | </label> |
| 98 | <div class="col-md-3 pull-right text-right"> |
| 99 | <label class="sg-switch-container"> |
| 100 | <input type="checkbox" name="delete-backup-from-cloud" sgFeatureName="BACKUP_DELETION_WILL_ALSO_DELETE_FROM_CLOUD" class="sg-switch" <?php echo $isDeleteBackupFromCloudEnabled?'checked="checked"':''?>> |
| 101 | </label> |
| 102 | </div> |
| 103 | </div> |
| 104 | <?php endif; ?> |
| 105 | <div class="form-group"> |
| 106 | <label class="col-md-8 sg-control-label"> |
| 107 | <?php _backupGuardT('Show statistics'); ?> |
| 108 | </label> |
| 109 | <div class="col-md-3 pull-right text-right"> |
| 110 | <label class="sg-switch-container"> |
| 111 | <input type="checkbox" name="show-statistics-widget" class="sg-switch" <?php echo $isShowStatisticsWidgetEnabled?'checked="checked"':''?>> |
| 112 | </label> |
| 113 | </div> |
| 114 | </div> |
| 115 | <?php if (SGBoot::isFeatureAvailable('FTP')): ?> |
| 116 | <div class="form-group"> |
| 117 | <label class="col-md-8 sg-control-label"> |
| 118 | <?php _backupGuardT('FTP passive mode'); ?> |
| 119 | </label> |
| 120 | <div class="col-md-3 pull-right text-right"> |
| 121 | <label class="sg-switch-container"> |
| 122 | <input type="checkbox" name="ftp-passive-mode" sgFeatureName="FTP" class="sg-switch" <?php echo $ftpPassiveMode?'checked="checked"':''?>> |
| 123 | </label> |
| 124 | </div> |
| 125 | </div> |
| 126 | <?php endif; ?> |
| 127 | <?php if (SGBoot::isFeatureAvailable('MULTI_SCHEDULE')): ?> |
| 128 | <div class="form-group"> |
| 129 | <label class="col-md-8 sg-control-label"> |
| 130 | <?php _backupGuardT('Disable ads'); ?> |
| 131 | </label> |
| 132 | <div class="col-md-3 pull-right text-right"> |
| 133 | <label class="sg-switch-container"> |
| 134 | <input type="checkbox" name="sg-hide-ads" sgFeatureName="HIDE_ADS" class="sg-switch" <?php echo $isDisabelAdsEnabled?'checked="checked"':''?>> |
| 135 | </label> |
| 136 | </div> |
| 137 | </div> |
| 138 | <?php endif; ?> |
| 139 | <div class="form-group"> |
| 140 | <label class="col-md-8 sg-control-label"> |
| 141 | <?php _backupGuardT('Download via PHP'); ?> |
| 142 | </label> |
| 143 | <div class="col-md-3 pull-right text-right"> |
| 144 | <label class="sg-switch-container"> |
| 145 | <input type="checkbox" name="sg-download-via-php" sgFeatureName="DOWNLOAD_VIA_PHP" class="sg-switch" <?php echo $isDownloadViaPhp?'checked="checked"':''?>> |
| 146 | </label> |
| 147 | </div> |
| 148 | </div> |
| 149 | |
| 150 | <div class="form-group"> |
| 151 | <label class="col-md-5 sg-control-label" for='sg-paths-to-exclude'><?php _backupGuardT("Exclude paths (separated by commas)")?></label> |
| 152 | <div class="col-md-5 pull-right text-right"> |
| 153 | <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"> |
| 154 | </div> |
| 155 | </div> |
| 156 | |
| 157 | <div class="form-group"> |
| 158 | <label class="col-md-5 sg-control-label" for='sg-tables-to-exclude'><?php _backupGuardT("Tables to exclude (separated by commas)")?></label> |
| 159 | <div class="col-md-5 pull-right text-right"> |
| 160 | <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"> |
| 161 | </div> |
| 162 | </div> |
| 163 | |
| 164 | <?php if (SGBoot::isFeatureAvailable('NUMBER_OF_BACKUPS_TO_KEEP')): ?> |
| 165 | <div class="form-group"> |
| 166 | <label class="col-md-5 sg-control-label" for='amount-of-backups-to-keep'><?php _backupGuardT("Backup retention")?> |
| 167 | </label> |
| 168 | <div class="col-md-5 pull-right text-right"> |
| 169 | <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' : '' ?>> |
| 170 | </div> |
| 171 | </div> |
| 172 | <?php endif; ?> |
| 173 | <div class="form-group"> |
| 174 | <label class="col-md-5 sg-control-label" for='sg-number-of-rows-to-backup'><?php _backupGuardT("Number of rows to backup at once")?></label> |
| 175 | <div class="col-md-5 pull-right text-right"> |
| 176 | <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?>"> |
| 177 | </div> |
| 178 | </div> |
| 179 | |
| 180 | <div class="form-group"> |
| 181 | <label class="col-md-5 sg-control-label" for='sg-background-reload-method'><?php _backupGuardT("Reload method")?></label> |
| 182 | <div class="col-md-5 pull-right text-right"> |
| 183 | <select class="form-control" id='sg-background-reload-method' name='sg-background-reload-method'> |
| 184 | <option value="<?php echo SG_RELOAD_METHOD_CURL ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_CURL ? "selected" : "" ?> >Curl</option> |
| 185 | <option value="<?php echo SG_RELOAD_METHOD_STREAM ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_STREAM ? "selected" : "" ?> >Stream</option> |
| 186 | <option value="<?php echo SG_RELOAD_METHOD_SOCKET ?>" <?php echo $sgBackgroundReloadMethod == SG_RELOAD_METHOD_SOCKET ? "selected" : "" ?> >Socket</option> |
| 187 | </select> |
| 188 | </div> |
| 189 | </div> |
| 190 | <?php if (SGBoot::isFeatureAvailable('CUSTOM_BACKUP_NAME')): ?> |
| 191 | <div class="form-group"> |
| 192 | <label class="col-md-5 sg-control-label"> |
| 193 | <?php _backupGuardT('Backup file name')?> |
| 194 | </label> |
| 195 | <div class="col-md-5 pull-right text-right"> |
| 196 | <input id="backup-file-name" name="backup-file-name" type="text" class="form-control input-md" value="<?php echo $backupFileNamePrefix?>" <?php echo (!SGBoot::isFeatureAvailable('CUSTOM_BACKUP_NAME'))? 'disabled' : '' ?>> |
| 197 | </div> |
| 198 | </div> |
| 199 | <?php endif; ?> |
| 200 | |
| 201 | <div class="form-group"> |
| 202 | <label class="col-md-7 sg-control-label" for="sg-email"><?php _backupGuardT('AJAX request frequency')?></label> |
| 203 | <div class="col-md-5"> |
| 204 | <?php echo selectElement($intervalSelectElement, array('id'=>'sg-ajax-interval', 'name'=>'ajaxInterval', 'class'=>'form-control'), '', $selectedInterval);?> |
| 205 | </div> |
| 206 | </div> |
| 207 | <div class="form-group"> |
| 208 | <label class="col-md-5"><?php _backupGuardT('Backup destination path'); ?></label> |
| 209 | <div class="col-md-6 pull-right text-right"> |
| 210 | <span><?php echo str_replace(realpath(SG_APP_ROOT_DIRECTORY).'/', "" ,realpath(SG_BACKUP_DIRECTORY)); ?></span> |
| 211 | </div> |
| 212 | </div> |
| 213 | <div class="form-group"> |
| 214 | <label class="col-md-4 control-label" for="button1id"></label> |
| 215 | <div class="col-md-8"> |
| 216 | <button type="button" id="sg-save-settings" class="btn btn-success pull-right" onclick="sgBackup.sgsettings();"><?php _backupGuardT('Save')?></button> |
| 217 | </div> |
| 218 | </div> |
| 219 | </fieldset> |
| 220 | </form> |
| 221 | </div> |
| 222 | </div> |
| 223 | </div> |
| 224 | <?php require_once(SG_PUBLIC_INCLUDE_PATH . '/footer.php'); ?> |
| 225 | </div> |
| 226 |