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
modalManualRestore.php
87 lines
| 1 | <?php |
| 2 | |
| 3 | require_once dirname(__FILE__) . '/../boot.php'; |
| 4 | require_once(SG_BACKUP_PATH . 'SGBackup.php'); |
| 5 | require_once(SG_LIB_PATH . 'BackupGuard/Core/SGBGArchive.php'); |
| 6 | $backupName = sanitize_text_field($_GET['param']); |
| 7 | $backupName = backupGuardRemoveSlashes($backupName); |
| 8 | $backupPath = SG_BACKUP_DIRECTORY . $backupName; |
| 9 | $backupPath = $backupPath . '/' . $backupName . '.sgbp'; |
| 10 | |
| 11 | $backup = new SGBackup(); |
| 12 | $archive = new SGBGArchive($backupPath); |
| 13 | $archive->setDelegate($backup); |
| 14 | $archive->open('r'); |
| 15 | $headers = $archive->getHeaders(); |
| 16 | |
| 17 | if(isset($headers["selectivRestoreable"]) && $headers["selectivRestoreable"]){ |
| 18 | ?> |
| 19 | <div class="modal-dialog"> |
| 20 | <div class="modal-content"> |
| 21 | <div class="modal-header"> |
| 22 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 23 | <h4 class="modal-title"><?php _backupGuardT("Manual Restore") ?></h4> |
| 24 | </div> |
| 25 | <form class="form-horizontal" method="post" id="manualBackup"> |
| 26 | <div class="modal-body sg-modal-body"> |
| 27 | <!-- Multiple Radios --> |
| 28 | <div class="form-group"> |
| 29 | <div class="col-md-12"> |
| 30 | <div class="radio"> |
| 31 | <label for="fullrestore-radio"> |
| 32 | <input type="radio" name="restoreType" id="fullrestore-radio" |
| 33 | value="<?php echo SG_RESTORE_MODE_FULL ?>" checked="checked"> |
| 34 | <?php _backupGuardT('Full restore'); ?> |
| 35 | </label> |
| 36 | </div> |
| 37 | <div class="radio"> |
| 38 | <label for="filerestore-radio"> |
| 39 | <input type="radio" name="restoreType" id="filerestore-radio" |
| 40 | value="<?php echo SG_RESTORE_MODE_FILES ?>"> |
| 41 | <?php _backupGuardT('Restore files'); ?> |
| 42 | </label> |
| 43 | </div> |
| 44 | <?php if (SGBoot::isFeatureAvailable('SLECTIVE_RESTORE')) : ?> |
| 45 | <?php //backupGuardGetFileSelectiveRestore(); ?> |
| 46 | <?php endif; ?> |
| 47 | <div class="radio"> |
| 48 | <label for="dbrestore-radio"> |
| 49 | <input type="radio" name="restoreType" id="dbrestore-radio" |
| 50 | value="<?php echo SG_RESTORE_MODE_DB ?>"> |
| 51 | <?php _backupGuardT('Restore DB'); ?> |
| 52 | </label> |
| 53 | </div> |
| 54 | |
| 55 | </div> |
| 56 | </div> |
| 57 | </div> |
| 58 | <div class="modal-footer"> |
| 59 | <span class="modal-close-button" data-dismiss="modal">Close</span> |
| 60 | <button type="button" |
| 61 | onclick="sgBackup.startRestore('<?php echo addslashes(htmlspecialchars($backupName)) ?>')" |
| 62 | class="btn btn-success"><?php _backupGuardT('Restore') ?></button> |
| 63 | </div> |
| 64 | </form> |
| 65 | </div> |
| 66 | </div> |
| 67 | <?php |
| 68 | } else { |
| 69 | ?> |
| 70 | <div class="modal-dialog"> |
| 71 | <div class="modal-content"> |
| 72 | <div class="modal-header"> |
| 73 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 74 | <h4 class="modal-title"><?php _backupGuardT("Are you sure?") ?></h4> |
| 75 | </div> |
| 76 | <div class="modal-footer"> |
| 77 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
| 78 | <button type="button" onclick="sgBackup.startRestore('<?php echo htmlspecialchars($backupName) ?>')" |
| 79 | class="btn btn-primary"><?php _backupGuardT('Restore') ?></button> |
| 80 | </div> |
| 81 | </div> |
| 82 | </div> |
| 83 | <?php |
| 84 | } |
| 85 | |
| 86 | |
| 87 |