mirror of
https://github.com/vrana/adminer.git
synced 2025-09-01 18:32:39 +02:00
Compare commits
141 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b7bbd07155 | ||
|
1ff6f246e8 | ||
|
555e2e76b7 | ||
|
7883e0bd99 | ||
|
18e26a3b68 | ||
|
25a1ccf75b | ||
|
b9cdf52ec5 | ||
|
7997331b77 | ||
|
3bb75dc036 | ||
|
441e7f050c | ||
|
c41cb51ede | ||
|
42d92875c5 | ||
|
df0e5b59bb | ||
|
de9f572112 | ||
|
dd9a4a2b65 | ||
|
91d44f4a9f | ||
|
f993acb538 | ||
|
a87b606918 | ||
|
3e81c3871f | ||
|
13752c0498 | ||
|
e378f7d817 | ||
|
6f789eac0a | ||
|
9ed4c859ed | ||
|
62246338bf | ||
|
e5a7f75807 | ||
|
279337aa65 | ||
|
bf1d16cdb7 | ||
|
1de9275f11 | ||
|
0f2e04730f | ||
|
ae629f8ac7 | ||
|
0797cb6a10 | ||
|
dd122a1056 | ||
|
96c0177422 | ||
|
7d6c7998d8 | ||
|
3df88d4a24 | ||
|
2d4b73653b | ||
|
a63fadd503 | ||
|
a494827dc5 | ||
|
8ac486a57c | ||
|
bfcc6d8297 | ||
|
29fd200ef5 | ||
|
b6058368d3 | ||
|
fd38c4261a | ||
|
507f335371 | ||
|
ea314b8103 | ||
|
e250470768 | ||
|
2fa42d50eb | ||
|
a366b7af09 | ||
|
b039a39e4d | ||
|
08e48c8641 | ||
|
78c2041cfd | ||
|
5d7c5fa268 | ||
|
8f1db4cf6f | ||
|
9daa88acca | ||
|
aa519b78ca | ||
|
aee800efed | ||
|
06d0f957d5 | ||
|
3f0bc24e01 | ||
|
4863f48d33 | ||
|
9ea8f44919 | ||
|
fa791b5461 | ||
|
203162b203 | ||
|
e4e76b6384 | ||
|
353cd452a3 | ||
|
5bc4ac6c18 | ||
|
aec8275502 | ||
|
7d5077e687 | ||
|
91d0d8538f | ||
|
2439369143 | ||
|
d5bce9b3e9 | ||
|
b42762e4dc | ||
|
695a720403 | ||
|
e6fdf2b400 | ||
|
b542b6613c | ||
|
374b8ed6a6 | ||
|
58cca3f951 | ||
|
5eecb8e6a3 | ||
|
0d0936550c | ||
|
c4ed9500a1 | ||
|
0863766970 | ||
|
146a24efad | ||
|
00b9fbda08 | ||
|
8ea329538f | ||
|
a3428cc7ff | ||
|
2a01969c96 | ||
|
9b8d14c3ee | ||
|
2ce88d9bdc | ||
|
593c8e5bcc | ||
|
a134193afa | ||
|
8a60243459 | ||
|
b94636f8a7 | ||
|
47ccfa2a2e | ||
|
949b39b191 | ||
|
09a946cb99 | ||
|
13258de188 | ||
|
5fe25fca67 | ||
|
a693e75e32 | ||
|
de7dd4b64f | ||
|
8a70474651 | ||
|
43a0305a23 | ||
|
bff6f8ca93 | ||
|
f38c0a1f13 | ||
|
835c10674b | ||
|
fc5a46549e | ||
|
898dc9e25e | ||
|
32160b48ae | ||
|
6beb07a181 | ||
|
ee42077e54 | ||
|
c3e2e6c58f | ||
|
49effeff09 | ||
|
857cbf03f2 | ||
|
e8c9164a77 | ||
|
01fe709b7a | ||
|
90addc5e78 | ||
|
b71a456514 | ||
|
4d7642a624 | ||
|
9f8dadbb40 | ||
|
9968851f1e | ||
|
a5780e58af | ||
|
e8b40e3b9d | ||
|
35afd4f88c | ||
|
38e4b51256 | ||
|
55a7d3864f | ||
|
e69583a800 | ||
|
338c81e2a3 | ||
|
9eb4d00564 | ||
|
1c5947de50 | ||
|
5cfd48bb68 | ||
|
20a0e4e113 | ||
|
bf80612b0d | ||
|
8e848bfde4 | ||
|
38f390ae5e | ||
|
367a1b979e | ||
|
5dddfbdf12 | ||
|
2928b7beb8 | ||
|
a940f85206 | ||
|
834380aae9 | ||
|
3e94299256 | ||
|
e99ed80ad8 | ||
|
61b84cecd8 | ||
|
acf168a6da |
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -1,6 +0,0 @@
|
||||
/.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,3 +1,2 @@
|
||||
github: vrana
|
||||
patreon: jakubvrana
|
||||
custom: ["https://www.paypal.com/donate/?item_name=Donation+to+Adminer&business=jakub%40vrana.cz"]
|
||||
custom: ["https://sourceforge.net/p/adminer/donate/"]
|
||||
|
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@v2
|
||||
uses: github/codeql-action/init@v1
|
||||
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@v2
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ 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@v2
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
||||
/adminer*.php
|
||||
/editor*.php
|
||||
/vendor/
|
||||
/composer.lock
|
||||
/temp
|
||||
|
12
.gitmodules
vendored
12
.gitmodules
vendored
@@ -1,6 +1,6 @@
|
||||
[submodule "jush"]
|
||||
path = externals/jush
|
||||
url = https://github.com/vrana/jush
|
||||
[submodule "JsShrink"]
|
||||
path = externals/JsShrink
|
||||
url = https://github.com/vrana/JsShrink
|
||||
[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/
|
||||
|
@@ -6,8 +6,4 @@ 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
|
||||
|
1051
CHANGELOG.md
Normal file
1051
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
153
README.md
Normal file
153
README.md
Normal file
@@ -0,0 +1,153 @@
|
||||
# Adminer
|
||||
|
||||
**Adminer** is a full-featured database management tool written in PHP. It consists of a single file ready to deploy to
|
||||
the target server. As a companion, **Adminer Editor** offers data manipulation for end-users.
|
||||
|
||||
Supported database drivers:
|
||||
- MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, MongoDB
|
||||
- With plugin: SimpleDB, Elasticsearch (beta), Firebird (alpha), ClickHouse (alpha)
|
||||
|
||||
## Requirements
|
||||
|
||||
- PHP 5.6+ with enabled sessions.
|
||||
|
||||
## Migration from original Adminer
|
||||
|
||||
No action is needed for now. But please, read 👉 **[What to expect](#what-to-expect)** section before you decide to
|
||||
switch to this project.
|
||||
|
||||
## Usage
|
||||
|
||||
Download one for the latest [release files](https://github.com/pematon/adminer/releases), upload to the HTTP server
|
||||
with PHP and enjoy 😉 If you are not satisfied with any combination of the database driver and language, you can
|
||||
download the source code and compile your own Adminer:
|
||||
|
||||
- Download the source code.
|
||||
- Run `composer install` to install dependencies.
|
||||
- Run compile.php:
|
||||
|
||||
```shell
|
||||
# Adminer
|
||||
php compile.php <driver> <language>
|
||||
|
||||
# Editor
|
||||
php compile.php editor <driver> <language>
|
||||
```
|
||||
|
||||
For example:
|
||||
```shell
|
||||
php compile.php pgsql cs
|
||||
```
|
||||
|
||||
[Available drivers](https://github.com/pematon/adminer/tree/master/adminer/drivers),
|
||||
[languages](https://github.com/pematon/adminer/tree/master/adminer/lang).
|
||||
|
||||
## Security
|
||||
|
||||
Adminer does not allow connecting to databases without a password and it rate-limits the connection attempts to protect
|
||||
against brute-force attacks. Still, it is highly recommended to 🔒 **restrict access to Adminer** 🔒 by whitelisting IP
|
||||
addresses allowed to connect to it, by password-protecting the access in your web server or by enabling security plugins
|
||||
(e.g. to require an OTP).
|
||||
|
||||
## Plugins
|
||||
|
||||
* Download plugins you want and place them into the `plugins` folder.
|
||||
* Create `index.php` file specifying which plugins do you want to use.
|
||||
|
||||
File structure will be:
|
||||
|
||||
```
|
||||
- plugins
|
||||
- drivers
|
||||
- elastic.php
|
||||
- dump-xml.php
|
||||
- tinymce.php
|
||||
- file-upload.php
|
||||
- ...
|
||||
- adminer.php
|
||||
- index.php
|
||||
```
|
||||
|
||||
Index.php:
|
||||
```php
|
||||
<?php
|
||||
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_once "./plugins/drivers/elastic.php";
|
||||
|
||||
// Specify enabled plugins.
|
||||
$plugins = [
|
||||
new AdminerDumpXml(),
|
||||
new AdminerTinymce(),
|
||||
new AdminerFileUpload("data/"),
|
||||
// ...
|
||||
];
|
||||
|
||||
// It is possible to combine customization and plugins.
|
||||
// class AdminerCustomization extends AdminerPlugin {
|
||||
// }
|
||||
// return new AdminerCustomization($plugins);
|
||||
|
||||
return new AdminerPlugin($plugins);
|
||||
}
|
||||
|
||||
// Include original Adminer or Adminer Editor.
|
||||
include "./adminer.php";
|
||||
```
|
||||
|
||||
[Available plugins](https://github.com/pematon/adminer/tree/master/plugins).
|
||||
|
||||
## Main project files
|
||||
- adminer/index.php - Run development version of Adminer.
|
||||
- editor/index.php - Run development version of Adminer Editor.
|
||||
- editor/example.php - Example customization.
|
||||
- plugins/readme.txt - Plugins for Adminer and Adminer Editor.
|
||||
- adminer/plugin.php - Plugin demo.
|
||||
- adminer/sqlite.php - Development version of Adminer with SQLite allowed.
|
||||
- editor/sqlite.php - Development version of Editor with SQLite allowed.
|
||||
- adminer/designs.php - Development version of Adminer with adminer.css switcher.
|
||||
- compile.php - Create a single file version.
|
||||
- lang.php - Update translations.
|
||||
- tests/katalon.html - Katalon Automation Recorder test suite.
|
||||
|
||||
## Project history
|
||||
|
||||
Adminer was originally developed by Jakub Vrana, and it can be still found on [official pages](https://www.adminer.org/).
|
||||
Unfortunately, it is not maintained for several years. In the meantime, I (@peterpp) created for my company a set of
|
||||
custom plugins, modern theme, fixed some bugs and practically rewrote the Elasticsearch driver. I also looked closely
|
||||
and contributed to the [AdminerEvo](https://www.adminerevo.org/) project that looked promising. However, I finally
|
||||
decided to continue working on this fork and fulfill my own vision.
|
||||
|
||||
## What to expect
|
||||
|
||||
Our top priority is fixing the security issues and reported bugs. But we really want to move forward and transform
|
||||
Adminer to a tool that will keep its simplicity, yet looks much better, is even easier to use and can be configured
|
||||
without requirement of additional plugins.
|
||||
|
||||
### Version 4.x
|
||||
Original design and backward compatibility is kept. Many issues were fixed, and we introduced several functional and
|
||||
UI improvements.
|
||||
|
||||
### Version 5
|
||||
Bridges will be burned 🔥🔥🔥. It's in development already, so you [can check](https://github.com/pematon/adminer/tree/version-5)
|
||||
what's going on. Or you can become the early adopter and help us with testing 😉
|
||||
|
||||
Our goals are:
|
||||
|
||||
- **Requirements** - Bump minimal PHP to 7.1, maybe even higher.
|
||||
- **Themes** – Modernize the current old-school theme, add new default theme based on our [Adminer theme](https://github.com/pematon/adminer-theme),
|
||||
support dark mode, configurable color variants for production/devel environment. All current designs will be removed.
|
||||
- **Plugins** - Integrate several basic plugins, enable them by optional configuration.
|
||||
- **Codebase** - Prefer code readability before minimalism, use PER coding style, add namespaces.
|
||||
- **Compilation** - Allow to export selected drivers, themes, languages and plugins into a single adminer.php file.
|
||||
|
||||
We are also thinking to change the project's name, so people will clearly distinguish between original Adminer and
|
||||
other forks. Any suggestions are welcome.
|
14
SECURITY.md
14
SECURITY.md
@@ -1,11 +1,11 @@
|
||||
# Security Policy
|
||||
# Reporting security issues
|
||||
|
||||
## Supported Versions
|
||||
To report a security issue, please [open a draft security advisory](https://github.com/pematon/adminer/security/advisories).
|
||||
|
||||
I support only the last published version and the last development version (last commit).
|
||||
Security issues are handled with top priority. Once acknowledged, a fix should be available and new version released
|
||||
as soon as possible. Security advisories will be made public after a fix and new version have been released,
|
||||
or the advisory has been declined.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
## Supported versions
|
||||
|
||||
To report a vulnerability, create a private bug at https://sourceforge.net/p/adminer/bugs-and-features/new/?private=1.
|
||||
|
||||
I handle security issues with top priority. If you don't hear from me in a week then please ping the bug. Once I accept the bug, the fix should be available and new version released within days. I will mark the bug as public after releasing a new version or declining the bug.
|
||||
Only the last published version and the last development version (last commit) are supported.
|
||||
|
@@ -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 warnings overwrites this
|
||||
$affected = $connection->affected_rows; // getting warnigns 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 class='layout'>\n";
|
||||
echo "<table cellspacing='0' class='layout'>\n";
|
||||
foreach ($in as $key) {
|
||||
$field = $routine["fields"][$key];
|
||||
$name = $field["field"];
|
||||
@@ -88,22 +88,3 @@ 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>
|
||||
|
@@ -1,37 +0,0 @@
|
||||
<?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/",
|
||||
'pgsql' => "ddl-constraints.html#DDL-CONSTRAINTS-CHECK-CONSTRAINTS",
|
||||
'mssql' => "relational-databases/tables/create-check-constraints",
|
||||
)); ?>
|
||||
<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,9 +49,12 @@ 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;
|
||||
@@ -86,14 +89,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 = array();
|
||||
$partitions = [];
|
||||
if ($params["partition_by"] == 'RANGE' || $params["partition_by"] == 'LIST') {
|
||||
foreach ($params["partition_names"] as $key => $name) {
|
||||
$value = $params["partition_values"][$key];
|
||||
@@ -102,11 +105,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 " . (+$params["partitions"]);
|
||||
$partitioning .= " PARTITIONS " . (int)$params["partitions"];
|
||||
}
|
||||
}
|
||||
} elseif (preg_match("~partitioned~", $table_status["Create_options"])) {
|
||||
@@ -178,7 +181,8 @@ foreach ($engines as $engine) {
|
||||
<form action="" method="post" id="form">
|
||||
<p>
|
||||
<?php if (support("columns") || $TABLE == "") { ?>
|
||||
<?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 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 ($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'); ?>">
|
||||
@@ -186,7 +190,7 @@ foreach ($engines as $engine) {
|
||||
|
||||
<?php if (support("columns")) { ?>
|
||||
<div class="scrollable">
|
||||
<table id="edit-fields" class="nowrap">
|
||||
<table cellspacing="0" id="edit-fields" class="nowrap">
|
||||
<?php
|
||||
edit_fields($row["fields"], $collations, "TABLE", $foreign_keys);
|
||||
?>
|
||||
@@ -194,8 +198,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" 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 echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
|
||||
<?php
|
||||
$comments = ($_POST ? $_POST["comments"] : adminer_setting("comments"));
|
||||
echo (support("comment")
|
||||
@@ -221,7 +224,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 id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
|
||||
<table cellspacing="0" 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,13 +59,14 @@ if ($_POST) {
|
||||
<p>
|
||||
<?php
|
||||
echo ($_POST["add_x"] || strpos($name, "\n")
|
||||
? '<textarea autofocus name="name" rows="10" cols="40">' . h($name) . '</textarea><br>'
|
||||
: '<input name="name" autofocus value="' . h($name) . '" data-maxlength="64" autocapitalize="off">'
|
||||
? '<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">'
|
||||
) . "\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' => "relational-databases/system-functions/sys-fn-helpcollations-transact-sql",
|
||||
'mssql' => "ms187963.aspx",
|
||||
)) : "");
|
||||
echo script("focus(qs('#name'));");
|
||||
?>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php
|
||||
|
@@ -59,14 +59,18 @@ if ($adminer->homepage()) {
|
||||
echo "<input type='search' name='query' value='" . h($_POST["query"]) . "'>";
|
||||
echo script("qsl('input').onkeydown = partialArg(bodyKeydown, 'search');", "");
|
||||
echo " <input type='submit' name='search' value='" . lang('Search') . "'>\n";
|
||||
if ($adminer->operator_regexp !== null) {
|
||||
echo "<p><label><input type='checkbox' name='regexp' value='1'" . (empty($_POST['regexp']) ? '' : ' checked') . '>' . lang('as a regular expression') . '</label>';
|
||||
echo doc_link(['sql' => 'regexp.html', 'pgsql' => 'functions-matching.html#FUNCTIONS-POSIX-REGEXP', 'elastic' => "regexp-syntax.html"]) . "</p>\n";
|
||||
}
|
||||
echo "</div></fieldset>\n";
|
||||
if ($_POST["search"] && $_POST["query"] != "") {
|
||||
$_GET["where"][0]["op"] = $driver->convertOperator("LIKE %%");
|
||||
$_GET["where"][0]["op"] = $adminer->operator_regexp !== null && !empty($_POST['regexp']) ? $adminer->operator_regexp : $adminer->operator_like;
|
||||
search_tables();
|
||||
}
|
||||
}
|
||||
echo "<div class='scrollable'>\n";
|
||||
echo "<table class='nowrap checkable odds'>\n";
|
||||
echo "<table cellspacing='0' class='nowrap checkable'>\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 +89,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><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "", "", $id);
|
||||
echo '<tr' . odd() . '><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,7 +113,6 @@ 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));
|
||||
@@ -118,7 +121,6 @@ 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";
|
||||
@@ -161,11 +163,12 @@ if ($adminer->homepage()) {
|
||||
echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
|
||||
$routines = routines();
|
||||
if ($routines) {
|
||||
echo "<table class='odds'>\n";
|
||||
echo "<table>\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>';
|
||||
echo '<tr' . odd() . '>';
|
||||
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"]);
|
||||
@@ -183,10 +186,11 @@ 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 class='odds'>\n";
|
||||
echo "<table>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
|
||||
odd('');
|
||||
foreach ($sequences as $val) {
|
||||
echo "<tr><th><a href='" . h(ME) . "sequence=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
echo "<tr" . odd() . "><th><a href='" . h(ME) . "sequence=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
@@ -197,10 +201,11 @@ if ($adminer->homepage()) {
|
||||
echo "<h3 id='user-types'>" . lang('User types') . "</h3>\n";
|
||||
$user_types = types();
|
||||
if ($user_types) {
|
||||
echo "<table class='odds'>\n";
|
||||
echo "<table>\n";
|
||||
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
|
||||
odd('');
|
||||
foreach ($user_types as $val) {
|
||||
echo "<tr><th><a href='" . h(ME) . "type=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
echo "<tr" . odd() . "><th><a href='" . h(ME) . "type=" . urlencode($val) . "'>" . h($val) . "</a>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
@@ -206,6 +206,7 @@ if (isset($_GET["mongo"])) {
|
||||
}
|
||||
|
||||
$operators = array("=");
|
||||
$operator_regexp = null;
|
||||
|
||||
} elseif (class_exists('MongoDB\Driver\Manager')) {
|
||||
class Min_DB {
|
||||
@@ -217,7 +218,7 @@ if (isset($_GET["mongo"])) {
|
||||
function connect($uri, $options) {
|
||||
$class = 'MongoDB\Driver\Manager';
|
||||
$this->_link = new $class($uri, $options);
|
||||
$this->executeCommand($options["db"], array('ping' => 1));
|
||||
$this->executeCommand('admin', array('ping' => 1));
|
||||
}
|
||||
|
||||
function executeCommand($db, $command) {
|
||||
@@ -399,7 +400,7 @@ if (isset($_GET["mongo"])) {
|
||||
function get_databases($flush) {
|
||||
global $connection;
|
||||
$return = array();
|
||||
foreach ($connection->executeCommand($connection->_db_name, array('listDatabases' => 1)) as $dbs) {
|
||||
foreach ($connection->executeCommand('admin', array('listDatabases' => 1)) as $dbs) {
|
||||
foreach ($dbs->databases as $db) {
|
||||
$return[] = $db->name;
|
||||
}
|
||||
@@ -463,6 +464,8 @@ if (isset($_GET["mongo"])) {
|
||||
"insert" => 1,
|
||||
"select" => 1,
|
||||
"update" => 1,
|
||||
"where" => 1,
|
||||
"order" => 1,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -480,11 +483,7 @@ if (isset($_GET["mongo"])) {
|
||||
}
|
||||
|
||||
function sql_query_where_parser($queryWhere) {
|
||||
$queryWhere = preg_replace('~^\s*WHERE\s*~', "", $queryWhere);
|
||||
while ($queryWhere[0] == "(") {
|
||||
$queryWhere = preg_replace('~^\((.*)\)$~', "$1", $queryWhere);
|
||||
}
|
||||
|
||||
$queryWhere = preg_replace('~^\sWHERE \(?\(?(.+?)\)?\)?$~', '\1', $queryWhere);
|
||||
$wheres = explode(' AND ', $queryWhere);
|
||||
$wheresOr = explode(') OR (', $queryWhere);
|
||||
$where = array();
|
||||
@@ -580,6 +579,7 @@ if (isset($_GET["mongo"])) {
|
||||
"(date)<=",
|
||||
);
|
||||
|
||||
$operator_regexp = 'regex';
|
||||
}
|
||||
|
||||
function table($idf) {
|
||||
@@ -629,11 +629,6 @@ 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;
|
||||
@@ -741,11 +736,13 @@ if (isset($_GET["mongo"])) {
|
||||
}
|
||||
|
||||
function driver_config() {
|
||||
global $operators;
|
||||
global $operators, $operator_regexp;
|
||||
return array(
|
||||
'possible_drivers' => array("mongo", "mongodb"),
|
||||
'jush' => "mongo",
|
||||
'operators' => $operators,
|
||||
'operator_like' => "LIKE %%", // TODO: LIKE operator is not listed in operators.
|
||||
'operator_regexp' => $operator_regexp,
|
||||
'functions' => array(),
|
||||
'grouping' => array(),
|
||||
'edit_functions' => array(array("json")),
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* @author Jakub Vrana
|
||||
*/
|
||||
|
||||
$drivers["mssql"] = "MS SQL";
|
||||
$drivers["mssql"] = "MS SQL (beta)";
|
||||
|
||||
if (isset($_GET["mssql"])) {
|
||||
define("DRIVER", "mssql");
|
||||
@@ -24,15 +24,8 @@ if (isset($_GET["mssql"])) {
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
global $adminer;
|
||||
$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();
|
||||
$connection_info = array("UID" => $username, "PWD" => $password, "CharacterSet" => "UTF-8");
|
||||
if ($db != "") {
|
||||
$connection_info["Database"] = $db;
|
||||
}
|
||||
@@ -47,8 +40,7 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
$unicode = strlen($string) != strlen(utf8_decode($string));
|
||||
return ($unicode ? "N" : "") . "'" . str_replace("'", "''", $string) . "'";
|
||||
return "'" . str_replace("'", "''", $string) . "'";
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
@@ -171,8 +163,7 @@ if (isset($_GET["mssql"])) {
|
||||
}
|
||||
|
||||
function quote($string) {
|
||||
$unicode = strlen($string) != strlen(utf8_decode($string));
|
||||
return ($unicode ? "N" : "") . "'" . str_replace("'", "''", $string) . "'";
|
||||
return "'" . str_replace("'", "''", $string) . "'";
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
@@ -310,11 +301,6 @@ 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;
|
||||
}
|
||||
@@ -363,9 +349,7 @@ 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;
|
||||
}
|
||||
@@ -385,29 +369,25 @@ WHERE schema_id = SCHEMA_ID(" . q(get_schema()) . ") AND type IN ('S', 'U', 'V')
|
||||
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], d.name default_constraint
|
||||
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]
|
||||
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.object_id
|
||||
LEFT JOIN sys.default_constraints d ON c.default_object_id = d.parent_column_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[0] == 'n' ? 2 : 1)
|
||||
: ($type == "decimal" ? "$row[precision],$row[scale]" : "")
|
||||
);
|
||||
$length = (preg_match("~char|binary~", $type) ? $row["max_length"] : ($type == "decimal" ? "$row[precision],$row[scale]" : ""));
|
||||
$return[$row["name"]] = array(
|
||||
"field" => $row["name"],
|
||||
"full_type" => $type . ($length ? "($length)" : ""),
|
||||
"type" => $type,
|
||||
"length" => $length,
|
||||
"default" => (preg_match("~^\('(.*)'\)$~", $row["default"], $match) ? str_replace("''", "'", $match[1]) : $row["default"]),
|
||||
"default_constraint" => $row["default_constraint"],
|
||||
"default" => $row["default"],
|
||||
"null" => $row["is_nullable"],
|
||||
"auto_increment" => $row["is_identity"],
|
||||
"collation" => $row["collation_name"],
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1),
|
||||
"primary" => $row["is_identity"], //! or indexes.is_primary_key
|
||||
"comment" => $comments[$row["name"]],
|
||||
);
|
||||
@@ -452,7 +432,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
|
||||
function error() {
|
||||
global $connection;
|
||||
return nl_br(h(preg_replace('~^(\[[^]]*])+~m', '', $connection->error)));
|
||||
return nl2br(h(preg_replace('~^(\[[^]]*])+~m', '', $connection->error)));
|
||||
}
|
||||
|
||||
function create_database($db, $collation) {
|
||||
@@ -478,7 +458,6 @@ 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];
|
||||
@@ -491,22 +470,11 @@ 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -520,7 +488,7 @@ WHERE OBJECT_NAME(i.object_id) = " . q($table)
|
||||
$alter[""] = $foreign;
|
||||
}
|
||||
foreach ($alter as $key => $val) {
|
||||
if (!queries("ALTER TABLE " . table($name) . " $key" . implode(",", $val))) {
|
||||
if (!queries("ALTER TABLE " . idf_escape($name) . " $key" . implode(",", $val))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -571,7 +539,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) . ", @fktable_owner = " . q(get_schema())) as $row) {
|
||||
foreach (get_rows("EXEC sp_fkeys @fktable_name = " . q($table)) as $row) {
|
||||
$foreign_key = &$return[$row["FK_NAME"]];
|
||||
$foreign_key["db"] = $row["PKTABLE_QUALIFIER"];
|
||||
$foreign_key["table"] = $row["PKTABLE_NAME"];
|
||||
@@ -662,6 +630,17 @@ 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;
|
||||
}
|
||||
|
||||
function show_status() {
|
||||
return array();
|
||||
}
|
||||
@@ -674,7 +653,7 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
||||
}
|
||||
|
||||
function support($feature) {
|
||||
return preg_match('~^(check|comment|columns|database|drop_col|indexes|descidx|scheme|sql|table|trigger|view|view_trigger)$~', $feature); //! routine|
|
||||
return preg_match('~^(comment|columns|database|drop_col|indexes|descidx|scheme|sql|table|trigger|view|view_trigger)$~', $feature); //! routine|
|
||||
}
|
||||
|
||||
function driver_config() {
|
||||
@@ -696,6 +675,7 @@ WHERE sys1.xtype = 'TR' AND sys2.name = " . q($table)
|
||||
'structured_types' => $structured_types,
|
||||
'unsigned' => array(),
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"),
|
||||
'operator_like' => "LIKE %%",
|
||||
'functions' => array("len", "lower", "round", "upper"),
|
||||
'grouping' => array("avg", "count", "count distinct", "max", "min", "sum"),
|
||||
'edit_functions' => array(
|
||||
|
@@ -14,12 +14,19 @@ if (!defined("DRIVER")) {
|
||||
|
||||
function connect($server = "", $username = "", $password = "", $database = null, $port = null, $socket = null) {
|
||||
global $adminer;
|
||||
mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
|
||||
mysqli_report(MYSQLI_REPORT_OFF);
|
||||
list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket
|
||||
|
||||
$ssl = $adminer->connectSsl();
|
||||
if ($ssl) {
|
||||
$this->ssl_set($ssl['key'], $ssl['cert'], $ssl['ca'], '', '');
|
||||
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
|
||||
);
|
||||
}
|
||||
|
||||
$return = @$this->real_connect(
|
||||
($server != "" ? $host : ini_get("mysqli.default_host")),
|
||||
($server . $username != "" ? $username : ini_get("mysqli.default_user")),
|
||||
@@ -27,7 +34,7 @@ if (!defined("DRIVER")) {
|
||||
$database,
|
||||
(is_numeric($port) ? $port : ini_get("mysqli.default_port")),
|
||||
(!is_numeric($port) ? $port : $socket),
|
||||
($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)
|
||||
($ssl ? MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT : 0)
|
||||
);
|
||||
$this->options(MYSQLI_OPT_LOCAL_INFILE, false);
|
||||
return $return;
|
||||
@@ -234,33 +241,28 @@ if (!defined("DRIVER")) {
|
||||
|
||||
function connect($server, $username, $password) {
|
||||
global $adminer;
|
||||
$options = array(PDO::MYSQL_ATTR_LOCAL_INFILE => false);
|
||||
|
||||
$dsn = "mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\d)~', ';port=\1', $server));
|
||||
|
||||
$options = [PDO::MYSQL_ATTR_LOCAL_INFILE => false];
|
||||
$ssl = $adminer->connectSsl();
|
||||
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['key'])) {
|
||||
$options[PDO::MYSQL_ATTR_SSL_KEY] = $ssl['key'];
|
||||
}
|
||||
$this->dsn(
|
||||
"mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\d)~', ';port=\1', $server)),
|
||||
$username,
|
||||
$password,
|
||||
$options
|
||||
);
|
||||
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);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function set_charset($charset) {
|
||||
$this->query("SET NAMES $charset"); // charset in DSN is ignored before PHP 5.3.6
|
||||
$this->query("SET NAMES $charset");
|
||||
}
|
||||
|
||||
function select_db($database) {
|
||||
@@ -319,8 +321,8 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
}
|
||||
|
||||
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'])
|
||||
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'])
|
||||
? "CONVERT($idf USING " . charset($this->_conn) . ")"
|
||||
: $idf
|
||||
);
|
||||
@@ -338,22 +340,13 @@ if (!defined("DRIVER")) {
|
||||
function tableHelp($name) {
|
||||
$maria = preg_match('~MariaDB~', $this->_conn->server_info);
|
||||
if (information_schema(DB)) {
|
||||
return strtolower("information-schema-" . ($maria ? "$name-table/" : str_replace("_", "-", $name) . "-table.html"));
|
||||
return strtolower(($maria ? "information-schema-$name-table/" : str_replace("_", "-", $name) . "-table.html"));
|
||||
}
|
||||
if (DB == "mysql") {
|
||||
return ($maria ? "mysql$name-table/" : "system-schema.html"); //! more precise link
|
||||
return ($maria ? "mysql$name-table/" : "system-database.html"); //! more precise link
|
||||
}
|
||||
}
|
||||
|
||||
function hasCStyleEscapes() {
|
||||
static $c_style;
|
||||
if ($c_style === null) {
|
||||
$sql_mode = $this->_conn->result("SHOW VARIABLES LIKE 'sql_mode'", 1);
|
||||
$c_style = (strpos($sql_mode, 'NO_BACKSLASH_ESCAPES') === false);
|
||||
}
|
||||
return $c_style;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -378,26 +371,16 @@ if (!defined("DRIVER")) {
|
||||
* @return mixed Min_DB or string for error
|
||||
*/
|
||||
function connect() {
|
||||
global $adminer, $types, $structured_types, $edit_functions;
|
||||
global $adminer, $types, $structured_types;
|
||||
$connection = new Min_DB;
|
||||
$credentials = $adminer->credentials();
|
||||
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
|
||||
$connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
|
||||
$connection->set_charset(charset($connection));
|
||||
$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;
|
||||
@@ -490,7 +473,7 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
/** Get tables list
|
||||
* @return array [$name => $type]
|
||||
* @return array array($name => $type)
|
||||
*/
|
||||
function tables_list() {
|
||||
return get_key_vals(min_version(5)
|
||||
@@ -501,7 +484,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Count tables in all databases
|
||||
* @param array
|
||||
* @return array arra($db => $tables)
|
||||
* @return array array($db => $tables)
|
||||
*/
|
||||
function count_tables($databases) {
|
||||
$return = array();
|
||||
@@ -514,12 +497,12 @@ if (!defined("DRIVER")) {
|
||||
/** Get table status
|
||||
* @param string
|
||||
* @param bool return only "Name", "Engine" and "Comment" fields
|
||||
* @return 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 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();
|
||||
foreach (get_rows($fast && min_version(5)
|
||||
? "SELECT TABLE_NAME AS Name, ENGINE AS Engine, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name")
|
||||
? "SELECT TABLE_NAME AS Name, ENGINE AS Engine, CREATE_OPTIONS AS Create_options, TABLE_COMMENT AS Comment FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() " . ($name != "" ? "AND TABLE_NAME = " . q($name) : "ORDER BY Name")
|
||||
: "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
|
||||
) as $row) {
|
||||
if ($row["Engine"] == "InnoDB") {
|
||||
@@ -530,8 +513,6 @@ 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;
|
||||
@@ -558,7 +539,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get information about fields
|
||||
* @param string
|
||||
* @return array [$name => array("field" => , "full_type" => , "type" => , "length" => , "unsigned" => , "default" => , "null" => , "auto_increment" => , "on_update" => , "collation" => , "privileges" => , "comment" => , "primary" => )]
|
||||
* @return array array($name => array("field" => , "full_type" => , "type" => , "length" => , "unsigned" => , "default" => , "null" => , "auto_increment" => , "on_update" => , "collation" => , "privileges" => , "comment" => , "primary" => ))
|
||||
*/
|
||||
function fields($table) {
|
||||
$return = array();
|
||||
@@ -575,7 +556,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"])),
|
||||
"privileges" => array_flip(preg_split('~, *~', $row["Privileges"])) + ["where" => 1, "order" => 1],
|
||||
"comment" => $row["Comment"],
|
||||
"primary" => ($row["Key"] == "PRI"),
|
||||
// https://mariadb.com/kb/en/library/show-columns/, https://github.com/vrana/adminer/pull/359#pullrequestreview-276677186
|
||||
@@ -588,7 +569,7 @@ if (!defined("DRIVER")) {
|
||||
/** Get table indexes
|
||||
* @param string
|
||||
* @param string Min_DB to use
|
||||
* @return array [$key_name => array("type" => , "columns" => array(), "lengths" => array(), "descs" => array())]
|
||||
* @return array array($key_name => array("type" => , "columns" => array(), "lengths" => array(), "descs" => array()))
|
||||
*/
|
||||
function indexes($table, $connection2 = null) {
|
||||
$return = array();
|
||||
@@ -604,7 +585,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get foreign keys in table
|
||||
* @param string
|
||||
* @return array [$name => array("db" => , "ns" => , "table" => , "source" => array(), "target" => array(), "on_delete" => , "on_update" => )]
|
||||
* @return array array($name => array("db" => , "ns" => , "table" => , "source" => array(), "target" => array(), "on_delete" => , "on_update" => ))
|
||||
*/
|
||||
function foreign_keys($table) {
|
||||
global $connection, $on_actions;
|
||||
@@ -631,7 +612,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get view SELECT
|
||||
* @param string
|
||||
* @return array ["select" => ]
|
||||
* @return array array("select" => )
|
||||
*/
|
||||
function view($name) {
|
||||
global $connection;
|
||||
@@ -880,7 +861,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get information about trigger
|
||||
* @param string trigger name
|
||||
* @return array ["Trigger" => , "Timing" => , "Event" => , "Of" => , "Type" => , "Statement" => ]
|
||||
* @return array array("Trigger" => , "Timing" => , "Event" => , "Of" => , "Type" => , "Statement" => )
|
||||
*/
|
||||
function trigger($name) {
|
||||
if ($name == "") {
|
||||
@@ -892,7 +873,7 @@ if (!defined("DRIVER")) {
|
||||
|
||||
/** Get defined triggers
|
||||
* @param string
|
||||
* @return array [$name => array($timing, $event)]
|
||||
* @return array array($name => array($timing, $event))
|
||||
*/
|
||||
function triggers($table) {
|
||||
$return = array();
|
||||
@@ -903,7 +884,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(
|
||||
@@ -916,7 +897,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;
|
||||
@@ -940,18 +921,19 @@ 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.BODY_STYLE
|
||||
));
|
||||
"language" => "SQL", // available in information_schema.ROUTINES.PARAMETER_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));
|
||||
@@ -1073,21 +1055,44 @@ 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;
|
||||
}
|
||||
|
||||
function is_c_style_escapes() {
|
||||
static $c_style = null;
|
||||
|
||||
if ($c_style === null) {
|
||||
$c_style = strpos(get_key_vals("SHOW VARIABLES LIKE 'sql_mode'")["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");
|
||||
@@ -1119,7 +1124,7 @@ if (!defined("DRIVER")) {
|
||||
$return = "UNHEX($return)";
|
||||
}
|
||||
if ($field["type"] == "bit") {
|
||||
$return = "CONVERT(b$return, UNSIGNED)";
|
||||
$return = "CONV($return, 2, 10) + 0";
|
||||
}
|
||||
if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
|
||||
$prefix = (min_version(8) ? "ST_" : "");
|
||||
@@ -1129,11 +1134,11 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
/** Check whether a feature is supported
|
||||
* @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"
|
||||
* @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"
|
||||
* @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"))) . (min_version('8.0.16', '10.2.1') ? "" : "|check") . "~", $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);
|
||||
}
|
||||
|
||||
/** Kill a process
|
||||
@@ -1160,11 +1165,11 @@ if (!defined("DRIVER")) {
|
||||
}
|
||||
|
||||
/** Get driver config
|
||||
* @return array ['possible_drivers' => , 'jush' => , 'types' => , 'structured_types' => , 'unsigned' => , 'operators' => , 'functions' => , 'grouping' => , 'edit_functions' => ]
|
||||
* @return array 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),
|
||||
@@ -1183,7 +1188,9 @@ 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", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper"), ///< @var array functions used in select
|
||||
'operator_like' => "LIKE %%",
|
||||
'operator_regexp' => 'REGEXP',
|
||||
'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
|
||||
'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(
|
||||
|
@@ -165,14 +165,16 @@ if (isset($_GET["oracle"])) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function hasCStyleEscapes() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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) . '"';
|
||||
@@ -193,12 +195,7 @@ if (isset($_GET["oracle"])) {
|
||||
}
|
||||
|
||||
function get_databases() {
|
||||
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"
|
||||
);
|
||||
return get_vals("SELECT tablespace_name FROM user_tablespaces ORDER BY 1");
|
||||
}
|
||||
|
||||
function limit($query, $where, $limit, $offset = 0, $separator = " ") {
|
||||
@@ -307,7 +304,7 @@ ORDER BY 1"
|
||||
"null" => ($row["NULLABLE"] == "Y"),
|
||||
//! "auto_increment" => false,
|
||||
//! "collation" => $row["CHARACTER_SET_NAME"],
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1),
|
||||
"privileges" => array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1),
|
||||
//! "comment" => $row["Comment"],
|
||||
//! "primary" => ($row["Key"] == "PRI"),
|
||||
);
|
||||
@@ -489,6 +486,17 @@ 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;
|
||||
}
|
||||
|
||||
function process_list() {
|
||||
return get_rows('SELECT sess.process AS "process", sess.username AS "user", sess.schemaname AS "schema", sess.status AS "status", sess.wait_class AS "wait_class", sess.seconds_in_wait AS "seconds_in_wait", sql.sql_text AS "sql_text", sess.machine AS "machine", sess.port AS "port"
|
||||
FROM v$session sess LEFT OUTER JOIN v$sql sql
|
||||
@@ -532,7 +540,8 @@ ORDER BY PROCESS
|
||||
'types' => $types,
|
||||
'structured_types' => $structured_types,
|
||||
'unsigned' => array(),
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"),
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"),
|
||||
'operator_like' => "LIKE %%",
|
||||
'functions' => array("length", "lower", "round", "upper"),
|
||||
'grouping' => array("avg", "count", "count distinct", "max", "min", "sum"),
|
||||
'edit_functions' => array(
|
||||
|
@@ -19,11 +19,14 @@ 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
|
||||
@@ -152,14 +155,19 @@ 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;
|
||||
}
|
||||
|
||||
@@ -221,9 +229,9 @@ if (isset($_GET["pgsql"])) {
|
||||
return $query;
|
||||
}
|
||||
|
||||
function convertSearch($idf, $val, $field) {
|
||||
function convertSearch($idf, array $where, array $field) {
|
||||
$textTypes = "char|text";
|
||||
if (strpos($val["op"], "LIKE") === false) {
|
||||
if (strpos($where["op"], "LIKE") === false) {
|
||||
$textTypes .= "|date|time(stamp)?|boolean|uuid|inet|cidr|macaddr|" . number_type();
|
||||
}
|
||||
|
||||
@@ -249,14 +257,6 @@ if (isset($_GET["pgsql"])) {
|
||||
}
|
||||
}
|
||||
|
||||
function hasCStyleEscapes() {
|
||||
static $c_style;
|
||||
if ($c_style === null) {
|
||||
$c_style = ($this->_conn->result("SHOW standard_conforming_strings") == "off");
|
||||
}
|
||||
return $c_style;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -292,8 +292,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 = " ") {
|
||||
@@ -323,7 +323,7 @@ ORDER BY d.datname");
|
||||
|
||||
function tables_list() {
|
||||
$query = "SELECT table_name, table_type FROM information_schema.tables WHERE table_schema = current_schema()";
|
||||
if (support("materializedview")) {
|
||||
if (support('materializedview')) { // ' - support("materializedview") could be removed by compile.php
|
||||
$query .= "
|
||||
UNION ALL
|
||||
SELECT matviewname, 'MATERIALIZED VIEW'
|
||||
@@ -341,15 +341,7 @@ 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')
|
||||
@@ -374,6 +366,7 @@ 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
|
||||
@@ -402,7 +395,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);
|
||||
$row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1, "where" => 1, "order" => 1);
|
||||
if (preg_match('~(.+)::[^,)]+(.*)~', $row["default"], $match)) {
|
||||
$row["default"] = ($match[1] == "NULL" ? null : idf_unescape($match[1]) . $match[2]);
|
||||
}
|
||||
@@ -458,6 +451,23 @@ 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)) . ")")));
|
||||
@@ -478,7 +488,7 @@ ORDER BY conkey, 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 nl_br($return);
|
||||
return nl2br($return);
|
||||
}
|
||||
|
||||
function create_database($db, $collation) {
|
||||
@@ -492,8 +502,7 @@ ORDER BY conkey, conname") as $row) {
|
||||
}
|
||||
|
||||
function rename_database($name, $collation) {
|
||||
global $connection;
|
||||
$connection->close();
|
||||
//! current database cannot be renamed
|
||||
return queries("ALTER DATABASE " . idf_escape(DB) . " RENAME TO " . idf_escape($name));
|
||||
}
|
||||
|
||||
@@ -507,7 +516,6 @@ ORDER BY conkey, 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];
|
||||
@@ -529,15 +537,10 @@ ORDER BY conkey, conname") as $row) {
|
||||
$queries[] = "ALTER TABLE " . table($name) . " RENAME $column TO $val[0]";
|
||||
}
|
||||
$alter[] = "ALTER $column TYPE$val[1]";
|
||||
$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]";
|
||||
if (!$val[6]) {
|
||||
$alter[] = "ALTER $column " . ($val[3] ? "SET$val[3]" : "DROP DEFAULT");
|
||||
$alter[] = "ALTER $column " . ($val[2] == " NULL" ? "DROP NOT" : "SET") . $val[2];
|
||||
}
|
||||
$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) : "''");
|
||||
@@ -550,9 +553,6 @@ ORDER BY conkey, 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 +720,7 @@ ORDER BY SPECIFIC_NAME');
|
||||
}
|
||||
|
||||
function types() {
|
||||
return get_key_vals("SELECT oid, typname
|
||||
return get_vals("SELECT typname
|
||||
FROM pg_type
|
||||
WHERE typnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema())
|
||||
AND typtype IN ('b','d','e')
|
||||
@@ -743,9 +743,9 @@ AND typelem = 0"
|
||||
$connection2 = $connection;
|
||||
}
|
||||
$return = $connection2->query("SET search_path TO " . idf_escape($schema));
|
||||
foreach (types() as $key => $type) { //! get types from current_schemas('t')
|
||||
foreach (types() as $type) { //! get types from current_schemas('t')
|
||||
if (!isset($types[$type])) {
|
||||
$types[$type] = $key;
|
||||
$types[$type] = 0;
|
||||
$structured_types[lang('User types')][] = $type;
|
||||
}
|
||||
}
|
||||
@@ -770,6 +770,8 @@ AND typelem = 0"
|
||||
}
|
||||
|
||||
function create_sql($table, $auto_increment, $style) {
|
||||
global $connection;
|
||||
$return = '';
|
||||
$return_parts = array();
|
||||
$sequences = array();
|
||||
|
||||
@@ -781,6 +783,7 @@ AND typelem = 0"
|
||||
$fields = fields($table);
|
||||
$indexes = indexes($table);
|
||||
ksort($indexes);
|
||||
$constraints = constraints($table);
|
||||
|
||||
if (!$status || empty($fields)) {
|
||||
return false;
|
||||
@@ -798,15 +801,13 @@ AND typelem = 0"
|
||||
// sequences for fields
|
||||
if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
|
||||
$sequence_name = $matches[1];
|
||||
$sq = reset(get_rows(min_version(10)
|
||||
$rows = 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"] + 1) : "")
|
||||
. " 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]" : "") . " CACHE $sq[cache_value];";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -823,18 +824,8 @@ 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) . " $consrc";
|
||||
$return_parts[] = "CONSTRAINT " . idf_escape($conname) . " CHECK $consrc";
|
||||
}
|
||||
|
||||
$return .= implode(",\n ", $return_parts) . "\n) WITH (oids = " . ($status['Oid'] ? 'true' : 'false') . ");";
|
||||
@@ -850,7 +841,7 @@ ORDER BY connamespace, conname"
|
||||
}
|
||||
}
|
||||
|
||||
// comments for table & fields
|
||||
// coments for table & fields
|
||||
if ($status['Comment']) {
|
||||
$return .= "\n\nCOMMENT ON TABLE " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " IS " . q($status['Comment']) . ";";
|
||||
}
|
||||
@@ -887,6 +878,23 @@ ORDER BY connamespace, conname"
|
||||
return get_key_vals("SHOW ALL");
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_c_style_escapes() {
|
||||
static $c_style = null;
|
||||
|
||||
if ($c_style === null) {
|
||||
$c_style = get_vals("SHOW standard_conforming_strings")[0] == "off";
|
||||
}
|
||||
|
||||
return $c_style;
|
||||
}
|
||||
|
||||
function process_list() {
|
||||
return get_rows("SELECT * FROM pg_stat_activity ORDER BY " . (min_version(9.2) ? "pid" : "procpid"));
|
||||
}
|
||||
@@ -902,7 +910,7 @@ ORDER BY connamespace, conname"
|
||||
}
|
||||
|
||||
function support($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);
|
||||
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);
|
||||
}
|
||||
|
||||
function kill_process($val) {
|
||||
@@ -938,7 +946,9 @@ ORDER BY connamespace, conname"
|
||||
'types' => $types,
|
||||
'structured_types' => $structured_types,
|
||||
'unsigned' => array(),
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "~", "!~", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"), // no "SQL" to avoid CSRF
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "~", "~*", "!~", "!~*", "LIKE", "LIKE %%", "ILIKE", "ILIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL"), // no "SQL" to avoid CSRF
|
||||
'operator_like' => "LIKE %%",
|
||||
'operator_regexp' => '~*',
|
||||
'functions' => array("char_length", "lower", "round", "to_hex", "to_timestamp", "upper"),
|
||||
'grouping' => array("avg", "count", "count distinct", "max", "min", "sum"),
|
||||
'edit_functions' => array(
|
||||
@@ -951,6 +961,7 @@ ORDER BY connamespace, conname"
|
||||
"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 ? $row[$field] : false;
|
||||
return $row[$field];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
"privileges" => array("select" => 1, "insert" => 1, "update" => 1, "where" => 1, "order" => 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 = 0, $indexes = array()) {
|
||||
function recreate_table($table, $name, $fields, $originals, $foreign, $auto_increment, $indexes = array()) {
|
||||
global $connection;
|
||||
if ($table != "") {
|
||||
if (!$fields) {
|
||||
@@ -758,12 +758,23 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
function show_variables() {
|
||||
global $connection;
|
||||
$return = array();
|
||||
foreach (get_rows("PRAGMA pragma_list") as $row) {
|
||||
$return[$row["name"]] = $connection->result("PRAGMA $row[name]");
|
||||
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");
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
function is_strict_mode() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_c_style_escapes() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function show_status() {
|
||||
$return = array();
|
||||
foreach (get_vals("PRAGMA compile_options") as $option) {
|
||||
@@ -793,6 +804,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||
'structured_types' => array_keys($types),
|
||||
'unsigned' => array(),
|
||||
'operators' => array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "IN", "IS NULL", "NOT LIKE", "NOT IN", "IS NOT NULL", "SQL"), // REGEXP can be user defined function
|
||||
'operator_like' => "LIKE %%",
|
||||
'functions' => array("hex", "length", "lower", "round", "unixepoch", "upper"),
|
||||
'grouping' => array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"),
|
||||
'edit_functions' => array(
|
||||
|
@@ -53,12 +53,12 @@ SET foreign_key_checks = 0;
|
||||
$out = "";
|
||||
|
||||
if ($_POST["routines"]) {
|
||||
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";
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,9 @@ SET foreign_key_checks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
echo ($out && $jush == 'sql' ? "DELIMITER ;;\n\n$out" . "DELIMITER ;\n\n" : $out);
|
||||
if ($out) {
|
||||
echo "DELIMITER ;;\n\n$out" . "DELIMITER ;\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
if ($_POST["table_style"] || $_POST["data_style"]) {
|
||||
@@ -135,7 +137,7 @@ page_header(lang('Export'), $error, ($_GET["export"] != "" ? array("table" => $_
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<table class="layout">
|
||||
<table cellspacing="0" class="layout">
|
||||
<?php
|
||||
$db_style = array('', 'USE', 'DROP+CREATE', 'CREATE');
|
||||
$table_style = array('', 'DROP+CREATE', 'CREATE');
|
||||
@@ -145,16 +147,14 @@ if ($jush == "sql") { //! use insertUpdate() in all drivers
|
||||
}
|
||||
parse_str($_COOKIE["adminer_export"], $row);
|
||||
if (!$row) {
|
||||
$row = array("output" => "text", "format" => "sql", "db_style" => (DB != "" ? "" : "CREATE"), "table_style" => "DROP+CREATE", "data_style" => "INSERT");
|
||||
$row = array("output" => "file", "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('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 "<tr><th>" . lang('Format') . "<td>" . html_select("format", $adminer->dumpFormat(), $row["format"], false) . "\n"; // false = 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,12 +167,15 @@ 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>
|
||||
<table cellspacing="0">
|
||||
<?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(array(
|
||||
return new AdminerPlugin([
|
||||
// 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 class="layout">
|
||||
<table cellspacing="0" 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;../externals/jush/jush.css', 'minify_css'));
|
||||
echo lzw_decompress(compile_file('../adminer/static/default.css;../vendor/vrana/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('../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'));
|
||||
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'));
|
||||
} 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>
|
||||
<table cellspacing="0">
|
||||
<thead><tr><th id="label-source"><?php echo lang('Source'); ?><th id="label-target"><?php echo lang('Target'); ?></thead>
|
||||
<?php
|
||||
$j = 0;
|
||||
@@ -96,8 +96,8 @@ foreach ($row["source"] as $key => $val) {
|
||||
'sql' => "innodb-foreign-key-constraints.html",
|
||||
'mariadb' => "foreign-keys/",
|
||||
'pgsql' => "sql-createtable.html#SQL-CREATETABLE-REFERENCES",
|
||||
'mssql' => "t-sql/statements/create-table-transact-sql",
|
||||
'oracle' => "SQLRF01111",
|
||||
'mssql' => "ms174979.aspx",
|
||||
'oracle' => "https://docs.oracle.com/cd/B19306_01/server.102/b14200/clauses002.htm#sthref2903",
|
||||
)); ?>
|
||||
<p>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
|
@@ -3,7 +3,11 @@
|
||||
|
||||
class Adminer {
|
||||
/** @var array operators used in select, null for all operators */
|
||||
var $operators;
|
||||
var $operators = null;
|
||||
/** @var string operator for LIKE condition */
|
||||
var $operator_like = null;
|
||||
/** @var string operator for regular expression condition */
|
||||
var $operator_regexp = null;
|
||||
|
||||
/** Name in title and navigation
|
||||
* @return string HTML code
|
||||
@@ -13,24 +17,28 @@ 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 ["key" => filename, "cert" => filename, "ca" => filename] or null
|
||||
* @return array array("key" => filename, "cert" => filename, "ca" => filename) or null
|
||||
*/
|
||||
function connectSsl() {
|
||||
}
|
||||
|
||||
/** Get key used for permanent login
|
||||
* @param bool
|
||||
* @return string cryptic string which gets combined with password or false in case of an error
|
||||
*/
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
function permanentLogin($create = false) {
|
||||
return password_file($create);
|
||||
return get_private_key($create);
|
||||
}
|
||||
|
||||
/** Return key used to group brute force attacks; behind a reverse proxy, you want to return the last part of X-Forwarded-For
|
||||
@@ -96,7 +104,7 @@ class Adminer {
|
||||
*/
|
||||
function head() {
|
||||
?>
|
||||
<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">
|
||||
<link rel="stylesheet" type="text/css" href="../vendor/vrana/jush/jush.css">
|
||||
<?php
|
||||
return true;
|
||||
}
|
||||
@@ -118,10 +126,10 @@ class Adminer {
|
||||
*/
|
||||
function loginForm() {
|
||||
global $drivers;
|
||||
echo "<table class='layout'>\n";
|
||||
echo "<table cellspacing='0' 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" autofocus value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">' . script("qs('#username').form['auth[driver]'].onchange();"));
|
||||
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('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";
|
||||
@@ -231,24 +239,33 @@ class Adminer {
|
||||
*/
|
||||
function selectQuery($query, $start, $failed = false) {
|
||||
global $jush, $driver;
|
||||
$return = "</p>\n"; // required for IE9 inline edit
|
||||
|
||||
$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>" : "");
|
||||
|
||||
if (!$failed && ($warnings = $driver->warnings())) {
|
||||
$id = "warnings";
|
||||
$return = ", <a href='#$id'>" . lang('Warnings') . "</a>" . script("qsl('a').onclick = partial(toggle, '$id');", "")
|
||||
. "$return<div id='$id' class='hidden'>\n$warnings</div>\n"
|
||||
;
|
||||
$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 "<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
|
||||
;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/** 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);
|
||||
}
|
||||
|
||||
@@ -292,7 +309,7 @@ class Adminer {
|
||||
if (preg_match('~json~', $field["type"])) {
|
||||
$return = "<code class='jush-js'>$return</code>";
|
||||
}
|
||||
return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? target_blank() : "") . ">$return</a>" : $return);
|
||||
return ($link ? "<a href='" . h($link) . "'" . (is_web_url($link) ? target_blank() : "") . ">$return</a>" : $return);
|
||||
}
|
||||
|
||||
/** Value conversion used in select and edit
|
||||
@@ -301,6 +318,11 @@ class Adminer {
|
||||
* @return string
|
||||
*/
|
||||
function editVal($val, $field) {
|
||||
// Format Elasticsearch boolean value, but do not touch PostgreSQL boolean that use string value 't' or 'f'.
|
||||
if ($field["type"] == "boolean" && is_bool($val)) {
|
||||
return $val ? "true" : "false";
|
||||
}
|
||||
|
||||
return $val;
|
||||
}
|
||||
|
||||
@@ -309,17 +331,12 @@ class Adminer {
|
||||
* @return null
|
||||
*/
|
||||
function tableStructurePrint($fields) {
|
||||
global $structured_types;
|
||||
echo "<div class='scrollable'>\n";
|
||||
echo "<table class='nowrap odds'>\n";
|
||||
echo "<table cellspacing='0' class='nowrap'>\n";
|
||||
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
|
||||
foreach ($fields as $field) {
|
||||
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 "<tr" . odd() . "><th>" . h($field["field"]);
|
||||
echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_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>" : "");
|
||||
@@ -330,15 +347,40 @@ class Adminer {
|
||||
echo "</div>\n";
|
||||
}
|
||||
|
||||
function tablePartitionsPrint($partition_info) {
|
||||
$showList = $partition_info["partition_by"] == "RANGE" || $partition_info["partition_by"] == "LIST";
|
||||
|
||||
echo "<p>";
|
||||
echo "<code>{$partition_info["partition_by"]} ({$partition_info["partition"]})</code>";
|
||||
if (!$showList) {
|
||||
echo " " . lang('Partitions') . ": " . h($partition_info["partitions"]);
|
||||
}
|
||||
echo "</p>";
|
||||
|
||||
if ($showList) {
|
||||
echo "<table>\n";
|
||||
echo "<thead><tr><th>" . lang('Partition') . "</th><td>" . lang('Values') . "</td></tr></thead>\n";
|
||||
|
||||
foreach ($partition_info["partition_names"] as $key => $name) {
|
||||
echo "<tr><th>" . h($name) . "</th><td>" . h($partition_info["partition_values"][$key]) . "\n";
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
}
|
||||
}
|
||||
|
||||
/** Print list of indexes on table in tabular format
|
||||
* @param array data about all indexes on a table
|
||||
* @return null
|
||||
*/
|
||||
function tableIndexesPrint($indexes) {
|
||||
echo "<table>\n";
|
||||
echo "<thead><tr><th>" . lang('Type') . "</th><td>" . lang('Column (length)') . "</td></tr></thead>\n";
|
||||
|
||||
foreach ($indexes as $name => $index) {
|
||||
ksort($index["columns"]); // enforce correct columns order
|
||||
$print = array();
|
||||
$print = [];
|
||||
|
||||
foreach ($index["columns"] as $key => $val) {
|
||||
$print[] = "<i>" . h($val) . "</i>"
|
||||
. ($index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "")
|
||||
@@ -347,92 +389,127 @@ class Adminer {
|
||||
}
|
||||
echo "<tr title='" . h($name) . "'><th>$index[type]<td>" . implode(", ", $print) . "\n";
|
||||
}
|
||||
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
||||
/** Print columns box in select
|
||||
* @param array result of selectColumnsProcess()[0]
|
||||
* @param array selectable columns
|
||||
* @return null
|
||||
*/
|
||||
/**
|
||||
* Prints columns box in select filter.
|
||||
*
|
||||
* @param array $select result of selectColumnsProcess()[0]
|
||||
* @param array $columns selectable columns
|
||||
*/
|
||||
function selectColumnsPrint($select, $columns) {
|
||||
global $functions, $grouping;
|
||||
print_fieldset("select", lang('Select'), $select);
|
||||
|
||||
print_fieldset("select", lang('Select'), $select, true);
|
||||
|
||||
$_GET["columns"][""] = [];
|
||||
$i = 0;
|
||||
$select[""] = array();
|
||||
foreach ($select as $key => $val) {
|
||||
$val = $_GET["columns"][$key];
|
||||
|
||||
foreach ($_GET["columns"] as $key => $val) {
|
||||
if ($key != "" && $val["col"] == "") continue;
|
||||
|
||||
$column = select_input(
|
||||
" name='columns[$i][col]'",
|
||||
"name='columns[$i][col]'",
|
||||
$columns,
|
||||
$val["col"],
|
||||
($key !== "" ? "selectFieldChange" : "selectAddRow")
|
||||
$key !== "" ? "selectFieldChange" : "selectAddRow"
|
||||
);
|
||||
echo "<div>" . ($functions || $grouping ? "<select name='columns[$i][fun]'>"
|
||||
. optionlist(array(-1 => "") + array_filter(array(lang('Functions') => $functions, lang('Aggregation') => $grouping)), $val["fun"]) . "</select>"
|
||||
. on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'", 1)
|
||||
. script("qsl('select').onchange = function () { helpClose();" . ($key !== "" ? "" : " qsl('select, input', this.parentNode).onchange();") . " };", "")
|
||||
. "($column)" : $column) . "</div>\n";
|
||||
|
||||
echo "<div ", ($key != "" ? "" : "class='no-sort'"), ">",
|
||||
"<span class='jsonly handle'></span>";
|
||||
|
||||
if ($functions || $grouping) {
|
||||
echo "<select name='columns[$i][fun]'>",
|
||||
optionlist([-1 => ""] + array_filter([lang('Functions') => $functions, lang('Aggregation') => $grouping]), $val["fun"]),
|
||||
"</select>",
|
||||
on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'", 1),
|
||||
script("qsl('select').onchange = (event) => { helpClose();" . ($key !== "" ? "" : " qsl('select, input:not(.remove)', event.target.parentNode).onchange();") . " };", ""),
|
||||
"($column)";
|
||||
} else {
|
||||
echo $column;
|
||||
}
|
||||
|
||||
echo " <input type='image' src='../adminer/static/cross.gif' class='jsonly icon remove' title='" . h(lang('Remove')) . "' alt='x'>",
|
||||
script("qsl('#fieldset-select .remove').onclick = selectRemoveRow;", ""),
|
||||
"</div>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
echo "</div></fieldset>\n";
|
||||
|
||||
echo "</div>", script("initSortable('#fieldset-select');"), "</fieldset>\n";
|
||||
}
|
||||
|
||||
/** Print search box in select
|
||||
* @param array result of selectSearchProcess()
|
||||
* @param array selectable columns
|
||||
* @param array
|
||||
* @return null
|
||||
*/
|
||||
/**
|
||||
* Prints search box in select.
|
||||
*
|
||||
* @param array $where result of selectSearchProcess()
|
||||
* @param array $columns selectable columns
|
||||
*/
|
||||
function selectSearchPrint($where, $columns, $indexes) {
|
||||
print_fieldset("search", lang('Search'), $where);
|
||||
|
||||
foreach ($indexes as $i => $index) {
|
||||
if ($index["type"] == "FULLTEXT") {
|
||||
echo "<div>(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST";
|
||||
echo " <input type='search' name='fulltext[$i]' value='" . h($_GET["fulltext"][$i]) . "'>";
|
||||
echo script("qsl('input').oninput = selectFieldChange;", "");
|
||||
echo checkbox("boolean[$i]", 1, isset($_GET["boolean"][$i]), "BOOL");
|
||||
echo "</div>\n";
|
||||
echo "<div>(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST",
|
||||
" <input type='search' name='fulltext[$i]' value='" . h($_GET["fulltext"][$i]) . "'>",
|
||||
script("qsl('input').oninput = selectFieldChange;", ""),
|
||||
checkbox("boolean[$i]", 1, isset($_GET["boolean"][$i]), "BOOL"),
|
||||
"</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$change_next = "this.parentNode.firstChild.onchange();";
|
||||
foreach (array_merge((array) $_GET["where"], array(array())) as $i => $val) {
|
||||
if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) {
|
||||
echo "<div>" . select_input(
|
||||
" name='where[$i][col]'",
|
||||
$columns,
|
||||
$val["col"],
|
||||
($val ? "selectFieldChange" : "selectAddRow"),
|
||||
"(" . lang('anywhere') . ")"
|
||||
);
|
||||
echo html_select("where[$i][op]", $this->operators, $val["op"], $change_next);
|
||||
echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "'>";
|
||||
echo script("mixin(qsl('input'), {oninput: function () { $change_next }, onkeydown: selectSearchKeydown, onsearch: selectSearchSearch});", "");
|
||||
echo "</div>\n";
|
||||
echo "<div>",
|
||||
select_input(
|
||||
" name='where[$i][col]'",
|
||||
$columns,
|
||||
$val["col"],
|
||||
($val ? "selectFieldChange" : "selectAddRow"),
|
||||
"(" . lang('anywhere') . ")"
|
||||
),
|
||||
html_select("where[$i][op]", $this->operators, $val["op"], $change_next),
|
||||
"<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "'>",
|
||||
script("mixin(qsl('input'), {oninput: function () { $change_next }, onkeydown: selectSearchKeydown, onsearch: selectSearchSearch});", ""),
|
||||
" <input type='image' src='../adminer/static/cross.gif' class='jsonly icon remove' title='" . h(lang('Remove')) . "' alt='x'>",
|
||||
script('qsl("#fieldset-search .remove").onclick = selectRemoveRow;', ""),
|
||||
"</div>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</div></fieldset>\n";
|
||||
}
|
||||
|
||||
/** Print order box in select
|
||||
* @param array result of selectOrderProcess()
|
||||
* @param array selectable columns
|
||||
* @param array
|
||||
* @return null
|
||||
*/
|
||||
/**
|
||||
* Prints order box in select filter.
|
||||
*
|
||||
* @param array $order result of selectOrderProcess()
|
||||
* @param array $columns selectable columns
|
||||
*/
|
||||
function selectOrderPrint($order, $columns, $indexes) {
|
||||
print_fieldset("sort", lang('Sort'), $order);
|
||||
print_fieldset("sort", lang('Sort'), $order, true);
|
||||
|
||||
$_GET["order"][""] = "";
|
||||
$i = 0;
|
||||
|
||||
foreach ((array) $_GET["order"] as $key => $val) {
|
||||
if ($val != "") {
|
||||
echo "<div>" . select_input(" name='order[$i]'", $columns, $val, "selectFieldChange");
|
||||
echo checkbox("desc[$i]", 1, isset($_GET["desc"][$key]), lang('descending')) . "</div>\n";
|
||||
$i++;
|
||||
}
|
||||
if ($key != "" && $val == "") continue;
|
||||
|
||||
echo "<div ", ($key != "" ? "" : "class='no-sort'"), ">",
|
||||
"<span class='jsonly handle'></span>",
|
||||
select_input("name='order[$i]'", $columns, $val, $key !== "" ? "selectFieldChange" : "selectAddRow"),
|
||||
checkbox("desc[$i]", 1, isset($_GET["desc"][$key]), lang('descending')),
|
||||
" <input type='image' src='../adminer/static/cross.gif' class='jsonly icon remove' title='" . h(lang('Remove')) . "' alt='x'>",
|
||||
script('qsl("#fieldset-sort .remove").onclick = selectRemoveRow;', ""),
|
||||
"</div>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
echo "<div>" . select_input(" name='order[$i]'", $columns, "", "selectAddRow");
|
||||
echo checkbox("desc[$i]", 1, false, lang('descending')) . "</div>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
|
||||
echo "</div>", script("initSortable('#fieldset-sort');"), "</fieldset>\n";
|
||||
}
|
||||
|
||||
/** Print limit box in select
|
||||
@@ -510,7 +587,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;
|
||||
@@ -533,49 +610,62 @@ class Adminer {
|
||||
* @return array expressions to join by AND
|
||||
*/
|
||||
function selectSearchProcess($fields, $indexes) {
|
||||
global $connection, $driver;
|
||||
$return = array();
|
||||
global $driver;
|
||||
|
||||
$return = [];
|
||||
|
||||
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 $key => $val) {
|
||||
if ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators)) {
|
||||
|
||||
foreach ((array) $_GET["where"] as $where) {
|
||||
$col = $where["col"];
|
||||
$op = $where["op"];
|
||||
$val = $where["val"];
|
||||
|
||||
if ("$col$val" != "" && in_array($op, $this->operators)) {
|
||||
$prefix = "";
|
||||
$cond = " $val[op]";
|
||||
if (preg_match('~IN$~', $val["op"])) {
|
||||
$in = process_length($val["val"]);
|
||||
$cond = " $op";
|
||||
|
||||
if (preg_match('~IN$~', $op)) {
|
||||
$in = process_length($val);
|
||||
$cond .= " " . ($in != "" ? $in : "(NULL)");
|
||||
} 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"]) . ", ";
|
||||
} 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) . ", ";
|
||||
$cond = ")";
|
||||
} elseif (!preg_match('~NULL$~', $val["op"])) {
|
||||
$cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
|
||||
} elseif (!preg_match('~NULL$~', $op)) {
|
||||
$cond .= " " . $this->processInput($fields[$col], $val);
|
||||
}
|
||||
if ($val["col"] != "") {
|
||||
$return[] = $prefix . $driver->convertSearch(idf_escape($val["col"]), $val, $fields[$val["col"]]) . $cond;
|
||||
|
||||
if ($col != "") {
|
||||
$return[] = $prefix . $driver->convertSearch(idf_escape($col), $where, $fields[$col]) . $cond;
|
||||
} else {
|
||||
// find anywhere
|
||||
$cols = array();
|
||||
foreach ($fields as $name => $field) {
|
||||
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"]))
|
||||
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))
|
||||
&& (!preg_match('~^elastic~', DRIVER) || $field["type"] != "boolean" || preg_match('~true|false~', $val)) // Elasticsearch needs boolean value properly formatted.
|
||||
&& (!preg_match('~^elastic~', DRIVER) || strpos($op, "regexp") === false || preg_match('~text|keyword~', $field["type"])) // Elasticsearch can use regexp only on text and keyword fields.
|
||||
) {
|
||||
$cols[] = $prefix . $driver->convertSearch(idf_escape($name), $val, $field) . $cond;
|
||||
$cols[] = $prefix . $driver->convertSearch(idf_escape($name), $where, $field) . $cond;
|
||||
}
|
||||
}
|
||||
$return[] = ($cols ? "(" . implode(" OR ", $cols) . ")" : "1 = 0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -706,11 +796,11 @@ class Adminer {
|
||||
* @param string
|
||||
* @return string custom input field or empty string for default
|
||||
*/
|
||||
function editInput($table, $field, $attrs, $value) {
|
||||
function editInput($table, $field, $attrs, $value, $function) {
|
||||
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, $value === 0 ? 0 : null) // 0 - empty value
|
||||
. enum_input("radio", $attrs, $field, $value, 0) // 0 - empty
|
||||
;
|
||||
}
|
||||
return "";
|
||||
@@ -758,10 +848,11 @@ class Adminer {
|
||||
* @return array
|
||||
*/
|
||||
function dumpOutput() {
|
||||
$return = array('text' => lang('open'), 'file' => lang('save'));
|
||||
$return = array('file' => lang('save'), 'text' => lang('open'));
|
||||
if (function_exists('gzencode')) {
|
||||
$return['gz'] = 'gzip';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -822,9 +913,8 @@ 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";
|
||||
@@ -836,7 +926,7 @@ class Adminer {
|
||||
$insert = "";
|
||||
$buffer = "";
|
||||
$keys = array();
|
||||
$generated = array();
|
||||
$generatedKeys = array();
|
||||
$suffix = "";
|
||||
$fetch_function = ($table != '' ? 'fetch_assoc' : 'fetch_row');
|
||||
while ($row = $result->$fetch_function()) {
|
||||
@@ -844,10 +934,10 @@ class Adminer {
|
||||
$values = array();
|
||||
foreach ($row as $val) {
|
||||
$field = $result->fetch_field();
|
||||
if ($fields[$field->name]['generated']) {
|
||||
$generated[$field->name] = true;
|
||||
if (!empty($fields[$field->name]['generated'])) {
|
||||
$generatedKeys[$field->name] = true;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$keys[] = $field->name;
|
||||
$key = idf_escape($field->name);
|
||||
$values[] = "$key = VALUES($key)";
|
||||
@@ -865,10 +955,10 @@ class Adminer {
|
||||
$insert = "INSERT INTO " . table($table) . " (" . implode(", ", array_map('idf_escape', $keys)) . ") VALUES";
|
||||
}
|
||||
foreach ($row as $key => $val) {
|
||||
if ($generated[$key]) {
|
||||
if (isset($generatedKeys[$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)))
|
||||
@@ -922,9 +1012,11 @@ class Adminer {
|
||||
return $ext;
|
||||
}
|
||||
|
||||
/** Set the path of the file for webserver load
|
||||
* @return string path of the sql dump file
|
||||
*/
|
||||
/**
|
||||
* Gets the path of the file for webserver load.
|
||||
*
|
||||
* @return string Path of the sql import file.
|
||||
*/
|
||||
function importServerPath() {
|
||||
return "adminer.sql";
|
||||
}
|
||||
@@ -948,14 +1040,17 @@ class Adminer {
|
||||
global $VERSION, $jush, $drivers, $connection;
|
||||
?>
|
||||
<h1>
|
||||
<?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>
|
||||
<?php echo $this->name(); ?>
|
||||
<?php if ($missing != "auth"): ?>
|
||||
<span class="version">
|
||||
<?php echo $VERSION; ?>
|
||||
<a href="https://github.com/pematon/adminer/releases"<?php echo target_blank(); ?> id="version">
|
||||
<?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?>
|
||||
</a>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</h1>
|
||||
<?php
|
||||
switch_lang();
|
||||
if ($missing == "auth") {
|
||||
$output = "";
|
||||
foreach ((array) $_SESSION["pwds"] as $vendor => $servers) {
|
||||
@@ -964,7 +1059,14 @@ class Adminer {
|
||||
if ($password !== null) {
|
||||
$dbs = $_SESSION["db"][$vendor][$server][$username];
|
||||
foreach (($dbs ? array_keys($dbs) : array("")) as $db) {
|
||||
$output .= "<li><a href='" . h(auth_url($vendor, $server, $username, $db)) . "'>($drivers[$vendor]) " . h($username . ($server != "" ? "@" . $this->serverName($server) : "") . ($db != "" ? " - $db" : "")) . "</a>\n";
|
||||
$output .= "<li><a href='" . h(auth_url($vendor, $server, $username, $db)) . "'>"
|
||||
. h($drivers[$vendor])
|
||||
. ($username != "" || $server != "" ? " - " : "")
|
||||
. h($username)
|
||||
. ($username != "" && $server != "" ? "@" : "")
|
||||
. ($server != "" ? h($this->serverName($server)) : "")
|
||||
. ($db != "" ? h(" - $db") : "")
|
||||
. "</a></li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -979,12 +1081,12 @@ class Adminer {
|
||||
$connection->select_db(DB);
|
||||
$tables = table_status('', true);
|
||||
}
|
||||
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");
|
||||
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");
|
||||
if (support("sql")) {
|
||||
echo script_src("../externals/jush/modules/jush-$jush.js");
|
||||
echo script_src("../vendor/vrana/jush/modules/jush-$jush.js");
|
||||
?>
|
||||
<script<?php echo nonce(); ?>>
|
||||
<?php
|
||||
@@ -1004,8 +1106,10 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
$this->databasesPrint($missing);
|
||||
$actions = array();
|
||||
|
||||
$actions = [];
|
||||
if (DB == "" || !$missing) {
|
||||
if (support("sql")) {
|
||||
$actions[] = "<a href='" . h(ME) . "sql='" . bold(isset($_GET["sql"]) && !isset($_GET["import"])) . ">" . lang('SQL command') . "</a>";
|
||||
@@ -1015,13 +1119,16 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '
|
||||
$actions[] = "<a href='" . h(ME) . "dump=" . urlencode(isset($_GET["table"]) ? $_GET["table"] : $_GET["select"]) . "' id='dump'" . bold(isset($_GET["dump"])) . ">" . lang('Export') . "</a>";
|
||||
}
|
||||
}
|
||||
$in_db = $_GET["ns"] !== "" && !$missing && DB != "";
|
||||
if ($in_db) {
|
||||
$actions[] = '<a href="' . h(ME) . 'create="' . bold($_GET["create"] === "") . ">" . lang('Create table') . "</a>";
|
||||
if ($_GET["ns"] !== "" && !$missing && DB != "") {
|
||||
$actions[] = '<a href="' . h(ME) . 'create="' . bold($_GET["create"] === "") . ">" . lang('Create table') . "</a>\n";
|
||||
}
|
||||
echo ($actions ? "<p class='links'>\n" . implode("\n", $actions) . "\n" : "");
|
||||
if ($in_db) {
|
||||
if ($actions) {
|
||||
echo "<p class='links'>" . implode("\n", $actions) . "</p>";
|
||||
}
|
||||
|
||||
if ($_GET["ns"] !== "" && !$missing && DB != "") {
|
||||
if ($tables) {
|
||||
$this->printTablesFilter();
|
||||
$this->tablesPrint($tables);
|
||||
} else {
|
||||
echo "<p class='message'>" . lang('No tables.') . "</p>\n";
|
||||
@@ -1030,66 +1137,97 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\d\.?\d).*~s', '
|
||||
}
|
||||
}
|
||||
|
||||
/** Prints databases list in menu
|
||||
* @param string
|
||||
* @return null
|
||||
*/
|
||||
/**
|
||||
* Prints databases select in menu.
|
||||
*
|
||||
* @param $missing string
|
||||
* @return null
|
||||
*/
|
||||
function databasesPrint($missing) {
|
||||
global $adminer, $connection;
|
||||
|
||||
$databases = $this->databases();
|
||||
if (DB && $databases && !in_array(DB, $databases)) {
|
||||
array_unshift($databases, DB);
|
||||
}
|
||||
?>
|
||||
<form action="">
|
||||
<p id="dbs">
|
||||
<?php
|
||||
|
||||
echo "<form action=''><p id='dbs'>";
|
||||
hidden_fields_get();
|
||||
$db_events = script("mixin(qsl('select'), {onmousedown: dbMouseDown, onchange: dbChange});");
|
||||
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' size='19'>\n"
|
||||
);
|
||||
|
||||
if ($databases) {
|
||||
echo "<select id='database-select' name='db'>" . optionlist(["" => lang('Database')] + $databases, DB) . "</select>"
|
||||
. script("mixin(qs('#database-select'), {onmousedown: dbMouseDown, onchange: dbChange});");
|
||||
} else {
|
||||
echo "<input id='database-select' name='db' value='" . h(DB) . "' autocapitalize='off'>\n";
|
||||
}
|
||||
echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\n";
|
||||
if (support("scheme")) {
|
||||
if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
|
||||
echo "<br>" . lang('Schema') . ": <select name='ns'>" . optionlist(array("" => "") + $adminer->schemas(), $_GET["ns"]) . "</select>$db_events";
|
||||
if ($_GET["ns"] != "") {
|
||||
set_schema($_GET["ns"]);
|
||||
}
|
||||
|
||||
if (support("scheme") && $missing != "db" && DB != "" && $connection->select_db(DB)) {
|
||||
echo "<br><select id='scheme-select' name='ns'>" . optionlist(["" => lang('Schema')] + $adminer->schemas(), $_GET["ns"]) . "</select>"
|
||||
. script("mixin(qs('#scheme-select'), {onmousedown: dbMouseDown, onchange: dbChange});");
|
||||
|
||||
if ($_GET["ns"] != "") {
|
||||
set_schema($_GET["ns"]);
|
||||
}
|
||||
}
|
||||
foreach (array("import", "sql", "schema", "dump", "privileges") as $val) {
|
||||
|
||||
foreach (["import", "sql", "schema", "dump", "privileges"] as $val) {
|
||||
if (isset($_GET[$val])) {
|
||||
echo "<input type='hidden' name='$val' value=''>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
echo "</p></form>\n";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Prints table list in menu
|
||||
* @param array result of table_status('', true)
|
||||
* @return null
|
||||
*/
|
||||
function printTablesFilter()
|
||||
{
|
||||
global $adminer;
|
||||
|
||||
echo "<div class='tables-filter jsonly'>"
|
||||
. "<input id='tables-filter' autocomplete='off' placeholder='" . lang('Table') . "'>"
|
||||
. script("initTablesFilter(" . json_encode($adminer->database()) . ");")
|
||||
. "</div>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints table list in menu.
|
||||
*
|
||||
* @param array $tables Result of table_status('', true)
|
||||
* @return null
|
||||
*/
|
||||
function tablesPrint($tables) {
|
||||
echo "<ul id='tables'>" . script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
|
||||
|
||||
foreach ($tables as $table => $status) {
|
||||
$name = $this->tableName($status);
|
||||
if ($name != "") {
|
||||
$active = $table == $_GET["select"] || $table == $_GET["edit"];
|
||||
|
||||
echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"'
|
||||
. bold($_GET["select"] == $table || $_GET["edit"] == $table, "select")
|
||||
. " title='" . lang('Select data') . "'>" . lang('select') . "</a> "
|
||||
;
|
||||
echo (support("table") || support("indexes")
|
||||
? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
|
||||
. bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
|
||||
. " title='" . lang('Show structure') . "'>$name</a>"
|
||||
: "<span>$name</span>"
|
||||
) . "\n";
|
||||
. bold($active, "select")
|
||||
. " title='" . lang('Select data') . "'>" . lang('select') . "</a> ";
|
||||
|
||||
if (support("table") || support("indexes")) {
|
||||
$active = in_array($table, [$_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"]]);
|
||||
$class = is_view($status) ? "view" : "structure";
|
||||
|
||||
echo '<a href="' . h(ME) . 'table=' . urlencode($table) . '"' . bold($active, $class)
|
||||
. " title='" . lang('Show structure') . "' data-main='true'>$name</a>";
|
||||
} else {
|
||||
echo "<span data-main='true'>$name</span>";
|
||||
}
|
||||
|
||||
echo "</li>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</ul>\n";
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
$connection = '';
|
||||
|
||||
$has_token = $_SESSION["token"];
|
||||
@@ -15,13 +16,78 @@ if ($_COOKIE["adminer_permanent"]) {
|
||||
}
|
||||
}
|
||||
|
||||
function add_invalid_login() {
|
||||
global $adminer;
|
||||
$fp = file_open_lock(get_temp_dir() . "/adminer.invalid");
|
||||
if (!$fp) {
|
||||
function validate_server_input() {
|
||||
if (SERVER == "") {
|
||||
return;
|
||||
}
|
||||
$invalids = unserialize(stream_get_contents($fp));
|
||||
|
||||
$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) {
|
||||
return;
|
||||
}
|
||||
$invalids = unserialize(stream_get_contents($file));
|
||||
$time = time();
|
||||
if ($invalids) {
|
||||
foreach ($invalids as $ip => $val) {
|
||||
@@ -35,13 +101,16 @@ function add_invalid_login() {
|
||||
$invalid = array($time + 30*60, 0); // active for 30 minutes
|
||||
}
|
||||
$invalid[1]++;
|
||||
file_write_unlock($fp, serialize($invalids));
|
||||
write_and_unlock_file($file, serialize($invalids));
|
||||
}
|
||||
|
||||
function check_invalid_login() {
|
||||
global $adminer;
|
||||
$invalids = unserialize(@file_get_contents(get_temp_dir() . "/adminer.invalid")); // @ - may not exist
|
||||
$invalid = ($invalids ? $invalids[$adminer->bruteForceKey()] : array());
|
||||
|
||||
$filename = get_temp_dir() . "/adminer.invalid";
|
||||
$invalids = file_exists($filename) ? unserialize(file_get_contents($filename)) : [];
|
||||
$invalid = ($invalids ? $invalids[$adminer->bruteForceKey()] : []);
|
||||
|
||||
$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)));
|
||||
@@ -52,7 +121,7 @@ $auth = $_POST["auth"];
|
||||
if ($auth) {
|
||||
session_regenerate_id(); // defense against session fixation
|
||||
$vendor = $auth["driver"];
|
||||
$server = $auth["server"];
|
||||
$server = trim($auth["server"]);
|
||||
$username = $auth["username"];
|
||||
$password = (string) $auth["password"];
|
||||
$db = $auth["db"];
|
||||
@@ -103,9 +172,10 @@ function unset_permanent() {
|
||||
}
|
||||
|
||||
/** Renders an error message and a login form
|
||||
* @param string plain text
|
||||
* @return null exits
|
||||
*/
|
||||
* @param string plain text
|
||||
* @return null exits
|
||||
* @throws \Random\RandomException
|
||||
*/
|
||||
function auth_error($error) {
|
||||
global $adminer, $has_token;
|
||||
$session_name = session_name();
|
||||
@@ -130,7 +200,7 @@ function auth_error($error) {
|
||||
$error = lang('Session support must be enabled.');
|
||||
}
|
||||
$params = session_get_cookie_params();
|
||||
cookie("adminer_key", ($_COOKIE["adminer_key"] ? $_COOKIE["adminer_key"] : rand_string()), $params["lifetime"]);
|
||||
cookie("adminer_key", ($_COOKIE["adminer_key"] ?: get_random_string()), $params["lifetime"]);
|
||||
page_header(lang('Login'), $error, null);
|
||||
echo "<form action='' method='post'>\n";
|
||||
echo "<div>";
|
||||
@@ -155,18 +225,16 @@ if (isset($_GET["username"]) && !class_exists("Min_DB")) {
|
||||
stop_session(true);
|
||||
|
||||
if (isset($_GET["username"]) && is_string(get_password())) {
|
||||
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.'));
|
||||
}
|
||||
validate_server_input();
|
||||
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) ? nl_br(h($connection)) : (is_string($login) ? $login : lang('Invalid credentials.')));
|
||||
$error = (is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid server or credentials.')));
|
||||
auth_error($error . (preg_match('~^ | $~', get_password()) ? '<br>' . lang('There is a space in the input password which might be the cause.') : ''));
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,12 @@
|
||||
<?php
|
||||
include "../adminer/include/version.inc.php";
|
||||
include "../adminer/include/errors.inc.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/coverage.inc.php";
|
||||
|
||||
// disable filter.default
|
||||
@@ -26,9 +32,9 @@ if (isset($_GET["file"])) {
|
||||
}
|
||||
|
||||
if ($_GET["script"] == "version") {
|
||||
$fp = file_open_lock(get_temp_dir() . "/adminer.version");
|
||||
if ($fp) {
|
||||
file_write_unlock($fp, serialize(array("signature" => $_POST["signature"], "version" => $_POST["version"])));
|
||||
$file = open_file_with_lock(get_temp_dir() . "/adminer.version");
|
||||
if ($file) {
|
||||
write_and_unlock_file($file, serialize(["version" => $_POST["version"]]));
|
||||
}
|
||||
exit;
|
||||
}
|
||||
@@ -87,11 +93,16 @@ $types = $config['types'];
|
||||
$structured_types = $config['structured_types'];
|
||||
$unsigned = $config['unsigned'];
|
||||
$operators = $config['operators'];
|
||||
$operator_like = $config['operator_like'];
|
||||
$operator_regexp = $config['operator_regexp'];
|
||||
$functions = $config['functions'];
|
||||
$grouping = $config['grouping'];
|
||||
$edit_functions = $config['edit_functions'];
|
||||
|
||||
if ($adminer->operators === null) {
|
||||
$adminer->operators = $operators;
|
||||
$adminer->operator_like = $operator_like;
|
||||
$adminer->operator_regexp = $operator_regexp;
|
||||
}
|
||||
|
||||
define("SERVER", $_GET[DRIVER]); // read from pgsql=localhost
|
||||
@@ -103,6 +114,7 @@ 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 class='checkable odds'>\n";
|
||||
echo "<table cellspacing='0' class='checkable'>\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>" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
|
||||
echo "<tr" . odd() . ">" . (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");
|
||||
}
|
||||
|
||||
|
14
adminer/include/debug.inc.php
Normal file
14
adminer/include/debug.inc.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
function dump($value)
|
||||
{
|
||||
echo "<pre>";
|
||||
var_export($value);
|
||||
echo "</pre>\n";
|
||||
}
|
||||
|
||||
function dumpe($value)
|
||||
{
|
||||
dump($value);
|
||||
exit;
|
||||
}
|
@@ -6,7 +6,7 @@
|
||||
* @param string used after colon in title and heading, should be HTML escaped
|
||||
* @return null
|
||||
*/
|
||||
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||
function page_header($title, $error = "", $breadcrumb = [], $title2 = "") {
|
||||
global $LANG, $VERSION, $adminer, $drivers, $jush;
|
||||
page_headers();
|
||||
if (is_ajax() && $error) {
|
||||
@@ -15,12 +15,19 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||
}
|
||||
$title_all = $title . ($title2 != "" ? ": $title2" : "");
|
||||
$title_page = strip_tags($title_all . (SERVER != "" && SERVER != "localhost" ? h(" - " . SERVER) : "") . " - " . $adminer->name());
|
||||
|
||||
// Load Adminer version from file if cookie is missing.
|
||||
$filename = get_temp_dir() . "/adminer.version";
|
||||
if (!$_COOKIE["adminer_version"] && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
|
||||
$data = unserialize(file_get_contents($filename));
|
||||
$_COOKIE["adminer_version"] = $data["version"];
|
||||
cookie("adminer_version", $data["version"], 24 * 3600);
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<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"); ?>
|
||||
@@ -34,32 +41,16 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
||||
<?php } ?>
|
||||
|
||||
<body class="<?php echo lang('ltr'); ?> nojs">
|
||||
<?php
|
||||
$filename = get_temp_dir() . "/adminer.version";
|
||||
if (!$_COOKIE["adminer_version"] && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
|
||||
$version = unserialize(file_get_contents($filename));
|
||||
$public = "-----BEGIN PUBLIC KEY-----
|
||||
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwqWOVuF5uw7/+Z70djoK
|
||||
RlHIZFZPO0uYRezq90+7Amk+FDNd7KkL5eDve+vHRJBLAszF/7XKXe11xwliIsFs
|
||||
DFWQlsABVZB3oisKCBEuI71J4kPH8dKGEWR9jDHFw3cWmoH3PmqImX6FISWbG3B8
|
||||
h7FIx3jEaw5ckVPVTeo5JRm/1DZzJxjyDenXvBQ/6o9DgZKeNDgxwKzH+sw9/YCO
|
||||
jHnq1cFpOIISzARlrHMa/43YfeNRAm/tsBXjSxembBPo7aQZLAWHmaj5+K19H10B
|
||||
nCpz9Y++cipkVEiKRGih4ZEvjoFysEOdRLj6WiD/uUNky4xGeA6LaJqh5XpkFkcQ
|
||||
fQIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
";
|
||||
if (openssl_verify($version["version"], base64_decode($version["signature"]), $public) == 1) {
|
||||
$_COOKIE["adminer_version"] = $version["version"]; // doesn't need to send to the browser
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script<?php echo nonce(); ?>>
|
||||
mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick<?php
|
||||
echo (isset($_COOKIE["adminer_version"]) ? "" : ", onload: partial(verifyVersion, '$VERSION', '" . js_escape(ME) . "', '" . get_token() . "')"); // $token may be empty in auth.inc.php
|
||||
?>});
|
||||
document.body.className = document.body.className.replace(/ nojs/, ' js');
|
||||
var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
|
||||
var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
|
||||
document.body.onkeydown = bodyKeydown;
|
||||
document.body.onclick = bodyClick;
|
||||
<?php if (!isset($_COOKIE["adminer_version"])): ?>
|
||||
document.body.onload = function () { verifyVersion('<?php echo $VERSION; ?>', '<?php echo js_escape(ME); ?>', '<?php echo get_token(); ?>') };
|
||||
<?php endif; ?>
|
||||
document.body.className = document.body.className.replace(/ nojs/, ' js');
|
||||
|
||||
var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
|
||||
var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
|
||||
</script>
|
||||
|
||||
<div id="help" class="jush-<?php echo $jush; ?> jsonly hidden"></div>
|
||||
@@ -68,22 +59,34 @@ var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
|
||||
<div id="content">
|
||||
<?php
|
||||
if ($breadcrumb !== null) {
|
||||
echo '<p id="breadcrumb">';
|
||||
|
||||
$link = substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
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'));
|
||||
echo '<a href="' . h($link ?: ".") . '">' . lang('Home') . '</a> » ';
|
||||
|
||||
$server = "";
|
||||
if ($breadcrumb === false) {
|
||||
echo "$server\n";
|
||||
$server .= h($drivers[DRIVER]) . ": ";
|
||||
}
|
||||
|
||||
$server_name = $adminer->serverName(SERVER);
|
||||
$server .= $server_name != "" ? h($server_name) : lang('Server');
|
||||
|
||||
if ($breadcrumb === false) {
|
||||
echo h($server), "\n";
|
||||
} else {
|
||||
$link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', ME), 0, -1);
|
||||
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> » ';
|
||||
}
|
||||
|
||||
if (is_array($breadcrumb)) {
|
||||
if ($_GET["ns"] != "") {
|
||||
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 != "") {
|
||||
@@ -91,9 +94,11 @@ var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "$title\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<h2>$title_all</h2>\n";
|
||||
echo "<div id='ajaxstatus' class='jsonly hidden'></div>\n";
|
||||
restart_session();
|
||||
@@ -127,30 +132,40 @@ function page_headers() {
|
||||
$adminer->headers();
|
||||
}
|
||||
|
||||
/** Get Content Security Policy headers
|
||||
* @return array of arrays with directive name in key, allowed sources in value
|
||||
*/
|
||||
/**
|
||||
* Gets Content Security Policy headers.
|
||||
*
|
||||
* @return array of arrays with directive name in key, allowed sources in value
|
||||
* @throws \Random\RandomException
|
||||
*/
|
||||
function csp() {
|
||||
return array(
|
||||
array(
|
||||
"script-src" => "'self' 'unsafe-inline' 'nonce-" . get_nonce() . "' 'strict-dynamic'", // 'self' is a fallback for browsers not supporting 'strict-dynamic', 'unsafe-inline' is a fallback for browsers not supporting 'nonce-'
|
||||
"connect-src" => "'self'",
|
||||
"frame-src" => "https://www.adminer.org",
|
||||
return [
|
||||
[
|
||||
// 'self' is a fallback for browsers not supporting 'strict-dynamic', 'unsafe-inline' is a fallback for browsers not supporting 'nonce-'
|
||||
"script-src" => "'self' 'unsafe-inline' 'nonce-" . get_nonce() . "' 'strict-dynamic'",
|
||||
"connect-src" => "'self' https://api.github.com/repos/pematon/adminer/releases/latest",
|
||||
"frame-src" => "'self'",
|
||||
"object-src" => "'none'",
|
||||
"base-uri" => "'none'",
|
||||
"form-action" => "'self'",
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/** Get a CSP nonce
|
||||
* @return string Base64 value
|
||||
*/
|
||||
function get_nonce() {
|
||||
/**
|
||||
* Gets a CSP nonce.
|
||||
*
|
||||
* @return string Base64 value.
|
||||
* @throws \Random\RandomException
|
||||
*/
|
||||
function get_nonce()
|
||||
{
|
||||
static $nonce;
|
||||
|
||||
if (!$nonce) {
|
||||
$nonce = base64_encode(rand_string());
|
||||
$nonce = base64_encode(get_random_string(true));
|
||||
}
|
||||
|
||||
return $nonce;
|
||||
}
|
||||
|
||||
@@ -170,28 +185,38 @@ function page_messages($error) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Print HTML footer
|
||||
* @param string "auth", "db", "ns"
|
||||
* @return null
|
||||
*/
|
||||
function page_footer($missing = "") {
|
||||
/**
|
||||
* Prints HTML footer.
|
||||
*
|
||||
* @param $missing string "auth", "db", "ns"
|
||||
*/
|
||||
function page_footer($missing = "")
|
||||
{
|
||||
global $adminer, $token;
|
||||
|
||||
echo "</div>"; // #content
|
||||
|
||||
echo "<div id='footer'>\n";
|
||||
switch_lang();
|
||||
|
||||
if ($missing != "auth") {
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div id="menu">
|
||||
<?php $adminer->navigation($missing); ?>
|
||||
</div>
|
||||
<div class="logout">
|
||||
<form action="" method="post">
|
||||
<?php echo h($_GET["username"]); ?>
|
||||
<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" id="logout">
|
||||
<input type="hidden" name="token" value="<?php echo $token; ?>">
|
||||
</form>
|
||||
</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 } ?>
|
||||
<?php
|
||||
}
|
||||
echo "</div>\n";
|
||||
|
||||
echo "<div id='menu'>\n";
|
||||
$adminer->navigation($missing);
|
||||
echo "</div>\n";
|
||||
|
||||
echo script("setupSubmitHighlight(document);");
|
||||
}
|
||||
|
@@ -143,22 +143,14 @@ function get_driver($id) {
|
||||
|
||||
/** Convert column to be searchable
|
||||
* @param string escaped column name
|
||||
* @param array ["op" => , "val" => ]
|
||||
* @param array array("op" => , "val" => )
|
||||
* @param array
|
||||
* @return string
|
||||
*/
|
||||
function convertSearch($idf, $val, $field) {
|
||||
function convertSearch($idf, array $where, array $field) {
|
||||
return $idf;
|
||||
}
|
||||
|
||||
/** Convert operator so it can be used in search
|
||||
* @param string $operator
|
||||
* @return string
|
||||
*/
|
||||
function convertOperator($operator) {
|
||||
return $operator;
|
||||
}
|
||||
|
||||
/** Convert value returned by database to actual value
|
||||
* @param string
|
||||
* @param array
|
||||
@@ -193,11 +185,4 @@ function get_driver($id) {
|
||||
function tableHelp($name) {
|
||||
}
|
||||
|
||||
/** Check if C-style escapes are supported
|
||||
* @return bool
|
||||
*/
|
||||
function hasCStyleEscapes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
// This file is not used in Adminer Editor.
|
||||
|
||||
/** Print select result
|
||||
* @param Min_Result
|
||||
* @param Min_DB connection to examine indexes
|
||||
@@ -16,17 +14,18 @@ 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 class='nowrap odds'>\n";
|
||||
echo "<table cellspacing='0' class='nowrap'>\n";
|
||||
echo "<thead><tr>";
|
||||
for ($j=0; $j < count($row); $j++) {
|
||||
$field = $result->fetch_field();
|
||||
$name = $field->name;
|
||||
$orgtable = $field->orgtable;
|
||||
$orgname = $field->orgname;
|
||||
$return[$field->table] = $orgtable;
|
||||
$field = (array)$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 != "") {
|
||||
@@ -47,11 +46,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",
|
||||
@@ -60,7 +59,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
}
|
||||
echo "</thead>\n";
|
||||
}
|
||||
echo "<tr>";
|
||||
echo "<tr" . odd() . ">";
|
||||
foreach ($row as $key => $val) {
|
||||
$link = "";
|
||||
if (isset($links[$key]) && !$columns[$links[$key]]) {
|
||||
@@ -73,7 +72,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
$link .= "&where" . urlencode("[" . bracket_escape($col) . "]") . "=" . urlencode($row[$j]);
|
||||
}
|
||||
}
|
||||
} elseif (is_url($val)) {
|
||||
} elseif (is_web_url($val)) {
|
||||
$link = $val;
|
||||
}
|
||||
if ($val === null) {
|
||||
@@ -87,7 +86,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
|
||||
}
|
||||
}
|
||||
if ($link) {
|
||||
$val = "<a href='" . h($link) . "'" . (is_url($link) ? target_blank() : '') . ">$val</a>";
|
||||
$val = "<a href='" . h($link) . "'" . (is_web_url($link) ? target_blank() : '') . ">$val</a>";
|
||||
}
|
||||
echo "<td>$val";
|
||||
}
|
||||
@@ -98,7 +97,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
|
||||
@@ -163,41 +162,6 @@ 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
|
||||
@@ -209,43 +173,20 @@ function json_row($key, $val = null) {
|
||||
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 ($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 ($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
|
||||
?>
|
||||
<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;
|
||||
}
|
||||
|
||||
/** 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;
|
||||
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>';
|
||||
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 ($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
|
||||
}
|
||||
|
||||
/** Filter length value including enums
|
||||
@@ -277,19 +218,20 @@ function process_type($field, $collate = "COLLATE") {
|
||||
/** Create SQL string from field
|
||||
* @param array basic field information
|
||||
* @param array information about field type
|
||||
* @return array ["field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT"]
|
||||
* @return array 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),
|
||||
);
|
||||
@@ -300,12 +242,19 @@ function process_field($field, $type_field) {
|
||||
* @return string
|
||||
*/
|
||||
function default_value($field) {
|
||||
global $jush;
|
||||
$default = $field["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)))
|
||||
);
|
||||
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);
|
||||
}
|
||||
|
||||
/** Get type class to use in CSS
|
||||
@@ -325,65 +274,106 @@ function type_class($type) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Print table interior for fields editing
|
||||
* @param array
|
||||
* @param array
|
||||
* @param string TABLE or PROCEDURE
|
||||
* @param array returned by referencable_primary()
|
||||
* @return null
|
||||
*/
|
||||
function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array()) {
|
||||
/**
|
||||
* Prints table interior for fields editing.
|
||||
*
|
||||
* @param string $type TABLE, FUNCTION or PROCEDURE
|
||||
* @param array $foreign_keys returned by referencable_primary()
|
||||
*/
|
||||
function edit_fields(array $fields, array $collations, $type = "TABLE", $foreign_keys = []) {
|
||||
global $inout;
|
||||
|
||||
$fields = array_values($fields);
|
||||
$default_class = (($_POST ? $_POST["defaults"] : adminer_setting("defaults")) ? "" : " class='hidden'");
|
||||
$comment_class = (($_POST ? $_POST["comments"] : adminer_setting("comments")) ? "" : " class='hidden'");
|
||||
$comment_class = ($_POST ? $_POST["comments"] : adminer_setting("comments")) ? "" : "class='hidden'";
|
||||
?>
|
||||
|
||||
<thead><tr>
|
||||
<?php if ($type == "PROCEDURE") { ?><td><?php } ?>
|
||||
<th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
|
||||
<td id="label-type"><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;"></textarea><?php echo script("qs('#enum-edit').onblur = editingLengthBlur;"); ?>
|
||||
<td id="label-length"><?php echo lang('Length'); ?>
|
||||
<td><?php echo lang('Options'); /* no label required, options have their own label */ ?>
|
||||
<?php if ($type == "TABLE") { ?>
|
||||
<td id="label-null">NULL
|
||||
<td><input type="radio" name="auto_increment_col" value=""><abbr id="label-ai" title="<?php echo lang('Auto Increment'); ?>">AI</abbr><?php echo doc_link(array(
|
||||
'sql' => "example-auto-increment.html",
|
||||
'mariadb' => "auto_increment/",
|
||||
'sqlite' => "autoinc.html",
|
||||
'pgsql' => "datatype-numeric.html#DATATYPE-SERIAL",
|
||||
'mssql' => "t-sql/statements/create-table-transact-sql-identity-property",
|
||||
)); ?>
|
||||
<td id="label-default"<?php echo $default_class; ?>><?php echo lang('Default value'); ?>
|
||||
<?php echo (support("comment") ? "<td id='label-comment'$comment_class>" . lang('Comment') : ""); ?>
|
||||
<?php } ?>
|
||||
<td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>" . script("row_count = " . count($fields) . ";"); ?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if (support("move_col")) {
|
||||
echo "<td class='jsonly'></td>";
|
||||
}
|
||||
if ($type == "PROCEDURE") {
|
||||
echo "<td></td>";
|
||||
}
|
||||
?>
|
||||
<th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?></th>
|
||||
<td id="label-type"><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;"></textarea><?php echo script("qs('#enum-edit').onblur = editingLengthBlur;"); ?></td>
|
||||
<td id="label-length"><?php echo lang('Length'); ?></td>
|
||||
<td><?php echo lang('Options'); /* no label required, options have their own label */ ?></td>
|
||||
<?php if ($type == "TABLE") { ?>
|
||||
<td id="label-null">NULL</td>
|
||||
<td><input type="radio" name="auto_increment_col" value=""><abbr id="label-ai" title="<?php echo lang('Auto Increment'); ?>">AI</abbr><?php echo doc_link([
|
||||
'sql' => "example-auto-increment.html",
|
||||
'mariadb' => "auto_increment/",
|
||||
'sqlite' => "autoinc.html",
|
||||
'pgsql' => "datatype-numeric.html#DATATYPE-SERIAL",
|
||||
'mssql' => "ms186775.aspx",
|
||||
]); ?>
|
||||
</td>
|
||||
<td id="label-default"><?php echo lang('Default value'); ?></td>
|
||||
<?php echo (support("comment") ? "<td id='label-comment' $comment_class>" . lang('Comment') . "</td>" : ""); ?>
|
||||
<?php } ?>
|
||||
<td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>" . script("row_count = " . count($fields) . ";"); ?></td>
|
||||
</tr></thead>
|
||||
<?php
|
||||
echo script("mixin(qsl('tbody'), {onclick: editingClick, onkeydown: editingKeydown, oninput: editingInput});");
|
||||
echo "<tbody>\n";
|
||||
|
||||
foreach ($fields as $i => $field) {
|
||||
$i++;
|
||||
$orig = $field[($_POST ? "orig" : "field")];
|
||||
$display = (isset($_POST["add"][$i-1]) || (isset($field["field"]) && !$_POST["drop_col"][$i])) && (support("drop_col") || $orig == "");
|
||||
?>
|
||||
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
|
||||
<?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
|
||||
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php } ?>
|
||||
<input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>"><?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
|
||||
<?php if ($type == "TABLE") { ?>
|
||||
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); ?>
|
||||
<td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> aria-labelledby="label-ai"></label><td<?php echo $default_class; ?>><?php
|
||||
echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" aria-labelledby="label-default"><?php
|
||||
echo (support("comment") ? "<td$comment_class><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' data-maxlength='" . (min_version(5.5) ? 1024 : 255) . "' aria-labelledby='label-comment'>" : "");
|
||||
|
||||
$style = $display ? "" : "style='display: none;'";
|
||||
echo "<tr $style>\n";
|
||||
|
||||
if (support("move_col")) {
|
||||
echo "<th class='handle jsonly'></th>";
|
||||
}
|
||||
if ($type == "PROCEDURE") {
|
||||
echo "<td>", html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]), "</td>\n";
|
||||
}
|
||||
|
||||
echo "<th>";
|
||||
if ($display) {
|
||||
echo "<input name='fields[$i][field]' value='", h($field["field"]), "' data-maxlength='64' autocapitalize='off' aria-labelledby='label-name'>";
|
||||
}
|
||||
echo "<input type='hidden' name='fields[$i][orig]' value='", h($orig), "'>";
|
||||
edit_type("fields[$i]", $field, $collations, $foreign_keys);
|
||||
echo "</th>\n";
|
||||
|
||||
if ($type == "TABLE") {
|
||||
echo "<td>", checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"), "</td>\n";
|
||||
|
||||
$checked = $field["auto_increment"] ? "checked" : "";
|
||||
echo "<td><label class='block'><input type='radio' name='auto_increment_col' value='$i' $checked aria-labelledby='label-ai'></label></td>\n";
|
||||
|
||||
echo "<td>",
|
||||
checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"),
|
||||
"<input name='fields[$i][default]' value='", h($field["default"]), "' aria-labelledby='label-default'>",
|
||||
"</td>\n";
|
||||
|
||||
if (support("comment")) {
|
||||
$max_length = min_version(5.5) ? 1024 : 255;
|
||||
echo "<td $comment_class>",
|
||||
"<input name='fields[$i][comment]' value='", h($field["comment"]), "' data-maxlength='$max_length' aria-labelledby='label-comment'>",
|
||||
"</td>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "<td>";
|
||||
echo (support("move_col") ?
|
||||
"<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'> "
|
||||
. "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='↑' title='" . lang('Move up') . "'> "
|
||||
. "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='↓' title='" . lang('Move down') . "'> "
|
||||
: "");
|
||||
echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "'>" : "");
|
||||
if (support("move_col")) {
|
||||
echo "<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'> ",
|
||||
"<input type='image' class='icon hidden' name='up[$i]' src='../adminer/static/up.gif' alt='↑' title='" . lang('Move up') . "'> ",
|
||||
"<input type='image' class='icon hidden' name='down[$i]' src='../adminer/static/down.gif' alt='↓' title='" . lang('Move down') . "'> ";
|
||||
}
|
||||
if ($orig == "" || support("drop_col")) {
|
||||
echo "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "'>";
|
||||
}
|
||||
echo "</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
echo "</tbody>";
|
||||
echo script("mixin(qs('#edit-fields tbody'), {onclick: editingClick, onkeydown: editingKeydown, oninput: editingInput}); initSortable('#edit-fields tbody');");
|
||||
}
|
||||
|
||||
/** Move fields up and down or add field
|
||||
@@ -435,25 +425,43 @@ 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 string GRANT or REVOKE
|
||||
* @param array
|
||||
* @param string
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
function grant($grant, $privileges, $columns, $on) {
|
||||
if (!$privileges) {
|
||||
return true;
|
||||
/**
|
||||
* 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");
|
||||
}
|
||||
}
|
||||
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")
|
||||
);
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
return queries("$grant " . preg_replace('~(GRANT OPTION)\([^)]*\)~', '\1', implode("$columns, ", $privileges) . $columns) . $on);
|
||||
|
||||
return (bool) queries(
|
||||
($grant ? "GRANT " : "REVOKE ") .
|
||||
preg_replace('~(GRANT OPTION)\([^)]*\)~', '$1', implode("$columns, ", $privileges) . $columns) .
|
||||
" ON $on " .
|
||||
($grant ? "TO " : "FROM ") . $user
|
||||
);
|
||||
}
|
||||
|
||||
/** Drop old object and create a new one
|
||||
@@ -521,30 +529,16 @@ function create_routine($routine, $row) {
|
||||
$set[] = (preg_match("~^($inout)\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
|
||||
}
|
||||
}
|
||||
$definition = rtrim($row["definition"], ";");
|
||||
$definition = rtrim("\n$row[definition]", ";");
|
||||
return "CREATE $routine "
|
||||
. idf_escape(trim($row["name"]))
|
||||
. " (" . implode(", ", $set) . ")"
|
||||
. ($routine == "FUNCTION" ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
|
||||
. (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
|
||||
. ($row["language"] ? " LANGUAGE $row[language]" : "")
|
||||
. ($jush == "pgsql" ? " AS " . q($definition) : "\n$definition;")
|
||||
. ($jush == "pgsql" ? " AS " . q($definition) : "$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
|
||||
@@ -554,7 +548,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) {
|
||||
@@ -603,27 +597,39 @@ function ini_bytes($ini) {
|
||||
return $val;
|
||||
}
|
||||
|
||||
/** Create link to database documentation
|
||||
* @param array $jush => $path
|
||||
* @param string HTML code
|
||||
* @return string HTML code
|
||||
*/
|
||||
function doc_link($paths, $text = "<sup>?</sup>") {
|
||||
/**
|
||||
* Creates link to database documentation.
|
||||
*
|
||||
* @param array $paths $jush => $path
|
||||
* @param string $text HTML code
|
||||
*
|
||||
* @return string HTML code
|
||||
*/
|
||||
function doc_link(array $paths, $text = "<sup>?</sup>") {
|
||||
global $jush, $connection;
|
||||
|
||||
$server_info = $connection->server_info;
|
||||
$version = preg_replace('~^(\d\.?\d).*~s', '\1', $server_info); // two most significant digits
|
||||
$urls = array(
|
||||
|
||||
$urls = [
|
||||
'sql' => "https://dev.mysql.com/doc/refman/$version/en/",
|
||||
'sqlite' => "https://www.sqlite.org/",
|
||||
'pgsql' => "https://www.postgresql.org/docs/$version/",
|
||||
'mssql' => "https://learn.microsoft.com/en-us/sql/",
|
||||
'mssql' => "https://msdn.microsoft.com/library/",
|
||||
'oracle' => "https://www.oracle.com/pls/topic/lookup?ctx=db" . preg_replace('~^.* (\d+)\.(\d+)\.\d+\.\d+\.\d+.*~s', '\1\2', $server_info) . "&id=",
|
||||
);
|
||||
'elastic' => "https://www.elastic.co/guide/en/elasticsearch/reference/$version/",
|
||||
];
|
||||
|
||||
if (preg_match('~MariaDB~', $server_info)) {
|
||||
$urls['sql'] = "https://mariadb.com/kb/en/";
|
||||
$urls['sql'] = "https://mariadb.com/kb/en/library/";
|
||||
$paths['sql'] = (isset($paths['mariadb']) ? $paths['mariadb'] : str_replace(".html", "/", $paths['sql']));
|
||||
}
|
||||
return ($paths[$jush] ? "<a href='" . h($urls[$jush] . $paths[$jush] . ($jush == 'mssql' ? "?view=sql-server-ver$version" : "")) . "'" . target_blank() . ">$text</a>" : "");
|
||||
|
||||
if (!isset($paths[$jush]) || !$paths[$jush] ) {
|
||||
return "";
|
||||
}
|
||||
|
||||
return "<a href='" . h($urls[$jush] . $paths[$jush]) . "'" . target_blank() . ">$text</a>";
|
||||
}
|
||||
|
||||
/** Wrap gzencode() for usage in ob_start()
|
||||
@@ -631,7 +637,7 @@ function doc_link($paths, $text = "<sup>?</sup>") {
|
||||
* @return string
|
||||
*/
|
||||
function ob_gzencode($string) {
|
||||
// ob_start() callback receives an optional parameter $phase but gzencode() accepts optional parameter $level
|
||||
// ob_start() callback recieves an optional parameter $phase but gzencode() accepts optional parameter $level
|
||||
return gzencode($string);
|
||||
}
|
||||
|
||||
|
@@ -1,7 +0,0 @@
|
||||
<?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,5 +1,4 @@
|
||||
<?php
|
||||
// This file is used both in Adminer and Adminer Editor.
|
||||
|
||||
/** Get database connection
|
||||
* @return Min_DB
|
||||
@@ -109,7 +108,7 @@ function min_version($version, $maria_db = "", $connection2 = null) {
|
||||
$server_info = $match[1];
|
||||
$version = $maria_db;
|
||||
}
|
||||
return $version && version_compare($server_info, $version) >= 0;
|
||||
return (version_compare($server_info, $version) >= 0);
|
||||
}
|
||||
|
||||
/** Get connection charset
|
||||
@@ -159,14 +158,6 @@ 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
|
||||
@@ -202,11 +193,7 @@ 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) . '"' : '')
|
||||
. ($selected !== null && ($use_keys || is_string($key) ? (string) $key : $val) === $selected ? ' selected' : '')
|
||||
. '>' . h($val)
|
||||
;
|
||||
$return .= '<option' . ($use_keys || is_string($key) ? ' value="' . h($key) . '"' : '') . (($use_keys || is_string($key) ? (string) $key : $val) === $selected ? ' selected' : '') . '>' . h($val);
|
||||
}
|
||||
if (is_array($v)) {
|
||||
$return .= '</optgroup>';
|
||||
@@ -219,7 +206,7 @@ function optionlist($options, $selected = null, $use_keys = false) {
|
||||
* @param string
|
||||
* @param array
|
||||
* @param string
|
||||
* @param string true for no onchange, false for radio
|
||||
* @param string|bool true for no onchange, false for radio
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
@@ -238,6 +225,22 @@ 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
|
||||
@@ -247,18 +250,17 @@ function confirm($message = "", $selector = "qsl('input')") {
|
||||
return script("$selector.onclick = function () { return confirm('" . ($message ? js_escape($message) : lang('Are you sure?')) . "'); };", "");
|
||||
}
|
||||
|
||||
/** Print header for hidden fieldset (close by </div></fieldset>)
|
||||
* @param string
|
||||
* @param string
|
||||
* @param bool
|
||||
* @return null
|
||||
*/
|
||||
function print_fieldset($id, $legend, $visible = false) {
|
||||
/**
|
||||
* Prints header for hidden fieldset (close by </div></fieldset>)
|
||||
* @param $id string
|
||||
* @param $legend string
|
||||
*/
|
||||
function print_fieldset($id, $legend, $visible = false, $sortable = false) {
|
||||
echo "<fieldset><legend>";
|
||||
echo "<a href='#fieldset-$id'>$legend</a>";
|
||||
echo script("qsl('a').onclick = partial(toggle, 'fieldset-$id');", "");
|
||||
echo "</legend>";
|
||||
echo "<div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
|
||||
echo "<div id='fieldset-$id' class='" . ($visible ? "" : "hidden") . ($sortable ? " sortable" : "") . "'>\n";
|
||||
}
|
||||
|
||||
/** Return class='active' if $bold is true
|
||||
@@ -270,6 +272,18 @@ 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
|
||||
@@ -278,6 +292,25 @@ 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
|
||||
@@ -287,7 +320,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 necessary
|
||||
/** Check if SID is neccessary
|
||||
* @return bool
|
||||
*/
|
||||
function sid() {
|
||||
@@ -392,7 +425,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") || $error == "-- ")) {
|
||||
} elseif (!$result && !is_object($connection2) && $error && defined("PAGE_HEADER")) {
|
||||
echo $error . error() . "\n";
|
||||
}
|
||||
return $return;
|
||||
@@ -436,25 +469,36 @@ function escape_key($key) {
|
||||
*/
|
||||
function where($where, $fields = array()) {
|
||||
global $connection, $jush;
|
||||
$return = array();
|
||||
|
||||
$conditions = [];
|
||||
|
||||
foreach ((array) $where["where"] as $key => $val) {
|
||||
$key = bracket_escape($key, 1); // 1 - back
|
||||
$column = escape_key($key);
|
||||
$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";
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ((array) $where["null"] as $key) {
|
||||
$return[] = escape_key($key) . " IS NULL";
|
||||
$conditions[] = escape_key($key) . " IS NULL";
|
||||
}
|
||||
return implode(" AND ", $return);
|
||||
|
||||
return implode(" AND ", $conditions);
|
||||
}
|
||||
|
||||
/** Create SQL condition from query string
|
||||
@@ -846,12 +890,12 @@ function hidden_fields_get() {
|
||||
*/
|
||||
function table_status1($table, $fast = false) {
|
||||
$return = table_status($table, $fast);
|
||||
return ($return ? $return : array("Name" => $table));
|
||||
return ($return ?: array("Name" => $table));
|
||||
}
|
||||
|
||||
/** Find out foreign keys for each column
|
||||
* @param string
|
||||
* @return array [$col => array()]
|
||||
* @return array array($col => array())
|
||||
*/
|
||||
function column_foreign_keys($table) {
|
||||
global $adminer;
|
||||
@@ -873,14 +917,17 @@ function column_foreign_keys($table) {
|
||||
* @return null
|
||||
*/
|
||||
function enum_input($type, $attrs, $field, $value, $empty = null) {
|
||||
global $adminer, $jush;
|
||||
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>" : "");
|
||||
|
||||
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='" . ($jush == "sql" ? $i+1 : h($val)) . "'" . ($checked ? ' checked' : '') . '>' . h($adminer->editVal($val, $field)) . '</label>';
|
||||
$return .= " <label><input type='$type'$attrs value='" . ($i+1) . "'" . ($checked ? ' checked' : '') . '>' . h($adminer->editVal($val, $field)) . '</label>';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
@@ -891,15 +938,16 @@ function enum_input($type, $attrs, $field, $value, $empty = null) {
|
||||
* @return null
|
||||
*/
|
||||
function input($field, $value, $function) {
|
||||
global $types, $structured_types, $adminer, $jush;
|
||||
global $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); //! requires PHP 5.2
|
||||
$value = call_user_func_array('json_encode', $args);
|
||||
$function = "json";
|
||||
}
|
||||
$reset = ($jush == "mssql" && $field["auto_increment"]);
|
||||
@@ -907,31 +955,28 @@ 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";
|
||||
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)) . "'";
|
||||
}
|
||||
}
|
||||
$attrs = " name='fields[$name]' $disabled";
|
||||
|
||||
echo "<td class='function'>";
|
||||
|
||||
if ($field["type"] == "enum") {
|
||||
echo h($functions[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value);
|
||||
echo h($functions[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value, $function);
|
||||
} 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))
|
||||
) . '<td>';
|
||||
$input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table
|
||||
$input = $adminer->editInput($_GET["edit"], $field, $attrs, $value, $function); // usage in call is without a table
|
||||
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) {
|
||||
@@ -946,24 +991,22 @@ function input($field, $value, $function) {
|
||||
$attrs .= " cols='50' rows='12'";
|
||||
} else {
|
||||
$rows = min(12, substr_count($value, "\n") + 1);
|
||||
$attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
|
||||
$attrs .= " cols='30' rows='$rows'";
|
||||
}
|
||||
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
|
||||
}
|
||||
// type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
|
||||
echo "<input"
|
||||
. ((!$has_function || $function === "") && preg_match('~(?<!o)int(?!er)~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
|
||||
. " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
|
||||
. ($function != "now" ? " value='" . h($value) . "'" : " data-last-value='" . h($value) . "'")
|
||||
. ($maxlength ? " data-maxlength='$maxlength'" : "")
|
||||
. (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
|
||||
. "$attrs>"
|
||||
;
|
||||
@@ -977,9 +1020,7 @@ function input($field, $value, $function) {
|
||||
}
|
||||
$first++;
|
||||
}
|
||||
if ($first) {
|
||||
echo script("mixin(qsl('td'), {onchange: partial(skipOriginal, $first), oninput: function () { this.onchange(); }});");
|
||||
}
|
||||
echo script("mixin(qsl('td'), {onchange: partial(skipOriginal, $first), oninput: function () { this.onchange(); }});");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1053,7 +1094,7 @@ function fields_from_edit() {
|
||||
$name = bracket_escape($key, 1); // 1 - back
|
||||
$return[$name] = array(
|
||||
"field" => $name,
|
||||
"privileges" => array("insert" => 1, "update" => 1),
|
||||
"privileges" => array("insert" => 1, "update" => 1, "where" => 1, "order" => 1),
|
||||
"null" => 1,
|
||||
"auto_increment" => ($key == $driver->primary),
|
||||
);
|
||||
@@ -1084,6 +1125,27 @@ 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
|
||||
@@ -1144,60 +1206,98 @@ function get_temp_dir() {
|
||||
return $return;
|
||||
}
|
||||
|
||||
/** 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);
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
flock($fp, LOCK_EX);
|
||||
return $fp;
|
||||
|
||||
chmod($filename, 0660);
|
||||
|
||||
if (!flock($file, LOCK_EX)) {
|
||||
fclose($file);
|
||||
return null;
|
||||
}
|
||||
|
||||
return $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);
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/** 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) {
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
$filename = get_temp_dir() . "/adminer.key";
|
||||
$return = @file_get_contents($filename); // @ - may not exist
|
||||
if ($return || !$create) {
|
||||
return $return;
|
||||
|
||||
if (!$create && !file_exists($filename)) {
|
||||
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);
|
||||
|
||||
$file = open_file_with_lock($filename);
|
||||
if (!$file) {
|
||||
return false;
|
||||
}
|
||||
return $return;
|
||||
|
||||
$key = stream_get_contents($file);
|
||||
if (!$key) {
|
||||
$key = get_random_string();
|
||||
write_and_unlock_file($file, $key);
|
||||
} else {
|
||||
unlock_file($file);
|
||||
}
|
||||
|
||||
return $key;
|
||||
}
|
||||
|
||||
/** Get a random string
|
||||
* @return string 32 hexadecimal characters
|
||||
*/
|
||||
function rand_string() {
|
||||
return md5(uniqid(mt_rand(), true));
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
/** Format value to use in select
|
||||
@@ -1226,7 +1326,7 @@ function select_value($val, $link, $field, $text_length) {
|
||||
if (is_mail($val)) {
|
||||
$link = "mailto:$val";
|
||||
}
|
||||
if (is_url($val)) {
|
||||
if (is_web_url($val)) {
|
||||
$link = $val; // IE 11 and all modern browsers hide referrer
|
||||
}
|
||||
}
|
||||
@@ -1247,20 +1347,32 @@ function select_value($val, $link, $field, $text_length) {
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
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);
|
||||
function is_mail($value) {
|
||||
return is_string($value) && filter_var($value, FILTER_VALIDATE_EMAIL);
|
||||
}
|
||||
|
||||
/** Check whether the string is URL address
|
||||
/** Check whether the string is web URL address
|
||||
* @param string
|
||||
* @return bool
|
||||
*/
|
||||
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
|
||||
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);
|
||||
}
|
||||
|
||||
/** Check if field should be shortened
|
||||
@@ -1410,7 +1522,8 @@ 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 class='layout'>" . script("qsl('table').onkeydown = editingKeydown;");
|
||||
echo "<table cellspacing='0' class='layout'>" . script("qsl('table').onkeydown = editingKeydown;");
|
||||
|
||||
foreach ($fields as $name => $field) {
|
||||
echo "<tr><th>" . $adminer->fieldName($field);
|
||||
$default = $_GET["set"][bracket_escape($name)];
|
||||
@@ -1447,10 +1560,6 @@ 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
|
||||
'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt
|
||||
'lv' => 'Latviešu', // Kristaps Lediņš - https://krysits.com
|
||||
'lv' => 'Latviešu', // Kristaps Lediņš - https://krysits.com
|
||||
'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt
|
||||
'ms' => 'Bahasa Melayu', // Pisyek
|
||||
'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
|
||||
'no' => 'Norsk', // Iver Odin Kvello, mupublishing.com
|
||||
@@ -71,10 +71,9 @@ 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();
|
||||
@@ -88,11 +87,11 @@ function lang($idf, $number = null) {
|
||||
|
||||
function switch_lang() {
|
||||
global $LANG, $langs;
|
||||
echo "<form action='' method='post'>\n<div id='lang'>";
|
||||
echo "<div id='lang'><form action='' method='post'>\n";
|
||||
echo lang('Language') . ": " . html_select("lang", $langs, $LANG, "this.form.submit();");
|
||||
echo " <input type='submit' value='" . lang('Use') . "' class='hidden'>\n";
|
||||
echo "<input type='hidden' name='token' value='" . get_token() . "'>\n"; // $token may be empty in auth.inc.php
|
||||
echo "</div>\n</form>\n";
|
||||
echo "</form></div>\n";
|
||||
}
|
||||
|
||||
if (isset($_POST["lang"]) && verify_token()) { // $error not yet available
|
||||
|
@@ -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.17.1";
|
||||
$VERSION = "4.10";
|
||||
|
@@ -59,8 +59,6 @@ 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,9 +16,7 @@ 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) {
|
||||
@@ -93,21 +91,14 @@ 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 class="nowrap">
|
||||
<table cellspacing="0" class="nowrap">
|
||||
<thead><tr>
|
||||
<th id="label-type"><?php echo lang('Index Type'); ?>
|
||||
<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><input type="submit" class="wayoff"><?php echo lang('Column (length)'); ?>
|
||||
<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>
|
||||
@@ -135,10 +126,9 @@ foreach ($row["indexes"] as $index) {
|
||||
$column,
|
||||
"partial(" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . ", '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "')"
|
||||
);
|
||||
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 ($jush == "sql" || $jush == "mssql" ? "<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> </span>";
|
||||
echo " </span>";
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'تسجيل الدخول',
|
||||
'Logout successful.' => 'تم تسجيل الخروج بنجاح.',
|
||||
'Invalid credentials.' => 'بيانات الدخول غير صالحة.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'الخادم',
|
||||
'Username' => 'اسم المستخدم',
|
||||
'Password' => 'كلمة المرور',
|
||||
@@ -30,6 +31,7 @@ $translations = array(
|
||||
'Create database' => 'إنشاء قاعدة بيانات',
|
||||
'SQL command' => 'استعلام SQL',
|
||||
'Logout' => 'تسجيل الخروج',
|
||||
'database' => 'قاعدة بيانات',
|
||||
'Use' => 'استعمال',
|
||||
'No tables.' => 'لا توجد جداول.',
|
||||
'select' => 'تحديد',
|
||||
@@ -93,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'نوع المؤشر',
|
||||
'length' => 'الطول',
|
||||
'Column (length)' => 'العمود (الطول)',
|
||||
'View has been dropped.' => 'تم مسح العرض.',
|
||||
'View has been altered.' => 'تم تعديل العرض.',
|
||||
'View has been created.' => 'تم إنشاء العرض.',
|
||||
@@ -187,6 +189,7 @@ $translations = array(
|
||||
'Clone' => 'نسخ',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s.',
|
||||
'Partition by' => 'مقسم بواسطة',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'التقسيمات',
|
||||
'Partition name' => 'اسم التقسيم',
|
||||
'Values' => 'القيم',
|
||||
@@ -222,6 +225,7 @@ $translations = array(
|
||||
'Databases have been dropped.' => 'تم حذف قواعد البيانات.',
|
||||
'Database has been dropped.' => 'تم حذف قاعدة البيانات.',
|
||||
'Search data in tables' => 'بحث في الجداول',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'المخطط',
|
||||
'Alter schema' => 'تعديل المخطط',
|
||||
'Create schema' => 'إنشاء مخطط',
|
||||
@@ -263,4 +267,50 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Система',
|
||||
'Server' => 'Сървър',
|
||||
'Username' => 'Потребител',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Изход',
|
||||
'Logged as: %s' => 'Текущ потребител: %s',
|
||||
'Logout successful.' => 'Излизането е успешно.',
|
||||
'Invalid credentials.' => 'Невалидни потребителски данни.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +79,7 @@ $translations = array(
|
||||
'Data' => 'Данни',
|
||||
|
||||
'Database' => 'База данни',
|
||||
'database' => 'база данни',
|
||||
'Use' => 'Избор',
|
||||
'Select database' => 'Избор на база данни',
|
||||
'Invalid database.' => 'Невалидна база данни.',
|
||||
@@ -175,6 +177,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Максималния брой полета е превишен. Моля, увеличете %s.',
|
||||
|
||||
'Partition by' => 'Разделяне на',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Раздели',
|
||||
'Partition name' => 'Име на раздела',
|
||||
'Values' => 'Стойности',
|
||||
@@ -192,7 +195,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Промяна на индекси',
|
||||
'Add next' => 'Добавяне на следващ',
|
||||
'Index Type' => 'Вид на индекса',
|
||||
'length' => 'дължина',
|
||||
'Column (length)' => 'Колона (дължина)',
|
||||
|
||||
'Foreign keys' => 'Препратки',
|
||||
'Foreign key' => 'Препратка',
|
||||
@@ -229,6 +232,7 @@ $translations = array(
|
||||
'Search' => 'Търсене',
|
||||
'anywhere' => 'навсякъде',
|
||||
'Search data in tables' => 'Търсене на данни в таблиците',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Сортиране',
|
||||
'descending' => 'низходящо',
|
||||
'Limit' => 'Редове',
|
||||
@@ -332,4 +336,26 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'লগইন',
|
||||
'Logout successful.' => 'সফলভাবে লগআউট হয়েছে।',
|
||||
'Invalid credentials.' => 'ভুল পাসওয়ার্ড।',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'সার্ভার',
|
||||
'Username' => 'ইউজারের নাম',
|
||||
'Password' => 'পাসওয়ার্ড',
|
||||
@@ -31,6 +32,7 @@ $translations = array(
|
||||
'Create database' => 'ডাটাবেজ তৈরী করুন',
|
||||
'SQL command' => 'SQL-কমান্ড',
|
||||
'Logout' => 'লগআউট',
|
||||
'database' => 'ডাটাবেজ',
|
||||
'Use' => 'ব্যবহার',
|
||||
'No tables.' => 'কোন টেবিল নাই।',
|
||||
'select' => 'নির্বাচন',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'অন ডিলিট',
|
||||
'ON UPDATE' => 'অন আপডেট',
|
||||
'Index Type' => 'সূচী-ধরণ',
|
||||
'length' => 'দৈর্ঘ্য',
|
||||
'Column (length)' => 'কলাম (দৈর্ঘ্য)',
|
||||
'View has been dropped.' => 'ভিউ মুছে ফেলা হয়েছে।',
|
||||
'View has been altered.' => 'ভিউ পরিবর্তন করা হয়েছে।',
|
||||
'View has been created.' => 'ভিউ তৈরী করা হয়েছে।',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Clone' => 'ক্লোন',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'অনুমোদিত ফিল্ড এর সর্বাধিক সংখ্যা অতিক্রম করে গেছে। অনুগ্রহপূর্বক %s বৃদ্ধি করুন।',
|
||||
'Partition by' => 'পার্টিশন যার মাধ্যমে',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'পার্টিশন',
|
||||
'Partition name' => 'পার্টিশনের নাম',
|
||||
'Values' => 'মানসমূহ',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'স্থায়ী লগইন',
|
||||
'Databases have been dropped.' => 'ডাটাবেজসমূহ মুছে ফেলা হয়েছে।',
|
||||
'Search data in tables' => 'টেবিলে তথ্য খুঁজুন',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'স্কিমা',
|
||||
'Alter schema' => 'স্কিমা পরিবর্তন করো',
|
||||
'Create schema' => 'স্কিমা তৈরী করো',
|
||||
@@ -263,4 +267,50 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Sistem',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Korisničko ime',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Odjava',
|
||||
'Logged as: %s' => 'Prijavi se kao: %s',
|
||||
'Logout successful.' => 'Uspešna odjava.',
|
||||
'Invalid credentials.' => 'Nevažeće dozvole.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Language' => 'Jezik',
|
||||
'Invalid CSRF token. Send the form again.' => 'Nevažeći CSRF kod. Proslijedite ponovo formu.',
|
||||
'No extension' => 'Bez dodataka',
|
||||
@@ -73,6 +74,7 @@ $translations = array(
|
||||
'Data' => 'Podaci',
|
||||
|
||||
'Database' => 'Baza podataka',
|
||||
'database' => 'baza podataka',
|
||||
'Use' => 'Koristi',
|
||||
'Select database' => 'Izaberite bazu',
|
||||
'Invalid database.' => 'Neispravna baza podataka.',
|
||||
@@ -166,6 +168,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Premašen je maksimalni broj dozvoljenih polja. Molim uvećajte %s.',
|
||||
|
||||
'Partition by' => 'Podijeli po',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Podijele',
|
||||
'Partition name' => 'Ime podijele',
|
||||
'Values' => 'Vrijednosti',
|
||||
@@ -182,7 +185,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ažuriraj indekse',
|
||||
'Add next' => 'Dodaj slijedeći',
|
||||
'Index Type' => 'Tip indeksa',
|
||||
'length' => 'dužina',
|
||||
'Column (length)' => 'kolumna (dužina)',
|
||||
|
||||
'Foreign keys' => 'Strani ključevi',
|
||||
'Foreign key' => 'Strani ključ',
|
||||
@@ -220,6 +223,7 @@ $translations = array(
|
||||
'Search' => 'Pretraga',
|
||||
'anywhere' => 'bilo gdje',
|
||||
'Search data in tables' => 'Pretraži podatke u tabelama',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Poređaj',
|
||||
'descending' => 'opadajuće',
|
||||
'Limit' => 'Granica',
|
||||
@@ -317,4 +321,41 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Inicia la sessió',
|
||||
'Logout successful.' => 'Desconnexió correcta.',
|
||||
'Invalid credentials.' => 'Credencials invàlides.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Nom d\'usuari',
|
||||
'Password' => 'Contrasenya',
|
||||
@@ -31,6 +32,7 @@ $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',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipus d\'índex',
|
||||
'length' => 'longitud',
|
||||
'Column (length)' => 'Columna (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.',
|
||||
@@ -188,6 +190,7 @@ $translations = array(
|
||||
'Tables have been dropped.' => 'S\'han suprimit les taules.',
|
||||
'Clone' => 'Clona',
|
||||
'Partition by' => 'Fes particions segons',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Particions',
|
||||
'Partition name' => 'Nom de la partició',
|
||||
'Values' => 'Valors',
|
||||
@@ -250,6 +253,7 @@ $translations = array(
|
||||
'Type has been created.' => 'S\'ha creat el tipus.',
|
||||
'Alter type' => 'Modifica el tipus',
|
||||
'Search data in tables' => 'Cerca dades en les taules',
|
||||
'as a regular expression' => null,
|
||||
'From server' => 'En el servidor',
|
||||
'empty' => 'buit',
|
||||
'now' => 'ara',
|
||||
@@ -264,4 +268,49 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => 'Domů',
|
||||
'System' => 'Systém',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Uživatel',
|
||||
@@ -11,7 +12,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 credentials.' => 'Neplatné přihlašovací údaje.',
|
||||
'Invalid server or credentials.' => 'Neplatný server nebo 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,6 +89,7 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Databáze',
|
||||
'database' => 'databáze',
|
||||
'DB' => 'DB',
|
||||
'Use' => 'Vybrat',
|
||||
'Select database' => 'Vybrat databázi',
|
||||
@@ -188,6 +190,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Byl překročen maximální povolený počet polí. Zvyšte prosím %s.',
|
||||
|
||||
'Partition by' => 'Rozdělit podle',
|
||||
'Partition' => 'Oddíl',
|
||||
'Partitions' => 'Oddíly',
|
||||
'Partition name' => 'Název oddílu',
|
||||
'Values' => 'Hodnoty',
|
||||
@@ -205,7 +208,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Pozměnit indexy',
|
||||
'Add next' => 'Přidat další',
|
||||
'Index Type' => 'Typ indexu',
|
||||
'length' => 'délka',
|
||||
'Column (length)' => 'Sloupec (délka)',
|
||||
|
||||
'Foreign keys' => 'Cizí klíče',
|
||||
'Foreign key' => 'Cizí klíč',
|
||||
@@ -242,6 +245,7 @@ $translations = array(
|
||||
'Search' => 'Vyhledat',
|
||||
'anywhere' => 'kdekoliv',
|
||||
'Search data in tables' => 'Vyhledat data v tabulkách',
|
||||
'as a regular expression' => 'jako regulární výraz',
|
||||
'Sort' => 'Seřadit',
|
||||
'descending' => 'sestupně',
|
||||
'Limit' => 'Limit',
|
||||
@@ -255,8 +259,8 @@ $translations = array(
|
||||
'%d row(s)' => array('%d řádek', '%d řádky', '%d řádků'),
|
||||
'Page' => 'Stránka',
|
||||
'last' => 'poslední',
|
||||
'Load more data' => 'Načíst další data',
|
||||
'Loading' => 'Načítá se',
|
||||
'Load more data' => 'Nahrát další data',
|
||||
'Loading' => 'Nahrává se',
|
||||
'Whole result' => 'Celý výsledek',
|
||||
'%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtů'),
|
||||
|
||||
@@ -346,11 +350,12 @@ $translations = array(
|
||||
'Type has been created.' => 'Typ byl vytvořen.',
|
||||
'Alter type' => 'Pozměnit typ',
|
||||
|
||||
// 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.',
|
||||
// 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.',
|
||||
);
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'System' => 'System',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Brugernavn',
|
||||
@@ -9,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Log ud',
|
||||
'Logged as: %s' => 'Logget ind som: %s',
|
||||
'Logout successful.' => 'Log af vellykket.',
|
||||
'Invalid credentials.' => 'Ugyldige log ind oplysninger.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +65,7 @@ $translations = array(
|
||||
'Format' => 'Format',
|
||||
'Data' => 'Data',
|
||||
'Database' => 'Database',
|
||||
'database' => 'database',
|
||||
'Use' => 'Brug',
|
||||
'Select database' => 'Vælg database',
|
||||
'Invalid database.' => 'Ugyldig database.',
|
||||
@@ -150,6 +152,7 @@ $translations = array(
|
||||
'Remove' => 'Fjern',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimum antal feltnavne overskredet - øg venligst %s.',
|
||||
'Partition by' => 'Partition ved',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partitioner',
|
||||
'Partition name' => 'Partitionsnavn',
|
||||
'Values' => 'Værdier',
|
||||
@@ -164,7 +167,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ændre indekser',
|
||||
'Add next' => 'Læg til næste',
|
||||
'Index Type' => 'Indekstype',
|
||||
'length' => 'længde',
|
||||
'Column (length)' => 'Kolonne (længde)',
|
||||
'Foreign keys' => 'Fremmednøgler',
|
||||
'Foreign key' => 'Fremmednøgle',
|
||||
'Foreign key has been dropped.' => 'Fremmednøglen er slettet.',
|
||||
@@ -198,6 +201,7 @@ $translations = array(
|
||||
'Search' => 'Søg',
|
||||
'anywhere' => 'hvorsomhelst',
|
||||
'Search data in tables' => 'Søg data i tabeller',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Sorter',
|
||||
'descending' => 'faldende',
|
||||
'Limit' => 'Limit',
|
||||
@@ -278,4 +282,35 @@ $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,
|
||||
);
|
||||
|
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'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 credentials.' => 'Ungültige Anmelde-Informationen.',
|
||||
'Invalid server or credentials.' => 'Ungültige Server oder Anmelde-Informationen.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Benutzer',
|
||||
'Password' => 'Passwort',
|
||||
@@ -32,7 +33,8 @@ $translations = array(
|
||||
'Create database' => 'Datenbank erstellen',
|
||||
'SQL command' => 'SQL-Kommando',
|
||||
'Logout' => 'Abmelden',
|
||||
'Use' => 'Auswählen',
|
||||
'database' => 'Datenbank',
|
||||
'Use' => 'Benutzung',
|
||||
'No tables.' => 'Keine Tabellen.',
|
||||
'select' => 'zeigen',
|
||||
'Item has been deleted.' => 'Datensatz wurde gelöscht.',
|
||||
@@ -96,7 +98,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Index-Typ',
|
||||
'length' => 'Länge',
|
||||
'Column (length)' => 'Spalte (Länge)',
|
||||
'View has been dropped.' => 'View wurde entfernt.',
|
||||
'View has been altered.' => 'View wurde geändert.',
|
||||
'View has been created.' => 'View wurde erstellt.',
|
||||
@@ -190,6 +192,7 @@ $translations = array(
|
||||
'Clone' => 'Klonen',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Die maximal erlaubte Anzahl der Felder ist überschritten. Bitte %s erhöhen.',
|
||||
'Partition by' => 'Partitionieren um',
|
||||
'Partition' => 'Partition',
|
||||
'Partitions' => 'Partitionen',
|
||||
'Partition name' => 'Name der Partition',
|
||||
'Values' => 'Werte',
|
||||
@@ -224,6 +227,7 @@ $translations = array(
|
||||
'Permanent login' => 'Passwort speichern',
|
||||
'Databases have been dropped.' => 'Datenbanken wurden entfernt.',
|
||||
'Search data in tables' => 'Suche in Tabellen',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'Schema ändern',
|
||||
'Create schema' => 'Schema erstellen',
|
||||
@@ -279,25 +283,34 @@ $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, diese Tabelle zu aktualisieren.',
|
||||
'You have no privileges to update this table.' => 'Sie haben keine Rechte, um 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?' => '%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.',
|
||||
|
||||
'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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Σύστημα',
|
||||
'Server' => 'Διακομιστής',
|
||||
'Username' => 'Όνομα Χρήστη',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Αποσύνδεση',
|
||||
'Logged as: %s' => 'Συνδεθήκατε ως %s',
|
||||
'Logout successful.' => 'Αποσυνδεθήκατε με επιτυχία.',
|
||||
'Invalid credentials.' => 'Εσφαλμένα Διαπιστευτήρια.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +80,7 @@ $translations = array(
|
||||
'Data' => 'Δεδομένα',
|
||||
|
||||
'Database' => 'Β. Δεδομένων',
|
||||
'database' => 'β. δεδομένων',
|
||||
'Use' => 'χρήση',
|
||||
'Select database' => 'Επιλέξτε Β.Δ.',
|
||||
'Invalid database.' => 'Λανθασμένη Β.Δ.',
|
||||
@@ -176,6 +178,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Υπέρβαση μέγιστου επιτρεπόμενου αριθμού πεδίων. Παρακαλώ αυξήστε %s.',
|
||||
|
||||
'Partition by' => 'Τμηματοποίηση ανά',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Τμήματα',
|
||||
'Partition name' => 'Όνομα Τμήματος',
|
||||
'Values' => 'Τιμές',
|
||||
@@ -193,7 +196,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Τροποποίηση δεικτών',
|
||||
'Add next' => 'Προσθήκη επόμενου',
|
||||
'Index Type' => 'Τύπος δείκτη',
|
||||
'length' => 'μήκος',
|
||||
'Column (length)' => 'Στήλη (μήκος)',
|
||||
|
||||
'Foreign keys' => 'Εξαρτημένα κλειδιά',
|
||||
'Foreign key' => 'Εξαρτημένο κλειδί',
|
||||
@@ -230,6 +233,7 @@ $translations = array(
|
||||
'Search' => 'Αναζήτηση',
|
||||
'anywhere' => 'παντού',
|
||||
'Search data in tables' => 'Αναζήτηση δεδομένων στους πίνακες',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Ταξινόμηση',
|
||||
'descending' => 'Φθίνουσα',
|
||||
'Limit' => 'Όριο',
|
||||
@@ -332,4 +336,26 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Login',
|
||||
'Logout successful.' => 'Sesión finalizada con éxito.',
|
||||
'Invalid credentials.' => 'Usuario y/o clave de acceso incorrecta.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuario',
|
||||
'Password' => 'Contraseña',
|
||||
@@ -31,6 +32,7 @@ $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',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'AL BORRAR',
|
||||
'ON UPDATE' => 'AL ACTUALIZAR',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'length' => 'longitud',
|
||||
'Column (length)' => 'Columna (longitud)',
|
||||
'View has been dropped.' => 'Vista eliminada.',
|
||||
'View has been altered.' => 'Vista modificada.',
|
||||
'View has been created.' => 'Vista creada.',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Clone' => 'Clonar',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida la cantidad máxima de campos permitidos. Por favor aumente %s.',
|
||||
'Partition by' => 'Particionar por',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Particiones',
|
||||
'Partition name' => 'Nombre de partición',
|
||||
'Values' => 'Valores',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Guardar contraseña',
|
||||
'Databases have been dropped.' => 'Bases de datos eliminadas.',
|
||||
'Search data in tables' => 'Buscar datos en tablas',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Esquema',
|
||||
'Alter schema' => 'Modificar esquema',
|
||||
'Create schema' => 'Crear esquema',
|
||||
@@ -264,4 +268,49 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Logi sisse',
|
||||
'Logout successful.' => 'Väljalogimine õnnestus.',
|
||||
'Invalid credentials.' => 'Ebakorrektsed andmed.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Kasutajanimi',
|
||||
'Password' => 'Parool',
|
||||
@@ -31,6 +32,7 @@ $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',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Indeksi tüüp',
|
||||
'length' => 'pikkus',
|
||||
'Column (length)' => 'Veerg (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.',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Clone' => 'Kloon',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s.',
|
||||
'Partition by' => 'Partitsiooni',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partitsioonid',
|
||||
'Partition name' => 'Partitsiooni nimi',
|
||||
'Values' => 'Väärtused',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Jäta mind meelde',
|
||||
'Databases have been dropped.' => 'Andmebaasid on edukalt kustutatud.',
|
||||
'Search data in tables' => 'Otsi kogu andmebaasist',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Struktuur',
|
||||
'Alter schema' => 'Muuda struktuuri',
|
||||
'Create schema' => 'Loo struktuur',
|
||||
@@ -264,4 +268,49 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'سیستم',
|
||||
'Server' => 'سرور',
|
||||
'Username' => 'نام کاربری',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'خروج',
|
||||
'Logged as: %s' => 'ورود به عنوان: %s',
|
||||
'Logout successful.' => 'با موفقیت خارج شدید.',
|
||||
'Invalid credentials.' => 'اعتبار سنجی نامعتبر.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +78,7 @@ $translations = array(
|
||||
'Data' => 'داده',
|
||||
|
||||
'Database' => 'پایگاه داده',
|
||||
'database' => 'پایگاه داده',
|
||||
'Use' => 'استفاده',
|
||||
'Select database' => 'انتخاب پایگاه داده',
|
||||
'Invalid database.' => 'پایگاه داده نامعتبر.',
|
||||
@@ -174,6 +176,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'حداکثر تعداد فیلدهای مجاز اشباع شد. لطفا %s را افزایش دهید.',
|
||||
|
||||
'Partition by' => 'بخشبندی توسط',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'بخشبندیها',
|
||||
'Partition name' => 'نام بخش',
|
||||
'Values' => 'مقادیر',
|
||||
@@ -191,7 +194,7 @@ $translations = array(
|
||||
'Alter indexes' => 'ویرایش ایندکسها',
|
||||
'Add next' => 'افرودن بعدی',
|
||||
'Index Type' => 'نوع ایندکس',
|
||||
'length' => 'طول',
|
||||
'Column (length)' => 'ستون (طول)',
|
||||
|
||||
'Foreign keys' => 'کلیدهای خارجی',
|
||||
'Foreign key' => 'کلید خارجی',
|
||||
@@ -228,6 +231,7 @@ $translations = array(
|
||||
'Search' => 'جستجو',
|
||||
'anywhere' => 'هرکجا',
|
||||
'Search data in tables' => 'جستجوی داده در جدول',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'مرتب کردن',
|
||||
'descending' => 'نزولی',
|
||||
'Limit' => 'محدودیت',
|
||||
@@ -330,4 +334,28 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Järjestelmä',
|
||||
'Server' => 'Palvelin',
|
||||
'Username' => 'Käyttäjänimi',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Kirjaudu ulos',
|
||||
'Logged as: %s' => 'Olet kirjautunut käyttäjänä: %s',
|
||||
'Logout successful.' => 'Uloskirjautuminen onnistui.',
|
||||
'Invalid credentials.' => 'Virheelliset kirjautumistiedot.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +80,7 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Tietokanta',
|
||||
'database' => 'tietokanta',
|
||||
'Use' => 'Käytä',
|
||||
'Select database' => 'Valitse tietokanta',
|
||||
'Invalid database.' => 'Tietokanta ei kelpaa.',
|
||||
@@ -176,6 +178,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Kenttien sallittu enimmäismäärä ylitetty. Kasvata arvoa %s.',
|
||||
|
||||
'Partition by' => 'Osioi arvolla',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Osiot',
|
||||
'Partition name' => 'Osion nimi',
|
||||
'Values' => 'Arvot',
|
||||
@@ -193,7 +196,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Muuta indeksejä',
|
||||
'Add next' => 'Lisää seuraava',
|
||||
'Index Type' => 'Indeksityyppi',
|
||||
'length' => 'pituus',
|
||||
'Column (length)' => 'Sarake (pituus)',
|
||||
|
||||
'Foreign keys' => 'Vieraat avaimet',
|
||||
'Foreign key' => 'Vieras avain',
|
||||
@@ -230,6 +233,7 @@ $translations = array(
|
||||
'Search' => 'Hae',
|
||||
'anywhere' => 'kaikkialta',
|
||||
'Search data in tables' => 'Hae dataa tauluista',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Lajittele',
|
||||
'descending' => 'alenevasti',
|
||||
'Limit' => 'Raja',
|
||||
@@ -346,4 +350,12 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Authentification',
|
||||
'Logout successful.' => 'Au revoir !',
|
||||
'Invalid credentials.' => 'Authentification échouée.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Serveur',
|
||||
'Username' => 'Utilisateur',
|
||||
'Password' => 'Mot de passe',
|
||||
@@ -30,6 +31,7 @@ $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',
|
||||
@@ -93,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Type d\'index',
|
||||
'length' => 'longueur',
|
||||
'Column (length)' => 'Colonne (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.',
|
||||
@@ -187,6 +189,7 @@ $translations = array(
|
||||
'Clone' => 'Cloner',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Le nombre maximum de champs est dépassé. Veuillez augmenter %s.',
|
||||
'Partition by' => 'Partitionner par',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partitions',
|
||||
'Partition name' => 'Nom de la partition',
|
||||
'Values' => 'Valeurs',
|
||||
@@ -222,6 +225,7 @@ $translations = array(
|
||||
'Databases have been dropped.' => 'Les bases de données ont été supprimées.',
|
||||
'Database has been dropped.' => 'La base de données a été supprimée.',
|
||||
'Search data in tables' => 'Rechercher dans les tables',
|
||||
'as a regular expression' => 'sous forme d\'expression régulière',
|
||||
'Schema' => 'Schéma',
|
||||
'Alter schema' => 'Modifier le schéma',
|
||||
'Create schema' => 'Créer un schéma',
|
||||
@@ -287,16 +291,26 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Conectar',
|
||||
'Logout successful.' => 'Pechouse a sesión con éxito.',
|
||||
'Invalid credentials.' => 'Credenciais (usuario e/ou contrasinal) inválidos.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuario',
|
||||
'Password' => 'Contrasinal',
|
||||
@@ -31,6 +32,7 @@ $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',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'AO BORRAR (ON DELETE)',
|
||||
'ON UPDATE' => 'AO ACTUALIZAR (ON UPDATE)',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'length' => 'lonxitude',
|
||||
'Column (length)' => 'Columna (lonxitude)',
|
||||
'View has been dropped.' => 'Eliminouse a vista.',
|
||||
'View has been altered.' => 'Modificouse a vista.',
|
||||
'View has been created.' => 'Creouse a vista.',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Clone' => 'Clonar',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida o número máximo de campos permitidos. Por favor aumente %s.',
|
||||
'Partition by' => 'Particionar por',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Particións',
|
||||
'Partition name' => 'Nome da Partición',
|
||||
'Values' => 'Valores',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Permanecer conectado',
|
||||
'Databases have been dropped.' => 'Elimináronse as bases de datos.',
|
||||
'Search data in tables' => 'Buscar datos en táboas',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Esquema',
|
||||
'Alter schema' => 'Modificar esquema',
|
||||
'Create schema' => 'Crear esquema',
|
||||
@@ -287,4 +291,26 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'התחברות',
|
||||
'Logout successful.' => 'ההתחברות הצליחה',
|
||||
'Invalid credentials.' => 'פרטי התחברות שגויים',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'שרת',
|
||||
'Username' => 'שם משתמש',
|
||||
'Password' => 'סיסמה',
|
||||
@@ -30,6 +31,7 @@ $translations = array(
|
||||
'Create database' => 'צור מסד נתונים',
|
||||
'SQL command' => 'שאילתת SQL',
|
||||
'Logout' => 'התנתק',
|
||||
'database' => 'מסד נתונים',
|
||||
'Use' => 'השתמש',
|
||||
'No tables.' => 'אין טבלאות',
|
||||
'select' => 'בחר',
|
||||
@@ -93,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'בעת מחיקה',
|
||||
'ON UPDATE' => 'בעת עידכון',
|
||||
'Index Type' => 'סוג אינדקס',
|
||||
'length' => 'אורך',
|
||||
'Column (length)' => 'עמודה (אורך)',
|
||||
'View has been dropped.' => 'התצוגה הושלכה',
|
||||
'View has been altered.' => 'התצוגה שונתה',
|
||||
'View has been created.' => 'התצוגה נוצרה',
|
||||
@@ -187,6 +189,7 @@ $translations = array(
|
||||
'Clone' => 'שכפל',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'הגעת למספר השדות המרבי. בבקשה הגדל את %s',
|
||||
'Partition by' => 'מחיצות ע"י',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'מחיצות',
|
||||
'Partition name' => 'שם מחיצה',
|
||||
'Values' => 'ערכים',
|
||||
@@ -222,6 +225,7 @@ $translations = array(
|
||||
'Databases have been dropped.' => 'מסד הנתונים הושלך',
|
||||
'Database has been dropped.' => 'מסד הנתונים הושלך',
|
||||
'Search data in tables' => 'חפש מידע בטבלאות',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'סכמה',
|
||||
'Alter schema' => 'שנה סכמה',
|
||||
'Create schema' => 'צור סכמה',
|
||||
@@ -289,4 +293,24 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Belépés',
|
||||
'Logout successful.' => 'Sikeres kilépés.',
|
||||
'Invalid credentials.' => 'Érvénytelen adatok.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Szerver',
|
||||
'Username' => 'Felhasználó',
|
||||
'Password' => 'Jelszó',
|
||||
@@ -31,6 +32,7 @@ $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',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'törléskor',
|
||||
'ON UPDATE' => 'frissítéskor',
|
||||
'Index Type' => 'Index típusa',
|
||||
'length' => 'méret',
|
||||
'Column (length)' => 'Oszop (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.',
|
||||
@@ -188,6 +190,7 @@ $translations = array(
|
||||
'Tables have been dropped.' => 'Táblák eldobva.',
|
||||
'Clone' => 'Klónoz',
|
||||
'Partition by' => 'Particionálás ezzel',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Particiók',
|
||||
'Partition name' => 'Partició neve',
|
||||
'Values' => 'Értékek',
|
||||
@@ -249,6 +252,7 @@ $translations = array(
|
||||
'Type has been created.' => 'Típus létrehozva.',
|
||||
'Alter type' => 'Típus módosítása',
|
||||
'Search data in tables' => 'Keresés a táblákban',
|
||||
'as a regular expression' => null,
|
||||
'From server' => 'Szerverről',
|
||||
'empty' => 'üres',
|
||||
'now' => 'most',
|
||||
@@ -263,4 +267,50 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Sistem',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Pengguna',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Keluar',
|
||||
'Logged as: %s' => 'Masuk sebagai: %s',
|
||||
'Logout successful.' => 'Berhasil keluar.',
|
||||
'Invalid credentials.' => 'Akses tidak sah.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Language' => 'Bahasa',
|
||||
'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Kirim ulang formulir.',
|
||||
'No extension' => 'Ekstensi tidak ada',
|
||||
@@ -73,6 +74,7 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Basis data',
|
||||
'database' => 'basis data',
|
||||
'Use' => 'Gunakan',
|
||||
'Select database' => 'Pilih basis data',
|
||||
'Invalid database.' => 'Basis data tidak sah.',
|
||||
@@ -166,6 +168,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Sudah lebih dumlah ruas maksimum yang diizinkan. Harap naikkan %s.',
|
||||
|
||||
'Partition by' => 'Partisi menurut',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partisi',
|
||||
'Partition name' => 'Nama partisi',
|
||||
'Values' => 'Nilai',
|
||||
@@ -182,7 +185,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ubah indeks',
|
||||
'Add next' => 'Tambah setelahnya',
|
||||
'Index Type' => 'Jenis Indeks',
|
||||
'length' => 'panjang',
|
||||
'Column (length)' => 'Kolom (panjang)',
|
||||
|
||||
'Foreign keys' => 'Kunci asing',
|
||||
'Foreign key' => 'Kunci asing',
|
||||
@@ -219,6 +222,7 @@ $translations = array(
|
||||
'Search' => 'Cari',
|
||||
'anywhere' => 'di mana pun',
|
||||
'Search data in tables' => 'Cari data dalam tabel',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Urutkan',
|
||||
'descending' => 'menurun',
|
||||
'Limit' => 'Batas',
|
||||
@@ -312,4 +316,46 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Autenticazione',
|
||||
'Logout successful.' => 'Uscita effettuata con successo.',
|
||||
'Invalid credentials.' => 'Credenziali non valide.',
|
||||
'Invalid server or credentials.' => 'Server o credenziali non valide.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Utente',
|
||||
'Password' => 'Password',
|
||||
@@ -31,6 +32,7 @@ $translations = array(
|
||||
'Create database' => 'Crea database',
|
||||
'SQL command' => 'Comando SQL',
|
||||
'Logout' => 'Esci',
|
||||
'database' => 'database',
|
||||
'Use' => 'Usa',
|
||||
'No tables.' => 'No tabelle.',
|
||||
'select' => 'seleziona',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipo indice',
|
||||
'length' => 'lunghezza',
|
||||
'Column (length)' => 'Colonna (lunghezza)',
|
||||
'View has been dropped.' => 'Vista eliminata.',
|
||||
'View has been altered.' => 'Vista modificata.',
|
||||
'View has been created.' => 'Vista creata.',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Clone' => 'Clona',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Troppi campi. Per favore aumentare %s.',
|
||||
'Partition by' => 'Partiziona per',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partizioni',
|
||||
'Partition name' => 'Nome partizione',
|
||||
'Values' => 'Valori',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Login permanente',
|
||||
'Databases have been dropped.' => 'Database eliminati.',
|
||||
'Search data in tables' => 'Cerca nelle tabelle',
|
||||
'as a regular expression' => 'come espressione regolare',
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'Modifica schema',
|
||||
'Create schema' => 'Crea schema',
|
||||
@@ -264,6 +268,7 @@ $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',
|
||||
@@ -277,12 +282,13 @@ $translations = array(
|
||||
'Loading' => 'Caricamento',
|
||||
'ATTACH queries are not supported.' => 'ATTACH queries non sono supportate.',
|
||||
'Warnings' => 'Attenzione',
|
||||
'%d / ' => '%d / ',
|
||||
'%d / ' => array('%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.',
|
||||
@@ -299,4 +305,12 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'ログイン',
|
||||
'Logout successful.' => 'ログアウト',
|
||||
'Invalid credentials.' => '不正なログイン',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'サーバ',
|
||||
'Username' => 'ユーザ名',
|
||||
'Password' => 'パスワード',
|
||||
@@ -31,6 +32,7 @@ $translations = array(
|
||||
'Create database' => 'データベースを作成',
|
||||
'SQL command' => 'SQLコマンド',
|
||||
'Logout' => 'ログアウト',
|
||||
'database' => 'データベース',
|
||||
'Use' => '使用',
|
||||
'No tables.' => 'テーブルがありません。',
|
||||
'select' => '選択',
|
||||
@@ -94,7 +96,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => '索引の型',
|
||||
'length' => '長さ',
|
||||
'Column (length)' => '列(長さ)',
|
||||
'View has been dropped.' => 'ビューを削除しました',
|
||||
'View has been altered.' => 'ビューを変更しました',
|
||||
'View has been created.' => 'ビューを作成しました',
|
||||
@@ -188,6 +190,7 @@ $translations = array(
|
||||
'Clone' => 'クローン',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => '定義可能な最大フィールド数を越えました。%s を増やしてください。',
|
||||
'Partition by' => 'パーティション',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'パーティション',
|
||||
'Partition name' => 'パーティション名',
|
||||
'Values' => '値',
|
||||
@@ -224,6 +227,7 @@ $translations = array(
|
||||
'Permanent login' => '永続的にログイン',
|
||||
'Databases have been dropped.' => 'データベースを削除しました',
|
||||
'Search data in tables' => 'データを検索する',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'スキーマ',
|
||||
'Alter schema' => 'スキーマ変更',
|
||||
'Create schema' => 'スキーマ追加',
|
||||
@@ -273,4 +277,40 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'შესვლა',
|
||||
'Logout successful.' => 'გამოხვედით სისტემიდან.',
|
||||
'Invalid credentials.' => 'არასწორი მომხმარებელი ან პაროლი.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'სერვერი',
|
||||
'Username' => 'მომხმარებელი',
|
||||
'Password' => 'პაროლი',
|
||||
@@ -31,6 +32,7 @@ $translations = array(
|
||||
'Create database' => 'ბაზის შექმნა',
|
||||
'SQL command' => 'SQL-ბრძანება',
|
||||
'Logout' => 'გასვლა',
|
||||
'database' => 'ბაზა',
|
||||
'Use' => 'არჩევა',
|
||||
'No tables.' => 'ბაზაში ცხრილი არაა.',
|
||||
'select' => 'არჩევა',
|
||||
@@ -93,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'წაშლისას',
|
||||
'ON UPDATE' => 'განახლებისას',
|
||||
'Index Type' => 'ინდექსის სახეობა',
|
||||
'length' => 'სიგრძე',
|
||||
'Column (length)' => 'ველი (სიგრძე)',
|
||||
'View has been dropped.' => 'წარმოდგენა წაიშალა.',
|
||||
'View has been altered.' => 'წარმოდგენა შეიცვალა.',
|
||||
'View has been created.' => 'წარმოდგენა შეიქმნა.',
|
||||
@@ -186,6 +188,7 @@ $translations = array(
|
||||
'Tables have been dropped.' => 'ცხრილები წაიშალა.',
|
||||
'Clone' => 'კლონირება',
|
||||
'Partition by' => 'დაყოფა',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'დანაყოფები',
|
||||
'Partition name' => 'დანაყოფის სახელი',
|
||||
'Values' => 'პარამეტრები',
|
||||
@@ -219,6 +222,7 @@ $translations = array(
|
||||
'Permanent login' => 'სისტემაში დარჩენა',
|
||||
'Databases have been dropped.' => 'ბაზა წაიშალა.',
|
||||
'Search data in tables' => 'ცხრილებში ძებნა',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'სქემა',
|
||||
'Alter schema' => 'სქემის შეცვლა',
|
||||
'Create schema' => 'ახალი სქემა',
|
||||
@@ -299,4 +303,14 @@ $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,
|
||||
);
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'$1-$3-$5' => '$1-$3-$5',
|
||||
'%.3f s' => '%.3f 초',
|
||||
'%d byte(s)' => '%d 바이트',
|
||||
@@ -46,7 +47,7 @@ $translations = array(
|
||||
'Clone' => '복제',
|
||||
'collation' => '정렬',
|
||||
'Collation' => '정렬',
|
||||
'length' => '길이',
|
||||
'Column (length)' => '열 (길이)',
|
||||
'Column name' => '열 이름',
|
||||
'Column' => '열',
|
||||
'Comment' => '주석',
|
||||
@@ -71,6 +72,7 @@ $translations = array(
|
||||
'Database has been dropped.' => '데이터베이스를 삭제했습니다.',
|
||||
'Database has been renamed.' => '데이터베이스의 이름을 바꾸었습니다.',
|
||||
'Database schema' => '데이터베이스 구조',
|
||||
'database' => '데이터베이스',
|
||||
'Database' => '데이터베이스',
|
||||
'Databases have been dropped.' => '데이터베이스를 삭제했습니다.',
|
||||
'Date and time' => '시간',
|
||||
@@ -120,7 +122,7 @@ $translations = array(
|
||||
'Indexes have been altered.' => '색인을 변경했습니다.',
|
||||
'Indexes' => '색인',
|
||||
'Insert' => '삽입',
|
||||
'Invalid credentials.' => '잘못된 로그인',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Invalid CSRF token. Send the form again.' => '잘못된 CSRF 토큰입니다. 다시 보내주십시오.',
|
||||
'Invalid database.' => '잘못된 데이터베이스입니다.',
|
||||
'Invalid schema.' => '잘못된 스키마입니다.',
|
||||
@@ -171,6 +173,7 @@ $translations = array(
|
||||
'Parameter name' => '매개변수 이름',
|
||||
'Partition by' => '파티션',
|
||||
'Partition name' => '파티션 이름',
|
||||
'Partition' => null,
|
||||
'Partitions' => '파티션',
|
||||
'Password' => '비밀번호',
|
||||
'Permanent link' => '영구적으로 링크',
|
||||
@@ -203,6 +206,7 @@ $translations = array(
|
||||
'Schema has been dropped.' => '스키마를 삭제했습니다.',
|
||||
'Schema' => '스키마',
|
||||
'Search data in tables' => '테이블 내 데이터 검색',
|
||||
'as a regular expression' => null,
|
||||
'Search' => '검색',
|
||||
'Select data' => '데이터를 선택하십시오.',
|
||||
'Select database' => '데이터베이스를 선택하십시오.',
|
||||
@@ -276,4 +280,37 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Sistema',
|
||||
'Server' => 'Serveris',
|
||||
'Username' => 'Vartotojas',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Atsijungti',
|
||||
'Logged as: %s' => 'Prisijungęs kaip: %s',
|
||||
'Logout successful.' => 'Jūs atsijungėte nuo sistemos.',
|
||||
'Invalid credentials.' => 'Neteisingi prisijungimo duomenys.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +74,7 @@ $translations = array(
|
||||
'Data' => 'Duomenys',
|
||||
|
||||
'Database' => 'Duomenų bazė',
|
||||
'database' => 'duomenų bazė',
|
||||
'Use' => 'Naudoti',
|
||||
'Select database' => 'Pasirinkti duomenų bazę',
|
||||
'Invalid database.' => 'Neteisinga duomenų bazė.',
|
||||
@@ -165,6 +167,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Viršytas maksimalus leidžiamų stulpelių kiekis. Padidinkite %s.',
|
||||
|
||||
'Partition by' => 'Skirstyti pagal',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Skirsniai',
|
||||
'Partition name' => 'Skirsnio pavadinimas',
|
||||
'Values' => 'Reikšmės',
|
||||
@@ -181,7 +184,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Redaguoti indeksus',
|
||||
'Add next' => 'Pridėti kitą',
|
||||
'Index Type' => 'Indekso tipas',
|
||||
'length' => 'ilgis',
|
||||
'Column (length)' => 'Stulpelis (ilgis)',
|
||||
|
||||
'Foreign keys' => 'Išoriniai raktai',
|
||||
'Foreign key' => 'Išorinis raktas',
|
||||
@@ -218,6 +221,7 @@ $translations = array(
|
||||
'Search' => 'Ieškoti',
|
||||
'anywhere' => 'visur',
|
||||
'Search data in tables' => 'Ieškoti duomenų lentelėse',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Rikiuoti',
|
||||
'descending' => 'mažėjimo tvarka',
|
||||
'Limit' => 'Limitas',
|
||||
@@ -308,4 +312,50 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Ieiet',
|
||||
'Logout successful.' => 'Jūs veiksmīgi izgājāt no sistēmas.',
|
||||
'Invalid credentials.' => 'Nepareizs lietotāja vārds vai parole.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Serveris',
|
||||
'Username' => 'Lietotājs',
|
||||
'Password' => 'Parole',
|
||||
@@ -31,6 +32,7 @@ $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',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'Pie dzēšanas',
|
||||
'ON UPDATE' => 'Pie atjaunošanas',
|
||||
'Index Type' => 'Indeksa tips',
|
||||
'length' => 'garums',
|
||||
'Column (length)' => 'Lauks (garums)',
|
||||
'View has been dropped.' => 'Skats dzēsts.',
|
||||
'View has been altered.' => 'Skats izmainīts.',
|
||||
'View has been created.' => 'Skats izveidots.',
|
||||
@@ -188,6 +190,7 @@ $translations = array(
|
||||
'Tables have been dropped.' => 'Tabulas dzēstas.',
|
||||
'Clone' => 'Klonēt',
|
||||
'Partition by' => 'Sadalīt pēc',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partīcijas',
|
||||
'Partition name' => 'Partīcijas nosaukums',
|
||||
'Values' => 'Vērtības',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Atcerēties mani',
|
||||
'Databases have been dropped.' => 'Datubāzes dzēstas.',
|
||||
'Search data in tables' => 'Meklēt tabulās',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Shēma',
|
||||
'Alter schema' => 'Izmainīt shēmu',
|
||||
'Create schema' => 'Jauna shēma',
|
||||
@@ -284,10 +288,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',
|
||||
@@ -299,4 +303,14 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Sistem',
|
||||
'Server' => 'Pelayan',
|
||||
'Username' => 'Nama pengguna',
|
||||
@@ -11,7 +12,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 credentials.' => 'Akses tidak sah.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +83,7 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Pangkalan data',
|
||||
'database' => 'pangkalan data',
|
||||
'Use' => 'Guna',
|
||||
'Select database' => 'Pilih pangkalan data',
|
||||
'Invalid database.' => 'Pangkalan data tidak sah.',
|
||||
@@ -180,6 +182,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Bilangan medan telah melebihi had yang dibenarkan. Sila tingkatkan %s.',
|
||||
|
||||
'Partition by' => 'Partition mengikut',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partition',
|
||||
'Partition name' => 'Nama partition',
|
||||
'Values' => 'Nilai',
|
||||
@@ -197,7 +200,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ubah indeks',
|
||||
'Add next' => 'Tambah yang seterusnya',
|
||||
'Index Type' => 'Jenis Indeks',
|
||||
'length' => 'kepanjangan',
|
||||
'Column (length)' => 'Kolum (kepanjangan)',
|
||||
|
||||
'Foreign keys' => 'Kunci asing',
|
||||
'Foreign key' => 'Kunci asing',
|
||||
@@ -234,6 +237,7 @@ $translations = array(
|
||||
'Search' => 'Cari',
|
||||
'anywhere' => 'di mana-mana',
|
||||
'Search data in tables' => 'Cari data dalam jadual',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Susun',
|
||||
'descending' => 'menurun',
|
||||
'Limit' => 'Had',
|
||||
@@ -336,4 +340,22 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Aanmelden',
|
||||
'Logout successful.' => 'Successvol afgemeld.',
|
||||
'Invalid credentials.' => 'Ongeldige gebruikersgegevens.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Gebruikersnaam',
|
||||
'Password' => 'Wachtwoord',
|
||||
@@ -32,6 +33,7 @@ $translations = array(
|
||||
'Create database' => 'Database aanmaken',
|
||||
'SQL command' => 'SQL opdracht',
|
||||
'Logout' => 'Afmelden',
|
||||
'database' => 'database',
|
||||
'Use' => 'Gebruik',
|
||||
'No tables.' => 'Geen tabellen.',
|
||||
'select' => 'kies',
|
||||
@@ -96,7 +98,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Index type',
|
||||
'length' => 'lengte',
|
||||
'Column (length)' => 'Kolom (lengte)',
|
||||
'View has been dropped.' => 'View verwijderd.',
|
||||
'View has been altered.' => 'View aangepast.',
|
||||
'View has been created.' => 'View aangemaakt.',
|
||||
@@ -190,6 +192,7 @@ $translations = array(
|
||||
'Clone' => 'Dupliceer',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maximum aantal velden bereikt. Verhoog %s.',
|
||||
'Partition by' => 'Partitioneren op',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partities',
|
||||
'Partition name' => 'Partitie naam',
|
||||
'Values' => 'Waarden',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'%d in total' => '%d in totaal',
|
||||
'Permanent login' => 'Blijf aangemeld',
|
||||
'Search data in tables' => 'Zoeken in database',
|
||||
'as a regular expression' => 'als een regular expression',
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'Schema wijzigen',
|
||||
'Create schema' => 'Schema maken',
|
||||
@@ -264,6 +268,7 @@ $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',
|
||||
@@ -283,6 +288,7 @@ $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.',
|
||||
@@ -299,4 +305,12 @@ $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,
|
||||
);
|
||||
|
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'System' => 'System',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Brukernavn',
|
||||
@@ -9,7 +10,7 @@ $translations = array(
|
||||
'Logout' => 'Logg ut',
|
||||
'Logged as: %s' => 'Logget inn som: %s',
|
||||
'Logout successful.' => 'Utlogging vellykket.',
|
||||
'Invalid credentials.' => 'Ugylding innloggingsinformasjon.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +65,7 @@ $translations = array(
|
||||
'Format' => 'Format',
|
||||
'Data' => 'Data',
|
||||
'Database' => 'Database',
|
||||
'database' => 'database',
|
||||
'Use' => 'Bruk',
|
||||
'Select database' => 'Velg database',
|
||||
'Invalid database.' => 'Ugyldig database.',
|
||||
@@ -150,6 +152,7 @@ $translations = array(
|
||||
'Remove' => 'Fjern',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimum antall feltnavn overskredet - venligst øk %s.',
|
||||
'Partition by' => 'Partisjoner ved',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partisjoner',
|
||||
'Partition name' => 'Partisjonsnavn',
|
||||
'Values' => 'Verdier',
|
||||
@@ -164,7 +167,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Endre indekser',
|
||||
'Add next' => 'Legg til neste',
|
||||
'Index Type' => 'Indekstype',
|
||||
'length' => 'lengde',
|
||||
'Column (length)' => 'Kolonne (lengde)',
|
||||
'Foreign keys' => 'Fremmednøkler',
|
||||
'Foreign key' => 'Fremmednøkkel',
|
||||
'Foreign key has been dropped.' => 'Fremmednøkkelen er slettet.',
|
||||
@@ -198,6 +201,7 @@ $translations = array(
|
||||
'Search' => 'Søk',
|
||||
'anywhere' => 'hvorsomhelst',
|
||||
'Search data in tables' => 'Søk data i tabeller',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Sorter',
|
||||
'descending' => 'minkende',
|
||||
'Limit' => 'Skranke',
|
||||
@@ -278,4 +282,35 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Rodzaj bazy',
|
||||
'Server' => 'Serwer',
|
||||
'Username' => 'Użytkownik',
|
||||
@@ -11,7 +12,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 credentials.' => 'Nieprawidłowe dane logowania.',
|
||||
'Invalid server or credentials.' => 'Nieprawidłowy serwer lub 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,6 +82,7 @@ $translations = array(
|
||||
'Data' => 'Dane',
|
||||
|
||||
'Database' => 'Baza danych',
|
||||
'database' => 'baza danych',
|
||||
'Use' => 'Wybierz',
|
||||
'Select database' => 'Wybierz bazę danych',
|
||||
'Invalid database.' => 'Nie znaleziono bazy danych.',
|
||||
@@ -179,6 +181,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Przekroczono maksymalną liczbę pól. Zwiększ %s.',
|
||||
|
||||
'Partition by' => 'Partycjonowanie',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partycje',
|
||||
'Partition name' => 'Nazwa partycji',
|
||||
'Values' => 'Wartości',
|
||||
@@ -196,7 +199,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Zmień indeksy',
|
||||
'Add next' => 'Dodaj następny',
|
||||
'Index Type' => 'Typ indeksu',
|
||||
'length' => 'długość',
|
||||
'Column (length)' => 'Kolumna (długość)',
|
||||
|
||||
'Foreign keys' => 'Klucze obce',
|
||||
'Foreign key' => 'Klucz obcy',
|
||||
@@ -233,6 +236,7 @@ $translations = array(
|
||||
'Search' => 'Szukaj',
|
||||
'anywhere' => 'gdziekolwiek',
|
||||
'Search data in tables' => 'Wyszukaj we wszystkich tabelach',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Sortuj',
|
||||
'descending' => 'malejąco',
|
||||
'Limit' => 'Limit',
|
||||
@@ -336,4 +340,22 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Entrar',
|
||||
'Logout successful.' => 'Saída bem sucedida.',
|
||||
'Invalid credentials.' => 'Identificação inválida.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Usuário',
|
||||
'Password' => 'Senha',
|
||||
@@ -31,6 +32,7 @@ $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',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'length' => 'tamanho',
|
||||
'Column (length)' => 'Coluna (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.',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Clone' => 'Clonar',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
|
||||
'Partition by' => 'Particionar por',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partições',
|
||||
'Partition name' => 'Nome da Partição',
|
||||
'Values' => 'Valores',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Login permanente',
|
||||
'Databases have been dropped.' => 'A Base de dados foi apagada.',
|
||||
'Search data in tables' => 'Buscar dados nas Tabelas',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Esquema',
|
||||
'Alter schema' => 'Alterar esquema',
|
||||
'Create schema' => 'Criar esquema',
|
||||
@@ -259,4 +263,54 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Entrar',
|
||||
'Logout successful.' => 'Sessão terminada com sucesso.',
|
||||
'Invalid credentials.' => 'Identificação inválida.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Servidor',
|
||||
'Username' => 'Nome de utilizador',
|
||||
'Password' => 'Senha',
|
||||
@@ -31,6 +32,7 @@ $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',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'Tipo de índice',
|
||||
'length' => 'tamanho',
|
||||
'Column (length)' => 'coluna (tamanho)',
|
||||
'View has been dropped.' => 'Vista eliminada.',
|
||||
'View has been altered.' => 'Vista modificada.',
|
||||
'View has been created.' => 'Vista criada.',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Clone' => 'Clonar',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
|
||||
'Partition by' => 'Particionar por',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partições',
|
||||
'Partition name' => 'Nome da Partição',
|
||||
'Values' => 'Valores',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Memorizar a senha',
|
||||
'Databases have been dropped.' => 'Bases de dados eliminadas.',
|
||||
'Search data in tables' => 'Pesquisar dados nas Tabelas',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Esquema',
|
||||
'Alter schema' => 'Modificar esquema',
|
||||
'Create schema' => 'Criar esquema',
|
||||
@@ -259,4 +263,54 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Intră',
|
||||
'Logout successful.' => 'Ați ieșit cu succes.',
|
||||
'Invalid credentials.' => 'Numele de utilizator sau parola este greșită.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Nume de utilizator',
|
||||
'Password' => 'Parola',
|
||||
@@ -31,6 +32,7 @@ $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ă',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'La ștergere',
|
||||
'ON UPDATE' => 'La modificare',
|
||||
'Index Type' => 'Tipul indexului',
|
||||
'length' => 'lungimea',
|
||||
'Column (length)' => 'Coloană (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ă.',
|
||||
@@ -188,6 +190,7 @@ $translations = array(
|
||||
'Tables have been dropped.' => 'Tabelele au fost șterse.',
|
||||
'Clone' => 'Clonează',
|
||||
'Partition by' => 'Împarte',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Secțiuni',
|
||||
'Partition name' => 'Denumirea secțiunii',
|
||||
'Values' => 'Parametru',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Logare permanentă',
|
||||
'Databases have been dropped.' => 'Bazele de date au fost șterse.',
|
||||
'Search data in tables' => 'Caută în tabele',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'Modifică schema',
|
||||
'Create schema' => 'Crează o schemă',
|
||||
@@ -264,4 +268,49 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'Войти',
|
||||
'Logout successful.' => 'Вы успешно покинули систему.',
|
||||
'Invalid credentials.' => 'Неправильное имя пользователя или пароль.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'Сервер',
|
||||
'Username' => 'Имя пользователя',
|
||||
'Password' => 'Пароль',
|
||||
@@ -31,6 +32,7 @@ $translations = array(
|
||||
'Create database' => 'Создать базу данных',
|
||||
'SQL command' => 'SQL-запрос',
|
||||
'Logout' => 'Выйти',
|
||||
'database' => 'база данных',
|
||||
'Use' => 'Выбрать',
|
||||
'No tables.' => 'В базе данных нет таблиц.',
|
||||
'select' => 'выбрать',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'При стирании',
|
||||
'ON UPDATE' => 'При обновлении',
|
||||
'Index Type' => 'Тип индекса',
|
||||
'length' => 'длина',
|
||||
'Column (length)' => 'Поле (длина)',
|
||||
'View has been dropped.' => 'Представление было удалено.',
|
||||
'View has been altered.' => 'Представление было изменено.',
|
||||
'View has been created.' => 'Представление было создано.',
|
||||
@@ -188,6 +190,7 @@ $translations = array(
|
||||
'Tables have been dropped.' => 'Таблицы были удалены.',
|
||||
'Clone' => 'Клонировать',
|
||||
'Partition by' => 'Разделить по',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Разделы',
|
||||
'Partition name' => 'Название раздела',
|
||||
'Values' => 'Параметры',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Оставаться в системе',
|
||||
'Databases have been dropped.' => 'Базы данных удалены.',
|
||||
'Search data in tables' => 'Поиск в таблицах',
|
||||
'as a regular expression' => 'как регулярное выражение',
|
||||
'Schema' => 'Схема',
|
||||
'Alter schema' => 'Изменить схему',
|
||||
'Create schema' => 'Новая схема',
|
||||
@@ -286,8 +290,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',
|
||||
@@ -299,5 +303,14 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => 'Domov',
|
||||
'Login' => 'Prihlásiť sa',
|
||||
'Logout successful.' => 'Odhlásenie prebehlo v poriadku.',
|
||||
'Invalid credentials.' => 'Neplatné prihlasovacie údaje.',
|
||||
'Invalid server or credentials.' => 'Neplatný server alebo prihlasovacie údaje.',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Používateľ',
|
||||
'Password' => 'Heslo',
|
||||
@@ -32,6 +33,7 @@ $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ť',
|
||||
@@ -96,7 +98,7 @@ $translations = array(
|
||||
'ON DELETE' => 'Pri zmazaní',
|
||||
'ON UPDATE' => 'Pri aktualizácii',
|
||||
'Index Type' => 'Typ indexu',
|
||||
'length' => 'dĺžka',
|
||||
'Column (length)' => 'Stĺpec (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ý.',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Whole result' => 'Celý výsledok',
|
||||
'Clone' => 'Klonovať',
|
||||
'Partition by' => 'Rozdeliť podľa',
|
||||
'Partition' => 'Oddiel',
|
||||
'Partitions' => 'Oddiely',
|
||||
'Partition name' => 'Názov oddielu',
|
||||
'Values' => 'Hodnoty',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'Trvalé prihlásenie',
|
||||
'%d in total' => '%d celkom',
|
||||
'Search data in tables' => 'Vyhľadať dáta v tabuľkách',
|
||||
'as a regular expression' => 'ako regulárny výraz',
|
||||
'Alter schema' => 'Pozmeniť schému',
|
||||
'Create schema' => 'Vytvoriť schému',
|
||||
'Schema has been dropped.' => 'Schéma bola odstránená.',
|
||||
@@ -273,8 +277,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' => 'Načítať ďalšie dáta',
|
||||
'Loading' => 'Načítava sa',
|
||||
'Load more data' => 'Nahráť ďalšie dáta',
|
||||
'Loading' => 'Nahráva sa',
|
||||
'ATTACH queries are not supported.' => 'Dotazy ATTACH nie sú podporované.',
|
||||
'Warnings' => 'Varovania',
|
||||
'%d / ' => '%d / ',
|
||||
@@ -287,7 +291,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ť',
|
||||
@@ -300,4 +304,11 @@ $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.',
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Sistem',
|
||||
'Server' => 'Strežnik',
|
||||
'Username' => 'Uporabniško ime',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Odjavi se',
|
||||
'Logged as: %s' => 'Prijavljen kot: %s',
|
||||
'Logout successful.' => 'Prijava uspešna.',
|
||||
'Invalid credentials.' => 'Neveljavne pravice.',
|
||||
'Invalid server or credentials.' => 'Neveljaven strežnik ali pravice.',
|
||||
'Language' => 'Jezik',
|
||||
'Invalid CSRF token. Send the form again.' => 'Neveljaven token CSRF. Pošljite formular še enkrat.',
|
||||
'No extension' => 'Brez dodatkov',
|
||||
@@ -72,6 +73,7 @@ $translations = array(
|
||||
'Data' => 'Podatki',
|
||||
|
||||
'Database' => 'Baza',
|
||||
'database' => 'baza',
|
||||
'Use' => 'Uporabi',
|
||||
'Select database' => 'Izberi bazo',
|
||||
'Invalid database.' => 'Neveljavna baza.',
|
||||
@@ -161,6 +163,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Največje število dovoljenih polje je preseženo. Prosimo, povečajte %s.',
|
||||
|
||||
'Partition by' => 'Porazdeli po',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Porazdelitve',
|
||||
'Partition name' => 'Ime porazdelitve',
|
||||
'Values' => 'Vrednosti',
|
||||
@@ -177,7 +180,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Spremeni indekse',
|
||||
'Add next' => 'Dodaj naslednjega',
|
||||
'Index Type' => 'Tip indeksa',
|
||||
'length' => 'dolžina',
|
||||
'Column (length)' => 'Stolpec (dolžina)',
|
||||
|
||||
'Foreign keys' => 'Tuji ključi',
|
||||
'Foreign key' => 'Tuj ključ',
|
||||
@@ -214,6 +217,7 @@ $translations = array(
|
||||
'Search' => 'Išči',
|
||||
'anywhere' => 'kjerkoli',
|
||||
'Search data in tables' => 'Išče podatke po tabelah',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Sortiraj',
|
||||
'descending' => 'padajoče',
|
||||
'Limit' => 'Limita',
|
||||
@@ -303,4 +307,52 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Систем',
|
||||
'Server' => 'Сервер',
|
||||
'Username' => 'Корисничко име',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Одјава',
|
||||
'Logged as: %s' => 'Пријави се као: %s',
|
||||
'Logout successful.' => 'Успешна одјава.',
|
||||
'Invalid credentials.' => 'Неважеће дозволе.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Language' => 'Језик',
|
||||
'Invalid CSRF token. Send the form again.' => 'Неважећи CSRF код. Проследите поново форму.',
|
||||
'No extension' => 'Без додатака',
|
||||
@@ -73,6 +74,7 @@ $translations = array(
|
||||
'Data' => 'Податци',
|
||||
|
||||
'Database' => 'База података',
|
||||
'database' => 'база података',
|
||||
'Use' => 'Користи',
|
||||
'Select database' => 'Изаберите базу',
|
||||
'Invalid database.' => 'Неисправна база података.',
|
||||
@@ -166,6 +168,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Премашен је максимални број дозвољених поља. Молим увећајте %s.',
|
||||
|
||||
'Partition by' => 'Подели по',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Поделе',
|
||||
'Partition name' => 'Име поделе',
|
||||
'Values' => 'Вредности',
|
||||
@@ -182,7 +185,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Уреди индексе',
|
||||
'Add next' => 'Додај следећи',
|
||||
'Index Type' => 'Тип индекса',
|
||||
'length' => 'дужина',
|
||||
'Column (length)' => 'Колона (дужина)',
|
||||
|
||||
'Foreign keys' => 'Страни кључеви',
|
||||
'Foreign key' => 'Страни кључ',
|
||||
@@ -219,6 +222,7 @@ $translations = array(
|
||||
'Search' => 'Претрага',
|
||||
'anywhere' => 'било где',
|
||||
'Search data in tables' => 'Претражи податке у табелама',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Поређај',
|
||||
'descending' => 'опадајуће',
|
||||
'Limit' => 'Граница',
|
||||
@@ -315,4 +319,43 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'System',
|
||||
'Server' => 'Server',
|
||||
'Username' => 'Användarnamn',
|
||||
@@ -11,7 +12,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 credentials.' => 'Ogiltiga inloggningsuppgifter.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +90,7 @@ $translations = array(
|
||||
'Data' => 'Data',
|
||||
|
||||
'Database' => 'Databas',
|
||||
'database' => 'databas',
|
||||
'DB' => 'DB',
|
||||
'Use' => 'Använd',
|
||||
'Select database' => 'Välj databas',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Högsta nummer tillåtna fält är överskridet. Vänligen höj %s.',
|
||||
|
||||
'Partition by' => 'Partitionera om',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Partitioner',
|
||||
'Partition name' => 'Partition',
|
||||
'Values' => 'Värden',
|
||||
@@ -206,7 +209,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Ändra index',
|
||||
'Add next' => 'Lägg till nästa',
|
||||
'Index Type' => 'Indextyp',
|
||||
'length' => 'längd',
|
||||
'Column (length)' => 'Kolumn (längd)',
|
||||
|
||||
'Foreign keys' => 'Främmande nycklar',
|
||||
'Foreign key' => 'Främmande nyckel',
|
||||
@@ -243,6 +246,7 @@ $translations = array(
|
||||
'Search' => 'Sök',
|
||||
'anywhere' => 'överallt',
|
||||
'Search data in tables' => 'Sök data i tabeller',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Sortera',
|
||||
'descending' => 'Fallande',
|
||||
'Limit' => 'Begränsning',
|
||||
@@ -345,4 +349,12 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'நுழை',
|
||||
'Logout successful.' => 'வெற்றிகரமாய் வெளியேறியாயிற்று.',
|
||||
'Invalid credentials.' => 'சரியான விபரங்கள் இல்லை.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'வழங்கி (Server)',
|
||||
'Username' => 'பயனாளர் (User)',
|
||||
'Password' => 'கடவுச்சொல்',
|
||||
@@ -31,6 +32,7 @@ $translations = array(
|
||||
'Create database' => 'தகவல்தளத்தை உருவாக்கு',
|
||||
'SQL command' => 'SQL கட்டளை',
|
||||
'Logout' => 'வெளியேறு',
|
||||
'database' => 'தகவல்தளம்',
|
||||
'Use' => 'உபயோகி',
|
||||
'No tables.' => 'அட்டவணை இல்லை.',
|
||||
'select' => 'தேர்வு செய்',
|
||||
@@ -93,7 +95,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'அகவரிசை வகை (Index Type)',
|
||||
'length' => 'நீளம்',
|
||||
'Column (length)' => 'நெடுவரிசை (நீளம்)',
|
||||
'View has been dropped.' => 'தோற்றம் நீக்கப்பட்டது.',
|
||||
'View has been altered.' => 'தோற்றம் மாற்றப்பட்டது.',
|
||||
'View has been created.' => 'தோற்றம் உருவாக்கப்பட்டது.',
|
||||
@@ -186,6 +188,7 @@ $translations = array(
|
||||
'Clone' => 'நகலி (Clone)',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'அனுமதிக்கப்பட்ட அதிகபட்ச கோப்புகளின் எண்ணிக்கை மீறப்பட்டது. தயவு செய்து %s மற்றும் %s யை அதிகரிக்கவும்.',
|
||||
'Partition by' => 'பிரித்தது',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'பிரிவுகள்',
|
||||
'Partition name' => 'பிரிவின் பெயர்',
|
||||
'Values' => 'மதிப்புகள்',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Alter schema' => 'அமைப்புமுறையை மாற்று',
|
||||
'Create schema' => 'அமைப்புமுறையை உருவாக்கு',
|
||||
'Search data in tables' => 'தகவலை அட்டவணையில் தேடு',
|
||||
'as a regular expression' => null,
|
||||
'Sequences' => 'வரிசைமுறை',
|
||||
'Create sequence' => 'வரிசைமுறையை உருவாக்கு',
|
||||
'User types' => 'பயனாளர் வகைகள்',
|
||||
@@ -263,4 +267,50 @@ $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,
|
||||
);
|
||||
|
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
'Home' => null,
|
||||
'Login' => 'เข้าสู่ระบบ',
|
||||
'Logout successful.' => 'ออกจากระบบเรียบร้อยแล้ว.',
|
||||
'Invalid credentials.' => 'ข้อมูลไม่ถูกต้อง.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Server' => 'เซอเวอร์',
|
||||
'Username' => 'ชื่อผู้ใช้งาน',
|
||||
'Password' => 'รหัสผ่าน',
|
||||
@@ -31,6 +32,7 @@ $translations = array(
|
||||
'Create database' => 'สร้างฐานข้อมูล',
|
||||
'SQL command' => 'คำสั่ง SQL',
|
||||
'Logout' => 'ออกจากระบบ',
|
||||
'database' => 'ฐานข้อมูล',
|
||||
'Use' => 'ใช้งาน',
|
||||
'No tables.' => 'ไม่พบตาราง.',
|
||||
'select' => 'เลือก',
|
||||
@@ -95,7 +97,7 @@ $translations = array(
|
||||
'ON DELETE' => 'ON DELETE',
|
||||
'ON UPDATE' => 'ON UPDATE',
|
||||
'Index Type' => 'ชนิดของดัชนี',
|
||||
'length' => 'ความยาว',
|
||||
'Column (length)' => 'คอลัมน์ (ความยาว)',
|
||||
'View has been dropped.' => 'วิวถูกลบแล้ว.',
|
||||
'View has been altered.' => 'วิวถูกเปลี่ยนแปลงแล้ว.',
|
||||
'View has been created.' => 'วิวถูกสร้างแล้ว.',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Clone' => 'ทำซ้ำ',
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'จำนวนสูงสุดของฟิลด์อนุญาตให้เกิน กรุณาเพิ่มอีก %s.',
|
||||
'Partition by' => 'พาร์ทิชันโดย',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'พาร์ทิชัน',
|
||||
'Partition name' => 'ชื่อของพาร์ทิชัน',
|
||||
'Values' => 'ค่า',
|
||||
@@ -223,6 +226,7 @@ $translations = array(
|
||||
'Permanent login' => 'จดจำการเข้าสู่ระบบตลอดไป',
|
||||
'Databases have been dropped.' => 'ฐานข้อมูลถูกลบแล้ว.',
|
||||
'Search data in tables' => 'ค้นหาในตาราง',
|
||||
'as a regular expression' => null,
|
||||
'Schema' => 'Schema',
|
||||
'Alter schema' => 'เปลี่ยนแปลง schema',
|
||||
'Create schema' => 'สร้าง schema',
|
||||
@@ -264,4 +268,49 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Sistem',
|
||||
'Server' => 'Sunucu',
|
||||
'Username' => 'Kullanıcı',
|
||||
@@ -11,7 +12,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 credentials.' => 'Geçersiz kimlik bilgileri.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +85,7 @@ $translations = array(
|
||||
'Data' => 'Veri',
|
||||
|
||||
'Database' => 'Veri Tabanı',
|
||||
'database' => 'veri tabanı',
|
||||
'DB' => 'DB',
|
||||
'Use' => 'Kullan',
|
||||
'Select database' => 'Veri tabanı seç',
|
||||
@@ -183,6 +185,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'İzin verilen en fazla alan sayısı aşıldı. Lütfen %s değerlerini artırın.',
|
||||
|
||||
'Partition by' => 'Bununla bölümle',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Bölümler',
|
||||
'Partition name' => 'Bölüm adı',
|
||||
'Values' => 'Değerler',
|
||||
@@ -200,7 +203,7 @@ $translations = array(
|
||||
'Alter indexes' => 'İndeksleri değiştir',
|
||||
'Add next' => 'Bundan sonra ekle',
|
||||
'Index Type' => 'İndex Türü',
|
||||
'length' => 'uzunluğu',
|
||||
'Column (length)' => 'Kolon (uzunluğu)',
|
||||
|
||||
'Foreign keys' => 'Dış anahtarlar',
|
||||
'Foreign key' => 'Dış anahtar',
|
||||
@@ -237,6 +240,7 @@ $translations = array(
|
||||
'Search' => 'Ara',
|
||||
'anywhere' => 'hiçbir yerde',
|
||||
'Search data in tables' => 'Tablolarda veri ara',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Sırala',
|
||||
'descending' => 'Azalan',
|
||||
'Limit' => 'Limit',
|
||||
@@ -339,4 +343,19 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Система Бази Даних',
|
||||
'Server' => 'Сервер',
|
||||
'Username' => 'Користувач',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Вийти',
|
||||
'Logged as: %s' => 'Ви увійшли як: %s',
|
||||
'Logout successful.' => 'Ви вдало вийшли з системи.',
|
||||
'Invalid credentials.' => 'Неправильні дані входу.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'Language' => 'Мова',
|
||||
'Invalid CSRF token. Send the form again.' => 'Недійсний CSRF токен. Надішліть форму ще раз.',
|
||||
'No extension' => 'Нема розширень',
|
||||
@@ -73,6 +74,7 @@ $translations = array(
|
||||
'Data' => 'Дані',
|
||||
|
||||
'Database' => 'База даних',
|
||||
'database' => 'база даних',
|
||||
'Use' => 'Обрати',
|
||||
'Select database' => 'Обрати базу даних',
|
||||
'Invalid database.' => 'Погана база даних.',
|
||||
@@ -166,6 +168,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Досягнута максимальна кількість доступних полів. Будь ласка, збільшіть %s.',
|
||||
|
||||
'Partition by' => 'Розділити по',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Розділи',
|
||||
'Partition name' => 'Назва розділу',
|
||||
'Values' => 'Значення',
|
||||
@@ -182,7 +185,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Змінити індексування',
|
||||
'Add next' => 'Додати ще',
|
||||
'Index Type' => 'Тип індексу',
|
||||
'length' => 'довжина',
|
||||
'Column (length)' => 'Стовпець (довжина)',
|
||||
|
||||
'Foreign keys' => 'Зовнішні ключі',
|
||||
'Foreign key' => 'Зовнішній ключ',
|
||||
@@ -219,6 +222,7 @@ $translations = array(
|
||||
'Search' => 'Пошук',
|
||||
'anywhere' => 'будь-де',
|
||||
'Search data in tables' => 'Шукати дані в таблицях',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Сортувати',
|
||||
'descending' => 'по спаданню',
|
||||
'Limit' => 'Обмеження',
|
||||
@@ -342,4 +346,16 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => 'Hệ thống',
|
||||
'Server' => 'Máy chủ',
|
||||
'Username' => 'Tên người dùng',
|
||||
@@ -10,7 +11,7 @@ $translations = array(
|
||||
'Logout' => 'Thoát',
|
||||
'Logged as: %s' => 'Vào dưới tên: %s',
|
||||
'Logout successful.' => 'Đã thoát xong.',
|
||||
'Invalid credentials.' => 'Tài khoản sai.',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +77,7 @@ $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.',
|
||||
@@ -171,6 +173,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Thiết lập %s cần tăng thêm. (Đã vượt giới hạnố trường tối đa cho phép trong một biểu mẫu).',
|
||||
|
||||
'Partition by' => 'Phân chia bằng',
|
||||
'Partition' => null,
|
||||
'Partitions' => 'Phân hoạch',
|
||||
'Partition name' => 'Tên phân hoạch',
|
||||
'Values' => 'Giá trị',
|
||||
@@ -187,7 +190,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Sửa chỉ mục',
|
||||
'Add next' => 'Thêm tiếp',
|
||||
'Index Type' => 'Loại chỉ mục',
|
||||
'length' => 'độ dài',
|
||||
'Column (length)' => 'Cột (độ dài)',
|
||||
|
||||
'Foreign keys' => 'Các khoá ngoại',
|
||||
'Foreign key' => 'Khoá ngoại',
|
||||
@@ -224,6 +227,7 @@ $translations = array(
|
||||
'Search' => 'Tìm kiếm',
|
||||
'anywhere' => 'bất cứ đâu',
|
||||
'Search data in tables' => 'Tìm kiếm dữ liệu trong các bảng',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => 'Sắp xếp',
|
||||
'descending' => 'giảm dần',
|
||||
'Limit' => 'Giới hạn',
|
||||
@@ -324,4 +328,33 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => 'Xx',
|
||||
'System' => 'Xx',
|
||||
'Server' => 'Xx',
|
||||
'Username' => 'Xx',
|
||||
@@ -11,7 +12,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 credentials.' => 'Xx.',
|
||||
'Invalid server or 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,6 +90,7 @@ $translations = array(
|
||||
'Data' => 'Xx',
|
||||
|
||||
'Database' => 'Xx',
|
||||
'database' => 'xx',
|
||||
'DB' => 'XX',
|
||||
'Use' => 'Xx',
|
||||
'Select database' => 'Xx',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Xx %s.',
|
||||
|
||||
'Partition by' => 'Xx',
|
||||
'Partition' => 'Xx',
|
||||
'Partitions' => 'Xx',
|
||||
'Partition name' => 'Xx',
|
||||
'Values' => 'Xx',
|
||||
@@ -206,7 +209,7 @@ $translations = array(
|
||||
'Alter indexes' => 'Xx',
|
||||
'Add next' => 'Xx',
|
||||
'Index Type' => 'Xx',
|
||||
'length' => 'xx',
|
||||
'Column (length)' => 'Xx',
|
||||
|
||||
'Foreign keys' => 'Xx',
|
||||
'Foreign key' => 'Xx',
|
||||
@@ -243,6 +246,7 @@ $translations = array(
|
||||
'Search' => 'Xx',
|
||||
'anywhere' => 'xx',
|
||||
'Search data in tables' => 'Xx',
|
||||
'as a regular expression' => 'xx',
|
||||
'Sort' => 'Xx',
|
||||
'descending' => 'xx',
|
||||
'Limit' => 'Xx',
|
||||
@@ -346,11 +350,12 @@ $translations = array(
|
||||
'Type has been created.' => 'Xx.',
|
||||
'Alter type' => '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.',
|
||||
// Plugins
|
||||
'Columns' => 'Xx',
|
||||
'Nullable' => 'Xx',
|
||||
'Default' => 'Xx',
|
||||
'Yes' => 'Xx',
|
||||
'No' => 'Xx',
|
||||
'One Time Password' => 'Xx',
|
||||
'Invalid OTP code.' => 'Xx.',
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => '資料庫系統',
|
||||
'Server' => '伺服器',
|
||||
'Username' => '帳號',
|
||||
@@ -11,7 +12,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 credentials.' => '無效的憑證。',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +90,7 @@ $translations = array(
|
||||
'Data' => '資料',
|
||||
|
||||
'Database' => '資料庫',
|
||||
'database' => '資料庫',
|
||||
'DB' => '資料庫',
|
||||
'Use' => '使用',
|
||||
'Select database' => '選擇資料庫',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => '超過允許的字段數量的最大值。請增加 %s。',
|
||||
|
||||
'Partition by' => '分區類型',
|
||||
'Partition' => null,
|
||||
'Partitions' => '分區',
|
||||
'Partition name' => '分區名稱',
|
||||
'Values' => '值',
|
||||
@@ -206,7 +209,7 @@ $translations = array(
|
||||
'Alter indexes' => '修改索引',
|
||||
'Add next' => '新增下一筆',
|
||||
'Index Type' => '索引類型',
|
||||
'length' => '長度',
|
||||
'Column (length)' => '欄位(長度)',
|
||||
|
||||
'Foreign keys' => '外來鍵',
|
||||
'Foreign key' => '外來鍵',
|
||||
@@ -243,6 +246,7 @@ $translations = array(
|
||||
'Search' => '搜尋',
|
||||
'anywhere' => '任意位置',
|
||||
'Search data in tables' => '在資料庫搜尋',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => '排序',
|
||||
'descending' => '降冪 (遞減)',
|
||||
'Limit' => '限定',
|
||||
@@ -345,4 +349,13 @@ $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,
|
||||
);
|
||||
|
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
$translations = array(
|
||||
// label for database system selection (MySQL, SQLite, ...)
|
||||
'Home' => null,
|
||||
'System' => '系统',
|
||||
'Server' => '服务器',
|
||||
'Username' => '用户名',
|
||||
@@ -11,7 +12,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 credentials.' => '无效凭据。',
|
||||
'Invalid server or credentials.' => null,
|
||||
'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,6 +90,7 @@ $translations = array(
|
||||
'Data' => '数据',
|
||||
|
||||
'Database' => '数据库',
|
||||
'database' => '数据库',
|
||||
'DB' => '数据库',
|
||||
'Use' => '使用',
|
||||
'Select database' => '选择数据库',
|
||||
@@ -189,6 +191,7 @@ $translations = array(
|
||||
'Maximum number of allowed fields exceeded. Please increase %s.' => '超过最多允许的字段数量。请增加 %s。',
|
||||
|
||||
'Partition by' => '分区类型',
|
||||
'Partition' => null,
|
||||
'Partitions' => '分区',
|
||||
'Partition name' => '分区名',
|
||||
'Values' => '值',
|
||||
@@ -243,6 +246,7 @@ $translations = array(
|
||||
'Search' => '搜索',
|
||||
'anywhere' => '任意位置',
|
||||
'Search data in tables' => '在表中搜索数据',
|
||||
'as a regular expression' => null,
|
||||
'Sort' => '排序',
|
||||
'descending' => '降序',
|
||||
'Limit' => '范围',
|
||||
@@ -345,4 +349,12 @@ $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 class='odds'>\n";
|
||||
echo "<table>\n";
|
||||
echo "<thead><tr><th>" . lang('Username') . "<th>" . lang('Server') . "<th></thead>\n";
|
||||
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
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";
|
||||
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";
|
||||
}
|
||||
|
||||
if (!$grant || DB != "") {
|
||||
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 "<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 "</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 class="nowrap">
|
||||
<table cellspacing="0" 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 class="nowrap checkable odds">
|
||||
<table cellspacing="0" class="nowrap checkable">
|
||||
<?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>" . (support("kill") ? "<td>" . checkbox("kill[]", $row[$jush == "sql" ? "Id" : "pid"], 0) : "");
|
||||
echo "<tr" . odd() . ">" . (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,7 +26,8 @@ if (!$row) {
|
||||
?>
|
||||
|
||||
<form action="" method="post">
|
||||
<p><input name="name" autofocus value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||
<p><input name="name" id="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
|
||||
<?php echo script("focus(qs('#name'));"); ?>
|
||||
<input type="submit" value="<?php echo lang('Save'); ?>">
|
||||
<?php
|
||||
if ($_GET["ns"] != "") {
|
||||
|
@@ -9,6 +9,8 @@ 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);
|
||||
@@ -18,6 +20,12 @@ 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"];
|
||||
}
|
||||
|
||||
@@ -224,7 +232,7 @@ if (is_ajax()) {
|
||||
|
||||
$set = null;
|
||||
if (isset($rights["insert"]) || !support("table")) {
|
||||
$params = array();
|
||||
$params = [];
|
||||
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
|
||||
@@ -245,10 +253,11 @@ if (!$columns && support("table")) {
|
||||
hidden_fields_get();
|
||||
echo (DB != "" ? '<input type="hidden" name="db" value="' . h(DB) . '">' . (isset($_GET["ns"]) ? '<input type="hidden" name="ns" value="' . h($_GET["ns"]) . '">' : "") : ""); // not used in Editor
|
||||
echo '<input type="hidden" name="select" value="' . h($TABLE) . '">';
|
||||
echo '<input type="submit" value="' . h(lang('Select')) . '">'; # hidden default submit so filter remove buttons aren't "clicked" on submission from enter key
|
||||
echo "</div>\n";
|
||||
$adminer->selectColumnsPrint($select, $columns);
|
||||
$adminer->selectSearchPrint($where, $columns, $indexes);
|
||||
$adminer->selectOrderPrint($order, $columns, $indexes);
|
||||
$adminer->selectSearchPrint($where, $search_columns, $indexes);
|
||||
$adminer->selectOrderPrint($order, $order_columns, $indexes);
|
||||
$adminer->selectLimitPrint($limit);
|
||||
$adminer->selectLengthPrint($text_length);
|
||||
$adminer->selectActionPrint($indexes);
|
||||
@@ -312,7 +321,7 @@ if (!$columns && support("table")) {
|
||||
$backward_keys = $adminer->backwardKeys($TABLE, $table_name);
|
||||
|
||||
echo "<div class='scrollable'>";
|
||||
echo "<table id='table' class='nowrap checkable odds'>";
|
||||
echo "<table id='table' cellspacing='0' class='nowrap checkable'>";
|
||||
echo script("mixin(qs('#table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true), onkeydown: editingKeydown});");
|
||||
echo "<thead><tr>" . (!$group && $select
|
||||
? ""
|
||||
@@ -326,19 +335,27 @@ 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"] ? "*" : h($key)));
|
||||
$name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : $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')});", "");
|
||||
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
|
||||
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 "<span class='column hidden'>";
|
||||
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
||||
if (!$val["fun"]) {
|
||||
if ($sortable) {
|
||||
echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
||||
}
|
||||
if (!$val["fun"] && isset($field["privileges"]["where"])) {
|
||||
echo '<a href="#fieldset-search" title="' . lang('Search') . '" class="text jsonly"> =</a>';
|
||||
echo script("qsl('a').onclick = partial(selectSearch, '" . js_escape($key) . "');");
|
||||
}
|
||||
@@ -361,6 +378,9 @@ 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();
|
||||
}
|
||||
|
||||
@@ -383,7 +403,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>" . (!$group && $select ? "" : "<td>"
|
||||
echo "<tr" . odd() . ">" . (!$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>")
|
||||
);
|
||||
@@ -526,9 +546,7 @@ 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()) {
|
||||
@@ -553,9 +571,9 @@ if (!$columns && support("table")) {
|
||||
}
|
||||
if ($format) {
|
||||
print_fieldset("export", lang('Export') . " <span id='selected2'></span>");
|
||||
$output = $adminer->dumpOutput();
|
||||
echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
|
||||
echo html_select("format", $format, $adminer_import["format"]);
|
||||
$output = $adminer->dumpOutput();
|
||||
echo ($output ? " " . html_select("output", $output, $adminer_import["output"]) : "");
|
||||
echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
|
||||
echo "</div></fieldset>\n";
|
||||
}
|
||||
@@ -571,7 +589,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"], 1); // 1 - select
|
||||
echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"]);
|
||||
echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
|
||||
echo "</span>";
|
||||
echo "</div>";
|
||||
|
@@ -21,12 +21,18 @@ if (!$error && $_POST) {
|
||||
if (!isset($_GET["import"])) {
|
||||
$query = $_POST["query"];
|
||||
} elseif ($_POST["webfile"]) {
|
||||
$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);
|
||||
$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;
|
||||
} else {
|
||||
$query = get_file("sql_file", true);
|
||||
}
|
||||
@@ -81,21 +87,27 @@ if (!$error && $_POST) {
|
||||
$offset = $pos + strlen($found);
|
||||
|
||||
if ($found && rtrim($found) != $delimiter) { // find matching quote or comment end
|
||||
$c_style_escapes = $driver->hasCStyleEscapes() || ($jush == "pgsql" && ($pos > 0 && strtolower($query[$pos - 1]) == "e"));
|
||||
$c_style_escapes = is_c_style_escapes() || ($jush == "pgsql" && ($pos > 0 && strtolower($query[$pos - 1]) == "e"));
|
||||
|
||||
$pattern = ($found == '/*' ? '\*/'
|
||||
: ($found == '[' ? ']'
|
||||
: (preg_match('~^-- |^#~', $found) ? "\n"
|
||||
: preg_quote($found) . ($c_style_escapes ? "|\\\\." : "")
|
||||
)));
|
||||
$pattern = '(';
|
||||
if ($found == '/*') {
|
||||
$pattern .= '\*/';
|
||||
} elseif ($found == '[') {
|
||||
$pattern .= ']';
|
||||
} elseif (preg_match('~^-- |^#~', $found)) {
|
||||
$pattern .= "\n";
|
||||
} else {
|
||||
$pattern .= preg_quote($found) . ($c_style_escapes ? "|\\\\." : "");
|
||||
}
|
||||
$pattern .= '|$)s';
|
||||
|
||||
while (preg_match("($pattern|\$)s", $query, $match, PREG_OFFSET_CAPTURE, $offset)) {
|
||||
while (preg_match($pattern, $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 (!$s || $s[0] != "\\") {
|
||||
if (!isset($s[0]) || $s[0] != "\\") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -131,7 +143,7 @@ if (!$error && $_POST) {
|
||||
|
||||
if ($connection->error) {
|
||||
echo ($_POST["only_errors"] ? $print : "");
|
||||
echo "<p class='error'>" . lang('Error in query') . ($connection->errno ? " ($connection->errno)" : "") . ": " . error() . "\n";
|
||||
echo "<p class='error'>" . lang('Error in query') . (!empty($connection->errno) ? " ($connection->errno)" : "") . ": " . error() . "\n";
|
||||
$errors[] = " <a href='#sql-$commands'>$commands</a>";
|
||||
if ($_POST["error_stops"]) {
|
||||
break 2;
|
||||
@@ -141,7 +153,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 warnings overwrites this
|
||||
$affected = $connection->affected_rows; // getting warnigns overwrites this
|
||||
$warnings = ($_POST["only_errors"] ? "" : $driver->warnings());
|
||||
$warnings_id = "warnings-$commands";
|
||||
if ($warnings) {
|
||||
@@ -177,12 +189,13 @@ if (!$error && $_POST) {
|
||||
stop_session();
|
||||
}
|
||||
if (!$_POST["only_errors"]) {
|
||||
echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $affected) . "$time\n";
|
||||
$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 ($warnings ? "<div id='$warnings_id' class='hidden'>\n$warnings</div>\n" : "");
|
||||
if ($explain) {
|
||||
echo "<div id='$explain_id' class='hidden explain'>\n";
|
||||
echo "<div id='$explain_id' class='hidden'>\n";
|
||||
select($explain, $connection2, $orgtables);
|
||||
echo "</div>\n";
|
||||
}
|
||||
@@ -242,10 +255,10 @@ if (!isset($_GET["import"])) {
|
||||
: lang('File uploads are disabled.')
|
||||
);
|
||||
echo "</div></fieldset>\n";
|
||||
$importServerPath = $adminer->importServerPath();
|
||||
if ($importServerPath) {
|
||||
$import_file_path = $adminer->importServerPath();
|
||||
if ($import_file_path) {
|
||||
echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
|
||||
echo lang('Webserver file %s', "<code>" . h($importServerPath) . "$gz</code>");
|
||||
echo lang('Webserver file %s', "<code>" . h($import_file_path) . "$gz</code>");
|
||||
echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
|
||||
echo "</div></fieldset>\n";
|
||||
}
|
||||
|
@@ -1,8 +1,7 @@
|
||||
/** @author Ondrej Valka, http://valka.info */
|
||||
body { color: #000; background: #fff; font: 90%/1.25 Verdana, Arial, Helvetica, sans-serif; margin: 0; min-width: fit-content; }
|
||||
body { color: #000; background: #fff; font: 90%/1.25 Verdana, Arial, Helvetica, sans-serif; margin: 0; width: -moz-fit-content; width: fit-content; }
|
||||
a { color: blue; text-decoration: none; }
|
||||
a:visited { color: navy; }
|
||||
a:link:hover, a:visited:hover { color: red; text-decoration: underline; }
|
||||
a:hover { color: red; text-decoration: underline; }
|
||||
a.text:hover { text-decoration: none; }
|
||||
a.jush-help:hover { color: inherit; }
|
||||
h1 { font-size: 150%; margin: 0; padding: .8em 1em; border-bottom: 1px solid #999; font-weight: normal; color: #777; background: #eee; }
|
||||
@@ -11,7 +10,7 @@ h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; }
|
||||
form { margin: 0; }
|
||||
td table { width: 100%; margin: 0; }
|
||||
table { margin: 1em 20px 0 0; border-collapse: collapse; font-size: 90%; }
|
||||
td, th { border: 1px solid #999; padding: .2em .3em; }
|
||||
td, th { box-sizing: border-box; border: 1px solid #999; padding: .2em .3em; }
|
||||
th { background: #eee; text-align: left; }
|
||||
thead th { text-align: center; padding: .2em .5em; }
|
||||
thead td, thead th { background: #ddf; } /* position: sticky; causes Firefox to lose borders */
|
||||
@@ -19,22 +18,28 @@ 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, textarea { font: 100%/1.25 monospace; }
|
||||
pre code { display: block; font-size: 100%; }
|
||||
pre, textarea { font: 110%/1.25 monospace; }
|
||||
pre.jush { background: #fff; }
|
||||
input, textarea { box-sizing: border-box; }
|
||||
input, select { vertical-align: middle; }
|
||||
input, textarea, select { box-sizing: border-box; }
|
||||
input:not([type="radio"]), select { vertical-align: middle; }
|
||||
input[type="number"] { -moz-appearance: textfield; }
|
||||
input::-webkit-inner-spin-button { -webkit-appearance: none; }
|
||||
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; }
|
||||
input::placeholder { color: #000; opacity: 0.4; }
|
||||
.center { text-align: center; }
|
||||
.block { display: block; }
|
||||
.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; }
|
||||
.nowrap { white-space: nowrap; }
|
||||
p.nowrap { white-space: pre; }
|
||||
.wrap td { white-space: normal; }
|
||||
.error { color: red; background: #fee; }
|
||||
.error b { background: #fff; font-weight: normal; }
|
||||
@@ -45,7 +50,7 @@ input.wayoff { left: -1000px; position: absolute; }
|
||||
.date { color: #7F007F; }
|
||||
.enum { color: #007F7F; }
|
||||
.binary { color: red; }
|
||||
.odds tbody tr:nth-child(2n) td { background: #F5F5F5; }
|
||||
.odd td { background: #F5F5F5; }
|
||||
.js .checkable .checked td, .js .checkable .checked th { background: #ddf; }
|
||||
.time { color: silver; font-size: 70%; }
|
||||
.function { text-align: right; }
|
||||
@@ -56,33 +61,44 @@ 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: 7ex; }
|
||||
.size { width: 6ex; }
|
||||
.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; }
|
||||
.footer fieldset { margin-top: 0; }
|
||||
.links a { white-space: nowrap; margin-right: 20px; }
|
||||
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
|
||||
.logout { margin: .5em 20px 0 0; position: absolute; top: 0; right: 0; }
|
||||
.loadmore { margin-left: 1ex; }
|
||||
.tables-filter { padding: .8em 1em 0; }
|
||||
.handle { cursor: grab; vertical-align: middle; }
|
||||
.handle:before { content: "="; display: inline-block; width: 18px; height: 18px; overflow: hidden; font-size: 130%; text-align: center; line-height: 16px; opacity: 0.2; }
|
||||
span.handle { display: inline-block; width: 18px; height: 18px; padding-right: .3em; }
|
||||
th.handle:before { vertical-align: middle; }
|
||||
.no-sort .handle { cursor: default; opacity: 0; }
|
||||
.placeholder { opacity: 0; }
|
||||
.dragging { position: absolute; margin: 0; background: #fff; }
|
||||
.dragging * { cursor: grabbing; }
|
||||
table.dragging { background: #eee; }
|
||||
/* .edit used in designs */
|
||||
#menu { position: absolute; margin: 10px 0 0; top: 2em; left: 0; width: 19em; }
|
||||
#menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 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: -2.6em; left: 0; padding: .3em 1em; }
|
||||
#lang { position: absolute; top: 0; left: 0; line-height: 1.8em; 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 { color: red; }
|
||||
#schema { margin-left: 60px; position: relative; user-select: none; -webkit-user-select: none; }
|
||||
#schema { margin-left: 60px; position: relative; -moz-user-select: none; -webkit-user-select: none; }
|
||||
#schema .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
|
||||
#schema .references { position: absolute; }
|
||||
#tables-filter, #database-select, #scheme-select { width: 100%; }
|
||||
#help { position: absolute; border: 1px solid #999; background: #eee; padding: 5px; font-family: monospace; z-index: 1; }
|
||||
#fieldset-select div:last-child > .remove, #fieldset-search div:last-child > .remove, #fieldset-sort div:last-child > .remove { display: none; }
|
||||
|
||||
.rtl h2 { margin: 0 -18px 20px 0; }
|
||||
.rtl p, .rtl table, .rtl .error, .rtl .message { margin: 1em 0 0 20px; }
|
||||
@@ -92,14 +108,12 @@ 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; }
|
||||
#lang { position: static; border-top: 1px solid #999; }
|
||||
#breadcrumb { left: auto; }
|
||||
.rtl .pages { right: auto; }
|
||||
.rtl #content { margin-right: 10px; }
|
||||
|
@@ -16,22 +16,17 @@ 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(/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')
|
||||
.replace(/#statvar_.*/, '#$$1')
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
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
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -59,7 +54,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];
|
||||
}
|
||||
}
|
||||
@@ -111,12 +106,10 @@ 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;
|
||||
}
|
||||
}
|
||||
@@ -130,7 +123,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;
|
||||
}
|
||||
@@ -161,7 +154,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;
|
||||
@@ -173,7 +166,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)) {
|
||||
@@ -206,7 +199,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,14 +253,10 @@ function editingClick(event) {
|
||||
var name = el.name;
|
||||
if (/^add\[/.test(name)) {
|
||||
editingAddRow.call(el, 1);
|
||||
} else if (/^up\[/.test(name)) {
|
||||
editingMoveRow.call(el, 1);
|
||||
} else if (/^down\[/.test(name)) {
|
||||
editingMoveRow.call(el);
|
||||
} 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';
|
||||
@@ -302,7 +291,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;
|
||||
@@ -312,7 +301,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;
|
||||
}
|
||||
@@ -347,7 +336,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;
|
||||
}
|
||||
@@ -360,7 +349,10 @@ function editingAddRow(focus) {
|
||||
}
|
||||
}
|
||||
tags[0].oninput = editingNameChange;
|
||||
|
||||
initSortableRow(row2);
|
||||
row.parentNode.insertBefore(row2, row.nextSibling);
|
||||
|
||||
if (focus) {
|
||||
input.oninput = editingNameChange;
|
||||
input.focus();
|
||||
@@ -382,22 +374,6 @@ function editingRemoveRow(name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Move table row for field
|
||||
* @param [boolean]
|
||||
* @return boolean false for success
|
||||
* @this HTMLInputElement
|
||||
*/
|
||||
function editingMoveRow(up){
|
||||
var row = parentTag(this, 'tr');
|
||||
if (!('nextElementSibling' in row)) {
|
||||
return true;
|
||||
}
|
||||
row.parentNode.insertBefore(row, up
|
||||
? row.previousElementSibling
|
||||
: row.nextElementSibling ? row.nextElementSibling.nextElementSibling : row.parentNode.firstChild);
|
||||
return false;
|
||||
}
|
||||
|
||||
var lastType = '';
|
||||
|
||||
/** Clear length and hide collation or unsigned
|
||||
@@ -409,7 +385,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))
|
||||
@@ -418,19 +394,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));
|
||||
}
|
||||
}
|
||||
@@ -469,13 +445,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
|
||||
@@ -500,16 +476,6 @@ 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
|
||||
*/
|
||||
@@ -571,7 +537,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(/\d+]/, '1$&');
|
||||
selects[i].name = selects[i].name.replace(']', '1]');
|
||||
selects[i].selectedIndex = 0;
|
||||
}
|
||||
parentTag(this, 'table').appendChild(row);
|
||||
@@ -626,7 +592,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();
|
||||
@@ -643,7 +609,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 = '';
|
||||
}
|
||||
}
|
||||
@@ -692,7 +658,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;
|
||||
@@ -709,12 +675,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';
|
||||
@@ -726,7 +692,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';
|
||||
}
|
||||
@@ -774,7 +740,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;
|
||||
@@ -793,7 +759,7 @@ function helpMouseover(event, text, side) {
|
||||
*/
|
||||
function helpMouseout(event) {
|
||||
helpOpen = 0;
|
||||
helpIgnore = (this != getTarget(event));
|
||||
helpIgnore = (this !== getTarget(event));
|
||||
setTimeout(function () {
|
||||
if (!helpOpen) {
|
||||
helpClose();
|
||||
|
@@ -1,10 +1,21 @@
|
||||
|
||||
/**
|
||||
* Returns the element found by given identifier.
|
||||
*
|
||||
* @param {string} id
|
||||
* @param {?HTMLElement} context Defaults to document.
|
||||
* @return {?HTMLElement}
|
||||
*/
|
||||
function gid(id, context = null) {
|
||||
return (context || document).getElementById(id);
|
||||
}
|
||||
|
||||
/** Get first element by selector
|
||||
* @param string
|
||||
* @param [HTMLElement] defaults to document
|
||||
* @return HTMLElement
|
||||
*/
|
||||
function qs(selector, context) {
|
||||
function qs(selector, context = null) {
|
||||
return (context || document).querySelector(selector);
|
||||
}
|
||||
|
||||
@@ -13,7 +24,7 @@ function qs(selector, context) {
|
||||
* @param [HTMLElement] defaults to document
|
||||
* @return HTMLElement
|
||||
*/
|
||||
function qsl(selector, context) {
|
||||
function qsl(selector, context = null) {
|
||||
var els = qsa(selector, context);
|
||||
return els[els.length - 1];
|
||||
}
|
||||
@@ -23,7 +34,7 @@ function qsl(selector, context) {
|
||||
* @param [HTMLElement] defaults to document
|
||||
* @return NodeList
|
||||
*/
|
||||
function qsa(selector, context) {
|
||||
function qsa(selector, context = null) {
|
||||
return (context || document).querySelectorAll(selector);
|
||||
}
|
||||
|
||||
@@ -73,13 +84,15 @@ function alterClass(el, className, enable) {
|
||||
}
|
||||
}
|
||||
|
||||
/** Toggle visibility
|
||||
* @param string
|
||||
* @return boolean false
|
||||
*/
|
||||
/**
|
||||
* Toggles visibility of element with ID.
|
||||
*
|
||||
* @param {string} id
|
||||
* @return {boolean} Always false.
|
||||
*/
|
||||
function toggle(id) {
|
||||
var el = qs('#' + id);
|
||||
el.className = (el.className == 'hidden' ? '' : 'hidden');
|
||||
gid(id).classList.toggle("hidden");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -94,34 +107,31 @@ function cookie(assign, days) {
|
||||
document.cookie = assign + '; expires=' + date;
|
||||
}
|
||||
|
||||
/** Verify current Adminer version
|
||||
* @param string
|
||||
* @param string own URL base
|
||||
* @param string
|
||||
*/
|
||||
function verifyVersion(current, url, token) {
|
||||
/**
|
||||
* Verifies current Adminer version.
|
||||
*
|
||||
* @param currentVersion string
|
||||
* @param baseUrl string
|
||||
* @param token string
|
||||
*/
|
||||
function verifyVersion(currentVersion, baseUrl, token) {
|
||||
cookie('adminer_version=0', 1);
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.src = 'https://www.adminer.org/version/?current=' + current;
|
||||
iframe.frameBorder = 0;
|
||||
iframe.marginHeight = 0;
|
||||
iframe.scrolling = 'no';
|
||||
iframe.style.width = '7ex';
|
||||
iframe.style.height = '1.25em';
|
||||
if (window.postMessage && window.addEventListener) {
|
||||
iframe.style.display = 'none';
|
||||
addEventListener('message', function (event) {
|
||||
if (event.origin == 'https://www.adminer.org') {
|
||||
var match = /version=(.+)/.exec(event.data);
|
||||
if (match) {
|
||||
cookie('adminer_version=' + match[1], 1);
|
||||
ajax(url + 'script=version', function () {
|
||||
}, event.data + '&token=' + token);
|
||||
}
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
qs('#version').appendChild(iframe);
|
||||
|
||||
ajax('https://api.github.com/repos/pematon/adminer/releases/latest', function (request) {
|
||||
const response = JSON.parse(request.responseText);
|
||||
|
||||
const version = response.tag_name.replace(/^\D*/, '');
|
||||
if (!version) return;
|
||||
|
||||
cookie('adminer_version=' + version, 1);
|
||||
|
||||
const data = 'version=' + version + '&token=' + token;
|
||||
ajax(baseUrl + 'script=version', function () {}, data);
|
||||
|
||||
if (currentVersion !== version) {
|
||||
qs('#version').innerText = version;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Get value of select
|
||||
@@ -181,8 +191,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,13 +221,21 @@ function tableCheck() {
|
||||
}
|
||||
}
|
||||
|
||||
/** Uncheck single element
|
||||
* @param string
|
||||
*/
|
||||
/**
|
||||
* Uncheck single element.
|
||||
*/
|
||||
function formUncheck(id) {
|
||||
var el = qs('#' + id);
|
||||
el.checked = false;
|
||||
trCheck(el);
|
||||
formUncheckAll("#" + id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Uncheck elements matched by selector.
|
||||
*/
|
||||
function formUncheckAll(selector) {
|
||||
for (const element of qsa(selector)) {
|
||||
element.checked = false;
|
||||
trCheck(element);
|
||||
}
|
||||
}
|
||||
|
||||
/** Get number of checked elements matching given name
|
||||
@@ -252,7 +270,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);
|
||||
@@ -268,7 +286,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');
|
||||
}
|
||||
@@ -288,7 +306,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;
|
||||
@@ -345,11 +363,82 @@ 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) : '');
|
||||
}
|
||||
}
|
||||
|
||||
let tablesFilterTimeout = null;
|
||||
let tablesFilterValue = '';
|
||||
|
||||
function initTablesFilter(dbName) {
|
||||
if (sessionStorage) {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
if (dbName === sessionStorage.getItem('adminer_tables_filter_db') && sessionStorage.getItem('adminer_tables_filter')) {
|
||||
qs('#tables-filter').value = sessionStorage.getItem('adminer_tables_filter');
|
||||
filterTables();
|
||||
} else {
|
||||
sessionStorage.removeItem('adminer_tables_filter');
|
||||
}
|
||||
|
||||
sessionStorage.setItem('adminer_tables_filter_db', dbName);
|
||||
});
|
||||
}
|
||||
|
||||
const filterInput = qs('#tables-filter');
|
||||
filterInput.addEventListener('input', function () {
|
||||
window.clearTimeout(tablesFilterTimeout);
|
||||
tablesFilterTimeout = window.setTimeout(filterTables, 200);
|
||||
});
|
||||
|
||||
document.body.addEventListener('keydown', function(event) {
|
||||
if (isCtrl(event) && event.shiftKey && event.key.toUpperCase() === 'F') {
|
||||
filterInput.focus();
|
||||
filterInput.select();
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function filterTables() {
|
||||
const value = qs('#tables-filter').value.toLowerCase();
|
||||
if (value === tablesFilterValue) {
|
||||
return;
|
||||
}
|
||||
tablesFilterValue = value;
|
||||
|
||||
let reg
|
||||
if (value !== '') {
|
||||
const valueExp = (`${value}`).replace(/[\\.+*?\[^\]$(){}=!<>|:]/g, '\\$&');
|
||||
reg = new RegExp(`(${valueExp})`, 'gi');
|
||||
}
|
||||
|
||||
if (sessionStorage) {
|
||||
sessionStorage.setItem('adminer_tables_filter', value);
|
||||
}
|
||||
|
||||
const tables = qsa('#tables li');
|
||||
for (let i = 0; i < tables.length; i++) {
|
||||
let a = qs('a[data-main="true"], span[data-main="true"]', tables[i]);
|
||||
|
||||
let tableName = tables[i].dataset.tableName;
|
||||
if (tableName == null) {
|
||||
tableName = a.innerHTML.trim();
|
||||
|
||||
tables[i].dataset.tableName = tableName;
|
||||
}
|
||||
|
||||
if (value === "") {
|
||||
tables[i].classList.remove('hidden');
|
||||
a.innerHTML = tableName;
|
||||
} else if (tableName.toLowerCase().indexOf(value) >= 0) {
|
||||
tables[i].classList.remove('hidden');
|
||||
a.innerHTML = tableName.replace(reg, '<strong>$1</strong>');
|
||||
} else {
|
||||
tables[i].classList.add('hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Display items in menu
|
||||
* @param MouseEvent
|
||||
@@ -371,30 +460,66 @@ function menuOut() {
|
||||
|
||||
|
||||
|
||||
/** Add row in select fieldset
|
||||
* @this HTMLSelectElement
|
||||
*/
|
||||
function selectAddRow() {
|
||||
var field = this;
|
||||
var row = cloneNode(field.parentNode);
|
||||
/**
|
||||
* Adds row in select fieldset.
|
||||
*
|
||||
* @param {Event} event
|
||||
* @this HTMLSelectElement
|
||||
*/
|
||||
function selectAddRow(event) {
|
||||
const field = this;
|
||||
const row = cloneNode(field.parentNode);
|
||||
|
||||
field.onchange = selectFieldChange;
|
||||
field.onchange();
|
||||
var selects = qsa('select', row);
|
||||
for (var i=0; i < selects.length; i++) {
|
||||
selects[i].name = selects[i].name.replace(/[a-z]\[\d+/, '$&1');
|
||||
selects[i].selectedIndex = 0;
|
||||
field.onchange(event);
|
||||
|
||||
const selects = qsa('select', row);
|
||||
for (const select of selects) {
|
||||
select.name = select.name.replace(/[a-z]\[\d+/, '$&1');
|
||||
select.selectedIndex = 0;
|
||||
}
|
||||
var inputs = qsa('input', row);
|
||||
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') {
|
||||
inputs[i].checked = false;
|
||||
|
||||
const inputs = qsa('input', row);
|
||||
for (const input of inputs) {
|
||||
// Skip buttons.
|
||||
if (input.type === 'image') {
|
||||
continue;
|
||||
}
|
||||
|
||||
input.name = input.name.replace(/[a-z]\[\d+/, '$&1');
|
||||
input.className = '';
|
||||
if (input.type === 'checkbox') {
|
||||
input.checked = false;
|
||||
} else {
|
||||
inputs[i].value = '';
|
||||
input.value = '';
|
||||
}
|
||||
}
|
||||
field.parentNode.parentNode.appendChild(row);
|
||||
|
||||
const buttons = qsa('.icon', row);
|
||||
for (const button of buttons) {
|
||||
button.onclick = selectRemoveRow;
|
||||
}
|
||||
|
||||
const parent = field.parentNode.parentNode;
|
||||
if (parent.classList.contains("sortable")) {
|
||||
initSortableRow(field.parentElement);
|
||||
}
|
||||
|
||||
parent.appendChild(row);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a row in select fieldset.
|
||||
*
|
||||
* @this HTMLInputElement
|
||||
* @return {boolean} Always false.
|
||||
*/
|
||||
function selectRemoveRow() {
|
||||
const row = this.parentNode;
|
||||
|
||||
row.parentNode.removeChild(row);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Prevent onsearch handler on Enter
|
||||
@@ -402,7 +527,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 () {
|
||||
};
|
||||
}
|
||||
@@ -417,6 +542,123 @@ function selectSearchSearch() {
|
||||
}
|
||||
}
|
||||
|
||||
// Sorting.
|
||||
(function() {
|
||||
let placeholderRow, nextRow, dragHelper;
|
||||
let startY, minY, maxY;
|
||||
|
||||
/**
|
||||
* Initializes sortable list of DIV elements.
|
||||
*
|
||||
* @param {string} parentId
|
||||
*/
|
||||
window.initSortable = function(parentSelector) {
|
||||
const parent = qs(parentSelector);
|
||||
if (!parent) return;
|
||||
|
||||
for (const row of parent.children) {
|
||||
if (!row.classList.contains("no-sort")) {
|
||||
initSortableRow(row);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Initializes one row of sortable parent.
|
||||
*
|
||||
* @param {HTMLElement} row
|
||||
*/
|
||||
window.initSortableRow = function(row) {
|
||||
row.classList.remove("no-sort");
|
||||
|
||||
const handle = qs(".handle", row);
|
||||
handle.addEventListener("mousedown", (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
const parent = row.parentNode;
|
||||
startY = event.clientY - getOffsetTop(row);
|
||||
minY = getOffsetTop(parent);
|
||||
maxY = minY + parent.offsetHeight - row.offsetHeight;
|
||||
|
||||
placeholderRow = row.cloneNode(true);
|
||||
placeholderRow.classList.add("placeholder");
|
||||
parent.insertBefore(placeholderRow, row);
|
||||
|
||||
nextRow = row.nextElementSibling;
|
||||
|
||||
let top = event.clientY - startY;
|
||||
let left = getOffsetLeft(row);
|
||||
let width = row.getBoundingClientRect().width;
|
||||
|
||||
if (row.tagName === "TR") {
|
||||
const firstChild = row.firstElementChild;
|
||||
const borderWidth = (firstChild.offsetWidth - firstChild.clientWidth) / 2;
|
||||
const borderHeight = (firstChild.offsetHeight - firstChild.clientHeight) / 2;
|
||||
|
||||
minY -= borderHeight;
|
||||
maxY -= borderHeight;
|
||||
top -= borderHeight;
|
||||
left -= borderWidth;
|
||||
width += 2 * borderWidth;
|
||||
|
||||
for (const child of row.children) {
|
||||
child.style.width = child.getBoundingClientRect().width + "px";
|
||||
}
|
||||
|
||||
dragHelper = document.createElement("table");
|
||||
dragHelper.appendChild(row);
|
||||
} else {
|
||||
dragHelper = row;
|
||||
}
|
||||
|
||||
dragHelper.style.top = `${top}px`;
|
||||
dragHelper.style.left = `${left}px`;
|
||||
dragHelper.style.width = `${width}px`;
|
||||
dragHelper.classList.add("dragging");
|
||||
document.body.appendChild(dragHelper);
|
||||
|
||||
window.addEventListener("mousemove", updateSorting);
|
||||
|
||||
window.addEventListener("mouseup", () => {
|
||||
dragHelper.classList.remove("dragging");
|
||||
parent.insertBefore(dragHelper.tagName === "TABLE" ? dragHelper.firstChild : dragHelper, placeholderRow);
|
||||
placeholderRow.remove();
|
||||
|
||||
window.removeEventListener("mousemove", updateSorting);
|
||||
}, { once: true });
|
||||
});
|
||||
};
|
||||
|
||||
function updateSorting(event) {
|
||||
let top = Math.min(Math.max(event.clientY - startY, minY), maxY);
|
||||
dragHelper.style.top = `${top}px`;
|
||||
|
||||
const parent = placeholderRow.parentNode;
|
||||
top = top - minY + parent.offsetTop;
|
||||
|
||||
let sibling;
|
||||
if (top > placeholderRow.offsetTop + placeholderRow.offsetHeight / 2) {
|
||||
sibling = !nextRow.classList.contains("no-sort") ? nextRow.nextElementSibling : nextRow;
|
||||
} else if (top + placeholderRow.offsetHeight < placeholderRow.offsetTop + placeholderRow.offsetHeight / 2) {
|
||||
sibling = placeholderRow.previousElementSibling;
|
||||
} else {
|
||||
sibling = nextRow;
|
||||
}
|
||||
|
||||
if (sibling !== nextRow) {
|
||||
const parent = placeholderRow.parentNode;
|
||||
|
||||
nextRow = sibling;
|
||||
if (sibling) {
|
||||
parent.insertBefore(placeholderRow, nextRow);
|
||||
} else {
|
||||
parent.appendChild(placeholderRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
|
||||
|
||||
/** Toggles column context menu
|
||||
@@ -445,11 +687,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();
|
||||
}
|
||||
@@ -487,7 +729,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();
|
||||
@@ -508,7 +750,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
|
||||
@@ -524,9 +766,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();
|
||||
@@ -539,37 +781,62 @@ function editingKeydown(event) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Disable maxlength for functions
|
||||
* @this HTMLSelectElement
|
||||
*/
|
||||
/**
|
||||
* Disables maxlength for functions and manages value visibility.
|
||||
*
|
||||
* @this HTMLSelectElement
|
||||
*/
|
||||
function functionChange() {
|
||||
var input = this.form[this.name.replace(/^function/, 'fields')];
|
||||
if (input) { // undefined with the set data type
|
||||
if (selectValue(this)) {
|
||||
if (input.origType === undefined) {
|
||||
input.origType = input.type;
|
||||
input.origMaxLength = input.getAttribute('data-maxlength');
|
||||
}
|
||||
input.removeAttribute('data-maxlength');
|
||||
input.type = 'text';
|
||||
} else if (input.origType) {
|
||||
input.type = input.origType;
|
||||
if (input.origMaxLength >= 0) {
|
||||
input.setAttribute('data-maxlength', input.origMaxLength);
|
||||
}
|
||||
}
|
||||
oninput({target: input});
|
||||
const input = this.form[this.name.replace(/^function/, 'fields')];
|
||||
const value = selectValue(this);
|
||||
|
||||
// Undefined with the set data type.
|
||||
if (!input) {
|
||||
helpClose();
|
||||
return;
|
||||
}
|
||||
|
||||
if (value) {
|
||||
if (input.origType === undefined) {
|
||||
input.origType = input.type;
|
||||
input.origMaxLength = input.getAttribute('data-maxlength');
|
||||
}
|
||||
|
||||
input.removeAttribute('data-maxlength');
|
||||
input.type = 'text';
|
||||
} else if (input.origType) {
|
||||
input.type = input.origType;
|
||||
if (input.origMaxLength >= 0) {
|
||||
input.setAttribute('data-maxlength', input.origMaxLength);
|
||||
}
|
||||
}
|
||||
|
||||
// Hide input value if it will be not used by selected function.
|
||||
if (value === "NULL" || value === "now") {
|
||||
if (input.value !== "") {
|
||||
input.dataset.lastValue = input.value;
|
||||
input.value = "";
|
||||
}
|
||||
} else if (input.dataset.lastValue) {
|
||||
input.value = input.dataset.lastValue;
|
||||
}
|
||||
|
||||
oninput({target: input});
|
||||
|
||||
helpClose();
|
||||
}
|
||||
|
||||
/** Skip 'original' when typing
|
||||
* @param number
|
||||
* @this HTMLTableCellElement
|
||||
*/
|
||||
/**
|
||||
* Unset 'original', 'NULL' and 'now' functions when typing.
|
||||
*
|
||||
* @param first number
|
||||
* @this HTMLTableCellElement
|
||||
*/
|
||||
function skipOriginal(first) {
|
||||
var fnSelect = this.previousSibling.firstChild;
|
||||
if (fnSelect.selectedIndex < first) {
|
||||
const fnSelect = this.previousSibling.firstChild;
|
||||
const value = selectValue(fnSelect);
|
||||
|
||||
if (fnSelect.selectedIndex < first || value === "NULL" || value === "now") {
|
||||
fnSelect.selectedIndex = first;
|
||||
}
|
||||
}
|
||||
@@ -614,7 +881,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 {
|
||||
@@ -656,7 +923,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));
|
||||
}
|
||||
}
|
||||
@@ -703,7 +970,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;
|
||||
}
|
||||
@@ -737,7 +1004,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;
|
||||
@@ -859,7 +1126,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;
|
||||
}
|
||||
}
|
||||
@@ -910,6 +1177,18 @@ function cloneNode(el) {
|
||||
return el2;
|
||||
}
|
||||
|
||||
function getOffsetTop(element) {
|
||||
let box = element.getBoundingClientRect();
|
||||
|
||||
return box.top + window.scrollY;
|
||||
}
|
||||
|
||||
function getOffsetLeft(element) {
|
||||
let box = element.getBoundingClientRect();
|
||||
|
||||
return box.left + window.scrollX;
|
||||
}
|
||||
|
||||
oninput = function (event) {
|
||||
var target = event.target;
|
||||
var maxLength = target.getAttribute('data-maxlength');
|
||||
|
@@ -7,13 +7,18 @@ if (!$fields) {
|
||||
$table_status = table_status1($TABLE, true);
|
||||
$name = $adminer->tableName($table_status);
|
||||
|
||||
page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . ($name != "" ? $name : h($TABLE)), $error);
|
||||
|
||||
$rights = array();
|
||||
$rights = [];
|
||||
foreach ($fields as $key => $field) {
|
||||
$rights += $field["privileges"];
|
||||
}
|
||||
$adminer->selectLinks($table_status, (isset($rights["insert"]) || !support("table") ? "" : null));
|
||||
|
||||
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);
|
||||
|
||||
$comment = $table_status["Comment"];
|
||||
if ($comment != "") {
|
||||
@@ -22,6 +27,22 @@ if ($comment != "") {
|
||||
|
||||
if ($fields) {
|
||||
$adminer->tableStructurePrint($fields);
|
||||
|
||||
if (is_view($table_status)) {
|
||||
$editLink = '<p class="links"><a href="' . h(ME) . 'view=' . urlencode($TABLE) . '">' . lang('Alter view') . "</a>\n";
|
||||
} else {
|
||||
$editLink = '<p class="links"><a href="' . h(ME) . 'create=' . urlencode($TABLE) . '">' . lang('Alter table') . "</a>\n";
|
||||
}
|
||||
echo $editLink;
|
||||
|
||||
if (support("partitioning") && preg_match("~partitioned~", $table_status["Create_options"])) {
|
||||
echo "<h3 id='partition-by'>" . lang('Partition by') . "</h3>\n";
|
||||
|
||||
$partitions_info = get_partitions_info($TABLE);
|
||||
$adminer->tablePartitionsPrint($partitions_info);
|
||||
|
||||
echo $editLink;
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_view($table_status)) {
|
||||
@@ -48,31 +69,14 @@ 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"]);
|
||||
echo "<td>" . h($foreign_key["on_update"]);
|
||||
echo "<td>" . h($foreign_key["on_delete"]) . "\n";
|
||||
echo "<td>" . h($foreign_key["on_update"]) . "\n";
|
||||
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")) {
|
||||
@@ -81,7 +85,7 @@ if (support(is_view($table_status) ? "view_trigger" : "trigger")) {
|
||||
if ($triggers) {
|
||||
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";
|
||||
echo "<tr><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";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
@@ -33,7 +33,7 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
|
||||
?>
|
||||
|
||||
<form action="" method="post" id="form">
|
||||
<table class="layout">
|
||||
<table cellspacing="0" 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("REVOKE", $revoke, $match[2], " ON $match[1] FROM $new_user") //! SQL injection
|
||||
|| !grant("GRANT", $grant, $match[2], " ON $match[1] TO $new_user")
|
||||
!grant(false, $revoke, $match[2], $match[1], $new_user) //! SQL injection
|
||||
|| !grant(true, $grant, $match[2], $match[1], $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("REVOKE", array_keys($revoke), $match[2], " ON $match[1] FROM $new_user");
|
||||
grant(false, array_keys($revoke), $match[2], $match[1], $new_user);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,12 +126,19 @@ if ($_POST) {
|
||||
if ($old_pass != "") {
|
||||
$row["hashed"] = true;
|
||||
}
|
||||
$grants[(DB == "" || $grants ? "" : idf_escape(addcslashes(DB, "%_\\"))) . ".*"] = array();
|
||||
|
||||
if ($grants) {
|
||||
$grants[".*"] = [];
|
||||
} elseif (DB != "") {
|
||||
$grants[idf_escape(addcslashes(DB, "%_\\")) . ".*"] = [];
|
||||
} else {
|
||||
$grants["*.* "] = []; // Space is added to force editing mode.
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<table class="layout">
|
||||
<table cellspacing="0" 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">
|
||||
@@ -141,42 +148,80 @@ if ($_POST) {
|
||||
|
||||
<?php
|
||||
//! MAX_* limits, REQUIRE
|
||||
echo "<table class='odds'>\n";
|
||||
echo "<thead><tr><th colspan='2'>" . lang('Privileges') . doc_link(array('sql' => "grant.html#priv_level"));
|
||||
echo "<table>\n";
|
||||
|
||||
echo "<thead><tr><th colspan='2'>" . lang('Privileges') . doc_link(array('sql' => "grant.html#priv_level")) . "</th>";
|
||||
$i = 0;
|
||||
foreach ($grants as $object => $grant) {
|
||||
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
|
||||
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>";
|
||||
$i++;
|
||||
}
|
||||
echo "</thead>\n";
|
||||
echo "</tr></thead>\n";
|
||||
|
||||
foreach (array(
|
||||
foreach ([
|
||||
"" => "",
|
||||
"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><td" . ($desc ? ">$desc<td" : " colspan='2'") . ' lang="en" title="' . h($comment) . '">' . h($privilege);
|
||||
echo "<tr" . odd() . ">";
|
||||
if ($desc) {
|
||||
echo "<td>$desc</td>";
|
||||
}
|
||||
echo "<td" . (!$desc ? " colspan='2'" : "") . ' lang="en" title="' . h($comment) . '">' . h($privilege) . "</td>";
|
||||
|
||||
$i = 0;
|
||||
|
||||
foreach ($grants as $object => $grant) {
|
||||
$name = "'grants[$i][" . h(strtoupper($privilege)) . "]'";
|
||||
$value = $grant[strtoupper($privilege)];
|
||||
if ($context == "Server Admin" && $object != (isset($grants["*.*"]) ? "*.*" : ".*")) {
|
||||
echo "<td>";
|
||||
|
||||
$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>";
|
||||
} elseif (isset($_GET["grant"])) {
|
||||
echo "<td><select name=$name><option><option value='1'" . ($value ? " selected" : "") . ">" . lang('Grant') . "<option value='0'" . ($value == "0" ? " selected" : "") . ">" . lang('Revoke') . "</select>";
|
||||
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>";
|
||||
} else {
|
||||
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 "<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 "</label>";
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user