mirror of
https://github.com/vrana/adminer.git
synced 2025-08-31 01:59:59 +02:00
Compare commits
203 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6b20230d50 | ||
|
836dba07af | ||
|
883e0a6619 | ||
|
5000e7dc16 | ||
|
798432935d | ||
|
08060f3253 | ||
|
6d59ed6d7e | ||
|
eb0d5c3c5e | ||
|
04d707ef94 | ||
|
004ac1c782 | ||
|
3ad62d55c8 | ||
|
42de70d032 | ||
|
aa2907190e | ||
|
5c8b6a3408 | ||
|
7f883b9302 | ||
|
27db0914ca | ||
|
483cbf1616 | ||
|
08a956cf2a | ||
|
9d992e4be6 | ||
|
7ece69a8c4 | ||
|
1838df9465 | ||
|
4e6ad13eac | ||
|
ba35e11bae | ||
|
834f4b6c5b | ||
|
176f2923cd | ||
|
aaaca731cd | ||
|
ee9932a0dd | ||
|
c34c672df9 | ||
|
550289de51 | ||
|
f652ff807e | ||
|
746603bdc7 | ||
|
e9d9a30844 | ||
|
4d5de895e2 | ||
|
e282ced59e | ||
|
20d722b882 | ||
|
c1c3b84fff | ||
|
b176a0fbd4 | ||
|
8456779e18 | ||
|
3b69ff4ce2 | ||
|
3a101e873f | ||
|
6ecef5eca6 | ||
|
707958c63d | ||
|
5d18df1d82 | ||
|
8602304d86 | ||
|
e744fecd98 | ||
|
b58e03f5fc | ||
|
40a86bffa2 | ||
|
b7b22486b2 | ||
|
cbf7373b54 | ||
|
b29767dcfb | ||
|
db75be9ba7 | ||
|
67c991846e | ||
|
7d3266b369 | ||
|
5f3a820571 | ||
|
e7df6bf616 | ||
|
1d8bd0a210 | ||
|
6fe9827eea | ||
|
7900062d4d | ||
|
63cffbbc8a | ||
|
0b3baa1e23 | ||
|
e3fbc56b6f | ||
|
00607012af | ||
|
e4e5941b90 | ||
|
097f2a1242 | ||
|
c81bed0baa | ||
|
9c9fc4a85b | ||
|
b46b1dd574 | ||
|
f248fb29b1 | ||
|
94f75f9798 | ||
|
f2e2c6e4ac | ||
|
e321a26ee5 | ||
|
f35dd89c65 | ||
|
8f2b4ced62 | ||
|
5eb3446908 | ||
|
a685d414ad | ||
|
7c9fec4e6b | ||
|
224cbfed56 | ||
|
490d274662 | ||
|
3a27c4f64c | ||
|
bd6ebcaab9 | ||
|
1f97968e65 | ||
|
dfb33a323d | ||
|
869c2b92ea | ||
|
675dbaad73 | ||
|
a001a3a061 | ||
|
df451f4374 | ||
|
9def8d7f95 | ||
|
2385bf72bd | ||
|
12427467f7 | ||
|
2bec4ca11b | ||
|
e676303a26 | ||
|
9261abc415 | ||
|
e5c05fe26c | ||
|
21bf7e0570 | ||
|
93f04464a2 | ||
|
e03713ce2d | ||
|
2da5683b99 | ||
|
8ff20622fb | ||
|
9ef14dbf77 | ||
|
274fa2259b | ||
|
7541149522 | ||
|
2a3626faae | ||
|
d94e348f57 | ||
|
51dbfb6987 | ||
|
578c9fca92 | ||
|
d9289355d7 | ||
|
874b9ee746 | ||
|
17974cdf76 | ||
|
2d8b6ec771 | ||
|
5982060f3b | ||
|
6496ff5a47 | ||
|
6aa55d806b | ||
|
0ef358a6b5 | ||
|
882e9d02a0 | ||
|
e346f47384 | ||
|
fdd02a5485 | ||
|
7238bc7900 | ||
|
15ac0889c0 | ||
|
ab40931365 | ||
|
5d6e9fff65 | ||
|
d6d86fa26a | ||
|
f25ffb36f9 | ||
|
49fd7858ac | ||
|
0628b8de02 | ||
|
99434644ef | ||
|
5492b3e055 | ||
|
84b69da58d | ||
|
a51d0f4701 | ||
|
7cd82c8fd7 | ||
|
d065c9ba51 | ||
|
f79340a0b5 | ||
|
4bc9a29f3e | ||
|
81530227c2 | ||
|
d8217d6ee2 | ||
|
02c13131e3 | ||
|
21c339901c | ||
|
06c4fd4855 | ||
|
0a473cef18 | ||
|
652a09bb91 | ||
|
47a9453ace | ||
|
d4f99d5cdc | ||
|
72ed1b5cdc | ||
|
4e825a36d3 | ||
|
927444ffdd | ||
|
d9976c25fc | ||
|
c5fa212b26 | ||
|
edef2b1a3d | ||
|
7eccd59856 | ||
|
476b957565 | ||
|
8e43fffe53 | ||
|
d2c6ea21b6 | ||
|
a310d52327 | ||
|
0717bce535 | ||
|
53aad3bb62 | ||
|
99cd514a29 | ||
|
8ea4892523 | ||
|
74e4bb9a6f | ||
|
3d2d39e7d0 | ||
|
06a4d294bd | ||
|
0d5e5819a0 | ||
|
b17ffcc512 | ||
|
d91bd659a5 | ||
|
1efb87fcbe | ||
|
d8f1521b60 | ||
|
cb6e2f9a86 | ||
|
4824c578bf | ||
|
f4607d763c | ||
|
12293ce215 | ||
|
c47d933ab0 | ||
|
6e6785ebc4 | ||
|
6d848bf165 | ||
|
2189947c43 | ||
|
b6f9f58712 | ||
|
fdeb9557cd | ||
|
11e1290b5b | ||
|
ac9fd04f87 | ||
|
2128c05e53 | ||
|
550db0691e | ||
|
4484f5f620 | ||
|
c2f8ccc8d8 | ||
|
bd279b2758 | ||
|
76575a95f1 | ||
|
95bab4c077 | ||
|
e85af88227 | ||
|
c6bb98ad22 | ||
|
2a0f17b6d9 | ||
|
dc1ad9e8ed | ||
|
1270748f74 | ||
|
266fda37a1 | ||
|
1f14ab470f | ||
|
501234c2d1 | ||
|
197ab976b8 | ||
|
b2759df1f9 | ||
|
de07f00ccb | ||
|
031d2c6a34 | ||
|
e2810adc05 | ||
|
baeeb362f7 | ||
|
347ac77bab | ||
|
6b9eb3f446 | ||
|
f58b13e994 | ||
|
fe295bc78a | ||
|
b39469eb9f | ||
|
20684a5166 |
6
.gitattributes
vendored
Normal file
6
.gitattributes
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/.gitattributes export-ignore
|
||||
/.github export-ignore
|
||||
/.gitignore export-ignore
|
||||
/.gitmodules export-ignore
|
||||
/.travis.yml export-ignore
|
||||
/tests export-ignore
|
3
.github/FUNDING.yml
vendored
3
.github/FUNDING.yml
vendored
@@ -1,2 +1,3 @@
|
||||
github: vrana
|
||||
patreon: jakubvrana
|
||||
custom: ["https://sourceforge.net/p/adminer/donate/"]
|
||||
custom: ["https://www.paypal.com/donate/?item_name=Donation+to+Adminer&business=jakub%40vrana.cz"]
|
||||
|
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -64,4 +64,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,5 +2,3 @@
|
||||
/adminer*.php
|
||||
/editor*.php
|
||||
/vendor/
|
||||
/composer.lock
|
||||
/temp
|
||||
|
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
||||
[submodule "designs/hydra"]
|
||||
path = designs/hydra
|
||||
url = https://github.com/Niyko/Hydra-Dark-Theme-for-Adminer
|
||||
[submodule "designs/pepa-linha-dark"]
|
||||
path = designs/pepa-linha-dark
|
||||
url = https://github.com/pepa-linha/Adminer-Design-Dark/
|
||||
[submodule "jush"]
|
||||
path = externals/jush
|
||||
url = https://github.com/vrana/jush
|
||||
[submodule "JsShrink"]
|
||||
path = externals/JsShrink
|
||||
url = https://github.com/vrana/JsShrink
|
||||
|
@@ -6,4 +6,8 @@ php:
|
||||
- 7.3
|
||||
- 7.4
|
||||
- 8.0
|
||||
- 8.1
|
||||
- 8.2
|
||||
- 8.3
|
||||
- 8.4
|
||||
script: git diff --name-only $TRAVIS_COMMIT_RANGE | grep '\.php$' | xargs -n1 -P8 php -l | grep -v 'No syntax errors'; test $? -eq 1
|
||||
|
@@ -28,13 +28,13 @@ if (!$error && $_POST) {
|
||||
}
|
||||
$call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val);
|
||||
}
|
||||
|
||||
|
||||
$query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")";
|
||||
$start = microtime(true);
|
||||
$result = $connection->multi_query($query);
|
||||
$affected = $connection->affected_rows; // getting warnigns overwrites this
|
||||
$affected = $connection->affected_rows; // getting warnings overwrites this
|
||||
echo $adminer->selectQuery($query, $start, !$result);
|
||||
|
||||
|
||||
if (!$result) {
|
||||
echo "<p class='error'>" . error() . "\n";
|
||||
} else {
|
||||
@@ -42,7 +42,7 @@ if (!$error && $_POST) {
|
||||
if (is_object($connection2)) {
|
||||
$connection2->select_db(DB);
|
||||
}
|
||||
|
||||
|
||||
do {
|
||||
$result = $connection->store_result();
|
||||
if (is_object($result)) {
|
||||
@@ -53,7 +53,7 @@ if (!$error && $_POST) {
|
||||
;
|
||||
}
|
||||
} while ($connection->next_result());
|
||||
|
||||
|
||||
if ($out) {
|
||||
select($connection->query("SELECT " . implode(", ", $out)));
|
||||
}
|
||||
@@ -64,7 +64,7 @@ if (!$error && $_POST) {
|
||||
<form action="" method="post">
|
||||
<?php
|
||||
if ($in) {
|
||||
echo "<table cellspacing='0' class='layout'>\n";
|
||||
echo "<table class='layout'>\n";
|
||||
foreach ($in as $key) {
|
||||
$field = $routine["fields"][$key];
|
||||
$name = $field["field"];
|
||||
@@ -88,3 +88,22 @@ if ($in) {
|
||||
<input type="submit" value="<?php echo lang('Call'); ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
||||
|
||||
<pre>
|
||||
<?php
|
||||
function pre_tr($s) {
|
||||
return preg_replace('~^~m', '<tr>', preg_replace('~\|~', '<td>', preg_replace('~\|$~m', "", rtrim($s))));
|
||||
}
|
||||
$table = '(\+--[-+]+\+\n)';
|
||||
$row = '(\| .* \|\n)';
|
||||
echo
|
||||
preg_replace_callback("~^$table?$row$table?($row*)$table?~m", function ($match) {
|
||||
$first_row = pre_tr($match[2]);
|
||||
return "<table>\n" . ($match[1] ? "<thead>$first_row</thead>\n" : $first_row) . pre_tr($match[4]) . "\n</table>";
|
||||
},
|
||||
preg_replace('~(\n( -|mysql)> )(.+)~', "\\1<code class='jush-sql'>\\3</code>",
|
||||
preg_replace('~(.+)\n---+\n~', "<b>\\1</b>\n",
|
||||
h($routine['comment'])
|
||||
)));
|
||||
?>
|
||||
</pre>
|
||||
|
35
adminer/check.inc.php
Normal file
35
adminer/check.inc.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
$TABLE = $_GET["check"];
|
||||
$name = $_GET["name"];
|
||||
$row = $_POST;
|
||||
|
||||
if ($row && !$error) {
|
||||
$result = ($name == "" || queries("ALTER TABLE " . table($TABLE) . " DROP CONSTRAINT " . idf_escape($name)));
|
||||
if (!$row["drop"]) {
|
||||
$result = queries("ALTER TABLE " . table($TABLE) . " ADD" . ($row["name"] != "" ? " CONSTRAINT " . idf_escape($row["name"]) . "" : "") . " CHECK ($row[clause])"); //! SQL injection
|
||||
}
|
||||
queries_redirect(
|
||||
ME . "table=" . urlencode($TABLE),
|
||||
($row["drop"] ? lang('Check has been dropped.') : ($name != "" ? lang('Check has been altered.') : lang('Check has been created.'))),
|
||||
$result
|
||||
);
|
||||
}
|
||||
|
||||
page_header(($name != "" ? lang('Alter check') . ": " . h($name) : lang('Create check')), $error, array("table" => $TABLE));
|
||||
|
||||
if (!$row) {
|
||||
$checks = check_constraints($TABLE);
|
||||
$row = array("name" => $name, "clause" => $checks[$name]);
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" data-maxlength="64" autocapitalize="off"><?php echo doc_link(array(
|
||||
'sql' => 'create-table-check-constraints.html',
|
||||
'mariadb' => 'constraint/',
|
||||
)); ?>
|
||||
<p><?php textarea("clause", $row["clause"]); ?>
|
||||
<p><input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
@@ -49,12 +49,9 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
|
||||
if (!$field["has_default"]) {
|
||||
$field["default"] = null;
|
||||
}
|
||||
if ($key == $row["auto_increment_col"]) {
|
||||
$field["auto_increment"] = true;
|
||||
}
|
||||
$process_field = process_field($field, $type_field);
|
||||
$all_fields[] = array($field["orig"], $process_field, $after);
|
||||
if (!$orig_field || $process_field != process_field($orig_field, $orig_field)) {
|
||||
if (!$orig_field || $process_field !== process_field($orig_field, $orig_field)) {
|
||||
$fields[] = array($field["orig"], $process_field, $after);
|
||||
if ($field["orig"] != "" || $after) {
|
||||
$use_all_fields = true;
|
||||
@@ -89,14 +86,14 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
foreach ($params["partition_names"] as $key => $name) {
|
||||
if ($name === "") {
|
||||
if ($name == "") {
|
||||
unset($params["partition_names"][$key]);
|
||||
unset($params["partition_values"][$key]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($params != get_partitions_info($TABLE)) {
|
||||
$partitions = [];
|
||||
$partitions = array();
|
||||
if ($params["partition_by"] == 'RANGE' || $params["partition_by"] == 'LIST') {
|
||||
foreach ($params["partition_names"] as $key => $name) {
|
||||
$value = $params["partition_values"][$key];
|
||||
@@ -105,11 +102,11 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
|
||||
}
|
||||
|
||||
// $params["partition"] can be expression, not only column
|
||||
$partitioning .= "\nPARTITION BY {$params["partition_by"]}({$params["partition"]})";
|
||||
$partitioning .= "\nPARTITION BY $params[partition_by]($params[partition])";
|
||||
if ($partitions) {
|
||||
$partitioning .= " (" . implode(",", $partitions) . "\n)";
|
||||
} elseif ($params["partitions"]) {
|
||||
$partitioning .= " PARTITIONS " . (int)$params["partitions"];
|
||||
$partitioning .= " PARTITIONS " . (+$params["partitions"]);
|
||||
}
|
||||
}
|
||||
} elseif (preg_match("~partitioned~", $table_status["Create_options"])) {
|
||||
@@ -181,8 +178,7 @@ foreach ($engines as $engine) {
|
||||
<form action="" method="post" id="form">
|
||||
<p>
|
||||
<?php if (support("columns") || $TABLE == "") { ?>
|
||||
<?php echo lang('Table name'); ?>: <input name="name" data-maxlength="64" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||
<?php if ($TABLE == "" && !$_POST) { echo script("focus(qs('#form')['name']);"); } ?>
|
||||
<?php echo lang('Table name'); ?>: <input name="name"<?php echo ($TABLE == "" && !$_POST ? " autofocus" : ""); ?> data-maxlength="64" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||
<?php echo ($engines ? "<select name='Engine'>" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" . on_help("getTarget(event).value", 1) . script("qsl('select').onchange = helpClose;") : ""); ?>
|
||||
<?php echo ($collations && !preg_match("~sqlite|mssql~", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
@@ -190,7 +186,7 @@ foreach ($engines as $engine) {
|
||||
|
||||
<?php if (support("columns")) { ?>
|
||||
<div class="scrollable">
|
||||
<table cellspacing="0" id="edit-fields" class="nowrap">
|
||||
<table id="edit-fields" class="nowrap">
|
||||
<?php
|
||||
edit_fields($row["fields"], $collations, "TABLE", $foreign_keys);
|
||||
?>
|
||||
@@ -198,7 +194,7 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys);
|
||||
<?php echo script("editFields();"); ?>
|
||||
</div>
|
||||
<p>
|
||||
<?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
|
||||
<?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" class="size" value="<?php echo h($row["Auto_increment"]); ?>">
|
||||
<?php echo checkbox("defaults", 1, ($_POST ? $_POST["defaults"] : adminer_setting("defaults")), lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?>
|
||||
<?php
|
||||
$comments = ($_POST ? $_POST["comments"] : adminer_setting("comments"));
|
||||
@@ -225,7 +221,7 @@ if (support("partitioning")) {
|
||||
<?php echo "<select name='partition_by'>" . optionlist(array("" => "") + $partition_by, $row["partition_by"]) . "</select>" . on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')", 1) . script("qsl('select').onchange = partitionByChange;"); ?>
|
||||
(<input name="partition" value="<?php echo h($row["partition"]); ?>">)
|
||||
<?php echo lang('Partitions'); ?>: <input type="number" name="partitions" class="size<?php echo ($partition_table || !$row["partition_by"] ? " hidden" : ""); ?>" value="<?php echo h($row["partitions"]); ?>">
|
||||
<table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
|
||||
<table id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
|
||||
<thead><tr><th><?php echo lang('Partition name'); ?><th><?php echo lang('Values'); ?></thead>
|
||||
<?php
|
||||
foreach ($row["partition_names"] as $key => $val) {
|
||||
|
@@ -59,14 +59,13 @@ if ($_POST) {
|
||||
<p>
|
||||
<?php
|
||||
echo ($_POST["add_x"] || strpos($name, "\n")
|
||||
? '<textarea id="name" name="name" rows="10" cols="40">' . h($name) . '</textarea><br>'
|
||||
: '<input name="name" id="name" value="' . h($name) . '" data-maxlength="64" autocapitalize="off">'
|
||||
? '<textarea autofocus name="name" rows="10" cols="40">' . h($name) . '</textarea><br>'
|
||||
: '<input name="name" autofocus value="' . h($name) . '" data-maxlength="64" autocapitalize="off">'
|
||||
) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $row["collation"]) . doc_link(array(
|
||||
'sql' => "charset-charsets.html",
|
||||
'mariadb' => "supported-character-sets-and-collations/",
|
||||
'mssql' => "ms187963.aspx",
|
||||
)) : "");
|
||||
echo script("focus(qs('#name'));");
|
||||
?>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php
|
||||
|
@@ -66,7 +66,7 @@ if ($adminer->homepage()) {
|
||||
}
|
||||
}
|
||||
echo "<div class='scrollable'>\n";
|
||||
echo "<table cellspacing='0' class='nowrap checkable'>\n";
|
||||
echo "<table class='nowrap checkable odds'>\n";
|
||||
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
|
||||
echo '<thead><tr class="wrap">';
|
||||
echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^(tables|views)\[/);", "");
|
||||
@@ -85,7 +85,7 @@ if ($adminer->homepage()) {
|
||||
foreach ($tables_list as $name => $type) {
|
||||
$view = ($type !== null && !preg_match('~table|sequence~i', $type));
|
||||
$id = h("Table-" . $name);
|
||||
echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "", "", $id);
|
||||
echo '<tr><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "", "", $id);
|
||||
echo '<th>' . (support("table") || support("indexes") ? "<a href='" . h(ME) . "table=" . urlencode($name) . "' title='" . lang('Show structure') . "' id='$id'>" . h($name) . '</a>' : h($name));
|
||||
if ($view) {
|
||||
echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '" title="' . lang('Alter view') . '">' . (preg_match('~materialized~i', $type) ? lang('Materialized view') : lang('View')) . '</a>';
|
||||
@@ -109,6 +109,7 @@ if ($adminer->homepage()) {
|
||||
$tables++;
|
||||
}
|
||||
echo (support("comment") ? "<td id='Comment-" . h($name) . "'>" : "");
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
echo "<tr><td><th>" . lang('%d in total', count($tables_list));
|
||||
@@ -117,6 +118,7 @@ if ($adminer->homepage()) {
|
||||
foreach (array("Data_length", "Index_length", "Data_free") as $key) {
|
||||
echo "<td align='right' id='sum-$key'>";
|
||||
}
|
||||
echo "\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo "</div>\n";
|
||||
@@ -159,12 +161,11 @@ if ($adminer->homepage()) {
|
||||
echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
|
||||
$routines = routines();
|
||||
if ($routines) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table class='odds'>\n";
|
||||
echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td></thead>\n";
|
||||
odd('');
|
||||
foreach ($routines as $row) {
|
||||
$name = ($row["SPECIFIC_NAME"] == $row["ROUTINE_NAME"] ? "" : "&name=" . urlencode($row["ROUTINE_NAME"])); // not computed on the pages to be able to print the header first
|
||||
echo '<tr' . odd() . '>';
|
||||
echo '<tr>';
|
||||
echo '<th><a href="' . h(ME . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'callf=' : 'call=') . urlencode($row["SPECIFIC_NAME"]) . $name) . '">' . h($row["ROUTINE_NAME"]) . '</a>';
|
||||
echo '<td>' . h($row["ROUTINE_TYPE"]);
|
||||
echo '<td>' . h($row["DTD_IDENTIFIER"]);
|
||||
@@ -182,11 +183,10 @@ if ($adminer->homepage()) {
|
||||
echo "<h3 id='sequences'>" . lang('Sequences') . "</h3>\n";
|
||||
$sequences = get_vals("SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema = current_schema() ORDER BY sequence_name");
|
||||
if ($sequences) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table class='odds'>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
|
||||
odd('');
|
||||
foreach ($sequences as $val) {
|
||||
echo "<tr" . odd() . "><th><a href='" . h(ME) . "sequence=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
echo "<tr><th><a href='" . h(ME) . "sequence=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
@@ -197,11 +197,10 @@ if ($adminer->homepage()) {
|
||||
echo "<h3 id='user-types'>" . lang('User types') . "</h3>\n";
|
||||
$user_types = types();
|
||||
if ($user_types) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table class='odds'>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
|
||||
odd('');
|
||||
foreach ($user_types as $val) {
|
||||
echo "<tr" . odd() . "><th><a href='" . h(ME) . "type=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
echo "<tr><th><a href='" . h(ME) . "type=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
@@ -212,7 +211,7 @@ if ($adminer->homepage()) {
|
||||
echo "<h3 id='events'>" . lang('Events') . "</h3>\n";
|
||||
$rows = get_rows("SHOW EVENTS");
|
||||
if ($rows) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "<td>" . lang('Schedule') . "<td>" . lang('Start') . "<td>" . lang('End') . "<td></thead>\n";
|
||||
foreach ($rows as $row) {
|
||||
echo "<tr>";
|
||||
|
@@ -24,7 +24,7 @@ if (isset($_GET["mongo"])) {
|
||||
$this->error = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function query($query) {
|
||||
return false;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ if (isset($_GET["mongo"])) {
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
public $primary = "_id";
|
||||
|
||||
|
||||
function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
|
||||
$select = ($select == array("*")
|
||||
? array()
|
||||
@@ -127,7 +127,7 @@ if (isset($_GET["mongo"])) {
|
||||
->skip($page * $limit)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function insert($table, $set) {
|
||||
try {
|
||||
$return = $this->_conn->_db->selectCollection($table)->insert($set);
|
||||
@@ -217,9 +217,9 @@ if (isset($_GET["mongo"])) {
|
||||
function connect($uri, $options) {
|
||||
$class = 'MongoDB\Driver\Manager';
|
||||
$this->_link = new $class($uri, $options);
|
||||
$this->executeCommand('admin', array('ping' => 1));
|
||||
$this->executeCommand($options["db"], array('ping' => 1));
|
||||
}
|
||||
|
||||
|
||||
function executeCommand($db, $command) {
|
||||
$class = 'MongoDB\Driver\Command';
|
||||
try {
|
||||
@@ -229,7 +229,7 @@ if (isset($_GET["mongo"])) {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function executeBulkWrite($namespace, $bulk, $counter) {
|
||||
try {
|
||||
$results = $this->_link->executeBulkWrite($namespace, $bulk);
|
||||
@@ -399,7 +399,7 @@ if (isset($_GET["mongo"])) {
|
||||
function get_databases($flush) {
|
||||
global $connection;
|
||||
$return = array();
|
||||
foreach ($connection->executeCommand('admin', array('listDatabases' => 1)) as $dbs) {
|
||||
foreach ($connection->executeCommand($connection->_db_name, array('listDatabases' => 1)) as $dbs) {
|
||||
foreach ($dbs->databases as $db) {
|
||||
$return[] = $db->name;
|
||||
}
|
||||
@@ -463,8 +463,6 @@ if (isset($_GET["mongo"])) {
|
||||
"insert" => 1,
|
||||
"select" => 1,
|
||||
"update" => 1,
|
||||
"where" => 1,
|
||||
"order" => 1,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -482,7 +480,11 @@ if (isset($_GET["mongo"])) {
|
||||
}
|
||||
|
||||
function sql_query_where_parser($queryWhere) {
|
||||
$queryWhere = preg_replace('~^\sWHERE \(?\(?(.+?)\)?\)?$~', '\1', $queryWhere);
|
||||
$queryWhere = preg_replace('~^\s*WHERE\s*~', "", $queryWhere);
|
||||
while ($queryWhere[0] == "(") {
|
||||
$queryWhere = preg_replace('~^\((.*)\)$~', "$1", $queryWhere);
|
||||
}
|
||||
|
||||
$wheres = explode(' AND ', $queryWhere);
|
||||
$wheresOr = explode(') OR (', $queryWhere);
|
||||
$where = array();
|
||||
@@ -577,7 +579,7 @@ if (isset($_GET["mongo"])) {
|
||||
"(date)>=",
|
||||
"(date)<=",
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function table($idf) {
|
||||
@@ -627,6 +629,11 @@ if (isset($_GET["mongo"])) {
|
||||
global $adminer;
|
||||
$connection = new Min_DB;
|
||||
list($server, $username, $password) = $adminer->credentials();
|
||||
|
||||
if ($server == "") {
|
||||
$server = "localhost:27017";
|
||||
}
|
||||
|
||||
$options = array();
|
||||
if ($username . $password != "") {
|
||||
$options["username"] = $username;
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @author Jakub Vrana
|
||||
*/
|
||||
|
||||
$drivers["mssql"] = "MS SQL (beta)";
|
||||
$drivers["mssql"] = "MS SQL";
|
||||
|
||||
if (isset($_GET["mssql"])) {
|
||||
define("DRIVER", "mssql");
|
||||
@@ -24,8 +24,15 @@ if (isset($_GET["mssql"])) {
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
global $adminer;
|
||||
$db = $adminer->database();
|
||||
$connection_info = array("UID" => $username, "PWD" => $password, "CharacterSet" => "UTF-8");
|
||||
$ssl = $adminer->connectSsl();
|
||||
if (isset($ssl["Encrypt"])) {
|
||||
$connection_info["Encrypt"] = $ssl["Encrypt"];
|
||||
}
|
||||
if (isset($ssl["TrustServerCertificate"])) {
|
||||
$connection_info["TrustServerCertificate"] = $ssl["TrustServerCertificate"];
|
||||
}
|
||||
$db = $adminer->database();
|
||||
if ($db != "") {
|
||||
$connection_info["Database"] = $db;
|
||||
}
|
||||
@@ -40,7 +47,8 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
return "'" . str_replace("'", "''", $string) . "'";
|
||||
$unicode = strlen($string) != strlen(utf8_decode($string));
|
||||
return ($unicode ? "N" : "") . "'" . str_replace("'", "''", $string) . "'";
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
@@ -163,7 +171,8 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
return "'" . str_replace("'", "''", $string) . "'";
|
||||
$unicode = strlen($string) != strlen(utf8_decode($string));
|
||||
return ($unicode ? "N" : "") . "'" . str_replace("'", "''", $string) . "'";
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
@@ -301,6 +310,11 @@ if (isset($_GET["mssql"])) {
|
||||
global $adminer;
|
||||
$connection = new Min_DB;
|
||||
$credentials = $adminer->credentials();
|
||||
|
||||
if ($credentials[0] == "") {
|
||||
$credentials[0] = "localhost:1433";
|
||||
}
|
||||
|
||||
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
||||
return $connection;
|
||||
}
|
||||
@@ -349,7 +363,9 @@ if (isset($_GET["mssql"])) {
|
||||
|
||||
function table_status($name = "") {
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT ao.name AS Name, ao.type_desc AS Engine, (SELECT value FROM fn_listextendedproperty(default, 'SCHEMA', schema_name(schema_id), 'TABLE', ao.name, null, null)) AS Comment FROM sys.all_objects AS ao WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) {
|
||||
foreach (get_rows("SELECT ao.name AS Name, ao.type_desc AS Engine, (SELECT value FROM fn_listextendedproperty(default, 'SCHEMA', schema_name(schema_id), 'TABLE', ao.name, null, null)) AS Comment
|
||||
FROM sys.all_objects AS ao
|
||||
WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) {
|
||||
if ($name != "") {
|
||||
return $row;
|
||||
}
|
||||
@@ -369,25 +385,29 @@ if (isset($_GET["mssql"])) {
|
||||
function fields($table) {
|
||||
$comments = get_key_vals("SELECT objname, cast(value as varchar(max)) FROM fn_listextendedproperty('MS_DESCRIPTION', 'schema', " . q(get_schema()) . ", 'table', " . q($table) . ", 'column', NULL)");
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, CAST(d.definition as text) [default]
|
||||
foreach (get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, CAST(d.definition as text) [default], d.name default_constraint
|
||||
FROM sys.all_columns c
|
||||
JOIN sys.all_objects o ON c.object_id = o.object_id
|
||||
JOIN sys.types t ON c.user_type_id = t.user_type_id
|
||||
LEFT JOIN sys.default_constraints d ON c.default_object_id = d.parent_column_id
|
||||
LEFT JOIN sys.default_constraints d ON c.default_object_id = d.object_id
|
||||
WHERE o.schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND o.type IN ('S', 'U', 'V') AND o.name = " . q($table)
|
||||
) as $row) {
|
||||
$type = $row["type"];
|
||||
$length = (preg_match("~char|binary~", $type) ? $row["max_length"] : ($type == "decimal" ? "$row[precision],$row[scale]" : ""));
|
||||
$length = (preg_match("~char|binary~", $type)
|
||||
? $row["max_length"] / ($type[0] == 'n' ? 2 : 1)
|
||||
: ($type == "decimal" ? "$row[precision],$row[scale]" : "")
|
||||
);
|
||||
$return[$row["name"]] = array(
|
||||
"field" => $row["name"],
|
||||
"full_type" => $type . ($length ? "($length)" : ""),
|
||||
"type" => $type,
|
||||
"length" => $length,
|
||||
"default" => $row["default"],
|
||||
"default" => (preg_match("~^\('(.*)'\)$~", $row["default"], $match) ? str_replace("''", "'", $match[1]) : $row["default"]),
|
||||
"default_constraint" => $row["default_constraint"],
|
||||
"null" => $row["is_nullable"],
|
||||
"auto_increment" => $row["is_identity"],
|
||||
"collation" => $row["collation_name"],
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1),
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
"primary" => $row["is_identity"], //! or indexes.is_primary_key
|
||||
"comment" => $comments[$row["name"]],
|
||||
);
|
||||
@@ -432,7 +452,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
|
||||
function error() {
|
||||
global $connection;
|
||||
return nl2br(h(preg_replace('~^(\[[^]]*])+~m', '', $connection->error)));
|
||||
return nl_br(h(preg_replace('~^(\[[^]]*])+~m', '', $connection->error)));
|
||||
}
|
||||
|
||||
function create_database($db, $collation) {
|
||||
@@ -458,6 +478,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
|
||||
$alter = array();
|
||||
$comments = array();
|
||||
$orig_fields = fields($table);
|
||||
foreach ($fields as $field) {
|
||||
$column = idf_escape($field[0]);
|
||||
$val = $field[1];
|
||||
@@ -470,11 +491,22 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
if ($field[0] == "") {
|
||||
$alter["ADD"][] = "\n " . implode("", $val) . ($table == "" ? substr($foreign[$val[0]], 16 + strlen($val[0])) : ""); // 16 - strlen(" FOREIGN KEY ()")
|
||||
} else {
|
||||
$default = $val[3];
|
||||
unset($val[3]); // default values are set separately
|
||||
unset($val[6]); //! identity can't be removed
|
||||
if ($column != $val[0]) {
|
||||
queries("EXEC sp_rename " . q(table($table) . ".$column") . ", " . q(idf_unescape($val[0])) . ", 'COLUMN'");
|
||||
}
|
||||
$alter["ALTER COLUMN " . implode("", $val)][] = "";
|
||||
$orig_field = $orig_fields[$field[0]];
|
||||
if (default_value($orig_field) != $default) {
|
||||
if ($orig_field["default"] !== null) {
|
||||
$alter["DROP"][] = " " . idf_escape($orig_field["default_constraint"]);
|
||||
}
|
||||
if ($default) {
|
||||
$alter["ADD"][] = "\n $default FOR $column";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -488,7 +520,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
$alter[""] = $foreign;
|
||||
}
|
||||
foreach ($alter as $key => $val) {
|
||||
if (!queries("ALTER TABLE " . idf_escape($name) . " $key" . implode(",", $val))) {
|
||||
if (!queries("ALTER TABLE " . table($name) . " $key" . implode(",", $val))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -539,7 +571,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
|
||||
function foreign_keys($table) {
|
||||
$return = array();
|
||||
foreach (get_rows("EXEC sp_fkeys @fktable_name = " . q($table)) as $row) {
|
||||
foreach (get_rows("EXEC sp_fkeys @fktable_name = " . q($table) . ", @fktable_owner = " . q(get_schema())) as $row) {
|
||||
$foreign_key = &$return[$row["FK_NAME"]];
|
||||
$foreign_key["db"] = $row["PKTABLE_QUALIFIER"];
|
||||
$foreign_key["table"] = $row["PKTABLE_NAME"];
|
||||
@@ -630,15 +662,8 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_c_style_escapes() {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function show_status() {
|
||||
@@ -653,7 +678,7 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return preg_match('~^(comment|columns|database|drop_col|indexes|descidx|scheme|sql|table|trigger|view|view_trigger)$~', $feature); //! routine|
|
||||
return preg_match('~^(check|comment|columns|database|drop_col|indexes|descidx|scheme|sql|table|trigger|view|view_trigger)$~', $feature); //! routine|
|
||||
}
|
||||
|
||||
function driver_config() {
|
||||
|
@@ -14,19 +14,12 @@ if (!defined("DRIVER")) {
|
||||
|
||||
function connect($server = "", $username = "", $password = "", $database = null, $port = null, $socket = null) {
|
||||
global $adminer;
|
||||
mysqli_report(MYSQLI_REPORT_OFF);
|
||||
mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
|
||||
list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket
|
||||
|
||||
$ssl = $adminer->connectSsl();
|
||||
if (isset($ssl['key']) || isset($ssl['cert']) || isset($ssl['ca'])) {
|
||||
$this->ssl_set(
|
||||
isset($ssl['key']) ? $ssl['key'] : null,
|
||||
isset($ssl['cert']) ? $ssl['cert'] : null,
|
||||
isset($ssl['ca']) ? $ssl['ca'] : null,
|
||||
null, null
|
||||
);
|
||||
if ($ssl) {
|
||||
$this->ssl_set($ssl['key'], $ssl['cert'], $ssl['ca'], '', '');
|
||||
}
|
||||
|
||||
$return = @$this->real_connect(
|
||||
($server != "" ? $host : ini_get("mysqli.default_host")),
|
||||
($server . $username != "" ? $username : ini_get("mysqli.default_user")),
|
||||
@@ -34,7 +27,7 @@ if (!defined("DRIVER")) {
|
||||
$database,
|
||||
(is_numeric($port) ? $port : ini_get("mysqli.default_port")),
|
||||
(!is_numeric($port) ? $port : $socket),
|
||||
($ssl ? MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT : 0)
|
||||
($ssl ? (empty($ssl['cert']) ? 2048 : 64) : 0) // 2048 - MYSQLI_CLIENT_SSL, 64 - MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT (not available before PHP 5.6.16)
|
||||
);
|
||||
$this->options(MYSQLI_OPT_LOCAL_INFILE, false);
|
||||
return $return;
|
||||
@@ -241,28 +234,33 @@ if (!defined("DRIVER")) {
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
global $adminer;
|
||||
|
||||
$dsn = "mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\d)~', ';port=\1', $server));
|
||||
|
||||
$options = [PDO::MYSQL_ATTR_LOCAL_INFILE => false];
|
||||
$options = array(PDO::MYSQL_ATTR_LOCAL_INFILE => false);
|
||||
$ssl = $adminer->connectSsl();
|
||||
if (isset($ssl['key'])) {
|
||||
$options[PDO::MYSQL_ATTR_SSL_KEY] = $ssl['key'];
|
||||
if ($ssl) {
|
||||
if (!empty($ssl['key'])) {
|
||||
$options[PDO::MYSQL_ATTR_SSL_KEY] = $ssl['key'];
|
||||
}
|
||||
if (!empty($ssl['cert'])) {
|
||||
$options[PDO::MYSQL_ATTR_SSL_CERT] = $ssl['cert'];
|
||||
}
|
||||
if (!empty($ssl['ca'])) {
|
||||
$options[PDO::MYSQL_ATTR_SSL_CA] = $ssl['ca'];
|
||||
}
|
||||
if (!empty($ssl['verify'])) {
|
||||
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = $ssl['verify'];
|
||||
}
|
||||
}
|
||||
if (isset($ssl['cert'])) {
|
||||
$options[PDO::MYSQL_ATTR_SSL_CERT] = $ssl['cert'];
|
||||
}
|
||||
if (isset($ssl['ca'])) {
|
||||
$options[PDO::MYSQL_ATTR_SSL_CA] = $ssl['ca'];
|
||||
}
|
||||
|
||||
$this->dsn($dsn, $username, $password, $options);
|
||||
|
||||
$this->dsn(
|
||||
"mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\d)~', ';port=\1', $server)),
|
||||
$username,
|
||||
$password,
|
||||
$options
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
function set_charset($charset) {
|
||||
$this->query("SET NAMES $charset");
|
||||
$this->query("SET NAMES $charset"); // charset in DSN is ignored before PHP 5.3.6
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
@@ -321,8 +319,8 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
}
|
||||
|
||||
function convertSearch($idf, array $where, array $field) {
|
||||
return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"]) && preg_match('~[\x80-\xFF]~', $where['val'])
|
||||
function convertSearch($idf, $val, $field) {
|
||||
return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"]) && preg_match('~[\x80-\xFF]~', $val['val'])
|
||||
? "CONVERT($idf USING " . charset($this->_conn) . ")"
|
||||
: $idf
|
||||
);
|
||||
@@ -340,10 +338,10 @@ if (!defined("DRIVER")) {
|
||||
function tableHelp($name) {
|
||||
$maria = preg_match('~MariaDB~', $this->_conn->server_info);
|
||||
if (information_schema(DB)) {
|
||||
return strtolower(($maria ? "information-schema-$name-table/" : str_replace("_", "-", $name) . "-table.html"));
|
||||
return strtolower("information-schema-" . ($maria ? "$name-table/" : str_replace("_", "-", $name) . "-table.html"));
|
||||
}
|
||||
if (DB == "mysql") {
|
||||
return ($maria ? "mysql$name-table/" : "system-database.html"); //! more precise link
|
||||
return ($maria ? "mysql$name-table/" : "system-schema.html"); //! more precise link
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,16 +369,26 @@ if (!defined("DRIVER")) {
|
||||
* @return mixed Min_DB or string for error
|
||||
*/
|
||||
function connect() {
|
||||
global $adminer, $types, $structured_types;
|
||||
global $adminer, $types, $structured_types, $edit_functions;
|
||||
$connection = new Min_DB;
|
||||
$credentials = $adminer->credentials();
|
||||
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
||||
$connection->set_charset(charset($connection));
|
||||
$connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
|
||||
$connection->query("SET sql_quote_show_create = 1, autocommit = 1");
|
||||
if (min_version('5.7.8', 10.2, $connection)) {
|
||||
$structured_types[lang('Strings')][] = "json";
|
||||
$types["json"] = 4294967295;
|
||||
}
|
||||
if (min_version('', 10.7, $connection)) {
|
||||
$structured_types[lang('Strings')][] = "uuid";
|
||||
$types["uuid"] = 128;
|
||||
$edit_functions[0]['uuid'] = 'uuid';
|
||||
}
|
||||
if (min_version(9, '', $connection)) {
|
||||
$structured_types[lang('Numbers')][] = "vector";
|
||||
$types["vector"] = 16383;
|
||||
$edit_functions[0]['vector'] = 'string_to_vector';
|
||||
}
|
||||
return $connection;
|
||||
}
|
||||
$return = $connection->error;
|
||||
@@ -473,7 +481,7 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
/** Get tables list
|
||||
* @return array array($name => $type)
|
||||
* @return array [$name => $type]
|
||||
*/
|
||||
function tables_list() {
|
||||
return get_key_vals(min_version(5)
|
||||
@@ -484,7 +492,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Count tables in all databases
|
||||
* @param array
|
||||
* @return array array($db => $tables)
|
||||
* @return array arra($db => $tables)
|
||||
*/
|
||||
function count_tables($databases) {
|
||||
$return = array();
|
||||
@@ -497,7 +505,7 @@ if (!defined("DRIVER")) {
|
||||
/** Get table status
|
||||
* @param string
|
||||
* @param bool return only "Name", "Engine" and "Comment" fields
|
||||
* @return array array($name => array("Name" => , "Engine" => , "Comment" => , "Oid" => , "Rows" => , "Collation" => , "Auto_increment" => , "Data_length" => , "Index_length" => , "Data_free" => )) or only inner array with $name
|
||||
* @return array [$name => array("Name" => , "Engine" => , "Comment" => , "Oid" => , "Rows" => , "Collation" => , "Auto_increment" => , "Data_length" => , "Index_length" => , "Data_free" => )] or only inner array with $name
|
||||
*/
|
||||
function table_status($name = "", $fast = false) {
|
||||
$return = array();
|
||||
@@ -513,6 +521,8 @@ if (!defined("DRIVER")) {
|
||||
$row["Comment"] = "";
|
||||
}
|
||||
if ($name != "") {
|
||||
// MariaDB: Table name is returned as lowercase on macOS, so we fix it here.
|
||||
$row["Name"] = $name;
|
||||
return $row;
|
||||
}
|
||||
$return[$row["Name"]] = $row;
|
||||
@@ -539,7 +549,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get information about fields
|
||||
* @param string
|
||||
* @return array array($name => array("field" => , "full_type" => , "type" => , "length" => , "unsigned" => , "default" => , "null" => , "auto_increment" => , "on_update" => , "collation" => , "privileges" => , "comment" => , "primary" => ))
|
||||
* @return array [$name => array("field" => , "full_type" => , "type" => , "length" => , "unsigned" => , "default" => , "null" => , "auto_increment" => , "on_update" => , "collation" => , "privileges" => , "comment" => , "primary" => )]
|
||||
*/
|
||||
function fields($table) {
|
||||
$return = array();
|
||||
@@ -556,7 +566,7 @@ if (!defined("DRIVER")) {
|
||||
"auto_increment" => ($row["Extra"] == "auto_increment"),
|
||||
"on_update" => (preg_match('~^on update (.+)~i', $row["Extra"], $match) ? $match[1] : ""), //! available since MySQL 5.1.23
|
||||
"collation" => $row["Collation"],
|
||||
"privileges" => array_flip(preg_split('~, *~', $row["Privileges"])) + ["where" => 1, "order" => 1],
|
||||
"privileges" => array_flip(preg_split('~, *~', $row["Privileges"])),
|
||||
"comment" => $row["Comment"],
|
||||
"primary" => ($row["Key"] == "PRI"),
|
||||
// https://mariadb.com/kb/en/library/show-columns/, https://github.com/vrana/adminer/pull/359#pullrequestreview-276677186
|
||||
@@ -569,7 +579,7 @@ if (!defined("DRIVER")) {
|
||||
/** Get table indexes
|
||||
* @param string
|
||||
* @param string Min_DB to use
|
||||
* @return array array($key_name => array("type" => , "columns" => array(), "lengths" => array(), "descs" => array()))
|
||||
* @return array [$key_name => array("type" => , "columns" => array(), "lengths" => array(), "descs" => array())]
|
||||
*/
|
||||
function indexes($table, $connection2 = null) {
|
||||
$return = array();
|
||||
@@ -585,7 +595,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get foreign keys in table
|
||||
* @param string
|
||||
* @return array array($name => array("db" => , "ns" => , "table" => , "source" => array(), "target" => array(), "on_delete" => , "on_update" => ))
|
||||
* @return array [$name => array("db" => , "ns" => , "table" => , "source" => array(), "target" => array(), "on_delete" => , "on_update" => )]
|
||||
*/
|
||||
function foreign_keys($table) {
|
||||
global $connection, $on_actions;
|
||||
@@ -612,7 +622,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get view SELECT
|
||||
* @param string
|
||||
* @return array array("select" => )
|
||||
* @return array ["select" => ]
|
||||
*/
|
||||
function view($name) {
|
||||
global $connection;
|
||||
@@ -861,7 +871,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get information about trigger
|
||||
* @param string trigger name
|
||||
* @return array array("Trigger" => , "Timing" => , "Event" => , "Of" => , "Type" => , "Statement" => )
|
||||
* @return array ["Trigger" => , "Timing" => , "Event" => , "Of" => , "Type" => , "Statement" => ]
|
||||
*/
|
||||
function trigger($name) {
|
||||
if ($name == "") {
|
||||
@@ -873,7 +883,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get defined triggers
|
||||
* @param string
|
||||
* @return array array($name => array($timing, $event))
|
||||
* @return array [$name => array($timing, $event)]
|
||||
*/
|
||||
function triggers($table) {
|
||||
$return = array();
|
||||
@@ -884,7 +894,7 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
/** Get trigger options
|
||||
* @return array ("Timing" => array(), "Event" => array(), "Type" => array())
|
||||
* @return array ["Timing" => array(), "Event" => array(), "Type" => array()]
|
||||
*/
|
||||
function trigger_options() {
|
||||
return array(
|
||||
@@ -897,7 +907,7 @@ if (!defined("DRIVER")) {
|
||||
/** Get information about stored routine
|
||||
* @param string
|
||||
* @param string "FUNCTION" or "PROCEDURE"
|
||||
* @return array ("fields" => array("field" => , "type" => , "length" => , "unsigned" => , "inout" => , "collation" => ), "returns" => , "definition" => , "language" => )
|
||||
* @return array ["fields" => array("field" => , "type" => , "length" => , "unsigned" => , "inout" => , "collation" => ), "returns" => , "definition" => , "language" => ]
|
||||
*/
|
||||
function routine($name, $type) {
|
||||
global $connection, $enum_length, $inout, $types;
|
||||
@@ -921,19 +931,18 @@ if (!defined("DRIVER")) {
|
||||
"collation" => strtolower($param[9]),
|
||||
);
|
||||
}
|
||||
if ($type != "FUNCTION") {
|
||||
return array("fields" => $fields, "definition" => $match[11]);
|
||||
}
|
||||
return array(
|
||||
"fields" => $fields,
|
||||
"comment" => $connection->result("SELECT ROUTINE_COMMENT FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . q(DB) . " AND ROUTINE_NAME = " . q($name)),
|
||||
) + ($type != "FUNCTION" ? array("definition" => $match[11]) : array(
|
||||
"returns" => array("type" => $match[12], "length" => $match[13], "unsigned" => $match[15], "collation" => $match[16]),
|
||||
"definition" => $match[17],
|
||||
"language" => "SQL", // available in information_schema.ROUTINES.PARAMETER_STYLE
|
||||
);
|
||||
"language" => "SQL", // available in information_schema.ROUTINES.BODY_STYLE
|
||||
));
|
||||
}
|
||||
|
||||
/** Get list of routines
|
||||
* @return array ("SPECIFIC_NAME" => , "ROUTINE_NAME" => , "ROUTINE_TYPE" => , "DTD_IDENTIFIER" => )
|
||||
* @return array ["SPECIFIC_NAME" => , "ROUTINE_NAME" => , "ROUTINE_TYPE" => , "DTD_IDENTIFIER" => ]
|
||||
*/
|
||||
function routines() {
|
||||
return get_rows("SELECT ROUTINE_NAME AS SPECIFIC_NAME, ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . q(DB));
|
||||
@@ -1055,44 +1064,34 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
/** Get server variables
|
||||
* @return array ($name => $value)
|
||||
* @return array [$name => $value]
|
||||
*/
|
||||
function show_variables() {
|
||||
return get_key_vals("SHOW VARIABLES");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
static $strictMode = null;
|
||||
|
||||
if ($strictMode === null) {
|
||||
$strictMode = (bool)preg_match('~STRICT_(TRANS|ALL)_TABLES~', get_key_vals("SHOW VARIABLES LIKE 'sql_mode'")["sql_mode"]);
|
||||
}
|
||||
|
||||
return $strictMode;
|
||||
}
|
||||
|
||||
/** Check if C-style escapes are supported
|
||||
* @return bool
|
||||
*/
|
||||
function is_c_style_escapes() {
|
||||
static $c_style = null;
|
||||
|
||||
global $connection;
|
||||
static $c_style;
|
||||
if ($c_style === null) {
|
||||
$c_style = strpos(get_key_vals("SHOW VARIABLES LIKE 'sql_mode'")["sql_mode"], 'NO_BACKSLASH_ESCAPES') === false;
|
||||
$sql_mode = $connection->result("SHOW VARIABLES LIKE 'sql_mode'", 1);
|
||||
$c_style = (strpos($sql_mode, 'NO_BACKSLASH_ESCAPES') === false);
|
||||
}
|
||||
|
||||
return $c_style;
|
||||
}
|
||||
|
||||
/** Get process list
|
||||
* @return array ($row)
|
||||
* @return array [$row]
|
||||
*/
|
||||
function process_list() {
|
||||
return get_rows("SHOW FULL PROCESSLIST");
|
||||
}
|
||||
|
||||
/** Get status variables
|
||||
* @return array ($name => $value)
|
||||
* @return array [$name => $value]
|
||||
*/
|
||||
function show_status() {
|
||||
return get_key_vals("SHOW STATUS");
|
||||
@@ -1124,7 +1123,7 @@ if (!defined("DRIVER")) {
|
||||
$return = "UNHEX($return)";
|
||||
}
|
||||
if ($field["type"] == "bit") {
|
||||
$return = "CONV($return, 2, 10) + 0";
|
||||
$return = "CONVERT(b$return, UNSIGNED)";
|
||||
}
|
||||
if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
|
||||
$prefix = (min_version(8) ? "ST_" : "");
|
||||
@@ -1134,11 +1133,11 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
/** Check whether a feature is supported
|
||||
* @param string "comment", "copy", "database", "descidx", "drop_col", "dump", "event", "indexes", "kill", "materializedview", "partitioning", "privileges", "procedure", "processlist", "routine", "scheme", "sequence", "status", "table", "trigger", "type", "variables", "view", "view_trigger"
|
||||
* @param string "check", "comment", "copy", "database", "descidx", "drop_col", "dump", "event", "indexes", "kill", "materializedview", "partitioning", "privileges", "procedure", "processlist", "routine", "scheme", "sequence", "status", "table", "trigger", "type", "variables", "view", "view_trigger"
|
||||
* @return bool
|
||||
*/
|
||||
function support($feature) {
|
||||
return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . (min_version(8) ? "" : "|descidx" . (min_version(5.1) ? "" : "|event|partitioning" . (min_version(5) ? "" : "|routine|trigger|view"))) . "~", $feature);
|
||||
return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . (min_version(8) ? "" : "|descidx" . (min_version(5.1) ? "" : "|event|partitioning" . (min_version(5) ? "" : "|routine|trigger|view"))) . (min_version('8.0.16', '10.2.1') ? "" : "|check") . "~", $feature);
|
||||
}
|
||||
|
||||
/** Kill a process
|
||||
@@ -1165,14 +1164,14 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
/** Get driver config
|
||||
* @return array array('possible_drivers' => , 'jush' => , 'types' => , 'structured_types' => , 'unsigned' => , 'operators' => , 'functions' => , 'grouping' => , 'edit_functions' => )
|
||||
* @return array ['possible_drivers' => , 'jush' => , 'types' => , 'structured_types' => , 'unsigned' => , 'operators' => , 'functions' => , 'grouping' => , 'edit_functions' => ]
|
||||
*/
|
||||
function driver_config() {
|
||||
$types = array(); ///< @var array ($type => $maximum_unsigned_length, ...)
|
||||
$structured_types = array(); ///< @var array ($description => array($type, ...), ...)
|
||||
$types = array(); ///< @var array [$type => $maximum_unsigned_length, ...]
|
||||
$structured_types = array(); ///< @var array [$description => array($type, ...), ...]
|
||||
foreach (array(
|
||||
lang('Numbers') => array("tinyint" => 3, "smallint" => 5, "mediumint" => 8, "int" => 10, "bigint" => 20, "decimal" => 66, "float" => 12, "double" => 21),
|
||||
lang('Date and time') => array("date" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),
|
||||
lang('Date and time') => array("dat`e" => 10, "datetime" => 19, "timestamp" => 19, "time" => 10, "year" => 4),
|
||||
lang('Strings') => array("char" => 255, "varchar" => 65535, "tinytext" => 255, "text" => 65535, "mediumtext" => 16777215, "longtext" => 4294967295),
|
||||
lang('Lists') => array("enum" => 65535, "set" => 64),
|
||||
lang('Binary') => array("bit" => 20, "binary" => 255, "varbinary" => 65535, "tinyblob" => 255, "blob" => 65535, "mediumblob" => 16777215, "longblob" => 4294967295),
|
||||
@@ -1188,7 +1187,7 @@ if (!defined("DRIVER")) {
|
||||
'structured_types' => $structured_types,
|
||||
'unsigned' => array("unsigned", "zerofill", "unsigned zerofill"), ///< @var array number variants
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "FIND_IN_SET", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"), ///< @var array operators used in select
|
||||
'functions' => array("char_length", "date", "from_unixtime", "unix_timestamp", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper"), ///< @var array functions used in select
|
||||
'functions' => array("char_length", "date", "from_unixtime", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper"), ///< @var array functions used in select
|
||||
'grouping' => array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"), ///< @var array grouping functions used in select
|
||||
'edit_functions' => array( ///< @var array of array("$type|$type2" => "$function/$function2") functions used in editing, [0] - edit and insert, [1] - edit only
|
||||
array(
|
||||
|
@@ -167,14 +167,7 @@ if (isset($_GET["oracle"])) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $hostPath
|
||||
* @return bool
|
||||
*/
|
||||
function is_server_host_valid($hostPath) {
|
||||
// EasyConnect host+path format: host[/[service_name][:server_type][/instance_name]]
|
||||
return (bool)preg_match('~^[^/]+(/([^/:]+)?(:[^/:]+)?(/[^/:]+)?)?$~', $hostPath);
|
||||
}
|
||||
|
||||
|
||||
function idf_escape($idf) {
|
||||
return '"' . str_replace('"', '""', $idf) . '"';
|
||||
@@ -195,7 +188,12 @@ if (isset($_GET["oracle"])) {
|
||||
}
|
||||
|
||||
function get_databases() {
|
||||
return get_vals("SELECT tablespace_name FROM user_tablespaces ORDER BY 1");
|
||||
return get_vals("SELECT DISTINCT tablespace_name FROM (
|
||||
SELECT tablespace_name FROM user_tablespaces
|
||||
UNION SELECT tablespace_name FROM all_tables WHERE tablespace_name IS NOT NULL
|
||||
)
|
||||
ORDER BY 1"
|
||||
);
|
||||
}
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
@@ -304,7 +302,7 @@ ORDER BY 1"
|
||||
"null" => ($row["NULLABLE"] == "Y"),
|
||||
//! "auto_increment" => false,
|
||||
//! "collation" => $row["CHARACTER_SET_NAME"],
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1),
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
//! "comment" => $row["Comment"],
|
||||
//! "primary" => ($row["Key"] == "PRI"),
|
||||
);
|
||||
@@ -486,13 +484,6 @@ AND c_src.TABLE_NAME = " . q($table);
|
||||
return get_key_vals('SELECT name, display_value FROM v$parameter');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_c_style_escapes() {
|
||||
return true;
|
||||
}
|
||||
@@ -540,7 +531,7 @@ ORDER BY PROCESS
|
||||
'types' => $types,
|
||||
'structured_types' => $structured_types,
|
||||
'unsigned' => array(),
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"),
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"),
|
||||
'functions' => array("length", "lower", "round", "upper"),
|
||||
'grouping' => array("avg", "count", "count distinct", "max", "min", "sum"),
|
||||
'edit_functions' => array(
|
||||
|
@@ -19,14 +19,11 @@ if (isset($_GET["pgsql"])) {
|
||||
global $adminer;
|
||||
$db = $adminer->database();
|
||||
set_error_handler(array($this, '_error'));
|
||||
|
||||
$this->_string = "host='" . str_replace(":", "' port='", addcslashes($server, "'\\")) . "' user='" . addcslashes($username, "'\\") . "' password='" . addcslashes($password, "'\\") . "'";
|
||||
|
||||
$ssl = $adminer->connectSsl();
|
||||
if (isset($ssl["mode"])) {
|
||||
$this->_string .= " sslmode='" . $ssl["mode"] . "'";
|
||||
}
|
||||
|
||||
$this->_link = @pg_connect("$this->_string dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'", PGSQL_CONNECT_FORCE_NEW);
|
||||
if (!$this->_link && $db != "") {
|
||||
// try to connect directly with database for performance
|
||||
@@ -155,19 +152,14 @@ if (isset($_GET["pgsql"])) {
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
global $adminer;
|
||||
|
||||
$db = $adminer->database();
|
||||
|
||||
//! client_encoding is supported since 9.1, but we can't yet use min_version here
|
||||
$dsn = "pgsql:host='" . str_replace(":", "' port='", addcslashes($server, "'\\")) . "' client_encoding=utf8 dbname='" . ($db != "" ? addcslashes($db, "'\\") : "postgres") . "'";
|
||||
|
||||
$ssl = $adminer->connectSsl();
|
||||
if (isset($ssl["mode"])) {
|
||||
$dsn .= " sslmode='" . $ssl["mode"] . "'";
|
||||
}
|
||||
|
||||
$this->dsn($dsn, $username, $password);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -229,9 +221,9 @@ if (isset($_GET["pgsql"])) {
|
||||
return $query;
|
||||
}
|
||||
|
||||
function convertSearch($idf, array $where, array $field) {
|
||||
function convertSearch($idf, $val, $field) {
|
||||
$textTypes = "char|text";
|
||||
if (strpos($where["op"], "LIKE") === false) {
|
||||
if (strpos($val["op"], "LIKE") === false) {
|
||||
$textTypes .= "|date|time(stamp)?|boolean|uuid|inet|cidr|macaddr|" . number_type();
|
||||
}
|
||||
|
||||
@@ -292,8 +284,8 @@ if (isset($_GET["pgsql"])) {
|
||||
|
||||
function get_databases() {
|
||||
return get_vals("SELECT d.datname FROM pg_database d JOIN pg_roles r ON d.datdba = r.oid
|
||||
WHERE d.datallowconn = TRUE AND has_database_privilege(d.datname, 'CONNECT') AND pg_has_role(r.rolname, 'USAGE')
|
||||
ORDER BY d.datname");
|
||||
WHERE d.datallowconn = TRUE AND has_database_privilege(d.datname, 'CONNECT') AND pg_has_role(r.rolname, 'USAGE')
|
||||
ORDER BY d.datname");
|
||||
}
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
@@ -341,7 +333,15 @@ ORDER BY 1";
|
||||
|
||||
function table_status($name = "") {
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT c.relname AS \"Name\", CASE c.relkind WHEN 'r' THEN 'table' WHEN 'm' THEN 'materialized view' ELSE 'view' END AS \"Engine\", pg_table_size(c.oid) AS \"Data_length\", pg_indexes_size(c.oid) AS \"Index_length\", obj_description(c.oid, 'pg_class') AS \"Comment\", " . (min_version(12) ? "''" : "CASE WHEN c.relhasoids THEN 'oid' ELSE '' END") . " AS \"Oid\", c.reltuples as \"Rows\", n.nspname
|
||||
foreach (get_rows("SELECT
|
||||
c.relname AS \"Name\",
|
||||
CASE c.relkind WHEN 'r' THEN 'table' WHEN 'm' THEN 'materialized view' ELSE 'view' END AS \"Engine\",
|
||||
pg_table_size(c.oid) AS \"Data_length\",
|
||||
pg_indexes_size(c.oid) AS \"Index_length\",
|
||||
obj_description(c.oid, 'pg_class') AS \"Comment\",
|
||||
" . (min_version(12) ? "''" : "CASE WHEN c.relhasoids THEN 'oid' ELSE '' END") . " AS \"Oid\",
|
||||
c.reltuples as \"Rows\",
|
||||
n.nspname
|
||||
FROM pg_class c
|
||||
JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace)
|
||||
WHERE relkind IN ('r', 'm', 'v', 'f', 'p')
|
||||
@@ -366,7 +366,6 @@ WHERE relkind IN ('r', 'm', 'v', 'f', 'p')
|
||||
'timestamp without time zone' => 'timestamp',
|
||||
'timestamp with time zone' => 'timestamptz',
|
||||
);
|
||||
|
||||
foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, pg_get_expr(d.adbin, d.adrelid) AS default, a.attnotnull::int, col_description(c.oid, a.attnum) AS comment" . (min_version(10) ? ", a.attidentity" : "") . "
|
||||
FROM pg_class c
|
||||
JOIN pg_namespace n ON c.relnamespace = n.oid
|
||||
@@ -395,7 +394,7 @@ ORDER BY a.attnum"
|
||||
}
|
||||
$row["null"] = !$row["attnotnull"];
|
||||
$row["auto_increment"] = $row['attidentity'] || preg_match('~^nextval\(~i', $row["default"]);
|
||||
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1);
|
||||
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
|
||||
if (preg_match('~(.+)::[^,)]+(.*)~', $row["default"], $match)) {
|
||||
$row["default"] = ($match[1] == "NULL" ? null : idf_unescape($match[1]) . $match[2]);
|
||||
}
|
||||
@@ -451,23 +450,6 @@ ORDER BY conkey, conname") as $row) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
function constraints($table) {
|
||||
global $on_actions;
|
||||
$return = array();
|
||||
foreach (get_rows("SELECT conname, consrc
|
||||
FROM pg_catalog.pg_constraint
|
||||
INNER JOIN pg_catalog.pg_namespace ON pg_constraint.connamespace = pg_namespace.oid
|
||||
INNER JOIN pg_catalog.pg_class ON pg_constraint.conrelid = pg_class.oid AND pg_constraint.connamespace = pg_class.relnamespace
|
||||
WHERE pg_constraint.contype = 'c'
|
||||
AND conrelid != 0 -- handle only CONSTRAINTs here, not TYPES
|
||||
AND nspname = current_schema()
|
||||
AND relname = " . q($table) . "
|
||||
ORDER BY connamespace, conname") as $row) {
|
||||
$return[$row['conname']] = $row['consrc'];
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function view($name) {
|
||||
global $connection;
|
||||
return array("select" => trim($connection->result("SELECT pg_get_viewdef(" . $connection->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = " . q($name)) . ")")));
|
||||
@@ -488,7 +470,7 @@ ORDER BY connamespace, conname") as $row) {
|
||||
if (preg_match('~^(.*\n)?([^\n]*)\n( *)\^(\n.*)?$~s', $return, $match)) {
|
||||
$return = $match[1] . preg_replace('~((?:[^&]|&[^;]*;){' . strlen($match[3]) . '})(.*)~', '\1<b>\2</b>', $match[2]) . $match[4];
|
||||
}
|
||||
return nl2br($return);
|
||||
return nl_br($return);
|
||||
}
|
||||
|
||||
function create_database($db, $collation) {
|
||||
@@ -502,7 +484,8 @@ ORDER BY connamespace, conname") as $row) {
|
||||
}
|
||||
|
||||
function rename_database($name, $collation) {
|
||||
//! current database cannot be renamed
|
||||
global $connection;
|
||||
$connection->close();
|
||||
return queries("ALTER DATABASE " . idf_escape(DB) . " RENAME TO " . idf_escape($name));
|
||||
}
|
||||
|
||||
@@ -516,6 +499,7 @@ ORDER BY connamespace, conname") as $row) {
|
||||
if ($table != "" && $table != $name) {
|
||||
$queries[] = "ALTER TABLE " . table($table) . " RENAME TO " . table($name);
|
||||
}
|
||||
$sequence = "";
|
||||
foreach ($fields as $field) {
|
||||
$column = idf_escape($field[0]);
|
||||
$val = $field[1];
|
||||
@@ -537,10 +521,15 @@ ORDER BY connamespace, conname") as $row) {
|
||||
$queries[] = "ALTER TABLE " . table($name) . " RENAME $column TO $val[0]";
|
||||
}
|
||||
$alter[] = "ALTER $column TYPE$val[1]";
|
||||
if (!$val[6]) {
|
||||
$alter[] = "ALTER $column " . ($val[3] ? "SET$val[3]" : "DROP DEFAULT");
|
||||
$alter[] = "ALTER $column " . ($val[2] == " NULL" ? "DROP NOT" : "SET") . $val[2];
|
||||
$sequence_name = $table . "_" . idf_unescape($val[0]) . "_seq";
|
||||
$alter[] = "ALTER $column " . ($val[3] ? "SET$val[3]"
|
||||
: (isset($val[6]) ? "SET DEFAULT nextval(" . q($sequence_name) . ")"
|
||||
: "DROP DEFAULT"
|
||||
));
|
||||
if (isset($val[6])) {
|
||||
$sequence = "CREATE SEQUENCE IF NOT EXISTS " . idf_escape($sequence_name) . " OWNED BY " . idf_escape($table) . ".$val[0]";
|
||||
}
|
||||
$alter[] = "ALTER $column " . ($val[2] == " NULL" ? "DROP NOT" : "SET") . $val[2];
|
||||
}
|
||||
if ($field[0] != "" || $val5 != "") {
|
||||
$queries[] = "COMMENT ON COLUMN " . table($name) . ".$val[0] IS " . ($val5 != "" ? substr($val5, 9) : "''");
|
||||
@@ -553,6 +542,9 @@ ORDER BY connamespace, conname") as $row) {
|
||||
} elseif ($alter) {
|
||||
array_unshift($queries, "ALTER TABLE " . table($table) . "\n" . implode(",\n", $alter));
|
||||
}
|
||||
if ($sequence) {
|
||||
array_unshift($queries, $sequence);
|
||||
}
|
||||
if ($comment !== null) {
|
||||
$queries[] = "COMMENT ON TABLE " . table($name) . " IS " . q($comment);
|
||||
}
|
||||
@@ -720,7 +712,7 @@ ORDER BY SPECIFIC_NAME');
|
||||
}
|
||||
|
||||
function types() {
|
||||
return get_vals("SELECT typname
|
||||
return get_key_vals("SELECT oid, typname
|
||||
FROM pg_type
|
||||
WHERE typnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema())
|
||||
AND typtype IN ('b','d','e')
|
||||
@@ -743,9 +735,9 @@ AND typelem = 0"
|
||||
$connection2 = $connection;
|
||||
}
|
||||
$return = $connection2->query("SET search_path TO " . idf_escape($schema));
|
||||
foreach (types() as $type) { //! get types from current_schemas('t')
|
||||
foreach (types() as $key => $type) { //! get types from current_schemas('t')
|
||||
if (!isset($types[$type])) {
|
||||
$types[$type] = 0;
|
||||
$types[$type] = $key;
|
||||
$structured_types[lang('User types')][] = $type;
|
||||
}
|
||||
}
|
||||
@@ -770,8 +762,6 @@ AND typelem = 0"
|
||||
}
|
||||
|
||||
function create_sql($table, $auto_increment, $style) {
|
||||
global $connection;
|
||||
$return = '';
|
||||
$return_parts = array();
|
||||
$sequences = array();
|
||||
|
||||
@@ -783,7 +773,6 @@ AND typelem = 0"
|
||||
$fields = fields($table);
|
||||
$indexes = indexes($table);
|
||||
ksort($indexes);
|
||||
$constraints = constraints($table);
|
||||
|
||||
if (!$status || empty($fields)) {
|
||||
return false;
|
||||
@@ -801,13 +790,15 @@ AND typelem = 0"
|
||||
// sequences for fields
|
||||
if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
|
||||
$sequence_name = $matches[1];
|
||||
$rows = get_rows(min_version(10)
|
||||
$sq = reset(get_rows(min_version(10)
|
||||
? "SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = " . q(idf_unescape($sequence_name))
|
||||
: "SELECT * FROM $sequence_name"
|
||||
);
|
||||
$sq = reset($rows);
|
||||
));
|
||||
$sequences[] = ($style == "DROP+CREATE" ? "DROP SEQUENCE IF EXISTS $sequence_name;\n" : "")
|
||||
. "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value]" . ($auto_increment && $sq['last_value'] ? " START $sq[last_value]" : "") . " CACHE $sq[cache_value];";
|
||||
. "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value]"
|
||||
. ($auto_increment && $sq['last_value'] ? " START " . ($sq["last_value"] + 1) : "")
|
||||
. " CACHE $sq[cache_value];"
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -824,8 +815,18 @@ AND typelem = 0"
|
||||
}
|
||||
}
|
||||
|
||||
$constraints = get_key_vals("SELECT conname, " . (min_version(8) ? "pg_get_constraintdef(pg_constraint.oid)" : "CONCAT('CHECK ', consrc)") . "
|
||||
FROM pg_catalog.pg_constraint
|
||||
INNER JOIN pg_catalog.pg_namespace ON pg_constraint.connamespace = pg_namespace.oid
|
||||
INNER JOIN pg_catalog.pg_class ON pg_constraint.conrelid = pg_class.oid AND pg_constraint.connamespace = pg_class.relnamespace
|
||||
WHERE pg_constraint.contype = 'c'
|
||||
AND conrelid != 0 -- handle only CONSTRAINTs here, not TYPES
|
||||
AND nspname = current_schema()
|
||||
AND relname = " . q($table) . "
|
||||
ORDER BY connamespace, conname"
|
||||
);
|
||||
foreach ($constraints as $conname => $consrc) {
|
||||
$return_parts[] = "CONSTRAINT " . idf_escape($conname) . " CHECK $consrc";
|
||||
$return_parts[] = "CONSTRAINT " . idf_escape($conname) . " $consrc";
|
||||
}
|
||||
|
||||
$return .= implode(",\n ", $return_parts) . "\n) WITH (oids = " . ($status['Oid'] ? 'true' : 'false') . ");";
|
||||
@@ -841,7 +842,7 @@ AND typelem = 0"
|
||||
}
|
||||
}
|
||||
|
||||
// coments for table & fields
|
||||
// comments for table & fields
|
||||
if ($status['Comment']) {
|
||||
$return .= "\n\nCOMMENT ON TABLE " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " IS " . q($status['Comment']) . ";";
|
||||
}
|
||||
@@ -878,20 +879,12 @@ AND typelem = 0"
|
||||
return get_key_vals("SHOW ALL");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_c_style_escapes() {
|
||||
static $c_style = null;
|
||||
|
||||
global $connection;
|
||||
static $c_style;
|
||||
if ($c_style === null) {
|
||||
$c_style = get_vals("SHOW standard_conforming_strings")[0] == "off";
|
||||
$c_style = ($connection->result("SHOW standard_conforming_strings") == "off");
|
||||
}
|
||||
|
||||
return $c_style;
|
||||
}
|
||||
|
||||
@@ -910,7 +903,7 @@ AND typelem = 0"
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return preg_match('~^(database|table|columns|sql|indexes|descidx|comment|view|' . (min_version(9.3) ? 'materializedview|' : '') . 'scheme|routine|processlist|sequence|trigger|type|variables|drop_col|kill|dump)$~', $feature);
|
||||
return preg_match('~^(check|database|table|columns|sql|indexes|descidx|comment|view|' . (min_version(9.3) ? 'materializedview|' : '') . 'scheme|routine|processlist|sequence|trigger|type|variables|drop_col|kill|dump)$~', $feature);
|
||||
}
|
||||
|
||||
function kill_process($val) {
|
||||
@@ -959,7 +952,6 @@ AND typelem = 0"
|
||||
"char|text" => "||",
|
||||
)
|
||||
),
|
||||
'c_style_escapes' => true,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
return false;
|
||||
}
|
||||
$row = $result->_result->fetchArray();
|
||||
return $row[$field];
|
||||
return $row ? $row[$field] : false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,9 +319,9 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
"field" => $name,
|
||||
"type" => (preg_match('~int~i', $type) ? "integer" : (preg_match('~char|clob|text~i', $type) ? "text" : (preg_match('~blob~i', $type) ? "blob" : (preg_match('~real|floa|doub~i', $type) ? "real" : "numeric")))),
|
||||
"full_type" => $type,
|
||||
"default" => (preg_match("~'(.*)'~", $default, $match) ? str_replace("''", "'", $match[1]) : ($default == "NULL" ? null : $default)),
|
||||
"default" => (preg_match("~^'(.*)'$~", $default, $match) ? str_replace("''", "'", $match[1]) : ($default == "NULL" ? null : $default)),
|
||||
"null" => !$row["notnull"],
|
||||
"privileges" => array("select" => 1, "insert" => 1, "update" => 1, "where" => 1, "order" => 1),
|
||||
"privileges" => array("select" => 1, "insert" => 1, "update" => 1),
|
||||
"primary" => $row["pk"],
|
||||
);
|
||||
if ($row["pk"]) {
|
||||
@@ -523,7 +523,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function recreate_table($table, $name, $fields, $originals, $foreign, $auto_increment, $indexes = array()) {
|
||||
function recreate_table($table, $name, $fields, $originals, $foreign, $auto_increment = 0, $indexes = array()) {
|
||||
global $connection;
|
||||
if ($table != "") {
|
||||
if (!$fields) {
|
||||
@@ -758,19 +758,13 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
function show_variables() {
|
||||
global $connection;
|
||||
$return = array();
|
||||
foreach (array("auto_vacuum", "cache_size", "count_changes", "default_cache_size", "empty_result_callbacks", "encoding", "foreign_keys", "full_column_names", "fullfsync", "journal_mode", "journal_size_limit", "legacy_file_format", "locking_mode", "page_size", "max_page_count", "read_uncommitted", "recursive_triggers", "reverse_unordered_selects", "secure_delete", "short_column_names", "synchronous", "temp_store", "temp_store_directory", "schema_version", "integrity_check", "quick_check") as $key) {
|
||||
$return[$key] = $connection->result("PRAGMA $key");
|
||||
$result = $connection->query("PRAGMA pragma_list");
|
||||
while ($row = $result->fetch_row()) {
|
||||
$return[$row[0]] = $connection->result("PRAGMA $row[0]");
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_c_style_escapes() {
|
||||
return true;
|
||||
}
|
||||
|
@@ -53,12 +53,12 @@ SET foreign_key_checks = 0;
|
||||
$out = "";
|
||||
|
||||
if ($_POST["routines"]) {
|
||||
foreach (array("FUNCTION", "PROCEDURE") as $routine) {
|
||||
foreach (get_rows("SHOW $routine STATUS WHERE Db = " . q($db), null, "-- ") as $row) {
|
||||
$create = remove_definer($connection->result("SHOW CREATE $routine " . idf_escape($row["Name"]), 2));
|
||||
set_utf8mb4($create);
|
||||
$out .= ($style != 'DROP+CREATE' ? "DROP $routine IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "") . "$create;;\n\n";
|
||||
}
|
||||
foreach (routines() as $row) {
|
||||
$name = $row["ROUTINE_NAME"];
|
||||
$routine = $row["ROUTINE_TYPE"];
|
||||
$create = create_routine($routine, array("name" => $name) + routine($row["SPECIFIC_NAME"], $routine));
|
||||
set_utf8mb4($create);
|
||||
$out .= ($style != 'DROP+CREATE' ? "DROP $routine IF EXISTS " . idf_escape($name) . ";;\n" : "") . "$create;\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,9 +70,7 @@ SET foreign_key_checks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($out) {
|
||||
echo "DELIMITER ;;\n\n$out" . "DELIMITER ;\n\n";
|
||||
}
|
||||
echo ($out && $jush == 'sql' ? "DELIMITER ;;\n\n$out" . "DELIMITER ;\n\n" : $out);
|
||||
}
|
||||
|
||||
if ($_POST["table_style"] || $_POST["data_style"]) {
|
||||
@@ -137,7 +135,7 @@ page_header(lang('Export'), $error, ($_GET["export"] != "" ? array("table" => $_
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0" class="layout">
|
||||
<table class="layout">
|
||||
<?php
|
||||
$db_style = array('', 'USE', 'DROP+CREATE', 'CREATE');
|
||||
$table_style = array('', 'DROP+CREATE', 'CREATE');
|
||||
@@ -147,14 +145,16 @@ if ($jush == "sql") { //! use insertUpdate() in all drivers
|
||||
}
|
||||
parse_str($_COOKIE["adminer_export"], $row);
|
||||
if (!$row) {
|
||||
$row = array("output" => "file", "format" => "sql", "db_style" => (DB != "" ? "" : "CREATE"), "table_style" => "DROP+CREATE", "data_style" => "INSERT");
|
||||
$row = array("output" => "text", "format" => "sql", "db_style" => (DB != "" ? "" : "CREATE"), "table_style" => "DROP+CREATE", "data_style" => "INSERT");
|
||||
}
|
||||
if (!isset($row["events"])) { // backwards compatibility
|
||||
$row["routines"] = $row["events"] = ($_GET["dump"] == "");
|
||||
$row["triggers"] = $row["table_style"];
|
||||
}
|
||||
|
||||
echo "<tr><th>" . lang('Format') . "<td>" . html_select("format", $adminer->dumpFormat(), $row["format"], false) . "\n"; // false = radio
|
||||
echo "<tr><th>" . lang('Output') . "<td>" . html_select("output", $adminer->dumpOutput(), $row["output"], 0) . "\n"; // 0 - radio
|
||||
|
||||
echo "<tr><th>" . lang('Format') . "<td>" . html_select("format", $adminer->dumpFormat(), $row["format"], 0) . "\n"; // 0 - radio
|
||||
|
||||
echo ($jush == "sqlite" ? "" : "<tr><th>" . lang('Database') . "<td>" . html_select('db_style', $db_style, $row["db_style"])
|
||||
. (support("routine") ? checkbox("routines", 1, $row["routines"], lang('Routines')) : "")
|
||||
@@ -167,15 +167,12 @@ echo "<tr><th>" . lang('Tables') . "<td>" . html_select('table_style', $table_st
|
||||
;
|
||||
|
||||
echo "<tr><th>" . lang('Data') . "<td>" . html_select('data_style', $data_style, $row["data_style"]);
|
||||
|
||||
echo "<tr><th>" . lang('Output') . "<td>" . html_select("output", $adminer->dumpOutput(), $row["output"], false) . "\n"; // false = radio
|
||||
|
||||
?>
|
||||
</table>
|
||||
<p><input type="submit" value="<?php echo lang('Export'); ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
|
||||
<table cellspacing="0">
|
||||
<table>
|
||||
<?php
|
||||
echo script("qsl('table').onclick = dumpClick;");
|
||||
$prefixes = array();
|
||||
|
@@ -4,10 +4,10 @@ function adminer_object() {
|
||||
include_once "../plugins/login-password-less.php";
|
||||
include_once "../plugins/drivers/elastic.php";
|
||||
include_once "../plugins/drivers/elastic5.php";
|
||||
return new AdminerPlugin([
|
||||
return new AdminerPlugin(array(
|
||||
// TODO: inline the result of password_hash() so that the password is not visible in source codes
|
||||
new AdminerLoginPasswordLess(password_hash("YOUR_PASSWORD_HERE", PASSWORD_DEFAULT)),
|
||||
]);
|
||||
));
|
||||
}
|
||||
|
||||
include "./index.php";
|
||||
|
@@ -15,7 +15,7 @@ if ($_POST && !$error) {
|
||||
: "AT " . q($row["STARTS"])
|
||||
) . " ON COMPLETION" . ($row["ON_COMPLETION"] ? "" : " NOT") . " PRESERVE"
|
||||
;
|
||||
|
||||
|
||||
queries_redirect(substr(ME, 0, -1), ($EVENT != "" ? lang('Event has been altered.') : lang('Event has been created.')), queries(($EVENT != ""
|
||||
? "ALTER EVENT " . idf_escape($EVENT) . $schedule
|
||||
. ($EVENT != $row["EVENT_NAME"] ? "\nRENAME TO " . idf_escape($row["EVENT_NAME"]) : "")
|
||||
@@ -35,7 +35,7 @@ if (!$row && $EVENT != "") {
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0" class="layout">
|
||||
<table class="layout">
|
||||
<tr><th><?php echo lang('Name'); ?><td><input name="EVENT_NAME" value="<?php echo h($row["EVENT_NAME"]); ?>" data-maxlength="64" autocapitalize="off">
|
||||
<tr><th title="datetime"><?php echo lang('Start'); ?><td><input name="STARTS" value="<?php echo h("$row[EXECUTE_AT]$row[STARTS]"); ?>">
|
||||
<tr><th title="datetime"><?php echo lang('End'); ?><td><input name="ENDS" value="<?php echo h($row["ENDS"]); ?>">
|
||||
|
@@ -6,13 +6,13 @@ if ($_GET["file"] == "favicon.ico") {
|
||||
echo lzw_decompress(compile_file('../adminer/static/favicon.ico', 'lzw_compress'));
|
||||
} elseif ($_GET["file"] == "default.css") {
|
||||
header("Content-Type: text/css; charset=utf-8");
|
||||
echo lzw_decompress(compile_file('../adminer/static/default.css;../vendor/vrana/jush/jush.css', 'minify_css'));
|
||||
echo lzw_decompress(compile_file('../adminer/static/default.css;../externals/jush/jush.css', 'minify_css'));
|
||||
} elseif ($_GET["file"] == "functions.js") {
|
||||
header("Content-Type: text/javascript; charset=utf-8");
|
||||
echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js'));
|
||||
} elseif ($_GET["file"] == "jush.js") {
|
||||
header("Content-Type: text/javascript; charset=utf-8");
|
||||
echo lzw_decompress(compile_file('../vendor/vrana/jush/modules/jush.js;../vendor/vrana/jush/modules/jush-textarea.js;../vendor/vrana/jush/modules/jush-txt.js;../vendor/vrana/jush/modules/jush-js.js;../vendor/vrana/jush/modules/jush-sql.js;../vendor/vrana/jush/modules/jush-pgsql.js;../vendor/vrana/jush/modules/jush-sqlite.js;../vendor/vrana/jush/modules/jush-mssql.js;../vendor/vrana/jush/modules/jush-oracle.js;../vendor/vrana/jush/modules/jush-simpledb.js', 'minify_js'));
|
||||
echo lzw_decompress(compile_file('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-js.js;../externals/jush/modules/jush-sql.js;../externals/jush/modules/jush-pgsql.js;../externals/jush/modules/jush-sqlite.js;../externals/jush/modules/jush-mssql.js;../externals/jush/modules/jush-oracle.js;../externals/jush/modules/jush-simpledb.js', 'minify_js'));
|
||||
} else {
|
||||
header("Content-Type: image/gif");
|
||||
switch ($_GET["file"]) {
|
||||
|
@@ -6,7 +6,7 @@ $row = $_POST;
|
||||
if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-js"]) {
|
||||
$message = ($_POST["drop"] ? lang('Foreign key has been dropped.') : ($name != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.')));
|
||||
$location = ME . "table=" . urlencode($TABLE);
|
||||
|
||||
|
||||
if (!$_POST["drop"]) {
|
||||
$row["source"] = array_filter($row["source"], 'strlen');
|
||||
ksort($row["source"]); // enforce input order
|
||||
@@ -16,7 +16,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
|
||||
}
|
||||
$row["target"] = $target;
|
||||
}
|
||||
|
||||
|
||||
if ($jush == "sqlite") {
|
||||
queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row)))));
|
||||
} else {
|
||||
@@ -77,7 +77,7 @@ if ($jush == "pgsql") {
|
||||
?>
|
||||
<input type="hidden" name="change-js" value="">
|
||||
<noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
|
||||
<table cellspacing="0">
|
||||
<table>
|
||||
<thead><tr><th id="label-source"><?php echo lang('Source'); ?><th id="label-target"><?php echo lang('Target'); ?></thead>
|
||||
<?php
|
||||
$j = 0;
|
||||
|
@@ -13,28 +13,24 @@ class Adminer {
|
||||
}
|
||||
|
||||
/** Connection parameters
|
||||
* @return array ($server, $username, $password)
|
||||
* @return array [$server, $username, $password]
|
||||
*/
|
||||
function credentials() {
|
||||
return array(SERVER, $_GET["username"], get_password());
|
||||
}
|
||||
|
||||
/** Get SSL connection options
|
||||
* @return array array("key" => filename, "cert" => filename, "ca" => filename) or null
|
||||
* @return array ["key" => filename, "cert" => filename, "ca" => filename] or null
|
||||
*/
|
||||
function connectSsl() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a private key used for permanent login.
|
||||
*
|
||||
* @param bool $create
|
||||
*
|
||||
* @return string|false Cryptic string which gets combined with password or false in case of an error.
|
||||
* @throws \Random\RandomException
|
||||
*/
|
||||
/** Get key used for permanent login
|
||||
* @param bool
|
||||
* @return string cryptic string which gets combined with password or false in case of an error
|
||||
*/
|
||||
function permanentLogin($create = false) {
|
||||
return get_private_key($create);
|
||||
return password_file($create);
|
||||
}
|
||||
|
||||
/** Return key used to group brute force attacks; behind a reverse proxy, you want to return the last part of X-Forwarded-For
|
||||
@@ -100,7 +96,7 @@ class Adminer {
|
||||
*/
|
||||
function head() {
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="../vendor/vrana/jush/jush.css">
|
||||
<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">
|
||||
<?php
|
||||
return true;
|
||||
}
|
||||
@@ -122,10 +118,10 @@ class Adminer {
|
||||
*/
|
||||
function loginForm() {
|
||||
global $drivers;
|
||||
echo "<table cellspacing='0' class='layout'>\n";
|
||||
echo "<table class='layout'>\n";
|
||||
echo $this->loginFormField('driver', '<tr><th>' . lang('System') . '<td>', html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);") . "\n");
|
||||
echo $this->loginFormField('server', '<tr><th>' . lang('Server') . '<td>', '<input name="auth[server]" value="' . h(SERVER) . '" title="hostname[:port]" placeholder="localhost" autocapitalize="off">' . "\n");
|
||||
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input name="auth[username]" id="username" value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">' . script("focus(qs('#username')); qs('#username').form['auth[driver]'].onchange();"));
|
||||
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input name="auth[username]" id="username" autofocus value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">' . script("qs('#username').form['auth[driver]'].onchange();"));
|
||||
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
|
||||
echo $this->loginFormField('db', '<tr><th>' . lang('Database') . '<td>', '<input name="auth[db]" value="' . h($_GET["db"]) . '" autocapitalize="off">' . "\n");
|
||||
echo "</table>\n";
|
||||
@@ -235,33 +231,24 @@ class Adminer {
|
||||
*/
|
||||
function selectQuery($query, $start, $failed = false) {
|
||||
global $jush, $driver;
|
||||
|
||||
$supportSql = support("sql");
|
||||
|
||||
$result = "<p>"
|
||||
. "<code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> "
|
||||
. "<span class='time'>(" . format_time($start) . ")</span>"
|
||||
. ($supportSql ? " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>" : "");
|
||||
|
||||
$return = "</p>\n"; // required for IE9 inline edit
|
||||
if (!$failed && ($warnings = $driver->warnings())) {
|
||||
$id = "warnings";
|
||||
$result = ($supportSql ? "," : "")
|
||||
. " <a href='#$id'>" . lang('Warnings') . "</a>" . script("qsl('a').onclick = partial(toggle, '$id');", "")
|
||||
. "</p>\n"
|
||||
. "<div id='$id' class='hidden'>\n$warnings</div>\n";
|
||||
} else {
|
||||
$result .= "</p>\n";
|
||||
$return = ", <a href='#$id'>" . lang('Warnings') . "</a>" . script("qsl('a').onclick = partial(toggle, '$id');", "")
|
||||
. "$return<div id='$id' class='hidden'>\n$warnings</div>\n"
|
||||
;
|
||||
}
|
||||
|
||||
return $result;
|
||||
return "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>(" . format_time($start) . ")</span>"
|
||||
. (support("sql") ? " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>" : "")
|
||||
. $return
|
||||
;
|
||||
}
|
||||
|
||||
/** Query printed in SQL command before execution
|
||||
* @param string query to be executed
|
||||
* @return string escaped query to be printed
|
||||
*/
|
||||
function sqlCommandQuery($query)
|
||||
{
|
||||
function sqlCommandQuery($query) {
|
||||
return shorten_utf8(trim($query), 1000);
|
||||
}
|
||||
|
||||
@@ -305,7 +292,7 @@ class Adminer {
|
||||
if (preg_match('~json~', $field["type"])) {
|
||||
$return = "<code class='jush-js'>$return</code>";
|
||||
}
|
||||
return ($link ? "<a href='" . h($link) . "'" . (is_web_url($link) ? target_blank() : "") . ">$return</a>" : $return);
|
||||
return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? target_blank() : "") . ">$return</a>" : $return);
|
||||
}
|
||||
|
||||
/** Value conversion used in select and edit
|
||||
@@ -322,12 +309,17 @@ class Adminer {
|
||||
* @return null
|
||||
*/
|
||||
function tableStructurePrint($fields) {
|
||||
global $structured_types;
|
||||
echo "<div class='scrollable'>\n";
|
||||
echo "<table cellspacing='0' class='nowrap'>\n";
|
||||
echo "<table class='nowrap odds'>\n";
|
||||
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
|
||||
foreach ($fields as $field) {
|
||||
echo "<tr" . odd() . "><th>" . h($field["field"]);
|
||||
echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . "</span>";
|
||||
echo "<tr><th>" . h($field["field"]);
|
||||
$type = h($field["full_type"]);
|
||||
echo "<td><span title='" . h($field["collation"]) . "'>"
|
||||
. (in_array($type, (array) $structured_types[lang('User types')]) ? "<a href='" . h(ME . 'type=' . urlencode($type)) . "'>$type</a>" : $type)
|
||||
. "</span>"
|
||||
;
|
||||
echo ($field["null"] ? " <i>NULL</i>" : "");
|
||||
echo ($field["auto_increment"] ? " <i>" . lang('Auto Increment') . "</i>" : "");
|
||||
echo (isset($field["default"]) ? " <span title='" . lang('Default value') . "'>[<b>" . h($field["default"]) . "</b>]</span>" : "");
|
||||
@@ -343,7 +335,7 @@ class Adminer {
|
||||
* @return null
|
||||
*/
|
||||
function tableIndexesPrint($indexes) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table>\n";
|
||||
foreach ($indexes as $name => $index) {
|
||||
ksort($index["columns"]); // enforce correct columns order
|
||||
$print = array();
|
||||
@@ -518,7 +510,7 @@ class Adminer {
|
||||
/** Process columns box in select
|
||||
* @param array selectable columns
|
||||
* @param array
|
||||
* @return array (array(select_expressions), array(group_expressions))
|
||||
* @return array [array(select_expressions), array(group_expressions)]
|
||||
*/
|
||||
function selectColumnsProcess($columns, $indexes) {
|
||||
global $functions, $grouping;
|
||||
@@ -541,60 +533,49 @@ class Adminer {
|
||||
* @return array expressions to join by AND
|
||||
*/
|
||||
function selectSearchProcess($fields, $indexes) {
|
||||
global $driver;
|
||||
|
||||
$return = [];
|
||||
|
||||
global $connection, $driver;
|
||||
$return = array();
|
||||
foreach ($indexes as $i => $index) {
|
||||
if ($index["type"] == "FULLTEXT" && $_GET["fulltext"][$i] != "") {
|
||||
$return[] = "MATCH (" . implode(", ", array_map('idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ((array) $_GET["where"] as $where) {
|
||||
$col = $where["col"];
|
||||
$op = $where["op"];
|
||||
$val = $where["val"];
|
||||
|
||||
if ("$col$val" != "" && in_array($op, $this->operators)) {
|
||||
foreach ((array) $_GET["where"] as $key => $val) {
|
||||
if ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators)) {
|
||||
$prefix = "";
|
||||
$cond = " $op";
|
||||
|
||||
if (preg_match('~IN$~', $op)) {
|
||||
$in = process_length($val);
|
||||
$cond = " $val[op]";
|
||||
if (preg_match('~IN$~', $val["op"])) {
|
||||
$in = process_length($val["val"]);
|
||||
$cond .= " " . ($in != "" ? $in : "(NULL)");
|
||||
} elseif ($op == "SQL") {
|
||||
$cond = " $val"; // SQL injection
|
||||
} elseif ($op == "LIKE %%") {
|
||||
$cond = " LIKE " . $this->processInput($fields[$col], "%$val%");
|
||||
} elseif ($op == "ILIKE %%") {
|
||||
$cond = " ILIKE " . $this->processInput($fields[$col], "%$val%");
|
||||
} elseif ($op == "FIND_IN_SET") {
|
||||
$prefix = "$op(" . q($val) . ", ";
|
||||
} elseif ($val["op"] == "SQL") {
|
||||
$cond = " $val[val]"; // SQL injection
|
||||
} elseif ($val["op"] == "LIKE %%") {
|
||||
$cond = " LIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
|
||||
} elseif ($val["op"] == "ILIKE %%") {
|
||||
$cond = " ILIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
|
||||
} elseif ($val["op"] == "FIND_IN_SET") {
|
||||
$prefix = "$val[op](" . q($val["val"]) . ", ";
|
||||
$cond = ")";
|
||||
} elseif (!preg_match('~NULL$~', $op)) {
|
||||
$cond .= " " . $this->processInput($fields[$col], $val);
|
||||
} elseif (!preg_match('~NULL$~', $val["op"])) {
|
||||
$cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
|
||||
}
|
||||
|
||||
if ($col != "") {
|
||||
$return[] = $prefix . $driver->convertSearch(idf_escape($col), $where, $fields[$col]) . $cond;
|
||||
if ($val["col"] != "") {
|
||||
$return[] = $prefix . $driver->convertSearch(idf_escape($val["col"]), $val, $fields[$val["col"]]) . $cond;
|
||||
} else {
|
||||
// find anywhere
|
||||
$cols = array();
|
||||
foreach ($fields as $name => $field) {
|
||||
if (isset($field["privileges"]["where"])
|
||||
&& (preg_match('~^[-\d.' . (preg_match('~IN$~', $op) ? ',' : '') . ']+$~', $val) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
|
||||
&& (!preg_match("~[\x80-\xFF]~", $val) || preg_match('~char|text|enum|set~', $field["type"]))
|
||||
&& (!preg_match('~date|timestamp~', $field["type"]) || preg_match('~^\d+-\d+-\d+~', $val))
|
||||
if ((preg_match('~^[-\d.' . (preg_match('~IN$~', $val["op"]) ? ',' : '') . ']+$~', $val["val"]) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
|
||||
&& (!preg_match("~[\x80-\xFF]~", $val["val"]) || preg_match('~char|text|enum|set~', $field["type"]))
|
||||
&& (!preg_match('~date|timestamp~', $field["type"]) || preg_match('~^\d+-\d+-\d+~', $val["val"]))
|
||||
) {
|
||||
$cols[] = $prefix . $driver->convertSearch(idf_escape($name), $where, $field) . $cond;
|
||||
$cols[] = $prefix . $driver->convertSearch(idf_escape($name), $val, $field) . $cond;
|
||||
}
|
||||
}
|
||||
$return[] = ($cols ? "(" . implode(" OR ", $cols) . ")" : "1 = 0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -729,7 +710,7 @@ class Adminer {
|
||||
if ($field["type"] == "enum") {
|
||||
return (isset($_GET["select"]) ? "<label><input type='radio'$attrs value='-1' checked><i>" . lang('original') . "</i></label> " : "")
|
||||
. ($field["null"] ? "<label><input type='radio'$attrs value=''" . ($value !== null || isset($_GET["select"]) ? "" : " checked") . "><i>NULL</i></label> " : "")
|
||||
. enum_input("radio", $attrs, $field, $value, 0) // 0 - empty
|
||||
. enum_input("radio", $attrs, $field, $value, $value === 0 ? 0 : null) // 0 - empty value
|
||||
;
|
||||
}
|
||||
return "";
|
||||
@@ -777,11 +758,10 @@ class Adminer {
|
||||
* @return array
|
||||
*/
|
||||
function dumpOutput() {
|
||||
$return = array('file' => lang('save'), 'text' => lang('open'));
|
||||
$return = array('text' => lang('open'), 'file' => lang('save'));
|
||||
if (function_exists('gzencode')) {
|
||||
$return['gz'] = 'gzip';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -842,8 +822,9 @@ class Adminer {
|
||||
*/
|
||||
function dumpData($table, $style, $query) {
|
||||
global $connection, $jush;
|
||||
$max_packet = ($jush == "sqlite" ? 0 : 1048576); // default, minimum is 1024
|
||||
if ($style) {
|
||||
$max_packet = ($jush == "sqlite" ? 0 : 1048576); // default, minimum is 1024
|
||||
$fields = array();
|
||||
if ($_POST["format"] == "sql") {
|
||||
if ($style == "TRUNCATE+INSERT") {
|
||||
echo truncate_sql($table) . ";\n";
|
||||
@@ -855,7 +836,7 @@ class Adminer {
|
||||
$insert = "";
|
||||
$buffer = "";
|
||||
$keys = array();
|
||||
$generatedKeys = array();
|
||||
$generated = array();
|
||||
$suffix = "";
|
||||
$fetch_function = ($table != '' ? 'fetch_assoc' : 'fetch_row');
|
||||
while ($row = $result->$fetch_function()) {
|
||||
@@ -863,10 +844,10 @@ class Adminer {
|
||||
$values = array();
|
||||
foreach ($row as $val) {
|
||||
$field = $result->fetch_field();
|
||||
if (!empty($fields[$field->name]['generated'])) {
|
||||
$generatedKeys[$field->name] = true;
|
||||
if ($fields[$field->name]['generated']) {
|
||||
$generated[$field->name] = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$keys[] = $field->name;
|
||||
$key = idf_escape($field->name);
|
||||
$values[] = "$key = VALUES($key)";
|
||||
@@ -884,10 +865,10 @@ class Adminer {
|
||||
$insert = "INSERT INTO " . table($table) . " (" . implode(", ", array_map('idf_escape', $keys)) . ") VALUES";
|
||||
}
|
||||
foreach ($row as $key => $val) {
|
||||
if (isset($generatedKeys[$key])) {
|
||||
if ($generated[$key]) {
|
||||
unset($row[$key]);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$field = $fields[$key];
|
||||
$row[$key] = ($val !== null
|
||||
? unconvert_field($field, preg_match(number_type(), $field["type"]) && !preg_match('~\[~', $field["full_type"]) && is_numeric($val) ? $val : q(($val === false ? 0 : $val)))
|
||||
@@ -941,11 +922,9 @@ class Adminer {
|
||||
return $ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the path of the file for webserver load.
|
||||
*
|
||||
* @return string Path of the sql import file.
|
||||
*/
|
||||
/** Set the path of the file for webserver load
|
||||
* @return string path of the sql dump file
|
||||
*/
|
||||
function importServerPath() {
|
||||
return "adminer.sql";
|
||||
}
|
||||
@@ -969,13 +948,14 @@ class Adminer {
|
||||
global $VERSION, $jush, $drivers, $connection;
|
||||
?>
|
||||
<h1>
|
||||
<?php echo $this->name(); ?>
|
||||
<?php if ($missing != "auth"): ?>
|
||||
<span class="version"><?php echo $VERSION; ?></span>
|
||||
<a href="https://www.adminer.org/#download"<?php echo target_blank(); ?> id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
|
||||
<?php endif; ?>
|
||||
<?php echo $this->name(); ?>
|
||||
<span class="version">
|
||||
<?php echo $VERSION; ?>
|
||||
<a href="https://www.adminer.org/#download"<?php echo target_blank(); ?> id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
|
||||
</span>
|
||||
</h1>
|
||||
<?php
|
||||
switch_lang();
|
||||
if ($missing == "auth") {
|
||||
$output = "";
|
||||
foreach ((array) $_SESSION["pwds"] as $vendor => $servers) {
|
||||
@@ -999,12 +979,12 @@ class Adminer {
|
||||
$connection->select_db(DB);
|
||||
$tables = table_status('', true);
|
||||
}
|
||||
echo script_src("../vendor/vrana/jush/modules/jush.js");
|
||||
echo script_src("../vendor/vrana/jush/modules/jush-textarea.js");
|
||||
echo script_src("../vendor/vrana/jush/modules/jush-txt.js");
|
||||
echo script_src("../vendor/vrana/jush/modules/jush-js.js");
|
||||
echo script_src("../externals/jush/modules/jush.js");
|
||||
echo script_src("../externals/jush/modules/jush-textarea.js");
|
||||
echo script_src("../externals/jush/modules/jush-txt.js");
|
||||
echo script_src("../externals/jush/modules/jush-js.js");
|
||||
if (support("sql")) {
|
||||
echo script_src("../vendor/vrana/jush/modules/jush-$jush.js");
|
||||
echo script_src("../externals/jush/modules/jush-$jush.js");
|
||||
?>
|
||||
<script<?php echo nonce(); ?>>
|
||||
<?php
|
||||
@@ -1025,18 +1005,26 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '
|
||||
<?php
|
||||
}
|
||||
$this->databasesPrint($missing);
|
||||
$actions = array();
|
||||
if (DB == "" || !$missing) {
|
||||
echo "<p class='links'>" . (support("sql") ? "<a href='" . h(ME) . "sql='" . bold(isset($_GET["sql"]) && !isset($_GET["import"])) . ">" . lang('SQL command') . "</a>\n<a href='" . h(ME) . "import='" . bold(isset($_GET["import"])) . ">" . lang('Import') . "</a>\n" : "") . "";
|
||||
if (support("sql")) {
|
||||
$actions[] = "<a href='" . h(ME) . "sql='" . bold(isset($_GET["sql"]) && !isset($_GET["import"])) . ">" . lang('SQL command') . "</a>";
|
||||
$actions[] = "<a href='" . h(ME) . "import='" . bold(isset($_GET["import"])) . ">" . lang('Import') . "</a>";
|
||||
}
|
||||
if (support("dump")) {
|
||||
echo "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]) . "' id='dump'" . bold(isset($_GET["dump"])) . ">" . lang('Export') . "</a>\n";
|
||||
$actions[] = "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]) . "' id='dump'" . bold(isset($_GET["dump"])) . ">" . lang('Export') . "</a>";
|
||||
}
|
||||
}
|
||||
if ($_GET["ns"] !== "" && !$missing && DB != "") {
|
||||
echo '<a href="' . h(ME) . 'create="' . bold($_GET["create"] === "") . ">" . lang('Create table') . "</a>\n";
|
||||
if (!$tables) {
|
||||
echo "<p class='message'>" . lang('No tables.') . "\n";
|
||||
} else {
|
||||
$in_db = $_GET["ns"] !== "" && !$missing && DB != "";
|
||||
if ($in_db) {
|
||||
$actions[] = '<a href="' . h(ME) . 'create="' . bold($_GET["create"] === "") . ">" . lang('Create table') . "</a>";
|
||||
}
|
||||
echo ($actions ? "<p class='links'>\n" . implode("\n", $actions) . "\n" : "");
|
||||
if ($in_db) {
|
||||
if ($tables) {
|
||||
$this->tablesPrint($tables);
|
||||
} else {
|
||||
echo "<p class='message'>" . lang('No tables.') . "</p>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1058,9 +1046,9 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '
|
||||
<?php
|
||||
hidden_fields_get();
|
||||
$db_events = script("mixin(qsl('select'), {onmousedown: dbMouseDown, onchange: dbChange});");
|
||||
echo "<span title='" . lang('database') . "'>" . lang('DB') . "</span>: " . ($databases
|
||||
echo "<span title='" . lang('Database') . "'>" . lang('DB') . "</span>: " . ($databases
|
||||
? "<select name='db'>" . optionlist(array("" => "") + $databases, DB) . "</select>$db_events"
|
||||
: "<input name='db' value='" . h(DB) . "' autocapitalize='off'>\n"
|
||||
: "<input name='db' value='" . h(DB) . "' autocapitalize='off' size='19'>\n"
|
||||
);
|
||||
echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\n";
|
||||
if (support("scheme")) {
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
$connection = '';
|
||||
|
||||
$has_token = $_SESSION["token"];
|
||||
@@ -16,78 +15,13 @@ if ($_COOKIE["adminer_permanent"]) {
|
||||
}
|
||||
}
|
||||
|
||||
function validate_server_input() {
|
||||
if (SERVER == "") {
|
||||
return;
|
||||
}
|
||||
|
||||
$parts = parse_url(SERVER);
|
||||
if (!$parts) {
|
||||
auth_error(lang('Invalid server or credentials.'));
|
||||
}
|
||||
|
||||
// Check proper URL parts.
|
||||
if (isset($parts['user']) || isset($parts['pass']) || isset($parts['query']) || isset($parts['fragment'])) {
|
||||
auth_error(lang('Invalid server or credentials.'));
|
||||
}
|
||||
|
||||
// Allow only HTTP/S scheme.
|
||||
if (isset($parts['scheme']) && !preg_match('~^(https?)$~i', $parts['scheme'])) {
|
||||
auth_error(lang('Invalid server or credentials.'));
|
||||
}
|
||||
|
||||
// Note that "localhost" and IP address without a scheme is parsed as a path.
|
||||
$hostPath = (isset($parts['host']) ? $parts['host'] : '') . (isset($parts['path']) ? $parts['path'] : '');
|
||||
|
||||
// Validate host.
|
||||
if (!is_server_host_valid($hostPath)) {
|
||||
auth_error(lang('Invalid server or credentials.'));
|
||||
}
|
||||
|
||||
// Check privileged ports.
|
||||
if (isset($parts['port']) && ($parts['port'] < 1024 || $parts['port'] > 65535)) {
|
||||
auth_error(lang('Connecting to privileged ports is not allowed.'));
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('is_server_host_valid')) {
|
||||
/**
|
||||
* @param string $hostPath
|
||||
* @return bool
|
||||
*/
|
||||
function is_server_host_valid($hostPath)
|
||||
{
|
||||
return strpos($hostPath, '/') === false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $server
|
||||
* @param string $username
|
||||
* @param string $password
|
||||
* @param string $defaultServer
|
||||
* @param int|null $defaultPort
|
||||
* @return string
|
||||
*/
|
||||
function build_http_url($server, $username, $password, $defaultServer, $defaultPort = null) {
|
||||
if (!preg_match('~^(https?://)?([^:]*)(:\d+)?$~', rtrim($server, '/'), $matches)) {
|
||||
$this->error = lang('Invalid server or credentials.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return ($matches[1] ?: "http://") .
|
||||
($username !== "" || $password !== "" ? "$username:$password@" : "") .
|
||||
($matches[2] !== "" ? $matches[2] : $defaultServer) .
|
||||
(isset($matches[3]) ? $matches[3] : ($defaultPort ? ":$defaultPort" : ""));
|
||||
}
|
||||
|
||||
function add_invalid_login() {
|
||||
global $adminer;
|
||||
$file = open_file_with_lock(get_temp_dir() . "/adminer.invalid");
|
||||
if (!$file) {
|
||||
$fp = file_open_lock(get_temp_dir() . "/adminer.invalid");
|
||||
if (!$fp) {
|
||||
return;
|
||||
}
|
||||
$invalids = unserialize(stream_get_contents($file));
|
||||
$invalids = unserialize(stream_get_contents($fp));
|
||||
$time = time();
|
||||
if ($invalids) {
|
||||
foreach ($invalids as $ip => $val) {
|
||||
@@ -101,16 +35,13 @@ function add_invalid_login() {
|
||||
$invalid = array($time + 30*60, 0); // active for 30 minutes
|
||||
}
|
||||
$invalid[1]++;
|
||||
write_and_unlock_file($file, serialize($invalids));
|
||||
file_write_unlock($fp, serialize($invalids));
|
||||
}
|
||||
|
||||
function check_invalid_login() {
|
||||
global $adminer;
|
||||
|
||||
$filename = get_temp_dir() . "/adminer.invalid";
|
||||
$invalids = file_exists($filename) ? unserialize(file_get_contents($filename)) : [];
|
||||
$invalid = ($invalids ? $invalids[$adminer->bruteForceKey()] : []);
|
||||
|
||||
$invalids = unserialize(@file_get_contents(get_temp_dir() . "/adminer.invalid")); // @ - may not exist
|
||||
$invalid = ($invalids ? $invalids[$adminer->bruteForceKey()] : array());
|
||||
$next_attempt = ($invalid[1] > 29 ? $invalid[0] - time() : 0); // allow 30 invalid attempts
|
||||
if ($next_attempt > 0) { //! do the same with permanent login
|
||||
auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
|
||||
@@ -121,7 +52,7 @@ $auth = $_POST["auth"];
|
||||
if ($auth) {
|
||||
session_regenerate_id(); // defense against session fixation
|
||||
$vendor = $auth["driver"];
|
||||
$server = trim($auth["server"]);
|
||||
$server = $auth["server"];
|
||||
$username = $auth["username"];
|
||||
$password = (string) $auth["password"];
|
||||
$db = $auth["db"];
|
||||
@@ -172,10 +103,9 @@ function unset_permanent() {
|
||||
}
|
||||
|
||||
/** Renders an error message and a login form
|
||||
* @param string plain text
|
||||
* @return null exits
|
||||
* @throws \Random\RandomException
|
||||
*/
|
||||
* @param string plain text
|
||||
* @return null exits
|
||||
*/
|
||||
function auth_error($error) {
|
||||
global $adminer, $has_token;
|
||||
$session_name = session_name();
|
||||
@@ -200,7 +130,7 @@ function auth_error($error) {
|
||||
$error = lang('Session support must be enabled.');
|
||||
}
|
||||
$params = session_get_cookie_params();
|
||||
cookie("adminer_key", ($_COOKIE["adminer_key"] ?: get_random_string()), $params["lifetime"]);
|
||||
cookie("adminer_key", ($_COOKIE["adminer_key"] ? $_COOKIE["adminer_key"] : rand_string()), $params["lifetime"]);
|
||||
page_header(lang('Login'), $error, null);
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<div>";
|
||||
@@ -225,16 +155,18 @@ if (isset($_GET["username"]) && !class_exists("Min_DB")) {
|
||||
stop_session(true);
|
||||
|
||||
if (isset($_GET["username"]) && is_string(get_password())) {
|
||||
validate_server_input();
|
||||
list($host, $port) = explode(":", SERVER, 2);
|
||||
if (preg_match('~^\s*([-+]?\d+)~', $port, $match) && ($match[1] < 1024 || $match[1] > 65535)) { // is_numeric('80#') would still connect to port 80
|
||||
auth_error(lang('Connecting to privileged ports is not allowed.'));
|
||||
}
|
||||
check_invalid_login();
|
||||
|
||||
$connection = connect();
|
||||
$driver = new Min_Driver($connection);
|
||||
}
|
||||
|
||||
$login = null;
|
||||
if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
|
||||
$error = (is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid server or credentials.')));
|
||||
$error = (is_string($connection) ? nl_br(h($connection)) : (is_string($login) ? $login : lang('Invalid credentials.')));
|
||||
auth_error($error . (preg_match('~^ | $~', get_password()) ? '<br>' . lang('There is a space in the input password which might be the cause.') : ''));
|
||||
}
|
||||
|
||||
|
@@ -1,12 +1,6 @@
|
||||
<?php
|
||||
function adminer_errors($errno, $errstr) {
|
||||
return (bool)preg_match('~^(Trying to access array offset on( value of type)? null|Undefined array key)~', $errstr);
|
||||
}
|
||||
|
||||
error_reporting(6135); // errors and warnings
|
||||
set_error_handler('adminer_errors', E_WARNING);
|
||||
|
||||
include "../adminer/include/debug.inc.php";
|
||||
include "../adminer/include/version.inc.php";
|
||||
include "../adminer/include/errors.inc.php";
|
||||
include "../adminer/include/coverage.inc.php";
|
||||
|
||||
// disable filter.default
|
||||
@@ -32,9 +26,9 @@ if (isset($_GET["file"])) {
|
||||
}
|
||||
|
||||
if ($_GET["script"] == "version") {
|
||||
$file = open_file_with_lock(get_temp_dir() . "/adminer.version");
|
||||
if ($file) {
|
||||
write_and_unlock_file($file, serialize(["signature" => $_POST["signature"], "version" => $_POST["version"]]));
|
||||
$fp = file_open_lock(get_temp_dir() . "/adminer.version");
|
||||
if ($fp) {
|
||||
file_write_unlock($fp, serialize(array("signature" => $_POST["signature"], "version" => $_POST["version"])));
|
||||
}
|
||||
exit;
|
||||
}
|
||||
@@ -109,7 +103,6 @@ define("ME", preg_replace('~\?.*~', '', relative_uri()) . '?'
|
||||
. (DB != "" ? 'db=' . urlencode(DB) . '&' . (isset($_GET["ns"]) ? "ns=" . urlencode($_GET["ns"]) . "&" : "") : '')
|
||||
);
|
||||
|
||||
include "../adminer/include/version.inc.php";
|
||||
include "../adminer/include/design.inc.php";
|
||||
include "../adminer/include/xxtea.inc.php";
|
||||
include "../adminer/include/auth.inc.php";
|
||||
|
@@ -8,7 +8,7 @@ function connect_error() {
|
||||
if ($_POST["db"] && !$error) {
|
||||
queries_redirect(substr(ME, 0, -1), lang('Databases have been dropped.'), drop_databases($_POST["db"]));
|
||||
}
|
||||
|
||||
|
||||
page_header(lang('Select database'), $error, false);
|
||||
echo "<p class='links'>\n";
|
||||
foreach (array(
|
||||
@@ -29,7 +29,7 @@ function connect_error() {
|
||||
$scheme = support("scheme");
|
||||
$collations = collations();
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<table cellspacing='0' class='checkable'>\n";
|
||||
echo "<table class='checkable odds'>\n";
|
||||
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
|
||||
echo "<thead><tr>"
|
||||
. (support("database") ? "<td>" : "")
|
||||
@@ -39,13 +39,13 @@ function connect_error() {
|
||||
. "<td>" . lang('Size') . " - <a href='" . h(ME) . "dbsize=1'>" . lang('Compute') . "</a>" . script("qsl('a').onclick = partial(ajaxSetHtml, '" . js_escape(ME) . "script=connect');", "")
|
||||
. "</thead>\n"
|
||||
;
|
||||
|
||||
|
||||
$databases = ($_GET["dbsize"] ? count_tables($databases) : array_flip($databases));
|
||||
|
||||
|
||||
foreach ($databases as $db => $tables) {
|
||||
$root = h(ME) . "db=" . urlencode($db);
|
||||
$id = h("Db-" . $db);
|
||||
echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
|
||||
echo "<tr>" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
|
||||
echo "<th><a href='$root' id='$id'>" . h($db) . "</a>";
|
||||
$collation = h(db_collation($db, $collations));
|
||||
echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&ns=" : "") . "&database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
|
||||
@@ -53,7 +53,7 @@ function connect_error() {
|
||||
echo "<td align='right' id='size-" . h($db) . "'>" . ($_GET["dbsize"] ? db_size($db) : "?");
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
|
||||
echo "</table>\n";
|
||||
echo (support("database")
|
||||
? "<div class='footer'><div>\n"
|
||||
@@ -69,7 +69,7 @@ function connect_error() {
|
||||
echo script("tableCheck();");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
page_footer("db");
|
||||
}
|
||||
|
||||
|
@@ -1,14 +0,0 @@
|
||||
<?php
|
||||
|
||||
function dump($value)
|
||||
{
|
||||
echo "<pre>";
|
||||
var_export($value);
|
||||
echo "</pre>\n";
|
||||
}
|
||||
|
||||
function dumpe($value)
|
||||
{
|
||||
dump($value);
|
||||
exit;
|
||||
}
|
@@ -20,6 +20,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||
<html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="robots" content="noindex">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title><?php echo $title_page; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
|
||||
<?php echo script_src("../adminer/static/functions.js"); ?>
|
||||
@@ -68,25 +69,25 @@ var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
|
||||
<?php
|
||||
if ($breadcrumb !== null) {
|
||||
$link = substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> » ';
|
||||
echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> » ';
|
||||
$link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
$server = $adminer->serverName(SERVER);
|
||||
$server = ($server != "" ? $server : lang('Server'));
|
||||
if ($breadcrumb === false) {
|
||||
echo "$server\n";
|
||||
} else {
|
||||
echo "<a href='" . h($link) . "' accesskey='1' title='Alt+Shift+1'>$server</a> » ";
|
||||
echo "<a href='" . h($link) . "' accesskey='1' title='Alt+Shift+1'>$server</a> » ";
|
||||
if ($_GET["ns"] != "" || (DB != "" && is_array($breadcrumb))) {
|
||||
echo '<a href="' . h($link . "&db=" . urlencode(DB) . (support("scheme") ? "&ns=" : "")) . '">' . h(DB) . '</a> » ';
|
||||
echo '<a href="' . h($link . "&db=" . urlencode(DB) . (support("scheme") ? "&ns=" : "")) . '">' . h(DB) . '</a> » ';
|
||||
}
|
||||
if (is_array($breadcrumb)) {
|
||||
if ($_GET["ns"] != "") {
|
||||
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["ns"]) . '</a> » ';
|
||||
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h($_GET["ns"]) . '</a> » ';
|
||||
}
|
||||
foreach ($breadcrumb as $key => $val) {
|
||||
$desc = (is_array($val) ? $val[1] : h($val));
|
||||
if ($desc != "") {
|
||||
echo "<a href='" . h(ME . "$key=") . urlencode(is_array($val) ? $val[0] : $val) . "'>$desc</a> » ";
|
||||
echo "<a href='" . h(ME . "$key=") . urlencode(is_array($val) ? $val[0] : $val) . "'>$desc</a> » ";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -142,20 +143,14 @@ function csp() {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a CSP nonce.
|
||||
*
|
||||
* @return string Base64 value.
|
||||
* @throws \Random\RandomException
|
||||
*/
|
||||
function get_nonce()
|
||||
{
|
||||
/** Get a CSP nonce
|
||||
* @return string Base64 value
|
||||
*/
|
||||
function get_nonce() {
|
||||
static $nonce;
|
||||
|
||||
if (!$nonce) {
|
||||
$nonce = base64_encode(get_random_string(true));
|
||||
$nonce = base64_encode(rand_string());
|
||||
}
|
||||
|
||||
return $nonce;
|
||||
}
|
||||
|
||||
@@ -184,18 +179,19 @@ function page_footer($missing = "") {
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php switch_lang(); ?>
|
||||
<div id="menu">
|
||||
<?php $adminer->navigation($missing); ?>
|
||||
</div>
|
||||
|
||||
<?php if ($missing != "auth") { ?>
|
||||
<form action="" method="post">
|
||||
<p class="logout">
|
||||
<?php echo h($_GET["username"]) . "\n"; ?>
|
||||
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</p>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<div id="menu">
|
||||
<?php $adminer->navigation($missing); ?>
|
||||
</div>
|
||||
<?php
|
||||
echo script("setupSubmitHighlight(document);");
|
||||
}
|
||||
|
@@ -143,18 +143,18 @@ function get_driver($id) {
|
||||
|
||||
/** Convert column to be searchable
|
||||
* @param string escaped column name
|
||||
* @param array array("op" => , "val" => )
|
||||
* @param array ["op" => , "val" => ]
|
||||
* @param array
|
||||
* @return string
|
||||
*/
|
||||
function convertSearch($idf, array $where, array $field) {
|
||||
function convertSearch($idf, $val, $field) {
|
||||
return $idf;
|
||||
}
|
||||
|
||||
/** Convert operator so it can be used in search
|
||||
* @param string $operator
|
||||
* @return string
|
||||
*/
|
||||
* @param string $operator
|
||||
* @return string
|
||||
*/
|
||||
function convertOperator($operator) {
|
||||
return $operator;
|
||||
}
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<?php
|
||||
// This file is not used in Adminer Editor.
|
||||
|
||||
/** Print select result
|
||||
* @param Min_Result
|
||||
* @param Min_DB connection to examine indexes
|
||||
@@ -14,18 +16,17 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
$blobs = array(); // colno => bool - display bytes for blobs
|
||||
$types = array(); // colno => type - display char in <code>
|
||||
$return = array(); // table => orgtable - mapping to use in EXPLAIN
|
||||
odd(''); // reset odd for each result
|
||||
for ($i=0; (!$limit || $i < $limit) && ($row = $result->fetch_row()); $i++) {
|
||||
if (!$i) {
|
||||
echo "<div class='scrollable'>\n";
|
||||
echo "<table cellspacing='0' class='nowrap'>\n";
|
||||
echo "<table class='nowrap odds'>\n";
|
||||
echo "<thead><tr>";
|
||||
for ($j=0; $j < count($row); $j++) {
|
||||
$field = (array)$result->fetch_field();
|
||||
$name = $field["name"];
|
||||
$orgtable = $field["orgtable"];
|
||||
$orgname = $field["orgname"];
|
||||
$return[$field["table"]] = $orgtable;
|
||||
$field = $result->fetch_field();
|
||||
$name = $field->name;
|
||||
$orgtable = $field->orgtable;
|
||||
$orgname = $field->orgname;
|
||||
$return[$field->table] = $orgtable;
|
||||
if ($orgtables && $jush == "sql") { // MySQL EXPLAIN
|
||||
$links[$j] = ($name == "table" ? "table=" : ($name == "possible_keys" ? "indexes=" : null));
|
||||
} elseif ($orgtable != "") {
|
||||
@@ -46,11 +47,11 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
$links[$j] = $orgtable;
|
||||
}
|
||||
}
|
||||
if ($field["charsetnr"] == 63) { // 63 - binary
|
||||
if ($field->charsetnr == 63) { // 63 - binary
|
||||
$blobs[$j] = true;
|
||||
}
|
||||
$types[$j] = $field["type"];
|
||||
echo "<th" . ($orgtable != "" || $field["name"] != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name)
|
||||
$types[$j] = $field->type;
|
||||
echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name)
|
||||
. ($orgtables ? doc_link(array(
|
||||
'sql' => "explain-output.html#explain_" . strtolower($name),
|
||||
'mariadb' => "explain/#the-columns-in-explain-select",
|
||||
@@ -59,7 +60,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
}
|
||||
echo "</thead>\n";
|
||||
}
|
||||
echo "<tr" . odd() . ">";
|
||||
echo "<tr>";
|
||||
foreach ($row as $key => $val) {
|
||||
$link = "";
|
||||
if (isset($links[$key]) && !$columns[$links[$key]]) {
|
||||
@@ -72,7 +73,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
$link .= "&where" . urlencode("[" . bracket_escape($col) . "]") . "=" . urlencode($row[$j]);
|
||||
}
|
||||
}
|
||||
} elseif (is_web_url($val)) {
|
||||
} elseif (is_url($val)) {
|
||||
$link = $val;
|
||||
}
|
||||
if ($val === null) {
|
||||
@@ -86,7 +87,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
}
|
||||
}
|
||||
if ($link) {
|
||||
$val = "<a href='" . h($link) . "'" . (is_web_url($link) ? target_blank() : '') . ">$val</a>";
|
||||
$val = "<a href='" . h($link) . "'" . (is_url($link) ? target_blank() : '') . ">$val</a>";
|
||||
}
|
||||
echo "<td>$val";
|
||||
}
|
||||
@@ -97,7 +98,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
|
||||
/** Get referencable tables with single column primary key except self
|
||||
* @param string
|
||||
* @return array ($table_name => $field)
|
||||
* @return array [$table_name => $field]
|
||||
*/
|
||||
function referencable_primary($self) {
|
||||
$return = array(); // table_name => field
|
||||
@@ -162,6 +163,41 @@ function textarea($name, $value, $rows = 10, $cols = 80) {
|
||||
echo "</textarea>";
|
||||
}
|
||||
|
||||
/** Generate HTML <select> or <input> if $options are empty
|
||||
* @param string
|
||||
* @param array
|
||||
* @param string
|
||||
* @param string
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function select_input($attrs, $options, $value = "", $onchange = "", $placeholder = "") {
|
||||
$tag = ($options ? "select" : "input");
|
||||
return "<$tag$attrs" . ($options
|
||||
? "><option value=''>$placeholder" . optionlist($options, $value, true) . "</select>"
|
||||
: " size='10' value='" . h($value) . "' placeholder='$placeholder'>"
|
||||
) . ($onchange ? script("qsl('$tag').onchange = $onchange;", "") : ""); //! use oninput for input
|
||||
}
|
||||
|
||||
/** Print one row in JSON object
|
||||
* @param string or "" to close the object
|
||||
* @param string
|
||||
* @return null
|
||||
*/
|
||||
function json_row($key, $val = null) {
|
||||
static $first = true;
|
||||
if ($first) {
|
||||
echo "{";
|
||||
}
|
||||
if ($key != "") {
|
||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'null');
|
||||
$first = false;
|
||||
} else {
|
||||
echo "\n}\n";
|
||||
$first = true;
|
||||
}
|
||||
}
|
||||
|
||||
/** Print table columns for type edit
|
||||
* @param string
|
||||
* @param array
|
||||
@@ -173,22 +209,45 @@ function textarea($name, $value, $rows = 10, $cols = 80) {
|
||||
function edit_type($key, $field, $collations, $foreign_keys = array(), $extra_types = array()) {
|
||||
global $structured_types, $types, $unsigned, $on_actions;
|
||||
$type = $field["type"];
|
||||
?>
|
||||
<td><select name="<?php echo h($key); ?>[type]" class="type" aria-labelledby="label-type"><?php
|
||||
if ($type && !isset($types[$type]) && !isset($foreign_keys[$type]) && !in_array($type, $extra_types)) {
|
||||
$extra_types[] = $type;
|
||||
}
|
||||
if ($foreign_keys) {
|
||||
$structured_types[lang('Foreign keys')] = $foreign_keys;
|
||||
}
|
||||
echo optionlist(array_merge($extra_types, $structured_types), $type);
|
||||
?></select><td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); //! type="number" with enabled JavaScript ?> aria-labelledby="label-length"><td class="options"><?php
|
||||
echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
|
||||
?><td><select name="<?php echo h($key); ?>[type]" class="type" aria-labelledby="label-type"><?php
|
||||
if ($type && !isset($types[$type]) && !isset($foreign_keys[$type]) && !in_array($type, $extra_types)) {
|
||||
$extra_types[] = $type;
|
||||
}
|
||||
if ($foreign_keys) {
|
||||
$structured_types[lang('Foreign keys')] = $foreign_keys;
|
||||
}
|
||||
echo optionlist(array_merge($extra_types, $structured_types), $type);
|
||||
?></select><td><input
|
||||
name="<?php echo h($key); ?>[length]"
|
||||
value="<?php echo h($field["length"]); ?>"
|
||||
size="3"
|
||||
<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); //! type="number" with enabled JavaScript ?>
|
||||
aria-labelledby="label-length"><td class="options"><?php
|
||||
echo ($collations ? "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>' : '');
|
||||
echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match(number_type(), $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
|
||||
echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), (preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"]) ? "CURRENT_TIMESTAMP" : $field["on_update"])) . '</select>' : '');
|
||||
echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>'
|
||||
. optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), (preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"]) ? "CURRENT_TIMESTAMP" : $field["on_update"]))
|
||||
. '</select>' : ''
|
||||
);
|
||||
echo ($foreign_keys ? "<select name='" . h($key) . "[on_delete]'" . (preg_match("~`~", $type) ? "" : " class='hidden'") . "><option value=''>(" . lang('ON DELETE') . ")" . optionlist(explode("|", $on_actions), $field["on_delete"]) . "</select> " : " "); // space for IE
|
||||
}
|
||||
|
||||
/** Get partition info
|
||||
* @param string
|
||||
* @return array
|
||||
*/
|
||||
function get_partitions_info($table) {
|
||||
global $connection;
|
||||
$from = "FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = " . q(DB) . " AND TABLE_NAME = " . q($table);
|
||||
$result = $connection->query("SELECT PARTITION_METHOD, PARTITION_EXPRESSION, PARTITION_ORDINAL_POSITION $from ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");
|
||||
$return = array();
|
||||
list($return["partition_by"], $return["partition"], $return["partitions"]) = $result->fetch_row();
|
||||
$partitions = get_key_vals("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $from AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION");
|
||||
$return["partition_names"] = array_keys($partitions);
|
||||
$return["partition_values"] = array_values($partitions);
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** Filter length value including enums
|
||||
* @param string
|
||||
* @return string
|
||||
@@ -218,20 +277,19 @@ function process_type($field, $collate = "COLLATE") {
|
||||
/** Create SQL string from field
|
||||
* @param array basic field information
|
||||
* @param array information about field type
|
||||
* @return array array("field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT")
|
||||
* @return array ["field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT"]
|
||||
*/
|
||||
function process_field($field, $type_field) {
|
||||
// MariaDB exports CURRENT_TIMESTAMP as a function.
|
||||
if ($field["on_update"]) {
|
||||
$field["on_update"] = str_ireplace("current_timestamp()", "CURRENT_TIMESTAMP", $field["on_update"]);
|
||||
}
|
||||
|
||||
return array(
|
||||
idf_escape(trim($field["field"])),
|
||||
process_type($type_field),
|
||||
($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
|
||||
default_value($field),
|
||||
(preg_match('~timestamp|datetime~', $field["type"]) && $field["on_update"] ? " ON UPDATE " . $field["on_update"] : ""),
|
||||
(preg_match('~timestamp|datetime~', $field["type"]) && $field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
|
||||
(support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
|
||||
($field["auto_increment"] ? auto_increment() : null),
|
||||
);
|
||||
@@ -242,19 +300,12 @@ function process_field($field, $type_field) {
|
||||
* @return string
|
||||
*/
|
||||
function default_value($field) {
|
||||
global $jush;
|
||||
$default = $field["default"];
|
||||
if ($default === null) return "";
|
||||
|
||||
if (stripos($default, "GENERATED ") === 0) {
|
||||
return " $default";
|
||||
}
|
||||
|
||||
// MariaDB exports CURRENT_TIMESTAMP as a function.
|
||||
$default = str_ireplace("current_timestamp()", "CURRENT_TIMESTAMP", $default);
|
||||
|
||||
$quote = preg_match('~char|binary|text|enum|set~', $field["type"]) || preg_match('~^(?![a-z])~i', $default);
|
||||
|
||||
return " DEFAULT " . ($quote ? q($default) : $default);
|
||||
return ($default === null ? "" : " DEFAULT " .
|
||||
(!preg_match('~^GENERATED ~i', $default) && (preg_match('~char|binary|text|enum|set~', $field["type"]) || preg_match('~^(?![a-z])~i', $default))
|
||||
? q($default) : str_ireplace("current_timestamp()", "CURRENT_TIMESTAMP", ($jush == "sqlite" ? "($default)" : $default)))
|
||||
);
|
||||
}
|
||||
|
||||
/** Get type class to use in CSS
|
||||
@@ -384,43 +435,25 @@ function normalize_enum($match) {
|
||||
return "'" . str_replace("'", "''", addcslashes(stripcslashes(str_replace($match[0][0] . $match[0][0], $match[0][0], substr($match[0], 1, -1))), '\\')) . "'";
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue grant or revoke commands.
|
||||
*
|
||||
* @param bool $grant
|
||||
* @param array $privileges
|
||||
* @param string $columns
|
||||
* @param string $on
|
||||
* @param string $user
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function grant($grant, array $privileges, $columns, $on, $user) {
|
||||
if (!$privileges) return true;
|
||||
|
||||
if ($privileges == ["ALL PRIVILEGES", "GRANT OPTION"]) {
|
||||
if ($grant) {
|
||||
return (bool) queries("GRANT ALL PRIVILEGES ON $on TO $user WITH GRANT OPTION");
|
||||
} else {
|
||||
return queries("REVOKE ALL PRIVILEGES ON $on FROM $user") &&
|
||||
queries("REVOKE GRANT OPTION ON $on FROM $user");
|
||||
}
|
||||
/** Issue grant or revoke commands
|
||||
* @param string GRANT or REVOKE
|
||||
* @param array
|
||||
* @param string
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function grant($grant, $privileges, $columns, $on) {
|
||||
if (!$privileges) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($privileges == ["GRANT OPTION", "PROXY"]) {
|
||||
if ($grant) {
|
||||
return (bool) queries("GRANT PROXY ON $on TO $user WITH GRANT OPTION");
|
||||
} else {
|
||||
return (bool) queries("REVOKE PROXY ON $on FROM $user");
|
||||
}
|
||||
if ($privileges == array("ALL PRIVILEGES", "GRANT OPTION")) {
|
||||
// can't be granted or revoked together
|
||||
return ($grant == "GRANT"
|
||||
? queries("$grant ALL PRIVILEGES$on WITH GRANT OPTION")
|
||||
: queries("$grant ALL PRIVILEGES$on") && queries("$grant GRANT OPTION$on")
|
||||
);
|
||||
}
|
||||
|
||||
return (bool) queries(
|
||||
($grant ? "GRANT " : "REVOKE ") .
|
||||
preg_replace('~(GRANT OPTION)\([^)]*\)~', '$1', implode("$columns, ", $privileges) . $columns) .
|
||||
" ON $on " .
|
||||
($grant ? "TO " : "FROM ") . $user
|
||||
);
|
||||
return queries("$grant " . preg_replace('~(GRANT OPTION)\([^)]*\)~', '\1', implode("$columns, ", $privileges) . $columns) . $on);
|
||||
}
|
||||
|
||||
/** Drop old object and create a new one
|
||||
@@ -488,16 +521,30 @@ function create_routine($routine, $row) {
|
||||
$set[] = (preg_match("~^($inout)\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||
}
|
||||
}
|
||||
$definition = rtrim("\n$row[definition]", ";");
|
||||
$definition = rtrim($row["definition"], ";");
|
||||
return "CREATE $routine "
|
||||
. idf_escape(trim($row["name"]))
|
||||
. " (" . implode(", ", $set) . ")"
|
||||
. (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
|
||||
. ($routine == "FUNCTION" ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
|
||||
. ($row["language"] ? " LANGUAGE $row[language]" : "")
|
||||
. ($jush == "pgsql" ? " AS " . q($definition) : "$definition;")
|
||||
. ($jush == "pgsql" ? " AS " . q($definition) : "\n$definition;")
|
||||
;
|
||||
}
|
||||
|
||||
/** Get defined check constraints
|
||||
* @param string
|
||||
* @return array [$name => $clause]
|
||||
*/
|
||||
function check_constraints($table) {
|
||||
// MariaDB contains CHECK_CONSTRAINTS.TABLE_NAME, MySQL and PostrgreSQL not
|
||||
return get_key_vals("SELECT c.CONSTRAINT_NAME, CHECK_CLAUSE
|
||||
FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS c
|
||||
JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS t ON c.CONSTRAINT_SCHEMA = t.CONSTRAINT_SCHEMA AND c.CONSTRAINT_NAME = t.CONSTRAINT_NAME
|
||||
WHERE c.CONSTRAINT_SCHEMA = " . q($_GET["ns"] != "" ? $_GET["ns"] : DB) . "
|
||||
AND t.TABLE_NAME = " . q($table) . "
|
||||
AND CHECK_CLAUSE NOT LIKE '% IS NOT NULL'"); // ignore default IS NOT NULL checks in PostrgreSQL
|
||||
}
|
||||
|
||||
/** Remove current user definer from SQL command
|
||||
* @param string
|
||||
* @return string
|
||||
@@ -507,7 +554,7 @@ function remove_definer($query) {
|
||||
}
|
||||
|
||||
/** Format foreign key to use in SQL query
|
||||
* @param array ("db" => string, "ns" => string, "table" => string, "source" => array, "target" => array, "on_delete" => one of $on_actions, "on_update" => one of $on_actions)
|
||||
* @param array ["db" => string, "ns" => string, "table" => string, "source" => array, "target" => array, "on_delete" => one of $on_actions, "on_update" => one of $on_actions]
|
||||
* @return string
|
||||
*/
|
||||
function format_foreign_key($foreign_key) {
|
||||
@@ -573,7 +620,7 @@ function doc_link($paths, $text = "<sup>?</sup>") {
|
||||
'oracle' => "https://www.oracle.com/pls/topic/lookup?ctx=db" . preg_replace('~^.* (\d+)\.(\d+)\.\d+\.\d+\.\d+.*~s', '\1\2', $server_info) . "&id=",
|
||||
);
|
||||
if (preg_match('~MariaDB~', $server_info)) {
|
||||
$urls['sql'] = "https://mariadb.com/kb/en/library/";
|
||||
$urls['sql'] = "https://mariadb.com/kb/en/";
|
||||
$paths['sql'] = (isset($paths['mariadb']) ? $paths['mariadb'] : str_replace(".html", "/", $paths['sql']));
|
||||
}
|
||||
return ($paths[$jush] ? "<a href='" . h($urls[$jush] . $paths[$jush]) . "'" . target_blank() . ">$text</a>" : "");
|
||||
@@ -584,7 +631,7 @@ function doc_link($paths, $text = "<sup>?</sup>") {
|
||||
* @return string
|
||||
*/
|
||||
function ob_gzencode($string) {
|
||||
// ob_start() callback recieves an optional parameter $phase but gzencode() accepts optional parameter $level
|
||||
// ob_start() callback receives an optional parameter $phase but gzencode() accepts optional parameter $level
|
||||
return gzencode($string);
|
||||
}
|
||||
|
||||
|
7
adminer/include/errors.inc.php
Normal file
7
adminer/include/errors.inc.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
function adminer_errors($errno, $errstr) {
|
||||
return !!preg_match('~^(Trying to access array offset on( value of type)? null|Undefined (array key|property))~', $errstr);
|
||||
}
|
||||
|
||||
error_reporting(6135); // errors and warnings
|
||||
set_error_handler('adminer_errors', E_WARNING);
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
// This file is used both in Adminer and Adminer Editor.
|
||||
|
||||
/** Get database connection
|
||||
* @return Min_DB
|
||||
@@ -108,7 +109,7 @@ function min_version($version, $maria_db = "", $connection2 = null) {
|
||||
$server_info = $match[1];
|
||||
$version = $maria_db;
|
||||
}
|
||||
return (version_compare($server_info, $version) >= 0);
|
||||
return $version && version_compare($server_info, $version) >= 0;
|
||||
}
|
||||
|
||||
/** Get connection charset
|
||||
@@ -158,6 +159,14 @@ function h($string) {
|
||||
return str_replace("\0", "�", htmlspecialchars($string, ENT_QUOTES, 'utf-8'));
|
||||
}
|
||||
|
||||
/** Convert \n to <br>
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function nl_br($string) {
|
||||
return str_replace("\n", "<br>", $string); // nl2br() uses XHTML before PHP 5.3
|
||||
}
|
||||
|
||||
/** Generate HTML checkbox
|
||||
* @param string
|
||||
* @param string
|
||||
@@ -193,7 +202,11 @@ function optionlist($options, $selected = null, $use_keys = false) {
|
||||
$opts = $v;
|
||||
}
|
||||
foreach ($opts as $key => $val) {
|
||||
$return .= '<option' . ($use_keys || is_string($key) ? ' value="' . h($key) . '"' : '') . (($use_keys || is_string($key) ? (string) $key : $val) === $selected ? ' selected' : '') . '>' . h($val);
|
||||
$return .= '<option'
|
||||
. ($use_keys || is_string($key) ? ' value="' . h($key) . '"' : '')
|
||||
. ($selected !== null && ($use_keys || is_string($key) ? (string) $key : $val) === $selected ? ' selected' : '')
|
||||
. '>' . h($val)
|
||||
;
|
||||
}
|
||||
if (is_array($v)) {
|
||||
$return .= '</optgroup>';
|
||||
@@ -206,7 +219,7 @@ function optionlist($options, $selected = null, $use_keys = false) {
|
||||
* @param string
|
||||
* @param array
|
||||
* @param string
|
||||
* @param string|bool true for no onchange, false for radio
|
||||
* @param string true for no onchange, false for radio
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
@@ -225,22 +238,6 @@ function html_select($name, $options, $value = "", $onchange = true, $labelled_b
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** Generate HTML <select> or <input> if $options are empty
|
||||
* @param string
|
||||
* @param array
|
||||
* @param string
|
||||
* @param string
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function select_input($attrs, $options, $value = "", $onchange = "", $placeholder = "") {
|
||||
$tag = ($options ? "select" : "input");
|
||||
return "<$tag$attrs" . ($options
|
||||
? "><option value=''>$placeholder" . optionlist($options, $value, true) . "</select>"
|
||||
: " size='10' value='" . h($value) . "' placeholder='$placeholder'>"
|
||||
) . ($onchange ? script("qsl('$tag').onchange = $onchange;", "") : ""); //! use oninput for input
|
||||
}
|
||||
|
||||
/** Get onclick confirmation
|
||||
* @param string
|
||||
* @param string
|
||||
@@ -273,18 +270,6 @@ function bold($bold, $class = "") {
|
||||
return ($bold ? " class='active $class'" : ($class ? " class='$class'" : ""));
|
||||
}
|
||||
|
||||
/** Generate class for odd rows
|
||||
* @param string return this for odd rows, empty to reset counter
|
||||
* @return string
|
||||
*/
|
||||
function odd($return = ' class="odd"') {
|
||||
static $i = 0;
|
||||
if (!$return) { // reset counter
|
||||
$i = -1;
|
||||
}
|
||||
return ($i++ % 2 ? $return : '');
|
||||
}
|
||||
|
||||
/** Escape string for JavaScript apostrophes
|
||||
* @param string
|
||||
* @return string
|
||||
@@ -293,25 +278,6 @@ function js_escape($string) {
|
||||
return addcslashes($string, "\r\n'\\/"); // slash for <script>
|
||||
}
|
||||
|
||||
/** Print one row in JSON object
|
||||
* @param string or "" to close the object
|
||||
* @param string
|
||||
* @return null
|
||||
*/
|
||||
function json_row($key, $val = null) {
|
||||
static $first = true;
|
||||
if ($first) {
|
||||
echo "{";
|
||||
}
|
||||
if ($key != "") {
|
||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'null');
|
||||
$first = false;
|
||||
} else {
|
||||
echo "\n}\n";
|
||||
$first = true;
|
||||
}
|
||||
}
|
||||
|
||||
/** Get INI boolean value
|
||||
* @param string
|
||||
* @return bool
|
||||
@@ -321,7 +287,7 @@ function ini_bool($ini) {
|
||||
return (preg_match('~^(on|true|yes)$~i', $val) || (int) $val); // boolean values set by php_value are strings
|
||||
}
|
||||
|
||||
/** Check if SID is neccessary
|
||||
/** Check if SID is necessary
|
||||
* @return bool
|
||||
*/
|
||||
function sid() {
|
||||
@@ -426,7 +392,7 @@ function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$return[] = $row;
|
||||
}
|
||||
} elseif (!$result && !is_object($connection2) && $error && defined("PAGE_HEADER")) {
|
||||
} elseif (!$result && !is_object($connection2) && $error && (defined("PAGE_HEADER") || $error == "-- ")) {
|
||||
echo $error . error() . "\n";
|
||||
}
|
||||
return $return;
|
||||
@@ -470,36 +436,25 @@ function escape_key($key) {
|
||||
*/
|
||||
function where($where, $fields = array()) {
|
||||
global $connection, $jush;
|
||||
|
||||
$conditions = [];
|
||||
|
||||
$return = array();
|
||||
foreach ((array) $where["where"] as $key => $val) {
|
||||
$key = bracket_escape($key, 1); // 1 - back
|
||||
$column = escape_key($key);
|
||||
|
||||
if ($jush == "sql" && $fields[$key]["type"] == "json") {
|
||||
$conditions[] = "$column = CAST(" . q($val) . " AS JSON)";
|
||||
} elseif ($jush == "sql" && is_numeric($val) && strpos($val, ".") !== false) {
|
||||
// LIKE because of floats but slow with ints.
|
||||
$conditions[] = "$column LIKE " . q($val);
|
||||
} elseif ($jush == "mssql") {
|
||||
// LIKE because of text.
|
||||
$conditions[] = "$column LIKE " . q(preg_replace('~[_%[]~', '[\0]', $val));
|
||||
} else {
|
||||
$conditions[] = "$column = " . unconvert_field($fields[$key], q($val));
|
||||
}
|
||||
|
||||
// Not just [a-z] to catch non-ASCII characters.
|
||||
if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) {
|
||||
$conditions[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
|
||||
$return[] = $column
|
||||
. ($jush == "sql" && $fields[$key]["type"] == "json" ? " = CAST(" . q($val) . " AS JSON)"
|
||||
: ($jush == "sql" && is_numeric($val) && preg_match('~\.~', $val) ? " LIKE " . q($val) // LIKE because of floats but slow with ints
|
||||
: ($jush == "mssql" ? " LIKE " . q(preg_replace('~[_%[]~', '[\0]', $val)) // LIKE because of text
|
||||
: " = " . unconvert_field($fields[$key], q($val))
|
||||
)))
|
||||
; //! enum and set
|
||||
if ($jush == "sql" && preg_match('~char|text~', $fields[$key]["type"]) && preg_match("~[^ -@]~", $val)) { // not just [a-z] to catch non-ASCII characters
|
||||
$return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ((array) $where["null"] as $key) {
|
||||
$conditions[] = escape_key($key) . " IS NULL";
|
||||
$return[] = escape_key($key) . " IS NULL";
|
||||
}
|
||||
|
||||
return implode(" AND ", $conditions);
|
||||
return implode(" AND ", $return);
|
||||
}
|
||||
|
||||
/** Create SQL condition from query string
|
||||
@@ -896,7 +851,7 @@ function table_status1($table, $fast = false) {
|
||||
|
||||
/** Find out foreign keys for each column
|
||||
* @param string
|
||||
* @return array array($col => array())
|
||||
* @return array [$col => array()]
|
||||
*/
|
||||
function column_foreign_keys($table) {
|
||||
global $adminer;
|
||||
@@ -918,17 +873,14 @@ function column_foreign_keys($table) {
|
||||
* @return null
|
||||
*/
|
||||
function enum_input($type, $attrs, $field, $value, $empty = null) {
|
||||
global $adminer;
|
||||
|
||||
$return = ($empty !== null && !is_strict_mode() ? "<label><input type='$type'$attrs value='$empty'" . ((is_array($value) ? in_array($empty, $value) : $value === 0) ? " checked" : "") . "><i>" . lang('empty') . "</i></label>" : "");
|
||||
|
||||
global $adminer, $jush;
|
||||
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
|
||||
$return = ($empty !== null ? "<label><input type='$type'$attrs value='$empty'" . ((is_array($value) ? in_array($empty, $value) : $value === 0) ? " checked" : "") . "><i>" . lang('empty') . "</i></label>" : "");
|
||||
foreach ($matches[1] as $i => $val) {
|
||||
$val = stripcslashes(str_replace("''", "'", $val));
|
||||
$checked = (is_int($value) ? $value == $i+1 : (is_array($value) ? in_array($i+1, $value) : $value === $val));
|
||||
$return .= " <label><input type='$type'$attrs value='" . ($i+1) . "'" . ($checked ? ' checked' : '') . '>' . h($adminer->editVal($val, $field)) . '</label>';
|
||||
$return .= " <label><input type='$type'$attrs value='" . ($jush == "sql" ? $i+1 : h($val)) . "'" . ($checked ? ' checked' : '') . '>' . h($adminer->editVal($val, $field)) . '</label>';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -939,16 +891,15 @@ function enum_input($type, $attrs, $field, $value, $empty = null) {
|
||||
* @return null
|
||||
*/
|
||||
function input($field, $value, $function) {
|
||||
global $types, $adminer, $jush;
|
||||
|
||||
global $types, $structured_types, $adminer, $jush;
|
||||
$name = h(bracket_escape($field["field"]));
|
||||
|
||||
echo "<td class='function'>";
|
||||
if (is_array($value) && !$function) {
|
||||
$args = array($value);
|
||||
if (version_compare(PHP_VERSION, 5.4) >= 0) {
|
||||
$args[] = JSON_PRETTY_PRINT;
|
||||
}
|
||||
$value = call_user_func_array('json_encode', $args);
|
||||
$value = call_user_func_array('json_encode', $args); //! requires PHP 5.2
|
||||
$function = "json";
|
||||
}
|
||||
$reset = ($jush == "mssql" && $field["auto_increment"]);
|
||||
@@ -956,18 +907,21 @@ function input($field, $value, $function) {
|
||||
$function = null;
|
||||
}
|
||||
$functions = (isset($_GET["select"]) || $reset ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field);
|
||||
|
||||
$disabled = stripos($field["default"], "GENERATED ALWAYS AS ") === 0 ? " disabled=''" : "";
|
||||
$attrs = " name='fields[$name]' $disabled";
|
||||
|
||||
echo "<td class='function'>";
|
||||
|
||||
$attrs = " name='fields[$name]'$disabled";
|
||||
if ($jush == "pgsql" && in_array($field["type"], (array) $structured_types[lang('User types')])) {
|
||||
$enums = get_vals("SELECT enumlabel FROM pg_enum WHERE enumtypid = " . $types[$field["type"]] . " ORDER BY enumsortorder");
|
||||
if ($enums) {
|
||||
$field["type"] = "enum";
|
||||
$field["length"] = "'" . implode("','", array_map('addslashes', $enums)) . "'";
|
||||
}
|
||||
}
|
||||
if ($field["type"] == "enum") {
|
||||
echo h($functions[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value);
|
||||
} else {
|
||||
$has_function = (in_array($function, $functions) || isset($functions[$function]));
|
||||
echo (count($functions) > 1
|
||||
? "<select name='function[$name]' $disabled>" . optionlist($functions, $function === null || $has_function ? $function : "") . "</select>"
|
||||
? "<select name='function[$name]'$disabled>" . optionlist($functions, $function === null || $has_function ? $function : "") . "</select>"
|
||||
. on_help("getTarget(event).value.replace(/^SQL\$/, '')", 1)
|
||||
. script("qsl('select').onchange = functionChange;", "")
|
||||
: h(reset($functions))
|
||||
@@ -976,8 +930,8 @@ function input($field, $value, $function) {
|
||||
if ($input != "") {
|
||||
echo $input;
|
||||
} elseif (preg_match('~bool~', $field["type"])) {
|
||||
echo "<input type='hidden'$attrs value='0'>" .
|
||||
"<input type='checkbox'" . (preg_match('~^(1|t|true|y|yes|on)$~i', $value) ? " checked='checked'" : "") . "$attrs value='1'>";
|
||||
echo "<input type='hidden'$attrs value='0'>"
|
||||
. "<input type='checkbox'" . (preg_match('~^(1|t|true|y|yes|on)$~i', $value) ? " checked='checked'" : "") . "$attrs value='1'>";
|
||||
} elseif ($field["type"] == "set") { //! 64 bits
|
||||
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
|
||||
foreach ($matches[1] as $i => $val) {
|
||||
@@ -992,14 +946,17 @@ function input($field, $value, $function) {
|
||||
$attrs .= " cols='50' rows='12'";
|
||||
} else {
|
||||
$rows = min(12, substr_count($value, "\n") + 1);
|
||||
$attrs .= " cols='30' rows='$rows'";
|
||||
$attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
|
||||
}
|
||||
echo "<textarea$attrs>" . h($value) . '</textarea>';
|
||||
} elseif ($function == "json" || preg_match('~^jsonb?$~', $field["type"])) {
|
||||
echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>';
|
||||
} else {
|
||||
// int(3) is only a display hint
|
||||
$maxlength = (!preg_match('~int~', $field["type"]) && preg_match('~^(\d+)(,(\d+))?$~', $field["length"], $match) ? ((preg_match("~binary~", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
|
||||
$maxlength = (!preg_match('~int~', $field["type"]) && preg_match('~^(\d+)(,(\d+))?$~', $field["length"], $match)
|
||||
? ((preg_match("~binary~", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0))
|
||||
: ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0)
|
||||
);
|
||||
if ($jush == 'sql' && min_version(5.6) && preg_match('~time~', $field["type"])) {
|
||||
$maxlength += 7; // microtime
|
||||
}
|
||||
@@ -1096,7 +1053,7 @@ function fields_from_edit() {
|
||||
$name = bracket_escape($key, 1); // 1 - back
|
||||
$return[$name] = array(
|
||||
"field" => $name,
|
||||
"privileges" => array("insert" => 1, "update" => 1, "where" => 1, "order" => 1),
|
||||
"privileges" => array("insert" => 1, "update" => 1),
|
||||
"null" => 1,
|
||||
"auto_increment" => ($key == $driver->primary),
|
||||
);
|
||||
@@ -1127,27 +1084,6 @@ function search_tables() {
|
||||
echo ($sep ? "<p class='message'>" . lang('No tables.') : "</ul>") . "\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $table
|
||||
* @return array
|
||||
*/
|
||||
function get_partitions_info($table) {
|
||||
global $connection;
|
||||
|
||||
$from = "FROM information_schema.PARTITIONS WHERE TABLE_SCHEMA = " . q(DB) . " AND TABLE_NAME = " . q($table);
|
||||
|
||||
$result = $connection->query("SELECT PARTITION_METHOD, PARTITION_EXPRESSION, PARTITION_ORDINAL_POSITION $from ORDER BY PARTITION_ORDINAL_POSITION DESC LIMIT 1");
|
||||
|
||||
$info = [];
|
||||
list($info["partition_by"], $info["partition"], $info["partitions"]) = $result->fetch_row();
|
||||
|
||||
$partitions = get_key_vals("SELECT PARTITION_NAME, PARTITION_DESCRIPTION $from AND PARTITION_NAME != '' ORDER BY PARTITION_ORDINAL_POSITION");
|
||||
$info["partition_names"] = array_keys($partitions);
|
||||
$info["partition_values"] = array_values($partitions);
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
/** Send headers for export
|
||||
* @param string
|
||||
* @param bool
|
||||
@@ -1208,98 +1144,60 @@ function get_temp_dir() {
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens and exclusively lock a file.
|
||||
*
|
||||
* @param string $filename
|
||||
* @return resource|null
|
||||
*/
|
||||
function open_file_with_lock($filename)
|
||||
{
|
||||
$file = fopen($filename, "c+");
|
||||
if (!$file) {
|
||||
return null;
|
||||
/** Open and exclusively lock a file
|
||||
* @param string
|
||||
* @return resource or null for error
|
||||
*/
|
||||
function file_open_lock($filename) {
|
||||
$fp = @fopen($filename, "r+"); // @ - may not exist
|
||||
if (!$fp) { // c+ is available since PHP 5.2.6
|
||||
$fp = @fopen($filename, "w"); // @ - may not be writable
|
||||
if (!$fp) {
|
||||
return;
|
||||
}
|
||||
chmod($filename, 0660);
|
||||
}
|
||||
|
||||
chmod($filename, 0660);
|
||||
|
||||
if (!flock($file, LOCK_EX)) {
|
||||
fclose($file);
|
||||
return null;
|
||||
}
|
||||
|
||||
return $file;
|
||||
flock($fp, LOCK_EX);
|
||||
return $fp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes and unlocks a file.
|
||||
*
|
||||
* @param resource $file
|
||||
* @param string $data
|
||||
*/
|
||||
function write_and_unlock_file($file, $data)
|
||||
{
|
||||
rewind($file);
|
||||
fwrite($file, $data);
|
||||
ftruncate($file, strlen($data));
|
||||
|
||||
unlock_file($file);
|
||||
/** Write and unlock a file
|
||||
* @param resource
|
||||
* @param string
|
||||
*/
|
||||
function file_write_unlock($fp, $data) {
|
||||
rewind($fp);
|
||||
fwrite($fp, $data);
|
||||
ftruncate($fp, strlen($data));
|
||||
flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlocks and closes the file.
|
||||
*
|
||||
* @param resource $file
|
||||
*/
|
||||
function unlock_file($file)
|
||||
{
|
||||
flock($file, LOCK_UN);
|
||||
fclose($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads password from file adminer.key in temporary directory or create one.
|
||||
*
|
||||
* @param $create bool
|
||||
* @return string|false Returns false if the file can not be created.
|
||||
* @throws \Random\RandomException
|
||||
*/
|
||||
function get_private_key($create)
|
||||
{
|
||||
/** Read password from file adminer.key in temporary directory or create one
|
||||
* @param bool
|
||||
* @return string or false if the file can not be created
|
||||
*/
|
||||
function password_file($create) {
|
||||
$filename = get_temp_dir() . "/adminer.key";
|
||||
|
||||
if (!$create && !file_exists($filename)) {
|
||||
return false;
|
||||
$return = @file_get_contents($filename); // @ - may not exist
|
||||
if ($return || !$create) {
|
||||
return $return;
|
||||
}
|
||||
|
||||
$file = open_file_with_lock($filename);
|
||||
if (!$file) {
|
||||
return false;
|
||||
$fp = @fopen($filename, "w"); // @ - can have insufficient rights //! is not atomic
|
||||
if ($fp) {
|
||||
chmod($filename, 0660);
|
||||
$return = rand_string();
|
||||
fwrite($fp, $return);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
$key = stream_get_contents($file);
|
||||
if (!$key) {
|
||||
$key = get_random_string();
|
||||
write_and_unlock_file($file, $key);
|
||||
} else {
|
||||
unlock_file($file);
|
||||
}
|
||||
|
||||
return $key;
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a random 32 characters long string.
|
||||
*
|
||||
* @param $binary bool
|
||||
* @return string
|
||||
* @throws \Random\RandomException
|
||||
*/
|
||||
function get_random_string($binary = false)
|
||||
{
|
||||
$bytes = function_exists('random_bytes') ? random_bytes(32) : uniqid(mt_rand(), true);
|
||||
|
||||
return $binary ? $bytes : md5($bytes);
|
||||
/** Get a random string
|
||||
* @return string 32 hexadecimal characters
|
||||
*/
|
||||
function rand_string() {
|
||||
return md5(uniqid(mt_rand(), true));
|
||||
}
|
||||
|
||||
/** Format value to use in select
|
||||
@@ -1319,7 +1217,7 @@ function select_value($val, $link, $field, $text_length) {
|
||||
. "<td>" . select_value($v, $link, $field, $text_length)
|
||||
;
|
||||
}
|
||||
return "<table cellspacing='0'>$return</table>";
|
||||
return "<table>$return</table>";
|
||||
}
|
||||
if (!$link) {
|
||||
$link = $adminer->selectLink($val, $field);
|
||||
@@ -1328,7 +1226,7 @@ function select_value($val, $link, $field, $text_length) {
|
||||
if (is_mail($val)) {
|
||||
$link = "mailto:$val";
|
||||
}
|
||||
if (is_web_url($val)) {
|
||||
if (is_url($val)) {
|
||||
$link = $val; // IE 11 and all modern browsers hide referrer
|
||||
}
|
||||
}
|
||||
@@ -1349,32 +1247,20 @@ function select_value($val, $link, $field, $text_length) {
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function is_mail($value) {
|
||||
return is_string($value) && filter_var($value, FILTER_VALIDATE_EMAIL);
|
||||
function is_mail($email) {
|
||||
$atom = '[-a-z0-9!#$%&\'*+/=?^_`{|}~]'; // characters of local-name
|
||||
$domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component
|
||||
$pattern = "$atom+(\\.$atom+)*@($domain?\\.)+$domain";
|
||||
return is_string($email) && preg_match("(^$pattern(,\\s*$pattern)*\$)i", $email);
|
||||
}
|
||||
|
||||
/** Check whether the string is web URL address
|
||||
/** Check whether the string is URL address
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function is_web_url($value) {
|
||||
if (!is_string($value) || !preg_match('~^https?://~i', $value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$components = parse_url($value);
|
||||
if (!$components) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Encode URL path. If path was encoded already, it will be encoded twice, but we are OK with that.
|
||||
$encodedParts = array_map('urlencode', explode('/', $components['path']));
|
||||
$url = str_replace($components['path'], implode('/', $encodedParts), $value);
|
||||
|
||||
parse_str($components['query'], $params);
|
||||
$url = str_replace($components['query'], http_build_query($params), $url);
|
||||
|
||||
return (bool)filter_var($url, FILTER_VALIDATE_URL);
|
||||
function is_url($string) {
|
||||
$domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component //! IDN
|
||||
return preg_match("~^(https?)://($domain?\\.)+$domain(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string); //! restrict path, query and fragment characters
|
||||
}
|
||||
|
||||
/** Check if field should be shortened
|
||||
@@ -1524,8 +1410,7 @@ function edit_form($table, $fields, $row, $update) {
|
||||
if (!$fields) {
|
||||
echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
|
||||
} else {
|
||||
echo "<table cellspacing='0' class='layout'>" . script("qsl('table').onkeydown = editingKeydown;");
|
||||
|
||||
echo "<table class='layout'>" . script("qsl('table').onkeydown = editingKeydown;");
|
||||
foreach ($fields as $name => $field) {
|
||||
echo "<tr><th>" . $adminer->fieldName($field);
|
||||
$default = $_GET["set"][bracket_escape($name)];
|
||||
@@ -1562,6 +1447,10 @@ function edit_form($table, $fields, $row, $update) {
|
||||
$value = "";
|
||||
$function = "now";
|
||||
}
|
||||
if ($field["type"] == "uuid" && $value == "uuid()") {
|
||||
$value = "";
|
||||
$function = "uuid";
|
||||
}
|
||||
input($field, $value, $function);
|
||||
echo "\n";
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ $langs = array(
|
||||
'en' => 'English', // Jakub Vrána - https://www.vrana.cz
|
||||
'ar' => 'العربية', // Y.M Amine - Algeria - nbr7@live.fr
|
||||
'bg' => 'Български', // Deyan Delchev
|
||||
'bn' => 'বাংলা', // Dipak Kumar - dipak.ndc@gmail.com | Hossain Ahmed Saiman - hossain.ahmed@altscope.com
|
||||
'bn' => 'বাংলা', // Dipak Kumar - dipak.ndc@gmail.com, Hossain Ahmed Saiman - hossain.ahmed@altscope.com
|
||||
'bs' => 'Bosanski', // Emir Kurtovic
|
||||
'ca' => 'Català', // Joan Llosas
|
||||
'cs' => 'Čeština', // Jakub Vrána - https://www.vrana.cz
|
||||
@@ -25,8 +25,8 @@ $langs = array(
|
||||
'ja' => '日本語', // Hitoshi Ozawa - http://sourceforge.jp/projects/oss-ja-jpn/releases/
|
||||
'ka' => 'ქართული', // Saba Khmaladze skhmaladze@uglt.org
|
||||
'ko' => '한국어', // dalli - skcha67@gmail.com
|
||||
'lv' => 'Latviešu', // Kristaps Lediņš - https://krysits.com
|
||||
'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt
|
||||
'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt
|
||||
'lv' => 'Latviešu', // Kristaps Lediņš - https://krysits.com
|
||||
'ms' => 'Bahasa Melayu', // Pisyek
|
||||
'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
|
||||
'no' => 'Norsk', // Iver Odin Kvello, mupublishing.com
|
||||
@@ -71,9 +71,10 @@ function lang($idf, $number = null) {
|
||||
: ($LANG == 'pl' ? ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2) // different forms for 1, 2-4 except 12-14, other
|
||||
: ($LANG == 'sl' ? ($number % 100 == 1 ? 0 : ($number % 100 == 2 ? 1 : ($number % 100 == 3 || $number % 100 == 4 ? 2 : 3))) // different forms for 1, 2, 3-4, other
|
||||
: ($LANG == 'lt' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number % 10 > 1 && $number / 10 % 10 != 1 ? 1 : 2)) // different forms for 1, 12-19, other
|
||||
: ($LANG == 'lv' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number ? 1 : 2)) // different forms for 1 except 11, other, 0
|
||||
: ($LANG == 'bs' || $LANG == 'ru' || $LANG == 'sr' || $LANG == 'uk' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2)) // different forms for 1 except 11, 2-4 except 12-14, other
|
||||
: 1 // different forms for 1, other
|
||||
))))))); // http://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
|
||||
)))))))); // http://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html
|
||||
$translation = $translation[$pos];
|
||||
}
|
||||
$args = func_get_args();
|
||||
|
@@ -3,7 +3,7 @@
|
||||
if (extension_loaded('pdo')) {
|
||||
/*abstract*/ class Min_PDO {
|
||||
var $_result, $server_info, $affected_rows, $errno, $error, $pdo;
|
||||
|
||||
|
||||
function __construct() {
|
||||
global $adminer;
|
||||
$pos = array_search("SQL", $adminer->operators);
|
||||
@@ -11,7 +11,7 @@ if (extension_loaded('pdo')) {
|
||||
unset($adminer->operators[$pos]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function dsn($dsn, $username, $password, $options = array()) {
|
||||
$options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_SILENT;
|
||||
$options[PDO::ATTR_STATEMENT_CLASS] = array('Min_PDOStatement');
|
||||
@@ -22,13 +22,13 @@ if (extension_loaded('pdo')) {
|
||||
}
|
||||
$this->server_info = @$this->pdo->getAttribute(PDO::ATTR_SERVER_VERSION);
|
||||
}
|
||||
|
||||
|
||||
/*abstract function select_db($database);*/
|
||||
|
||||
|
||||
function quote($string) {
|
||||
return $this->pdo->quote($string);
|
||||
}
|
||||
|
||||
|
||||
function query($query, $unbuffered = false) {
|
||||
$result = $this->pdo->query($query);
|
||||
$this->error = "";
|
||||
@@ -42,11 +42,11 @@ if (extension_loaded('pdo')) {
|
||||
$this->store_result($result);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
function multi_query($query) {
|
||||
return $this->_result = $this->query($query);
|
||||
}
|
||||
|
||||
|
||||
function store_result($result = null) {
|
||||
if (!$result) {
|
||||
$result = $this->_result;
|
||||
@@ -61,7 +61,7 @@ if (extension_loaded('pdo')) {
|
||||
$this->affected_rows = $result->rowCount();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function next_result() {
|
||||
if (!$this->_result) {
|
||||
return false;
|
||||
@@ -69,7 +69,7 @@ if (extension_loaded('pdo')) {
|
||||
$this->_result->_offset = 0;
|
||||
return @$this->_result->nextRowset(); // @ - PDO_PgSQL doesn't support it
|
||||
}
|
||||
|
||||
|
||||
function result($query, $field = 0) {
|
||||
$result = $this->query($query);
|
||||
if (!$result) {
|
||||
@@ -79,18 +79,18 @@ if (extension_loaded('pdo')) {
|
||||
return $row[$field];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class Min_PDOStatement extends PDOStatement {
|
||||
var $_offset = 0, $num_rows;
|
||||
|
||||
|
||||
function fetch_assoc() {
|
||||
return $this->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
|
||||
function fetch_row() {
|
||||
return $this->fetch(PDO::FETCH_NUM);
|
||||
}
|
||||
|
||||
|
||||
function fetch_field() {
|
||||
$row = (object) $this->getColumnMeta($this->_offset++);
|
||||
$row->orgtable = $row->table;
|
||||
|
@@ -3,20 +3,20 @@
|
||||
class TmpFile {
|
||||
var $handler;
|
||||
var $size;
|
||||
|
||||
|
||||
function __construct() {
|
||||
$this->handler = tmpfile();
|
||||
}
|
||||
|
||||
|
||||
function write($contents) {
|
||||
$this->size += strlen($contents);
|
||||
fwrite($this->handler, $contents);
|
||||
}
|
||||
|
||||
|
||||
function send() {
|
||||
fseek($this->handler, 0);
|
||||
fpassthru($this->handler);
|
||||
fclose($this->handler);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,2 +1,2 @@
|
||||
<?php
|
||||
$VERSION = "4.9.4";
|
||||
$VERSION = "4.17.0";
|
||||
|
@@ -59,6 +59,8 @@ if (isset($_GET["download"])) {
|
||||
include "./sequence.inc.php";
|
||||
} elseif (isset($_GET["type"])) {
|
||||
include "./type.inc.php";
|
||||
} elseif (isset($_GET["check"])) {
|
||||
include "./check.inc.php";
|
||||
} elseif (isset($_GET["trigger"])) {
|
||||
include "./trigger.inc.php";
|
||||
} elseif (isset($_GET["user"])) {
|
||||
|
@@ -16,7 +16,9 @@ if ($jush == "mongo") { // doesn't support primary key
|
||||
unset($indexes["_id_"]);
|
||||
}
|
||||
$row = $_POST;
|
||||
|
||||
if ($row) {
|
||||
set_adminer_settings(array("index_options" => $row["options"]));
|
||||
}
|
||||
if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"]) {
|
||||
$alter = array();
|
||||
foreach ($row["indexes"] as $index) {
|
||||
@@ -91,14 +93,21 @@ if (!$row) {
|
||||
$indexes[] = array("columns" => array(1 => ""));
|
||||
$row["indexes"] = $indexes;
|
||||
}
|
||||
$lengths = ($jush == "sql" || $jush == "mssql");
|
||||
$show_options = ($_POST ? $_POST["options"] : adminer_setting("index_options"));
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<div class="scrollable">
|
||||
<table cellspacing="0" class="nowrap">
|
||||
<table class="nowrap">
|
||||
<thead><tr>
|
||||
<th id="label-type"><?php echo lang('Index Type'); ?>
|
||||
<th><input type="submit" class="wayoff"><?php echo lang('Column (length)'); ?>
|
||||
<th><input type="submit" class="wayoff"><?php
|
||||
echo lang('Column') . ($lengths ? "<span class='idxopts" . ($show_options ? "" : " hidden") . "'> (" . lang('length') . ")</span>" : "");
|
||||
if ($lengths || support("descidx")) {
|
||||
echo checkbox("options", 1, $show_options, lang('Options'), "indexOptionsShow(this.checked)", "jsonly") . "\n";
|
||||
}
|
||||
?>
|
||||
<th id="label-name"><?php echo lang('Name'); ?>
|
||||
<th><noscript><?php echo "<input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?></noscript>
|
||||
</thead>
|
||||
@@ -126,9 +135,10 @@ foreach ($row["indexes"] as $index) {
|
||||
$column,
|
||||
"partial(" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . ", '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "')"
|
||||
);
|
||||
echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
|
||||
echo "<span class='idxopts" . ($show_options ? "" : " hidden") . "'>";
|
||||
echo ($lengths ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
|
||||
echo (support("descidx") ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
|
||||
echo " </span>";
|
||||
echo "</span> </span>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'تسجيل الدخول',
|
||||
'Logout successful.' => 'تم تسجيل الخروج بنجاح.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'بيانات الدخول غير صالحة.',
|
||||
'Server' => 'الخادم',
|
||||
'Username' => 'اسم المستخدم',
|
||||
'Password' => 'كلمة المرور',
|
||||
@@ -30,7 +30,6 @@ $translations = array(
|
||||
'Create database' => 'إنشاء قاعدة بيانات',
|
||||
'SQL command' => 'استعلام SQL',
|
||||
'Logout' => 'تسجيل الخروج',
|
||||
'database' => 'قاعدة بيانات',
|
||||
'Use' => 'استعمال',
|
||||
'No tables.' => 'لا توجد جداول.',
|
||||
'select' => 'تحديد',
|
||||
@@ -94,7 +93,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'نوع المؤشر',
|
||||
'Column (length)' => 'العمود (الطول)',
|
||||
'length' => 'الطول',
|
||||
'View has been dropped.' => 'تم مسح العرض.',
|
||||
'View has been altered.' => 'تم تعديل العرض.',
|
||||
'View has been created.' => 'تم إنشاء العرض.',
|
||||
@@ -264,50 +263,4 @@ $translations = array(
|
||||
'Permanent link' => 'رابط دائم',
|
||||
'Edit all' => 'تعديل الكل',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Ctrl+click on a value to modify it.' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Изход',
|
||||
'Logged as: %s' => 'Текущ потребител: %s',
|
||||
'Logout successful.' => 'Излизането е успешно.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Невалидни потребителски данни.',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Прекалено много неуспешни опити за вход, опитайте пак след %d минута.', 'Прекалено много неуспешни опити за вход, опитайте пак след %d минути.'),
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Главната парола вече е невалидна. <a href="https://www.adminer.org/en/extension/"%s>Изберете</a> %s метод, за да я направите постоянна.',
|
||||
'Language' => 'Език',
|
||||
@@ -78,7 +78,6 @@ $translations = array(
|
||||
'Data' => 'Данни',
|
||||
|
||||
'Database' => 'База данни',
|
||||
'database' => 'база данни',
|
||||
'Use' => 'Избор',
|
||||
'Select database' => 'Избор на база данни',
|
||||
'Invalid database.' => 'Невалидна база данни.',
|
||||
@@ -193,7 +192,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Промяна на индекси',
|
||||
'Add next' => 'Добавяне на следващ',
|
||||
'Index Type' => 'Вид на индекса',
|
||||
'Column (length)' => 'Колона (дължина)',
|
||||
'length' => 'дължина',
|
||||
|
||||
'Foreign keys' => 'Препратки',
|
||||
'Foreign key' => 'Препратка',
|
||||
@@ -333,26 +332,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Вида беше пермахнат.',
|
||||
'Type has been created.' => 'Вида беше създаден.',
|
||||
'Alter type' => 'Промяна на вид',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Да',
|
||||
'No' => 'Не',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'লগইন',
|
||||
'Logout successful.' => 'সফলভাবে লগআউট হয়েছে।',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'ভুল পাসওয়ার্ড।',
|
||||
'Server' => 'সার্ভার',
|
||||
'Username' => 'ইউজারের নাম',
|
||||
'Password' => 'পাসওয়ার্ড',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'ডাটাবেজ তৈরী করুন',
|
||||
'SQL command' => 'SQL-কমান্ড',
|
||||
'Logout' => 'লগআউট',
|
||||
'database' => 'ডাটাবেজ',
|
||||
'Use' => 'ব্যবহার',
|
||||
'No tables.' => 'কোন টেবিল নাই।',
|
||||
'select' => 'নির্বাচন',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'অন ডিলিট',
|
||||
'ON UPDATE' => 'অন আপডেট',
|
||||
'Index Type' => 'সূচী-ধরণ',
|
||||
'Column (length)' => 'কলাম (দৈর্ঘ্য)',
|
||||
'length' => 'দৈর্ঘ্য',
|
||||
'View has been dropped.' => 'ভিউ মুছে ফেলা হয়েছে।',
|
||||
'View has been altered.' => 'ভিউ পরিবর্তন করা হয়েছে।',
|
||||
'View has been created.' => 'ভিউ তৈরী করা হয়েছে।',
|
||||
@@ -264,50 +263,4 @@ $translations = array(
|
||||
'Permanent link' => 'স্থায়ী লিংক',
|
||||
'Edit all' => 'সবগুলো সম্পাদনা করুন',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Ctrl+click on a value to modify it.' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Odjava',
|
||||
'Logged as: %s' => 'Prijavi se kao: %s',
|
||||
'Logout successful.' => 'Uspešna odjava.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Nevažeće dozvole.',
|
||||
'Language' => 'Jezik',
|
||||
'Invalid CSRF token. Send the form again.' => 'Nevažeći CSRF kod. Proslijedite ponovo formu.',
|
||||
'No extension' => 'Bez dodataka',
|
||||
@@ -73,7 +73,6 @@ $translations = array(
|
||||
'Data' => 'Podaci',
|
||||
|
||||
'Database' => 'Baza podataka',
|
||||
'database' => 'baza podataka',
|
||||
'Use' => 'Koristi',
|
||||
'Select database' => 'Izaberite bazu',
|
||||
'Invalid database.' => 'Neispravna baza podataka.',
|
||||
@@ -183,7 +182,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ažuriraj indekse',
|
||||
'Add next' => 'Dodaj slijedeći',
|
||||
'Index Type' => 'Tip indeksa',
|
||||
'Column (length)' => 'kolumna (dužina)',
|
||||
'length' => 'dužina',
|
||||
|
||||
'Foreign keys' => 'Strani ključevi',
|
||||
'Foreign key' => 'Strani ključ',
|
||||
@@ -318,41 +317,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Tip je izbrisan.',
|
||||
'Type has been created.' => 'tip je spašen.',
|
||||
'Alter type' => 'Ažuriraj tip',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Da',
|
||||
'No' => 'Ne',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Inicia la sessió',
|
||||
'Logout successful.' => 'Desconnexió correcta.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Credencials invàlides.',
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Nom d\'usuari',
|
||||
'Password' => 'Contrasenya',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Crea una base de dades',
|
||||
'SQL command' => 'Ordre SQL',
|
||||
'Logout' => 'Desconnecta',
|
||||
'database' => 'base de dades',
|
||||
'Use' => 'Utilitza',
|
||||
'No tables.' => 'No hi ha cap taula.',
|
||||
'select' => 'registres',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipus d\'índex',
|
||||
'Column (length)' => 'Columna (longitud)',
|
||||
'length' => 'longitud',
|
||||
'View has been dropped.' => 'S\'ha suprimit la vista.',
|
||||
'View has been altered.' => 'S\'ha modificat la vista.',
|
||||
'View has been created.' => 'S\'ha creat la vista.',
|
||||
@@ -265,49 +264,4 @@ $translations = array(
|
||||
'Permanent link' => 'Enllaç permanent',
|
||||
'Edit all' => 'Edita-ho tot',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -11,7 +11,7 @@ $translations = array(
|
||||
'Logged as: %s' => 'Přihlášen jako: %s',
|
||||
'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Díky za použití Admineru, <a href="https://www.adminer.org/cs/donation/">přispějte</a> na vývoj.',
|
||||
'Invalid server or credentials.' => 'Neplatný server nebo přihlašovací údaje.',
|
||||
'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
|
||||
'There is a space in the input password which might be the cause.' => 'Problém může být, že je v zadaném hesle mezera.',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer nepodporuje přístup k databázi bez hesla, <a href="https://www.adminer.org/cs/password/"%s>více informací</a>.',
|
||||
'Database does not support password.' => 'Databáze nepodporuje heslo.',
|
||||
@@ -88,7 +88,6 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Databáze',
|
||||
'database' => 'databáze',
|
||||
'DB' => 'DB',
|
||||
'Use' => 'Vybrat',
|
||||
'Select database' => 'Vybrat databázi',
|
||||
@@ -206,7 +205,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Pozměnit indexy',
|
||||
'Add next' => 'Přidat další',
|
||||
'Index Type' => 'Typ indexu',
|
||||
'Column (length)' => 'Sloupec (délka)',
|
||||
'length' => 'délka',
|
||||
|
||||
'Foreign keys' => 'Cizí klíče',
|
||||
'Foreign key' => 'Cizí klíč',
|
||||
@@ -256,8 +255,8 @@ $translations = array(
|
||||
'%d row(s)' => array('%d řádek', '%d řádky', '%d řádků'),
|
||||
'Page' => 'Stránka',
|
||||
'last' => 'poslední',
|
||||
'Load more data' => 'Nahrát další data',
|
||||
'Loading' => 'Nahrává se',
|
||||
'Load more data' => 'Načíst další data',
|
||||
'Loading' => 'Načítá se',
|
||||
'Whole result' => 'Celý výsledek',
|
||||
'%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtů'),
|
||||
|
||||
@@ -347,12 +346,11 @@ $translations = array(
|
||||
'Type has been created.' => 'Typ byl vytvořen.',
|
||||
'Alter type' => 'Pozměnit typ',
|
||||
|
||||
// Plugins
|
||||
'Columns' => 'Sloupce',
|
||||
'Nullable' => 'Povoleno null',
|
||||
'Default' => 'Výchozí',
|
||||
'Yes' => 'Ano',
|
||||
'No' => 'Ne',
|
||||
'One Time Password' => 'Jednorázové heslo',
|
||||
'Invalid OTP code.' => 'Neplatný kód OTP.',
|
||||
// Table check constraints
|
||||
'Checks' => 'Kontroly',
|
||||
'Create check' => 'Vytvořit kontrolu',
|
||||
'Alter check' => 'Změnit kontrolu',
|
||||
'Check has been created.' => 'Kontrola byla vytvořena.',
|
||||
'Check has been altered.' => 'Kontrola byla změněna.',
|
||||
'Check has been dropped.' => 'Kontrola byla odstraněna.',
|
||||
);
|
||||
|
@@ -9,7 +9,7 @@ $translations = array(
|
||||
'Logout' => 'Log ud',
|
||||
'Logged as: %s' => 'Logget ind som: %s',
|
||||
'Logout successful.' => 'Log af vellykket.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Ugyldige log ind oplysninger.',
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-kodeordet er udløbet. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for at gøre det permanent.',
|
||||
'Language' => 'Sprog',
|
||||
'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.',
|
||||
@@ -64,7 +64,6 @@ $translations = array(
|
||||
'Format' => 'Format',
|
||||
'Data' => 'Data',
|
||||
'Database' => 'Database',
|
||||
'database' => 'database',
|
||||
'Use' => 'Brug',
|
||||
'Select database' => 'Vælg database',
|
||||
'Invalid database.' => 'Ugyldig database.',
|
||||
@@ -165,7 +164,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ændre indekser',
|
||||
'Add next' => 'Læg til næste',
|
||||
'Index Type' => 'Indekstype',
|
||||
'Column (length)' => 'Kolonne (længde)',
|
||||
'length' => 'længde',
|
||||
'Foreign keys' => 'Fremmednøgler',
|
||||
'Foreign key' => 'Fremmednøgle',
|
||||
'Foreign key has been dropped.' => 'Fremmednøglen er slettet.',
|
||||
@@ -279,35 +278,4 @@ $translations = array(
|
||||
'Type has been created.' => 'Typen er oprettet.',
|
||||
'Alter type' => 'Ændre type',
|
||||
'Saving' => 'Gemmer',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Materialized view' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Ja',
|
||||
'No' => 'Nej',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -3,7 +3,7 @@ $translations = array(
|
||||
'Login' => 'Login',
|
||||
'Logout successful.' => 'Abmeldung erfolgreich.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Danke, dass Sie Adminer genutzt haben. <a href="https://www.adminer.org/de/donation/">Spenden willkommen!</a>',
|
||||
'Invalid server or credentials.' => 'Ungültige Server oder Anmelde-Informationen.',
|
||||
'Invalid credentials.' => 'Ungültige Anmelde-Informationen.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Benutzer',
|
||||
'Password' => 'Passwort',
|
||||
@@ -32,8 +32,7 @@ $translations = array(
|
||||
'Create database' => 'Datenbank erstellen',
|
||||
'SQL command' => 'SQL-Kommando',
|
||||
'Logout' => 'Abmelden',
|
||||
'database' => 'Datenbank',
|
||||
'Use' => 'Benutzung',
|
||||
'Use' => 'Auswählen',
|
||||
'No tables.' => 'Keine Tabellen.',
|
||||
'select' => 'zeigen',
|
||||
'Item has been deleted.' => 'Datensatz wurde gelöscht.',
|
||||
@@ -97,7 +96,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Index-Typ',
|
||||
'Column (length)' => 'Spalte (Länge)',
|
||||
'length' => 'Länge',
|
||||
'View has been dropped.' => 'View wurde entfernt.',
|
||||
'View has been altered.' => 'View wurde geändert.',
|
||||
'View has been created.' => 'View wurde erstellt.',
|
||||
@@ -280,34 +279,25 @@ $translations = array(
|
||||
'If you did not send this request from Adminer then close this page.' => 'Wenn Sie diese Anfrage nicht von Adminer gesendet haben, schließen Sie diese Seite.',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'Sie können eine große SQL-Datei per FTP hochladen und dann vom Server importieren.',
|
||||
'You are offline.' => 'Sie sind offline.',
|
||||
'You have no privileges to update this table.' => 'Sie haben keine Rechte, um diese Tabelle zu aktualisieren.',
|
||||
'You have no privileges to update this table.' => 'Sie haben keine Rechte, diese Tabelle zu aktualisieren.',
|
||||
'Saving' => 'Speichere',
|
||||
'yes' => 'ja',
|
||||
'no' => 'nein',
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Das Master-Passwort ist abgelaufen. <a href="https://www.adminer.org/de/extension/"%s>Implementieren</a> Sie die %s Methode, um es permanent zu machen.',
|
||||
'%d / ' => '%d / ',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Full table scan' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Ja',
|
||||
'No' => 'Nein',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
'Drop %s?' => '%s entfernen?',
|
||||
'Materialized view' => 'Strukturierte Ansicht',
|
||||
'Vacuum' => 'Vacuum',
|
||||
'overwrite' => 'überschreiben',
|
||||
'DB' => 'DB',
|
||||
'ATTACH queries are not supported.' => 'ATTACH Abfragen werden nicht unterstützt.',
|
||||
'Warnings' => 'Warnungen',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer unterstützt den Zugriff auf eine Datenbank ohne Passwort nicht, <a href="https://www.adminer.org/en/password/"%s>mehr Informationen</a>.',
|
||||
'Full table scan' => 'Vollständige Überprüfung der Tabelle',
|
||||
'The action will be performed after successful login with the same credentials.' => 'Die Aktion wird nach erfolgreicher Anmeldung mit denselben Anmeldedaten ausgeführt.',
|
||||
'Connecting to privileged ports is not allowed.' => 'Die Verbindung zu privilegierten Ports ist nicht erlaubt.',
|
||||
'There is a space in the input password which might be the cause.' => 'Es gibt ein Leerzeichen im Eingabepasswort, das die Ursache sein könnte.',
|
||||
'Unknown error.' => 'Unbekannter Fehler.',
|
||||
'Database does not support password.' => 'Die Datenbank unterstützt kein Passwort.',
|
||||
'Disable %s or enable %s or %s extensions.' => 'Deaktivieren Sie %s oder aktivieren Sie die Erweiterungen %s oder %s.',
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Αποσύνδεση',
|
||||
'Logged as: %s' => 'Συνδεθήκατε ως %s',
|
||||
'Logout successful.' => 'Αποσυνδεθήκατε με επιτυχία.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Εσφαλμένα Διαπιστευτήρια.',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Επανειλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτό.', 'Επανειλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτά.'),
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Έληξε ο Κύριος Κωδικός. <a href="https://www.adminer.org/en/extension/"%s>Ενεργοποιήστε</a> τη μέθοδο %s για να τον κάνετε μόνιμο.',
|
||||
'Language' => 'Γλώσσα',
|
||||
@@ -79,7 +79,6 @@ $translations = array(
|
||||
'Data' => 'Δεδομένα',
|
||||
|
||||
'Database' => 'Β. Δεδομένων',
|
||||
'database' => 'β. δεδομένων',
|
||||
'Use' => 'χρήση',
|
||||
'Select database' => 'Επιλέξτε Β.Δ.',
|
||||
'Invalid database.' => 'Λανθασμένη Β.Δ.',
|
||||
@@ -194,7 +193,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Τροποποίηση δεικτών',
|
||||
'Add next' => 'Προσθήκη επόμενου',
|
||||
'Index Type' => 'Τύπος δείκτη',
|
||||
'Column (length)' => 'Στήλη (μήκος)',
|
||||
'length' => 'μήκος',
|
||||
|
||||
'Foreign keys' => 'Εξαρτημένα κλειδιά',
|
||||
'Foreign key' => 'Εξαρτημένο κλειδί',
|
||||
@@ -333,26 +332,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Ο τύπος διαγράφηκε.',
|
||||
'Type has been created.' => 'Ο τύπος δημιουργήθηκε.',
|
||||
'Alter type' => 'Τροποποίηση τύπου',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Login',
|
||||
'Logout successful.' => 'Sesión finalizada con éxito.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Usuario y/o clave de acceso incorrecta.',
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuario',
|
||||
'Password' => 'Contraseña',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Crear Base de datos',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Logout' => 'Cerrar sesión',
|
||||
'database' => 'base de datos',
|
||||
'Use' => 'Usar',
|
||||
'No tables.' => 'No existen tablas.',
|
||||
'select' => 'registros',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'AL BORRAR',
|
||||
'ON UPDATE' => 'AL ACTUALIZAR',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'Column (length)' => 'Columna (longitud)',
|
||||
'length' => 'longitud',
|
||||
'View has been dropped.' => 'Vista eliminada.',
|
||||
'View has been altered.' => 'Vista modificada.',
|
||||
'View has been created.' => 'Vista creada.',
|
||||
@@ -265,49 +264,4 @@ $translations = array(
|
||||
'Permanent link' => 'Enlace permanente',
|
||||
'Edit all' => 'Editar todos',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Logi sisse',
|
||||
'Logout successful.' => 'Väljalogimine õnnestus.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Ebakorrektsed andmed.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Kasutajanimi',
|
||||
'Password' => 'Parool',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Loo uus andmebaas',
|
||||
'SQL command' => 'SQL-Päring',
|
||||
'Logout' => 'Logi välja',
|
||||
'database' => 'andmebaas',
|
||||
'Use' => 'Kasuta',
|
||||
'No tables.' => 'Tabeleid ei leitud.',
|
||||
'select' => 'kuva',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Indeksi tüüp',
|
||||
'Column (length)' => 'Veerg (pikkus)',
|
||||
'length' => 'pikkus',
|
||||
'View has been dropped.' => 'Vaade (VIEW) on edukalt kustutatud.',
|
||||
'View has been altered.' => 'Vaade (VIEW) on edukalt muudetud.',
|
||||
'View has been created.' => 'Vaade (VIEW) on edukalt loodud.',
|
||||
@@ -265,49 +264,4 @@ $translations = array(
|
||||
'Permanent link' => 'Püsilink',
|
||||
'Edit all' => 'Muuda kõiki',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'خروج',
|
||||
'Logged as: %s' => 'ورود به عنوان: %s',
|
||||
'Logout successful.' => 'با موفقیت خارج شدید.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'اعتبار سنجی نامعتبر.',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.', 'ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.'),
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'رمز اصلی باطل شده است. روش %s را <a href="https://www.adminer.org/en/extension/"%s>پیاده سازی</a> کرده تا آن را دائمی سازید.',
|
||||
'Language' => 'زبان',
|
||||
@@ -77,7 +77,6 @@ $translations = array(
|
||||
'Data' => 'داده',
|
||||
|
||||
'Database' => 'پایگاه داده',
|
||||
'database' => 'پایگاه داده',
|
||||
'Use' => 'استفاده',
|
||||
'Select database' => 'انتخاب پایگاه داده',
|
||||
'Invalid database.' => 'پایگاه داده نامعتبر.',
|
||||
@@ -192,7 +191,7 @@ $translations = array(
|
||||
'Alter indexes' => 'ویرایش ایندکسها',
|
||||
'Add next' => 'افرودن بعدی',
|
||||
'Index Type' => 'نوع ایندکس',
|
||||
'Column (length)' => 'ستون (طول)',
|
||||
'length' => 'طول',
|
||||
|
||||
'Foreign keys' => 'کلیدهای خارجی',
|
||||
'Foreign key' => 'کلید خارجی',
|
||||
@@ -331,28 +330,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'نوع حذف شد.',
|
||||
'Type has been created.' => 'نوع ایجاد شد.',
|
||||
'Alter type' => 'ویرایش نوع',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Kirjaudu ulos',
|
||||
'Logged as: %s' => 'Olet kirjautunut käyttäjänä: %s',
|
||||
'Logout successful.' => 'Uloskirjautuminen onnistui.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Virheelliset kirjautumistiedot.',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.', 'Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.'),
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-salasana ei ole enää voimassa. <a href="https://www.adminer.org/en/extension/"%s>Toteuta</a> %s-metodi sen tekemiseksi pysyväksi.',
|
||||
'Language' => 'Kieli',
|
||||
@@ -79,7 +79,6 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Tietokanta',
|
||||
'database' => 'tietokanta',
|
||||
'Use' => 'Käytä',
|
||||
'Select database' => 'Valitse tietokanta',
|
||||
'Invalid database.' => 'Tietokanta ei kelpaa.',
|
||||
@@ -194,7 +193,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Muuta indeksejä',
|
||||
'Add next' => 'Lisää seuraava',
|
||||
'Index Type' => 'Indeksityyppi',
|
||||
'Column (length)' => 'Sarake (pituus)',
|
||||
'length' => 'pituus',
|
||||
|
||||
'Foreign keys' => 'Vieraat avaimet',
|
||||
'Foreign key' => 'Vieras avain',
|
||||
@@ -347,12 +346,4 @@ $translations = array(
|
||||
'Unknown error.' => 'Tuntematon virhe.',
|
||||
'Database does not support password.' => 'Tietokanta ei tue salasanaa.',
|
||||
'Disable %s or enable %s or %s extensions.' => 'Poista käytöstä %s tai ota käyttöön laajennus %s tai %s.',
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Kyllä',
|
||||
'No' => 'Ei',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Authentification',
|
||||
'Logout successful.' => 'Au revoir !',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Authentification échouée.',
|
||||
'Server' => 'Serveur',
|
||||
'Username' => 'Utilisateur',
|
||||
'Password' => 'Mot de passe',
|
||||
@@ -30,7 +30,6 @@ $translations = array(
|
||||
'Create database' => 'Créer une base de données',
|
||||
'SQL command' => 'Requête SQL',
|
||||
'Logout' => 'Déconnexion',
|
||||
'database' => 'base de données',
|
||||
'Use' => 'Utiliser',
|
||||
'No tables.' => 'Aucune table.',
|
||||
'select' => 'select',
|
||||
@@ -94,7 +93,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Type d\'index',
|
||||
'Column (length)' => 'Colonne (longueur)',
|
||||
'length' => 'longueur',
|
||||
'View has been dropped.' => 'La vue a été effacée.',
|
||||
'View has been altered.' => 'La vue a été modifiée.',
|
||||
'View has been created.' => 'La vue a été créée.',
|
||||
@@ -288,26 +287,16 @@ $translations = array(
|
||||
'Default value' => 'Valeur par défaut',
|
||||
'If you did not send this request from Adminer then close this page.' => 'Si vous n\'avez pas envoyé cette requête depuis Adminer, alors fermez cette page.',
|
||||
'You are offline.' => 'Vous êtes hors ligne.',
|
||||
|
||||
'Drop %s?' => 'Supprimer %s?',
|
||||
'overwrite' => 'écraser',
|
||||
'DB' => 'BD',
|
||||
'ATTACH queries are not supported.' => 'Requêtes ATTACH ne sont pas supportées.',
|
||||
'Warnings' => 'Avertissements',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer ne supporte pas l\'accès aux bases de données sans mot de passe, <a href="https://www.adminer.org/en/password/"%s>plus d\'information</a>.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => 'Cette action sera exécutée après s\'être connecté avec les mêmes données de connexion.',
|
||||
'Connecting to privileged ports is not allowed.' => 'La connexion aux ports privilégiés n\'est pas autorisée.',
|
||||
'There is a space in the input password which might be the cause.' => 'Il y a un espace dans le mot de passe entré qui pourrait en être la cause.',
|
||||
'Unknown error.' => 'Erreur inconnue',
|
||||
'Database does not support password.' => 'La base de données ne support pas les mots de passe',
|
||||
'Disable %s or enable %s or %s extensions.' => 'Désactiver %s ou activer %s or %s extensions.',
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Oui',
|
||||
'No' => 'Non',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Conectar',
|
||||
'Logout successful.' => 'Pechouse a sesión con éxito.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Credenciais (usuario e/ou contrasinal) inválidos.',
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuario',
|
||||
'Password' => 'Contrasinal',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Crear Base de datos',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Logout' => 'Pechar sesión',
|
||||
'database' => 'base de datos',
|
||||
'Use' => 'Usar',
|
||||
'No tables.' => 'Nengunha táboa.',
|
||||
'select' => 'selecciona',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'AO BORRAR (ON DELETE)',
|
||||
'ON UPDATE' => 'AO ACTUALIZAR (ON UPDATE)',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'Column (length)' => 'Columna (lonxitude)',
|
||||
'length' => 'lonxitude',
|
||||
'View has been dropped.' => 'Eliminouse a vista.',
|
||||
'View has been altered.' => 'Modificouse a vista.',
|
||||
'View has been created.' => 'Creouse a vista.',
|
||||
@@ -288,26 +287,4 @@ $translations = array(
|
||||
'Saving' => 'Gardando',
|
||||
'yes' => 'si',
|
||||
'no' => 'non',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Si',
|
||||
'No' => 'Non',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'התחברות',
|
||||
'Logout successful.' => 'ההתחברות הצליחה',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'פרטי התחברות שגויים',
|
||||
'Server' => 'שרת',
|
||||
'Username' => 'שם משתמש',
|
||||
'Password' => 'סיסמה',
|
||||
@@ -30,7 +30,6 @@ $translations = array(
|
||||
'Create database' => 'צור מסד נתונים',
|
||||
'SQL command' => 'שאילתת SQL',
|
||||
'Logout' => 'התנתק',
|
||||
'database' => 'מסד נתונים',
|
||||
'Use' => 'השתמש',
|
||||
'No tables.' => 'אין טבלאות',
|
||||
'select' => 'בחר',
|
||||
@@ -94,7 +93,7 @@ $translations = array(
|
||||
'ON DELETE' => 'בעת מחיקה',
|
||||
'ON UPDATE' => 'בעת עידכון',
|
||||
'Index Type' => 'סוג אינדקס',
|
||||
'Column (length)' => 'עמודה (אורך)',
|
||||
'length' => 'אורך',
|
||||
'View has been dropped.' => 'התצוגה הושלכה',
|
||||
'View has been altered.' => 'התצוגה שונתה',
|
||||
'View has been created.' => 'התצוגה נוצרה',
|
||||
@@ -290,24 +289,4 @@ $translations = array(
|
||||
'Saving' => 'שומר',
|
||||
'yes' => 'כן',
|
||||
'no' => 'לא',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Warnings' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Belépés',
|
||||
'Logout successful.' => 'Sikeres kilépés.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Érvénytelen adatok.',
|
||||
'Server' => 'Szerver',
|
||||
'Username' => 'Felhasználó',
|
||||
'Password' => 'Jelszó',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Adatbázis létrehozása',
|
||||
'SQL command' => 'SQL parancs',
|
||||
'Logout' => 'Kilépés',
|
||||
'database' => 'adatbázis',
|
||||
'Use' => 'Használ',
|
||||
'No tables.' => 'Nincs tábla.',
|
||||
'select' => 'kiválasztás',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'törléskor',
|
||||
'ON UPDATE' => 'frissítéskor',
|
||||
'Index Type' => 'Index típusa',
|
||||
'Column (length)' => 'Oszop (méret)',
|
||||
'length' => 'méret',
|
||||
'View has been dropped.' => 'A nézet eldobva.',
|
||||
'View has been altered.' => 'A nézet módosult.',
|
||||
'View has been created.' => 'A nézet létrejött.',
|
||||
@@ -264,50 +263,4 @@ $translations = array(
|
||||
'Permanent link' => 'Hivatkozás',
|
||||
'Edit all' => 'Összes szerkesztése',
|
||||
'HH:MM:SS' => 'óó:pp:mm',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Ctrl+click on a value to modify it.' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Keluar',
|
||||
'Logged as: %s' => 'Masuk sebagai: %s',
|
||||
'Logout successful.' => 'Berhasil keluar.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Akses tidak sah.',
|
||||
'Language' => 'Bahasa',
|
||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Kirim ulang formulir.',
|
||||
'No extension' => 'Ekstensi tidak ada',
|
||||
@@ -73,7 +73,6 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Basis data',
|
||||
'database' => 'basis data',
|
||||
'Use' => 'Gunakan',
|
||||
'Select database' => 'Pilih basis data',
|
||||
'Invalid database.' => 'Basis data tidak sah.',
|
||||
@@ -183,7 +182,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ubah indeks',
|
||||
'Add next' => 'Tambah setelahnya',
|
||||
'Index Type' => 'Jenis Indeks',
|
||||
'Column (length)' => 'Kolom (panjang)',
|
||||
'length' => 'panjang',
|
||||
|
||||
'Foreign keys' => 'Kunci asing',
|
||||
'Foreign key' => 'Kunci asing',
|
||||
@@ -313,46 +312,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Jenis berhasil dihapus.',
|
||||
'Type has been created.' => 'Jenis berhasil dibuat.',
|
||||
'Alter type' => 'Ubah jenis',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Ctrl+click on a value to modify it.' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Autenticazione',
|
||||
'Logout successful.' => 'Uscita effettuata con successo.',
|
||||
'Invalid server or credentials.' => 'Server o credenziali non valide.',
|
||||
'Invalid credentials.' => 'Credenziali non valide.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Utente',
|
||||
'Password' => 'Password',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Crea database',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Logout' => 'Esci',
|
||||
'database' => 'database',
|
||||
'Use' => 'Usa',
|
||||
'No tables.' => 'No tabelle.',
|
||||
'select' => 'seleziona',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipo indice',
|
||||
'Column (length)' => 'Colonna (lunghezza)',
|
||||
'length' => 'lunghezza',
|
||||
'View has been dropped.' => 'Vista eliminata.',
|
||||
'View has been altered.' => 'Vista modificata.',
|
||||
'View has been created.' => 'Vista creata.',
|
||||
@@ -265,7 +264,6 @@ $translations = array(
|
||||
'Permanent link' => 'Link permanente',
|
||||
'Edit all' => 'Modifica tutto',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => 'Scartare %s?',
|
||||
'Tables have been optimized.' => 'Le tabelle sono state ottimizzate',
|
||||
'Materialized view' => 'Vista materializzata',
|
||||
@@ -279,13 +277,12 @@ $translations = array(
|
||||
'Loading' => 'Caricamento',
|
||||
'ATTACH queries are not supported.' => 'ATTACH queries non sono supportate.',
|
||||
'Warnings' => 'Attenzione',
|
||||
'%d / ' => array('%d / '),
|
||||
'%d / ' => '%d / ',
|
||||
'Limit rows' => 'Limite righe',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer non supporta accesso a databse senza password, <a href="https://www.adminer.org/it/password/"%s>piú informazioni</a>.',
|
||||
'Default value' => 'Valore predefinito',
|
||||
'Full table scan' => 'Analizza intera tabella',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Troppi tentativi infruttuosi di login, si prega di riprovare in %d minuto.', 'Troppi tentativi infruttuosi di login, si prega di riprovare in %d minuti.'),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'La password principale é scaduta. <a href="https://www.adminer.org/it/extension/"%s>Implementare</a> %s come metodo per renderla permanente.',
|
||||
'The action will be performed after successful login with the same credentials.' => 'La azione verrá eseguita dopo un login valido con le stesse credenziali.',
|
||||
'Connecting to privileged ports is not allowed.' => 'LA connessione a porte privilegiate non é permessa.',
|
||||
@@ -302,12 +299,4 @@ $translations = array(
|
||||
'Disable %s or enable %s or %s extensions.' => 'Disabilita %s o abilita %s oppure %s estensioni.',
|
||||
'yes' => 'si',
|
||||
'no' => 'no',
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Si',
|
||||
'No' => 'No',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'ログイン',
|
||||
'Logout successful.' => 'ログアウト',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => '不正なログイン',
|
||||
'Server' => 'サーバ',
|
||||
'Username' => 'ユーザ名',
|
||||
'Password' => 'パスワード',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'データベースを作成',
|
||||
'SQL command' => 'SQLコマンド',
|
||||
'Logout' => 'ログアウト',
|
||||
'database' => 'データベース',
|
||||
'Use' => '使用',
|
||||
'No tables.' => 'テーブルがありません。',
|
||||
'select' => '選択',
|
||||
@@ -95,7 +94,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => '索引の型',
|
||||
'Column (length)' => '列(長さ)',
|
||||
'length' => '長さ',
|
||||
'View has been dropped.' => 'ビューを削除しました',
|
||||
'View has been altered.' => 'ビューを変更しました',
|
||||
'View has been created.' => 'ビューを作成しました',
|
||||
@@ -274,40 +273,4 @@ $translations = array(
|
||||
'yes' => 'はい',
|
||||
'no' => 'いいえ',
|
||||
'Default value' => '既定値',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Ctrl+click on a value to modify it.' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'შესვლა',
|
||||
'Logout successful.' => 'გამოხვედით სისტემიდან.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'არასწორი მომხმარებელი ან პაროლი.',
|
||||
'Server' => 'სერვერი',
|
||||
'Username' => 'მომხმარებელი',
|
||||
'Password' => 'პაროლი',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'ბაზის შექმნა',
|
||||
'SQL command' => 'SQL-ბრძანება',
|
||||
'Logout' => 'გასვლა',
|
||||
'database' => 'ბაზა',
|
||||
'Use' => 'არჩევა',
|
||||
'No tables.' => 'ბაზაში ცხრილი არაა.',
|
||||
'select' => 'არჩევა',
|
||||
@@ -94,7 +93,7 @@ $translations = array(
|
||||
'ON DELETE' => 'წაშლისას',
|
||||
'ON UPDATE' => 'განახლებისას',
|
||||
'Index Type' => 'ინდექსის სახეობა',
|
||||
'Column (length)' => 'ველი (სიგრძე)',
|
||||
'length' => 'სიგრძე',
|
||||
'View has been dropped.' => 'წარმოდგენა წაიშალა.',
|
||||
'View has been altered.' => 'წარმოდგენა შეიცვალა.',
|
||||
'View has been created.' => 'წარმოდგენა შეიქმნა.',
|
||||
@@ -300,14 +299,4 @@ $translations = array(
|
||||
'Unknown error.' => 'უცნობი შეცდომა.',
|
||||
'Database does not support password.' => 'ბაზაში არაა მხარდაჭერილი პაროლი.',
|
||||
'Disable %s or enable %s or %s extensions.' => 'გათიშეთ %s ან ჩართეთ %s ან %s გაფართოება.',
|
||||
|
||||
'overwrite' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -46,7 +46,7 @@ $translations = array(
|
||||
'Clone' => '복제',
|
||||
'collation' => '정렬',
|
||||
'Collation' => '정렬',
|
||||
'Column (length)' => '열 (길이)',
|
||||
'length' => '길이',
|
||||
'Column name' => '열 이름',
|
||||
'Column' => '열',
|
||||
'Comment' => '주석',
|
||||
@@ -71,7 +71,6 @@ $translations = array(
|
||||
'Database has been dropped.' => '데이터베이스를 삭제했습니다.',
|
||||
'Database has been renamed.' => '데이터베이스의 이름을 바꾸었습니다.',
|
||||
'Database schema' => '데이터베이스 구조',
|
||||
'database' => '데이터베이스',
|
||||
'Database' => '데이터베이스',
|
||||
'Databases have been dropped.' => '데이터베이스를 삭제했습니다.',
|
||||
'Date and time' => '시간',
|
||||
@@ -121,7 +120,7 @@ $translations = array(
|
||||
'Indexes have been altered.' => '색인을 변경했습니다.',
|
||||
'Indexes' => '색인',
|
||||
'Insert' => '삽입',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => '잘못된 로그인',
|
||||
'Invalid CSRF token. Send the form again.' => '잘못된 CSRF 토큰입니다. 다시 보내주십시오.',
|
||||
'Invalid database.' => '잘못된 데이터베이스입니다.',
|
||||
'Invalid schema.' => '잘못된 스키마입니다.',
|
||||
@@ -277,37 +276,4 @@ $translations = array(
|
||||
'You are offline.' => '오프라인입니다.',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => '큰 SQL 파일은 FTP를 통하여 업로드하여 서버에서 가져올 수 있습니다.',
|
||||
'You have no privileges to update this table.' => '이 테이블을 업데이트할 권한이 없습니다.',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'User types' => null,
|
||||
'DB' => null,
|
||||
'Ctrl+click on a value to modify it.' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'%d / ' => array(),
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Atsijungti',
|
||||
'Logged as: %s' => 'Prisijungęs kaip: %s',
|
||||
'Logout successful.' => 'Jūs atsijungėte nuo sistemos.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Neteisingi prisijungimo duomenys.',
|
||||
'Language' => 'Kalba',
|
||||
'Invalid CSRF token. Send the form again.' => 'Neteisingas CSRF tokenas. Bandykite siųsti formos duomenis dar kartą.',
|
||||
'No extension' => 'Nėra plėtiio',
|
||||
@@ -73,7 +73,6 @@ $translations = array(
|
||||
'Data' => 'Duomenys',
|
||||
|
||||
'Database' => 'Duomenų bazė',
|
||||
'database' => 'duomenų bazė',
|
||||
'Use' => 'Naudoti',
|
||||
'Select database' => 'Pasirinkti duomenų bazę',
|
||||
'Invalid database.' => 'Neteisinga duomenų bazė.',
|
||||
@@ -182,7 +181,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Redaguoti indeksus',
|
||||
'Add next' => 'Pridėti kitą',
|
||||
'Index Type' => 'Indekso tipas',
|
||||
'Column (length)' => 'Stulpelis (ilgis)',
|
||||
'length' => 'ilgis',
|
||||
|
||||
'Foreign keys' => 'Išoriniai raktai',
|
||||
'Foreign key' => 'Išorinis raktas',
|
||||
@@ -309,50 +308,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Tipas pašalintas.',
|
||||
'Type has been created.' => 'Tipas sukurtas.',
|
||||
'Alter type' => 'Keisti tipą',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Ctrl+click on a value to modify it.' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Ieiet',
|
||||
'Logout successful.' => 'Jūs veiksmīgi izgājāt no sistēmas.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Nepareizs lietotāja vārds vai parole.',
|
||||
'Server' => 'Serveris',
|
||||
'Username' => 'Lietotājs',
|
||||
'Password' => 'Parole',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Izveidot datubāzi',
|
||||
'SQL command' => 'SQL pieprasījums',
|
||||
'Logout' => 'Iziet',
|
||||
'database' => 'datubāze',
|
||||
'Use' => 'Lietot',
|
||||
'No tables.' => 'Datubāzē nav tabulu.',
|
||||
'select' => 'izvēlēties',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'Pie dzēšanas',
|
||||
'ON UPDATE' => 'Pie atjaunošanas',
|
||||
'Index Type' => 'Indeksa tips',
|
||||
'Column (length)' => 'Lauks (garums)',
|
||||
'length' => 'garums',
|
||||
'View has been dropped.' => 'Skats dzēsts.',
|
||||
'View has been altered.' => 'Skats izmainīts.',
|
||||
'View has been created.' => 'Skats izveidots.',
|
||||
@@ -285,10 +284,10 @@ $translations = array(
|
||||
'Size' => 'Izmērs',
|
||||
'Compute' => 'Izskaitļot',
|
||||
'You are offline.' => 'Jūs est bezsasaistē.',
|
||||
'You have no privileges to update this table.' => 'Jums nav pieejas labot šo tabulu.',
|
||||
'You have no privileges to update this table.' => 'jums nav pieejas labot šo tabulu.',
|
||||
'Saving' => 'Saglabāšana',
|
||||
'yes' => 'jā',
|
||||
'no' => 'nē',
|
||||
'yes' => 'Jā',
|
||||
'no' => 'Nē',
|
||||
'Drop %s?' => 'Dzēst %s?',
|
||||
'overwrite' => 'pārrakstīt',
|
||||
'DB' => 'DB',
|
||||
@@ -300,14 +299,4 @@ $translations = array(
|
||||
'There is a space in the input password which might be the cause.' => 'Parole satur atstarpi, kas varētu būt lieka.',
|
||||
'Unknown error.' => 'Nezināma kļūda.',
|
||||
'Database does not support password.' => 'Datubāze neatbalsta paroli.',
|
||||
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Jā',
|
||||
'No' => 'Nē',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -11,7 +11,7 @@ $translations = array(
|
||||
'Logged as: %s' => 'Log masuk sebagai: %s',
|
||||
'Logout successful.' => 'Log keluar berjaya.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Terima kasih kerana menggunakan Adminer, pertimbangkan untuk <a href="https://www.adminer.org/en/donation/">menderma</a>.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Akses tidak sah.',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => 'Terlalu banyak percubaan log masuk yang gagal, sila cuba lagi dalam masa %d minit.',
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Kata laluan utama telah luput. <a href="https://www.adminer.org/en/extension/"%s>Gunakan</a> cara %s untuk mengekalkannya.',
|
||||
'Language' => 'Bahasa',
|
||||
@@ -82,7 +82,6 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Pangkalan data',
|
||||
'database' => 'pangkalan data',
|
||||
'Use' => 'Guna',
|
||||
'Select database' => 'Pilih pangkalan data',
|
||||
'Invalid database.' => 'Pangkalan data tidak sah.',
|
||||
@@ -198,7 +197,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ubah indeks',
|
||||
'Add next' => 'Tambah yang seterusnya',
|
||||
'Index Type' => 'Jenis Indeks',
|
||||
'Column (length)' => 'Kolum (kepanjangan)',
|
||||
'length' => 'kepanjangan',
|
||||
|
||||
'Foreign keys' => 'Kunci asing',
|
||||
'Foreign key' => 'Kunci asing',
|
||||
@@ -337,22 +336,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Jenis telah dijatuhkan.',
|
||||
'Type has been created.' => 'Jenis telah dibuat.',
|
||||
'Alter type' => 'Ubah jenis',
|
||||
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Warnings' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Ya',
|
||||
'No' => 'Tidak',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Aanmelden',
|
||||
'Logout successful.' => 'Successvol afgemeld.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Ongeldige gebruikersgegevens.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Gebruikersnaam',
|
||||
'Password' => 'Wachtwoord',
|
||||
@@ -32,7 +32,6 @@ $translations = array(
|
||||
'Create database' => 'Database aanmaken',
|
||||
'SQL command' => 'SQL opdracht',
|
||||
'Logout' => 'Afmelden',
|
||||
'database' => 'database',
|
||||
'Use' => 'Gebruik',
|
||||
'No tables.' => 'Geen tabellen.',
|
||||
'select' => 'kies',
|
||||
@@ -97,7 +96,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Index type',
|
||||
'Column (length)' => 'Kolom (lengte)',
|
||||
'length' => 'lengte',
|
||||
'View has been dropped.' => 'View verwijderd.',
|
||||
'View has been altered.' => 'View aangepast.',
|
||||
'View has been created.' => 'View aangemaakt.',
|
||||
@@ -265,7 +264,6 @@ $translations = array(
|
||||
'Permanent link' => 'Permanente link',
|
||||
'Edit all' => 'Alles bewerken',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => 'Verwijder %s?',
|
||||
'Tables have been optimized.' => 'Tabellen zijn geoptimaliseerd.',
|
||||
'Materialized view' => 'Materialized view',
|
||||
@@ -285,7 +283,6 @@ $translations = array(
|
||||
'Default value' => 'Standaardwaarde',
|
||||
'Full table scan' => 'Full table scan',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Teveel foutieve aanmeldpogingen, probeer opnieuw binnen %d minuut.', 'Teveel foutieve aanmeldpogingen, probeer opnieuw binnen %d minuten.'),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master wachtwoord verlopen. <a href="https://www.adminer.org/en/extension/"%s>Implementeer</a> de %s methode om het permanent te maken.',
|
||||
'The action will be performed after successful login with the same credentials.' => 'Deze actie zal uitgevoerd worden na het succesvol aanmelden met dezelfde gebruikersgegevens',
|
||||
'Connecting to privileged ports is not allowed.' => 'Verbindingen naar geprivilegieerde poorten is niet toegestaan.',
|
||||
@@ -302,12 +299,4 @@ $translations = array(
|
||||
'Disable %s or enable %s or %s extensions.' => 'Schakel %s uit or schakel extensies %s of %s in.',
|
||||
'yes' => 'ja',
|
||||
'no' => 'neen',
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Ja',
|
||||
'No' => 'Neen',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -9,7 +9,7 @@ $translations = array(
|
||||
'Logout' => 'Logg ut',
|
||||
'Logged as: %s' => 'Logget inn som: %s',
|
||||
'Logout successful.' => 'Utlogging vellykket.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Ugylding innloggingsinformasjon.',
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-passord er utløpt. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for å gjøre det permanent.',
|
||||
'Language' => 'Språk',
|
||||
'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.',
|
||||
@@ -64,7 +64,6 @@ $translations = array(
|
||||
'Format' => 'Format',
|
||||
'Data' => 'Data',
|
||||
'Database' => 'Database',
|
||||
'database' => 'database',
|
||||
'Use' => 'Bruk',
|
||||
'Select database' => 'Velg database',
|
||||
'Invalid database.' => 'Ugyldig database.',
|
||||
@@ -165,7 +164,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Endre indekser',
|
||||
'Add next' => 'Legg til neste',
|
||||
'Index Type' => 'Indekstype',
|
||||
'Column (length)' => 'Kolonne (lengde)',
|
||||
'length' => 'lengde',
|
||||
'Foreign keys' => 'Fremmednøkler',
|
||||
'Foreign key' => 'Fremmednøkkel',
|
||||
'Foreign key has been dropped.' => 'Fremmednøkkelen er slettet.',
|
||||
@@ -279,35 +278,4 @@ $translations = array(
|
||||
'Type has been created.' => 'Type er opprettet.',
|
||||
'Alter type' => 'Endre type',
|
||||
'Saving' => 'Lagrer',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Materialized view' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Ja',
|
||||
'No' => 'Nei',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -11,7 +11,7 @@ $translations = array(
|
||||
'Logged as: %s' => 'Zalogowany jako: %s',
|
||||
'Logout successful.' => 'Wylogowano pomyślnie.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Dziękujemy za używanie Adminera, rozważ proszę <a href="https://www.adminer.org/pl/donation/">dotację</a>.',
|
||||
'Invalid server or credentials.' => 'Nieprawidłowy serwer lub dane logowania.',
|
||||
'Invalid credentials.' => 'Nieprawidłowe dane logowania.',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Za dużo nieudanych prób logowania, spróbuj ponownie za %d minutę.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minuty.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minut.'),
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ważność hasła głównego wygasła. <a href="https://www.adminer.org/pl/extension/"%s>Zaimplementuj</a> własną metodę %s, aby ustawić je na stałe.',
|
||||
'Language' => 'Język',
|
||||
@@ -81,7 +81,6 @@ $translations = array(
|
||||
'Data' => 'Dane',
|
||||
|
||||
'Database' => 'Baza danych',
|
||||
'database' => 'baza danych',
|
||||
'Use' => 'Wybierz',
|
||||
'Select database' => 'Wybierz bazę danych',
|
||||
'Invalid database.' => 'Nie znaleziono bazy danych.',
|
||||
@@ -197,7 +196,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Zmień indeksy',
|
||||
'Add next' => 'Dodaj następny',
|
||||
'Index Type' => 'Typ indeksu',
|
||||
'Column (length)' => 'Kolumna (długość)',
|
||||
'length' => 'długość',
|
||||
|
||||
'Foreign keys' => 'Klucze obce',
|
||||
'Foreign key' => 'Klucz obcy',
|
||||
@@ -337,22 +336,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Typ został usunięty.',
|
||||
'Type has been created.' => 'Typ został utworzony.',
|
||||
'Alter type' => 'Zmień typ',
|
||||
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Warnings' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Tak',
|
||||
'No' => 'Nie',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Entrar',
|
||||
'Logout successful.' => 'Saída bem sucedida.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Identificação inválida.',
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuário',
|
||||
'Password' => 'Senha',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Criar Base de dados',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Logout' => 'Sair',
|
||||
'database' => 'base de dados',
|
||||
'Use' => 'Usar',
|
||||
'No tables.' => 'Não existem tabelas.',
|
||||
'select' => 'selecionar',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'Column (length)' => 'Coluna (tamanho)',
|
||||
'length' => 'tamanho',
|
||||
'View has been dropped.' => 'A Visão foi apagada.',
|
||||
'View has been altered.' => 'A Visão foi alterada.',
|
||||
'View has been created.' => 'A Visão foi criada.',
|
||||
@@ -260,54 +259,4 @@ $translations = array(
|
||||
'Please use one of the extensions %s.' => 'Por favor use uma das extensões %s.',
|
||||
'now' => 'agora',
|
||||
'ltr' => 'ltr',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been copied.' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'Copy' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Permanent link' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Edit all' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
'HH:MM:SS' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Entrar',
|
||||
'Logout successful.' => 'Sessão terminada com sucesso.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Identificação inválida.',
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Nome de utilizador',
|
||||
'Password' => 'Senha',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Criar Base de dados',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Logout' => 'Terminar sessão',
|
||||
'database' => 'base de dados',
|
||||
'Use' => 'Usar',
|
||||
'No tables.' => 'Não existem tabelas.',
|
||||
'select' => 'registos',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'Column (length)' => 'coluna (tamanho)',
|
||||
'length' => 'tamanho',
|
||||
'View has been dropped.' => 'Vista eliminada.',
|
||||
'View has been altered.' => 'Vista modificada.',
|
||||
'View has been created.' => 'Vista criada.',
|
||||
@@ -260,54 +259,4 @@ $translations = array(
|
||||
'Please use one of the extensions %s.' => 'Por favor use uma das extensões %s.',
|
||||
'now' => 'agora',
|
||||
'ltr' => 'ltr',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been copied.' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'Copy' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Permanent link' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Edit all' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
'HH:MM:SS' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Intră',
|
||||
'Logout successful.' => 'Ați ieșit cu succes.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Numele de utilizator sau parola este greșită.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Nume de utilizator',
|
||||
'Password' => 'Parola',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Crează baza de date',
|
||||
'SQL command' => 'SQL query',
|
||||
'Logout' => 'Ieșire',
|
||||
'database' => 'baza de date',
|
||||
'Use' => 'Alege',
|
||||
'No tables.' => 'În baza de date nu sunt tabele.',
|
||||
'select' => 'selectează',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'La ștergere',
|
||||
'ON UPDATE' => 'La modificare',
|
||||
'Index Type' => 'Tipul indexului',
|
||||
'Column (length)' => 'Coloană (lungimea)',
|
||||
'length' => 'lungimea',
|
||||
'View has been dropped.' => 'Reprezentarea a fost ștearsă.',
|
||||
'View has been altered.' => 'Reprezentarea a fost modificată.',
|
||||
'View has been created.' => 'Reprezentarea a fost creată.',
|
||||
@@ -265,49 +264,4 @@ $translations = array(
|
||||
'Permanent link' => 'Adresă permanentă',
|
||||
'Edit all' => 'Editează tot',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Войти',
|
||||
'Logout successful.' => 'Вы успешно покинули систему.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Неправильное имя пользователя или пароль.',
|
||||
'Server' => 'Сервер',
|
||||
'Username' => 'Имя пользователя',
|
||||
'Password' => 'Пароль',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'Создать базу данных',
|
||||
'SQL command' => 'SQL-запрос',
|
||||
'Logout' => 'Выйти',
|
||||
'database' => 'база данных',
|
||||
'Use' => 'Выбрать',
|
||||
'No tables.' => 'В базе данных нет таблиц.',
|
||||
'select' => 'выбрать',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'При стирании',
|
||||
'ON UPDATE' => 'При обновлении',
|
||||
'Index Type' => 'Тип индекса',
|
||||
'Column (length)' => 'Поле (длина)',
|
||||
'length' => 'длина',
|
||||
'View has been dropped.' => 'Представление было удалено.',
|
||||
'View has been altered.' => 'Представление было изменено.',
|
||||
'View has been created.' => 'Представление было создано.',
|
||||
@@ -287,8 +286,8 @@ $translations = array(
|
||||
'You are offline.' => 'Вы не выполнили вход.',
|
||||
'You have no privileges to update this table.' => 'У вас нет прав на обновление этой таблицы.',
|
||||
'Saving' => 'Сохранение',
|
||||
'yes' => 'да',
|
||||
'no' => 'нет',
|
||||
'yes' => 'Да',
|
||||
'no' => 'Нет',
|
||||
'Drop %s?' => 'Удалить %s?',
|
||||
'overwrite' => 'перезаписать',
|
||||
'DB' => 'DB',
|
||||
@@ -300,14 +299,5 @@ $translations = array(
|
||||
'There is a space in the input password which might be the cause.' => 'В введеном пароле есть пробел, это может быть причиною.',
|
||||
'Unknown error.' => 'Неизвестная ошибка.',
|
||||
'Database does not support password.' => 'База данных не поддерживает пароль.',
|
||||
|
||||
'Disable %s or enable %s or %s extensions.' => 'Отключите %s или включите расширения %s или %s.',
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Да',
|
||||
'No' => 'Нет',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'Prihlásiť sa',
|
||||
'Logout successful.' => 'Odhlásenie prebehlo v poriadku.',
|
||||
'Invalid server or credentials.' => 'Neplatný server alebo prihlasovacie údaje.',
|
||||
'Invalid credentials.' => 'Neplatné prihlasovacie údaje.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Používateľ',
|
||||
'Password' => 'Heslo',
|
||||
@@ -32,7 +32,6 @@ $translations = array(
|
||||
'Create database' => 'Vytvoriť databázu',
|
||||
'SQL command' => 'SQL príkaz',
|
||||
'Logout' => 'Odhlásiť',
|
||||
'database' => 'databáza',
|
||||
'Use' => 'Vybrať',
|
||||
'No tables.' => 'Žiadne tabuľky.',
|
||||
'select' => 'vypísať',
|
||||
@@ -97,7 +96,7 @@ $translations = array(
|
||||
'ON DELETE' => 'Pri zmazaní',
|
||||
'ON UPDATE' => 'Pri aktualizácii',
|
||||
'Index Type' => 'Typ indexu',
|
||||
'Column (length)' => 'Stĺpec (dĺžka)',
|
||||
'length' => 'dĺžka',
|
||||
'View has been dropped.' => 'Pohľad bol odstránený.',
|
||||
'View has been altered.' => 'Pohľad bol zmenený.',
|
||||
'View has been created.' => 'Pohľad bol vytvorený.',
|
||||
@@ -274,8 +273,8 @@ $translations = array(
|
||||
'DB' => 'DB',
|
||||
'File must be in UTF-8 encoding.' => 'Súbor musí byť v kódovaní UTF-8.',
|
||||
'Modify' => 'Zmeniť',
|
||||
'Load more data' => 'Nahráť ďalšie dáta',
|
||||
'Loading' => 'Nahráva sa',
|
||||
'Load more data' => 'Načítať ďalšie dáta',
|
||||
'Loading' => 'Načítava sa',
|
||||
'ATTACH queries are not supported.' => 'Dotazy ATTACH nie sú podporované.',
|
||||
'Warnings' => 'Varovania',
|
||||
'%d / ' => '%d / ',
|
||||
@@ -288,7 +287,7 @@ $translations = array(
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Platnosť hlavného hesla vypršala. <a href="https://www.adminer.org/cs/extension/"%s>Implementujte</a> metodu %s, aby platilo natrvalo.',
|
||||
'The action will be performed after successful login with the same credentials.' => 'Akcia sa vykoná po úspešnom prihlásení s rovnakými prihlasovacími údajmi.',
|
||||
'Connecting to privileged ports is not allowed.' => 'Pripojenie k privilegovaným portom nie je povolené.',
|
||||
'There is a space in the input password which might be the cause.' => 'V zadanom hesle je medzera, ktorá môže byť príčinou.',
|
||||
'There is a space in the input password which might be the cause.' => 'V zadanom hesle je medzera, ktorá môže byť príčinou.',
|
||||
'If you did not send this request from Adminer then close this page.' => 'Pokiaľ ste tento požiadavok neodoslali z Adminera, zatvorte túto stránku.',
|
||||
'You can upload a big SQL file via FTP and import it from server.' => 'Veľký SQL soubor môžete nahrať pomocou FTP a importovať ho zo servera.',
|
||||
'Size' => 'Veľkosť',
|
||||
@@ -301,11 +300,4 @@ $translations = array(
|
||||
'Disable %s or enable %s or %s extensions.' => 'Zakážte %s alebo povoľte rozšírenie %s alebo %s.',
|
||||
'yes' => 'áno',
|
||||
'no' => 'nie',
|
||||
'Yes' => 'Áno',
|
||||
'No' => 'Nie',
|
||||
'Columns' => 'Stĺpce',
|
||||
'Nullable' => 'Povolené null',
|
||||
'Default' => 'Predvolené',
|
||||
'One Time Password' => 'Jednorázové heslo',
|
||||
'Invalid OTP code.' => 'Neplatný kód OTP.',
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Odjavi se',
|
||||
'Logged as: %s' => 'Prijavljen kot: %s',
|
||||
'Logout successful.' => 'Prijava uspešna.',
|
||||
'Invalid server or credentials.' => 'Neveljaven strežnik ali pravice.',
|
||||
'Invalid credentials.' => 'Neveljavne pravice.',
|
||||
'Language' => 'Jezik',
|
||||
'Invalid CSRF token. Send the form again.' => 'Neveljaven token CSRF. Pošljite formular še enkrat.',
|
||||
'No extension' => 'Brez dodatkov',
|
||||
@@ -72,7 +72,6 @@ $translations = array(
|
||||
'Data' => 'Podatki',
|
||||
|
||||
'Database' => 'Baza',
|
||||
'database' => 'baza',
|
||||
'Use' => 'Uporabi',
|
||||
'Select database' => 'Izberi bazo',
|
||||
'Invalid database.' => 'Neveljavna baza.',
|
||||
@@ -178,7 +177,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Spremeni indekse',
|
||||
'Add next' => 'Dodaj naslednjega',
|
||||
'Index Type' => 'Tip indeksa',
|
||||
'Column (length)' => 'Stolpec (dolžina)',
|
||||
'length' => 'dolžina',
|
||||
|
||||
'Foreign keys' => 'Tuji ključi',
|
||||
'Foreign key' => 'Tuj ključ',
|
||||
@@ -304,52 +303,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Tip je zavržen.',
|
||||
'Type has been created.' => 'Tip je ustvarjen.',
|
||||
'Alter type' => 'Spremeni tip',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Permanent link' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Edit all' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
'HH:MM:SS' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Одјава',
|
||||
'Logged as: %s' => 'Пријави се као: %s',
|
||||
'Logout successful.' => 'Успешна одјава.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Неважеће дозволе.',
|
||||
'Language' => 'Језик',
|
||||
'Invalid CSRF token. Send the form again.' => 'Неважећи CSRF код. Проследите поново форму.',
|
||||
'No extension' => 'Без додатака',
|
||||
@@ -73,7 +73,6 @@ $translations = array(
|
||||
'Data' => 'Податци',
|
||||
|
||||
'Database' => 'База података',
|
||||
'database' => 'база података',
|
||||
'Use' => 'Користи',
|
||||
'Select database' => 'Изаберите базу',
|
||||
'Invalid database.' => 'Неисправна база података.',
|
||||
@@ -183,7 +182,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Уреди индексе',
|
||||
'Add next' => 'Додај следећи',
|
||||
'Index Type' => 'Тип индекса',
|
||||
'Column (length)' => 'Колона (дужина)',
|
||||
'length' => 'дужина',
|
||||
|
||||
'Foreign keys' => 'Страни кључеви',
|
||||
'Foreign key' => 'Страни кључ',
|
||||
@@ -316,43 +315,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Тип је избрисан.',
|
||||
'Type has been created.' => 'тип је креиран.',
|
||||
'Alter type' => 'Уреди тип',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Да',
|
||||
'No' => 'Не',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -11,7 +11,7 @@ $translations = array(
|
||||
'Logged as: %s' => 'Inloggad som: %s',
|
||||
'Logout successful.' => 'Du är nu utloggad.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Tack för att du använder Adminer, vänligen fundera över att <a href="https://www.adminer.org/en/donation/">donera</a>.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Ogiltiga inloggningsuppgifter.',
|
||||
'There is a space in the input password which might be the cause.' => 'Det finns ett mellanslag i lösenordet, vilket kan vara anledningen.',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer tillåter inte att ansluta till en databas utan lösenord. <a href="https://www.adminer.org/en/password/"%s>Mer information</a>.',
|
||||
'Database does not support password.' => 'Databasen stödjer inte lösenord.',
|
||||
@@ -89,7 +89,6 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Databas',
|
||||
'database' => 'databas',
|
||||
'DB' => 'DB',
|
||||
'Use' => 'Använd',
|
||||
'Select database' => 'Välj databas',
|
||||
@@ -207,7 +206,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ändra index',
|
||||
'Add next' => 'Lägg till nästa',
|
||||
'Index Type' => 'Indextyp',
|
||||
'Column (length)' => 'Kolumn (längd)',
|
||||
'length' => 'längd',
|
||||
|
||||
'Foreign keys' => 'Främmande nycklar',
|
||||
'Foreign key' => 'Främmande nyckel',
|
||||
@@ -346,12 +345,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Typ har, typ, tagits bort.',
|
||||
'Type has been created.' => 'Typ har skapats.',
|
||||
'Alter type' => 'Ändra typ',
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Ja',
|
||||
'No' => 'Nej',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'நுழை',
|
||||
'Logout successful.' => 'வெற்றிகரமாய் வெளியேறியாயிற்று.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'சரியான விபரங்கள் இல்லை.',
|
||||
'Server' => 'வழங்கி (Server)',
|
||||
'Username' => 'பயனாளர் (User)',
|
||||
'Password' => 'கடவுச்சொல்',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'தகவல்தளத்தை உருவாக்கு',
|
||||
'SQL command' => 'SQL கட்டளை',
|
||||
'Logout' => 'வெளியேறு',
|
||||
'database' => 'தகவல்தளம்',
|
||||
'Use' => 'உபயோகி',
|
||||
'No tables.' => 'அட்டவணை இல்லை.',
|
||||
'select' => 'தேர்வு செய்',
|
||||
@@ -94,7 +93,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'அகவரிசை வகை (Index Type)',
|
||||
'Column (length)' => 'நெடுவரிசை (நீளம்)',
|
||||
'length' => 'நீளம்',
|
||||
'View has been dropped.' => 'தோற்றம் நீக்கப்பட்டது.',
|
||||
'View has been altered.' => 'தோற்றம் மாற்றப்பட்டது.',
|
||||
'View has been created.' => 'தோற்றம் உருவாக்கப்பட்டது.',
|
||||
@@ -264,50 +263,4 @@ $translations = array(
|
||||
'Permanent link' => 'நிரந்தர இணைப்பு',
|
||||
'Edit all' => 'அனைத்தையும் தொகு',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'Ctrl+click on a value to modify it.' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
$translations = array(
|
||||
'Login' => 'เข้าสู่ระบบ',
|
||||
'Logout successful.' => 'ออกจากระบบเรียบร้อยแล้ว.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'ข้อมูลไม่ถูกต้อง.',
|
||||
'Server' => 'เซอเวอร์',
|
||||
'Username' => 'ชื่อผู้ใช้งาน',
|
||||
'Password' => 'รหัสผ่าน',
|
||||
@@ -31,7 +31,6 @@ $translations = array(
|
||||
'Create database' => 'สร้างฐานข้อมูล',
|
||||
'SQL command' => 'คำสั่ง SQL',
|
||||
'Logout' => 'ออกจากระบบ',
|
||||
'database' => 'ฐานข้อมูล',
|
||||
'Use' => 'ใช้งาน',
|
||||
'No tables.' => 'ไม่พบตาราง.',
|
||||
'select' => 'เลือก',
|
||||
@@ -96,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'ชนิดของดัชนี',
|
||||
'Column (length)' => 'คอลัมน์ (ความยาว)',
|
||||
'length' => 'ความยาว',
|
||||
'View has been dropped.' => 'วิวถูกลบแล้ว.',
|
||||
'View has been altered.' => 'วิวถูกเปลี่ยนแปลงแล้ว.',
|
||||
'View has been created.' => 'วิวถูกสร้างแล้ว.',
|
||||
@@ -265,49 +264,4 @@ $translations = array(
|
||||
'Permanent link' => 'ลิงค์ถาวร',
|
||||
'Edit all' => 'แก้ไขทั้งหมด',
|
||||
'HH:MM:SS' => 'HH:MM:SS',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Tables have been optimized.' => null,
|
||||
'Materialized view' => null,
|
||||
'Vacuum' => null,
|
||||
'Selected' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'File must be in UTF-8 encoding.' => null,
|
||||
'Modify' => null,
|
||||
'Load more data' => null,
|
||||
'Loading' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Full table scan' => null,
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array(),
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You can upload a big SQL file via FTP and import it from server.' => null,
|
||||
'Size' => null,
|
||||
'Compute' => null,
|
||||
'You are offline.' => null,
|
||||
'You have no privileges to update this table.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
'yes' => null,
|
||||
'no' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -11,7 +11,7 @@ $translations = array(
|
||||
'Logged as: %s' => '%s olarak giriş yapıldı.',
|
||||
'Logout successful.' => 'Oturum başarıyla sonlandı.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Adminer kullandığınız için teşekkür ederiz <a href="https://www.adminer.org/en/donation/">bağış yapmayı düşünün</a>.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Geçersiz kimlik bilgileri.',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => array('Çok fazla oturum açma denemesi yapıldı.', '%d Dakika sonra tekrar deneyiniz.'),
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ana şifrenin süresi doldu. Kalıcı olması için <a href="https://www.adminer.org/en/extension/"%s>%s medodunu</a> kullanın.',
|
||||
'Language' => 'Dil',
|
||||
@@ -84,7 +84,6 @@ $translations = array(
|
||||
'Data' => 'Veri',
|
||||
|
||||
'Database' => 'Veri Tabanı',
|
||||
'database' => 'veri tabanı',
|
||||
'DB' => 'DB',
|
||||
'Use' => 'Kullan',
|
||||
'Select database' => 'Veri tabanı seç',
|
||||
@@ -201,7 +200,7 @@ $translations = array(
|
||||
'Alter indexes' => 'İndeksleri değiştir',
|
||||
'Add next' => 'Bundan sonra ekle',
|
||||
'Index Type' => 'İndex Türü',
|
||||
'Column (length)' => 'Kolon (uzunluğu)',
|
||||
'length' => 'uzunluğu',
|
||||
|
||||
'Foreign keys' => 'Dış anahtarlar',
|
||||
'Foreign key' => 'Dış anahtar',
|
||||
@@ -340,19 +339,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Tür silindi.',
|
||||
'Type has been created.' => 'Tür oluşturuldu.',
|
||||
'Alter type' => 'Türü değiştir',
|
||||
|
||||
'overwrite' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Evet',
|
||||
'No' => 'Hayır',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Вийти',
|
||||
'Logged as: %s' => 'Ви увійшли як: %s',
|
||||
'Logout successful.' => 'Ви вдало вийшли з системи.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Неправильні дані входу.',
|
||||
'Language' => 'Мова',
|
||||
'Invalid CSRF token. Send the form again.' => 'Недійсний CSRF токен. Надішліть форму ще раз.',
|
||||
'No extension' => 'Нема розширень',
|
||||
@@ -73,7 +73,6 @@ $translations = array(
|
||||
'Data' => 'Дані',
|
||||
|
||||
'Database' => 'База даних',
|
||||
'database' => 'база даних',
|
||||
'Use' => 'Обрати',
|
||||
'Select database' => 'Обрати базу даних',
|
||||
'Invalid database.' => 'Погана база даних.',
|
||||
@@ -183,7 +182,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Змінити індексування',
|
||||
'Add next' => 'Додати ще',
|
||||
'Index Type' => 'Тип індексу',
|
||||
'Column (length)' => 'Стовпець (довжина)',
|
||||
'length' => 'довжина',
|
||||
|
||||
'Foreign keys' => 'Зовнішні ключі',
|
||||
'Foreign key' => 'Зовнішній ключ',
|
||||
@@ -343,16 +342,4 @@ $translations = array(
|
||||
'Saving' => 'Збереження',
|
||||
'Unknown error.' => 'Невідома помилка.',
|
||||
'Database does not support password.' => 'База даних не підтримує пароль.',
|
||||
|
||||
'Vacuum' => null,
|
||||
'%d / ' => array(),
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Так',
|
||||
'No' => 'Ні',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -10,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Thoát',
|
||||
'Logged as: %s' => 'Vào dưới tên: %s',
|
||||
'Logout successful.' => 'Đã thoát xong.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => 'Tài khoản sai.',
|
||||
'Too many unsuccessful logins, try again in %d minute(s).' => 'Bạn gõ sai tài khoản quá nhiều lần, hãy thử lại sau %d phút nữa.',
|
||||
'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Mật khẩu đã hết hạn. <a href="https://www.adminer.org/en/extension/"%s>Thử cách làm</a> để giữ cố định.',
|
||||
'Language' => 'Ngôn ngữ',
|
||||
@@ -76,7 +76,6 @@ $translations = array(
|
||||
'Data' => 'Dữ liệu',
|
||||
|
||||
'Database' => 'Cơ sở dữ liệu',
|
||||
'database' => 'cơ sở dữ liệu',
|
||||
'Use' => 'Sử dụng',
|
||||
'Select database' => 'Chọn CSDL',
|
||||
'Invalid database.' => 'CSDL sai.',
|
||||
@@ -188,7 +187,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Sửa chỉ mục',
|
||||
'Add next' => 'Thêm tiếp',
|
||||
'Index Type' => 'Loại chỉ mục',
|
||||
'Column (length)' => 'Cột (độ dài)',
|
||||
'length' => 'độ dài',
|
||||
|
||||
'Foreign keys' => 'Các khoá ngoại',
|
||||
'Foreign key' => 'Khoá ngoại',
|
||||
@@ -325,33 +324,4 @@ $translations = array(
|
||||
'Type has been dropped.' => 'Đã xoá kiểu.',
|
||||
'Type has been created.' => 'Đã tạo kiểu.',
|
||||
'Alter type' => 'Sửa kiểu dữ liệu',
|
||||
|
||||
'Drop %s?' => null,
|
||||
'Materialized view' => null,
|
||||
'overwrite' => null,
|
||||
'DB' => null,
|
||||
'ATTACH queries are not supported.' => null,
|
||||
'Warnings' => null,
|
||||
'%d / ' => array(),
|
||||
'Limit rows' => null,
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => null,
|
||||
'Default value' => null,
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => null,
|
||||
'The action will be performed after successful login with the same credentials.' => null,
|
||||
'Connecting to privileged ports is not allowed.' => null,
|
||||
'There is a space in the input password which might be the cause.' => null,
|
||||
'If you did not send this request from Adminer then close this page.' => null,
|
||||
'You are offline.' => null,
|
||||
'Saving' => null,
|
||||
'Unknown error.' => null,
|
||||
'Database does not support password.' => null,
|
||||
'Disable %s or enable %s or %s extensions.' => null,
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => 'Có',
|
||||
'No' => 'Không',
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -11,7 +11,7 @@ $translations = array(
|
||||
'Logged as: %s' => 'Xx: %s',
|
||||
'Logout successful.' => 'Xx.',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => 'Xx <a href="https://www.adminer.org/en/donation/">xx</a>.',
|
||||
'Invalid server or credentials.' => 'Xx.',
|
||||
'Invalid credentials.' => 'Xx.',
|
||||
'There is a space in the input password which might be the cause.' => 'Xx.',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Xx, <a href="https://www.adminer.org/en/password/"%s>xx</a>.',
|
||||
'Database does not support password.' => 'Xx.',
|
||||
@@ -89,7 +89,6 @@ $translations = array(
|
||||
'Data' => 'Xx',
|
||||
|
||||
'Database' => 'Xx',
|
||||
'database' => 'xx',
|
||||
'DB' => 'XX',
|
||||
'Use' => 'Xx',
|
||||
'Select database' => 'Xx',
|
||||
@@ -207,7 +206,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Xx',
|
||||
'Add next' => 'Xx',
|
||||
'Index Type' => 'Xx',
|
||||
'Column (length)' => 'Xx',
|
||||
'length' => 'xx',
|
||||
|
||||
'Foreign keys' => 'Xx',
|
||||
'Foreign key' => 'Xx',
|
||||
@@ -347,12 +346,11 @@ $translations = array(
|
||||
'Type has been created.' => 'Xx.',
|
||||
'Alter type' => 'Xx',
|
||||
|
||||
// Plugins
|
||||
'Columns' => 'Xx',
|
||||
'Nullable' => 'Xx',
|
||||
'Default' => 'Xx',
|
||||
'Yes' => 'Xx',
|
||||
'No' => 'Xx',
|
||||
'One Time Password' => 'Xx',
|
||||
'Invalid OTP code.' => 'Xx.',
|
||||
// Table check constraints
|
||||
'Checks' => 'Xx',
|
||||
'Create check' => 'Xx',
|
||||
'Alter check' => 'Xx',
|
||||
'Check has been created.' => 'Xx.',
|
||||
'Check has been altered.' => 'Xx.',
|
||||
'Check has been dropped.' => 'Xx.',
|
||||
);
|
||||
|
@@ -11,7 +11,7 @@ $translations = array(
|
||||
'Logged as: %s' => '登錄為: %s',
|
||||
'Logout successful.' => '成功登出。',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => '感謝使用Adminer,請考慮為我們<a href="https://www.adminer.org/en/donation/">捐款(英文網頁)</a>.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => '無效的憑證。',
|
||||
'There is a space in the input password which might be the cause.' => '您輸入的密碼中有一個空格,這可能是導致問題的原因。',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer預設不支援訪問沒有密碼的資料庫,<a href="https://www.adminer.org/en/password/"%s>詳情見這裡</a>.',
|
||||
'Database does not support password.' => '資料庫不支援密碼。',
|
||||
@@ -89,7 +89,6 @@ $translations = array(
|
||||
'Data' => '資料',
|
||||
|
||||
'Database' => '資料庫',
|
||||
'database' => '資料庫',
|
||||
'DB' => '資料庫',
|
||||
'Use' => '使用',
|
||||
'Select database' => '選擇資料庫',
|
||||
@@ -207,7 +206,7 @@ $translations = array(
|
||||
'Alter indexes' => '修改索引',
|
||||
'Add next' => '新增下一筆',
|
||||
'Index Type' => '索引類型',
|
||||
'Column (length)' => '欄位(長度)',
|
||||
'length' => '長度',
|
||||
|
||||
'Foreign keys' => '外來鍵',
|
||||
'Foreign key' => '外來鍵',
|
||||
@@ -346,13 +345,4 @@ $translations = array(
|
||||
'Type has been dropped.' => '已刪除類型。',
|
||||
'Type has been created.' => '已建立類型。',
|
||||
'Alter type' => '修改類型',
|
||||
|
||||
// Plugins
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -11,7 +11,7 @@ $translations = array(
|
||||
'Logged as: %s' => '登录用户:%s',
|
||||
'Logout successful.' => '成功登出。',
|
||||
'Thanks for using Adminer, consider <a href="https://www.adminer.org/en/donation/">donating</a>.' => '感谢使用Adminer,请考虑为我们<a href="https://www.adminer.org/en/donation/">捐款(英文页面)</a>.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid credentials.' => '无效凭据。',
|
||||
'There is a space in the input password which might be the cause.' => '您输入的密码中有一个空格,这可能是导致问题的原因。',
|
||||
'Adminer does not support accessing a database without a password, <a href="https://www.adminer.org/en/password/"%s>more information</a>.' => 'Adminer默认不支持访问没有密码的数据库,<a href="https://www.adminer.org/en/password/"%s>详情见这里</a>.',
|
||||
'Database does not support password.' => '数据库不支持密码。',
|
||||
@@ -89,7 +89,6 @@ $translations = array(
|
||||
'Data' => '数据',
|
||||
|
||||
'Database' => '数据库',
|
||||
'database' => '数据库',
|
||||
'DB' => '数据库',
|
||||
'Use' => '使用',
|
||||
'Select database' => '选择数据库',
|
||||
@@ -346,12 +345,4 @@ $translations = array(
|
||||
'Type has been dropped.' => '已删除类型。',
|
||||
'Type has been created.' => '已创建类型。',
|
||||
'Alter type' => '修改类型',
|
||||
|
||||
'Columns' => null,
|
||||
'Nullable' => null,
|
||||
'Default' => null,
|
||||
'Yes' => null,
|
||||
'No' => null,
|
||||
'One Time Password' => null,
|
||||
'Invalid OTP code.' => null,
|
||||
);
|
||||
|
@@ -2,15 +2,15 @@
|
||||
function adminer_object() {
|
||||
// required to run any plugin
|
||||
include_once "../plugins/plugin.php";
|
||||
|
||||
|
||||
// autoloader
|
||||
foreach (glob("../plugins/*.php") as $filename) {
|
||||
include_once $filename;
|
||||
}
|
||||
|
||||
|
||||
// enable extra drivers just by including them
|
||||
//~ include "../plugins/drivers/simpledb.php";
|
||||
|
||||
|
||||
$plugins = array(
|
||||
// specify enabled plugins here
|
||||
new AdminerDatabaseHide(array('information_schema')),
|
||||
@@ -32,13 +32,13 @@ function adminer_object() {
|
||||
new AdminerTablesFilter,
|
||||
new AdminerEditForeign,
|
||||
);
|
||||
|
||||
|
||||
/* It is possible to combine customization and plugins:
|
||||
class AdminerCustomization extends AdminerPlugin {
|
||||
}
|
||||
return new AdminerCustomization($plugins);
|
||||
*/
|
||||
|
||||
|
||||
return new AdminerPlugin($plugins);
|
||||
}
|
||||
|
||||
|
@@ -14,15 +14,15 @@ echo "<form action=''><p>\n";
|
||||
hidden_fields_get();
|
||||
echo "<input type='hidden' name='db' value='" . h(DB) . "'>\n";
|
||||
echo ($grant ? "" : "<input type='hidden' name='grant' value=''>\n");
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table class='odds'>\n";
|
||||
echo "<thead><tr><th>" . lang('Username') . "<th>" . lang('Server') . "<th></thead>\n";
|
||||
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
echo '<tr' . odd() . '><td>' . h($row["User"]) . "<td>" . h($row["Host"]) . '<td><a href="' . h(ME . 'user=' . urlencode($row["User"]) . '&host=' . urlencode($row["Host"])) . '">' . lang('Edit') . "</a>\n";
|
||||
echo '<tr><td>' . h($row["User"]) . "<td>" . h($row["Host"]) . '<td><a href="' . h(ME . 'user=' . urlencode($row["User"]) . '&host=' . urlencode($row["Host"])) . '">' . lang('Edit') . "</a>\n";
|
||||
}
|
||||
|
||||
if (!$grant || DB != "") {
|
||||
echo "<tr" . odd() . "><td><input name='user' autocapitalize='off'><td><input name='host' value='localhost' autocapitalize='off'><td><input type='submit' value='" . lang('Edit') . "'>\n";
|
||||
echo "<tr><td><input name='user' autocapitalize='off'><td><input name='host' value='localhost' autocapitalize='off'><td><input type='submit' value='" . lang('Edit') . "'>\n";
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
|
@@ -39,7 +39,7 @@ $routine_languages = routine_languages();
|
||||
<?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) . "\n" : ""); ?>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<div class="scrollable">
|
||||
<table cellspacing="0" class="nowrap">
|
||||
<table class="nowrap">
|
||||
<?php
|
||||
edit_fields($row["fields"], $collations, $routine);
|
||||
if (isset($_GET["function"])) {
|
||||
|
@@ -16,7 +16,7 @@ page_header(lang('Process list'), $error);
|
||||
|
||||
<form action="" method="post">
|
||||
<div class="scrollable">
|
||||
<table cellspacing="0" class="nowrap checkable">
|
||||
<table class="nowrap checkable odds">
|
||||
<?php
|
||||
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
|
||||
// HTML valid because there is always at least one process
|
||||
@@ -34,7 +34,7 @@ foreach (process_list() as $i => $row) {
|
||||
}
|
||||
echo "</thead>\n";
|
||||
}
|
||||
echo "<tr" . odd() . ">" . (support("kill") ? "<td>" . checkbox("kill[]", $row[$jush == "sql" ? "Id" : "pid"], 0) : "");
|
||||
echo "<tr>" . (support("kill") ? "<td>" . checkbox("kill[]", $row[$jush == "sql" ? "Id" : "pid"], 0) : "");
|
||||
foreach ($row as $key => $val) {
|
||||
echo "<td>" . (
|
||||
($jush == "sql" && $key == "Info" && preg_match("~Query|Killed~", $row["Command"]) && $val != "") ||
|
||||
|
@@ -61,12 +61,12 @@ foreach ($schema as $name => $table) {
|
||||
echo "<div class='table' style='top: " . $table["pos"][0] . "em; left: " . $table["pos"][1] . "em;'>";
|
||||
echo '<a href="' . h(ME) . 'table=' . urlencode($name) . '"><b>' . h($name) . "</b></a>";
|
||||
echo script("qsl('div').onmousedown = schemaMousedown;");
|
||||
|
||||
|
||||
foreach ($table["fields"] as $field) {
|
||||
$val = '<span' . type_class($field["type"]) . ' title="' . h($field["full_type"] . ($field["null"] ? " NULL" : '')) . '">' . h($field["field"]) . '</span>';
|
||||
echo "<br>" . ($field["primary"] ? "<i>$val</i>" : $val);
|
||||
}
|
||||
|
||||
|
||||
foreach ((array) $table["references"] as $target_name => $refs) {
|
||||
foreach ($refs as $left => $ref) {
|
||||
$left1 = $left - $table_pos[$name][1];
|
||||
@@ -76,7 +76,7 @@ foreach ($schema as $name => $table) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
foreach ((array) $referenced[$name] as $target_name => $refs) {
|
||||
foreach ($refs as $left => $columns) {
|
||||
$left1 = $left - $table_pos[$name][1];
|
||||
@@ -86,7 +86,7 @@ foreach ($schema as $name => $table) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "\n</div>\n";
|
||||
}
|
||||
|
||||
|
@@ -26,8 +26,7 @@ if (!$row) {
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<p><input name="name" id="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||
<?php echo script("focus(qs('#name'));"); ?>
|
||||
<p><input name="name" autofocus value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php
|
||||
if ($_GET["ns"] != "") {
|
||||
|
@@ -9,8 +9,6 @@ parse_str($_COOKIE["adminer_import"], $adminer_import);
|
||||
|
||||
$rights = array(); // privilege => 0
|
||||
$columns = array(); // selectable columns
|
||||
$search_columns = array(); // searchable columns
|
||||
$order_columns = array(); // searchable columns
|
||||
$text_length = null;
|
||||
foreach ($fields as $key => $field) {
|
||||
$name = $adminer->fieldName($field);
|
||||
@@ -20,12 +18,6 @@ foreach ($fields as $key => $field) {
|
||||
$text_length = $adminer->selectLengthProcess();
|
||||
}
|
||||
}
|
||||
if (isset($field["privileges"]["where"]) && $name != "") {
|
||||
$search_columns[$key] = html_entity_decode(strip_tags($name), ENT_QUOTES);
|
||||
}
|
||||
if (isset($field["privileges"]["order"]) && $name != "") {
|
||||
$order_columns[$key] = html_entity_decode(strip_tags($name), ENT_QUOTES);
|
||||
}
|
||||
$rights += $field["privileges"];
|
||||
}
|
||||
|
||||
@@ -232,7 +224,7 @@ if (is_ajax()) {
|
||||
|
||||
$set = null;
|
||||
if (isset($rights["insert"]) || !support("table")) {
|
||||
$params = [];
|
||||
$params = array();
|
||||
foreach ((array) $_GET["where"] as $val) {
|
||||
if (isset($foreign_keys[$val["col"]]) && count($foreign_keys[$val["col"]]) == 1
|
||||
&& ($val["op"] == "=" || (!$val["op"] && (is_array($val["val"]) || !preg_match('~[_%]~', $val["val"]))) // LIKE in Editor
|
||||
@@ -255,8 +247,8 @@ if (!$columns && support("table")) {
|
||||
echo '<input type="hidden" name="select" value="' . h($TABLE) . '">';
|
||||
echo "</div>\n";
|
||||
$adminer->selectColumnsPrint($select, $columns);
|
||||
$adminer->selectSearchPrint($where, $search_columns, $indexes);
|
||||
$adminer->selectOrderPrint($order, $order_columns, $indexes);
|
||||
$adminer->selectSearchPrint($where, $columns, $indexes);
|
||||
$adminer->selectOrderPrint($order, $columns, $indexes);
|
||||
$adminer->selectLimitPrint($limit);
|
||||
$adminer->selectLengthPrint($text_length);
|
||||
$adminer->selectActionPrint($indexes);
|
||||
@@ -320,7 +312,7 @@ if (!$columns && support("table")) {
|
||||
$backward_keys = $adminer->backwardKeys($TABLE, $table_name);
|
||||
|
||||
echo "<div class='scrollable'>";
|
||||
echo "<table id='table' cellspacing='0' class='nowrap checkable'>";
|
||||
echo "<table id='table' class='nowrap checkable odds'>";
|
||||
echo script("mixin(qs('#table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true), onkeydown: editingKeydown});");
|
||||
echo "<thead><tr>" . (!$group && $select
|
||||
? ""
|
||||
@@ -334,27 +326,19 @@ if (!$columns && support("table")) {
|
||||
if (!isset($unselected[$key])) {
|
||||
$val = $_GET["columns"][key($select)];
|
||||
$field = $fields[$select ? ($val ? $val["col"] : current($select)) : $key];
|
||||
$name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : $key));
|
||||
$name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : h($key)));
|
||||
if ($name != "") {
|
||||
$rank++;
|
||||
$names[$key] = $name;
|
||||
$column = idf_escape($key);
|
||||
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
|
||||
$desc = "&desc%5B0%5D=1";
|
||||
$sortable = isset($field["privileges"]["order"]);
|
||||
echo "<th id='th[" . h(bracket_escape($key)) . "]'>" . script("mixin(qsl('th'), {onmouseover: partial(columnMouse), onmouseout: partial(columnMouse, ' hidden')});", "");
|
||||
if ($sortable) {
|
||||
echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
|
||||
}
|
||||
echo apply_sql_function($val["fun"], $name); //! columns looking like functions
|
||||
if ($sortable) {
|
||||
echo "</a>";
|
||||
}
|
||||
echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
|
||||
echo apply_sql_function($val["fun"], $name) . "</a>"; //! columns looking like functions
|
||||
echo "<span class='column hidden'>";
|
||||
if ($sortable) {
|
||||
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
||||
}
|
||||
if (!$val["fun"] && isset($field["privileges"]["where"])) {
|
||||
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
||||
if (!$val["fun"]) {
|
||||
echo '<a href="#fieldset-search" title="' . lang('Search') . '" class="text jsonly"> =</a>';
|
||||
echo script("qsl('a').onclick = partial(selectSearch, '" . js_escape($key) . "');");
|
||||
}
|
||||
@@ -377,9 +361,6 @@ if (!$columns && support("table")) {
|
||||
echo ($backward_keys ? "<th>" . lang('Relations') : "") . "</thead>\n";
|
||||
|
||||
if (is_ajax()) {
|
||||
if ($limit % 2 == 1 && $page % 2 == 1) {
|
||||
odd();
|
||||
}
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
@@ -402,7 +383,7 @@ if (!$columns && support("table")) {
|
||||
}
|
||||
$unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val === false ? "f" : $val) : "null%5B%5D=" . urlencode($key));
|
||||
}
|
||||
echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>"
|
||||
echo "<tr>" . (!$group && $select ? "" : "<td>"
|
||||
. checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]))
|
||||
. ($is_group || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "' class='edit'>" . lang('edit') . "</a>")
|
||||
);
|
||||
@@ -545,7 +526,9 @@ if (!$columns && support("table")) {
|
||||
echo "<fieldset>";
|
||||
echo "<legend>" . lang('Whole result') . "</legend>";
|
||||
$display_rows = ($exact_count ? "" : "~ ") . $found_rows;
|
||||
echo checkbox("all", 1, 0, ($found_rows !== false ? ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) : ""), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n";
|
||||
echo checkbox("all", 1, 0, ($found_rows !== false ? ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) : ""),
|
||||
"var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);"
|
||||
) . "\n";
|
||||
echo "</fieldset>\n";
|
||||
|
||||
if ($adminer->selectCommandPrint()) {
|
||||
@@ -570,9 +553,9 @@ if (!$columns && support("table")) {
|
||||
}
|
||||
if ($format) {
|
||||
print_fieldset("export", lang('Export') . " <span id='selected2'></span>");
|
||||
echo html_select("format", $format, $adminer_import["format"]);
|
||||
$output = $adminer->dumpOutput();
|
||||
echo ($output ? " " . html_select("output", $output, $adminer_import["output"]) : "");
|
||||
echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
|
||||
echo html_select("format", $format, $adminer_import["format"]);
|
||||
echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
}
|
||||
@@ -588,7 +571,7 @@ if (!$columns && support("table")) {
|
||||
echo script("qsl('a').onclick = partial(toggle, 'import');", "");
|
||||
echo "<span id='import' class='hidden'>: ";
|
||||
echo "<input type='file' name='csv_file'> ";
|
||||
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"]);
|
||||
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"], 1); // 1 - select
|
||||
echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
|
||||
echo "</span>";
|
||||
echo "</div>";
|
||||
|
@@ -21,18 +21,12 @@ if (!$error && $_POST) {
|
||||
if (!isset($_GET["import"])) {
|
||||
$query = $_POST["query"];
|
||||
} elseif ($_POST["webfile"]) {
|
||||
$import_file_path = $adminer->importServerPath();
|
||||
if (!$import_file_path) {
|
||||
$fp = false;
|
||||
} elseif (file_exists($import_file_path)) {
|
||||
$fp = fopen($import_file_path, "rb");
|
||||
} elseif (file_exists("$import_file_path.gz")) {
|
||||
$fp = fopen("compress.zlib://$import_file_path.gz", "rb");
|
||||
} else {
|
||||
$fp = false;
|
||||
}
|
||||
|
||||
$query = $fp ? fread($fp, 1e6) : false;
|
||||
$sql_file_path = $adminer->importServerPath();
|
||||
$fp = @fopen((file_exists($sql_file_path)
|
||||
? $sql_file_path
|
||||
: "compress.zlib://$sql_file_path.gz"
|
||||
), "rb");
|
||||
$query = ($fp ? fread($fp, 1e6) : false);
|
||||
} else {
|
||||
$query = get_file("sql_file", true);
|
||||
}
|
||||
@@ -89,25 +83,19 @@ if (!$error && $_POST) {
|
||||
if ($found && rtrim($found) != $delimiter) { // find matching quote or comment end
|
||||
$c_style_escapes = is_c_style_escapes() || ($jush == "pgsql" && ($pos > 0 && strtolower($query[$pos - 1]) == "e"));
|
||||
|
||||
$pattern = '(';
|
||||
if ($found == '/*') {
|
||||
$pattern .= '\*/';
|
||||
} elseif ($found == '[') {
|
||||
$pattern .= ']';
|
||||
} elseif (preg_match('~^-- |^#~', $found)) {
|
||||
$pattern .= "\n";
|
||||
} else {
|
||||
$pattern .= preg_quote($found) . ($c_style_escapes ? "|\\\\." : "");
|
||||
}
|
||||
$pattern .= '|$)s';
|
||||
$pattern = ($found == '/*' ? '\*/'
|
||||
: ($found == '[' ? ']'
|
||||
: (preg_match('~^-- |^#~', $found) ? "\n"
|
||||
: preg_quote($found) . ($c_style_escapes ? "|\\\\." : "")
|
||||
)));
|
||||
|
||||
while (preg_match($pattern, $query, $match, PREG_OFFSET_CAPTURE, $offset)) {
|
||||
while (preg_match("($pattern|\$)s", $query, $match, PREG_OFFSET_CAPTURE, $offset)) {
|
||||
$s = $match[0][0];
|
||||
if (!$s && $fp && !feof($fp)) {
|
||||
$query .= fread($fp, 1e5);
|
||||
} else {
|
||||
$offset = $match[0][1] + strlen($s);
|
||||
if (!isset($s[0]) || $s[0] != "\\") {
|
||||
if (!$s || $s[0] != "\\") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -143,7 +131,7 @@ if (!$error && $_POST) {
|
||||
|
||||
if ($connection->error) {
|
||||
echo ($_POST["only_errors"] ? $print : "");
|
||||
echo "<p class='error'>" . lang('Error in query') . (!empty($connection->errno) ? " ($connection->errno)" : "") . ": " . error() . "\n";
|
||||
echo "<p class='error'>" . lang('Error in query') . ($connection->errno ? " ($connection->errno)" : "") . ": " . error() . "\n";
|
||||
$errors[] = " <a href='#sql-$commands'>$commands</a>";
|
||||
if ($_POST["error_stops"]) {
|
||||
break 2;
|
||||
@@ -153,7 +141,7 @@ if (!$error && $_POST) {
|
||||
$time = " <span class='time'>(" . format_time($start) . ")</span>"
|
||||
. (strlen($q) < 1000 ? " <a href='" . h(ME) . "sql=" . urlencode(trim($q)) . "'>" . lang('Edit') . "</a>" : "") // 1000 - maximum length of encoded URL in IE is 2083 characters
|
||||
;
|
||||
$affected = $connection->affected_rows; // getting warnigns overwrites this
|
||||
$affected = $connection->affected_rows; // getting warnings overwrites this
|
||||
$warnings = ($_POST["only_errors"] ? "" : $driver->warnings());
|
||||
$warnings_id = "warnings-$commands";
|
||||
if ($warnings) {
|
||||
@@ -189,13 +177,12 @@ if (!$error && $_POST) {
|
||||
stop_session();
|
||||
}
|
||||
if (!$_POST["only_errors"]) {
|
||||
$title = isset($connection->info) ? "title='" . h($connection->info) . "'" : "";
|
||||
echo "<p class='message' $title>" . lang('Query executed OK, %d row(s) affected.', $affected) . "$time\n";
|
||||
echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $affected) . "$time\n";
|
||||
}
|
||||
}
|
||||
echo ($warnings ? "<div id='$warnings_id' class='hidden'>\n$warnings</div>\n" : "");
|
||||
if ($explain) {
|
||||
echo "<div id='$explain_id' class='hidden'>\n";
|
||||
echo "<div id='$explain_id' class='hidden explain'>\n";
|
||||
select($explain, $connection2, $orgtables);
|
||||
echo "</div>\n";
|
||||
}
|
||||
@@ -255,10 +242,10 @@ if (!isset($_GET["import"])) {
|
||||
: lang('File uploads are disabled.')
|
||||
);
|
||||
echo "</div></fieldset>\n";
|
||||
$import_file_path = $adminer->importServerPath();
|
||||
if ($import_file_path) {
|
||||
$importServerPath = $adminer->importServerPath();
|
||||
if ($importServerPath) {
|
||||
echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
|
||||
echo lang('Webserver file %s', "<code>" . h($import_file_path) . "$gz</code>");
|
||||
echo lang('Webserver file %s', "<code>" . h($importServerPath) . "$gz</code>");
|
||||
echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
|
||||
echo "</div></fieldset>\n";
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/** @author Ondrej Valka, http://valka.info */
|
||||
body { color: #000; background: #fff; font: 90%/1.25 Verdana, Arial, Helvetica, sans-serif; margin: 0; width: -moz-fit-content; width: fit-content; }
|
||||
body { color: #000; background: #fff; font: 90%/1.25 Verdana, Arial, Helvetica, sans-serif; margin: 0; min-width: fit-content; }
|
||||
a { color: blue; text-decoration: none; }
|
||||
a:visited { color: navy; }
|
||||
a:link:hover, a:visited:hover { color: red; text-decoration: underline; }
|
||||
@@ -19,11 +19,10 @@ fieldset { display: inline; vertical-align: top; padding: .5em .8em; margin: .8e
|
||||
p { margin: .8em 20px 0 0; }
|
||||
img { vertical-align: middle; border: 0; }
|
||||
td img { max-width: 200px; max-height: 200px; }
|
||||
code { background: #eee; }
|
||||
tbody tr:hover td, tbody tr:hover th { background: #eee; }
|
||||
code { font-size: 110%; padding: 1px 2px; background: #eee; }
|
||||
pre { margin: 1em 0 0; }
|
||||
pre code { display: block; font-size: 100%; }
|
||||
pre, textarea { font: 110%/1.25 monospace; }
|
||||
pre, textarea { font: 100%/1.25 monospace; }
|
||||
pre.jush { background: #fff; }
|
||||
input, textarea { box-sizing: border-box; }
|
||||
input, select { vertical-align: middle; }
|
||||
@@ -31,9 +30,8 @@ input.default { box-shadow: 1px 1px 1px #777; }
|
||||
input.required { box-shadow: 1px 1px 1px red; }
|
||||
input.maxlength { box-shadow: 1px 1px 1px red; }
|
||||
input.wayoff { left: -1000px; position: absolute; }
|
||||
.center { text-align: center; }
|
||||
.block { display: block; }
|
||||
.version { color: #777; font-size: 67%; }
|
||||
.version { color: #777; font-size: 62%; }
|
||||
.js .hidden, .nojs .jsonly { display: none; }
|
||||
.js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; }
|
||||
.nowrap td, .nowrap th, td.nowrap, p.nowrap { white-space: pre; }
|
||||
@@ -47,7 +45,7 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||
.date { color: #7F007F; }
|
||||
.enum { color: #007F7F; }
|
||||
.binary { color: red; }
|
||||
.odd td { background: #F5F5F5; }
|
||||
.odds tbody tr:nth-child(2n) td { background: #F5F5F5; }
|
||||
.js .checkable .checked td, .js .checkable .checked th { background: #ddf; }
|
||||
.time { color: silver; font-size: 70%; }
|
||||
.function { text-align: right; }
|
||||
@@ -58,9 +56,10 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||
.view { font-style: italic; }
|
||||
.active { font-weight: bold; }
|
||||
.sqlarea { width: 98%; }
|
||||
.explain { white-space: pre; }
|
||||
.icon { width: 18px; height: 18px; background-color: navy; }
|
||||
.icon:hover { background-color: red; }
|
||||
.size { width: 6ex; }
|
||||
.size { width: 7ex; }
|
||||
.help { cursor: help; }
|
||||
.footer { position: sticky; bottom: 0; margin-right: -20px; border-top: 20px solid rgba(255, 255, 255, .7); border-image: linear-gradient(rgba(255, 255, 255, .2), #fff) 100% 0; }
|
||||
.footer > div { background: #fff; padding: 0 0 .5em; }
|
||||
@@ -69,18 +68,18 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
|
||||
.loadmore { margin-left: 1ex; }
|
||||
/* .edit used in designs */
|
||||
#menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; }
|
||||
#menu { position: absolute; margin: 10px 0 0; top: 2em; left: 0; width: 19em; }
|
||||
#menu p, #logins, #tables { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
|
||||
#logins li, #tables li { list-style: none; }
|
||||
#dbs { overflow: hidden; }
|
||||
#logins, #tables { white-space: nowrap; overflow: hidden; }
|
||||
#logins a, #tables a, #tables span { background: #fff; }
|
||||
#content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
|
||||
#lang { position: absolute; top: 0; left: 0; line-height: 1.8em; padding: .3em 1em; }
|
||||
#lang { position: absolute; top: -2.6em; left: 0; padding: .3em 1em; }
|
||||
#breadcrumb { white-space: nowrap; position: absolute; top: 0; left: 21em; background: #eee; height: 2em; line-height: 1.8em; padding: 0 1em; margin: 0 0 0 -18px; }
|
||||
#h1 { color: #777; text-decoration: none; font-style: italic; }
|
||||
#version { font-size: 67%; color: red; }
|
||||
#schema { margin-left: 60px; position: relative; -moz-user-select: none; -webkit-user-select: none; }
|
||||
#version { color: red; }
|
||||
#schema { margin-left: 60px; position: relative; user-select: none; -webkit-user-select: none; }
|
||||
#schema .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
|
||||
#schema .references { position: absolute; }
|
||||
#help { position: absolute; border: 1px solid #999; background: #eee; padding: 5px; font-family: monospace; z-index: 1; }
|
||||
@@ -93,12 +92,14 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||
.rtl .pages { left: auto; right: 21em; }
|
||||
.rtl input.wayoff { left: auto; right: -1000px; }
|
||||
.rtl #lang, .rtl #menu { left: auto; right: 0; }
|
||||
.rtl pre, .rtl code { direction: ltr; }
|
||||
|
||||
@media all and (max-width: 880px) {
|
||||
.pages { left: auto; }
|
||||
.logout { position: static; padding: 0 1em 1em; }
|
||||
#menu { position: static; width: auto; }
|
||||
#content { margin-left: 10px; }
|
||||
#lang { position: static; border-top: 1px solid #999; }
|
||||
#lang { position: static; }
|
||||
#breadcrumb { left: auto; }
|
||||
.rtl .pages { right: auto; }
|
||||
.rtl #content { margin-right: 10px; }
|
||||
|
@@ -16,17 +16,22 @@ function bodyLoad(version, maria) {
|
||||
if (maria) {
|
||||
for (var i = 1; i < obj.length; i++) {
|
||||
obj[i] = obj[i]
|
||||
.replace(/\.html/, '/')
|
||||
.replace(/-type-syntax/, '-data-types')
|
||||
.replace('.html', '/')
|
||||
.replace('-type-syntax', '-data-types')
|
||||
.replace(/numeric-(data-types)/, '$1-$&')
|
||||
.replace(/#statvar_.*/, '#$$1')
|
||||
.replace(/replication-options-(master|binary-log)\//, 'replication-and-binary-log-system-variables/')
|
||||
.replace('server-options/', 'server-system-variables/')
|
||||
.replace('innodb-parameters/', 'innodb-system-variables/')
|
||||
.replace(/#(statvar|sysvar|option_mysqld)_(.*)/, '#$2')
|
||||
.replace(/#sysvar_(.*)/, '#$1')
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
obj[key] = (maria ? obj[key].replace(/dev\.mysql\.com\/doc\/mysql\/en\//, 'mariadb.com/kb/en/library/') : obj[key]) // MariaDB
|
||||
.replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
|
||||
.replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
|
||||
|
||||
obj[key] = (maria ? obj[key].replace('dev.mysql.com/doc/mysql', 'mariadb.com/kb') : obj[key]) // MariaDB
|
||||
.replace('/doc/mysql', '/doc/refman/' + version) // MySQL
|
||||
.replace('/docs/current', '/docs/' + version) // PostgreSQL
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -54,7 +59,7 @@ function bodyLoad(version, maria) {
|
||||
function formField(form, name) {
|
||||
// required in IE < 8, form.elements[name] doesn't work
|
||||
for (var i=0; i < form.length; i++) {
|
||||
if (form[i].name === name) {
|
||||
if (form[i].name == name) {
|
||||
return form[i];
|
||||
}
|
||||
}
|
||||
@@ -106,10 +111,12 @@ function dbMouseDown(event) {
|
||||
// Firefox: mouse-down event does not contain pressed key information for OPTION.
|
||||
// Chrome: mouse-down event has inherited key information from SELECT.
|
||||
// So we ignore the event for OPTION to work Ctrl+click correctly everywhere.
|
||||
if (event.target.tagName === "OPTION") return;
|
||||
if (event.target.tagName == "OPTION") {
|
||||
return;
|
||||
}
|
||||
|
||||
dbCtrl = isCtrl(event);
|
||||
if (dbPrevious[this.name] === undefined) {
|
||||
if (dbPrevious[this.name] == undefined) {
|
||||
dbPrevious[this.name] = this.value;
|
||||
}
|
||||
}
|
||||
@@ -123,7 +130,7 @@ function dbChange() {
|
||||
}
|
||||
this.form.submit();
|
||||
this.form.target = '';
|
||||
if (dbCtrl && dbPrevious[this.name] !== undefined) {
|
||||
if (dbCtrl && dbPrevious[this.name] != undefined) {
|
||||
this.value = dbPrevious[this.name];
|
||||
dbPrevious[this.name] = undefined;
|
||||
}
|
||||
@@ -154,7 +161,7 @@ function selectFieldChange() {
|
||||
if (match) {
|
||||
var op = selectValue(form[match[1] + 'op]']);
|
||||
var val = form[match[1] + 'val]'].value;
|
||||
if (col in indexColumns && (!/LIKE|REGEXP/.test(op) || (op === 'LIKE' && val.charAt(0) !== '%'))) {
|
||||
if (col in indexColumns && (!/LIKE|REGEXP/.test(op) || (op == 'LIKE' && val.charAt(0) != '%'))) {
|
||||
return true;
|
||||
} else if (col || val) {
|
||||
ok = false;
|
||||
@@ -166,7 +173,7 @@ function selectFieldChange() {
|
||||
}
|
||||
var val = selectValue(form[match[1] + 'col]']);
|
||||
if (val) {
|
||||
columns[col && col !== 'count' ? '' : val] = 1;
|
||||
columns[col && col != 'count' ? '' : val] = 1;
|
||||
}
|
||||
}
|
||||
if (col && /^order/.test(select.name)) {
|
||||
@@ -199,7 +206,7 @@ var added = '.', rowCount;
|
||||
* @return boolean
|
||||
*/
|
||||
function delimiterEqual(val, a, b) {
|
||||
return (val === a + '_' + b || val === a + b || val === a + b.charAt(0).toUpperCase() + b.substr(1));
|
||||
return (val == a + '_' + b || val == a + b || val == a + b.charAt(0).toUpperCase() + b.substr(1));
|
||||
}
|
||||
|
||||
/** Escape string to use as identifier
|
||||
@@ -260,7 +267,7 @@ function editingClick(event) {
|
||||
} else if (/^drop_col\[/.test(name)) {
|
||||
editingRemoveRow.call(el, 'fields\$1[field]');
|
||||
} else {
|
||||
if (name === 'auto_increment_col') {
|
||||
if (name == 'auto_increment_col') {
|
||||
var field = el.form['fields[' + el.value + '][field]'];
|
||||
if (!field.value) {
|
||||
field.value = 'id';
|
||||
@@ -295,7 +302,7 @@ function editingNameChange() {
|
||||
for (var i = opts.length; i--; ) {
|
||||
var match = /(.+)`(.+)/.exec(opts[i].value);
|
||||
if (!match) { // common type
|
||||
if (candidate && i === opts.length - 2 && val === opts[candidate].value.replace(/.+`/, '') && name === 'fields[1]') { // single target table, link to column, first field - probably `id`
|
||||
if (candidate && i == opts.length - 2 && val == opts[candidate].value.replace(/.+`/, '') && name == 'fields[1]') { // single target table, link to column, first field - probably `id`
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@@ -305,7 +312,7 @@ function editingNameChange() {
|
||||
var tables = [ table, table.replace(/s$/, ''), table.replace(/es$/, '') ];
|
||||
for (var j=0; j < tables.length; j++) {
|
||||
table = tables[j];
|
||||
if (val === column || val === table || delimiterEqual(val, table, column) || delimiterEqual(val, column, table)) {
|
||||
if (val == column || val == table || delimiterEqual(val, table, column) || delimiterEqual(val, column, table)) {
|
||||
if (candidate) {
|
||||
return;
|
||||
}
|
||||
@@ -340,7 +347,7 @@ function editingAddRow(focus) {
|
||||
tags2 = qsa('input', row2);
|
||||
var input = tags2[0]; // IE loose tags2 after insertBefore()
|
||||
for (var i=0; i < tags.length; i++) {
|
||||
if (tags[i].name === 'auto_increment_col') {
|
||||
if (tags[i].name == 'auto_increment_col') {
|
||||
tags2[i].value = x;
|
||||
tags2[i].checked = false;
|
||||
}
|
||||
@@ -402,7 +409,7 @@ function editingTypeChange() {
|
||||
var text = selectValue(type);
|
||||
for (var i=0; i < type.form.elements.length; i++) {
|
||||
var el = type.form.elements[i];
|
||||
if (el.name === name + '[length]') {
|
||||
if (el.name == name + '[length]') {
|
||||
if (!(
|
||||
(/(char|binary)$/.test(lastType) && /(char|binary)$/.test(text))
|
||||
|| (/(enum|set)$/.test(lastType) && /(enum|set)$/.test(text))
|
||||
@@ -411,19 +418,19 @@ function editingTypeChange() {
|
||||
}
|
||||
el.oninput.apply(el);
|
||||
}
|
||||
if (lastType === 'timestamp' && el.name == name + '[has_default]' && /timestamp/i.test(formField(type.form, name + '[default]').value)) {
|
||||
if (lastType == 'timestamp' && el.name == name + '[has_default]' && /timestamp/i.test(formField(type.form, name + '[default]').value)) {
|
||||
el.checked = false;
|
||||
}
|
||||
if (el.name === name + '[collation]') {
|
||||
if (el.name == name + '[collation]') {
|
||||
alterClass(el, 'hidden', !/(char|text|enum|set)$/.test(text));
|
||||
}
|
||||
if (el.name === name + '[unsigned]') {
|
||||
if (el.name == name + '[unsigned]') {
|
||||
alterClass(el, 'hidden', !/(^|[^o])int(?!er)|numeric|real|float|double|decimal|money/.test(text));
|
||||
}
|
||||
if (el.name === name + '[on_update]') {
|
||||
if (el.name == name + '[on_update]') {
|
||||
alterClass(el, 'hidden', !/timestamp|datetime/.test(text)); // MySQL supports datetime since 5.6.5
|
||||
}
|
||||
if (el.name === name + '[on_delete]') {
|
||||
if (el.name == name + '[on_delete]') {
|
||||
alterClass(el, 'hidden', !/`/.test(text));
|
||||
}
|
||||
}
|
||||
@@ -462,13 +469,13 @@ function enumValues(s) {
|
||||
var offset = 0;
|
||||
var match;
|
||||
while (match = re.exec(s)) {
|
||||
if (offset !== match.index) {
|
||||
if (offset != match.index) {
|
||||
break;
|
||||
}
|
||||
result.push(match[2].replace(/'(')|\\(.)/g, '$1$2'));
|
||||
offset += match[0].length;
|
||||
}
|
||||
return (offset === s.length ? result.join('\n') : s);
|
||||
return (offset == s.length ? result.join('\n') : s);
|
||||
}
|
||||
|
||||
/** Finish editing of enum or set
|
||||
@@ -493,6 +500,16 @@ function columnShow(checked, column) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Show or hide index column options
|
||||
* @param boolean
|
||||
*/
|
||||
function indexOptionsShow(checked) {
|
||||
var options = qsa('.idxopts');
|
||||
for (var i=0; i < options.length; i++) {
|
||||
alterClass(options[i], 'hidden', !checked);
|
||||
}
|
||||
}
|
||||
|
||||
/** Display partition options
|
||||
* @this HTMLSelectElement
|
||||
*/
|
||||
@@ -554,7 +571,7 @@ function foreignAddRow() {
|
||||
this.onchange = function () { };
|
||||
var selects = qsa('select', row);
|
||||
for (var i=0; i < selects.length; i++) {
|
||||
selects[i].name = selects[i].name.replace(']', '1]');
|
||||
selects[i].name = selects[i].name.replace(/\d+]/, '1$&');
|
||||
selects[i].selectedIndex = 0;
|
||||
}
|
||||
parentTag(this, 'table').appendChild(row);
|
||||
@@ -609,7 +626,7 @@ function indexesAddColumn(prefix) {
|
||||
var field = this;
|
||||
var select = field.form[field.name.replace(/].*/, '][type]')];
|
||||
if (!select.selectedIndex) {
|
||||
while (selectValue(select) !== "INDEX" && select.selectedIndex < select.options.length) {
|
||||
while (selectValue(select) != "INDEX" && select.selectedIndex < select.options.length) {
|
||||
select.selectedIndex++;
|
||||
}
|
||||
select.onchange();
|
||||
@@ -626,7 +643,7 @@ function indexesAddColumn(prefix) {
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
input.name = input.name.replace(/]\[\d+/, '$&1');
|
||||
if (input.type !== 'checkbox') {
|
||||
if (input.type != 'checkbox') {
|
||||
input.value = '';
|
||||
}
|
||||
}
|
||||
@@ -675,7 +692,7 @@ var that, x, y; // em and tablePos defined in schema.inc.php
|
||||
* @this HTMLElement
|
||||
*/
|
||||
function schemaMousedown(event) {
|
||||
if ((event.which ? event.which : event.button) === 1) {
|
||||
if ((event.which ? event.which : event.button) == 1) {
|
||||
that = this;
|
||||
x = event.clientX - this.offsetLeft;
|
||||
y = event.clientY - this.offsetTop;
|
||||
@@ -692,12 +709,12 @@ function schemaMousemove(event) {
|
||||
var divs = qsa('div', that);
|
||||
var lineSet = { };
|
||||
for (var i=0; i < divs.length; i++) {
|
||||
if (divs[i].className === 'references') {
|
||||
if (divs[i].className == 'references') {
|
||||
var div2 = qs('[id="' + (/^refs/.test(divs[i].id) ? 'refd' : 'refs') + divs[i].id.substr(4) + '"]');
|
||||
var ref = (tablePos[divs[i].title] ? tablePos[divs[i].title] : [ div2.parentNode.offsetTop / em, 0 ]);
|
||||
var left1 = -1;
|
||||
var id = divs[i].id.replace(/^ref.(.+)-.+/, '$1');
|
||||
if (divs[i].parentNode !== div2.parentNode) {
|
||||
if (divs[i].parentNode != div2.parentNode) {
|
||||
left1 = Math.min(0, ref[1] - left) - 1;
|
||||
divs[i].style.left = left1 + 'em';
|
||||
divs[i].querySelector('div').style.width = -left1 + 'em';
|
||||
@@ -709,7 +726,7 @@ function schemaMousemove(event) {
|
||||
var line = qs('[id="' + divs[i].id.replace(/^....(.+)-.+$/, 'refl$1') + '"]');
|
||||
var top1 = top + divs[i].offsetTop / em;
|
||||
var top2 = top + div2.offsetTop / em;
|
||||
if (divs[i].parentNode !== div2.parentNode) {
|
||||
if (divs[i].parentNode != div2.parentNode) {
|
||||
top2 += ref[0] - top;
|
||||
line.querySelector('div').style.height = Math.abs(top1 - top2) + 'em';
|
||||
}
|
||||
@@ -757,7 +774,7 @@ function helpMouseover(event, text, side) {
|
||||
var target = getTarget(event);
|
||||
if (!text) {
|
||||
helpClose();
|
||||
} else if (window.jush && (!helpIgnore || this !== target)) {
|
||||
} else if (window.jush && (!helpIgnore || this != target)) {
|
||||
helpOpen = 1;
|
||||
var help = qs('#help');
|
||||
help.innerHTML = text;
|
||||
@@ -776,7 +793,7 @@ function helpMouseover(event, text, side) {
|
||||
*/
|
||||
function helpMouseout(event) {
|
||||
helpOpen = 0;
|
||||
helpIgnore = (this !== getTarget(event));
|
||||
helpIgnore = (this != getTarget(event));
|
||||
setTimeout(function () {
|
||||
if (!helpOpen) {
|
||||
helpClose();
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* @param [HTMLElement] defaults to document
|
||||
* @return HTMLElement
|
||||
*/
|
||||
function qs(selector, context = null) {
|
||||
function qs(selector, context) {
|
||||
return (context || document).querySelector(selector);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ function qs(selector, context = null) {
|
||||
* @param [HTMLElement] defaults to document
|
||||
* @return HTMLElement
|
||||
*/
|
||||
function qsl(selector, context = null) {
|
||||
function qsl(selector, context) {
|
||||
var els = qsa(selector, context);
|
||||
return els[els.length - 1];
|
||||
}
|
||||
@@ -23,7 +23,7 @@ function qsl(selector, context = null) {
|
||||
* @param [HTMLElement] defaults to document
|
||||
* @return NodeList
|
||||
*/
|
||||
function qsa(selector, context = null) {
|
||||
function qsa(selector, context) {
|
||||
return (context || document).querySelectorAll(selector);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ function alterClass(el, className, enable) {
|
||||
*/
|
||||
function toggle(id) {
|
||||
var el = qs('#' + id);
|
||||
el.className = (el.className === 'hidden' ? '' : 'hidden');
|
||||
el.className = (el.className == 'hidden' ? '' : 'hidden');
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ function verifyVersion(current, url, token) {
|
||||
if (window.postMessage && window.addEventListener) {
|
||||
iframe.style.display = 'none';
|
||||
addEventListener('message', function (event) {
|
||||
if (event.origin === 'https://www.adminer.org') {
|
||||
if (event.origin == 'https://www.adminer.org') {
|
||||
var match = /version=(.+)/.exec(event.data);
|
||||
if (match) {
|
||||
cookie('adminer_version=' + match[1], 1);
|
||||
@@ -181,8 +181,8 @@ function selectCount(id, count) {
|
||||
var inputs = qsa('input', el.parentNode.parentNode);
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
if (input.type === 'submit') {
|
||||
input.disabled = (count === '0');
|
||||
if (input.type == 'submit') {
|
||||
input.disabled = (count == '0');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -211,21 +211,13 @@ function tableCheck() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Uncheck single element.
|
||||
*/
|
||||
/** Uncheck single element
|
||||
* @param string
|
||||
*/
|
||||
function formUncheck(id) {
|
||||
formUncheckAll("#" + id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Uncheck elements matched by selector.
|
||||
*/
|
||||
function formUncheckAll(selector) {
|
||||
for (const element of qsa(selector)) {
|
||||
element.checked = false;
|
||||
trCheck(element);
|
||||
}
|
||||
var el = qs('#' + id);
|
||||
el.checked = false;
|
||||
trCheck(el);
|
||||
}
|
||||
|
||||
/** Get number of checked elements matching given name
|
||||
@@ -260,7 +252,7 @@ function tableClick(event, click) {
|
||||
var el = getTarget(event);
|
||||
while (!isTag(el, 'tr')) {
|
||||
if (isTag(el, 'table|a|input|textarea')) {
|
||||
if (el.type !== 'checkbox') {
|
||||
if (el.type != 'checkbox') {
|
||||
return;
|
||||
}
|
||||
checkboxClick.call(el, event);
|
||||
@@ -276,7 +268,7 @@ function tableClick(event, click) {
|
||||
el.checked = !el.checked;
|
||||
el.onclick && el.onclick();
|
||||
}
|
||||
if (el.name === 'check[]') {
|
||||
if (el.name == 'check[]') {
|
||||
el.form['all'].checked = false;
|
||||
formUncheck('all-page');
|
||||
}
|
||||
@@ -296,7 +288,7 @@ function checkboxClick(event) {
|
||||
if (!this.name) {
|
||||
return;
|
||||
}
|
||||
if (event.shiftKey && (!lastChecked || lastChecked.name === this.name)) {
|
||||
if (event.shiftKey && (!lastChecked || lastChecked.name == this.name)) {
|
||||
var checked = (lastChecked ? lastChecked.checked : true);
|
||||
var inputs = qsa('input', parentTag(this, 'table'));
|
||||
var checking = !lastChecked;
|
||||
@@ -353,7 +345,7 @@ function nodePosition(el) {
|
||||
*/
|
||||
function pageClick(href, page) {
|
||||
if (!isNaN(page) && page) {
|
||||
location.href = href + (page !== 1 ? '&page=' + (page - 1) : '');
|
||||
location.href = href + (page != 1 ? '&page=' + (page - 1) : '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,7 +388,7 @@ function selectAddRow() {
|
||||
for (var i=0; i < inputs.length; i++) {
|
||||
inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
|
||||
inputs[i].className = '';
|
||||
if (inputs[i].type === 'checkbox') {
|
||||
if (inputs[i].type == 'checkbox') {
|
||||
inputs[i].checked = false;
|
||||
} else {
|
||||
inputs[i].value = '';
|
||||
@@ -410,7 +402,7 @@ function selectAddRow() {
|
||||
* @this HTMLInputElement
|
||||
*/
|
||||
function selectSearchKeydown(event) {
|
||||
if (event.keyCode === 13 || event.keyCode === 10) {
|
||||
if (event.keyCode == 13 || event.keyCode == 10) {
|
||||
this.onsearch = function () {
|
||||
};
|
||||
}
|
||||
@@ -453,11 +445,11 @@ function selectSearch(name) {
|
||||
for (var i=0; i < divs.length; i++) {
|
||||
var div = divs[i];
|
||||
var el = qs('[name$="[col]"]', div);
|
||||
if (el && selectValue(el) === name) {
|
||||
if (el && selectValue(el) == name) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i === divs.length) {
|
||||
if (i == divs.length) {
|
||||
div.firstChild.value = name;
|
||||
div.firstChild.onchange();
|
||||
}
|
||||
@@ -495,7 +487,7 @@ function bodyKeydown(event, button) {
|
||||
if (target.jushTextarea) {
|
||||
target = target.jushTextarea;
|
||||
}
|
||||
if (isCtrl(event) && (event.keyCode === 13 || event.keyCode === 10) && isTag(target, 'select|textarea|input')) { // 13|10 - Enter
|
||||
if (isCtrl(event) && (event.keyCode == 13 || event.keyCode == 10) && isTag(target, 'select|textarea|input')) { // 13|10 - Enter
|
||||
target.blur();
|
||||
if (button) {
|
||||
target.form[button].click();
|
||||
@@ -516,7 +508,7 @@ function bodyKeydown(event, button) {
|
||||
*/
|
||||
function bodyClick(event) {
|
||||
var target = getTarget(event);
|
||||
if ((isCtrl(event) || event.shiftKey) && target.type === 'submit' && isTag(target, 'input')) {
|
||||
if ((isCtrl(event) || event.shiftKey) && target.type == 'submit' && isTag(target, 'input')) {
|
||||
target.form.target = '_blank';
|
||||
setTimeout(function () {
|
||||
// if (isCtrl(event)) { focus(); } doesn't work
|
||||
@@ -532,9 +524,9 @@ function bodyClick(event) {
|
||||
* @return boolean
|
||||
*/
|
||||
function editingKeydown(event) {
|
||||
if ((event.keyCode === 40 || event.keyCode === 38) && isCtrl(event)) { // 40 - Down, 38 - Up
|
||||
if ((event.keyCode == 40 || event.keyCode == 38) && isCtrl(event)) { // 40 - Down, 38 - Up
|
||||
var target = getTarget(event);
|
||||
var sibling = (event.keyCode === 40 ? 'nextSibling' : 'previousSibling');
|
||||
var sibling = (event.keyCode == 40 ? 'nextSibling' : 'previousSibling');
|
||||
var el = target.parentNode.parentNode[sibling];
|
||||
if (el && (isTag(el, 'tr') || (el = el[sibling])) && isTag(el, 'tr') && (el = el.childNodes[nodePosition(target.parentNode)]) && (el = el.childNodes[nodePosition(target)])) {
|
||||
el.focus();
|
||||
@@ -622,7 +614,7 @@ function ajax(url, callback, data, message) {
|
||||
}
|
||||
request.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
||||
request.onreadystatechange = function () {
|
||||
if (request.readyState === 4) {
|
||||
if (request.readyState == 4) {
|
||||
if (/^2/.test(request.status)) {
|
||||
callback(request);
|
||||
} else {
|
||||
@@ -664,7 +656,7 @@ function ajaxForm(form, message, button) {
|
||||
if (/^file$/i.test(el.type) && el.value) {
|
||||
return false;
|
||||
}
|
||||
if (!/^(checkbox|radio|submit|file)$/i.test(el.type) || el.checked || el === button) {
|
||||
if (!/^(checkbox|radio|submit|file)$/i.test(el.type) || el.checked || el == button) {
|
||||
data.push(encodeURIComponent(el.name) + '=' + encodeURIComponent(isTag(el, 'select') ? selectValue(el) : el.value));
|
||||
}
|
||||
}
|
||||
@@ -711,7 +703,7 @@ function selectClick(event, text, warning) {
|
||||
if (!event) {
|
||||
event = window.event;
|
||||
}
|
||||
if (event.keyCode === 27 && !event.shiftKey && !event.altKey && !isCtrl(event)) { // 27 - Esc
|
||||
if (event.keyCode == 27 && !event.shiftKey && !event.altKey && !isCtrl(event)) { // 27 - Esc
|
||||
inputBlur.apply(input);
|
||||
td.innerHTML = original;
|
||||
}
|
||||
@@ -745,7 +737,7 @@ function selectClick(event, text, warning) {
|
||||
td.appendChild(input);
|
||||
setupSubmitHighlight(td);
|
||||
input.focus();
|
||||
if (text === 2) { // long text
|
||||
if (text == 2) { // long text
|
||||
return ajax(location.href + '&' + encodeURIComponent(td.id) + '=', function (request) {
|
||||
if (request.responseText) {
|
||||
input.value = request.responseText;
|
||||
@@ -867,7 +859,7 @@ function findDefaultSubmit(el) {
|
||||
var inputs = qsa('input', el.form);
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = inputs[i];
|
||||
if (input.type === 'submit' && !input.style.zIndex) {
|
||||
if (input.type == 'submit' && !input.style.zIndex) {
|
||||
return input;
|
||||
}
|
||||
}
|
||||
|
@@ -7,18 +7,13 @@ if (!$fields) {
|
||||
$table_status = table_status1($TABLE, true);
|
||||
$name = $adminer->tableName($table_status);
|
||||
|
||||
$rights = [];
|
||||
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"];
|
||||
}
|
||||
|
||||
page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . ($name != "" ? $name : h($TABLE)), $error);
|
||||
|
||||
$set = null;
|
||||
if (isset($rights["insert"]) || !support("table")) {
|
||||
$set = "";
|
||||
}
|
||||
$adminer->selectLinks($table_status, $set);
|
||||
$adminer->selectLinks($table_status, (isset($rights["insert"]) || !support("table") ? "" : null));
|
||||
|
||||
$comment = $table_status["Comment"];
|
||||
if ($comment != "") {
|
||||
@@ -43,7 +38,7 @@ if (!is_view($table_status)) {
|
||||
echo "<h3 id='foreign-keys'>" . lang('Foreign keys') . "</h3>\n";
|
||||
$foreign_keys = foreign_keys($TABLE);
|
||||
if ($foreign_keys) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table>\n";
|
||||
echo "<thead><tr><th>" . lang('Source') . "<td>" . lang('Target') . "<td>" . lang('ON DELETE') . "<td>" . lang('ON UPDATE') . "<td></thead>\n";
|
||||
foreach ($foreign_keys as $name => $foreign_key) {
|
||||
echo "<tr title='" . h($name) . "'>";
|
||||
@@ -53,21 +48,38 @@ if (!is_view($table_status)) {
|
||||
. "</a>"
|
||||
;
|
||||
echo "(<i>" . implode("</i>, <i>", array_map('h', $foreign_key["target"])) . "</i>)";
|
||||
echo "<td>" . h($foreign_key["on_delete"]) . "\n";
|
||||
echo "<td>" . h($foreign_key["on_update"]) . "\n";
|
||||
echo "<td>" . h($foreign_key["on_delete"]);
|
||||
echo "<td>" . h($foreign_key["on_update"]);
|
||||
echo '<td><a href="' . h(ME . 'foreign=' . urlencode($TABLE) . '&name=' . urlencode($name)) . '">' . lang('Alter') . '</a>';
|
||||
echo "\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
echo '<p class="links"><a href="' . h(ME) . 'foreign=' . urlencode($TABLE) . '">' . lang('Add foreign key') . "</a>\n";
|
||||
}
|
||||
|
||||
if (support("check")) {
|
||||
echo "<h3 id='checks'>" . lang('Checks') . "</h3>\n";
|
||||
$check_constraints = check_constraints($TABLE);
|
||||
if ($check_constraints) {
|
||||
echo "<table>\n";
|
||||
foreach ($check_constraints as $key => $val) {
|
||||
echo "<tr title='" . h($key) . "'>";
|
||||
echo "<td><code class='jush-$jush'>" . h($val);
|
||||
echo "<td><a href='" . h(ME . 'check=' . urlencode($TABLE) . '&name=' . urlencode($key)) . "'>" . lang('Alter') . "</a>";
|
||||
echo "\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
echo '<p class="links"><a href="' . h(ME) . 'check=' . urlencode($TABLE) . '">' . lang('Create check') . "</a>\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (support(is_view($table_status) ? "view_trigger" : "trigger")) {
|
||||
echo "<h3 id='triggers'>" . lang('Triggers') . "</h3>\n";
|
||||
$triggers = triggers($TABLE);
|
||||
if ($triggers) {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table>\n";
|
||||
foreach ($triggers as $key => $val) {
|
||||
echo "<tr valign='top'><td>" . h($val[0]) . "<td>" . h($val[1]) . "<th>" . h($key) . "<td><a href='" . h(ME . 'trigger=' . urlencode($TABLE) . '&name=' . urlencode($key)) . "'>" . lang('Alter') . "</a>\n";
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
|
||||
?>
|
||||
|
||||
<form action="" method="post" id="form">
|
||||
<table cellspacing="0" class="layout">
|
||||
<table class="layout">
|
||||
<tr><th><?php echo lang('Time'); ?><td><?php echo html_select("Timing", $trigger_options["Timing"], $row["Timing"], "triggerChange(/^" . preg_quote($TABLE, "/") . "_[ba][iud]$/, '" . js_escape($TABLE) . "', this.form);"); ?>
|
||||
<tr><th><?php echo lang('Event'); ?><td><?php echo html_select("Event", $trigger_options["Event"], $row["Event"], "this.form['Timing'].onchange();"); ?>
|
||||
<?php echo (in_array("UPDATE OF", $trigger_options["Event"]) ? " <input name='Of' value='" . h($row["Of"]) . "' class='hidden'>": ""); ?>
|
||||
|
@@ -85,8 +85,8 @@ if ($_POST && !$error) {
|
||||
unset($grants[$object]);
|
||||
}
|
||||
if (preg_match('~^(.+)\s*(\(.*\))?$~U', $object, $match) && (
|
||||
!grant(false, $revoke, $match[2], $match[1], $new_user) //! SQL injection
|
||||
|| !grant(true, $grant, $match[2], $match[1], $new_user)
|
||||
!grant("REVOKE", $revoke, $match[2], " ON $match[1] FROM $new_user") //! SQL injection
|
||||
|| !grant("GRANT", $grant, $match[2], " ON $match[1] TO $new_user")
|
||||
)) {
|
||||
$error = true;
|
||||
break;
|
||||
@@ -100,7 +100,7 @@ if ($_POST && !$error) {
|
||||
} elseif (!isset($_GET["grant"])) {
|
||||
foreach ($grants as $object => $revoke) {
|
||||
if (preg_match('~^(.+)(\(.*\))?$~U', $object, $match)) {
|
||||
grant(false, array_keys($revoke), $match[2], $match[1], $new_user);
|
||||
grant("REVOKE", array_keys($revoke), $match[2], " ON $match[1] FROM $new_user");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,19 +126,12 @@ if ($_POST) {
|
||||
if ($old_pass != "") {
|
||||
$row["hashed"] = true;
|
||||
}
|
||||
|
||||
if ($grants) {
|
||||
$grants[".*"] = [];
|
||||
} elseif (DB != "") {
|
||||
$grants[idf_escape(addcslashes(DB, "%_\\")) . ".*"] = [];
|
||||
} else {
|
||||
$grants["*.* "] = []; // Space is added to force editing mode.
|
||||
}
|
||||
$grants[(DB == "" || $grants ? "" : idf_escape(addcslashes(DB, "%_\\"))) . ".*"] = array();
|
||||
}
|
||||
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<table cellspacing="0" class="layout">
|
||||
<table class="layout">
|
||||
<tr><th><?php echo lang('Server'); ?><td><input name="host" data-maxlength="60" value="<?php echo h($row["host"]); ?>" autocapitalize="off">
|
||||
<tr><th><?php echo lang('Username'); ?><td><input name="user" data-maxlength="80" value="<?php echo h($row["user"]); ?>" autocapitalize="off">
|
||||
<tr><th><?php echo lang('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>" autocomplete="new-password">
|
||||
@@ -148,80 +141,42 @@ if ($_POST) {
|
||||
|
||||
<?php
|
||||
//! MAX_* limits, REQUIRE
|
||||
echo "<table cellspacing='0'>\n";
|
||||
|
||||
echo "<thead><tr><th colspan='2'>" . lang('Privileges') . doc_link(array('sql' => "grant.html#priv_level")) . "</th>";
|
||||
echo "<table class='odds'>\n";
|
||||
echo "<thead><tr><th colspan='2'>" . lang('Privileges') . doc_link(array('sql' => "grant.html#priv_level"));
|
||||
$i = 0;
|
||||
foreach ($grants as $object => $grant) {
|
||||
echo "<th>";
|
||||
//! separate db, table, columns, PROCEDURE|FUNCTION, routine
|
||||
if ($object == "*.*") {
|
||||
echo "<input type='hidden' name='objects[$i]' value='*.*' size='10'>*.*";
|
||||
} else {
|
||||
echo "<input name='objects[$i]' value='" . h(trim($object)) . "' size='10' autocapitalize='off'>";
|
||||
}
|
||||
echo "</th>";
|
||||
echo '<th>' . ($object != "*.*" ? "<input name='objects[$i]' value='" . h($object) . "' size='10' autocapitalize='off'>" : "<input type='hidden' name='objects[$i]' value='*.*' size='10'>*.*"); //! separate db, table, columns, PROCEDURE|FUNCTION, routine
|
||||
$i++;
|
||||
}
|
||||
echo "</tr></thead>\n";
|
||||
echo "</thead>\n";
|
||||
|
||||
foreach ([
|
||||
foreach (array(
|
||||
"" => "",
|
||||
"Server Admin" => lang('Server'),
|
||||
"Databases" => lang('Database'),
|
||||
"Tables" => lang('Table'),
|
||||
"Columns" => lang('Column'),
|
||||
"Procedures" => lang('Routine'),
|
||||
] as $context => $desc) {
|
||||
) as $context => $desc) {
|
||||
foreach ((array) $privileges[$context] as $privilege => $comment) {
|
||||
echo "<tr" . odd() . ">";
|
||||
if ($desc) {
|
||||
echo "<td>$desc</td>";
|
||||
}
|
||||
echo "<td" . (!$desc ? " colspan='2'" : "") . ' lang="en" title="' . h($comment) . '">' . h($privilege) . "</td>";
|
||||
|
||||
echo "<tr><td" . ($desc ? ">$desc<td" : " colspan='2'") . ' lang="en" title="' . h($comment) . '">' . h($privilege);
|
||||
$i = 0;
|
||||
|
||||
foreach ($grants as $object => $grant) {
|
||||
$name = "'grants[$i][" . h(strtoupper($privilege)) . "]'";
|
||||
$value = $grant[strtoupper($privilege)];
|
||||
|
||||
$proxiedUser = strpos($object, "@") !== false;
|
||||
$newObject = $object == ".*";
|
||||
$allPrivileges = $privilege == "All privileges";
|
||||
$grantOption = $privilege == "Grant option";
|
||||
|
||||
if ($object == "*.*" && $privilege == "Proxy") {
|
||||
echo "<td></td>";
|
||||
} elseif ($proxiedUser && $privilege != "Proxy" && !$grantOption) {
|
||||
echo "<td></td>";
|
||||
} elseif ($context == "Server Admin" && $object != (isset($grants["*.*"]) ? "*.*" : ".*") && !(($proxiedUser || $newObject) && $privilege == "Proxy")) {
|
||||
echo "<td></td>";
|
||||
if ($context == "Server Admin" && $object != (isset($grants["*.*"]) ? "*.*" : ".*")) {
|
||||
echo "<td>";
|
||||
} elseif (isset($_GET["grant"])) {
|
||||
echo "<td><select name=$name>" .
|
||||
"<option></option>" .
|
||||
"<option value='1'" . ($value ? " selected" : "") . ">" . lang('Grant') . "</option>" .
|
||||
"<option value='0'" . ($value == "0" ? " selected" : "") . ">" . lang('Revoke') . "</option>" .
|
||||
"</select></td>";
|
||||
echo "<td><select name=$name><option><option value='1'" . ($value ? " selected" : "") . ">" . lang('Grant') . "<option value='0'" . ($value == "0" ? " selected" : "") . ">" . lang('Revoke') . "</select>";
|
||||
} else {
|
||||
echo "<td class='center'><label class='block'>";
|
||||
echo "<input type='checkbox' name=$name value='1'" .
|
||||
($value ? " checked" : "") .
|
||||
($allPrivileges ? " id='grants-$i-all'" : (!$grantOption ? " class='grants-$i'" : "")) .
|
||||
">";
|
||||
|
||||
if ($allPrivileges) {
|
||||
echo script("qsl('input').onclick = function () { if (this.checked) formUncheckAll('.grants-$i'); };");
|
||||
} elseif (!$grantOption) {
|
||||
echo script("qsl('input').onclick = function () { if (this.checked) formUncheck('grants-$i-all'); };");
|
||||
}
|
||||
echo "<td align='center'><label class='block'>";
|
||||
echo "<input type='checkbox' name=$name value='1'" . ($value ? " checked" : "") . ($privilege == "All privileges"
|
||||
? " id='grants-$i-all'>" //! uncheck all except grant if all is checked
|
||||
: ">" . ($privilege == "Grant option" ? "" : script("qsl('input').onclick = function () { if (this.checked) formUncheck('grants-$i-all'); };")));
|
||||
echo "</label>";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ $variables = ($status ? show_status() : show_variables());
|
||||
if (!$variables) {
|
||||
echo "<p class='message'>" . lang('No rows.') . "\n";
|
||||
} else {
|
||||
echo "<table cellspacing='0'>\n";
|
||||
echo "<table>\n";
|
||||
foreach ($variables as $key => $val) {
|
||||
echo "<tr>";
|
||||
echo "<th><code class='jush-" . $jush . ($status ? "status" : "set") . "'>" . h($key) . "</code>";
|
||||
|
@@ -1,24 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Root directory.
|
||||
BASEDIR=$( cd `dirname $0`/.. ; pwd )
|
||||
cd "$BASEDIR"
|
||||
|
||||
php compile.php
|
||||
php compile.php en
|
||||
php compile.php de
|
||||
php compile.php cs
|
||||
php compile.php sk
|
||||
|
||||
php compile.php mysql
|
||||
php compile.php mysql en
|
||||
php compile.php mysql de
|
||||
php compile.php mysql cs
|
||||
php compile.php mysql sk
|
||||
|
||||
php compile.php editor
|
||||
php compile.php editor en
|
||||
php compile.php editor mysql
|
||||
php compile.php editor mysql en
|
149
changes.txt
149
changes.txt
@@ -1,78 +1,93 @@
|
||||
Adminer 4.9.4 (released 2024-10-09):
|
||||
- Fix the width of inline edit field.
|
||||
- Unify displaying of 'New item' action based on privileges.
|
||||
- Better default value for object definition (*.*) while creating new database user.
|
||||
- Firefox: Fix opening a database to the new browser's tab with Ctrl+click.
|
||||
- Remove suppressing errors while reading local files.
|
||||
- More secure random strings on PHP 7+.
|
||||
- Editor: Fix array conversion to string (issue #3).
|
||||
- Editor: Fix building links with array parameters.
|
||||
- Clean up the code for PHP < 5.6.
|
||||
Adminer 4.17.0 (released 2025-02-24):
|
||||
Hide index column options by default
|
||||
Offer original values in multi-row editing (regression from 4.16.0)
|
||||
Print SQL errors as comments in export (regression from 3.2.0)
|
||||
MySQL, PostgreSQL, MS SQL: Support CHECK constraint
|
||||
MySQL: Show comments at routine call (bug #874)
|
||||
MySQL: Don't offer empty enum value in edit
|
||||
MySQL 9+: Support vector type
|
||||
PostgreSQL: Link user defined types
|
||||
PostgreSQL: Constraint enum values in editing (bug #270)
|
||||
PostgreSQL: Export functions
|
||||
PostgreSQL 8+: Fix exporting table constraints
|
||||
SQLite: Show all supported pragmas in Variables
|
||||
MS SQL: Allow altering table in non-default schema (bug #405)
|
||||
MS SQL: Fix default values (bug #732, bug #733)
|
||||
MS SQL: Fix length of nvarchar columns
|
||||
Editor: PDO: Select value of foreign key in edit (bug #847)
|
||||
Mobile devices: Use device width
|
||||
|
||||
Adminer 4.9.3 (released 2024-10-02):
|
||||
- MySQL, PostgreSQL: Fix queries splitting and string constants.
|
||||
- MySQL: Fix where clause for JSON column.
|
||||
- MySQL: Fix editing user's proxy privilege, refactoring.
|
||||
- MariaDB: Fix comparing CURRENT_TIMESTAMP definition while altering a table.
|
||||
- PostgreSQL: Fix editing record that contains a field with GENERATED ALWAYS default value.
|
||||
- Fix using undefined Min_DB::info property.
|
||||
- Do not include unchanged PARTITION BY definition into ALTER TABLE query.
|
||||
- Do not limit unlimited memory while executing queries.
|
||||
- Fix number conversion warning while reading INI settings.
|
||||
- Hide invalid edit form if table record is not found.
|
||||
- CSS: Fix background color of <pre> used as edit field.
|
||||
- CSS: Bigger font size for code blocks.
|
||||
Adminer 4.16.0 (released 2025-02-20):
|
||||
MySQL: Fix saving bit(64) values (bug #839)
|
||||
PostgreSQL: Preserve whitespace in EXPLAIN (bug #827)
|
||||
PostgreSQL: Support SSL
|
||||
PostgreSQL: Support altering auto_increment (bug #761)
|
||||
SQLite: Fix altering forign keys (bug #841)
|
||||
SQLite: Fix expressions in default values (bug #860)
|
||||
MS SQL: Foreign keys in non-default schema (bug #833)
|
||||
Oracle: Include tables granted by other user
|
||||
MongoDB: Execute commands against the selected DB
|
||||
|
||||
Adminer 4.9.2 (released 2024-09-18):
|
||||
- Fix textarea height for single-line inputs (used typically for SQLite text field).
|
||||
- Fix undefined property in error message if driver does not support error number (e.g. PostgreSQL).
|
||||
- PostgreSQL: Fix search fields configuration (regression from 4.9).
|
||||
- PostgreSQL: Fix search condition for network address types, add macaddr8 type.
|
||||
- PostgreSQL: Fix exporting CREATE TABLE query with GENERATED default values.
|
||||
- PostgreSQL: Fix exporting CREATE TABLE query with sequence default value.
|
||||
- PostgreSQL: Allow to set connection's sslmode with AdminerLoginSsl plugin.
|
||||
- MySQL: Do not show 'empty' enum value in strict mode.
|
||||
- Editor: Fix searching in tables.
|
||||
- Function to retrieve driver name that can be used in plugins.
|
||||
Adminer 4.15.0:
|
||||
Escape unknown field in select
|
||||
HTTP drivers: Don't allow path in server name
|
||||
HTTP drivers: Hide connection error message
|
||||
SimpleDB: Disable XML entity loader
|
||||
|
||||
Adminer 4.9.1 (released 2024-09-09):
|
||||
- Compatibility with PHP 8.3.
|
||||
- Fix compiling jush external files.
|
||||
- Improved displaying of long table names in menu.
|
||||
- Replace deprecated <acronym> with <abbr>.
|
||||
- Add support for translations in plugins.
|
||||
- Add .editorconfig file.
|
||||
- MySQL: Add unix_timestamp to functions.
|
||||
- PostgreSQL: Show only accessible databases.
|
||||
- PostgreSQL: Make data length calculation more accurate.
|
||||
- PostgreSQL: Fix documentation link for SERIAL type.
|
||||
- PostgreSQL: Fix undefined properties on PHP 8.
|
||||
- Elasticsearch: Fix field selection.
|
||||
- AdminerEditForeign: Refactor and fix the plugin.
|
||||
- AdminerLoginOtp: Autocomplete hints for OTP input field, code refactoring.
|
||||
Adminer 4.14.0:
|
||||
Use autofocus HTML attribute
|
||||
PostgreSQL: Fix initial value of exported autoincrement
|
||||
PostgreSQL: Fix renaming a database
|
||||
|
||||
Adminer 4.9 (released 2024-08-19):
|
||||
- Validate server input in login form.
|
||||
- Validate connection to server in HTTP based drivers.
|
||||
- Move dependencies from submodules to Composer.
|
||||
- Update hydra and pepa-lintha-dark themes.
|
||||
- Elasticsearch 5: Make unusable driver usable again, move it to plugins.
|
||||
- Add new Elasticsearch 7 driver.
|
||||
- Set saving to file as a default export option.
|
||||
- Improve URL and email detection.
|
||||
- Fix AdminerVersionNoverify plugin blocking other plugins to modify HTML head.
|
||||
- Fix several bugs and security issues in AdminerFileUpload plugin.
|
||||
- Skip dump of generated columns.
|
||||
- Update composer.json.
|
||||
- Add script for exporting compiled adminer variants.
|
||||
Adminer 4.12.0:
|
||||
Fix SQL query code direction if RTL language is used
|
||||
MariaDB: Add support for UUID data type
|
||||
MS SQL, MongoDB: Connect to localhost with default port if server is not specified
|
||||
MongoDB: Fix parsing WHERE condition from SQL query
|
||||
|
||||
Adminer 4.8.2 (released 2024-03-16):
|
||||
Adminer 4.11.0:
|
||||
MySQL: Fix highlighting current table in menu on macOS
|
||||
MariaDB: Fix several links to documentation pages
|
||||
MS SQL: Prefix Unicode strings with 'N' so they are treated correctly
|
||||
|
||||
Adminer 4.10.0:
|
||||
Print username next to the logout button
|
||||
Do not display empty action links in main menu
|
||||
|
||||
Adminer 4.9.4:
|
||||
Unify displaying of 'New item' action based on privileges
|
||||
Firefox: Fix opening a database to the new browser's tab with Ctrl+click
|
||||
Editor: Fix array conversion to string (issue adminerneo#3).
|
||||
Editor: Fix building links with array parameters
|
||||
|
||||
Adminer 4.9.3:
|
||||
MySQL, PostgreSQL: Fix queries splitting and string constants
|
||||
MySQL: Fix where clause for JSON column
|
||||
MySQL: Do not include unchanged PARTITION BY definition into ALTER TABLE query
|
||||
MariaDB: Support current_timestamp()
|
||||
PostgreSQL: Fix editing record that contains a field with GENERATED ALWAYS default value
|
||||
|
||||
Adminer 4.9.2:
|
||||
PostgreSQL: Fix search fields configuration (regression from 4.9.0)
|
||||
PostgreSQL: Fix exporting CREATE TABLE query with GENERATED default values
|
||||
PostgreSQL: Fix exporting CREATE TABLE with sequence default value
|
||||
PostgreSQL: Fix search condition for network address types, add macaddr8 type
|
||||
|
||||
Adminer 4.9.1:
|
||||
Support PHP 8.3
|
||||
PostgreSQL: Show only accessible databases
|
||||
|
||||
Adminer 4.9.0:
|
||||
Validate connection to server in HTTP based drivers
|
||||
Elasticsearch 5: Make unusable driver usable again, move it to plugins
|
||||
Add new Elasticsearch 7 driver
|
||||
MySQL: Skip dump of generated columns
|
||||
|
||||
Adminer 4.8.2:
|
||||
Support multi-line table comments
|
||||
MySQL: Use ST_SRID() instead of SRID() for MySQL 8 (PR #418)
|
||||
PostgreSQL: Don't reset table comments (regression from 4.2.0)
|
||||
PostgreSQL PDO: Allow editing rows identified by boolean column (PR #380)
|
||||
Update several translations: lv, bn, fr, it, nl, ru, cs, sk
|
||||
Allow responsive styles on larger devices
|
||||
|
||||
Adminer 4.8.1 (released 2021-05-14):
|
||||
Internet Explorer or PDO in Adminer 4.7.8-4.8.0: Fix XSS in doc_link (bug #797)
|
||||
@@ -497,7 +512,7 @@ Allow exporting views dependent on each other (bug #214)
|
||||
Fix resetting search (bug #318)
|
||||
Don't use LIMIT 1 if updating unique row (bug #320)
|
||||
Restrict editing rows without unique identifier to search results
|
||||
Display navigation bellow main content on mobile browsers
|
||||
Display navigation below main content on mobile browsers
|
||||
Get number of rows on export page asynchronously
|
||||
Respect 'whole result' even if some rows are checked (bug #339 since Adminer 3.7.0)
|
||||
MySQL: Optimize create table page and Editor navigation
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user