awake.php
5 years ago
cancelBackup.php
5 years ago
cancelDownload.php
5 years ago
checkBackupCreation.php
5 years ago
checkPHPVersionCompatibility.php
5 years ago
checkRestoreCreation.php
5 years ago
cloudDropbox.php
5 years ago
curlChecker.php
5 years ago
deleteBackup.php
5 years ago
dismissDiscountNotice.php
5 years ago
downloadBackup.php
5 years ago
getAction.php
5 years ago
getBackupContent.php
5 years ago
getRunningActions.php
5 years ago
hideNotice.php
5 years ago
importBackup.php
5 years ago
isFeatureAvailable.php
5 years ago
manualBackup.php
5 years ago
modalImport.php
5 years ago
modalManualBackup.php
5 years ago
modalManualRestore.php
5 years ago
modalPrivacy.php
5 years ago
modalReview.php
5 years ago
modalTerms.php
5 years ago
resetStatus.php
5 years ago
restore.php
5 years ago
reviewBannerActions.php
5 years ago
schedule.php
5 years ago
setReviewPopupState.php
5 years ago
setUserInfoVerificationPopupState.php
5 years ago
settings.php
5 years ago
storeSubscriberInfo.php
5 years ago
storeSurveyResult.php
5 years ago
modalManualBackup.php
139 lines
| 1 | <?php |
| 2 | require_once(dirname(__FILE__).'/../boot.php'); |
| 3 | |
| 4 | $directories = SG_BACKUP_FILE_PATHS; |
| 5 | $directories = explode(',', $directories); |
| 6 | $dropbox = SGConfig::get('SG_DROPBOX_ACCESS_TOKEN'); |
| 7 | $gdrive = SGConfig::get('SG_GOOGLE_DRIVE_REFRESH_TOKEN'); |
| 8 | $ftp = SGConfig::get('SG_STORAGE_FTP_CONNECTED'); |
| 9 | $amazon = SGConfig::get('SG_AMAZON_KEY'); |
| 10 | $oneDrive = SGConfig::get('SG_ONE_DRIVE_REFRESH_TOKEN'); |
| 11 | |
| 12 | $backupType = (int)@$_GET['backupType']; |
| 13 | ?> |
| 14 | <div class="modal-dialog"> |
| 15 | <div class="modal-content"> |
| 16 | <div class="modal-header"> |
| 17 | <div id="sg-modal-manual-backup-header"> |
| 18 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 19 | <h4 class="modal-title"><?php ($backupType == SG_BACKUP_METHOD_MIGRATE)?_backupGuardT("Prepare migration package"):_backupGuardT("Manual Backup") ?></h4> |
| 20 | </div> |
| 21 | </div> |
| 22 | <form class="form-horizontal" method="post" id="manualBackup"> |
| 23 | <div class="modal-body sg-modal-body"> |
| 24 | <!-- Multiple Radios --> |
| 25 | <div class="form-group"> |
| 26 | <div class="col-md-12"> |
| 27 | <input type="text" name="sg-custom-backup-name" id="sg-custom-backup-name" class="sg-backup-input" placeholder="Custom backup name (optional)"> |
| 28 | </div> |
| 29 | <div class="col-md-12"> |
| 30 | <div class="radio"> |
| 31 | <label for="fullbackup-radio"> |
| 32 | <input type="radio" name="backupType" id="fullbackup-radio" value="1" checked="checked"> |
| 33 | <?php _backupGuardT('Full backup'); ?> |
| 34 | </label> |
| 35 | </div> |
| 36 | <div class="radio"> |
| 37 | <label for="custombackup-radio"> |
| 38 | <input type="radio" name="backupType" id="custombackup-radio" value="2"> |
| 39 | <?php _backupGuardT('Custom backup'); ?> |
| 40 | </label> |
| 41 | </div> |
| 42 | <div class="col-md-12 sg-custom-backup"> |
| 43 | <?php backupGuardGetBackupTablesHTML(); ?> |
| 44 | <div class="checkbox sg-no-padding-top"> |
| 45 | <label for="custombackupfiles-chbx"> |
| 46 | <input type="checkbox" class="sg-custom-option" name="backupFiles" id="custombackupfiles-chbx"> |
| 47 | <?php _backupGuardT('Backup files'); ?> |
| 48 | </label> |
| 49 | <!--Files--> |
| 50 | <div class="col-md-12 sg-checkbox sg-custom-backup-files"> |
| 51 | <?php foreach ($directories as $directory): ?> |
| 52 | <div class="checkbox"> |
| 53 | <label for="<?php echo 'sg'.$directory?>"> |
| 54 | <input type="checkbox" name="directory[]" id="<?php echo 'sg'.$directory;?>" value="<?php echo $directory;?>"> |
| 55 | <?php echo basename($directory);?> |
| 56 | </label> |
| 57 | </div> |
| 58 | <?php endforeach;?> |
| 59 | </div> |
| 60 | </div> |
| 61 | </div> |
| 62 | <div class="clearfix"></div> |
| 63 | <?php if(SGBoot::isFeatureAvailable('STORAGE')): ?> |
| 64 | <!--Cloud--> |
| 65 | <div class="checkbox sg-no-padding-top"> |
| 66 | <label for="custombackupcloud-chbx"> |
| 67 | <input type="checkbox" name="backupCloud" id="custombackupcloud-chbx"> |
| 68 | <?php _backupGuardT('Upload to cloud'); ?> |
| 69 | </label> |
| 70 | <!--Storages--> |
| 71 | <div class="col-md-12 sg-checkbox sg-custom-backup-cloud"> |
| 72 | <?php if(SGBoot::isFeatureAvailable('FTP')): ?> |
| 73 | <div class="checkbox"> |
| 74 | <label for="cloud-ftp" <?php echo empty($ftp)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('FTP is not active.',true).'"':''?>> |
| 75 | <input type="checkbox" name="backupStorages[]" id="cloud-ftp" value="<?php echo SG_STORAGE_FTP ?>" <?php echo empty($ftp)?'disabled="disabled"':''?>> |
| 76 | <?php echo 'FTP' ?> |
| 77 | </label> |
| 78 | </div> |
| 79 | <?php endif; ?> |
| 80 | <?php if(SGBoot::isFeatureAvailable('DROPBOX')): ?> |
| 81 | <div class="checkbox"> |
| 82 | <label for="cloud-dropbox" <?php echo empty($dropbox)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('Dropbox is not active.',true).'"':''?>> |
| 83 | <input type="checkbox" name="backupStorages[]" id="cloud-dropbox" value="<?php echo SG_STORAGE_DROPBOX ?>" |
| 84 | <?php echo empty($dropbox)?'disabled="disabled"':''?>> |
| 85 | <?php echo 'Dropbox' ?> |
| 86 | </label> |
| 87 | </div> |
| 88 | <?php endif; ?> |
| 89 | <?php if(SGBoot::isFeatureAvailable('GOOGLE_DRIVE')): ?> |
| 90 | <div class="checkbox"> |
| 91 | <label for="cloud-gdrive" <?php echo empty($gdrive)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('Google Drive is not active.',true).'"':''?>> |
| 92 | <input type="checkbox" name="backupStorages[]" id="cloud-gdrive" value="<?php echo SG_STORAGE_GOOGLE_DRIVE?>" |
| 93 | <?php echo empty($gdrive)?'disabled="disabled"':''?>> |
| 94 | <?php echo 'Google Drive' ?> |
| 95 | </label> |
| 96 | </div> |
| 97 | <?php endif; ?> |
| 98 | <?php if(SGBoot::isFeatureAvailable('AMAZON')): ?> |
| 99 | <div class="checkbox"> |
| 100 | <label for="cloud-amazon" <?php echo empty($amazon)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT((backupGuardIsAccountGold()? 'Amazon ':'').'S3 is not active.',true).'"':''?>> |
| 101 | <input type="checkbox" name="backupStorages[]" id="cloud-amazon" value="<?php echo SG_STORAGE_AMAZON?>" |
| 102 | <?php echo empty($amazon)?'disabled="disabled"':''?>> |
| 103 | <?php echo (backupGuardIsAccountGold()? 'Amazon ':'').'S3' ?> |
| 104 | </label> |
| 105 | </div> |
| 106 | <?php endif; ?> |
| 107 | <?php if(SGBoot::isFeatureAvailable('ONE_DRIVE')): ?> |
| 108 | <div class="checkbox"> |
| 109 | <label for="cloud-one-drive" <?php echo empty($oneDrive)?'data-toggle="tooltip" data-placement="right" title="'._backupGuardT('One Drive is not active.', true).'"':''?>> |
| 110 | <input type="checkbox" name="backupStorages[]" id="cloud-one-drive" value="<?php echo SG_STORAGE_ONE_DRIVE?>" <?php echo empty($oneDrive)?'disabled="disabled"':''?>> |
| 111 | <?php echo 'One Drive' ?> |
| 112 | </label> |
| 113 | </div> |
| 114 | <?php endif;?> |
| 115 | </div> |
| 116 | <div class="clearfix"></div> |
| 117 | </div> |
| 118 | <?php endif; ?> |
| 119 | <!-- Background mode --> |
| 120 | <?php if(SGBoot::isFeatureAvailable('BACKGROUND_MODE')): ?> |
| 121 | <div class="checkbox"> |
| 122 | <label for="background-chbx"> |
| 123 | <input type="checkbox" name="backgroundMode" id="background-chbx"> |
| 124 | <?php _backupGuardT('Background mode'); ?> |
| 125 | </label> |
| 126 | </div> |
| 127 | <?php endif; ?> |
| 128 | </div> |
| 129 | </div> |
| 130 | </div> |
| 131 | <div class="modal-footer"> |
| 132 | <input type="text" name="backup-type" value="<?php echo $backupType?>" hidden> |
| 133 | <span class="modal-close-button" data-dismiss="modal">Close</span> |
| 134 | <button type="button" onclick="sgBackup.manualBackup()" class="btn btn-success"><?php _backupGuardT('Backup')?></button> |
| 135 | </div> |
| 136 | </form> |
| 137 | </div> |
| 138 | </div> |
| 139 |