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
resetStatus.php
26 lines
| 1 | <?php |
| 2 | require_once(dirname(__FILE__).'/../boot.php'); |
| 3 | require_once(SG_BACKUP_PATH.'SGBackup.php'); |
| 4 | |
| 5 | if(backupGuardIsAjax() && count($_POST)) { |
| 6 | $error = array(); |
| 7 | try { |
| 8 | |
| 9 | if (isset($_POST['backupName']) && $_POST['backupName']) { |
| 10 | if (file_exists(SG_BACKUP_DIRECTORY.$_POST['backupName'])) { |
| 11 | throw new SGExceptionForbidden($_POST['backupName']." backup already exists"); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | @unlink(SG_BACKUP_DIRECTORY.'sg_backup.state'); |
| 16 | SGConfig::set('SG_RUNNING_ACTION', 0, true); |
| 17 | $key = md5(microtime(true)); |
| 18 | SGConfig::set('SG_BACKUP_CURRENT_KEY', $key, true); |
| 19 | die('{"success":1}'); |
| 20 | } |
| 21 | catch(SGException $exception) { |
| 22 | array_push($error, $exception->getMessage()); |
| 23 | die(json_encode($error)); |
| 24 | } |
| 25 | } |
| 26 |