getHeader(); $header->enablePrintView(); /** * Gets the relations settings */ $cfgRelation = PMA_getRelationsParam(); require_once 'libraries/transformations.lib.php'; require_once 'libraries/Index.class.php'; /** * Check parameters */ PMA_Util::checkParameters(array('db')); /** * Defines the url to return to in case of error in a sql statement */ $err_url = 'db_sql.php' . PMA_URL_getCommon(array('db' => $db)); if ($cfgRelation['commwork']) { $comment = PMA_getDbComment($db); /** * Displays DB comment */ if ($comment) { echo '
' . __('Database comment:') . ' ' . htmlspecialchars($comment) . '
'; } // end if } /** * Selects the database and gets tables names */ $GLOBALS['dbi']->selectDb($db); $tables = $GLOBALS['dbi']->getTables($db); $count = 0; foreach ($tables as $table) { $comments = PMA_getComments($db, $table); echo '' . __('Column') . ' | '; echo '' . __('Type') . ' | '; echo '' . __('Null') . ' | '; echo '' . __('Default') . ' | '; if ($have_rel) { echo '' . __('Links to') . ' | ' . "\n"; } echo '' . __('Comments') . ' | ' . "\n"; if ($cfgRelation['mimework']) { echo 'MIME | ' . "\n"; } echo '
---|---|---|---|---|---|---|
'; echo htmlspecialchars($column_name); if (isset($pk_array[$row['Field']])) { echo ' (' . __('Primary') . ')'; } echo ' | '; echo '' . $type . ' | '; echo ''; echo (($row['Null'] == 'NO') ? __('No') : __('Yes')); echo ' | '; echo ''; if (isset($row['Default'])) { echo $row['Default']; } echo ' | '; if ($have_rel) { echo ''; if ($foreigner = PMA_searchColumnInForeigners($res_rel, $column_name)) { echo htmlspecialchars( $foreigner['foreign_table'] . ' -> ' . $foreigner['foreign_field'] ); } echo ' | ' . "\n"; } echo ''; if (isset($comments[$column_name])) { echo htmlspecialchars($comments[$column_name]); } echo ' | ' . "\n"; if ($cfgRelation['mimework']) { $mime_map = PMA_getMIME($db, $table, true); echo ''; if (isset($mime_map[$column_name])) { echo htmlspecialchars( str_replace('_', '/', $mime_map[$column_name]['mimetype']) ); } echo ' | ' . "\n"; } echo '