index.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. if (cfr('BANKSTAMD')) {
  3. $altCfg = $ubillingConfig->getAlter();
  4. if (@$altCfg['BANKSTAMD_ENABLED']) {
  5. $banksta = new BankstaMd();
  6. $banksta->catchUploadRequest();
  7. //some list data
  8. if (wf_CheckGet(array('ajbslist'))) {
  9. $banksta->bankstaRenderAjaxList();
  10. }
  11. if (!wf_CheckGet(array('showhash'))) {
  12. if (!wf_CheckGet(array('showdetailed'))) {
  13. //main interface with upload form and loaded banksta list
  14. show_window(__('Upload'), $banksta->renderBankstaLoadForm());
  15. show_window(__('Previously loaded bank statements'), $banksta->renderBankstaList());
  16. zb_BillingStats(true);
  17. } else {
  18. //some row detailed info
  19. show_window(__('Bank statement'), $banksta->bankstaGetDetailedRowInfo($_GET['showdetailed']));
  20. }
  21. } else {
  22. //update contract
  23. if (wf_CheckPost(array('newbankcontr', 'bankstacontractedit'))) {
  24. $banksta->bankstaSetContract($_POST['bankstacontractedit'], $_POST['newbankcontr']);
  25. rcms_redirect($banksta::URL_BANKSTA_PROCESSING . $_GET['showhash']);
  26. }
  27. //locking some row if needed
  28. if (isset($_POST['lockbankstarow'])) {
  29. $banksta->bankstaSetProcessed($_POST['bankstacontractedit']);
  30. rcms_redirect($banksta::URL_BANKSTA_PROCESSING . $_GET['showhash']);
  31. }
  32. //push cash to users if is needed
  33. if (wf_CheckPost(array('bankstaneedpaymentspush'))) {
  34. $banksta->bankstaPushPayments();
  35. rcms_redirect($banksta::URL_BANKSTA_MGMT);
  36. }
  37. //big processing form
  38. show_window(__('Bank statements processing'), $banksta->bankstaProcessingForm($_GET['showhash']));
  39. show_window('', wf_BackLink($banksta::URL_ME));
  40. }
  41. } else {
  42. show_error(__('This module is disabled'));
  43. }
  44. } else {
  45. show_error(__('Access denied'));
  46. }
  47. ?>