1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 15:47:00 +02:00

Compact dump output

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1012 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-08-25 15:23:19 +00:00
parent 95764b0125
commit fae29387b1
15 changed files with 10 additions and 45 deletions

View File

@@ -158,18 +158,17 @@ page_header(lang('Export'), "", (strlen($_GET["export"]) ? array("table" => $_GE
<form action="" method="post">
<table cellspacing="0">
<?php
$db_style = array('USE', 'DROP+CREATE', 'CREATE');
$table_style = array('DROP+CREATE', 'CREATE');
$data_style = array('TRUNCATE+INSERT', 'INSERT', 'INSERT+UPDATE');
$db_style = array('', 'USE', 'DROP+CREATE', 'CREATE');
$table_style = array('', 'DROP+CREATE', 'CREATE');
$data_style = array('', 'TRUNCATE+INSERT', 'INSERT', 'INSERT+UPDATE');
if ($dbh->server_info >= 5) {
$db_style[] = 'CREATE+ALTER';
$table_style[] = 'CREATE+ALTER';
}
echo "<tr><th>" . lang('Output') . "<td><input type='hidden' name='token' value='$token'>$dump_output\n";
echo "<tr><th>" . lang('Format') . "<td>$dump_format\n";
echo "<tr><th>" . lang('Database') . "<td><select name='db_style'><option>" . optionlist($db_style, (strlen($_GET["db"]) ? '' : 'CREATE')) . "</select>\n";
echo "<tr><th>" . lang('Tables') . "<td><select name='table_style'><option>" . optionlist($table_style, 'DROP+CREATE') . "</select>\n";
echo "<tr><th>" . lang('Data') . "<td><select name='data_style'><option>" . optionlist($data_style, 'INSERT') . "</select>\n";
echo "<tr><th>" . lang('Database') . "<td><select name='db_style'>" . optionlist($db_style, (strlen($_GET["db"]) ? '' : 'CREATE')) . "</select>\n";
echo "<tr><th>" . lang('Tables') . "<td><select name='table_style'>" . optionlist($table_style, 'DROP+CREATE') . "</select>\n";
echo "<tr><th>" . lang('Data') . "<td><select name='data_style'>" . optionlist($data_style, 'INSERT') . "</select>\n";
?>
</table>
<p><input type="submit" value="<?php echo lang('Export'); ?>">

View File

@@ -157,6 +157,6 @@ function dump_headers($identifier, $multi_table = false) {
return $ext;
}
$dump_output = "<select name='output'>" . optionlist(array('text' => lang('open'), 'file' => lang('save'))) . "</select>";
$dump_format = "<select name='format'>" . optionlist(array('sql' => lang('SQL'), 'csv' => lang('CSV'))) . "</select>";
$dump_output = "<select name='output'>" . optionlist(array('text' => lang('open'), 'file' => lang('save'))) . "</select>"
. " <select name='format'>" . optionlist(array('sql' => 'SQL', 'csv' => 'CSV')) . "</select>"
$max_packet = 1048576; // default, minimum is 1024

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Výstup',
'open' => 'otevřít',
'save' => 'uložit',
'Format' => 'Formát',
'SQL' => 'SQL',
'CSV' => 'CSV',
'Tables' => 'Tabulky',
'Data' => 'Data',
'Event has been dropped.' => 'Událost byla odstraněna.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Ergebnis',
'open' => 'anzeigen',
'save' => 'Datei',
'Format' => 'Format',
'SQL' => 'SQL',
'CSV' => 'CSV',
'Tables' => 'Tabellen',
'Data' => 'Daten',
'Event has been dropped.' => 'Ereignis entfernt.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Salida',
'open' => 'mostrar',
'save' => 'archivo',
'Format' => 'Formato',
'SQL' => 'SQL',
'CSV' => 'CSV',
'Tables' => 'Tablas',
'Data' => 'Datos',
'Event has been dropped.' => 'Evento eliminado.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Väljund',
'open' => 'näita brauseris',
'save' => 'salvesta failina',
'Format' => 'Formaat',
'SQL' => 'SQL',
'CSV' => 'CSV',
'Functions' => 'Funktsioonid',
'Aggregation' => 'Liitmine',
'Event has been dropped.' => 'Sündmus on edukalt kustutatud.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Sortie',
'open' => 'ouvrir',
'save' => 'sauvegarder',
'Format' => 'Formatter',
'SQL' => 'SQL',
'CSV' => 'CVS',
'Functions' => 'Fonctions',
'Aggregation' => 'Agrégation',
'Event has been dropped.' => 'L\'évènement a été supprimé.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Risultato',
'open' => 'apri',
'save' => 'salva',
'Format' => 'Formato',
'SQL' => 'SQL',
'CSV' => 'CSV',
'Tables' => 'Tabelle',
'Data' => 'Dati',
'Event has been dropped.' => 'Evento eliminato.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Uitvoer',
'open' => 'openen',
'save' => 'opslaan',
'Format' => 'Formaat',
'SQL' => 'SQL',
'CSV' => 'CSV',
'Functions' => 'Functies',
'Aggregation' => 'Totalen',
'Event has been dropped.' => 'Event werd verwijderd.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Выходные данные',
'open' => 'открыть',
'save' => 'сохранить',
'Format' => 'Формат',
'SQL' => 'SQL',
'CSV' => 'CSV',
'Tables' => 'Таблицы',
'Data' => 'Данные',
'Event has been dropped.' => 'Событие было удалено.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => 'Výstup',
'open' => 'otvoriť',
'save' => 'uložiť',
'Format' => 'Formát',
'SQL' => 'SQL',
'CSV' => 'CSV',
'Tables' => 'Tabuľky',
'Data' => 'Dáta',
'Event has been dropped.' => 'Udalosť bola odstránená.',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => '輸出',
'open' => '打開',
'save' => '儲存',
'Format' => '格式',
'SQL' => 'SQL',
'CSV' => 'CVS',
'Functions' => '函數',
'Aggregation' => '集合',
'Event has been dropped.' => '已丟棄事件。',

View File

@@ -155,9 +155,6 @@ $translations = array(
'Output' => '输出',
'open' => '打开',
'save' => '保存',
'Format' => '格式',
'SQL' => 'SQL',
'CSV' => 'CVS',
'Functions' => '函数',
'Aggregation' => '集合',
'Event has been dropped.' => '已丢弃事件。',

View File

@@ -298,7 +298,7 @@ if (!$columns) {
echo " (" . lang('%d row(s)', $found_rows) . ') <label><input type="checkbox" name="all" value="1">' . lang('whole result') . "</label>\n";
echo (information_schema($_GET["db"]) ? "" : "<fieldset><legend>" . lang('Edit') . "</legend><div><input type='submit' name='edit' value='" . lang('Edit') . "'> <input type='submit' name='clone' value='" . lang('Clone') . "'> <input type='submit' name='delete' value='" . lang('Delete') . "'$confirm></div></fieldset>\n");
echo "<fieldset><legend>" . lang('Export') . "</legend><div>$dump_output $dump_format <input type='submit' name='export' value='" . lang('Export') . "'></div></fieldset>\n";
echo "<fieldset><legend>" . lang('Export') . "</legend><div>$dump_output <input type='submit' name='export' value='" . lang('Export') . "'></div></fieldset>\n";
}
echo "<fieldset><legend>" . lang('CSV Import') . "</legend><div><input type='hidden' name='token' value='$token'><input type='file' name='csv_file'> <input type='submit' name='import' value='" . lang('Import') . "'></div></fieldset>\n";

View File

@@ -22,5 +22,4 @@ function dump_headers($identifier) {
return $ext;
}
$dump_output = "";
$dump_format = "CSV";
$dump_output = "CSV";