awake.php
9 years ago
bgLogin.php
5 years ago
cancelBackup.php
9 years ago
cancelDownload.php
7 years ago
checkBackupCreation.php
5 years ago
checkFreeMigration.php
5 years ago
checkPHPVersionCompatibility.php
6 years ago
checkRestoreCreation.php
6 years ago
chooseProfile.php
5 years ago
cloudDropbox.php
3 years ago
createCloudUser.php
5 years ago
curlChecker.php
8 years ago
deleteBackup.php
6 years ago
dismissDiscountNotice.php
5 years ago
downloadBackup.php
6 years ago
getAction.php
9 years ago
getBackupContent.php
8 years ago
getRunningActions.php
9 years ago
hideNotice.php
9 years ago
importBackup.php
5 years ago
isBgUserExists.php
5 years ago
isFeatureAvailable.php
7 years ago
manualBackup.php
7 years ago
modalBackupGuardDetails.php
5 years ago
modalImport.php
4 years ago
modalManualBackup.php
5 years ago
modalManualRestore.php
6 years ago
modalPrivacy.php
7 years ago
modalReview.php
7 years ago
modalTerms.php
7 years ago
resetStatus.php
7 years ago
restore.php
8 years ago
reviewBannerActions.php
6 years ago
schedule.php
3 years ago
sendUsageStatus.php
5 years ago
setReviewPopupState.php
9 years ago
setUserInfoVerificationPopupState.php
7 years ago
settings.php
4 years ago
storeSubscriberInfo.php
5 years ago
storeSurveyResult.php
7 years ago
importBackup.php
25 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.'SGUploadHandler.php'); |
| 6 | |
| 7 | $error = array(); |
| 8 | $success = array('success'=>1); |
| 9 | |
| 10 | try { |
| 11 | |
| 12 | if (!current_user_can('administrator')) { |
| 13 | die(); |
| 14 | } |
| 15 | |
| 16 | $sgUploadHandler = new BackupGuard\Upload\Handler($_FILES); |
| 17 | } |
| 18 | catch (SGException $exception) { |
| 19 | array_push($error, $exception->getMessage()); |
| 20 | die(json_encode($error)); |
| 21 | } |
| 22 | |
| 23 | echo json_encode($success); |
| 24 | die(); |
| 25 |