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
manualBackup.php
37 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(dirname(__FILE__) . '/../boot.php'); |
| 4 | require_once(SG_BACKUP_PATH . 'SGBackup.php'); |
| 5 | |
| 6 | try { |
| 7 | $state = false; |
| 8 | $success = array('success' => 1); |
| 9 | |
| 10 | if (backupGuardIsAjax() && count($_POST)) { |
| 11 | $allActions = SGBackup::getRunningActions(); |
| 12 | if (count($allActions)) { // abort any other backup if there is an active action |
| 13 | die(json_encode(array( |
| 14 | "error" => _backupGuardT("There is an active backup running. Please try later", true) |
| 15 | ))); |
| 16 | } |
| 17 | |
| 18 | $options = $_POST; |
| 19 | $error = array(); |
| 20 | SGConfig::set("SG_BACKUP_TYPE", (int)$options['backup-type']); |
| 21 | |
| 22 | $options = backupGuardGetBackupOptions($options); |
| 23 | |
| 24 | $sgbgBackup = new SGBackup(); |
| 25 | $sgbgBackup->backup($options); |
| 26 | |
| 27 | die(json_encode($success)); |
| 28 | } |
| 29 | |
| 30 | die(json_encode(array( |
| 31 | "error" => "Direct call" |
| 32 | ))); |
| 33 | } catch (SGException $exception) { |
| 34 | array_push($error, $exception->getMessage()); |
| 35 | die(json_encode($error)); |
| 36 | } |
| 37 |