1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00

Customizable export

This commit is contained in:
Jakub Vrana
2010-10-29 17:03:02 +02:00
parent a2443670f8
commit 095d472366
8 changed files with 229 additions and 208 deletions

View File

@@ -7,7 +7,7 @@ if ($_POST) {
$cookie .= "&$key=" . urlencode($_POST[$key]);
}
cookie("adminer_export", substr($cookie, 1));
$ext = dump_headers(($TABLE != "" ? $TABLE : DB), (DB == "" || count((array) $_POST["tables"] + (array) $_POST["data"]) > 1));
$ext = $adminer->dumpHeaders(($TABLE != "" ? $TABLE : DB), (DB == "" || count((array) $_POST["tables"] + (array) $_POST["data"]) > 1));
$is_sql = ($_POST["format"] == "sql");
if ($is_sql) {
echo "-- Adminer $VERSION " . $drivers[DRIVER] . " dump
@@ -73,9 +73,9 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
if ($ext == "tar") {
ob_start();
}
dump_table($row["Name"], ($table ? $_POST["table_style"] : ""));
$adminer->dumpTable($row["Name"], ($table ? $_POST["table_style"] : ""));
if ($data) {
dump_data($row["Name"], $_POST["data_style"]);
$adminer->dumpData($row["Name"], $_POST["data_style"]);
}
if ($is_sql && $_POST["triggers"]) {
$triggers = trigger_sql($row["Name"], $_POST["table_style"]);
@@ -94,7 +94,7 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
}
}
foreach ($views as $view) {
dump_table($view, $_POST["table_style"], true);
$adminer->dumpTable($view, $_POST["table_style"], true);
}
if ($ext == "tar") {
echo pack("x512");