getHeader(); $scripts = $header->getScripts(); $scripts->addFile('db_structure.js'); $scripts->addFile('tbl_change.js'); $scripts->addFile('jquery/timepicker.js'); /** * Sets globals from $_POST */ $post_params = array( 'error', 'is_info', 'message', 'mult_btn', 'selected_tbl', 'submit_mult' ); foreach ($post_params as $one_post_param) { if (isset($_POST[$one_post_param])) { $GLOBALS[$one_post_param] = $_POST[$one_post_param]; } } /** * Prepares the tables list if the user where not redirected to this script * because there is no table in the database ($is_info is true) */ if (empty($is_info)) { // Drops/deletes/etc. multiple tables if required if ((!empty($submit_mult) && isset($selected_tbl)) || isset($mult_btn) ) { $action = 'db_structure.php'; $err_url = 'db_structure.php?'. PMA_generate_common_url($db); // see bug #2794840; in this case, code path is: // db_structure.php -> libraries/mult_submits.inc.php -> sql.php // -> db_structure.php and if we got an error on the multi submit, // we must display it here and not call again mult_submits.inc.php if (! isset($error) || false === $error) { include 'libraries/mult_submits.inc.php'; } if (empty($message)) { $message = PMA_Message::success(); } } include 'libraries/db_common.inc.php'; $url_query .= '&goto=db_structure.php'; // Gets the database structure $sub_part = '_structure'; include 'libraries/db_info.inc.php'; if (!PMA_DRIZZLE) { include_once 'libraries/replication.inc.php'; } else { $server_slave_status = false; } } require_once 'libraries/bookmark.lib.php'; require_once 'libraries/mysql_charsets.lib.php'; $db_collation = PMA_getDbCollation($db); // in a separate file to avoid redeclaration of functions in some code paths require_once 'libraries/db_structure.lib.php'; $titles = PMA_buildActionTitles(); // 1. No tables if ($num_tables == 0) { echo '
' . __('No tables found in database') . '
' . "\n"; if (empty($db_is_information_schema)) { include 'libraries/display_create_table.lib.php'; } // end if (Create Table dialog) /** * Displays the footer */ include_once 'libraries/footer.inc.php'; exit; } // else // 2. Shows table informations /** * Displays the tables list */ echo '