back to the welcome page if (!$is_db) { header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); exit(); } $is_table = @mysql_query('SHOW TABLES LIKE \'' . sql_addslashes($table, TRUE) . '\''); // Not a valid table name -> back to the db_details.php3 if (!@mysql_numrows($is_table)) { header('Location: ' . $cfgPmaAbsoluteUri . 'db_details.php3?lang=' . $lang . '&server=' . $server . '&db=' . urlencode($db) . '&reload=true'); exit(); } /** * Set parameters for links */ $url_query = 'lang=' . $lang . '&server=' . urlencode($server) . '&db=' . urlencode($db) . '&table=' . urlencode($table) . '&goto=tbl_properties.php3'; /** * Gets table informations */ // 1. Get table type and comments ('show table' works correct since 3.23.03) if (MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) >= 3) { // Update table type, comment and order if required by the user if (isset($submitcomment)) { if (get_magic_quotes_gpc()) { $comment = stripslashes($comment); } if (empty($prev_comment) || urldecode($prev_comment) != str_replace('"', '"', $comment)) { $result = mysql_query('ALTER TABLE ' . backquote($table) . ' COMMENT = \'' . sql_addslashes($comment) . '\'') or mysql_die(); } } if (isset($submittype)) { $result = mysql_query('ALTER TABLE ' . backquote($table) . " TYPE=$tbl_type") or mysql_die(); } if (isset($submitorderby) && !empty($order_field)) { $order_field = backquote(urldecode($order_field)); $result = mysql_query('ALTER TABLE ' . backquote($table) . 'ORDER BY ' . $order_field) or mysql_die(); } // Get table type and comments and displays first browse links $result = mysql_query('SHOW TABLE STATUS LIKE \'' . sql_addslashes($table, TRUE) . '\'') or mysql_die(); $showtable = mysql_fetch_array($result); $tbl_type = strtoupper($showtable['Type']); if (isset($showtable['Rows']) && $showtable['Rows'] > 0) { echo "\n"; ?>
> |