cancelBackup.php
3 years ago
cancelDownload.php
3 years ago
checkBackupCreation.php
3 years ago
checkFreeMigration.php
3 years ago
checkPHPVersionCompatibility.php
3 years ago
checkRestoreCreation.php
3 years ago
chooseProfile.php
3 years ago
cloudDropbox.php
3 years ago
curlChecker.php
3 years ago
deleteBackup.php
3 years ago
downloadBackup.php
3 years ago
getAction.php
3 years ago
getBackupContent.php
3 years ago
getRunningActions.php
3 years ago
hideNotice.php
3 years ago
importBackup.php
3 years ago
isBgUserExists.php
3 years ago
isFeatureAvailable.php
3 years ago
manualBackup.php
3 years ago
modalImport.php
3 years ago
modalManualBackup.php
3 years ago
modalManualRestore.php
3 years ago
modalPrivacy.php
3 years ago
modalReview.php
3 years ago
modalTerms.php
3 years ago
resetStatus.php
3 years ago
restore.php
3 years ago
reviewBannerActions.php
3 years ago
schedule.php
3 years ago
setReviewPopupState.php
3 years ago
settings.php
3 years ago
modalManualBackup.php
163 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 | $pCloud = SGConfig::get('SG_P_CLOUD_ACCESS_TOKEN'); |
| 12 | $box = SGConfig::get('SG_BOX_REFRESH_TOKEN'); |
| 13 | $backupGuard = SGConfig::get('SG_BACKUPGUARD_UPLOAD_ACCESS_TOKEN'); |
| 14 | |
| 15 | $backupType = (int)@$_GET['backupType']; |
| 16 | $infoIconHtml = '<span class="dashicons dashicons-editor-help sgbg-info-icon"></span>'; |
| 17 | ?> |
| 18 | <div class="modal-dialog"> |
| 19 | <div class="modal-content"> |
| 20 | <div class="modal-header"> |
| 21 | <div id="sg-modal-manual-backup-header"> |
| 22 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 23 | <h4 class="modal-title"><?php ($backupType == SG_BACKUP_METHOD_MIGRATE) ? _backupGuardT("Prepare migration package") : _backupGuardT("Manual Backup") ?></h4> |
| 24 | </div> |
| 25 | </div> |
| 26 | <form class="form-horizontal" method="post" id="manualBackup"> |
| 27 | <div class="modal-body sg-modal-body"> |
| 28 | <!-- Multiple Radios --> |
| 29 | <div class="form-group"> |
| 30 | <div class="col-md-12"> |
| 31 | <input type="text" name="sg-custom-backup-name" id="sg-custom-backup-name" |
| 32 | class="sg-backup-input" placeholder="Custom backup name (optional)"> |
| 33 | </div> |
| 34 | <div class="col-md-12"> |
| 35 | <div class="radio"> |
| 36 | <label for="full-backup-radio"> |
| 37 | <input type="radio" name="backupType" id="full-backup-radio" value="1" |
| 38 | checked="checked"> |
| 39 | <?php _backupGuardT('Full backup'); ?> |
| 40 | </label> |
| 41 | </div> |
| 42 | <div class="radio"> |
| 43 | <label for="custom-backup-radio"> |
| 44 | <input type="radio" name="backupType" id="custom-backup-radio" value="2"> |
| 45 | <?php _backupGuardT('Custom backup'); ?> |
| 46 | </label> |
| 47 | </div> |
| 48 | <div class="col-md-12 sg-custom-backup"> |
| 49 | <?php backupGuardGetBackupTablesHTML(); ?> |
| 50 | <div class="checkbox sg-no-padding-top"> |
| 51 | <label for="custom-backupfiles-chbx"> |
| 52 | <input type="checkbox" class="sg-custom-option" name="backupFiles" |
| 53 | id="custom-backupfiles-chbx"> |
| 54 | <span class="sg-checkbox-label-text"><?php _backupGuardT('Backup files'); ?></span> |
| 55 | </label> |
| 56 | <!--Files--> |
| 57 | <div class="col-md-12 sg-checkbox sg-custom-backup-files"> |
| 58 | <?php foreach ($directories as $directory) : ?> |
| 59 | <div class="checkbox"> |
| 60 | <label for="<?php echo 'sgbg' . $directory ?>"> |
| 61 | <input type="checkbox" name="directory[]" |
| 62 | id="<?php echo 'sgbg' . $directory; ?>" |
| 63 | value="<?php echo $directory; ?>"> |
| 64 | <span class="sg-checkbox-label-text"><?php echo basename($directory); ?></span> |
| 65 | </label> |
| 66 | </div> |
| 67 | <?php endforeach; ?> |
| 68 | </div> |
| 69 | </div> |
| 70 | </div> |
| 71 | <div class="clearfix"></div> |
| 72 | <?php if (SGBoot::isFeatureAvailable('STORAGE')) : ?> |
| 73 | <!--Cloud--> |
| 74 | <div class="checkbox sg-no-padding-top"> |
| 75 | <label for="custom-backupcloud-chbx"> |
| 76 | <input type="checkbox" name="backupCloud" id="custom-backupcloud-chbx"> |
| 77 | <span class="sg-checkbox-label-text"><?php _backupGuardT('Upload to cloud'); ?></span> |
| 78 | </label> |
| 79 | <!--Storages--> |
| 80 | <div class="col-md-12 sg-checkbox sg-custom-backup-cloud"> |
| 81 | <?php if (SGBoot::isFeatureAvailable('FTP')) : ?> |
| 82 | <div class="checkbox"> |
| 83 | <label for="cloud-ftp" <?php echo empty($ftp) ? 'data-toggle="tooltip" data-bs-placement="right" title="' . _backupGuardT('FTP is not active.', true) . '"' : '' ?>> |
| 84 | <input type="checkbox" name="backupStorages[]" id="cloud-ftp" |
| 85 | value="<?php echo SG_STORAGE_FTP ?>" <?php echo empty($ftp) ? 'disabled="disabled"' : '' ?>> |
| 86 | <span class="sg-checkbox-label-text"><?php echo 'FTP' ?></span> |
| 87 | </label> |
| 88 | </div> |
| 89 | <?php endif; ?> |
| 90 | <?php if (SGBoot::isFeatureAvailable('DROPBOX')) : ?> |
| 91 | <div class="checkbox"> |
| 92 | <label for="cloud-dropbox" <?php echo empty($dropbox) ? 'data-toggle="tooltip" data-bs-placement="right" title="' . _backupGuardT('Dropbox is not active.', true) . '"' : '' ?>> |
| 93 | <input type="checkbox" name="backupStorages[]" id="cloud-dropbox" |
| 94 | value="<?php echo SG_STORAGE_DROPBOX ?>" |
| 95 | <?php echo empty($dropbox) ? 'disabled="disabled"' : '' ?>> |
| 96 | <span class="sg-checkbox-label-text"><?php echo 'Dropbox' ?></span> |
| 97 | </label> |
| 98 | </div> |
| 99 | <?php endif; ?> |
| 100 | <?php if (SGBoot::isFeatureAvailable('GOOGLE_DRIVE')) : ?> |
| 101 | <div class="checkbox"> |
| 102 | <label for="cloud-gdrive" <?php echo empty($gdrive) ? 'data-toggle="tooltip" data-bs-placement="right" title="' . _backupGuardT('Google Drive is not active.', true) . '"' : '' ?>> |
| 103 | <input type="checkbox" name="backupStorages[]" id="cloud-gdrive" |
| 104 | value="<?php echo SG_STORAGE_GOOGLE_DRIVE ?>" |
| 105 | <?php echo empty($gdrive) ? 'disabled="disabled"' : '' ?>> |
| 106 | <span class="sg-checkbox-label-text"><?php echo 'Google Drive' ?></span> |
| 107 | </label> |
| 108 | </div> |
| 109 | <?php endif; ?> |
| 110 | <?php if (SGBoot::isFeatureAvailable('AMAZON')) : ?> |
| 111 | <div class="checkbox"> |
| 112 | <label for="cloud-amazon" <?php echo empty($amazon) ? 'data-toggle="tooltip" data-bs-placement="right" title="' . _backupGuardT((backupGuardIsAccountGold() ? 'Amazon ' : '') . 'S3 is not active.', true) . '"' : '' ?>> |
| 113 | <input type="checkbox" name="backupStorages[]" id="cloud-amazon" |
| 114 | value="<?php echo SG_STORAGE_AMAZON ?>" |
| 115 | <?php echo empty($amazon) ? 'disabled="disabled"' : '' ?>> |
| 116 | <span class="sg-checkbox-label-text"><?php echo (backupGuardIsAccountGold() ? 'Amazon ' : '') . 'S3' ?></span> |
| 117 | </label> |
| 118 | </div> |
| 119 | <?php endif; ?> |
| 120 | <?php if (SGBoot::isFeatureAvailable('ONE_DRIVE')) : ?> |
| 121 | <div class="checkbox"> |
| 122 | <label for="cloud-one-drive" <?php echo empty($oneDrive) ? 'data-toggle="tooltip" data-bs-placement="right" title="' . _backupGuardT('One Drive is not active.', true) . '"' : '' ?>> |
| 123 | <input type="checkbox" name="backupStorages[]" id="cloud-one-drive" |
| 124 | value="<?php echo SG_STORAGE_ONE_DRIVE ?>" <?php echo empty($oneDrive) ? 'disabled="disabled"' : '' ?>> |
| 125 | <span class="sg-checkbox-label-text"><?php echo 'One Drive' ?></span> |
| 126 | </label> |
| 127 | </div> |
| 128 | <?php endif; ?> |
| 129 | <?php if (SGBoot::isFeatureAvailable('P_CLOUD')) : ?> |
| 130 | <div class="checkbox"> |
| 131 | <label for="cloud-p-cloud" <?php echo empty($pCloud) ? 'data-toggle="tooltip" data-bs-placement="right" title="' . _backupGuardT('pCloud is not active.', true) . '"' : '' ?>> |
| 132 | <input type="checkbox" name="backupStorages[]" id="cloud-p-cloud" |
| 133 | value="<?php echo SG_STORAGE_P_CLOUD ?>" <?php echo empty($pCloud) ? 'disabled="disabled"' : '' ?>> |
| 134 | <span class="sg-checkbox-label-text"><?php echo 'pCloud' ?></span> |
| 135 | </label> |
| 136 | </div> |
| 137 | <?php endif; ?> |
| 138 | <?php if (SGBoot::isFeatureAvailable('BOX')) : ?> |
| 139 | <div class="checkbox"> |
| 140 | <label for="cloud-box" <?php echo empty($box) ? 'data-toggle="tooltip" data-bs-placement="right" title="' . _backupGuardT('box.com is not active.', true) . '"' : '' ?>> |
| 141 | <input type="checkbox" name="backupStorages[]" id="cloud-box" |
| 142 | value="<?php echo SG_STORAGE_BOX ?>" <?php echo empty($box) ? 'disabled="disabled"' : '' ?>> |
| 143 | <span class="sg-checkbox-label-text"><?php echo 'box.com' ?></span> |
| 144 | </label> |
| 145 | </div> |
| 146 | <?php endif; ?> |
| 147 | </div> |
| 148 | <div class="clearfix"></div> |
| 149 | </div> |
| 150 | <?php endif; ?> |
| 151 | </div> |
| 152 | </div> |
| 153 | </div> |
| 154 | <div class="modal-footer"> |
| 155 | <input type="text" name="backup-type" value="<?php echo $backupType ?>" hidden> |
| 156 | <span class="modal-close-button" data-dismiss="modal">Close</span> |
| 157 | <button type="button" onclick="sgBackup.manualBackup()" |
| 158 | class="btn btn-success"><?php _backupGuardT('Backup') ?></button> |
| 159 | </div> |
| 160 | </form> |
| 161 | </div> |
| 162 | </div> |
| 163 |