Common strings for descriptions of DATE, TIME, DATETIME and VARCHAR2
[phpmyadmin.git] / db_export.php
blob732b88b217ca51b5fdc7e134ed99ec8fb915403c
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * dumps a database
6 * @package PhpMyAdmin
7 */
9 /**
10 * Gets some core libraries
12 require_once 'libraries/common.inc.php';
14 $GLOBALS['js_include'][] = 'export.js';
16 // $sub_part is also used in db_info.inc.php to see if we are coming from
17 // db_export.php, in which case we don't obey $cfg['MaxTableList']
18 $sub_part = '_export';
19 require_once 'libraries/db_common.inc.php';
20 $url_query .= '&amp;goto=db_export.php';
21 require_once 'libraries/db_info.inc.php';
23 /**
24 * Displays the form
26 $export_page_title = __('View dump (schema) of database');
28 // exit if no tables in db found
29 if ($num_tables < 1) {
30 PMA_Message::error(__('No tables found in database.'))->display();
31 include 'libraries/footer.inc.php';
32 exit;
33 } // end if
35 $checkall_url = 'db_export.php?'
36 . PMA_generate_common_url($db)
37 . '&amp;goto=db_export.php';
39 $multi_values = '<div>';
40 $multi_values .= '<a href="' . $checkall_url . '" onclick="setSelectOptions(\'dump\', \'table_select[]\', true); return false;">' . __('Select All') . '</a>
42 <a href="' . $checkall_url . '&amp;unselectall=1" onclick="setSelectOptions(\'dump\', \'table_select[]\', false); return false;">' . __('Unselect All') . '</a><br />';
44 $multi_values .= '<select name="table_select[]" id="table_select" size="10" multiple="multiple">';
45 $multi_values .= "\n";
47 if (!empty($selected_tbl) && empty($table_select)) {
48 $table_select = $selected_tbl;
51 // Check if the selected tables are defined in $_GET
52 // (from clicking Back button on export.php)
53 if (isset($_GET['table_select'])) {
54 $_GET['table_select'] = urldecode($_GET['table_select']);
55 $_GET['table_select'] = explode(",", $_GET['table_select']);
58 foreach ($tables as $each_table) {
59 if (isset($_GET['table_select'])) {
60 if (in_array($each_table['Name'], $_GET['table_select'])) {
61 $is_selected = ' selected="selected"';
62 } else {
63 $is_selected = '';
65 } elseif (! empty($unselectall)
66 || (! empty($table_select) && !in_array($each_table['Name'], $table_select))
67 ) {
68 $is_selected = '';
69 } else {
70 $is_selected = ' selected="selected"';
72 $table_html = htmlspecialchars($each_table['Name']);
73 $multi_values .= ' <option value="' . $table_html . '"'
74 . $is_selected . '>'
75 . str_replace(' ', '&nbsp;', $table_html) . '</option>' . "\n";
76 } // end for
78 $multi_values .= "\n";
79 $multi_values .= '</select></div>';
81 $export_type = 'database';
82 require_once 'libraries/display_export.lib.php';
84 /**
85 * Displays the footer
87 require 'libraries/footer.inc.php';