discountprocessing.php 611 B

12345678910111213141516171819202122232425
  1. <?php
  2. /*
  3. * Discount processing
  4. */
  5. if (ubRouting::get('action') == 'discountprocessing') {
  6. if ($alterconf['DISCOUNTS_ENABLED']) {
  7. $runAllowedFlag = true;
  8. if (ubRouting::checkGet('lastday')) {
  9. if (date("d") != date("t")) {
  10. $runAllowedFlag = false;
  11. }
  12. }
  13. if ($runAllowedFlag) {
  14. $discounts = new Discounts();
  15. $discounts->processPayments();
  16. die('OK:DISCOUNTS_PROCESSING');
  17. } else {
  18. die('OK:DISCOUNTS_SKIPPED');
  19. }
  20. } else {
  21. die('ERROR:DISCOUNTS_DISABLED');
  22. }
  23. }