db_sql.php 872 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Database SQL executor
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. /**
  9. *
  10. */
  11. require_once 'libraries/common.inc.php';
  12. /**
  13. * Runs common work
  14. */
  15. $response = PMA_Response::getInstance();
  16. $header = $response->getHeader();
  17. $scripts = $header->getScripts();
  18. $scripts->addFile('functions.js');
  19. $scripts->addFile('makegrid.js');
  20. $scripts->addFile('sql.js');
  21. require 'libraries/db_common.inc.php';
  22. require_once 'libraries/sql_query_form.lib.php';
  23. // After a syntax error, we return to this script
  24. // with the typed query in the textarea.
  25. $goto = 'db_sql.php';
  26. $back = 'db_sql.php';
  27. /**
  28. * Query box, bookmark, insert data from textfile
  29. */
  30. $response->addHTML(
  31. PMA_getHtmlForSqlQueryForm(
  32. true, false,
  33. isset($_REQUEST['delimiter'])
  34. ? htmlspecialchars($_REQUEST['delimiter'])
  35. : ';'
  36. )
  37. );
  38. ?>