server_binlog.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * display the binary logs and the content of the selected
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. /**
  9. * requirements
  10. */
  11. require_once 'libraries/common.inc.php';
  12. /**
  13. * Does the common work
  14. */
  15. require_once 'libraries/server_common.inc.php';
  16. require_once 'libraries/server_bin_log.lib.php';
  17. /**
  18. * array binary log files
  19. */
  20. $binary_logs = PMA_DRIZZLE
  21. ? null
  22. : $GLOBALS['dbi']->fetchResult(
  23. 'SHOW MASTER LOGS',
  24. 'Log_name',
  25. null,
  26. null,
  27. PMA_DatabaseInterface::QUERY_STORE
  28. );
  29. if (! isset($_REQUEST['log'])
  30. || ! array_key_exists($_REQUEST['log'], $binary_logs)
  31. ) {
  32. $_REQUEST['log'] = '';
  33. } else {
  34. $url_params['log'] = $_REQUEST['log'];
  35. }
  36. if (!empty($_REQUEST['dontlimitchars'])) {
  37. $url_params['dontlimitchars'] = 1;
  38. }
  39. $response = PMA_Response::getInstance();
  40. $response->addHTML(PMA_getHtmlForSubPageHeader('binlog'));
  41. $response->addHTML(PMA_getLogSelector($binary_logs, $url_params));
  42. $response->addHTML(PMA_getLogInfo($url_params));
  43. exit;
  44. ?>