index.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. if ($ubillingConfig->getAlterParam('DEALWITHIT_ENABLED')) {
  3. if (cfr('DEALWITHIT')) {
  4. $dealWithIt = new DealWithIt();
  5. if (ubRouting::checkGet('username')) {
  6. $login = ubRouting::get('username');
  7. //creating new task
  8. if (ubRouting::checkPost('newschedlogin')) {
  9. $createResult = $dealWithIt->catchCreateRequest();
  10. if ($createResult) {
  11. show_error($createResult);
  12. } else {
  13. rcms_redirect(DealWithIt::URL_ME . '&username=' . $login);
  14. }
  15. }
  16. //deleting existing task
  17. if (ubRouting::checkGet('deletetaskid')) {
  18. $dealWithIt->deleteTask(ubRouting::get('deletetaskid', 'int'));
  19. rcms_redirect(DealWithIt::URL_ME . '&username=' . $login);
  20. }
  21. //displaying interface parts
  22. show_window(__('Create new task'), $dealWithIt->renderCreateForm());
  23. //json reply
  24. if (ubRouting::checkGet('ajax')) {
  25. $dealWithIt->AjaxDataTasksList();
  26. }
  27. show_window(__('Held jobs for this user'), $dealWithIt->renderTasksListAjax());
  28. show_window('', web_UserControls($login));
  29. } elseif (ubRouting::checkPost('newschedloginsarr')) {
  30. $createMassResult = $dealWithIt->catchCreateMassRequest();
  31. if ($createMassResult) {
  32. show_error($createMassResult);
  33. $dealWithIt->renderDealWithItControl();
  34. } else {
  35. rcms_redirect('?module=report_dealwithit');
  36. }
  37. } else {
  38. if (ubRouting::checkGet('ajinput')) {
  39. $dealWithIt->catchAjRequest();
  40. } else {
  41. $dealWithIt->renderDealWithItControl();
  42. }
  43. }
  44. } else {
  45. show_error(__('Access denied'));
  46. }
  47. } else {
  48. show_error(__('This module is disabled'));
  49. }
  50. ?>