index.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. if ($system->getAuthEnabled()) {
  3. if (cfr('ROOT')) {
  4. if (SQL_DEBUG) {
  5. $controls = '';
  6. $result = '';
  7. $backUrl = '';
  8. $baseModuleUrl = '?module=sqldebug';
  9. if (ubRouting::checkGet('back')) {
  10. $backUrl = '&back=' . ubRouting::get('back');
  11. $controls .= wf_BackLink(base64_decode(ubRouting::get('back')));
  12. }
  13. if (ubRouting::checkGet('fushsqldebuglog')) {
  14. zb_SqlDebugLogFlush();
  15. ubRouting::nav($baseModuleUrl . $backUrl);
  16. }
  17. $controls .= wf_Link($baseModuleUrl . $backUrl, wf_img('skins/log_icon_small.png') . ' ' . __('All SQL queries log'), false, 'ubButton');
  18. $controls .= wf_Link($baseModuleUrl . '&zenmode=true' . $backUrl, wf_img('skins/zen.png') . ' ' . __('SQL') . ' ' . __('Zen'), false, 'ubButton');
  19. $logFlushUrl = $baseModuleUrl . '&fushsqldebuglog=true' . $backUrl;
  20. $cancelUrl = $baseModuleUrl . $backUrl;
  21. $controls .= wf_ConfirmDialog($logFlushUrl, wf_img('skins/icon_cleanup.png') . ' ' . __('Flush log'), __('Are you serious'), 'ubButton', $cancelUrl, __('Flush log'));
  22. show_window(__('All SQL queries log'), $controls);
  23. if (!ubRouting::checkGet('zenmode')) {
  24. show_window('', web_SqlDebugLogParse());
  25. } else {
  26. $sqlDebugZen = new ZenFlow('sqldebugzenflow', web_SqlDebugLogParse(), 1000);
  27. show_window('', $sqlDebugZen->render());
  28. }
  29. } else {
  30. show_error(__('SQL queries debug') . ': ' . __('Disabled'));
  31. }
  32. } else {
  33. show_error(__('Access denied'));
  34. }
  35. } else {
  36. show_error(__('Authorization engine disabled'));
  37. }