back to the welcome page if (!empty($db)) { $is_db = @mysql_select_db($db); } if (empty($db) || !$is_db) { header('Location: ' . $cfgPmaAbsoluteUri . 'main.php3?lang=' . $lang . '&server=' . $server . '&reload=true'); exit(); } // Not a valid table name -> back to the db_details.php3 if (!empty($table)) { $is_table = @mysql_query('SHOW TABLES LIKE \'' . sql_addslashes($table, TRUE) . '\''); } if (empty($table) || !@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_INT_VERSION >= 32303) { // 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)) { $local_query = 'ALTER TABLE ' . backquote($table) . ' COMMENT = \'' . sql_addslashes($comment) . '\''; $result = mysql_query($local_query) or mysql_die('', $local_query); } } if (isset($submittype)) { $local_query = 'ALTER TABLE ' . backquote($table) . ' TYPE = ' . $tbl_type; $result = mysql_query($local_query) or mysql_die('', $local_query); } if (isset($submitorderby) && !empty($order_field)) { $order_field = backquote(urldecode($order_field)); $local_query = 'ALTER TABLE ' . backquote($table) . 'ORDER BY ' . $order_field; $result = mysql_query($local_query) or mysql_die('', $local_query); } // Get table type and comments and displays first browse links $local_query = 'SHOW TABLE STATUS LIKE \'' . sql_addslashes($table, TRUE) . '\''; $result = mysql_query($local_query) or mysql_die('', $local_query); $showtable = mysql_fetch_array($result); $tbl_type = strtoupper($showtable['Type']); if (isset($showtable['Rows']) && $showtable['Rows'] > 0) { echo "\n"; ?>
> |