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
reviewBannerActions.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(SG_LIB_PATH . 'SGReviewManager.php'); |
| 4 | $type = $_POST['type']; |
| 5 | |
| 6 | if ($type == 'dayCount') { |
| 7 | $timeDate = new \DateTime('now'); |
| 8 | $installTime = strtotime($timeDate->format('Y-m-d H:i:s')); |
| 9 | SGConfig::set('installDate', $installTime); |
| 10 | $timeDate->modify('+' . SG_BACKUP_REVIEW_PERIOD . ' day'); |
| 11 | |
| 12 | $timeNow = strtotime($timeDate->format('Y-m-d H:i:s')); |
| 13 | SGConfig::set('openNextTime', $timeNow); |
| 14 | |
| 15 | $usageDays = SGConfig::get('usageDays'); |
| 16 | $usageDays += SG_BACKUP_REVIEW_PERIOD; |
| 17 | SGConfig::set('usageDays', $usageDays); |
| 18 | } else if ($type == 'backupCount') { |
| 19 | $backupCountReview = SGConfig::get('backupReviewCount'); |
| 20 | if (empty($backupCountReview)) { |
| 21 | $backupCountReview = SGReviewManager::getBackupCounts(); |
| 22 | } |
| 23 | $backupCountReview += SG_BACKUP_REVIEW_BACKUP_COUNT; |
| 24 | SGConfig::set('backupReviewCount', $backupCountReview); |
| 25 | } else if ($type == 'restoreCount') { |
| 26 | $restoreReviewCount = SGConfig::get('restoreReviewCount'); |
| 27 | if (empty($restoreReviewCount)) { |
| 28 | $restoreReviewCount = SGReviewManager::getBackupRestoreCounts(); |
| 29 | } |
| 30 | $restoreReviewCount += SG_BACKUP_REVIEW_RESTORE_COUNT; |
| 31 | SGConfig::set('restoreReviewCount', $restoreReviewCount); |
| 32 | } |
| 33 |