getHeader(); $scripts = $header->getScripts(); $scripts->addFile('db_structure.js'); $scripts->addFile('tbl_change.js'); $scripts->addFile('jquery/jquery-ui-timepicker-addon.js'); $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($_POST['is_info'])) { // Drops/deletes/etc. multiple tables if required if ((!empty($_POST['submit_mult']) && isset($_POST['selected_tbl'])) || isset($_POST['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($_POST['error']) || false === $_POST['error']) { include 'libraries/mult_submits.inc.php'; } if (empty($_POST['message'])) { $_POST['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); $titles = PMA_Util::buildActionTitles(); // 1. No tables if ($num_tables == 0) { $response->addHTML( '
' . __('No tables found in database') . '
' . "\n" ); if (empty($db_is_information_schema)) { ob_start(); include 'libraries/display_create_table.lib.php'; $content = ob_get_contents(); ob_end_clean(); $response->addHTML($content); unset($content); } // end if (Create Table dialog) exit; } // else // 2. Shows table informations /** * Displays the tables list */ $response->addHTML('