tableName($table_status); page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . ($name != "" ? $name : h($TABLE)), $error); $rights = array(); foreach ($fields as $key => $field) { $rights += $field["privileges"]; } adminer()->selectLinks($table_status, (isset($rights["insert"]) || !support("table") ? "" : null)); $comment = $table_status["Comment"]; if ($comment != "") { echo "
" . lang('Comment') . ": " . h($comment) . "\n"; } if ($fields) { adminer()->tableStructurePrint($fields, $table_status); } function tables_links($tables) { echo "
' . lang('Alter indexes') . "\n"; } if (!is_view($table_status)) { if (fk_support($table_status)) { echo "
" . lang('Source') . " | " . lang('Target') . " | " . lang('ON DELETE') . " | " . lang('ON UPDATE') . " | |
---|---|---|---|---|
" . implode(", ", array_map('Adminer\h', $foreign_key["source"])) . ""; $link = ($foreign_key["db"] != "" ? preg_replace('~db=[^&]*~', "db=" . urlencode($foreign_key["db"]), ME) : ($foreign_key["ns"] != "" ? preg_replace('~ns=[^&]*~', "ns=" . urlencode($foreign_key["ns"]), ME) : ME) ); echo " | " . ($foreign_key["db"] != "" && $foreign_key["db"] != DB ? "" . h($foreign_key["db"]) . "." : "") . ($foreign_key["ns"] != "" && $foreign_key["ns"] != $_GET["ns"] ? "" . h($foreign_key["ns"]) . "." : "") . h($foreign_key["table"]) . "" ; echo "(" . implode(", ", array_map('Adminer\h', $foreign_key["target"])) . ")"; echo " | " . h($foreign_key["on_delete"]); echo " | " . h($foreign_key["on_update"]); echo ' | ' . lang('Alter') . ''; echo "\n"; } echo " |
' . lang('Add foreign key') . "\n"; } if (support("check")) { echo "
" . h($val);
echo " |
' . lang('Create check') . "\n"; } } if (support(is_view($table_status) ? "view_trigger" : "trigger")) { echo "
" . h($val[0]) . " | " . h($val[1]) . " | " . h($key) . " | " . lang('Alter') . "\n"; } echo " |
---|
' . lang('Add trigger') . "\n"; } $inherited = driver()->inheritedTables($TABLE); if ($inherited) { echo "
BY " . h("$partition[partition_by]($partition[partition])") . "
\n";
}
tables_links($inherited);
}