reminder.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /*
  3. * send sms queue to remind users about payments
  4. */
  5. if (ubRouting::get('action') == 'reminder') {
  6. global $ubillingConfig;
  7. if ($ubillingConfig->getAlterParam('REMINDER_ENABLED')) {
  8. if ($ubillingConfig->getAlterParam('SENDDOG_ENABLED')) {
  9. $sms = new Reminder();
  10. log_register(''); // just a visual separation of processing in weblogs
  11. if (wf_CheckGet(array('param'))) {
  12. if ($_GET['param'] == 'force') {
  13. log_register('REMINDER: FORCED processing STARTED....');
  14. $sms->forceRemind();
  15. log_register('REMINDER: FORCED processing FINISHED');
  16. } else {
  17. die('ERROR:WRONG PARAM');
  18. }
  19. } else {
  20. log_register('REMINDER: REGULAR processing STARTED....');
  21. $sms->remindUsers();
  22. log_register('REMINDER: REGULAR processing FINISHED');
  23. }
  24. log_register(''); // just a visual separation of processing in weblogs
  25. die('OK:SEND REMIND SMS');
  26. } else {
  27. die('ERROR:SENDDOG_REQUIRED');
  28. }
  29. } else {
  30. die('ERROR:REMINDER DISABLED');
  31. }
  32. }