display_export.inc.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Displays export tab.
  5. *
  6. * @package PhpMyAdmin
  7. */
  8. if (! defined('PHPMYADMIN')) {
  9. exit;
  10. }
  11. // Get relations & co. status
  12. $cfgRelation = PMA_getRelationsParam();
  13. if (isset($_REQUEST['single_table'])) {
  14. $GLOBALS['single_table'] = $_REQUEST['single_table'];
  15. }
  16. require_once './libraries/file_listing.lib.php';
  17. require_once './libraries/plugin_interface.lib.php';
  18. require_once './libraries/display_export.lib.php';
  19. /* Scan for plugins */
  20. $export_list = PMA_getPlugins(
  21. 'export',
  22. 'libraries/plugins/export/',
  23. array(
  24. 'export_type' => $export_type,
  25. 'single_table' => isset($single_table)
  26. )
  27. );
  28. /* Fail if we didn't find any plugin */
  29. if (empty($export_list)) {
  30. PMA_Message::error(
  31. __('Could not load export plugins, please check your installation!')
  32. )->display();
  33. exit;
  34. }
  35. $html = '<form method="post" action="export.php" '
  36. . ' name="dump" class="disableAjax">';
  37. //output Hidden Inputs
  38. $single_table_str = isset($single_table)? $single_table : '';
  39. $sql_query_str = isset($sql_query)? $sql_query : '';
  40. $html .= PMA_getHtmlForHiddenInput(
  41. $export_type,
  42. $db,
  43. $table,
  44. $single_table_str,
  45. $sql_query_str
  46. );
  47. //output Export Options
  48. $num_tables_str = isset($num_tables)? $num_tables : '';
  49. $unlim_num_rows_str = isset($unlim_num_rows)? $unlim_num_rows : '';
  50. $multi_values_str = isset($multi_values)? $multi_values : '';
  51. $html .= PMA_getHtmlForExportOptions(
  52. $export_type,
  53. $db,
  54. $table,
  55. $multi_values_str,
  56. $num_tables_str,
  57. $export_list,
  58. $unlim_num_rows_str
  59. );
  60. $html .= '</form>';
  61. $response = PMA_Response::getInstance();
  62. $response->addHTML($html);