\n";
restart_session();
if ($_SESSION["messages"]) {
echo "
" . implode("
\n
", $_SESSION["messages"]) . "
\n";
@@ -78,7 +81,9 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
*/
function page_footer($missing = "") {
global $adminer;
- ?>
+ if (!is_ajax()) {
+ ?>
+
@@ -86,4 +91,5 @@ function page_footer($missing = "") {
navigation($missing); ?>
' . ($page + 1) . "");
+ return " " . ($page == $current ? $page + 1 : '' . ($page + 1) . "");
}
/** Get file contents from $_FILES
@@ -488,6 +502,25 @@ function odd($return = ' class="odd"') {
return ($i++ % 2 ? $return : '');
}
+/** Print one row in JSON object
+* @param string or "" to close the object
+* @param string
+* @return null
+*/
+function json_row($key, $val = null) {
+ static $first = true;
+ if ($first) {
+ echo "{";
+ }
+ if ($key != "") {
+ echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, '\\"') . '": ' . (isset($val) ? '"' . addcslashes($val, '\\"') . '"' : 'undefined');
+ $first = false;
+ } else {
+ echo "\n}\n";
+ $first = true;
+ }
+}
+
/** Check whether the string is in UTF-8
* @param string
* @return bool
diff --git a/adminer/include/version.inc.php b/adminer/include/version.inc.php
index 00d6f7c9..b558b323 100644
--- a/adminer/include/version.inc.php
+++ b/adminer/include/version.inc.php
@@ -1,2 +1,2 @@
'تم حذف النوع.',
'Type has been created.' => 'تم إنشاء النوع.',
'Double click on a value to modify it.' => 'أنقر نقرا مزدوجا على قيمة لتعديلها.',
- 'Increase Text length to modify this value.' => 'قم بزيادة طول النص لتعديل القيمة.',
'Use edit link to modify this value.' => 'إستعمل الرابط "تعديل" لتعديل هذه القيمة.',
'last' => 'الأخيرة',
'From server' => 'من الخادم',
diff --git a/adminer/lang/ca.inc.php b/adminer/lang/ca.inc.php
index 5c60bf83..3dbd6f5b 100644
--- a/adminer/lang/ca.inc.php
+++ b/adminer/lang/ca.inc.php
@@ -235,7 +235,6 @@ $translations = array(
'Databases have been dropped.' => 'S\'han suprimit les bases de dades.',
'File exists.' => 'El fitxer ja existeix.',
'Double click on a value to modify it.' => 'Fes un doble clic a un valor per modificar-lo.',
- 'Increase Text length to modify this value.' => 'Incrementa la Longitud del text per modificar aquest valor.',
'Use edit link to modify this value.' => 'Utilitza l\'enllaç d\'edició per modificar aquest valor.',
'Alter schema' => 'Modifica l\'esquema',
'Create schema' => 'Crea un esquema',
diff --git a/adminer/lang/cs.inc.php b/adminer/lang/cs.inc.php
index 38cc4604..3cd806db 100644
--- a/adminer/lang/cs.inc.php
+++ b/adminer/lang/cs.inc.php
@@ -235,7 +235,6 @@ $translations = array(
// in-place editing in select
'Double click on a value to modify it.' => 'Dvojklikněte na políčko, které chcete změnit.',
- 'Increase Text length to modify this value.' => 'Ke změně této hodnoty zvyšte Délku textů.',
'Use edit link to modify this value.' => 'Ke změně této hodnoty použijte odkaz upravit.',
// %s can contain auto-increment value
diff --git a/adminer/lang/de.inc.php b/adminer/lang/de.inc.php
index 2754f994..995255a9 100644
--- a/adminer/lang/de.inc.php
+++ b/adminer/lang/de.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been dropped.' => 'Typ gelöscht.',
'Type has been created.' => 'Typ erstellt.',
'Double click on a value to modify it.' => 'Doppelklick zum Bearbeiten des Wertes.',
- 'Increase Text length to modify this value.' => 'Vergrössern Sie die Textlänge um den Wert ändern zu können.',
'Use edit link to modify this value.' => 'Benutzen Sie den Link zum editieren dieses Wertes.',
'last' => 'letzte',
'From server' => 'Auf Server',
diff --git a/adminer/lang/es.inc.php b/adminer/lang/es.inc.php
index 63b5e96e..109fc79c 100644
--- a/adminer/lang/es.inc.php
+++ b/adminer/lang/es.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been dropped.' => 'Tipo eliminado.',
'Type has been created.' => 'Tipo creado.',
'Double click on a value to modify it.' => 'Doble-clic sobre el valor para editarlo.',
- 'Increase Text length to modify this value.' => 'Aumente el tamaño del campo de texto para modificar este valor.',
'Use edit link to modify this value.' => 'Utilice el enlace de modificar para realizar los cambios.',
'last' => 'último',
'From server' => 'Desde servidor',
diff --git a/adminer/lang/et.inc.php b/adminer/lang/et.inc.php
index bc5a1753..41eb7360 100644
--- a/adminer/lang/et.inc.php
+++ b/adminer/lang/et.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been dropped.' => 'Tüüp on edukalt kustutatud.',
'Type has been created.' => 'Tüüp on edukalt loodud.',
'Double click on a value to modify it.' => 'Väärtuse muutmiseks topelt-kliki sellel.',
- 'Increase Text length to modify this value.' => 'Väärtuse muutmiseks suurenda Tekstiveeru pikkust.',
'Use edit link to modify this value.' => 'Väärtuse muutmiseks kasuta muutmislinki.',
'last' => 'viimane',
'From server' => 'Serverist',
diff --git a/adminer/lang/fr.inc.php b/adminer/lang/fr.inc.php
index 444c565b..dedfffb1 100644
--- a/adminer/lang/fr.inc.php
+++ b/adminer/lang/fr.inc.php
@@ -245,7 +245,6 @@ $translations = array(
'Type has been dropped.' => 'Le type a été supprimé.',
'Type has been created.' => 'Le type a été créé.',
'Double click on a value to modify it.' => 'Double-cliquez sur une valeur pour la modifier.',
- 'Increase Text length to modify this value.' => 'Augmentez la Longueur de texte affiché pour modifier cette valeur.',
'Use edit link to modify this value.' => 'Utilisez le lien "modifier" pour modifier cette valeur.',
'last' => 'dernière',
'From server' => 'Depuis le serveur',
diff --git a/adminer/lang/hu.inc.php b/adminer/lang/hu.inc.php
index ca8c9961..4e15dc3a 100644
--- a/adminer/lang/hu.inc.php
+++ b/adminer/lang/hu.inc.php
@@ -235,7 +235,6 @@ $translations = array(
'Databases have been dropped.' => 'Adatbázis eldobva.',
'File exists.' => 'A fájl létezik.',
'Double click on a value to modify it.' => 'Kattints kétszer az értékre a szerkesztéshez.',
- 'Increase Text length to modify this value.' => 'Növeld a Szöveg hosszát, hogy módosítani tudd ezt az értéket.',
'Use edit link to modify this value.' => 'Használd a szerkesztés hivatkozást ezen érték módosításához.',
'Alter schema' => 'Séma módosítása',
'Create schema' => 'Séma létrehozása',
diff --git a/adminer/lang/it.inc.php b/adminer/lang/it.inc.php
index 1d34ef47..819c2833 100644
--- a/adminer/lang/it.inc.php
+++ b/adminer/lang/it.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been dropped.' => 'Tipo definito dall\'utente eliminato.',
'Type has been created.' => 'Tipo definito dall\'utente creato.',
'Double click on a value to modify it.' => 'Fai doppio click su un valore per modificarlo.',
- 'Increase Text length to modify this value.' => 'Aumenta la Lunghezza del testo per modificare questo valore.',
'Use edit link to modify this value.' => 'Usa il link modifica per modificare questo valore.',
'last' => 'ultima',
'From server' => 'Dal server',
diff --git a/adminer/lang/ja.inc.php b/adminer/lang/ja.inc.php
index a10bb0e7..dd7482e2 100644
--- a/adminer/lang/ja.inc.php
+++ b/adminer/lang/ja.inc.php
@@ -247,7 +247,6 @@ $translations = array(
'Type has been dropped.' => 'ユーザー定義型を削除しました',
'Type has been created.' => 'ユーザー定義型を追加しました',
'Double click on a value to modify it.' => 'ダブルクリックして編集',
- 'Increase Text length to modify this value.' => '編集枠を広げる',
'Use edit link to modify this value.' => 'リンクを編集する',
'last' => '最終',
'From server' => 'サーバーから実行',
diff --git a/adminer/lang/nl.inc.php b/adminer/lang/nl.inc.php
index a24f3b77..201358ae 100644
--- a/adminer/lang/nl.inc.php
+++ b/adminer/lang/nl.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been dropped.' => 'Type verwijderd.',
'Type has been created.' => 'Type aangemaakt.',
'Double click on a value to modify it.' => 'Dubbelklik op een waarde om deze te bewerken.',
- 'Increase Text length to modify this value.' => 'Verhoog de lengte om deze waarde te bewerken.',
'Use edit link to modify this value.' => 'Gebruik de link "bewerk" om deze waarde te wijzigen.',
'last' => 'laatste',
'From server' => 'Van server',
diff --git a/adminer/lang/pl.inc.php b/adminer/lang/pl.inc.php
index 032d4cfd..9d2eca48 100644
--- a/adminer/lang/pl.inc.php
+++ b/adminer/lang/pl.inc.php
@@ -63,9 +63,7 @@ $translations = array(
'Action' => 'Czynność',
'edit' => 'zmień',
'Page' => 'Strona',
- 'Query executed OK, %d row(s) affected.' => array('Wykonanie pomyślne, zmieniono %d rekord.',
- 'Wykonanie pomyślne, zmieniono %d rekordy.',
- 'Wykonanie pomyślne, zmieniono %d rekordów.'),
+ 'Query executed OK, %d row(s) affected.' => array('Wykonanie pomyślne, zmieniono %d rekord.', 'Wykonanie pomyślne, zmieniono %d rekordy.', 'Wykonanie pomyślne, zmieniono %d rekordów.'),
'Error in query' => 'Bląd w zapytaniu',
'Execute' => 'Wykonaj',
'Table' => 'Tabela',
@@ -81,9 +79,7 @@ $translations = array(
'Unable to upload a file.' => 'Nie było możliwe nagrać plik.',
'File upload' => 'Nagranie pliku',
'File uploads are disabled.' => 'Nagranie pliku nie jest dozwolone.',
- 'Routine has been called, %d row(s) affected.' => array('Procedura była uruchomiona, został zmieniony %d rekord.',
- 'Procedura była uruchomiona, zostały zmienione %d rekordy.',
- 'Procedura była uruchomiona, %d rekordów zostało zmienionych.'),
+ 'Routine has been called, %d row(s) affected.' => array('Procedura była uruchomiona, został zmieniony %d rekord.', 'Procedura była uruchomiona, zostały zmienione %d rekordy.', 'Procedura była uruchomiona, %d rekordów zostało zmienionych.'),
'Call' => 'Uruchomić',
'No extension' => 'Bez rozszerzenia',
'None of the supported PHP extensions (%s) are available.' => 'Nie jest dostępne żadne z PHP rozszerzeń (%s).',
@@ -112,9 +108,7 @@ $translations = array(
'Create view' => 'Utwórz perspektywę',
'Name' => 'Nazwa',
'Process list' => 'Lista procesów',
- '%d process(es) have been killed.' => array('Wątek %d został unicestwiony.',
- 'Unicestwiono %d wątki.',
- 'Unicestwiono %d wątków.'),
+ '%d process(es) have been killed.' => array('Wątek %d został unicestwiony.', 'Unicestwiono %d wątki.', 'Unicestwiono %d wątków.'),
'Kill' => 'Unicestwij',
'Parameter name' => 'Nazwa parametru',
'Database schema' => 'Schemat bazy danych',
@@ -148,8 +142,7 @@ $translations = array(
'Routine' => 'Procedura',
'Grant' => 'Udzielić',
'Revoke' => 'Odwołać',
- 'Too big POST data. Reduce the data or increase the %s configuration directive.' =>
- 'Zbyt duże POST data. Zmiejszyj data albo podwyższ wartość w konfiguracji %s.',
+ 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Zbyt duże POST data. Zmiejszyj data albo podwyższ wartość w konfiguracji %s.',
'Logged as: %s' => 'Zalogowany jako: %s',
'Move up' => 'Przesuń w górę',
'Move down' => 'Przesuń w dół',
@@ -194,9 +187,7 @@ $translations = array(
'Engine' => 'Engine',
'Save and continue edit' => 'Zapisz i kontynuuj edycję',
'original' => 'oryginalny',
- '%d item(s) have been affected.' => array('Został dotknięty %d rekord.',
- 'Zostały dotknięte %d rekordy.',
- 'Zostało dotkniętych %d rekordów.'),
+ '%d item(s) have been affected.' => array('Został dotknięty %d rekord.', 'Zostały dotknięte %d rekordy.', 'Zostało dotkniętych %d rekordów.'),
'whole result' => 'cały wynik',
'Tables have been dropped.' => 'Tabele zostały usunięte.',
'Clone' => 'Klonować',
@@ -204,32 +195,25 @@ $translations = array(
'Partitions' => 'Rozdziały',
'Partition name' => 'Nazwa rozdziału',
'Values' => 'Wartości',
- '%d row(s) have been imported.' => array('%d rekord został importowany.',
- '%d rekordy zostały importowane.',
- 'Zostało importowanych %d rekordów.'),
+ '%d row(s) have been imported.' => array('%d rekord został importowany.', '%d rekordy zostały importowane.', 'Zostało importowanych %d rekordów.'),
'CSV Import' => 'Import CSV',
'Import' => 'Import',
'Show structure' => 'Pokaż całą strukturę',
'Select data' => 'Pokaż dane',
'Stop on error' => 'Stop w przypadku błędu',
- 'Maximum number of allowed fields exceeded. Please increase %s and %s.' =>
- 'Przekroczono maksymalną liczbę pól. Zwiększ %s i %s.',
+ 'Maximum number of allowed fields exceeded. Please increase %s and %s.' => 'Przekroczono maksymalną liczbę pól. Zwiększ %s i %s.',
'anywhere' => 'kdziekolwiek',
'%.3f s' => '%.3f s',
'$1-$3-$5' => '$6.$4.$1',
'[yyyy]-mm-dd' => 'd.m.[rrrr]',
'History' => 'Historia',
'Variables' => 'Zmienne',
- 'Source and target columns must have the same data type, there must be an index on the target
- columns and referenced data must exist.' =>
- 'Zdrojové a cílové sloupce musí mít stejný datový typ, nad cílovými sloupci
- musí být definován index a odkazovaná data musí existovat.',
+ 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Zdrojové a cílové sloupce musí mít stejný datový typ, nad cílovými sloupci musí být definován index a odkazovaná data musí existovat.',
'E-mail' => 'E-mail',
'From' => 'Nadawca',
'Subject' => 'Temat',
'Send' => 'Wyślij',
- '%d e-mail(s) have been sent.' => array('Został wysłany %d e-mail.',
- 'Zostały wysłane %d e-maile.', 'Zostało wysłanych %d e-mailów.'),
+ '%d e-mail(s) have been sent.' => array('Został wysłany %d e-mail.', 'Zostały wysłane %d e-maile.', 'Zostało wysłanych %d e-mailów.'),
'Run file' => 'Uruchomić plik',
'Numbers' => 'Numery',
'Date and time' => 'Datum i czas',
diff --git a/adminer/lang/ru.inc.php b/adminer/lang/ru.inc.php
index b8e00b39..7792a102 100644
--- a/adminer/lang/ru.inc.php
+++ b/adminer/lang/ru.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been dropped.' => 'Тип удален.',
'Type has been created.' => 'Создан новый тип.',
'Double click on a value to modify it.' => 'Кликни два раза по значению, чтобы его изменить.',
- 'Increase Text length to modify this value.' => 'Увеличь Длину текста, чтобы изменить это значение.',
'Use edit link to modify this value.' => 'Изменить это значение можно с помощью ссылки «изменить».',
'last' => 'последняя',
'From server' => 'С сервера',
diff --git a/adminer/lang/sk.inc.php b/adminer/lang/sk.inc.php
index 5cf272f6..cf9fc72f 100644
--- a/adminer/lang/sk.inc.php
+++ b/adminer/lang/sk.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been created.' => 'Typ bol vytvorený.',
'Alter type' => 'Pozmeniť typ',
'Double click on a value to modify it.' => 'Dvojkliknite na políčko, ktoré chcete zmeniť.',
- 'Increase Text length to modify this value.' => 'Pre zmenu tejto hodnoty zvýšte Dĺžku textov.',
'Use edit link to modify this value.' => 'Pre zmenu tejto hodnoty použite odkaz upraviť.',
'last' => 'posledný',
'From server' => 'Zo serveru',
diff --git a/adminer/lang/ta.inc.php b/adminer/lang/ta.inc.php
index 94187684..61175101 100644
--- a/adminer/lang/ta.inc.php
+++ b/adminer/lang/ta.inc.php
@@ -236,7 +236,6 @@ $translations = array(
'Schema has been created.' => 'அமைப்புமுறை உருவாக்கப்பட்டது.',
'Schema has been altered.' => 'அமைப்புமுறை மாற்றப்பட்டது.',
'Double click on a value to modify it.' => 'மதிப்பினை மாற்ற அதன் மீது இருமுறை சொடுக்கவும் (Double click).',
- 'Increase Text length to modify this value.' => 'இந்த மதிப்பினை மாற்ற, டெக்ஸ்ட் நீளத்தினை அதிகரிக்கவும்.',
'Use edit link to modify this value.' => 'இந்த மதிப்பினை மாற்ற, தொகுப்பு இணைப்பினை உபயோகிக்கவும்.',
'last' => 'கடைசி',
'Sequence has been dropped.' => 'வரிசைமுறை நீக்கப்பட்டது.',
diff --git a/adminer/lang/zh-tw.inc.php b/adminer/lang/zh-tw.inc.php
index eeb16f64..1510cf50 100644
--- a/adminer/lang/zh-tw.inc.php
+++ b/adminer/lang/zh-tw.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been dropped.' => '已刪除類型。',
'Type has been created.' => '已建立類型。',
'Double click on a value to modify it.' => '雙擊以進行修改。',
- 'Increase Text length to modify this value.' => '增加字串長度來修改。',
'Use edit link to modify this value.' => '使用編輯連結來修改。',
'last' => '最後一頁',
'From server' => '從伺服器',
diff --git a/adminer/lang/zh.inc.php b/adminer/lang/zh.inc.php
index a9d80889..f82f9f43 100644
--- a/adminer/lang/zh.inc.php
+++ b/adminer/lang/zh.inc.php
@@ -246,7 +246,6 @@ $translations = array(
'Type has been dropped.' => '已丢弃类型。',
'Type has been created.' => '已创建类型。',
'Double click on a value to modify it.' => '在值上双击类修改它。',
- 'Increase Text length to modify this value.' => '增加文本长度以修改该值。',
'Use edit link to modify this value.' => '使用编辑链接来修改该值。',
'last' => '最后',
'From server' => '来自服务器',
diff --git a/adminer/script.inc.php b/adminer/script.inc.php
index 53911a6a..848cb7d7 100644
--- a/adminer/script.inc.php
+++ b/adminer/script.inc.php
@@ -1,38 +1,37 @@
0, "Index_length" => 0, "Data_free" => 0);
foreach (table_status() as $row) {
$id = js_escape($row["Name"]);
- echo "setHtml('Comment-$id', '" . js_escape(nbsp($row["Comment"])) . "');\n";
+ json_row("Comment-$id", nbsp($row["Comment"]));
if (!is_view($row)) {
foreach (array("Engine", "Collation") as $key) {
- echo "setHtml('$key-$id', '" . js_escape(nbsp($row[$key])) . "');\n";
+ json_row("$key-$id", nbsp($row[$key]));
}
foreach ($sums + array("Auto_increment" => 0, "Rows" => 0) as $key => $val) {
if ($row[$key] != "") {
$val = number_format($row[$key], 0, '.', lang(','));
- echo "setHtml('$key-$id', '" . ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "');\n";
+ json_row("$key-$id", ($key == "Rows" && $row["Engine"] == "InnoDB" && $val ? "~ $val" : $val));
if (isset($sums[$key])) {
$sums[$key] += ($row["Engine"] != "InnoDB" || $key != "Data_free" ? $row[$key] : 0);
}
} elseif (array_key_exists($key, $row)) {
- echo "setHtml('$key-$id');\n";
+ json_row("$key-$id");
}
}
}
}
foreach ($sums as $key => $val) {
- echo "setHtml('sum-$key', '" . number_format($val, 0, '.', lang(',')) . "');\n";
+ json_row("sum-$key", number_format($val, 0, '.', lang(',')));
}
+ json_row("");
} else { // connect
foreach (count_tables(get_databases()) as $db => $val) {
- echo "setHtml('tables-" . js_escape($db) . "', '$val');\n";
+ json_row("tables-" . js_escape($db), $val);
}
+ json_row("");
}
exit; // don't print footer
diff --git a/adminer/select.inc.php b/adminer/select.inc.php
index be717b72..6ebd71c1 100644
--- a/adminer/select.inc.php
+++ b/adminer/select.inc.php
@@ -26,6 +26,14 @@ $limit = $adminer->selectLimitProcess();
$from = ($select ? implode(", ", $select) : "*") . "\nFROM " . table($TABLE);
$group_by = ($group && count($group) < count($select) ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
+if ($_GET["val"] && is_ajax()) {
+ header("Content-Type: text/plain; charset=utf-8");
+ foreach ($_GET["val"] as $unique_idf => $row) {
+ echo $connection->result("SELECT" . limit(idf_escape(key($row)) . " FROM " . table($TABLE), " WHERE " . where_check($unique_idf) . ($where ? " AND " . implode(" AND ", $where) : "") . ($order ? " ORDER BY " . implode(", ", $order) : ""), 1));
+ }
+ exit;
+}
+
if ($_POST && !$error) {
$where_check = "(" . implode(") OR (", array_map('where_check', (array) $_POST["check"])) . ")";
$primary = $unselected = null;
@@ -192,7 +200,7 @@ $adminer->selectLinks($table_status, $set);
if (!$columns) {
echo "