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;
}
/* 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);
}
$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";
if (!$connection->multi_query($query)) {

View File

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

View File

@ -62,10 +62,9 @@ if ($adminer->homepage()) {
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'));
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 '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html'));
echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-mysql.html'));
@ -80,10 +79,11 @@ if ($adminer->homepage()) {
$tables = 0;
foreach ($tables_list as $name => $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');");
echo '<th>' . (support("table") || support("indexes") ? '<a href="' . h(ME) . 'table=' . urlencode($name) . '" title="' . lang('Show structure') . '">' . h($name) . '</a>' : h($name));
$id = h("Table-" . $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) {
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>';
} else {
foreach (array(
@ -145,7 +145,6 @@ if ($adminer->homepage()) {
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("materializedview") ? '<a href="' . h(ME) . 'view=&amp;materialized=1">' . lang('Create materialized view') . "</a>\n" : "");
if (support("routine")) {
echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";

View File

@ -59,7 +59,8 @@ if (isset($_GET["elastic"])) {
}
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('');
if ($return) {
$this->server_info = $return['version']['number'];
@ -257,9 +258,9 @@ if (isset($_GET["elastic"])) {
"Engine" => "table",
"Rows" => $table["count"],
);
}
if ($name != "" && $name == $table["term"]) {
return $return[$name];
if ($name != "" && $name == $table["term"]) {
return $return[$name];
}
}
}
return $return;

View File

@ -8,7 +8,7 @@
$drivers["mssql"] = "MS SQL";
if (isset($_GET["mssql"])) {
$possible_drivers = array("SQLSRV", "MSSQL");
$possible_drivers = array("SQLSRV", "MSSQL", "PDO_DBLIB");
define("DRIVER", "mssql");
if (extension_loaded("sqlsrv")) {
class Min_DB {
@ -109,11 +109,11 @@ if (isset($_GET["mssql"])) {
}
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() {
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() {
@ -164,7 +164,7 @@ if (isset($_GET["mssql"])) {
}
function query($query, $unbuffered = false) {
$result = mssql_query($query, $this->_link); //! $unbuffered
$result = @mssql_query($query, $this->_link); //! $unbuffered
$this->error = "";
if (!$result) {
$this->error = mssql_get_last_message();
@ -186,7 +186,7 @@ if (isset($_GET["mssql"])) {
}
function next_result() {
return mssql_next_result($this->_result);
return mssql_next_result($this->_result->_result);
}
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 {
@ -288,7 +301,7 @@ if (isset($_GET["mssql"])) {
}
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 = " ") {

View File

@ -301,12 +301,16 @@ if (!defined("DRIVER")) {
* @return mixed Min_DB or string for error
*/
function connect() {
global $adminer;
global $adminer, $types, $structured_types;
$connection = new Min_DB;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
$connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
$connection->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->error;
@ -429,7 +433,7 @@ if (!defined("DRIVER")) {
global $connection;
$return = array();
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, "%_\\")) : "")
) as $row) {
if ($row["Engine"] == "InnoDB") {
@ -500,10 +504,11 @@ if (!defined("DRIVER")) {
function indexes($table, $connection2 = null) {
$return = array();
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")));
$return[$row["Key_name"]]["columns"][] = $row["Column_name"];
$return[$row["Key_name"]]["lengths"][] = $row["Sub_part"];
$return[$row["Key_name"]]["descs"][] = null;
$name = $row["Key_name"];
$return[$name]["type"] = ($name == "PRIMARY" ? "PRIMARY" : ($row["Index_type"] == "FULLTEXT" ? "FULLTEXT" : ($row["Non_unique"] ? ($row["Index_type"] == "SPATIAL" ? "SPATIAL" : "INDEX") : "UNIQUE")));
$return[$name]["columns"][] = $row["Column_name"];
$return[$name]["lengths"][] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
$return[$name]["descs"][] = null;
}
return $return;
}
@ -972,6 +977,14 @@ if (!defined("DRIVER")) {
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
* @param array one element from fields()
* @return string
@ -1012,13 +1025,17 @@ if (!defined("DRIVER")) {
*/
function support($feature) {
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) {
return queries("KILL " . number($val));
}
function connection_id(){
return "SELECT CONNECTION_ID()";
}
function max_connections() {
global $connection;
return $connection->result("SELECT @@max_connections");

View File

@ -186,12 +186,20 @@ if (isset($_GET["pgsql"])) {
}
function connect() {
global $adminer;
global $adminer, $types, $structured_types;
$connection = new Min_DB;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
if ($connection->server_info >= 9) {
$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;
}
@ -199,7 +207,7 @@ if (isset($_GET["pgsql"])) {
}
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 = " ") {
@ -244,11 +252,11 @@ ORDER BY 1";
function table_status($name = "") {
$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\"
FROM pg_class
WHERE relkind IN ('r','v','mv','f')
AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = current_schema())
" . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname")
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 c
JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace)
WHERE relkind IN ('r', 'm', 'v')
" . ($name != "" ? "AND relname = " . q($name) : "ORDER BY c.oid")
) as $row) { //! Index_length, Auto_increment
$return[$row["Name"]] = $row;
}
@ -311,9 +319,9 @@ ORDER BY a.attnum"
$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));
$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"];
$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();
foreach (explode(" ", $row["indkey"]) as $indkey) {
$return[$relname]["columns"][] = $columns[$indkey];
@ -330,7 +338,7 @@ ORDER BY a.attnum"
function foreign_keys($table) {
global $on_actions;
$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
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
@ -352,7 +360,7 @@ ORDER BY conkey, conname") as $row) {
function view($name) {
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() {
@ -488,7 +496,7 @@ ORDER BY conkey, conname") as $row) {
function drop_tables($tables) {
foreach ($tables as $table) {
$status = table_status($table);
$status = table_status($table);
if (!queries("DROP " . strtoupper($status["Engine"]) . " " . table($table))) {
return false;
}
@ -506,18 +514,21 @@ ORDER BY conkey, conname") as $row) {
return true;
}
function trigger($name) {
function trigger($name, $table = null) {
if ($name == "") {
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);
}
function triggers($table) {
$return = array();
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;
}
@ -606,6 +617,111 @@ AND typelem = 0"
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) {
return "\connect " . idf_escape($database);
}
@ -631,11 +747,15 @@ AND typelem = 0"
function support($feature) {
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) {
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() {

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("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: immutable");
if ($_GET["file"] == "favicon.ico") {
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'));
} elseif ($_GET["file"] == "jush.js") {
header("Content-Type: text/javascript; charset=utf-8");
echo lzw_decompress(compile_file('../externals/jush/modules/jush.js;../externals/jush/modules/jush-textarea.js;../externals/jush/modules/jush-txt.js;../externals/jush/modules/jush-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 {
header("Content-Type: image/gif");
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.')));
$location = ME . "table=" . urlencode($TABLE);
$row["source"] = array_filter($row["source"], 'strlen');
ksort($row["source"]); // enforce input order
$target = array();
foreach ($row["source"] as $key => $val) {
$target[$key] = $row["target"][$key];
if (!$_POST["drop"]) {
$row["source"] = array_filter($row["source"], 'strlen');
ksort($row["source"]); // enforce input order
$target = array();
foreach ($row["source"] as $key => $val) {
$target[$key] = $row["target"][$key];
}
$row["target"] = $target;
}
$row["target"] = $target;
if ($jush == "sqlite") {
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="">
<noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
<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
$j = 0;
foreach ($row["source"] as $key => $val) {
echo "<tr>";
echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow(this);" : 1));
echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key]);
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], 1, "label-target");
$j++;
}
?>

View File

@ -110,7 +110,7 @@ focus(document.getElementById('username'));
function login($login, $password) {
global $jush;
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;
}
@ -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
* @param string
* @return string SQL expression, empty string for no description
@ -232,7 +241,10 @@ focus(document.getElementById('username'));
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));
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);
}
@ -246,6 +258,45 @@ focus(document.getElementById('username'));
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
* @param array result of selectColumnsProcess()[0]
* @param array selectable columns
@ -352,8 +403,9 @@ focus(document.getElementById('username'));
echo "var indexColumns = ";
$columns = array();
foreach ($indexes as $index) {
if ($index["type"] != "FULLTEXT") {
$columns[reset($index["columns"])] = 1;
$current_key = reset($index["columns"]);
if ($index["type"] != "FULLTEXT" && $current_key) {
$columns[$current_key] = 1;
}
}
$columns[""] = 1;
@ -806,11 +858,14 @@ focus(document.getElementById('username'));
$connection->select_db(DB);
$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-textarea.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">
<?php
@ -886,17 +941,18 @@ bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info,
* @return null
*/
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) {
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);
echo (support("table") || support("indexes")
? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
. bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : ""), "structure")
. bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
. " title='" . lang('Show structure') . "'>$name</a>"
: "<span>$name</span>"
) . "<br>\n";
) . "\n";
}
echo "</ul>\n";
}
}

