index.php 1.5 KB

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