callshistusrupd.php 728 B

123456789101112131415161718192021
  1. <?php
  2. if (ubRouting::get('action') == 'callshistusrupd') {
  3. if ($alterconf['CALLSHIST_ENABLED']) {
  4. $callsHistUpdProcess = new StarDust('CALLSHIST_UPD');
  5. if ($callsHistUpdProcess->notRunning()) {
  6. $callsHistUpdProcess->start();
  7. $callsHistory = new CallsHistory();
  8. $updateResult = $callsHistory->updateUnknownLogins(true);
  9. print('GUESSED:' . $updateResult['GUESSED'] . ' ');
  10. print('MISSED:' . $updateResult['MISSED'] . ' ');
  11. $callsHistUpdProcess->stop();
  12. die('OK:CALLSHIST_USERS_UPDATE');
  13. } else {
  14. die('ERROR:CALLSHIST_ALREADY_RUNS');
  15. }
  16. } else {
  17. die('ERROR:CALLSHIST_DISABLED');
  18. }
  19. }