index.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. if (cfr('CONDET')) {
  3. $altCfg = $ubillingConfig->getAlter();
  4. if ($altCfg['CONDET_ENABLED']) {
  5. $conDet = new ConnectionDetails();
  6. //json reply
  7. if (wf_CheckGet(array('ajax'))) {
  8. $conDet->ajaxGetData();
  9. }
  10. //json reply for ukv report
  11. if (wf_CheckGet(array('ajaxukv'))) {
  12. $conDet->ajaxGetDataUkv();
  13. }
  14. //is UKV enabled?
  15. if ($altCfg['UKV_ENABLED']) {
  16. $reportControls = wf_Link('?module=report_condet', wf_img('skins/ymaps/globe.png') . ' ' . __('Internet'), false, 'ubButton');
  17. $reportControls .= wf_Link('?module=report_condet&ukv=true', wf_img('skins/ukv/tv.png') . ' ' . __('CaTV'), false, 'ubButton');
  18. show_window('', $reportControls);
  19. }
  20. if (!wf_CheckGet(array('ukv'))) {
  21. show_window(__('Connection details report'), $conDet->renderReportBody());
  22. } else {
  23. if ($altCfg['UKV_ENABLED']) {
  24. show_window(__('Connection details report') . ': ' . __('CaTV'), $conDet->renderReportBodyUkv());
  25. } else {
  26. show_error(__('This module is disabled'));
  27. }
  28. }
  29. } else {
  30. show_error(__('This module is disabled'));
  31. }
  32. } else {
  33. show_error(__('Access denied'));
  34. }