1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

Limit commands and import in customization (bug #3194432)

This commit is contained in:
Jakub Vrana
2011-05-24 17:16:13 +02:00
parent d2c513d1c2
commit e641e5ceba
4 changed files with 43 additions and 7 deletions

View File

@@ -395,7 +395,7 @@ if (!$columns) {
}
echo " (" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " . checkbox("all", 1, 0, lang('whole result')) . "\n";
if (!information_schema(DB)) {
if ($adminer->selectCommandPrint()) {
?>
<fieldset><legend><?php echo lang('Edit'); ?></legend><div>
<input type="submit" value="<?php echo lang('Save'); ?>" title="<?php echo lang('Double click on a value to modify it.'); ?>" class="jsonly">
@@ -412,12 +412,14 @@ if (!$columns) {
echo " <input type='submit' name='export' value='" . lang('Export') . "' onclick='eventStop(event);'>\n";
echo "</div></fieldset>\n";
}
print_fieldset("import", lang('Import'), !$rows);
echo "<input type='file' name='csv_file'> ";
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_export["format"], 1); // 1 - select
echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
echo "<input type='hidden' name='token' value='$token'>\n";
echo "</div></fieldset>\n";
if ($adminer->selectImportPrint()) {
print_fieldset("import", lang('Import'), !$rows);
echo "<input type='file' name='csv_file'> ";
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_export["format"], 1); // 1 - select
echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
echo "<input type='hidden' name='token' value='$token'>\n";
echo "</div></fieldset>\n";
}
$adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);