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
storeSurveyResult.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(dirname(__FILE__).'/../boot.php'); |
| 4 | require_once(SG_LIB_PATH.'BackupGuard/Client.php'); |
| 5 | |
| 6 | if(backupGuardIsAjax() && count($_POST)) { |
| 7 | $_POST = backupGuardRemoveSlashes($_POST); |
| 8 | $_POST = backupGuardSanitizeTextField($_POST); |
| 9 | |
| 10 | $error = ''; |
| 11 | |
| 12 | if (isset($_POST['skip'])) { |
| 13 | $firstname = 'skip'; |
| 14 | $lastname = 'skip'; |
| 15 | $email = 'skip'; |
| 16 | $response = 'skip'; |
| 17 | $url = site_url(); |
| 18 | } |
| 19 | else { |
| 20 | $firstname = $_POST['firstname']; |
| 21 | $lastname = $_POST['lastname']; |
| 22 | $email = $_POST['email']; |
| 23 | $response = $_POST['response']; |
| 24 | $url = site_url(); |
| 25 | } |
| 26 | |
| 27 | $client = new BackupGuard\Client(); |
| 28 | $id = $client->storeSurveyResult($url, $firstname, $lastname, $email, $response); |
| 29 | |
| 30 | if ($id) { |
| 31 | die('{"success":"success"}'); |
| 32 | } |
| 33 | |
| 34 | die('"'.$error.'"'); |
| 35 | } |
| 36 |