REL-0.9 Updating Adminer to latest version

This commit is contained in:
cytopia 2017-05-07 19:54:08 +02:00
parent 2d7e51027b
commit 4b0277a30d
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
223 changed files with 1802 additions and 434 deletions

View File

@ -177,3 +177,16 @@ td.break-word {
word-break: break-word; word-break: break-word;
} }
/* adminer.php;
-------------------------------------------------- */
#menu {
position: absolute;
margin: 76px 0 0 !important;
}
#breadcrumb {
top: 60px !important;
}
#lang {
top: 53px !important;
}

View File

@ -0,0 +1,5 @@
language: php
php:
- '5.3'
- '7.1'
script: git diff --name-only $TRAVIS_COMMIT_RANGE | grep '\.php$' | xargs -n1 -P8 php -l | grep -v 'No syntax errors'; test $? -eq 1

View File

@ -29,7 +29,7 @@ if (!$error && $_POST) {
$call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val); $call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val);
} }
$query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . idf_escape($PROCEDURE) . "(" . implode(", ", $call) . ")"; $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")";
echo "<p><code class='jush-$jush'>" . h($query) . "</code> <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>\n"; echo "<p><code class='jush-$jush'>" . h($query) . "</code> <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>\n";
if (!$connection->multi_query($query)) { if (!$connection->multi_query($query)) {

View File

@ -35,7 +35,6 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
$all_fields = array(); $all_fields = array();
$use_all_fields = false; $use_all_fields = false;
$foreign = array(); $foreign = array();
ksort($row["fields"]);
$orig_field = reset($orig_fields); $orig_field = reset($orig_fields);
$after = " FIRST"; $after = " FIRST";

View File

@ -62,10 +62,9 @@ if ($adminer->homepage()) {
search_tables(); search_tables();
} }
} }
echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);">';
$doc_link = doc_link(array('sql' => 'show-table-status.html')); $doc_link = doc_link(array('sql' => 'show-table-status.html'));
echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);" class="jsonly">';
echo '<th>' . lang('Table'); echo '<th>' . lang('Table');
echo '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html')); echo '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html'));
echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-mysql.html')); echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-mysql.html'));
@ -80,10 +79,11 @@ if ($adminer->homepage()) {
$tables = 0; $tables = 0;
foreach ($tables_list as $name => $type) { foreach ($tables_list as $name => $type) {
$view = ($type !== null && !preg_match('~table~i', $type)); $view = ($type !== null && !preg_match('~table~i', $type));
echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');"); $id = h("Table-" . $name);
echo '<th>' . (support("table") || support("indexes") ? '<a href="' . h(ME) . 'table=' . urlencode($name) . '" title="' . lang('Show structure') . '">' . h($name) . '</a>' : h($name)); echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');", "", $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) { 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>'; 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>';
echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '" title="' . lang('Select data') . '">?</a>'; echo '<td align="right"><a href="' . h(ME) . "select=" . urlencode($name) . '" title="' . lang('Select data') . '">?</a>';
} else { } else {
foreach (array( foreach (array(
@ -145,7 +145,6 @@ if ($adminer->homepage()) {
echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n"; echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
echo (support("view") ? '<a href="' . h(ME) . 'view=">' . lang('Create view') . "</a>\n" : ""); echo (support("view") ? '<a href="' . h(ME) . 'view=">' . lang('Create view') . "</a>\n" : "");
echo (support("materializedview") ? '<a href="' . h(ME) . 'view=&amp;materialized=1">' . lang('Create materialized view') . "</a>\n" : "");
if (support("routine")) { if (support("routine")) {
echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n"; echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";

View File

@ -59,7 +59,8 @@ if (isset($_GET["elastic"])) {
} }
function connect($server, $username, $password) { function connect($server, $username, $password) {
$this->_url = "http://$username:$password@$server/"; preg_match('~^(https?://)?(.*)~', $server, $match);
$this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]/";
$return = $this->query(''); $return = $this->query('');
if ($return) { if ($return) {
$this->server_info = $return['version']['number']; $this->server_info = $return['version']['number'];
@ -257,9 +258,9 @@ if (isset($_GET["elastic"])) {
"Engine" => "table", "Engine" => "table",
"Rows" => $table["count"], "Rows" => $table["count"],
); );
} if ($name != "" && $name == $table["term"]) {
if ($name != "" && $name == $table["term"]) { return $return[$name];
return $return[$name]; }
} }
} }
return $return; return $return;

View File

@ -8,7 +8,7 @@
$drivers["mssql"] = "MS SQL"; $drivers["mssql"] = "MS SQL";
if (isset($_GET["mssql"])) { if (isset($_GET["mssql"])) {
$possible_drivers = array("SQLSRV", "MSSQL"); $possible_drivers = array("SQLSRV", "MSSQL", "PDO_DBLIB");
define("DRIVER", "mssql"); define("DRIVER", "mssql");
if (extension_loaded("sqlsrv")) { if (extension_loaded("sqlsrv")) {
class Min_DB { class Min_DB {
@ -109,11 +109,11 @@ if (isset($_GET["mssql"])) {
} }
function fetch_assoc() { function fetch_assoc() {
return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_ASSOC, SQLSRV_SCROLL_NEXT)); return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_ASSOC));
} }
function fetch_row() { function fetch_row() {
return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_NUMERIC, SQLSRV_SCROLL_NEXT)); return $this->_convert(sqlsrv_fetch_array($this->_result, SQLSRV_FETCH_NUMERIC));
} }
function fetch_field() { function fetch_field() {
@ -164,7 +164,7 @@ if (isset($_GET["mssql"])) {
} }
function query($query, $unbuffered = false) { function query($query, $unbuffered = false) {
$result = mssql_query($query, $this->_link); //! $unbuffered $result = @mssql_query($query, $this->_link); //! $unbuffered
$this->error = ""; $this->error = "";
if (!$result) { if (!$result) {
$this->error = mssql_get_last_message(); $this->error = mssql_get_last_message();
@ -186,7 +186,7 @@ if (isset($_GET["mssql"])) {
} }
function next_result() { function next_result() {
return mssql_next_result($this->_result); return mssql_next_result($this->_result->_result);
} }
function result($query, $field = 0) { function result($query, $field = 0) {
@ -234,8 +234,21 @@ if (isset($_GET["mssql"])) {
} }
} }
} } elseif (extension_loaded("pdo_dblib")) {
class Min_DB extends Min_PDO {
var $extension = "PDO_DBLIB";
function connect($server, $username, $password) {
$this->dsn("dblib:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)), $username, $password);
return true;
}
function select_db($database) {
// database selection is separated from the connection so dbname in DSN can't be used
return $this->query("USE " . idf_escape($database));
}
}
}
class Min_Driver extends Min_SQL { class Min_Driver extends Min_SQL {
@ -288,7 +301,7 @@ if (isset($_GET["mssql"])) {
} }
function get_databases() { function get_databases() {
return get_vals("EXEC sp_databases"); return get_vals("SELECT name FROM sys.databases WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb')");
} }
function limit($query, $where, $limit, $offset = 0, $separator = " ") { function limit($query, $where, $limit, $offset = 0, $separator = " ") {

View File

@ -301,12 +301,16 @@ if (!defined("DRIVER")) {
* @return mixed Min_DB or string for error * @return mixed Min_DB or string for error
*/ */
function connect() { function connect() {
global $adminer; global $adminer, $types, $structured_types;
$connection = new Min_DB; $connection = new Min_DB;
$credentials = $adminer->credentials(); $credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) { 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)); // available in MySQLi since PHP 5.0.5
$connection->query("SET sql_quote_show_create = 1, autocommit = 1"); $connection->query("SET sql_quote_show_create = 1, autocommit = 1");
if (version_compare($connection->server_info, '5.7.8') >= 0) {
$structured_types[lang('Strings')][] = "json";
$types["json"] = 4294967295;
}
return $connection; return $connection;
} }
$return = $connection->error; $return = $connection->error;
@ -429,7 +433,7 @@ if (!defined("DRIVER")) {
global $connection; global $connection;
$return = array(); $return = array();
foreach (get_rows($fast && $connection->server_info >= 5 foreach (get_rows($fast && $connection->server_info >= 5
? "SELECT TABLE_NAME AS Name, 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, 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, "%_\\")) : "") : "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
) as $row) { ) as $row) {
if ($row["Engine"] == "InnoDB") { if ($row["Engine"] == "InnoDB") {
@ -500,10 +504,11 @@ if (!defined("DRIVER")) {
function indexes($table, $connection2 = null) { function indexes($table, $connection2 = null) {
$return = array(); $return = array();
foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) { foreach (get_rows("SHOW INDEX FROM " . table($table), $connection2) as $row) {
$return[$row["Key_name"]]["type"] = ($row["Key_name"] == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? "INDEX" : "UNIQUE"))); $name = $row["Key_name"];
$return[$row["Key_name"]]["columns"][] = $row["Column_name"]; $return[$name]["type"] = ($name == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? ($row["Index_type"] == "SPATIAL" ? "SPATIAL" : "INDEX") : "UNIQUE")));
$return[$row["Key_name"]]["lengths"][] = $row["Sub_part"]; $return[$name]["columns"][] = $row["Column_name"];
$return[$row["Key_name"]]["descs"][] = null; $return[$name]["lengths"][] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
$return[$name]["descs"][] = null;
} }
return $return; return $return;
} }
@ -972,6 +977,14 @@ if (!defined("DRIVER")) {
return get_key_vals("SHOW STATUS"); return get_key_vals("SHOW STATUS");
} }
/** Get replication status of master or slave
* @param string
* @return array ($name => $value)
*/
function replication_status($type) {
return get_rows("SHOW $type STATUS");
}
/** Convert field in select and edit /** Convert field in select and edit
* @param array one element from fields() * @param array one element from fields()
* @return string * @return string
@ -1012,13 +1025,17 @@ if (!defined("DRIVER")) {
*/ */
function support($feature) { function support($feature) {
global $connection; global $connection;
return !preg_match("~scheme|sequence|type|view_trigger" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|routine|trigger|view" : "") : "") . "~", $feature); return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|routine|trigger|view" : "") : "") . "~", $feature);
} }
function kill_process($val) { function kill_process($val) {
return queries("KILL " . number($val)); return queries("KILL " . number($val));
} }
function connection_id(){
return "SELECT CONNECTION_ID()";
}
function max_connections() { function max_connections() {
global $connection; global $connection;
return $connection->result("SELECT @@max_connections"); return $connection->result("SELECT @@max_connections");

View File

@ -186,12 +186,20 @@ if (isset($_GET["pgsql"])) {
} }
function connect() { function connect() {
global $adminer; global $adminer, $types, $structured_types;
$connection = new Min_DB; $connection = new Min_DB;
$credentials = $adminer->credentials(); $credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) { if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
if ($connection->server_info >= 9) { if ($connection->server_info >= 9) {
$connection->query("SET application_name = 'Adminer'"); $connection->query("SET application_name = 'Adminer'");
if ($connection->server_info >= 9.2) {
$structured_types[lang('Strings')][] = "json";
$types["json"] = 4294967295;
if ($connection->server_info >= 9.4) {
$structured_types[lang('Strings')][] = "jsonb";
$types["jsonb"] = 4294967295;
}
}
} }
return $connection; return $connection;
} }
@ -199,7 +207,7 @@ if (isset($_GET["pgsql"])) {
} }
function get_databases() { function get_databases() {
return get_vals("SELECT datname FROM pg_database ORDER BY datname"); return get_vals("SELECT datname FROM pg_database WHERE has_database_privilege(datname, 'CONNECT') ORDER BY datname");
} }
function limit($query, $where, $limit, $offset = 0, $separator = " ") { function limit($query, $where, $limit, $offset = 0, $separator = " ") {
@ -244,11 +252,11 @@ ORDER BY 1";
function table_status($name = "") { function table_status($name = "") {
$return = array(); $return = array();
foreach (get_rows("SELECT relname AS \"Name\", CASE relkind WHEN 'r' THEN 'table' WHEN 'mv' THEN 'materialized view' WHEN 'f' THEN 'foreign table' ELSE 'view' END AS \"Engine\", pg_relation_size(oid) AS \"Data_length\", pg_total_relation_size(oid) - pg_relation_size(oid) AS \"Index_length\", obj_description(oid, 'pg_class') AS \"Comment\", relhasoids::int AS \"Oid\", reltuples as \"Rows\" 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_relation_size(c.oid) AS \"Data_length\", pg_total_relation_size(c.oid) - pg_relation_size(c.oid) AS \"Index_length\", obj_description(c.oid, 'pg_class') AS \"Comment\", c.relhasoids::int AS \"Oid\", c.reltuples as \"Rows\", n.nspname
FROM pg_class FROM pg_class c
WHERE relkind IN ('r','v','mv','f') JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace)
AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) WHERE relkind IN ('r', 'm', 'v')
" . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname") " . ($name != "" ? "AND relname = " . q($name) : "ORDER BY c.oid")
) as $row) { //! Index_length, Auto_increment ) as $row) { //! Index_length, Auto_increment
$return[$row["Name"]] = $row; $return[$row["Name"]] = $row;
} }
@ -311,9 +319,9 @@ ORDER BY a.attnum"
$return = array(); $return = array();
$table_oid = $connection2->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = " . q($table)); $table_oid = $connection2->result("SELECT oid FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema()) AND relname = " . q($table));
$columns = get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $table_oid AND attnum > 0", $connection2); $columns = get_key_vals("SELECT attnum, attname FROM pg_attribute WHERE attrelid = $table_oid AND attnum > 0", $connection2);
foreach (get_rows("SELECT relname, indisunique::int, indisprimary::int, indkey, indoption FROM pg_index i, pg_class ci WHERE i.indrelid = $table_oid AND ci.oid = i.indexrelid", $connection2) as $row) { foreach (get_rows("SELECT relname, indisunique::int, indisprimary::int, indkey, indoption , (indpred IS NOT NULL)::int as indispartial FROM pg_index i, pg_class ci WHERE i.indrelid = $table_oid AND ci.oid = i.indexrelid", $connection2) as $row) {
$relname = $row["relname"]; $relname = $row["relname"];
$return[$relname]["type"] = ($row["indisprimary"] ? "PRIMARY" : ($row["indisunique"] ? "UNIQUE" : "INDEX")); $return[$relname]["type"] = ($row["indispartial"] ? "INDEX" : ($row["indisprimary"] ? "PRIMARY" : ($row["indisunique"] ? "UNIQUE" : "INDEX")));
$return[$relname]["columns"] = array(); $return[$relname]["columns"] = array();
foreach (explode(" ", $row["indkey"]) as $indkey) { foreach (explode(" ", $row["indkey"]) as $indkey) {
$return[$relname]["columns"][] = $columns[$indkey]; $return[$relname]["columns"][] = $columns[$indkey];
@ -330,7 +338,7 @@ ORDER BY a.attnum"
function foreign_keys($table) { function foreign_keys($table) {
global $on_actions; global $on_actions;
$return = array(); $return = array();
foreach (get_rows("SELECT conname, pg_get_constraintdef(oid) AS definition foreach (get_rows("SELECT conname, condeferrable::int AS deferrable, pg_get_constraintdef(oid) AS definition
FROM pg_constraint FROM pg_constraint
WHERE conrelid = (SELECT pc.oid FROM pg_class AS pc INNER JOIN pg_namespace AS pn ON (pn.oid = pc.relnamespace) WHERE pc.relname = " . q($table) . " AND pn.nspname = current_schema()) WHERE conrelid = (SELECT pc.oid FROM pg_class AS pc INNER JOIN pg_namespace AS pn ON (pn.oid = pc.relnamespace) WHERE pc.relname = " . q($table) . " AND pn.nspname = current_schema())
AND contype = 'f'::char AND contype = 'f'::char
@ -352,7 +360,7 @@ ORDER BY conkey, conname") as $row) {
function view($name) { function view($name) {
global $connection; global $connection;
return array("select" => $connection->result("SELECT pg_get_viewdef(" . q($name) . ")")); return array("select" => trim($connection->result("SELECT pg_get_viewdef(" . q($name) . ")")));
} }
function collations() { function collations() {
@ -488,7 +496,7 @@ ORDER BY conkey, conname") as $row) {
function drop_tables($tables) { function drop_tables($tables) {
foreach ($tables as $table) { foreach ($tables as $table) {
$status = table_status($table); $status = table_status($table);
if (!queries("DROP " . strtoupper($status["Engine"]) . " " . table($table))) { if (!queries("DROP " . strtoupper($status["Engine"]) . " " . table($table))) {
return false; return false;
} }
@ -506,18 +514,21 @@ ORDER BY conkey, conname") as $row) {
return true; return true;
} }
function trigger($name) { function trigger($name, $table = null) {
if ($name == "") { if ($name == "") {
return array("Statement" => "EXECUTE PROCEDURE ()"); return array("Statement" => "EXECUTE PROCEDURE ()");
} }
$rows = get_rows('SELECT trigger_name AS "Trigger", condition_timing AS "Timing", event_manipulation AS "Event", \'FOR EACH \' || action_orientation AS "Type", action_statement AS "Statement" FROM information_schema.triggers WHERE event_object_table = ' . q($_GET["trigger"]) . ' AND trigger_name = ' . q($name)); if ($table === null) {
$table = $_GET['trigger'];
}
$rows = get_rows('SELECT t.trigger_name AS "Trigger", t.action_timing AS "Timing", (SELECT STRING_AGG(event_manipulation, \' OR \') FROM information_schema.triggers WHERE event_object_table = t.event_object_table AND trigger_name = t.trigger_name ) AS "Events", t.event_manipulation AS "Event", \'FOR EACH \' || t.action_orientation AS "Type", t.action_statement AS "Statement" FROM information_schema.triggers t WHERE t.event_object_table = ' . q($table) . ' AND t.trigger_name = ' . q($name));
return reset($rows); return reset($rows);
} }
function triggers($table) { function triggers($table) {
$return = array(); $return = array();
foreach (get_rows("SELECT * FROM information_schema.triggers WHERE event_object_table = " . q($table)) as $row) { foreach (get_rows("SELECT * FROM information_schema.triggers WHERE event_object_table = " . q($table)) as $row) {
$return[$row["trigger_name"]] = array($row["condition_timing"], $row["event_manipulation"]); $return[$row["trigger_name"]] = array($row["action_timing"], $row["event_manipulation"]);
} }
return $return; return $return;
} }
@ -606,6 +617,111 @@ AND typelem = 0"
return $return; return $return;
} }
/** Get SQL command to create table
* @param string
* @param bool
* @return string
*/
function create_sql($table, $auto_increment) {
global $connection;
$return = '';
$return_parts = array();
$sequences = array();
$status = table_status($table);
$fields = fields($table);
$indexes = indexes($table);
ksort($indexes);
$fkeys = foreign_keys($table);
ksort($fkeys);
$triggers = triggers($table);
if (!$status || empty($fields)) {
return false;
}
$return = "CREATE TABLE " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " (\n ";
// fields' definitions
foreach ($fields as $field_name => $field) {
$part = idf_escape($field['field']) . ' ' . $field['full_type']
. (is_null($field['default']) ? "" : " DEFAULT $field[default]")
. ($field['attnotnull'] ? " NOT NULL" : "");
$return_parts[] = $part;
// sequences for fields
if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
$sequence_name = $matches[1];
$sq = reset(get_rows("SELECT * FROM $sequence_name"));
$sequences[] = "CREATE SEQUENCE $sequence_name INCREMENT $sq[increment_by] MINVALUE $sq[min_value] MAXVALUE $sq[max_value] START " . ($auto_increment ? $sq['last_value'] : 1) . " CACHE $sq[cache_value];";
}
}
// adding sequences before table definition
if (!empty($sequences)) {
$return = implode("\n\n", $sequences) . "\n\n$return";
}
// primary + unique keys
foreach ($indexes as $index_name => $index) {
switch($index['type']) {
case 'UNIQUE': $return_parts[] = "CONSTRAINT " . idf_escape($index_name) . " UNIQUE (" . implode(', ', array_map('idf_escape', $index['columns'])) . ")"; break;
case 'PRIMARY': $return_parts[] = "CONSTRAINT " . idf_escape($index_name) . " PRIMARY KEY (" . implode(', ', array_map('idf_escape', $index['columns'])) . ")"; break;
}
}
// foreign keys
foreach ($fkeys as $fkey_name => $fkey) {
$return_parts[] = "CONSTRAINT " . idf_escape($fkey_name) . " $fkey[definition] " . ($fkey['deferrable'] ? 'DEFERRABLE' : 'NOT DEFERRABLE');
}
$return .= implode(",\n ", $return_parts) . "\n) WITH (oids = " . ($status['Oid'] ? 'true' : 'false') . ");";
// "basic" indexes after table definition
foreach ($indexes as $index_name => $index) {
if ($index['type'] == 'INDEX') {
$return .= "\n\nCREATE INDEX " . idf_escape($index_name) . " ON " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " USING btree (" . implode(', ', array_map('idf_escape', $index['columns'])) . ");";
}
}
// coments for table & fields
if ($status['Comment']) {
$return .= "\n\nCOMMENT ON TABLE " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . " IS " . q($status['Comment']) . ";";
}
foreach ($fields as $field_name => $field) {
if ($field['comment']) {
$return .= "\n\nCOMMENT ON COLUMN " . idf_escape($status['nspname']) . "." . idf_escape($status['Name']) . "." . idf_escape($field_name) . " IS " . q($field['comment']) . ";";
}
}
// triggers
foreach ($triggers as $trg_id => $trg) {
$trigger = trigger($trg_id, $status['Name']);
$return .= "\n\nCREATE TRIGGER " . idf_escape($trigger['Trigger']) . " $trigger[Timing] $trigger[Events] ON " . idf_escape($status["nspname"]) . "." . idf_escape($status['Name']) . " $trigger[Type] $trigger[Statement];";
}
return rtrim($return, ';');
}
/** Get SQL commands to create triggers
* @param string
* @param string
* @return string
*/
//@TODO
function trigger_sql($table, $style) {
$return = "";
//foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) {
// $return .= "\n" . ($style == 'CREATE+ALTER' ? "DROP TRIGGER IF EXISTS " . idf_escape($row["Trigger"]) . ";;\n" : "")
// . "CREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
//}
//return $return;
return false;
}
function use_sql($database) { function use_sql($database) {
return "\connect " . idf_escape($database); return "\connect " . idf_escape($database);
} }
@ -631,11 +747,15 @@ AND typelem = 0"
function support($feature) { function support($feature) {
global $connection; global $connection;
return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . ($connection->server_info >= 9.3 ? 'materializedview|' : '') . 'scheme|processlist|sequence|trigger|type|variables|drop_col|kill)$~', $feature); //! routine| return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . ($connection->server_info >= 9.3 ? 'materializedview|' : '') . 'scheme|processlist|sequence|trigger|type|variables|drop_col|kill|dump)$~', $feature); //! routine|
} }
function kill_process($val) { function kill_process($val) {
return queries("SELECT pg_terminate_backend(" . number($val).")"); return queries("SELECT pg_terminate_backend(" . number($val) . ")");
}
function connection_id(){
return "SELECT pg_backend_pid()";
} }
function max_connections() { function max_connections() {

View File

@ -6,6 +6,7 @@ if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + 365*24*60*60) . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: immutable");
if ($_GET["file"] == "favicon.ico") { if ($_GET["file"] == "favicon.ico") {
header("Content-Type: image/x-icon"); header("Content-Type: image/x-icon");
@ -18,7 +19,7 @@ if ($_GET["file"] == "favicon.ico") {
echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js')); echo lzw_decompress(compile_file('../adminer/static/functions.js;static/editing.js', 'minify_js'));
} elseif ($_GET["file"] == "jush.js") { } elseif ($_GET["file"] == "jush.js") {
header("Content-Type: text/javascript; charset=utf-8"); 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-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('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-js.js;../externals/jush/modules/jush-sql.js;../externals/jush/modules/jush-pgsql.js;../externals/jush/modules/jush-sqlite.js;../externals/jush/modules/jush-mssql.js;../externals/jush/modules/jush-oracle.js;../externals/jush/modules/jush-simpledb.js', 'minify_js'));
} else { } else {
header("Content-Type: image/gif"); header("Content-Type: image/gif");
switch ($_GET["file"]) { switch ($_GET["file"]) {

View File

@ -7,13 +7,15 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
$message = ($_POST["drop"] ? lang('Foreign key has been dropped.') : ($name != "" ? lang('Foreign key has been altered.') : lang('Foreign key has been created.'))); $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); $location = ME . "table=" . urlencode($TABLE);
$row["source"] = array_filter($row["source"], 'strlen'); if (!$_POST["drop"]) {
ksort($row["source"]); // enforce input order $row["source"] = array_filter($row["source"], 'strlen');
$target = array(); ksort($row["source"]); // enforce input order
foreach ($row["source"] as $key => $val) { $target = array();
$target[$key] = $row["target"][$key]; foreach ($row["source"] as $key => $val) {
$target[$key] = $row["target"][$key];
}
$row["target"] = $target;
} }
$row["target"] = $target;
if ($jush == "sqlite") { if ($jush == "sqlite") {
queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row))))); queries_redirect($location, $message, recreate_table($TABLE, $TABLE, array(), array(), array(" $name" => ($_POST["drop"] ? "" : " " . format_foreign_key($row)))));
@ -60,13 +62,13 @@ $referencable = array_keys(array_filter(table_status('', true), 'fk_support'));
<input type="hidden" name="change-js" value=""> <input type="hidden" name="change-js" value="">
<noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript> <noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
<table cellspacing="0"> <table cellspacing="0">
<thead><tr><th><?php echo lang('Source'); ?><th><?php echo lang('Target'); ?></thead> <thead><tr><th id="label-source"><?php echo lang('Source'); ?><th id="label-target"><?php echo lang('Target'); ?></thead>
<?php <?php
$j = 0; $j = 0;
foreach ($row["source"] as $key => $val) { foreach ($row["source"] as $key => $val) {
echo "<tr>"; echo "<tr>";
echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow(this);" : 1)); echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow(this);" : 1), "label-source");
echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key]); echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key], 1, "label-target");
$j++; $j++;
} }
?> ?>

View File

@ -110,7 +110,7 @@ focus(document.getElementById('username'));
function login($login, $password) { function login($login, $password) {
global $jush; global $jush;
if ($jush == "sqlite") { if ($jush == "sqlite") {
return lang('Implement %s method to use SQLite.', 'login()'); return lang('<a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to use SQLite.', '<code>login()</code>');
} }
return true; return true;
} }
@ -197,6 +197,15 @@ focus(document.getElementById('username'));
; ;
} }
/** Query printed in SQL command before execution
* @param string query to be executed
* @return string escaped query to be printed
*/
function sqlCommandQuery($query)
{
return shorten_utf8(trim($query), 1000);
}
/** Description of a row in a table /** Description of a row in a table
* @param string * @param string
* @return string SQL expression, empty string for no description * @return string SQL expression, empty string for no description
@ -232,7 +241,10 @@ focus(document.getElementById('username'));
function selectVal($val, $link, $field, $original) { function selectVal($val, $link, $field, $original) {
$return = ($val === null ? "<i>NULL</i>" : (preg_match("~char|binary~", $field["type"]) && !preg_match("~var~", $field["type"]) ? "<code>$val</code>" : $val)); $return = ($val === null ? "<i>NULL</i>" : (preg_match("~char|binary~", $field["type"]) && !preg_match("~var~", $field["type"]) ? "<code>$val</code>" : $val));
if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) { if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) {
$return = lang('%d byte(s)', strlen($original)); $return = "<i>" . lang('%d byte(s)', strlen($original)) . "</i>";
}
if (preg_match('~json~', $field["type"])) {
$return = "<code class='jush-js'>$return</code>";
} }
return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? " rel='noreferrer'" : "") . ">$return</a>" : $return); return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? " rel='noreferrer'" : "") . ">$return</a>" : $return);
} }
@ -246,6 +258,45 @@ focus(document.getElementById('username'));
return $val; return $val;
} }
/** Print table structure in tabular format
* @param array data about individual fields
* @return null
*/
function tableStructurePrint($fields) {
echo "<table cellspacing='0'>\n";
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
echo "<tr" . odd() . "><th>" . h($field["field"]);
echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . "</span>";
echo ($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>" : "");
echo (support("comment") ? "<td>" . nbsp($field["comment"]) : "");
echo "\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 cellspacing='0'>\n";
foreach ($indexes as $name => $index) {
ksort($index["columns"]); // enforce correct columns order
$print = array();
foreach ($index["columns"] as $key => $val) {
$print[] = "<i>" . h($val) . "</i>"
. ($index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "")
. ($index["descs"][$key] ? " DESC" : "")
;
}
echo "<tr title='" . h($name) . "'><th>$index[type]<td>" . implode(", ", $print) . "\n";
}
echo "</table>\n";
}
/** Print columns box in select /** Print columns box in select
* @param array result of selectColumnsProcess()[0] * @param array result of selectColumnsProcess()[0]
* @param array selectable columns * @param array selectable columns
@ -352,8 +403,9 @@ focus(document.getElementById('username'));
echo "var indexColumns = "; echo "var indexColumns = ";
$columns = array(); $columns = array();
foreach ($indexes as $index) { foreach ($indexes as $index) {
if ($index["type"] != "FULLTEXT") { $current_key = reset($index["columns"]);
$columns[reset($index["columns"])] = 1; if ($index["type"] != "FULLTEXT" && $current_key) {
$columns[$current_key] = 1;
} }
} }
$columns[""] = 1; $columns[""] = 1;
@ -806,11 +858,14 @@ focus(document.getElementById('username'));
$connection->select_db(DB); $connection->select_db(DB);
$tables = table_status('', true); $tables = table_status('', true);
} }
if (support("sql")) { ?>
?>
<script type="text/javascript" src="../externals/jush/modules/jush.js"></script> <script type="text/javascript" src="../externals/jush/modules/jush.js"></script>
<script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script> <script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>
<script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script> <script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>
<script type="text/javascript" src="../externals/jush/modules/jush-js.js"></script>
<?php
if (support("sql")) {
?>
<script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script> <script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
<script type="text/javascript"> <script type="text/javascript">
<?php <?php
@ -886,17 +941,18 @@ bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info,
* @return null * @return null
*/ */
function tablesPrint($tables) { function tablesPrint($tables) {
echo "<p id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n"; echo "<ul id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";
foreach ($tables as $table => $status) { foreach ($tables as $table => $status) {
echo '<a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> "; echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
$name = $this->tableName($status); $name = $this->tableName($status);
echo (support("table") || support("indexes") echo (support("table") || support("indexes")
? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"' ? '<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") . 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>" . " title='" . lang('Show structure') . "'>$name</a>"
: "<span>$name</span>" : "<span>$name</span>"
) . "<br>\n"; ) . "\n";
} }
echo "</ul>\n";
} }
} }

View File

@ -120,7 +120,6 @@ function unset_permanent() {
*/ */
function auth_error($error) { function auth_error($error) {
global $adminer, $has_token; global $adminer, $has_token;
$error = h($error);
$session_name = session_name(); $session_name = session_name();
if (isset($_GET["username"])) { if (isset($_GET["username"])) {
header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header header("HTTP/1.1 403 Forbidden"); // 401 requires sending WWW-Authenticate header
@ -168,7 +167,7 @@ if (isset($_GET["username"])) {
$driver = new Min_Driver($connection); $driver = new Min_Driver($connection);
if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) { if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
auth_error((is_string($connection) ? $connection : (is_string($login) ? $login : lang('Invalid credentials.')))); auth_error((is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid credentials.'))));
} }
if ($auth && $_POST["token"]) { if ($auth && $_POST["token"]) {

View File

@ -12,11 +12,12 @@ function connect_error() {
page_header(lang('Select database'), $error, false); page_header(lang('Select database'), $error, false);
echo "<p class='links'>\n"; echo "<p class='links'>\n";
foreach (array( foreach (array(
'database' => lang('Create new database'), 'database' => lang('Create database'),
'privileges' => lang('Privileges'), 'privileges' => lang('Privileges'),
'processlist' => lang('Process list'), 'processlist' => lang('Process list'),
'variables' => lang('Variables'), 'variables' => lang('Variables'),
'status' => lang('Status'), 'status' => lang('Status'),
'replication' => lang('Replication'),
) as $key => $val) { ) as $key => $val) {
if (support($key)) { if (support($key)) {
echo "<a href='" . h(ME) . "$key='>$val</a>\n"; echo "<a href='" . h(ME) . "$key='>$val</a>\n";
@ -43,8 +44,9 @@ function connect_error() {
foreach ($databases as $db => $tables) { foreach ($databases as $db => $tables) {
$root = h(ME) . "db=" . urlencode($db); $root = h(ME) . "db=" . urlencode($db);
echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])) : ""); $id = h("Db-" . $db);
echo "<th><a href='$root'>" . h($db) . "</a>"; echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
echo "<th><a href='$root' id='$db'>" . h($db) . "</a>";
$collation = nbsp(db_collation($db, $collations)); $collation = nbsp(db_collation($db, $collations));
echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation); echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
echo "<td align='right'><a href='$root&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>"; echo "<td align='right'><a href='$root&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
@ -76,7 +78,7 @@ if (isset($_GET["import"])) {
$_GET["sql"] = $_GET["import"]; $_GET["sql"] = $_GET["import"];
} }
if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["variables"]) || $_GET["script"] == "connect" || $_GET["script"] == "kill")) { if (!(DB != "" ? $connection->select_db(DB) : isset($_GET["sql"]) || isset($_GET["dump"]) || isset($_GET["database"]) || isset($_GET["processlist"]) || isset($_GET["privileges"]) || isset($_GET["user"]) || isset($_GET["replication"]) || isset($_GET["variables"]) || $_GET["script"] == "connect" || $_GET["script"] == "kill")) {
if (DB != "" || $_GET["refresh"]) { if (DB != "" || $_GET["refresh"]) {
restart_session(); restart_session();
set_session("dbs", null); set_session("dbs", null);

View File

@ -18,6 +18,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>"> <html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>">
<?php /* devilbox edit */ echo loadClass('Html')->getHead(); error_reporting(6135); ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript"> <meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="robots" content="noindex"> <meta name="robots" content="noindex">
@ -29,21 +30,18 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
<?php if ($adminer->head()) { ?> <?php if ($adminer->head()) { ?>
<link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico"> <link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
<link rel="apple-touch-icon" href="../adminer/static/favicon.ico"> <link rel="apple-touch-icon" href="../adminer/static/favicon.ico">
<?php require '../../../../include/head.php'; ?>
<?php if (file_exists("adminer.css")) { ?> <?php if (file_exists("adminer.css")) { ?>
<link rel="stylesheet" type="text/css" href="adminer.css"> <link rel="stylesheet" type="text/css" href="adminer.css">
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
<body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " onload=\"verifyVersion('$VERSION');\""); ?>> <body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " onload=\"verifyVersion('$VERSION');\""); ?>>
<?php /* devilbox edit */ echo loadClass('Html')->getNavbar(); error_reporting(6135);?>
<script type="text/javascript"> <script type="text/javascript">
document.body.className = document.body.className.replace(/ nojs/, ' js'); document.body.className = document.body.className.replace(/ nojs/, ' js');
var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>'; var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
</script> </script>
<?php require '../../../../config.php'; ?>
<?php error_reporting(6135); ?>
<?php require '../../../../include/navbar.php'; ?>
<?php error_reporting(6135); ?>
<div id="help" class="jush-<?php echo $jush; ?> jsonly hidden" onmouseover="helpOpen = 1;" onmouseout="helpMouseout(this, event);"></div> <div id="help" class="jush-<?php echo $jush; ?> jsonly hidden" onmouseover="helpOpen = 1;" onmouseout="helpMouseout(this, event);"></div>
<div id="content"> <div id="content">
@ -138,5 +136,5 @@ function page_footer($missing = "") {
</div> </div>
<script type="text/javascript">setupSubmitHighlight(document);</script> <script type="text/javascript">setupSubmitHighlight(document);</script>
<?php <?php
}?> /* devilbox edit */ echo loadClass('Html')->getFooter(); error_reporting(6135);
<?php require '../../../../include/footer.php'; ?> }

View File

@ -141,7 +141,7 @@ function edit_type($key, $field, $collations, $foreign_keys = array()) {
global $structured_types, $types, $unsigned, $on_actions; global $structured_types, $types, $unsigned, $on_actions;
$type = $field["type"]; $type = $field["type"];
?> ?>
<td><select name="<?php echo h($key); ?>[type]" class="type" onfocus="lastType = selectValue(this);" onchange="editingTypeChange(this);"<?php echo on_help("getTarget(event).value", 1); ?>><?php <td><select name="<?php echo h($key); ?>[type]" class="type" onfocus="lastType = selectValue(this);" onchange="editingTypeChange(this);"<?php echo on_help("getTarget(event).value", 1); ?> aria-labelledby="label-type"><?php
if ($type && !isset($types[$type]) && !isset($foreign_keys[$type])) { if ($type && !isset($types[$type]) && !isset($foreign_keys[$type])) {
array_unshift($structured_types, $type); array_unshift($structured_types, $type);
} }
@ -150,7 +150,7 @@ if ($foreign_keys) {
} }
echo optionlist($structured_types, $type); echo optionlist($structured_types, $type);
?></select> ?></select>
<td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3" onfocus="editingLengthFocus(this);"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); ?> onchange="editingLengthChange(this);" onkeyup="this.onchange();"><td class="options"><?php //! type="number" with enabled JavaScript <td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3" onfocus="editingLengthFocus(this);"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); ?> onchange="editingLengthChange(this);" onkeyup="this.onchange();" aria-labelledby="label-length"><td class="options"><?php //! type="number" with enabled JavaScript
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 "<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('~((^|[^o])int|float|double|decimal)$~', $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : ''); echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match('~((^|[^o])int|float|double|decimal)$~', $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"), $field["on_update"]) . '</select>' : ''); echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), $field["on_update"]) . '</select>' : '');
@ -238,20 +238,20 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
?> ?>
<thead><tr class="wrap"> <thead><tr class="wrap">
<?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?> <?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?>
<th><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?> <th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
<td><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;" onblur="editingLengthBlur(this);"></textarea> <td id="label-type"><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;" onblur="editingLengthBlur(this);"></textarea>
<td><?php echo lang('Length'); ?> <td id="label-length"><?php echo lang('Length'); ?>
<td><?php echo lang('Options'); ?> <td><?php echo lang('Options'); /* no label required, options have their own label */ ?>
<?php if ($type == "TABLE") { ?> <?php if ($type == "TABLE") { ?>
<td>NULL <td id="label-null">NULL
<td><input type="radio" name="auto_increment_col" value=""><acronym title="<?php echo lang('Auto Increment'); ?>">AI</acronym><?php echo doc_link(array( <td><input type="radio" name="auto_increment_col" value=""><acronym id="label-ai" title="<?php echo lang('Auto Increment'); ?>">AI</acronym><?php echo doc_link(array(
'sql' => "example-auto-increment.html", 'sql' => "example-auto-increment.html",
'sqlite' => "autoinc.html", 'sqlite' => "autoinc.html",
'pgsql' => "datatype.html#DATATYPE-SERIAL", 'pgsql' => "datatype.html#DATATYPE-SERIAL",
'mssql' => "ms186775.aspx", 'mssql' => "ms186775.aspx",
)); ?> )); ?>
<td><?php echo lang('Default value'); ?> <td id="label-default"><?php echo lang('Default value'); ?>
<?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?> <?php echo (support("comment") ? "<td id='label-comment'" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
<?php } ?> <?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 type="text/javascript">row_count = <?php echo count($fields); ?>;</script> <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 type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
</thead> </thead>
@ -264,21 +264,21 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
?> ?>
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>> <tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
<?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?> <?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"]); ?>" onchange="editingNameChange(this);<?php echo ($field["field"] != "" || count($fields) > 1 ? '' : ' editingAddRow(this);" onkeyup="if (this.value) editingAddRow(this);'); ?>" maxlength="64" autocapitalize="off"><?php } ?> <th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="editingNameChange(this);<?php echo ($field["field"] != "" || count($fields) > 1 ? '' : ' editingAddRow(this);" onkeyup="if (this.value) editingAddRow(this);'); ?>" maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php } ?>
<input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>"> <input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
<?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?> <?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
<?php if ($type == "TABLE") { ?> <?php if ($type == "TABLE") { ?>
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block"); ?> <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 } ?> onclick="var field = this.form['fields[' + this.value + '][field]']; if (!field.value) { field.value = 'id'; field.onchange(); }"></label><td><?php <td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> onclick="var field = this.form['fields[' + this.value + '][field]']; if (!field.value) { field.value = 'id'; field.onchange(); }" aria-labelledby="label-ai"></label><td><?php
echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" onkeyup="keyupChange.call(this);" onchange="this.previousSibling.checked = true;"> 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"]); ?>" onkeyup="keyupChange.call(this);" onchange="this.previousSibling.checked = true;" aria-labelledby="label-default">
<?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . "><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' maxlength='" . ($connection->server_info >= 5.5 ? 1024 : 255) . "'>" : ""); ?> <?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . "><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' maxlength='" . ($connection->server_info >= 5.5 ? 1024 : 255) . "' aria-labelledby='label-comment'>" : ""); ?>
<?php } ?> <?php } ?>
<?php <?php
echo "<td>"; echo "<td>";
echo (support("move_col") ? echo (support("move_col") ?
"<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'>&nbsp;" "<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'>&nbsp;"
. "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>&nbsp;" . "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "' onclick='return !editingMoveRow(this, 1);'>&nbsp;"
. "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>&nbsp;" . "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "' onclick='return !editingMoveRow(this, 0);'>&nbsp;"
: ""); : "");
echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'fields\$1[field]');\">" : ""); echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'fields\$1[field]');\">" : "");
echo "\n"; echo "\n";
@ -290,7 +290,6 @@ echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input nam
* @return bool * @return bool
*/ */
function process_fields(&$fields) { function process_fields(&$fields) {
ksort($fields);
$offset = 0; $offset = 0;
if ($_POST["up"]) { if ($_POST["up"]) {
$last = 0; $last = 0;
@ -432,9 +431,9 @@ function create_routine($routine, $row) {
} }
/** Remove current user definer from SQL command /** Remove current user definer from SQL command
* @param string * @param string
* @return string * @return string
*/ */
function remove_definer($query) { function remove_definer($query) {
return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user return preg_replace('~^([A-Z =]+) DEFINER=`' . preg_replace('~@(.*)~', '`@`(%|\\1)', logged_user()) . '`~', '\\1', $query); //! proper escaping of user
} }

View File

@ -69,7 +69,7 @@ function remove_slashes($process, $filter = false) {
*/ */
function bracket_escape($idf, $back = false) { function bracket_escape($idf, $back = false) {
// escape brackets inside name="x[]" // escape brackets inside name="x[]"
static $trans = array(':' => ':1', ']' => ':2', '[' => ':3'); static $trans = array(':' => ':1', ']' => ':2', '[' => ':3', '"' => ':4');
return strtr($idf, ($back ? array_flip($trans) : $trans)); return strtr($idf, ($back ? array_flip($trans) : $trans));
} }
@ -112,11 +112,13 @@ function nl_br($string) {
* @param string * @param string
* @param string * @param string
* @param string * @param string
* @param string
* @return string * @return string
*/ */
function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "") { function checkbox($name, $value, $checked, $label = "", $onclick = "", $class = "", $labelled_by = "") {
$return = "<input type='checkbox' name='$name' value='" . h($value) . "'" $return = "<input type='checkbox' name='$name' value='" . h($value) . "'"
. ($checked ? " checked" : "") . ($checked ? " checked" : "")
. ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
. ($onclick ? ' onclick="' . h($onclick) . '"' : '') . ($onclick ? ' onclick="' . h($onclick) . '"' : '')
. ">" . ">"
; ;
@ -152,11 +154,15 @@ function optionlist($options, $selected = null, $use_keys = false) {
* @param array * @param array
* @param string * @param string
* @param string true for no onchange, false for radio * @param string true for no onchange, false for radio
* @param string
* @return string * @return string
*/ */
function html_select($name, $options, $value = "", $onchange = true) { function html_select($name, $options, $value = "", $onchange = true, $labelled_by = "") {
if ($onchange) { if ($onchange) {
return "<select name='" . h($name) . "'" . (is_string($onchange) ? ' onchange="' . h($onchange) . '"' : "") . ">" . optionlist($options, $value) . "</select>"; return "<select name='" . h($name) . "'"
. (is_string($onchange) ? ' onchange="' . h($onchange) . '"' : "")
. ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
. ">" . optionlist($options, $value) . "</select>";
} }
$return = ""; $return = "";
foreach ($options as $key => $val) { foreach ($options as $key => $val) {
@ -237,7 +243,7 @@ function json_row($key, $val = null) {
echo "{"; echo "{";
} }
if ($key != "") { if ($key != "") {
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'undefined'); echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'null');
$first = false; $first = false;
} else { } else {
echo "\n}\n"; echo "\n}\n";
@ -406,10 +412,10 @@ function where($where, $fields = array()) {
$key = bracket_escape($key, 1); // 1 - back $key = bracket_escape($key, 1); // 1 - back
$column = escape_key($key); $column = escape_key($key);
$return[] = $column $return[] = $column
. (($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val)) || $jush == "mssql" . ($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val) ? " LIKE " . q(addcslashes($val, "%_\\"))
? " LIKE " . q(addcslashes($val, "%_\\")) : ($jush == "mssql" ? " LIKE " . q(preg_replace('~[_%[]~', '[\0]', $val))
: " = " . unconvert_field($fields[$key], q($val)) : " = " . unconvert_field($fields[$key], q($val))
) // LIKE because of floats but slow with ints, in MS SQL because of text )) // LIKE because of floats but slow with ints, in MS SQL because of text
; //! enum and set ; //! 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 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"; $return[] = "$column = " . q($val) . " COLLATE " . charset($connection) . "_bin";
@ -471,18 +477,12 @@ function convert_fields($columns, $fields, $select = array()) {
*/ */
function cookie($name, $value, $lifetime = 2592000) { // 2592000 - 30 days function cookie($name, $value, $lifetime = 2592000) { // 2592000 - 30 days
global $HTTPS; global $HTTPS;
$params = array( return header("Set-Cookie: $name=" . urlencode($value)
$name, . ($lifetime ? "; expires=" . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT" : "")
(preg_match("~\n~", $value) ? "" : $value), // HTTP Response Splitting protection in PHP < 5.1.2 . "; path=" . preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])
($lifetime ? time() + $lifetime : 0), . ($HTTPS ? "; secure" : "")
preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), . "; HttpOnly; SameSite=lax",
"", false);
$HTTPS
);
if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
$params[] = true; // HttpOnly
}
return call_user_func_array('setcookie', $params);
} }
/** Restart stopped session /** Restart stopped session
@ -744,7 +744,7 @@ function is_utf8($val) {
* @return string escaped string with appended ... * @return string escaped string with appended ...
*/ */
function shorten_utf8($string, $length = 80, $suffix = "") { function shorten_utf8($string, $length = 80, $suffix = "") {
if (!preg_match("(^(" . repeat_pattern("[\t\r\n -\x{FFFF}]", $length) . ")($)?)u", $string, $match)) { // ~s causes trash in $match[2] under some PHP versions, (.|\n) is slow if (!preg_match("(^(" . repeat_pattern("[\t\r\n -\x{10FFFF}]", $length) . ")($)?)u", $string, $match)) { // ~s causes trash in $match[2] under some PHP versions, (.|\n) is slow
preg_match("(^(" . repeat_pattern("[\t\r\n -~]", $length) . ")($)?)", $string, $match); preg_match("(^(" . repeat_pattern("[\t\r\n -~]", $length) . ")($)?)", $string, $match);
} }
return h($match[1]) . $suffix . (isset($match[2]) ? "" : "<i>...</i>"); return h($match[1]) . $suffix . (isset($match[2]) ? "" : "<i>...</i>");
@ -884,6 +884,9 @@ function input($field, $value, $function) {
$input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table $input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table
if ($input != "") { if ($input != "") {
echo $input; echo $input;
} elseif (preg_match('~bool~', $field["type"])) {
echo "<input type='hidden'$attrs value='0'>" .
"<input type='checkbox'" . (in_array(strtolower($value), array('1', 't', 'true', 'y', 'yes', 'on')) ? " checked='checked'" : "") . "$attrs value='1'>";
} elseif ($field["type"] == "set") { //! 64 bits } elseif ($field["type"] == "set") { //! 64 bits
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches); preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
foreach ($matches[1] as $i => $val) { foreach ($matches[1] as $i => $val) {
@ -901,7 +904,7 @@ function input($field, $value, $function) {
$attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height $attrs .= " cols='30' rows='$rows'" . ($rows == 1 ? " style='height: 1.2em;'" : ""); // 1.2em - line-height
} }
echo "<textarea$attrs>" . h($value) . '</textarea>'; echo "<textarea$attrs>" . h($value) . '</textarea>';
} elseif ($function == "json") { } elseif ($function == "json" || preg_match('~^jsonb?$~', $field["type"])) {
echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>'; echo "<textarea$attrs cols='50' rows='12' class='jush-js'>" . h($value) . '</textarea>';
} else { } else {
// int(3) is only a display hint // int(3) is only a display hint
@ -911,8 +914,8 @@ function input($field, $value, $function) {
} }
// type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator // type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
echo "<input" echo "<input"
. ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) ? " type='number'" : "") . ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
. " value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "") . " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
. (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "") . (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
. "$attrs>" . "$attrs>"
; ;
@ -1135,7 +1138,7 @@ function select_value($val, $link, $field, $text_length) {
$link = "mailto:$val"; $link = "mailto:$val";
} }
if ($protocol = is_url($val)) { if ($protocol = is_url($val)) {
$link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009 $link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit|Firefox~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009, Firefox since version 38
? $val // HTTP links from HTTPS pages don't receive Referer automatically ? $val // HTTP links from HTTPS pages don't receive Referer automatically
: "https://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer : "https://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer
); );
@ -1181,7 +1184,7 @@ function is_url($string) {
* @return bool * @return bool
*/ */
function is_shortable($field) { function is_shortable($field) {
return preg_match('~char|text|lob|geometry|point|linestring|polygon|string~', $field["type"]); return preg_match('~char|text|lob|geometry|point|linestring|polygon|string|bytea~', $field["type"]);
} }
/** Get query to compute number of found rows /** Get query to compute number of found rows
@ -1209,7 +1212,7 @@ function slow_query($query) {
$db = $adminer->database(); $db = $adminer->database();
$timeout = $adminer->queryTimeout(); $timeout = $adminer->queryTimeout();
if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) { if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
$kill = $connection2->result("SELECT CONNECTION_ID()"); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL $kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
?> ?>
<script type="text/javascript"> <script type="text/javascript">
var timeout = setTimeout(function () { var timeout = setTimeout(function () {

View File

@ -30,7 +30,7 @@ $langs = array(
'pt' => 'Português', // André Dias 'pt' => 'Português', // André Dias
'pt-br' => 'Português (Brazil)', // Gian Live - gian@live.com, Davi Alexandre davi@davialexandre.com.br, RobertoPC - http://www.robertopc.com.br 'pt-br' => 'Português (Brazil)', // Gian Live - gian@live.com, Davi Alexandre davi@davialexandre.com.br, RobertoPC - http://www.robertopc.com.br
'ro' => 'Limba Română', // .nick .messing - dot.nick.dot.messing@gmail.com 'ro' => 'Limba Română', // .nick .messing - dot.nick.dot.messing@gmail.com
'ru' => 'Русский язык', // Maksim Izmaylov 'ru' => 'Русский', // Maksim Izmaylov; Andre Polykanine - https://github.com/Oire/
'sk' => 'Slovenčina', // Ivan Suchy - http://www.ivansuchy.com, Juraj Krivda - http://www.jstudio.cz 'sk' => 'Slovenčina', // Ivan Suchy - http://www.ivansuchy.com, Juraj Krivda - http://www.jstudio.cz
'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com 'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com
'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com 'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com

View File

@ -16,10 +16,10 @@ if (extension_loaded('pdo')) {
try { try {
parent::__construct($dsn, $username, $password); parent::__construct($dsn, $username, $password);
} catch (Exception $ex) { } catch (Exception $ex) {
auth_error($ex->getMessage()); auth_error(h($ex->getMessage()));
} }
$this->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS $this->setAttribute(13, array('Min_PDOStatement')); // 13 - PDO::ATTR_STATEMENT_CLASS
$this->server_info = $this->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION $this->server_info = @$this->getAttribute(4); // 4 - PDO::ATTR_SERVER_VERSION
} }
/*abstract function select_db($database);*/ /*abstract function select_db($database);*/

View File

@ -0,0 +1,2 @@
<?php
$VERSION = "4.3.1";

View File

@ -1,12 +1,14 @@
<?php <?php
/** Adminer - Compact database management /** Adminer - Compact database management
* @link https://www.adminer.org/ * @link https://www.adminer.org/
* @author Jakub Vrana, http://www.vrana.cz/ * @author Jakub Vrana, https://www.vrana.cz/
* @copyright 2007 Jakub Vrana * @copyright 2007 Jakub Vrana
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other) * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/ */
/* devilbox inject */ require '../../../../config.php'; error_reporting(6135);
include "./include/bootstrap.inc.php"; include "./include/bootstrap.inc.php";
include "./include/tmpfile.inc.php"; include "./include/tmpfile.inc.php";
@ -65,6 +67,8 @@ if (isset($_GET["download"])) {
include "./user.inc.php"; include "./user.inc.php";
} elseif (isset($_GET["processlist"])) { } elseif (isset($_GET["processlist"])) {
include "./processlist.inc.php"; include "./processlist.inc.php";
} elseif (isset($_GET["replication"])) {
include "./replication.inc.php";
} elseif (isset($_GET["select"])) { } elseif (isset($_GET["select"])) {
include "./select.inc.php"; include "./select.inc.php";
} elseif (isset($_GET["variables"])) { } elseif (isset($_GET["variables"])) {

View File

@ -5,6 +5,9 @@ $table_status = table_status($TABLE, true);
if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.6 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) { if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.6 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
$index_types[] = "FULLTEXT"; $index_types[] = "FULLTEXT";
} }
if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.7 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
$index_types[] = "SPATIAL";
}
$indexes = indexes($TABLE); $indexes = indexes($TABLE);
$primary = array(); $primary = array();
if ($jush == "mongo") { // doesn't support primary key if ($jush == "mongo") { // doesn't support primary key
@ -93,9 +96,9 @@ if (!$row) {
<form action="" method="post"> <form action="" method="post">
<table cellspacing="0" class="nowrap"> <table cellspacing="0" class="nowrap">
<thead><tr> <thead><tr>
<th><?php echo lang('Index Type'); ?> <th id="label-type"><?php echo lang('Index Type'); ?>
<th><input type="submit" style="left: -1000px; position: absolute;"><?php echo lang('Column (length)'); ?> <th><input type="submit" class="wayoff"><?php echo lang('Column (length)'); ?>
<th><?php echo lang('Name'); ?> <th id="label-name"><?php echo lang('Name'); ?>
<th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp; <th><noscript><input type='image' class='icon' name='add[0]' src='../adminer/static/plus.gif' alt='+' title='<?php echo lang('Add next'); ?>'></noscript>&nbsp;
</thead> </thead>
<?php <?php
@ -110,24 +113,24 @@ if ($primary) {
$j = 1; $j = 1;
foreach ($row["indexes"] as $index) { foreach ($row["indexes"] as $index) {
if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) { if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) {
echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow(this);" : 1)); echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow(this);" : 1), "label-type");
echo "<td>"; echo "<td>";
ksort($index["columns"]); ksort($index["columns"]);
$i = 1; $i = 1;
foreach ($index["columns"] as $key => $column) { foreach ($index["columns"] as $key => $column) {
echo "<span>" . select_input( echo "<span>" . select_input(
" name='indexes[$j][columns][$i]' onchange=\"" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . "(this, '" . h(js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_")) . "');\"", " name='indexes[$j][columns][$i]' onchange=\"" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . "(this, '" . h(js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_")) . "');\" title='" . lang('Column') . "'",
($fields ? array_combine($fields, $fields) : $fields), ($fields ? array_combine($fields, $fields) : $fields),
$column $column
); );
echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "'>" : ""); echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : ""); echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
echo " </span>"; echo " </span>";
$i++; $i++;
} }
echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off'>\n"; echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off' aria-labelledby='label-name'>\n";
echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'indexes\$1[type]');\">\n"; echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick=\"return !editingRemoveRow(this, 'indexes\$1[type]');\">\n";
} }
$j++; $j++;

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'كلمة المرور', 'Password' => 'كلمة المرور',
'Select database' => 'اختر قاعدة البيانات', 'Select database' => 'اختر قاعدة البيانات',
'Invalid database.' => 'قاعدة البيانات غير صالحة.', 'Invalid database.' => 'قاعدة البيانات غير صالحة.',
'Create new database' => 'أنشئ فاعدة بيانات جديدة',
'Table has been dropped.' => 'تم حذف الجدول.', 'Table has been dropped.' => 'تم حذف الجدول.',
'Table has been altered.' => 'تم تعديل الجدول.', 'Table has been altered.' => 'تم تعديل الجدول.',
'Table has been created.' => 'تم إنشاء الجدول.', 'Table has been created.' => 'تم إنشاء الجدول.',

View File

@ -82,7 +82,6 @@ $translations = array(
'Use' => 'Избор', 'Use' => 'Избор',
'Select database' => 'Избор на база данни', 'Select database' => 'Избор на база данни',
'Invalid database.' => 'Невалидна база данни.', 'Invalid database.' => 'Невалидна база данни.',
'Create new database' => 'Нова база данни',
'Database has been dropped.' => 'Базата данни беше премахната.', 'Database has been dropped.' => 'Базата данни беше премахната.',
'Databases have been dropped.' => 'Базите данни бяха премехнати.', 'Databases have been dropped.' => 'Базите данни бяха премехнати.',
'Database has been created.' => 'Базата данни беше създадена.', 'Database has been created.' => 'Базата данни беше създадена.',
@ -182,13 +181,12 @@ $translations = array(
'Values' => 'Стойности', 'Values' => 'Стойности',
'View' => 'Изглед', 'View' => 'Изглед',
'Materialized View' => 'Запаметен изглед', 'Materialized view' => 'Запаметен изглед',
'View has been dropped.' => 'Изгледа беше премахнат.', 'View has been dropped.' => 'Изгледа беше премахнат.',
'View has been altered.' => 'Изгледа беше променен.', 'View has been altered.' => 'Изгледа беше променен.',
'View has been created.' => 'Изгледа беше създаден.', 'View has been created.' => 'Изгледа беше създаден.',
'Alter view' => 'Промяна на изглед', 'Alter view' => 'Промяна на изглед',
'Create view' => 'Създаване на изглед', 'Create view' => 'Създаване на изглед',
'Create materialized view' => 'Създаване на запаметен изглед',
'Indexes' => 'Индекси', 'Indexes' => 'Индекси',
'Indexes have been altered.' => 'Индексите бяха променени.', 'Indexes have been altered.' => 'Индексите бяха променени.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'পাসওয়ার্ড', 'Password' => 'পাসওয়ার্ড',
'Select database' => 'ডাটাবেজ নির্বাচন করো', 'Select database' => 'ডাটাবেজ নির্বাচন করো',
'Invalid database.' => 'ভুল ডাটাবেজ।', 'Invalid database.' => 'ভুল ডাটাবেজ।',
'Create new database' => 'নতুন ডাটাবেজ তৈরী করো',
'Table has been dropped.' => 'টেবিল মুছে ফেলা হয়েছে।', 'Table has been dropped.' => 'টেবিল মুছে ফেলা হয়েছে।',
'Table has been altered.' => 'টেবিল সম্পাদনা করা হয়েছে।', 'Table has been altered.' => 'টেবিল সম্পাদনা করা হয়েছে।',
'Table has been created.' => 'টেবিল তৈরী করা হয়েছে।', 'Table has been created.' => 'টেবিল তৈরী করা হয়েছে।',

View File

@ -77,7 +77,6 @@ $translations = array(
'Use' => 'Koristi', 'Use' => 'Koristi',
'Select database' => 'Izaberite bazu', 'Select database' => 'Izaberite bazu',
'Invalid database.' => 'Neispravna baza podataka.', 'Invalid database.' => 'Neispravna baza podataka.',
'Create new database' => 'Napravi novu bazu podataka',
'Database has been dropped.' => 'Baza podataka je izbrisana.', 'Database has been dropped.' => 'Baza podataka je izbrisana.',
'Databases have been dropped.' => 'Baze podataka su izbrisane.', 'Databases have been dropped.' => 'Baze podataka su izbrisane.',
'Database has been created.' => 'Baza podataka je spašena.', 'Database has been created.' => 'Baza podataka je spašena.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Contrasenya', 'Password' => 'Contrasenya',
'Select database' => 'Selecciona base de dades', 'Select database' => 'Selecciona base de dades',
'Invalid database.' => 'Base de dades invàlida.', 'Invalid database.' => 'Base de dades invàlida.',
'Create new database' => 'Crea una nova base de dades',
'Table has been dropped.' => 'S\'ha suprimit la taula.', 'Table has been dropped.' => 'S\'ha suprimit la taula.',
'Table has been altered.' => 'S\'ha modificat la taula.', 'Table has been altered.' => 'S\'ha modificat la taula.',
'Table has been created.' => 'S\'ha creat la taula.', 'Table has been created.' => 'S\'ha creat la taula.',

View File

@ -11,7 +11,7 @@ $translations = array(
'Logged as: %s' => 'Přihlášen jako: %s', 'Logged as: %s' => 'Přihlášen jako: %s',
'Logout successful.' => 'Odhlášení proběhlo v pořádku.', 'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
'Invalid credentials.' => 'Neplatné přihlašovací údaje.', 'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
'Implement %s method to use SQLite.' => 'Pro přihlášení k SQLite implementujte metodu %s.', '<a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to use SQLite.' => 'Pro přihlášení k SQLite <a href="https://www.adminer.org/cs/extension/" target="_blank">implementujte</a> metodu %s.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minutu.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minuty.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minut.'), 'Too many unsuccessful logins, try again in %d minute(s).' => array('Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minutu.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minuty.', 'Příliš mnoho pokusů o přihlášení, zkuste to znovu za %d minut.'),
'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Platnost hlavního hesla vypršela. <a href="https://www.adminer.org/cs/extension/" target="_blank">Implementujte</a> metodu %s, aby platilo stále.', 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Platnost hlavního hesla vypršela. <a href="https://www.adminer.org/cs/extension/" target="_blank">Implementujte</a> metodu %s, aby platilo stále.',
'Language' => 'Jazyk', 'Language' => 'Jazyk',
@ -45,6 +45,10 @@ $translations = array(
'Variables' => 'Proměnné', 'Variables' => 'Proměnné',
'Status' => 'Stav', 'Status' => 'Stav',
'Replication' => 'Replikace',
'Master status' => 'Master status',
'Slave status' => 'Slave status',
'SQL command' => 'SQL příkaz', 'SQL command' => 'SQL příkaz',
'%d query(s) executed OK.' => array('%d příkaz proběhl v pořádku.', '%d příkazy proběhly v pořádku.', '%d příkazů proběhlo v pořádku.'), '%d query(s) executed OK.' => array('%d příkaz proběhl v pořádku.', '%d příkazy proběhly v pořádku.', '%d příkazů proběhlo v pořádku.'),
'Query executed OK, %d row(s) affected.' => array('Příkaz proběhl v pořádku, byl změněn %d záznam.', 'Příkaz proběhl v pořádku, byly změněny %d záznamy.', 'Příkaz proběhl v pořádku, bylo změněno %d záznamů.'), 'Query executed OK, %d row(s) affected.' => array('Příkaz proběhl v pořádku, byl změněn %d záznam.', 'Příkaz proběhl v pořádku, byly změněny %d záznamy.', 'Příkaz proběhl v pořádku, bylo změněno %d záznamů.'),
@ -84,7 +88,6 @@ $translations = array(
'Use' => 'Vybrat', 'Use' => 'Vybrat',
'Select database' => 'Vybrat databázi', 'Select database' => 'Vybrat databázi',
'Invalid database.' => 'Nesprávná databáze.', 'Invalid database.' => 'Nesprávná databáze.',
'Create new database' => 'Vytvořit novou databázi',
'Database has been dropped.' => 'Databáze byla odstraněna.', 'Database has been dropped.' => 'Databáze byla odstraněna.',
'Databases have been dropped.' => 'Databáze byly odstraněny.', 'Databases have been dropped.' => 'Databáze byly odstraněny.',
'Database has been created.' => 'Databáze byla vytvořena.', 'Database has been created.' => 'Databáze byla vytvořena.',
@ -184,13 +187,12 @@ $translations = array(
'Values' => 'Hodnoty', 'Values' => 'Hodnoty',
'View' => 'Pohled', 'View' => 'Pohled',
'Materialized View' => 'Materializovaný pohled', 'Materialized view' => 'Materializovaný pohled',
'View has been dropped.' => 'Pohled byl odstraněn.', 'View has been dropped.' => 'Pohled byl odstraněn.',
'View has been altered.' => 'Pohled byl změněn.', 'View has been altered.' => 'Pohled byl změněn.',
'View has been created.' => 'Pohled byl vytvořen.', 'View has been created.' => 'Pohled byl vytvořen.',
'Alter view' => 'Pozměnit pohled', 'Alter view' => 'Pozměnit pohled',
'Create view' => 'Vytvořit pohled', 'Create view' => 'Vytvořit pohled',
'Create materialized view' => 'Vytvořit materializovaný pohled',
'Indexes' => 'Indexy', 'Indexes' => 'Indexy',
'Indexes have been altered.' => 'Indexy byly změněny.', 'Indexes have been altered.' => 'Indexy byly změněny.',
@ -337,4 +339,8 @@ $translations = array(
'Type has been dropped.' => 'Typ byl odstraněn.', 'Type has been dropped.' => 'Typ byl odstraněn.',
'Type has been created.' => 'Typ byl vytvořen.', 'Type has been created.' => 'Typ byl vytvořen.',
'Alter type' => 'Pozměnit typ', 'Alter type' => 'Pozměnit typ',
'Replication' => null,
'Master status' => null,
'Slave status' => null,
); );

View File

@ -68,7 +68,6 @@ $translations = array(
'Use' => 'Brug', 'Use' => 'Brug',
'Select database' => 'Vælg database', 'Select database' => 'Vælg database',
'Invalid database.' => 'Ugyldig database.', 'Invalid database.' => 'Ugyldig database.',
'Create new database' => 'Opret ny database',
'Database has been dropped.' => 'Databasen er blevet slettet.', 'Database has been dropped.' => 'Databasen er blevet slettet.',
'Databases have been dropped.' => 'Databasene er blevet slettet.', 'Databases have been dropped.' => 'Databasene er blevet slettet.',
'Database has been created.' => 'Databasen er oprettet.', 'Database has been created.' => 'Databasen er oprettet.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Passwort', 'Password' => 'Passwort',
'Select database' => 'Datenbank auswählen', 'Select database' => 'Datenbank auswählen',
'Invalid database.' => 'Datenbank ungültig.', 'Invalid database.' => 'Datenbank ungültig.',
'Create new database' => 'Datenbank erstellen',
'Table has been dropped.' => 'Tabelle wurde entfernt.', 'Table has been dropped.' => 'Tabelle wurde entfernt.',
'Table has been altered.' => 'Tabelle wurde geändert.', 'Table has been altered.' => 'Tabelle wurde geändert.',
'Table has been created.' => 'Tabelle wurde erstellt.', 'Table has been created.' => 'Tabelle wurde erstellt.',

View File

@ -83,7 +83,6 @@ $translations = array(
'Use' => 'χρήση', 'Use' => 'χρήση',
'Select database' => 'Επιλέξτε Β.Δ.', 'Select database' => 'Επιλέξτε Β.Δ.',
'Invalid database.' => 'Άκυρη Β.Δ.', 'Invalid database.' => 'Άκυρη Β.Δ.',
'Create new database' => 'Δημιουργία νέας Β.Δ.',
'Database has been dropped.' => 'Η Β.Δ. διαγράφηκε.', 'Database has been dropped.' => 'Η Β.Δ. διαγράφηκε.',
'Databases have been dropped.' => 'Οι Β.Δ. διαγράφηκαν.', 'Databases have been dropped.' => 'Οι Β.Δ. διαγράφηκαν.',
'Database has been created.' => 'Η Β.Δ. δημιουργήθηκε.', 'Database has been created.' => 'Η Β.Δ. δημιουργήθηκε.',
@ -183,13 +182,12 @@ $translations = array(
'Values' => 'Τιμές', 'Values' => 'Τιμές',
'View' => 'Προβολή', 'View' => 'Προβολή',
'Materialized View' => 'Υλοποιημένη Προβολή', 'Materialized view' => 'Υλοποιημένη προβολή',
'View has been dropped.' => 'Η προβολή διαγράφηκε.', 'View has been dropped.' => 'Η προβολή διαγράφηκε.',
'View has been altered.' => 'Η προβολή τροποποιήθηκε.', 'View has been altered.' => 'Η προβολή τροποποιήθηκε.',
'View has been created.' => 'Η προβολή δημιουργήθηκε.', 'View has been created.' => 'Η προβολή δημιουργήθηκε.',
'Alter view' => 'Τροποποίηση προβολής', 'Alter view' => 'Τροποποίηση προβολής',
'Create view' => 'Δημιουργία προβολής', 'Create view' => 'Δημιουργία προβολής',
'Create materialized view' => 'Δημιουργία Υλοποιημένης προβολής',
'Indexes' => 'Δείκτες', 'Indexes' => 'Δείκτες',
'Indexes have been altered.' => 'Οι δείκτες τροποποιήθηκαν.', 'Indexes have been altered.' => 'Οι δείκτες τροποποιήθηκαν.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Contraseña', 'Password' => 'Contraseña',
'Select database' => 'Seleccionar Base de datos', 'Select database' => 'Seleccionar Base de datos',
'Invalid database.' => 'Base de datos incorrecta.', 'Invalid database.' => 'Base de datos incorrecta.',
'Create new database' => 'Crear nueva base de datos',
'Table has been dropped.' => 'Tabla eliminada.', 'Table has been dropped.' => 'Tabla eliminada.',
'Table has been altered.' => 'Tabla modificada.', 'Table has been altered.' => 'Tabla modificada.',
'Table has been created.' => 'Tabla creada.', 'Table has been created.' => 'Tabla creada.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Parool', 'Password' => 'Parool',
'Select database' => 'Vali andmebaas', 'Select database' => 'Vali andmebaas',
'Invalid database.' => 'Tundmatu andmebaas.', 'Invalid database.' => 'Tundmatu andmebaas.',
'Create new database' => 'Loo uus andmebaas',
'Table has been dropped.' => 'Tabel on edukalt kustutatud.', 'Table has been dropped.' => 'Tabel on edukalt kustutatud.',
'Table has been altered.' => 'Tabeli andmed on edukalt muudetud.', 'Table has been altered.' => 'Tabeli andmed on edukalt muudetud.',
'Table has been created.' => 'Tabel on edukalt loodud.', 'Table has been created.' => 'Tabel on edukalt loodud.',

View File

@ -81,7 +81,6 @@ $translations = array(
'Use' => 'استفاده', 'Use' => 'استفاده',
'Select database' => 'انتخاب پایگاه داده', 'Select database' => 'انتخاب پایگاه داده',
'Invalid database.' => 'پایگاه داده نامعتبر.', 'Invalid database.' => 'پایگاه داده نامعتبر.',
'Create new database' => 'ایجاد پایگاه داده جدید',
'Database has been dropped.' => 'پایگاه داده حذف شد.', 'Database has been dropped.' => 'پایگاه داده حذف شد.',
'Databases have been dropped.' => 'پایگاه های داده حذف شدند.', 'Databases have been dropped.' => 'پایگاه های داده حذف شدند.',
'Database has been created.' => 'پایگاه داده ایجاد شد.', 'Database has been created.' => 'پایگاه داده ایجاد شد.',
@ -181,13 +180,12 @@ $translations = array(
'Values' => 'مقادیر', 'Values' => 'مقادیر',
'View' => 'نمایش', 'View' => 'نمایش',
'Materialized View' => 'نمایه مادی', 'Materialized view' => 'نمایه مادی',
'View has been dropped.' => 'نمایش حذف شد.', 'View has been dropped.' => 'نمایش حذف شد.',
'View has been altered.' => 'نمایش ویرایش شد.', 'View has been altered.' => 'نمایش ویرایش شد.',
'View has been created.' => 'نمایش ایجاد شد.', 'View has been created.' => 'نمایش ایجاد شد.',
'Alter view' => 'حذف نمایش', 'Alter view' => 'حذف نمایش',
'Create view' => 'ایجاد نمایش', 'Create view' => 'ایجاد نمایش',
'Create materialized view' => 'ایجاد نمایه مادی',
'Indexes' => 'ایندکسها', 'Indexes' => 'ایندکسها',
'Indexes have been altered.' => 'ایندکسها ویرایش شدند.', 'Indexes have been altered.' => 'ایندکسها ویرایش شدند.',

View File

@ -83,7 +83,6 @@ $translations = array(
'Use' => 'Käytä', 'Use' => 'Käytä',
'Select database' => 'Valitse tietokanta', 'Select database' => 'Valitse tietokanta',
'Invalid database.' => 'Tietokanta ei kelpaa.', 'Invalid database.' => 'Tietokanta ei kelpaa.',
'Create new database' => 'Luo uusi tietokanta',
'Database has been dropped.' => 'Tietokanta on poistettu.', 'Database has been dropped.' => 'Tietokanta on poistettu.',
'Databases have been dropped.' => 'Tietokannat on poistettu.', 'Databases have been dropped.' => 'Tietokannat on poistettu.',
'Database has been created.' => 'Tietokanta on luotu.', 'Database has been created.' => 'Tietokanta on luotu.',
@ -183,13 +182,12 @@ $translations = array(
'Values' => 'Arvot', 'Values' => 'Arvot',
'View' => 'Näkymä', 'View' => 'Näkymä',
'Materialized View' => 'Materialisoitunut näkymä', 'Materialized view' => 'Materialisoitunut näkymä',
'View has been dropped.' => 'Näkymä on poistettu.', 'View has been dropped.' => 'Näkymä on poistettu.',
'View has been altered.' => 'Näkymää on muutettu.', 'View has been altered.' => 'Näkymää on muutettu.',
'View has been created.' => 'Näkymä on luotu.', 'View has been created.' => 'Näkymä on luotu.',
'Alter view' => 'Muuta näkymää', 'Alter view' => 'Muuta näkymää',
'Create view' => 'Luo näkymä', 'Create view' => 'Luo näkymä',
'Create materialized view' => 'Luo materialisoitunut näkymä',
'Indexes' => 'Indeksit', 'Indexes' => 'Indeksit',
'Indexes have been altered.' => 'Indeksejä on muutettu.', 'Indexes have been altered.' => 'Indeksejä on muutettu.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Mot de passe', 'Password' => 'Mot de passe',
'Select database' => 'Sélectionner la base de données', 'Select database' => 'Sélectionner la base de données',
'Invalid database.' => 'Base de données invalide.', 'Invalid database.' => 'Base de données invalide.',
'Create new database' => 'Créer une base de données',
'Table has been dropped.' => 'La table a été effacée.', 'Table has been dropped.' => 'La table a été effacée.',
'Table has been altered.' => 'La table a été modifiée.', 'Table has been altered.' => 'La table a été modifiée.',
'Table has been created.' => 'La table a été créée.', 'Table has been created.' => 'La table a été créée.',
@ -283,8 +282,7 @@ $translations = array(
'Saving' => 'Enregistrement', 'Saving' => 'Enregistrement',
'yes' => 'oui', 'yes' => 'oui',
'no' => 'non', 'no' => 'non',
'Materialized View' => 'Vue matérialisée', 'Materialized view' => 'Vue matérialisée',
'Create materialized view' => 'Créer une vue matérialisée',
'%d / ' => '%d / ', '%d / ' => '%d / ',
'Limit rows' => 'Limiter les lignes', 'Limit rows' => 'Limiter les lignes',
'Default value' => 'Valeur par défaut', 'Default value' => 'Valeur par défaut',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Contrasinal', 'Password' => 'Contrasinal',
'Select database' => 'Seleccionar Base de datos', 'Select database' => 'Seleccionar Base de datos',
'Invalid database.' => 'Base de datos incorrecta.', 'Invalid database.' => 'Base de datos incorrecta.',
'Create new database' => 'Crear nova base de datos',
'Table has been dropped.' => 'Eliminouse a táboa.', 'Table has been dropped.' => 'Eliminouse a táboa.',
'Table has been altered.' => 'Modificouse a táboa.', 'Table has been altered.' => 'Modificouse a táboa.',
'Table has been created.' => 'Creouse a táboa.', 'Table has been created.' => 'Creouse a táboa.',
@ -267,10 +266,9 @@ $translations = array(
'Edit all' => 'Editar todo', 'Edit all' => 'Editar todo',
'HH:MM:SS' => 'HH:MM:SS', 'HH:MM:SS' => 'HH:MM:SS',
'Tables have been optimized.' => 'Optimizáronse as táboas', 'Tables have been optimized.' => 'Optimizáronse as táboas',
'Materialized View' => 'Vista materializada', 'Materialized view' => 'Vista materializada',
'Vacuum' => 'Baleirar', 'Vacuum' => 'Baleirar',
'Selected' => 'Selección', 'Selected' => 'Selección',
'Create materialized view' => 'Crear vista materializada',
'File must be in UTF-8 encoding.' => 'O ficheiro ten que estar codificado con UTF-8', 'File must be in UTF-8 encoding.' => 'O ficheiro ten que estar codificado con UTF-8',
'Modify' => 'Modificar', 'Modify' => 'Modificar',
'Loading' => 'Cargando', 'Loading' => 'Cargando',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Jelszó', 'Password' => 'Jelszó',
'Select database' => 'Adatbázis kiválasztása', 'Select database' => 'Adatbázis kiválasztása',
'Invalid database.' => 'Érvénytelen adatbázis.', 'Invalid database.' => 'Érvénytelen adatbázis.',
'Create new database' => 'Új adatbázis',
'Table has been dropped.' => 'A tábla eldobva.', 'Table has been dropped.' => 'A tábla eldobva.',
'Table has been altered.' => 'A tábla módosult.', 'Table has been altered.' => 'A tábla módosult.',
'Table has been created.' => 'A tábla létrejött.', 'Table has been created.' => 'A tábla létrejött.',

View File

@ -10,11 +10,11 @@ $translations = array(
'Logout' => 'Keluar', 'Logout' => 'Keluar',
'Logged as: %s' => 'Masuk sebagai: %s', 'Logged as: %s' => 'Masuk sebagai: %s',
'Logout successful.' => 'Berhasil keluar.', 'Logout successful.' => 'Berhasil keluar.',
'Invalid credentials.' => 'Akses invalid.', 'Invalid credentials.' => 'Akses tidak sah.',
'Language' => 'Bahasa', 'Language' => 'Bahasa',
'Invalid CSRF token. Send the form again.' => 'Token CSRF invalid. Kirim ulang formulir.', 'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Kirim ulang formulir.',
'No extension' => 'Ekstensi tidak tersedia', 'No extension' => 'Ekstensi tidak ada',
'None of the supported PHP extensions (%s) are available.' => 'Ekstensi PHP yang didukung (%s) tidak tersedia.', 'None of the supported PHP extensions (%s) are available.' => 'Ekstensi PHP yang didukung (%s) tidak ada.',
'Session support must be enabled.' => 'Dukungan sesi harus aktif.', 'Session support must be enabled.' => 'Dukungan sesi harus aktif.',
'Session expired, please login again.' => 'Sesi habis, silakan masuk lagi.', 'Session expired, please login again.' => 'Sesi habis, silakan masuk lagi.',
'%s version: %s through PHP extension %s' => 'Versi %s: %s dengan ekstensi PHP %s', '%s version: %s through PHP extension %s' => 'Versi %s: %s dengan ekstensi PHP %s',
@ -44,26 +44,26 @@ $translations = array(
'SQL command' => 'Perintah SQL', 'SQL command' => 'Perintah SQL',
'%d query(s) executed OK.' => '%d kueri berhasil dijalankan.', '%d query(s) executed OK.' => '%d kueri berhasil dijalankan.',
'Query executed OK, %d row(s) affected.' => 'Kueri berhasil, %d baris terpengaruh.', 'Query executed OK, %d row(s) affected.' => 'Kueri berhasil, %d baris terpengaruh.',
'No commands to execute.' => 'Tiada perintah untuk dijalankan.', 'No commands to execute.' => 'Tidak ada perintah untuk dijalankan.',
'Error in query' => 'Kesalahan dalam kueri', 'Error in query' => 'Galat dalam kueri',
'Execute' => 'Jalankan', 'Execute' => 'Jalankan',
'Stop on error' => 'Hentikan pada kesalahan', 'Stop on error' => 'Hentikan jika galat',
'Show only errors' => 'Hanya tampilkan kesalahan', 'Show only errors' => 'Hanya tampilkan galat',
// sprintf() format for time of the command // sprintf() format for time of the command
'%.3f s' => '%.3f s', '%.3f s' => '%.3f s',
'History' => 'Riwayat', 'History' => 'Riwayat',
'Clear' => 'Bersihkan', 'Clear' => 'Bersihkan',
'Edit all' => 'Edit semua',
'Edit all' => 'Sunting semua',
'File upload' => 'Unggah berkas', 'File upload' => 'Unggah berkas',
'From server' => 'Dari server', 'From server' => 'Dari server',
'Webserver file %s' => 'Berkas server web %s', 'Webserver file %s' => 'Berkas server web %s',
'Run file' => 'Jalankan berkas', 'Run file' => 'Jalankan berkas',
'File does not exist.' => 'Berkas tidak ditemukan.', 'File does not exist.' => 'Berkas tidak ada.',
'File uploads are disabled.' => 'Pengunggahan berkas dimatikan.', 'File uploads are disabled.' => 'Pengunggahan berkas dimatikan.',
'Unable to upload a file.' => 'Tidak dapat mengunggah berkas.', 'Unable to upload a file.' => 'Tidak dapat mengunggah berkas.',
'Maximum allowed file size is %sB.' => 'Besar berkas yang diizinkan adalah %s bita.', 'Maximum allowed file size is %sB.' => 'Besar berkas yang diizinkan adalah %sB.',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kurangi data atau perbesar pengarah konfigurasi %s.', 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kurangi data atau perbesar direktif konfigurasi %s.',
'Export' => 'Ekspor', 'Export' => 'Ekspor',
'Output' => 'Hasil', 'Output' => 'Hasil',
@ -76,19 +76,18 @@ $translations = array(
'database' => 'basis data', 'database' => 'basis data',
'Use' => 'Gunakan', 'Use' => 'Gunakan',
'Select database' => 'Pilih basis data', 'Select database' => 'Pilih basis data',
'Invalid database.' => 'Basis data invalid.', 'Invalid database.' => 'Basis data tidak sah.',
'Create new database' => 'Buat basis data baru',
'Database has been dropped.' => 'Basis data berhasil dihapus.', 'Database has been dropped.' => 'Basis data berhasil dihapus.',
'Databases have been dropped.' => 'Basis data berhasil dihapus.', 'Databases have been dropped.' => 'Basis data berhasil dihapus.',
'Database has been created.' => 'Basis data berhasil dibuat.', 'Database has been created.' => 'Basis data berhasil dibuat.',
'Database has been renamed.' => 'Basis data berhasil diganti nama.', 'Database has been renamed.' => 'Basis data berhasil diganti namanya.',
'Database has been altered.' => 'Basis data berhasil diubah.', 'Database has been altered.' => 'Basis data berhasil diubah.',
'Alter database' => 'Ubah basis data', 'Alter database' => 'Ubah basis data',
'Create database' => 'Buat basis data', 'Create database' => 'Buat basis data',
'Database schema' => 'Skema basis data', 'Database schema' => 'Skema basis data',
// link to current database schema layout // link to current database schema layout
'Permanent link' => 'Tautan permanen', 'Permanent link' => 'Pranala permanen',
// thousands separator - must contain single byte // thousands separator - must contain single byte
',' => '.', ',' => '.',
@ -113,9 +112,9 @@ $translations = array(
'Tables have been copied.' => 'Tabel berhasil disalin.', 'Tables have been copied.' => 'Tabel berhasil disalin.',
'Routines' => 'Rutin', 'Routines' => 'Rutin',
'Routine has been called, %d row(s) affected.' => array('Rutin telah dipanggil, %d baris terpengaruh.', 'Rutin telah dipanggil, %d baris terpengaruh'), 'Routine has been called, %d row(s) affected.' => 'Rutin telah dipanggil, %d baris terpengaruh.',
'Call' => 'Panggilan', 'Call' => 'Panggilan',
'Parameter name' => 'Nama paramater', 'Parameter name' => 'Nama parameter',
'Create procedure' => 'Buat prosedur', 'Create procedure' => 'Buat prosedur',
'Create function' => 'Buat fungsi', 'Create function' => 'Buat fungsi',
'Routine has been dropped.' => 'Rutin berhasil dihapus.', 'Routine has been dropped.' => 'Rutin berhasil dihapus.',
@ -123,14 +122,14 @@ $translations = array(
'Routine has been created.' => 'Rutin berhasil dibuat.', 'Routine has been created.' => 'Rutin berhasil dibuat.',
'Alter function' => 'Ubah fungsi', 'Alter function' => 'Ubah fungsi',
'Alter procedure' => 'Ubah prosedur', 'Alter procedure' => 'Ubah prosedur',
'Return type' => 'Jenis balikan', 'Return type' => 'Jenis pengembalian',
'Events' => 'Peristiwa', 'Events' => 'Even',
'Event has been dropped.' => 'Peristiwa berhasil dihapus.', 'Event has been dropped.' => 'Even berhasil dihapus.',
'Event has been altered.' => 'Peristiwa berhasil diubah.', 'Event has been altered.' => 'Even berhasil diubah.',
'Event has been created.' => 'Peristiwa berhasil dibuat.', 'Event has been created.' => 'Even berhasil dibuat.',
'Alter event' => 'Ubah peristiwa', 'Alter event' => 'Ubah even',
'Create event' => 'Buat peristiwa', 'Create event' => 'Buat even',
'At given time' => 'Pada waktu tertentu', 'At given time' => 'Pada waktu tertentu',
'Every' => 'Setiap', 'Every' => 'Setiap',
'Schedule' => 'Jadwal', 'Schedule' => 'Jadwal',
@ -141,7 +140,7 @@ $translations = array(
'Tables' => 'Tabel', 'Tables' => 'Tabel',
'Tables and views' => 'Tabel dan tampilan', 'Tables and views' => 'Tabel dan tampilan',
'Table' => 'Tabel', 'Table' => 'Tabel',
'No tables.' => 'Tiada tabel.', 'No tables.' => 'Tidak ada tabel.',
'Alter table' => 'Ubah tabel', 'Alter table' => 'Ubah tabel',
'Create table' => 'Buat tabel', 'Create table' => 'Buat tabel',
'Table has been dropped.' => 'Tabel berhasil dihapus.', 'Table has been dropped.' => 'Tabel berhasil dihapus.',
@ -156,16 +155,16 @@ $translations = array(
'Column name' => 'Nama kolom', 'Column name' => 'Nama kolom',
'Type' => 'Jenis', 'Type' => 'Jenis',
'Length' => 'Panjang', 'Length' => 'Panjang',
'Auto Increment' => 'Kenaikan Otomatis', 'Auto Increment' => 'Inkrementasi Otomatis',
'Options' => 'Opsi', 'Options' => 'Opsi',
'Comment' => 'Komentar', 'Comment' => 'Komentar',
'Default values' => 'Nilai bawaan', 'Default values' => 'Nilai bawaan',
'Drop' => 'Hapus', 'Drop' => 'Hapus',
'Are you sure?' => 'Anda yakin', 'Are you sure?' => 'Anda yakin?',
'Move up' => 'Naik', 'Move up' => 'Naik',
'Move down' => 'Turun', 'Move down' => 'Turun',
'Remove' => 'Hapus', 'Remove' => 'Hapus',
'Maximum number of allowed fields exceeded. Please increase %s.' => 'Jumlah ruas maksimum yang diizinkan dilewati. Harap naikkan %s.', 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Sudah lebih dumlah ruas maksimum yang diizinkan. Harap naikkan %s.',
'Partition by' => 'Partisi menurut', 'Partition by' => 'Partisi menurut',
'Partitions' => 'Partisi', 'Partitions' => 'Partisi',
@ -202,15 +201,15 @@ $translations = array(
'ON UPDATE' => 'ON UPDATE', 'ON UPDATE' => 'ON UPDATE',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kolom sumber dan sasaran harus memiliki jenis data yang sama. Kolom sasaran harus memiliki indeks dan data rujukan harus ada.', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kolom sumber dan sasaran harus memiliki jenis data yang sama. Kolom sasaran harus memiliki indeks dan data rujukan harus ada.',
'Triggers' => 'Picu', 'Triggers' => 'Pemicu',
'Add trigger' => 'Tambah picu', 'Add trigger' => 'Tambah pemicu',
'Trigger has been dropped.' => 'Picu berhasil dihapus.', 'Trigger has been dropped.' => 'Pemicu berhasil dihapus.',
'Trigger has been altered.' => 'Picu berhasil diubah.', 'Trigger has been altered.' => 'Pemicu berhasil diubah.',
'Trigger has been created.' => 'Picu berhasil dibuat.', 'Trigger has been created.' => 'Pemicu berhasil dibuat.',
'Alter trigger' => 'Ubah picu', 'Alter trigger' => 'Ubah pemicu',
'Create trigger' => 'Buat picu', 'Create trigger' => 'Buat pemicu',
'Time' => 'Waktu', 'Time' => 'Waktu',
'Event' => 'Peristiwa', 'Event' => 'Even',
'Name' => 'Nama', 'Name' => 'Nama',
'select' => 'pilih', 'select' => 'pilih',
@ -221,14 +220,14 @@ $translations = array(
'Search' => 'Cari', 'Search' => 'Cari',
'anywhere' => 'di mana pun', 'anywhere' => 'di mana pun',
'Search data in tables' => 'Cari data dalam tabel', 'Search data in tables' => 'Cari data dalam tabel',
'Sort' => 'Urutan', 'Sort' => 'Urutkan',
'descending' => 'menurun', 'descending' => 'menurun',
'Limit' => 'Limit', 'Limit' => 'Batas',
'Text length' => 'Panjang teks', 'Text length' => 'Panjang teks',
'Action' => 'Tindakan', 'Action' => 'Tindakan',
'Full table scan' => 'Pindai tabel lengkap', 'Full table scan' => 'Pindai tabel lengkap',
'Unable to select the table' => 'Gagal memilih tabel', 'Unable to select the table' => 'Gagal memilih tabel',
'No rows.' => 'Tiada baris.', 'No rows.' => 'Tidak ada baris.',
'%d row(s)' => '%d baris', '%d row(s)' => '%d baris',
'Page' => 'Halaman', 'Page' => 'Halaman',
'last' => 'terakhir', 'last' => 'terakhir',
@ -239,7 +238,7 @@ $translations = array(
'%d row(s) have been imported.' => '%d baris berhasil diimpor.', '%d row(s) have been imported.' => '%d baris berhasil diimpor.',
// in-place editing in select // in-place editing in select
'Use edit link to modify this value.' => 'Gunakan tautan edit untuk mengubah nilai ini.', 'Use edit link to modify this value.' => 'Gunakan pranala suntingan untuk mengubah nilai ini.',
// %s can contain auto-increment value // %s can contain auto-increment value
'Item%s has been inserted.' => 'Entri%s berhasil disisipkan.', 'Item%s has been inserted.' => 'Entri%s berhasil disisipkan.',
@ -247,30 +246,30 @@ $translations = array(
'Item has been updated.' => 'Entri berhasil diperbarui.', 'Item has been updated.' => 'Entri berhasil diperbarui.',
'%d item(s) have been affected.' => '%d entri terpengaruh.', '%d item(s) have been affected.' => '%d entri terpengaruh.',
'New item' => 'Entri baru', 'New item' => 'Entri baru',
'original' => 'orisinal', 'original' => 'asli',
// label for value '' in enum data type // label for value '' in enum data type
'empty' => 'kosong', 'empty' => 'kosong',
'edit' => 'edit', 'edit' => 'sunting',
'Edit' => 'Edit', 'Edit' => 'Sunting',
'Insert' => 'Sisipkan', 'Insert' => 'Sisipkan',
'Save' => 'Simpan', 'Save' => 'Simpan',
'Save and continue edit' => 'Simpan dan terus mengedit', 'Save and continue edit' => 'Simpan dan lanjut menyunting',
'Save and insert next' => 'Simpan dan sisipkan yang lain', 'Save and insert next' => 'Simpan dan sisipkan berikutnya',
'Clone' => 'Gandakan', 'Clone' => 'Gandakan',
'Delete' => 'Hapus', 'Delete' => 'Hapus',
'E-mail' => 'Surel', 'E-mail' => 'Surel',
'From' => 'Dari', 'From' => 'Dari',
'Subject' => 'Subjek', 'Subject' => 'Judul',
'Attachments' => 'Lampiran', 'Attachments' => 'Lampiran',
'Send' => 'Kirim', 'Send' => 'Kirim',
'%d e-mail(s) have been sent.' => array('%d surel berhasil dikirim.', '%d surel berhasil dikirim'), '%d e-mail(s) have been sent.' => '%d surel berhasil dikirim.',
// data type descriptions // data type descriptions
'Numbers' => 'Angka', 'Numbers' => 'Angka',
'Date and time' => 'Tanggal dan waktu', 'Date and time' => 'Tanggal dan waktu',
'Strings' => 'String', 'Strings' => 'String',
'Binary' => 'Biner', 'Binary' => 'Binari',
'Lists' => 'Daftar', 'Lists' => 'Daftar',
'Network' => 'Jaringan', 'Network' => 'Jaringan',
'Geometry' => 'Geometri', 'Geometry' => 'Geometri',
@ -298,7 +297,7 @@ $translations = array(
'Schema has been created.' => 'Skema berhasil dibuat.', 'Schema has been created.' => 'Skema berhasil dibuat.',
'Schema has been altered.' => 'Skema berhasil diubah.', 'Schema has been altered.' => 'Skema berhasil diubah.',
'Schema' => 'Skema', 'Schema' => 'Skema',
'Invalid schema.' => 'Skema invalid.', 'Invalid schema.' => 'Skema tidak sah.',
// PostgreSQL sequences support // PostgreSQL sequences support
'Sequences' => 'Deret', 'Sequences' => 'Deret',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Password', 'Password' => 'Password',
'Select database' => 'Seleziona database', 'Select database' => 'Seleziona database',
'Invalid database.' => 'Database non valido.', 'Invalid database.' => 'Database non valido.',
'Create new database' => 'Crea nuovo database',
'Table has been dropped.' => 'Tabella eliminata.', 'Table has been dropped.' => 'Tabella eliminata.',
'Table has been altered.' => 'Tabella modificata.', 'Table has been altered.' => 'Tabella modificata.',
'Table has been created.' => 'Tabella creata.', 'Table has been created.' => 'Tabella creata.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'パスワード', 'Password' => 'パスワード',
'Select database' => 'データベースを選択してください', 'Select database' => 'データベースを選択してください',
'Invalid database.' => '不正なデータベース', 'Invalid database.' => '不正なデータベース',
'Create new database' => '新規にデータベースを作成',
'Table has been dropped.' => 'テーブルを削除しました', 'Table has been dropped.' => 'テーブルを削除しました',
'Table has been altered.' => 'テーブルを変更しました', 'Table has been altered.' => 'テーブルを変更しました',
'Table has been created.' => 'テーブルを作成しました', 'Table has been created.' => 'テーブルを作成しました',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => '비밀번호', 'Password' => '비밀번호',
'Select database' => '데이터베이스를 선택하십시오.', 'Select database' => '데이터베이스를 선택하십시오.',
'Invalid database.' => '잘못된 데이터베이스입니다.', 'Invalid database.' => '잘못된 데이터베이스입니다.',
'Create new database' => '새 데이터베이스 만들기',
'Table has been dropped.' => '테이블을 삭제했습니다.', 'Table has been dropped.' => '테이블을 삭제했습니다.',
'Table has been altered.' => '테이블을 변경했습니다.', 'Table has been altered.' => '테이블을 변경했습니다.',
'Table has been created.' => '테이블을 만들었습니다.', 'Table has been created.' => '테이블을 만들었습니다.',

View File

@ -77,7 +77,6 @@ $translations = array(
'Use' => 'Naudoti', 'Use' => 'Naudoti',
'Select database' => 'Pasirinkti duomenų bazę', 'Select database' => 'Pasirinkti duomenų bazę',
'Invalid database.' => 'Neteisinga duomenų bazė.', 'Invalid database.' => 'Neteisinga duomenų bazė.',
'Create new database' => 'Sukurti naują duomenų bazę',
'Database has been dropped.' => 'Duomenų bazė panaikinta.', 'Database has been dropped.' => 'Duomenų bazė panaikinta.',
'Databases have been dropped.' => 'Duomenų bazės panaikintos.', 'Databases have been dropped.' => 'Duomenų bazės panaikintos.',
'Database has been created.' => 'Duomenų bazė sukurta.', 'Database has been created.' => 'Duomenų bazė sukurta.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Wachtwoord', 'Password' => 'Wachtwoord',
'Select database' => 'Database selecteren', 'Select database' => 'Database selecteren',
'Invalid database.' => 'Ongeldige database.', 'Invalid database.' => 'Ongeldige database.',
'Create new database' => 'Nieuwe database',
'Table has been dropped.' => 'Tabel verwijderd.', 'Table has been dropped.' => 'Tabel verwijderd.',
'Table has been altered.' => 'Tabel aangepast.', 'Table has been altered.' => 'Tabel aangepast.',
'Table has been created.' => 'Tabel aangemaakt.', 'Table has been created.' => 'Tabel aangemaakt.',
@ -61,7 +60,7 @@ $translations = array(
'Action' => 'Acties', 'Action' => 'Acties',
'edit' => 'bewerk', 'edit' => 'bewerk',
'Page' => 'Pagina', 'Page' => 'Pagina',
'Query executed OK, %d row(s) affected.' => array('Query uitgevoerd, %d rij geraakt.', 'Query uitgevoerd, %d rijen geraakt.'), 'Query executed OK, %d row(s) affected.' => array('Query uitgevoerd, %d rij geraakt.', 'Query uitgevoerd, %d rijen beïnvloed.'),
'Error in query' => 'Fout in query', 'Error in query' => 'Fout in query',
'Execute' => 'Uitvoeren', 'Execute' => 'Uitvoeren',
'Table' => 'Tabel', 'Table' => 'Tabel',

View File

@ -68,7 +68,6 @@ $translations = array(
'Use' => 'Bruk', 'Use' => 'Bruk',
'Select database' => 'Velg database', 'Select database' => 'Velg database',
'Invalid database.' => 'Ugyldig database.', 'Invalid database.' => 'Ugyldig database.',
'Create new database' => 'Lag ny database',
'Database has been dropped.' => 'Databasen har blitt slettet.', 'Database has been dropped.' => 'Databasen har blitt slettet.',
'Databases have been dropped.' => 'Databasene har blitt slettet.', 'Databases have been dropped.' => 'Databasene har blitt slettet.',
'Database has been created.' => 'Databasen er opprettet.', 'Database has been created.' => 'Databasen er opprettet.',

View File

@ -82,7 +82,6 @@ $translations = array(
'Use' => 'Wybierz', 'Use' => 'Wybierz',
'Select database' => 'Wybierz bazę danych', 'Select database' => 'Wybierz bazę danych',
'Invalid database.' => 'Nie znaleziono bazy danych.', 'Invalid database.' => 'Nie znaleziono bazy danych.',
'Create new database' => 'Utwórz nową bazę danych',
'Database has been dropped.' => 'Baza danych została usunięta.', 'Database has been dropped.' => 'Baza danych została usunięta.',
'Databases have been dropped.' => 'Bazy danych zostały usunięte.', 'Databases have been dropped.' => 'Bazy danych zostały usunięte.',
'Database has been created.' => 'Baza danych została utworzona.', 'Database has been created.' => 'Baza danych została utworzona.',
@ -182,13 +181,12 @@ $translations = array(
'Values' => 'Wartości', 'Values' => 'Wartości',
'View' => 'Perspektywa', 'View' => 'Perspektywa',
'Materialized View' => 'Zmaterializowana perspektywa', 'Materialized view' => 'Zmaterializowana perspektywa',
'View has been dropped.' => 'Perspektywa została usunięta.', 'View has been dropped.' => 'Perspektywa została usunięta.',
'View has been altered.' => 'Perspektywa została zmieniona.', 'View has been altered.' => 'Perspektywa została zmieniona.',
'View has been created.' => 'Perspektywa została utworzona.', 'View has been created.' => 'Perspektywa została utworzona.',
'Alter view' => 'Zmień perspektywę', 'Alter view' => 'Zmień perspektywę',
'Create view' => 'Utwórz perspektywę', 'Create view' => 'Utwórz perspektywę',
'Create materialized view' => 'Utwórz zmaterializowaną perspektywę',
'Indexes' => 'Indeksy', 'Indexes' => 'Indeksy',
'Indexes have been altered.' => 'Indeksy zostały zmienione.', 'Indexes have been altered.' => 'Indeksy zostały zmienione.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Senha', 'Password' => 'Senha',
'Select database' => 'Selecionar Base de dados', 'Select database' => 'Selecionar Base de dados',
'Invalid database.' => 'Base de dados inválida.', 'Invalid database.' => 'Base de dados inválida.',
'Create new database' => 'Criar nova base de dados',
'Table has been dropped.' => 'A Tabela foi eliminada.', 'Table has been dropped.' => 'A Tabela foi eliminada.',
'Table has been altered.' => 'A Tabela foi alterada.', 'Table has been altered.' => 'A Tabela foi alterada.',
'Table has been created.' => 'A Tabela foi criada.', 'Table has been created.' => 'A Tabela foi criada.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Senha', 'Password' => 'Senha',
'Select database' => 'Selecionar Base de dados', 'Select database' => 'Selecionar Base de dados',
'Invalid database.' => 'Base de dados inválida.', 'Invalid database.' => 'Base de dados inválida.',
'Create new database' => 'Criar nova base de dados',
'Table has been dropped.' => 'Tabela eliminada.', 'Table has been dropped.' => 'Tabela eliminada.',
'Table has been altered.' => 'Tabela modificada.', 'Table has been altered.' => 'Tabela modificada.',
'Table has been created.' => 'Tabela criada.', 'Table has been created.' => 'Tabela criada.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Parola', 'Password' => 'Parola',
'Select database' => 'Alege baza de date', 'Select database' => 'Alege baza de date',
'Invalid database.' => 'Bază de deate invalidă.', 'Invalid database.' => 'Bază de deate invalidă.',
'Create new database' => 'Crează o bază de date nouă',
'Table has been dropped.' => 'Tabelul a fost șters.', 'Table has been dropped.' => 'Tabelul a fost șters.',
'Table has been altered.' => 'Tabelul a fost modificat.', 'Table has been altered.' => 'Tabelul a fost modificat.',
'Table has been created.' => 'Tabelul a fost creat.', 'Table has been created.' => 'Tabelul a fost creat.',

View File

@ -7,15 +7,14 @@ $translations = array(
'Username' => 'Имя пользователя', 'Username' => 'Имя пользователя',
'Password' => 'Пароль', 'Password' => 'Пароль',
'Select database' => 'Выбрать базу данных', 'Select database' => 'Выбрать базу данных',
'Invalid database.' => 'Плохая база данных.', 'Invalid database.' => 'Неверная база данных.',
'Create new database' => 'Создать новую базу данных',
'Table has been dropped.' => 'Таблица была удалена.', 'Table has been dropped.' => 'Таблица была удалена.',
'Table has been altered.' => 'Таблица была изменена.', 'Table has been altered.' => 'Таблица была изменена.',
'Table has been created.' => 'Таблица была создана.', 'Table has been created.' => 'Таблица была создана.',
'Alter table' => 'Изменить таблицу', 'Alter table' => 'Изменить таблицу',
'Create table' => 'Создать таблицу', 'Create table' => 'Создать таблицу',
'Table name' => 'Название таблицы', 'Table name' => 'Название таблицы',
'engine' => 'тип', 'engine' => 'Тип таблицы',
'collation' => 'режим сопоставления', 'collation' => 'режим сопоставления',
'Column name' => 'Название поля', 'Column name' => 'Название поля',
'Type' => 'Тип', 'Type' => 'Тип',
@ -30,7 +29,7 @@ $translations = array(
'Database has been altered.' => 'База данных была изменена.', 'Database has been altered.' => 'База данных была изменена.',
'Alter database' => 'Изменить базу данных', 'Alter database' => 'Изменить базу данных',
'Create database' => 'Создать базу данных', 'Create database' => 'Создать базу данных',
'SQL command' => 'SQL запрос', 'SQL command' => 'SQL-запрос',
'Logout' => 'Выйти', 'Logout' => 'Выйти',
'database' => 'база данных', 'database' => 'база данных',
'Use' => 'Выбрать', 'Use' => 'Выбрать',
@ -68,7 +67,7 @@ $translations = array(
'Triggers' => 'Триггеры', 'Triggers' => 'Триггеры',
'View' => 'Представление', 'View' => 'Представление',
'Unable to select the table' => 'Не удалось получить данные из таблицы', 'Unable to select the table' => 'Не удалось получить данные из таблицы',
'Invalid CSRF token. Send the form again.' => 'Недействительный CSRF токен. Отправите форму ещё раз.', 'Invalid CSRF token. Send the form again.' => 'Недействительный CSRF-токен. Отправите форму ещё раз.',
'Comment' => 'Комментарий', 'Comment' => 'Комментарий',
'Default values' => 'Значения по умолчанию', 'Default values' => 'Значения по умолчанию',
'%d byte(s)' => array('%d байт', '%d байта', '%d байтов'), '%d byte(s)' => array('%d байт', '%d байта', '%d байтов'),
@ -91,13 +90,13 @@ $translations = array(
'Change' => 'Изменить', 'Change' => 'Изменить',
'Source' => 'Источник', 'Source' => 'Источник',
'Target' => 'Цель', 'Target' => 'Цель',
'Add column' => 'Добавить колонку', 'Add column' => 'Добавить поле',
'Alter' => 'Изменить', 'Alter' => 'Изменить',
'Add foreign key' => 'Добавить внешний ключ', 'Add foreign key' => 'Добавить внешний ключ',
'ON DELETE' => 'При стирании', 'ON DELETE' => 'При стирании',
'ON UPDATE' => 'При обновлении', 'ON UPDATE' => 'При обновлении',
'Index Type' => 'Тип индекса', 'Index Type' => 'Тип индекса',
'Column (length)' => 'Колонка (длина)', 'Column (length)' => 'Поле (длина)',
'View has been dropped.' => 'Представление было удалено.', 'View has been dropped.' => 'Представление было удалено.',
'View has been altered.' => 'Представление было изменено.', 'View has been altered.' => 'Представление было изменено.',
'View has been created.' => 'Представление было создано.', 'View has been created.' => 'Представление было создано.',
@ -135,11 +134,11 @@ $translations = array(
'User has been altered.' => 'Пользователь был изменён.', 'User has been altered.' => 'Пользователь был изменён.',
'User has been created.' => 'Пользователь был создан.', 'User has been created.' => 'Пользователь был создан.',
'Hashed' => 'Хешировано', 'Hashed' => 'Хешировано',
'Column' => 'Колонка', 'Column' => 'поле',
'Routine' => 'Процедура', 'Routine' => 'Процедура',
'Grant' => 'Позволить', 'Grant' => 'Позволить',
'Revoke' => 'Запретить', 'Revoke' => 'Запретить',
'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Слишком большой объем POST-данных. Пошлите меньший объем данных или увеличьте параметр конфигурационной директивы %s.', 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Слишком большой объем POST-данных. Пошлите меньший объём данных или увеличьте параметр конфигурационной директивы %s.',
'Logged as: %s' => 'Вы вошли как: %s', 'Logged as: %s' => 'Вы вошли как: %s',
'Move up' => 'Переместить вверх', 'Move up' => 'Переместить вверх',
'Move down' => 'Переместить вниз', 'Move down' => 'Переместить вниз',
@ -182,7 +181,7 @@ $translations = array(
'Tables have been moved.' => 'Таблицы были перемещены.', 'Tables have been moved.' => 'Таблицы были перемещены.',
'Move to other database' => 'Переместить в другую базу данных', 'Move to other database' => 'Переместить в другую базу данных',
'Move' => 'Переместить', 'Move' => 'Переместить',
'Engine' => 'Тип', 'Engine' => 'Тип таблиц',
'Save and continue edit' => 'Сохранить и продолжить редактирование', 'Save and continue edit' => 'Сохранить и продолжить редактирование',
'original' => 'исходный', 'original' => 'исходный',
'%d item(s) have been affected.' => array('Была изменена %d запись.', 'Были изменены %d записи.', 'Было изменено %d записей.'), '%d item(s) have been affected.' => array('Была изменена %d запись.', 'Были изменены %d записи.', 'Было изменено %d записей.'),
@ -203,20 +202,20 @@ $translations = array(
'[yyyy]-mm-dd' => 'дд.мм.[гггг]', '[yyyy]-mm-dd' => 'дд.мм.[гггг]',
'History' => 'История', 'History' => 'История',
'Variables' => 'Переменные', 'Variables' => 'Переменные',
'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Колонки должны иметь одинаковые типы данных, в результирующей колонке должен быть индекс, данные для импорта должны существовать.', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Поля должны иметь одинаковые типы данных, в результирующем поле должен быть индекс, данные для импорта должны существовать.',
'Relations' => 'Реляции', 'Relations' => 'Отношения',
'Run file' => 'Запустить файл', 'Run file' => 'Запустить файл',
'Clear' => 'Очистить', 'Clear' => 'Очистить',
'Maximum allowed file size is %sB.' => 'Максимальный разрешённый размер файла - %sB.', 'Maximum allowed file size is %sB.' => 'Максимальный разрешённый размер файла %sB.',
'Numbers' => 'Число', 'Numbers' => 'Числа',
'Date and time' => 'Дата и время', 'Date and time' => 'Дата и время',
'Strings' => 'Строки', 'Strings' => 'Строки',
'Binary' => 'Двоичный тип', 'Binary' => 'Двоичный тип',
'Lists' => 'Списки', 'Lists' => 'Списки',
'Editor' => 'Редактор', 'Editor' => 'Редактор',
'E-mail' => 'Электропочта', 'E-mail' => 'Эл. почта',
'From' => 'От', 'From' => 'От',
'Subject' => 'Кому', 'Subject' => 'Тема',
'Send' => 'Послать', 'Send' => 'Послать',
'%d e-mail(s) have been sent.' => array('Было отправлено %d письмо.', 'Было отправлено %d письма.', 'Было отправлено %d писем.'), '%d e-mail(s) have been sent.' => array('Было отправлено %d письмо.', 'Было отправлено %d письма.', 'Было отправлено %d писем.'),
'Webserver file %s' => 'Файл %s на вебсервере', 'Webserver file %s' => 'Файл %s на вебсервере',
@ -242,7 +241,7 @@ $translations = array(
'Alter type' => 'Изменить тип', 'Alter type' => 'Изменить тип',
'Type has been dropped.' => 'Тип удален.', 'Type has been dropped.' => 'Тип удален.',
'Type has been created.' => 'Создан новый тип.', 'Type has been created.' => 'Создан новый тип.',
'Ctrl+click on a value to modify it.' => 'Ctrl+кликни по значению, чтобы его изменить.', 'Ctrl+click on a value to modify it.' => 'Выполните Ctrl+Щелчок мышью по значению, чтобы его изменить.',
'Use edit link to modify this value.' => 'Изменить это значение можно с помощью ссылки «изменить».', 'Use edit link to modify this value.' => 'Изменить это значение можно с помощью ссылки «изменить».',
'last' => 'последняя', 'last' => 'последняя',
'From server' => 'С сервера', 'From server' => 'С сервера',
@ -266,4 +265,32 @@ $translations = array(
'Permanent link' => 'Постоянная ссылка', 'Permanent link' => 'Постоянная ссылка',
'Edit all' => 'Редактировать всё', 'Edit all' => 'Редактировать всё',
'HH:MM:SS' => 'ЧЧ:ММ:СС', 'HH:MM:SS' => 'ЧЧ:ММ:СС',
'Tables have been optimized.' => 'Таблицы оптимизированы.',
'Materialized view' => 'Материализованное представление',
'Vacuum' => 'Вакуум',
'Selected' => 'Выбранные',
'Replication' => 'Репликация',
'Master status' => 'состояние мастер-сервера',
'Slave status' => 'состояние ведомого сервера',
'File must be in UTF-8 encoding.' => 'Файл должен быть в кодировке UTF-8.',
'Modify' => 'Изменить',
'Loading' => 'Загрузка',
'Load more data' => 'Загрузить ещё данные',
'ATTACH queries are not supported.' => 'ATTACH-запросы не поддерживаются.',
'%d / ' => '%d / ',
'Limit rows' => 'Лимит строк',
'<a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/" target="_blank">Реализуйте</a> метод %s, чтобы использовать SQLite.',
'Default value' => 'Значение по умолчанию',
'Full table scan' => 'Анализ полной таблицы',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Слишком много неудачных попыток входа. Попробуйте снова через %d минуту.', 'Слишком много неудачных попыток входа. Попробуйте снова через %d минуты.', 'Слишком много неудачных попыток входа. Попробуйте снова через %d минут.'),
'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Мастер-пароль истёк. <a href="https://www.adminer.org/en/extension/" target="_blank">Реализуйте</a> метод %s, чтобы сделать его постоянным.',
'If you did not send this request from Adminer then close this page.' => 'Если вы не посылали этот запрос из Adminer, закройте эту страницу.',
'You can upload a big SQL file via FTP and import it from server.' => 'Вы можете закачать большой SQL-файл по FTP и затем импортировать его с сервера.',
'Size' => 'Размер',
'Compute' => 'Вычислить',
'You are offline.' => 'Вы не выполнили вход.',
'You have no privileges to update this table.' => 'У вас нет прав на обновление этой таблицы.',
'Saving' => 'Сохранение',
'yes' => 'Да',
'no' => 'Нет',
); );

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Heslo', 'Password' => 'Heslo',
'Select database' => 'Vybrať databázu', 'Select database' => 'Vybrať databázu',
'Invalid database.' => 'Nesprávna databáza.', 'Invalid database.' => 'Nesprávna databáza.',
'Create new database' => 'Vytvoriť novú databázu',
'Table has been dropped.' => 'Tabuľka bola odstránená.', 'Table has been dropped.' => 'Tabuľka bola odstránená.',
'Table has been altered.' => 'Tabuľka bola zmenená.', 'Table has been altered.' => 'Tabuľka bola zmenená.',
'Table has been created.' => 'Tabuľka bola vytvorená.', 'Table has been created.' => 'Tabuľka bola vytvorená.',

View File

@ -76,7 +76,6 @@ $translations = array(
'Use' => 'Uporabi', 'Use' => 'Uporabi',
'Select database' => 'Izberi bazo', 'Select database' => 'Izberi bazo',
'Invalid database.' => 'Neveljavna baza.', 'Invalid database.' => 'Neveljavna baza.',
'Create new database' => 'Ustvari novo bazo',
'Database has been dropped.' => 'Baza je zavržena.', 'Database has been dropped.' => 'Baza je zavržena.',
'Databases have been dropped.' => 'Baze so zavržene.', 'Databases have been dropped.' => 'Baze so zavržene.',
'Database has been created.' => 'Baza je ustvarjena.', 'Database has been created.' => 'Baza je ustvarjena.',

View File

@ -77,7 +77,6 @@ $translations = array(
'Use' => 'Користи', 'Use' => 'Користи',
'Select database' => 'Изаберите базу', 'Select database' => 'Изаберите базу',
'Invalid database.' => 'Неисправна база података.', 'Invalid database.' => 'Неисправна база података.',
'Create new database' => 'Направи нову базу података',
'Database has been dropped.' => 'База података је избрисана.', 'Database has been dropped.' => 'База података је избрисана.',
'Databases have been dropped.' => 'Базњ података су избрисане.', 'Databases have been dropped.' => 'Базњ података су избрисане.',
'Database has been created.' => 'База података је креирана.', 'Database has been created.' => 'База података је креирана.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'க‌ட‌வுச்சொல்', 'Password' => 'க‌ட‌வுச்சொல்',
'Select database' => 'த‌க‌வ‌ல்த‌ள‌த்தை தேர்வு செய்', 'Select database' => 'த‌க‌வ‌ல்த‌ள‌த்தை தேர்வு செய்',
'Invalid database.' => 'த‌க‌வ‌ல்த‌ள‌ம் ச‌ரியானதல்ல‌.', 'Invalid database.' => 'த‌க‌வ‌ல்த‌ள‌ம் ச‌ரியானதல்ல‌.',
'Create new database' => 'புதிய‌ த‌க‌வ‌ல்த‌ள‌த்தை உருவாக்கு',
'Table has been dropped.' => 'அட்ட‌வ‌ணை நீக்க‌ப்ப‌ட்ட‌து.', 'Table has been dropped.' => 'அட்ட‌வ‌ணை நீக்க‌ப்ப‌ட்ட‌து.',
'Table has been altered.' => 'அட்ட‌வணை மாற்ற‌ப்ப‌ட்ட‌து.', 'Table has been altered.' => 'அட்ட‌வணை மாற்ற‌ப்ப‌ட்ட‌து.',
'Table has been created.' => 'அட்ட‌வ‌ணை உருவாக்க‌ப்ப‌ட்ட‌து.', 'Table has been created.' => 'அட்ட‌வ‌ணை உருவாக்க‌ப்ப‌ட்ட‌து.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'รหัสผ่าน', 'Password' => 'รหัสผ่าน',
'Select database' => 'เลือกฐานข้อมูล', 'Select database' => 'เลือกฐานข้อมูล',
'Invalid database.' => 'ฐานข้อมูลไม่ถูกต้อง.', 'Invalid database.' => 'ฐานข้อมูลไม่ถูกต้อง.',
'Create new database' => 'สร้างฐานข้อมูลใหม่',
'Table has been dropped.' => 'ลบตารางแล้ว.', 'Table has been dropped.' => 'ลบตารางแล้ว.',
'Table has been altered.' => 'แก้ไขตารางแล้ว.', 'Table has been altered.' => 'แก้ไขตารางแล้ว.',
'Table has been created.' => 'สร้างตารางใหม่แล้ว.', 'Table has been created.' => 'สร้างตารางใหม่แล้ว.',

View File

@ -77,7 +77,6 @@ $translations = array(
'Use' => 'Kullan', 'Use' => 'Kullan',
'Select database' => 'Veri tabanı seç', 'Select database' => 'Veri tabanı seç',
'Invalid database.' => 'Geçersiz veri tabanı.', 'Invalid database.' => 'Geçersiz veri tabanı.',
'Create new database' => 'Yeni veri tabanı oluştur',
'Database has been dropped.' => 'Veri tabanı silindi.', 'Database has been dropped.' => 'Veri tabanı silindi.',
'Databases have been dropped.' => 'Veritabanları silindi.', 'Databases have been dropped.' => 'Veritabanları silindi.',
'Database has been created.' => 'Veri tabanı oluşturuldu.', 'Database has been created.' => 'Veri tabanı oluşturuldu.',

View File

@ -77,7 +77,6 @@ $translations = array(
'Use' => 'Обрати', 'Use' => 'Обрати',
'Select database' => 'Обрати базу даних', 'Select database' => 'Обрати базу даних',
'Invalid database.' => 'Погана база даних.', 'Invalid database.' => 'Погана база даних.',
'Create new database' => 'Створити нову базу даних',
'Database has been dropped.' => 'Базу даних було видалено.', 'Database has been dropped.' => 'Базу даних було видалено.',
'Databases have been dropped.' => 'Бази даних були видалені.', 'Databases have been dropped.' => 'Бази даних були видалені.',
'Database has been created.' => 'Базу даних було створено.', 'Database has been created.' => 'Базу даних було створено.',

View File

@ -80,7 +80,6 @@ $translations = array(
'Use' => 'Sử dụng', 'Use' => 'Sử dụng',
'Select database' => 'Chọn CSDL', 'Select database' => 'Chọn CSDL',
'Invalid database.' => 'CSDL sai.', 'Invalid database.' => 'CSDL sai.',
'Create new database' => 'Tạo CSDL',
'Database has been dropped.' => 'CSDL đã bị xoá.', 'Database has been dropped.' => 'CSDL đã bị xoá.',
'Databases have been dropped.' => 'Các CSDL đã bị xoá.', 'Databases have been dropped.' => 'Các CSDL đã bị xoá.',
'Database has been created.' => 'Đã tạo CSDL.', 'Database has been created.' => 'Đã tạo CSDL.',

View File

@ -11,7 +11,7 @@ $translations = array(
'Logged as: %s' => 'Xx', 'Logged as: %s' => 'Xx',
'Logout successful.' => 'Xx.', 'Logout successful.' => 'Xx.',
'Invalid credentials.' => 'Xx.', 'Invalid credentials.' => 'Xx.',
'Implement %s method to use SQLite.' => 'Xx.', '<a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to use SQLite.' => 'Xx.',
'Too many unsuccessful logins, try again in %d minute(s).' => array('Xx.', 'Xx.'), 'Too many unsuccessful logins, try again in %d minute(s).' => array('Xx.', 'Xx.'),
'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Xx.', 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Xx.',
'Language' => 'Xx', 'Language' => 'Xx',
@ -45,6 +45,10 @@ $translations = array(
'Variables' => 'Xx', 'Variables' => 'Xx',
'Status' => 'Xx', 'Status' => 'Xx',
'Replication' => 'Xx',
'Master status' => 'Xx',
'Slave status' => 'Xx',
'SQL command' => 'Xx', 'SQL command' => 'Xx',
'%d query(s) executed OK.' => array('Xx.', 'Xx.'), '%d query(s) executed OK.' => array('Xx.', 'Xx.'),
'Query executed OK, %d row(s) affected.' => array('Xx.', 'Xx.'), 'Query executed OK, %d row(s) affected.' => array('Xx.', 'Xx.'),
@ -85,7 +89,6 @@ $translations = array(
'Use' => 'Xx', 'Use' => 'Xx',
'Select database' => 'Xx', 'Select database' => 'Xx',
'Invalid database.' => 'Xx.', 'Invalid database.' => 'Xx.',
'Create new database' => 'Xx',
'Database has been dropped.' => 'Xx.', 'Database has been dropped.' => 'Xx.',
'Databases have been dropped.' => 'Xx.', 'Databases have been dropped.' => 'Xx.',
'Database has been created.' => 'Xx.', 'Database has been created.' => 'Xx.',
@ -185,13 +188,12 @@ $translations = array(
'Values' => 'Xx', 'Values' => 'Xx',
'View' => 'Xx', 'View' => 'Xx',
'Materialized View' => 'Xx', 'Materialized view' => 'Xx',
'View has been dropped.' => 'Xx.', 'View has been dropped.' => 'Xx.',
'View has been altered.' => 'Xx.', 'View has been altered.' => 'Xx.',
'View has been created.' => 'Xx.', 'View has been created.' => 'Xx.',
'Alter view' => 'Xx', 'Alter view' => 'Xx',
'Create view' => 'Xx', 'Create view' => 'Xx',
'Create materialized view' => 'Xx',
'Indexes' => 'Xx', 'Indexes' => 'Xx',
'Indexes have been altered.' => 'Xx.', 'Indexes have been altered.' => 'Xx.',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => '密碼', 'Password' => '密碼',
'Select database' => '選擇資料庫', 'Select database' => '選擇資料庫',
'Invalid database.' => '無效的資料庫。', 'Invalid database.' => '無效的資料庫。',
'Create new database' => '建立新資料庫',
'Table has been altered.' => '資料表已修改。', 'Table has been altered.' => '資料表已修改。',
'Table has been created.' => '資料表已修改。', 'Table has been created.' => '資料表已修改。',
'Alter table' => '修改資料表', 'Alter table' => '修改資料表',

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => '密码', 'Password' => '密码',
'Select database' => '选择数据库', 'Select database' => '选择数据库',
'Invalid database.' => '无效数据库。', 'Invalid database.' => '无效数据库。',
'Create new database' => '创建新数据库',
'Table has been dropped.' => '已删除表。', 'Table has been dropped.' => '已删除表。',
'Table has been altered.' => '已修改表。', 'Table has been altered.' => '已修改表。',
'Table has been created.' => '已创建表。', 'Table has been created.' => '已创建表。',

View File

@ -1,6 +1,8 @@
<?php <?php
page_header(lang('Privileges')); page_header(lang('Privileges'));
echo '<p class="links"><a href="' . h(ME) . 'user=">' . lang('Create user') . "</a>";
$result = $connection->query("SELECT User, Host FROM mysql." . (DB == "" ? "user" : "db WHERE " . q(DB) . " LIKE Db") . " ORDER BY Host, User"); $result = $connection->query("SELECT User, Host FROM mysql." . (DB == "" ? "user" : "db WHERE " . q(DB) . " LIKE Db") . " ORDER BY Host, User");
$grant = $result; $grant = $result;
if (!$result) { if (!$result) {
@ -25,5 +27,3 @@ if (!$grant || DB != "") {
echo "</table>\n"; echo "</table>\n";
echo "</form>\n"; echo "</form>\n";
echo '<p class="links"><a href="' . h(ME) . 'user=">' . lang('Create user') . "</a>";

View File

@ -0,0 +1,30 @@
<?php
page_header(lang('Replication'));
echo "<h3>" . lang('Master status') . doc_link(array("sql" => "show-master-status.html")) . "</h3>\n";
$master_replication_status = replication_status("MASTER");
if (!$master_replication_status) {
echo "<p class='message'>" . lang('No rows.') . "\n";
} else {
echo "<table cellspacing='0'>\n";
foreach ($master_replication_status[0] as $key => $val) {
echo "<tr>";
echo "<th>" . h($key);
echo "<td>" . nbsp($val);
}
echo "</table>\n";
}
$slave_replication_status = replication_status("SLAVE");
if ($slave_replication_status) {
echo "<h3>" . lang('Slave status') . doc_link(array("sql" => "show-slave-status.html")) . "</h3>\n";
foreach ($slave_replication_status[0] as $slave) {
echo "<table cellspacing='0'>\n";
foreach ($slave as $key => $val) {
echo "<tr>";
echo "<th>" . h($key);
echo "<td>" . nbsp($val);
}
echo "</table>\n";
}
}

View File

@ -205,7 +205,7 @@ if ($_POST && !$error) {
} }
$result = (!$rows || $driver->insertUpdate($TABLE, $rows, $primary)); $result = (!$rows || $driver->insertUpdate($TABLE, $rows, $primary));
if ($result) { if ($result) {
$driver->commit(); $result = $driver->commit();
} }
queries_redirect(remove_from_uri("page"), lang('%d row(s) have been imported.', $affected), $result); queries_redirect(remove_from_uri("page"), lang('%d row(s) have been imported.', $affected), $result);
$driver->rollback(); // after queries_redirect() to not overwrite error $driver->rollback(); // after queries_redirect() to not overwrite error
@ -298,7 +298,7 @@ if (!$columns && support("table")) {
$backward_keys = $adminer->backwardKeys($TABLE, $table_name); $backward_keys = $adminer->backwardKeys($TABLE, $table_name);
echo "<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);' onkeydown='return editingKeydown(event);'>\n"; echo "<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);' onkeydown='return editingKeydown(event);'>\n";
echo "<thead><tr>" . (!$group && $select ? "" : "<td><input type='checkbox' id='all-page' onclick='formCheck(this, /check/);'> <a href='" . h($_GET["modify"] ? remove_from_uri("modify") : $_SERVER["REQUEST_URI"] . "&modify=1") . "'>" . lang('Modify') . "</a>"); echo "<thead><tr>" . (!$group && $select ? "" : "<td><input type='checkbox' id='all-page' onclick='formCheck(this, /check/);' class='jsonly'> <a href='" . h($_GET["modify"] ? remove_from_uri("modify") : $_SERVER["REQUEST_URI"] . "&modify=1") . "'>" . lang('Modify') . "</a>");
$names = array(); $names = array();
$functions = array(); $functions = array();
reset($select); reset($select);
@ -387,6 +387,9 @@ if (!$columns && support("table")) {
$link .= where_link($i, $foreign_key["target"][$i], $rows[$n][$source]); $link .= where_link($i, $foreign_key["target"][$i], $rows[$n][$source]);
} }
$link = ($foreign_key["db"] != "" ? preg_replace('~([?&]db=)[^&]+~', '\\1' . urlencode($foreign_key["db"]), ME) : ME) . 'select=' . urlencode($foreign_key["table"]) . $link; // InnoDB supports non-UNIQUE keys $link = ($foreign_key["db"] != "" ? preg_replace('~([?&]db=)[^&]+~', '\\1' . urlencode($foreign_key["db"]), ME) : ME) . 'select=' . urlencode($foreign_key["table"]) . $link; // InnoDB supports non-UNIQUE keys
if ($foreign_key["ns"]) {
$link = preg_replace('~([?&]ns=)[^&]+~', '\\1' . urlencode($foreign_key["ns"]), $link);
}
if (count($foreign_key["source"]) == 1) { if (count($foreign_key["source"]) == 1) {
break; break;
} }

View File

@ -93,7 +93,7 @@ if (!$error && $_POST) {
$empty = false; $empty = false;
$q = substr($query, 0, $pos); $q = substr($query, 0, $pos);
$commands++; $commands++;
$print = "<pre id='sql-$commands'><code class='jush-$jush'>" . shorten_utf8(trim($q), 1000) . "</code></pre>\n"; $print = "<pre id='sql-$commands'><code class='jush-$jush'>" . $adminer->sqlCommandQuery($q) . "</code></pre>\n";
if ($jush == "sqlite" && preg_match("~^$space*+ATTACH\\b~i", $q, $match)) { if ($jush == "sqlite" && preg_match("~^$space*+ATTACH\\b~i", $q, $match)) {
// PHP doesn't support setting SQLITE_LIMIT_ATTACHED // PHP doesn't support setting SQLITE_LIMIT_ATTACHED
echo $print; echo $print;
@ -208,7 +208,7 @@ if (!isset($_GET["import"])) {
} }
echo "<p>"; echo "<p>";
textarea("query", $q, 20); textarea("query", $q, 20);
echo ($_POST ? "" : "<script type='text/javascript'>focus(document.getElementsByTagName('textarea')[0]);</script>\n"); echo ($_POST ? "" : "<script type='text/javascript'>document.getElementsByTagName('textarea')[0].focus();</script>\n");
echo "<p>$execute\n"; echo "<p>$execute\n";
echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n"; echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n";

View File

@ -0,0 +1,8 @@
<?php
function adminer_object() {
include_once "../plugins/plugin.php";
include_once "../plugins/login-sqlite.php";
return new AdminerPlugin(array(new AdminerLoginSqlite));
}
include "./index.php";

View File

Before

Width:  |  Height:  |  Size: 56 B

After

Width:  |  Height:  |  Size: 56 B

View File

Before

Width:  |  Height:  |  Size: 82 B

After

Width:  |  Height:  |  Size: 82 B

View File

@ -26,6 +26,8 @@ pre, textarea { font: 100%/1.25 monospace; }
input[type=image] { vertical-align: middle; } input[type=image] { vertical-align: middle; }
input.default { box-shadow: 1px 1px 1px #777; } input.default { box-shadow: 1px 1px 1px #777; }
input.required { box-shadow: 1px 1px 1px red; } input.required { box-shadow: 1px 1px 1px red; }
input.maxlength { box-shadow: 1px 1px 1px red; }
input.wayoff { left: -1000px; position: absolute; }
.block { display: block; } .block { display: block; }
.version { color: #777; font-size: 67%; } .version { color: #777; font-size: 67%; }
.js .hidden, .nojs .jsonly { display: none; } .js .hidden, .nojs .jsonly { display: none; }
@ -60,7 +62,8 @@ input.required { box-shadow: 1px 1px 1px red; }
.logout { margin-top: .5em; position: absolute; top: 0; right: 0; } .logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
.loadmore { margin-left: 1ex; } .loadmore { margin-left: 1ex; }
#menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; } #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; }
#menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; } #menu p, #tables { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
#tables li{ list-style: none; }
#dbs { overflow: hidden; } #dbs { overflow: hidden; }
#logins, #tables { white-space: nowrap; overflow: auto; } #logins, #tables { white-space: nowrap; overflow: auto; }
#logins a, #tables a, #tables span { background: #fff; } #logins a, #tables a, #tables span { background: #fff; }
@ -79,6 +82,8 @@ input.required { box-shadow: 1px 1px 1px red; }
.rtl .logout { left: 0; right: auto; } .rtl .logout { left: 0; right: auto; }
.rtl #content { margin: 2em 21em 0 0; padding: 10px 0 20px 20px; } .rtl #content { margin: 2em 21em 0 0; padding: 10px 0 20px 20px; }
.rtl #breadcrumb { left: auto; right: 21em; margin: 0 -18px 0 0; } .rtl #breadcrumb { left: auto; right: 21em; margin: 0 -18px 0 0; }
.rtl .pages { left: auto; right: 21em; }
.rtl input.wayoff { left: auto; right: -1000px; }
.rtl #lang, .rtl #menu { left: auto; right: 0; } .rtl #lang, .rtl #menu { left: auto; right: 0; }
@media all and (max-device-width: 880px) { @media all and (max-device-width: 880px) {
@ -87,6 +92,7 @@ input.required { box-shadow: 1px 1px 1px red; }
#content { margin-left: 10px; } #content { margin-left: 10px; }
#lang { position: static; border-top: 1px solid #999; } #lang { position: static; border-top: 1px solid #999; }
#breadcrumb { left: auto; } #breadcrumb { left: auto; }
.rtl .pages { right: auto; }
.rtl #content { margin-right: 10px; } .rtl #content { margin-right: 10px; }
.rtl #breadcrumb { right: auto; } .rtl #breadcrumb { right: auto; }
} }

View File

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 79 B

View File

@ -271,6 +271,22 @@ function editingRemoveRow(button, name) {
return true; return true;
} }
/** Move table row for field
* @param HTMLInputElement
* @param boolean direction to move row, true for up or false for down
* @return boolean
*/
function editingMoveRow(button, dir){
var row = parentTag(button, 'tr');
if (!('nextElementSibling' in row)) {
return false;
}
row.parentNode.insertBefore(row, dir
? row.previousElementSibling
: row.nextElementSibling ? row.nextElementSibling.nextElementSibling : row.parentNode.firstChild);
return true;
}
var lastType = ''; var lastType = '';
/** Clear length and hide collation or unsigned /** Clear length and hide collation or unsigned

View File

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View File

@ -239,7 +239,7 @@ function checkboxClick(event, el) {
function setHtml(id, html) { function setHtml(id, html) {
var el = document.getElementById(id); var el = document.getElementById(id);
if (el) { if (el) {
if (html == undefined) { if (html == null) {
el.parentNode.innerHTML = '&nbsp;'; el.parentNode.innerHTML = '&nbsp;';
} else { } else {
el.innerHTML = html; el.innerHTML = html;
@ -310,8 +310,12 @@ function selectAddRow(field) {
var inputs = row.getElementsByTagName('input'); var inputs = row.getElementsByTagName('input');
for (var i=0; i < inputs.length; i++) { for (var i=0; i < inputs.length; i++) {
inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1'); inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
inputs[i].value = '';
inputs[i].className = ''; inputs[i].className = '';
if (inputs[i].type == 'checkbox') {
inputs[i].checked = false;
} else {
inputs[i].value = '';
}
} }
field.parentNode.parentNode.appendChild(row); field.parentNode.parentNode.appendChild(row);
} }
@ -460,16 +464,17 @@ function functionChange(select) {
if (selectValue(select)) { if (selectValue(select)) {
if (input.origType === undefined) { if (input.origType === undefined) {
input.origType = input.type; input.origType = input.type;
input.origMaxLength = input.maxLength; input.origMaxLength = input.getAttribute('data-maxlength');
} }
input.removeAttribute('maxlength'); input.removeAttribute('data-maxlength');
input.type = 'text'; input.type = 'text';
} else if (input.origType) { } else if (input.origType) {
input.type = input.origType; input.type = input.origType;
if (input.origMaxLength >= 0) { if (input.origMaxLength >= 0) {
input.maxLength = input.origMaxLength; input.setAttribute('data-maxlength', input.origMaxLength);
} }
} }
oninput({target: input});
helpClose(); helpClose();
} }
@ -793,3 +798,9 @@ function cloneNode(el) {
setupSubmitHighlight(el2); setupSubmitHighlight(el2);
return el2; return el2;
} }
oninput = function (event) {
var target = event.target;
var maxLength = target.getAttribute('data-maxlength');
alterClass(target, 'maxlength', target.value && maxLength != null && target.value.length > maxLength); // maxLength could be 0
};

View File

Before

Width:  |  Height:  |  Size: 80 B

After

Width:  |  Height:  |  Size: 80 B

View File

Before

Width:  |  Height:  |  Size: 79 B

After

Width:  |  Height:  |  Size: 79 B

View File

@ -6,7 +6,7 @@ if (!$fields) {
} }
$table_status = table_status1($TABLE, true); $table_status = table_status1($TABLE, true);
page_header(($fields && is_view($table_status) ? lang('View') : lang('Table')) . ": " . h($TABLE), $error); page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . h($TABLE), $error);
$adminer->selectLinks($table_status); $adminer->selectLinks($table_status);
$comment = $table_status["Comment"]; $comment = $table_status["Comment"];
@ -15,18 +15,7 @@ if ($comment != "") {
} }
if ($fields) { if ($fields) {
echo "<table cellspacing='0'>\n"; $adminer->tableStructurePrint($fields);
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
echo "<tr" . odd() . "><th>" . h($field["field"]);
echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . "</span>";
echo ($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>" : "");
echo (support("comment") ? "<td>" . nbsp($field["comment"]) : "");
echo "\n";
}
echo "</table>\n";
} }
if (!is_view($table_status)) { if (!is_view($table_status)) {
@ -34,19 +23,7 @@ if (!is_view($table_status)) {
echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n"; echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n";
$indexes = indexes($TABLE); $indexes = indexes($TABLE);
if ($indexes) { if ($indexes) {
echo "<table cellspacing='0'>\n"; $adminer->tableIndexesPrint($indexes);
foreach ($indexes as $name => $index) {
ksort($index["columns"]); // enforce correct columns order
$print = array();
foreach ($index["columns"] as $key => $val) {
$print[] = "<i>" . h($val) . "</i>"
. ($index["lengths"][$key] ? "(" . $index["lengths"][$key] . ")" : "")
. ($index["descs"][$key] ? " DESC" : "")
;
}
echo "<tr title='" . h($name) . "'><th>$index[type]<td>" . implode(", ", $print) . "\n";
}
echo "</table>\n";
} }
echo '<p class="links"><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n"; echo '<p class="links"><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n";
} }

Some files were not shown because too many files have changed in this diff Show More