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