View File

@ -120,7 +120,6 @@ function unset_permanent() {
*/
function auth_error($error) {
global $adminer, $has_token;
$error = h($error);
$session_name = session_name();
if (isset($_GET["username"])) {
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);
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"]) {

View File

@ -12,11 +12,12 @@ function connect_error() {
page_header(lang('Select database'), $error, false);
echo "<p class='links'>\n";
foreach (array(
'database' => lang('Create new database'),
'database' => lang('Create database'),
'privileges' => lang('Privileges'),
'processlist' => lang('Process list'),
'variables' => lang('Variables'),
'status' => lang('Status'),
'replication' => lang('Replication'),
) as $key => $val) {
if (support($key)) {
echo "<a href='" . h(ME) . "$key='>$val</a>\n";
@ -43,8 +44,9 @@ function connect_error() {
foreach ($databases as $db => $tables) {
$root = h(ME) . "db=" . urlencode($db);
echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"])) : "");
echo "<th><a href='$root'>" . h($db) . "</a>";
$id = h("Db-" . $db);
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));
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>";
@ -76,7 +78,7 @@ if (isset($_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"]) {
restart_session();
set_session("dbs", null);

View File

@ -18,6 +18,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
?>
<!DOCTYPE html>
<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-Script-Type" content="text/javascript">
<meta name="robots" content="noindex">
@ -29,21 +30,18 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
<?php if ($adminer->head()) { ?>
<link rel="shortcut icon" type="image/x-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")) { ?>
<link rel="stylesheet" type="text/css" href="adminer.css">
<?php } ?>
<?php } ?>
<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">
document.body.className = document.body.className.replace(/ nojs/, ' js');
var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
</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="content">
@ -138,5 +136,5 @@ function page_footer($missing = "") {
</div>
<script type="text/javascript">setupSubmitHighlight(document);</script>
<?php
}?>
<?php require '../../../../include/footer.php'; ?>
/* devilbox edit */ echo loadClass('Html')->getFooter(); error_reporting(6135);
}

View File

@ -141,7 +141,7 @@ function edit_type($key, $field, $collations, $foreign_keys = array()) {
global $structured_types, $types, $unsigned, $on_actions;
$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])) {
array_unshift($structured_types, $type);
}
@ -150,7 +150,7 @@ if ($foreign_keys) {
}
echo optionlist($structured_types, $type);
?></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 ($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>' : '');
@ -238,20 +238,20 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
?>
<thead><tr class="wrap">
<?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?>
<th><?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><?php echo lang('Length'); ?>
<td><?php echo lang('Options'); ?>
<th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
<td id="label-type"><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;" onblur="editingLengthBlur(this);"></textarea>
<td id="label-length"><?php echo lang('Length'); ?>
<td><?php echo lang('Options'); /* no label required, options have their own label */ ?>
<?php if ($type == "TABLE") { ?>
<td>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 id="label-null">NULL
<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",
'sqlite' => "autoinc.html",
'pgsql' => "datatype.html#DATATYPE-SERIAL",
'mssql' => "ms186775.aspx",
)); ?>
<td><?php echo lang('Default value'); ?>
<?php echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
<td id="label-default"><?php echo lang('Default value'); ?>
<?php echo (support("comment") ? "<td id='label-comment'" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
<?php } ?>
<td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>"; ?><script type="text/javascript">row_count = <?php echo count($fields); ?>;</script>
</thead>
@ -264,21 +264,21 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
?>
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
<?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" 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); ?>">
<?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
<?php if ($type == "TABLE") { ?>
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block"); ?>
<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
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;">
<?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) . "'>" : ""); ?>
<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(); }" aria-labelledby="label-ai"></label><td><?php
echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" 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) . "' aria-labelledby='label-comment'>" : ""); ?>
<?php } ?>
<?php
echo "<td>";
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='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>&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='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') . "' 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 "\n";
@ -290,7 +290,6 @@ echo checkbox("fields[$i][has_default]", 1, $field["has_default"]); ?><input nam
* @return bool
*/
function process_fields(&$fields) {
ksort($fields);
$offset = 0;
if ($_POST["up"]) {
$last = 0;
@ -432,9 +431,9 @@ function create_routine($routine, $row) {
}
/** Remove current user definer from SQL command
* @param string
* @return string
*/
* @param string
* @return string
*/
function remove_definer($query) {
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) {
// 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));
}
@ -112,11 +112,13 @@ function nl_br($string) {
* @param string
* @param string
* @param string
* @param 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) . "'"
. ($checked ? " checked" : "")
. ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
. ($onclick ? ' onclick="' . h($onclick) . '"' : '')
. ">"
;
@ -152,11 +154,15 @@ function optionlist($options, $selected = null, $use_keys = false) {
* @param array
* @param string
* @param string true for no onchange, false for radio
* @param string
* @return string
*/
function html_select($name, $options, $value = "", $onchange = true) {
function html_select($name, $options, $value = "", $onchange = true, $labelled_by = "") {
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 = "";
foreach ($options as $key => $val) {
@ -237,7 +243,7 @@ function json_row($key, $val = null) {
echo "{";
}
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;
} else {
echo "\n}\n";
@ -406,10 +412,10 @@ function where($where, $fields = array()) {
$key = bracket_escape($key, 1); // 1 - back
$column = escape_key($key);
$return[] = $column
. (($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val)) || $jush == "mssql"
? " LIKE " . q(addcslashes($val, "%_\\"))
. ($jush == "sql" && preg_match('~^[0-9]*\\.[0-9]*$~', $val) ? " LIKE " . q(addcslashes($val, "%_\\"))
: ($jush == "mssql" ? " LIKE " . q(preg_replace('~[_%[]~', '[\0]', $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
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";
@ -471,18 +477,12 @@ function convert_fields($columns, $fields, $select = array()) {
*/
function cookie($name, $value, $lifetime = 2592000) { // 2592000 - 30 days
global $HTTPS;
$params = array(
$name,
(preg_match("~\n~", $value) ? "" : $value), // HTTP Response Splitting protection in PHP < 5.1.2
($lifetime ? time() + $lifetime : 0),
preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]),
"",
$HTTPS
);
if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
$params[] = true; // HttpOnly
}
return call_user_func_array('setcookie', $params);
return header("Set-Cookie: $name=" . urlencode($value)
. ($lifetime ? "; expires=" . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT" : "")
. "; path=" . preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])
. ($HTTPS ? "; secure" : "")
. "; HttpOnly; SameSite=lax",
false);
}
/** Restart stopped session
@ -744,7 +744,7 @@ function is_utf8($val) {
* @return string escaped string with appended ...
*/
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);
}
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
if ($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
preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
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
}
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>';
} else {
// 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
echo "<input"
. ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) ? " type='number'" : "")
. " value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "")
. ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
. " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
. (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
. "$attrs>"
;
@ -1135,7 +1138,7 @@ function select_value($val, $link, $field, $text_length) {
$link = "mailto:$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
: "https://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer
);
@ -1181,7 +1184,7 @@ function is_url($string) {
* @return bool
*/
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
@ -1209,7 +1212,7 @@ function slow_query($query) {
$db = $adminer->database();
$timeout = $adminer->queryTimeout();
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">
var timeout = setTimeout(function () {

View File

@ -30,7 +30,7 @@ $langs = array(
'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
'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
'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com
'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com

View File

@ -16,10 +16,10 @@ if (extension_loaded('pdo')) {
try {
parent::__construct($dsn, $username, $password);
} catch (Exception $ex) {
auth_error($ex->getMessage());
auth_error(h($ex->getMessage()));
}
$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);*/

View File

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

View File

@ -1,12 +1,14 @@
<?php
/** Adminer - Compact database management
* @link https://www.adminer.org/
* @author Jakub Vrana, http://www.vrana.cz/
* @author Jakub Vrana, https://www.vrana.cz/
* @copyright 2007 Jakub Vrana
* @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)
*/
/* devilbox inject */ require '../../../../config.php'; error_reporting(6135);
include "./include/bootstrap.inc.php";
include "./include/tmpfile.inc.php";
@ -65,6 +67,8 @@ if (isset($_GET["download"])) {
include "./user.inc.php";
} elseif (isset($_GET["processlist"])) {
include "./processlist.inc.php";
} elseif (isset($_GET["replication"])) {
include "./replication.inc.php";
} elseif (isset($_GET["select"])) {
include "./select.inc.php";
} 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"])) {
$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);
$primary = array();
if ($jush == "mongo") { // doesn't support primary key
@ -93,9 +96,9 @@ if (!$row) {
<form action="" method="post">
<table cellspacing="0" class="nowrap">
<thead><tr>
<th><?php echo lang('Index Type'); ?>
<th><input type="submit" style="left: -1000px; position: absolute;"><?php echo lang('Column (length)'); ?>
<th><?php echo lang('Name'); ?>
<th id="label-type"><?php echo lang('Index Type'); ?>
<th><input type="submit" class="wayoff"><?php echo lang('Column (length)'); ?>
<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;
</thead>
<?php
@ -110,24 +113,24 @@ if ($primary) {
$j = 1;
foreach ($row["indexes"] as $index) {
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>";
ksort($index["columns"]);
$i = 1;
foreach ($index["columns"] as $key => $column) {
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),
$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 " </span>";
$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";
}
$j++;

View File

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

View File

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

View File

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

View File

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

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Contrasenya',
'Select database' => 'Selecciona base de dades',
'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 altered.' => 'S\'ha modificat 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',
'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
'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.'),
'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',
@ -45,6 +45,10 @@ $translations = array(
'Variables' => 'Proměnné',
'Status' => 'Stav',
'Replication' => 'Replikace',
'Master status' => 'Master status',
'Slave status' => 'Slave status',
'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.'),
'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',
'Select database' => 'Vybrat databázi',
'Invalid database.' => 'Nesprávná databáze.',
'Create new database' => 'Vytvořit novou databázi',
'Database has been dropped.' => 'Databáze byla odstraněna.',
'Databases have been dropped.' => 'Databáze byly odstraněny.',
'Database has been created.' => 'Databáze byla vytvořena.',
@ -184,13 +187,12 @@ $translations = array(
'Values' => 'Hodnoty',
'View' => 'Pohled',
'Materialized View' => 'Materializovaný pohled',
'Materialized view' => 'Materializovaný pohled',
'View has been dropped.' => 'Pohled byl odstraněn.',
'View has been altered.' => 'Pohled byl změněn.',
'View has been created.' => 'Pohled byl vytvořen.',
'Alter view' => 'Pozměnit pohled',
'Create view' => 'Vytvořit pohled',
'Create materialized view' => 'Vytvořit materializovaný pohled',
'Indexes' => 'Indexy',
'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 created.' => 'Typ byl vytvořen.',
'Alter type' => 'Pozměnit typ',
'Replication' => null,
'Master status' => null,
'Slave status' => null,
);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Contrasinal',
'Select database' => 'Seleccionar Base de datos',
'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 altered.' => 'Modificouse a táboa.',
'Table has been created.' => 'Creouse a táboa.',
@ -267,10 +266,9 @@ $translations = array(
'Edit all' => 'Editar todo',
'HH:MM:SS' => 'HH:MM:SS',
'Tables have been optimized.' => 'Optimizáronse as táboas',
'Materialized View' => 'Vista materializada',
'Materialized view' => 'Vista materializada',
'Vacuum' => 'Baleirar',
'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',
'Modify' => 'Modificar',
'Loading' => 'Cargando',

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Wachtwoord',
'Select database' => 'Database selecteren',
'Invalid database.' => 'Ongeldige database.',
'Create new database' => 'Nieuwe database',
'Table has been dropped.' => 'Tabel verwijderd.',
'Table has been altered.' => 'Tabel aangepast.',
'Table has been created.' => 'Tabel aangemaakt.',
@ -61,7 +60,7 @@ $translations = array(
'Action' => 'Acties',
'edit' => 'bewerk',
'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',
'Execute' => 'Uitvoeren',
'Table' => 'Tabel',

View File

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

View File

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

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Senha',
'Select database' => 'Selecionar Base de dados',
'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 altered.' => 'A Tabela foi alterada.',
'Table has been created.' => 'A Tabela foi criada.',

View File

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

View File

@ -8,7 +8,6 @@ $translations = array(
'Password' => 'Parola',
'Select database' => 'Alege baza de date',
'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 altered.' => 'Tabelul a fost modificat.',
'Table has been created.' => 'Tabelul a fost creat.',

View File

@ -7,15 +7,14 @@ $translations = array(
'Username' => 'Имя пользователя',
'Password' => 'Пароль',
'Select database' => 'Выбрать базу данных',
'Invalid database.' => 'Плохая база данных.',
'Create new database' => 'Создать новую базу данных',
'Invalid database.' => 'Неверная база данных.',
'Table has been dropped.' => 'Таблица была удалена.',
'Table has been altered.' => 'Таблица была изменена.',
'Table has been created.' => 'Таблица была создана.',
'Alter table' => 'Изменить таблицу',
'Create table' => 'Создать таблицу',
'Table name' => 'Название таблицы',
'engine' => 'тип',
'engine' => 'Тип таблицы',
'collation' => 'режим сопоставления',
'Column name' => 'Название поля',
'Type' => 'Тип',
@ -30,7 +29,7 @@ $translations = array(
'Database has been altered.' => 'База данных была изменена.',
'Alter database' => 'Изменить базу данных',
'Create database' => 'Создать базу данных',
'SQL command' => 'SQL запрос',
'SQL command' => 'SQL-запрос',
'Logout' => 'Выйти',
'database' => 'база данных',
'Use' => 'Выбрать',
@ -68,7 +67,7 @@ $translations = array(
'Triggers' => 'Триггеры',
'View' => 'Представление',
'Unable to select the table' => 'Не удалось получить данные из таблицы',
'Invalid CSRF token. Send the form again.' => 'Недействительный CSRF токен. Отправите форму ещё раз.',
'Invalid CSRF token. Send the form again.' => 'Недействительный CSRF-токен. Отправите форму ещё раз.',
'Comment' => 'Комментарий',
'Default values' => 'Значения по умолчанию',
'%d byte(s)' => array('%d байт', '%d байта', '%d байтов'),
@ -91,13 +90,13 @@ $translations = array(
'Change' => 'Изменить',
'Source' => 'Источник',
'Target' => 'Цель',
'Add column' => 'Добавить колонку',
'Add column' => 'Добавить поле',
'Alter' => 'Изменить',
'Add foreign key' => 'Добавить внешний ключ',
'ON DELETE' => 'При стирании',
'ON UPDATE' => 'При обновлении',
'Index Type' => 'Тип индекса',
'Column (length)' => 'Колонка (длина)',
'Column (length)' => 'Поле (длина)',
'View has been dropped.' => 'Представление было удалено.',
'View has been altered.' => 'Представление было изменено.',
'View has been created.' => 'Представление было создано.',
@ -135,11 +134,11 @@ $translations = array(
'User has been altered.' => 'Пользователь был изменён.',
'User has been created.' => 'Пользователь был создан.',
'Hashed' => 'Хешировано',
'Column' => 'Колонка',
'Column' => 'поле',
'Routine' => 'Процедура',
'Grant' => 'Позволить',
'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',
'Move up' => 'Переместить вверх',
'Move down' => 'Переместить вниз',
@ -182,7 +181,7 @@ $translations = array(
'Tables have been moved.' => 'Таблицы были перемещены.',
'Move to other database' => 'Переместить в другую базу данных',
'Move' => 'Переместить',
'Engine' => 'Тип',
'Engine' => 'Тип таблиц',
'Save and continue edit' => 'Сохранить и продолжить редактирование',
'original' => 'исходный',
'%d item(s) have been affected.' => array('Была изменена %d запись.', 'Были изменены %d записи.', 'Было изменено %d записей.'),
@ -203,20 +202,20 @@ $translations = array(
'[yyyy]-mm-dd' => 'дд.мм.[гггг]',
'History' => 'История',
'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.' => 'Колонки должны иметь одинаковые типы данных, в результирующей колонке должен быть индекс, данные для импорта должны существовать.',
'Relations' => 'Реляции',
'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' => 'Отношения',
'Run file' => 'Запустить файл',
'Clear' => 'Очистить',
'Maximum allowed file size is %sB.' => 'Максимальный разрешённый размер файла - %sB.',
'Numbers' => 'Число',
'Maximum allowed file size is %sB.' => 'Максимальный разрешённый размер файла %sB.',
'Numbers' => 'Числа',
'Date and time' => 'Дата и время',
'Strings' => 'Строки',
'Binary' => 'Двоичный тип',
'Lists' => 'Списки',
'Editor' => 'Редактор',
'E-mail' => 'Электропочта',
'E-mail' => 'Эл. почта',
'From' => 'От',
'Subject' => 'Кому',
'Subject' => 'Тема',
'Send' => 'Послать',
'%d e-mail(s) have been sent.' => array('Было отправлено %d письмо.', 'Было отправлено %d письма.', 'Было отправлено %d писем.'),
'Webserver file %s' => 'Файл %s на вебсервере',
@ -242,7 +241,7 @@ $translations = array(
'Alter type' => 'Изменить тип',
'Type has been dropped.' => 'Тип удален.',
'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.' => 'Изменить это значение можно с помощью ссылки «изменить».',
'last' => 'последняя',
'From server' => 'С сервера',
@ -266,4 +265,32 @@ $translations = array(
'Permanent link' => 'Постоянная ссылка',
'Edit all' => 'Редактировать всё',
'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',
'Select database' => 'Vybrať databázu',
'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 altered.' => 'Tabuľka bola zmenená.',
'Table has been created.' => 'Tabuľka bola vytvorená.',

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,8 @@
<?php
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");
$grant = $result;
if (!$result) {
@ -25,5 +27,3 @@ if (!$grant || DB != "") {
echo "</table>\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));
if ($result) {
$driver->commit();
$result = $driver->commit();
}
queries_redirect(remove_from_uri("page"), lang('%d row(s) have been imported.', $affected), $result);
$driver->rollback(); // after queries_redirect() to not overwrite error
@ -298,7 +298,7 @@ if (!$columns && support("table")) {
$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 "<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();
$functions = array();
reset($select);
@ -387,6 +387,9 @@ if (!$columns && support("table")) {
$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
if ($foreign_key["ns"]) {
$link = preg_replace('~([?&]ns=)[^&]+~', '\\1' . urlencode($foreign_key["ns"]), $link);
}
if (count($foreign_key["source"]) == 1) {
break;
}

View File

@ -93,7 +93,7 @@ if (!$error && $_POST) {
$empty = false;
$q = substr($query, 0, $pos);
$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)) {
// PHP doesn't support setting SQLITE_LIMIT_ATTACHED
echo $print;
@ -208,7 +208,7 @@ if (!isset($_GET["import"])) {
}
echo "<p>";
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 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.default { box-shadow: 1px 1px 1px #777; }
input.required { box-shadow: 1px 1px 1px red; }
input.maxlength { box-shadow: 1px 1px 1px red; }
input.wayoff { left: -1000px; position: absolute; }
.block { display: block; }
.version { color: #777; font-size: 67%; }
.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; }
.loadmore { margin-left: 1ex; }
#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; }
#logins, #tables { white-space: nowrap; overflow: auto; }
#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 #content { margin: 2em 21em 0 0; padding: 10px 0 20px 20px; }
.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; }
@media all and (max-device-width: 880px) {
@ -87,6 +92,7 @@ input.required { box-shadow: 1px 1px 1px red; }
#content { margin-left: 10px; }
#lang { position: static; border-top: 1px solid #999; }
#breadcrumb { left: auto; }
.rtl .pages { right: auto; }
.rtl #content { margin-right: 10px; }
.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;
}
/** 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 = '';
/** 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) {
var el = document.getElementById(id);
if (el) {
if (html == undefined) {
if (html == null) {
el.parentNode.innerHTML = '&nbsp;';
} else {
el.innerHTML = html;
@ -310,8 +310,12 @@ function selectAddRow(field) {
var inputs = row.getElementsByTagName('input');
for (var i=0; i < inputs.length; i++) {
inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
inputs[i].value = '';
inputs[i].className = '';
if (inputs[i].type == 'checkbox') {
inputs[i].checked = false;
} else {
inputs[i].value = '';
}
}
field.parentNode.parentNode.appendChild(row);
}
@ -460,16 +464,17 @@ function functionChange(select) {
if (selectValue(select)) {
if (input.origType === undefined) {
input.origType = input.type;
input.origMaxLength = input.maxLength;
input.origMaxLength = input.getAttribute('data-maxlength');
}
input.removeAttribute('maxlength');
input.removeAttribute('data-maxlength');
input.type = 'text';
} else if (input.origType) {
input.type = input.origType;
if (input.origMaxLength >= 0) {
input.maxLength = input.origMaxLength;
input.setAttribute('data-maxlength', input.origMaxLength);
}
}
oninput({target: input});
helpClose();
}
@ -793,3 +798,9 @@ function cloneNode(el) {
setupSubmitHighlight(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);
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);
$comment = $table_status["Comment"];
@ -15,18 +15,7 @@ if ($comment != "") {
}
if ($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";
$adminer->tableStructurePrint($fields);
}
if (!is_view($table_status)) {
@ -34,19 +23,7 @@ if (!is_view($table_status)) {
echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n";
$indexes = indexes($TABLE);
if ($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";
$adminer->tableIndexesPrint($indexes);
}
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