ARI Adminer – WordPress Database Manager - Version 1.1.10

Version Description

  • Update Adminer to v. 4.6.2
  • Update .htaccess file. Thank you to KZeni (https://wordpress.org/support/topic/conflict-sucuri-security-wp-content-folder-hardening-breaks-ari-adminer/)
Download this release

Release Info

Developer arisoft
Plugin Icon 128x128 ARI Adminer – WordPress Database Manager
Version 1.1.10
Comparing to
See all releases

Code changes from version 1.1.9 to 1.1.10

Files changed (131) hide show
  1. adminer/.htaccess +11 -1
  2. adminer/adminer/adminer/call.inc.php +8 -5
  3. adminer/adminer/adminer/create.inc.php +13 -10
  4. adminer/adminer/adminer/database.inc.php +3 -2
  5. adminer/adminer/adminer/db.inc.php +29 -20
  6. adminer/adminer/adminer/designs.php +14 -0
  7. adminer/adminer/adminer/download.inc.php +1 -1
  8. adminer/adminer/adminer/drivers/elastic.inc.php +105 -20
  9. adminer/adminer/adminer/drivers/firebird.inc.php +2 -2
  10. adminer/adminer/adminer/drivers/mongo.inc.php +531 -146
  11. adminer/adminer/adminer/drivers/mssql.inc.php +5 -5
  12. adminer/adminer/adminer/drivers/mysql.inc.php +84 -40
  13. adminer/adminer/adminer/drivers/oracle.inc.php +3 -3
  14. adminer/adminer/adminer/drivers/pgsql.inc.php +116 -64
  15. adminer/adminer/adminer/drivers/simpledb.inc.php +2 -2
  16. adminer/adminer/adminer/drivers/sqlite.inc.php +24 -21
  17. adminer/adminer/adminer/dump.inc.php +12 -8
  18. adminer/adminer/adminer/edit.inc.php +8 -4
  19. adminer/adminer/adminer/event.inc.php +1 -1
  20. adminer/adminer/adminer/file.inc.php +1 -0
  21. adminer/adminer/adminer/foreign.inc.php +3 -2
  22. adminer/adminer/adminer/include/adminer.inc.php +162 -78
  23. adminer/adminer/adminer/include/auth.inc.php +24 -23
  24. adminer/adminer/adminer/include/bootstrap.inc.php +14 -3
  25. adminer/adminer/adminer/include/connect.inc.php +11 -9
  26. adminer/adminer/adminer/include/design.inc.php +73 -15
  27. adminer/adminer/adminer/include/driver.inc.php +51 -4
  28. adminer/adminer/adminer/include/editing.inc.php +59 -44
  29. adminer/adminer/adminer/include/functions.inc.php +186 -77
  30. adminer/adminer/adminer/include/lang.inc.php +5 -3
  31. adminer/adminer/adminer/include/pdo.inc.php +2 -2
  32. adminer/adminer/adminer/include/version.inc.php +1 -1
  33. adminer/adminer/adminer/index.php +2 -4
  34. adminer/adminer/adminer/indexes.inc.php +7 -6
  35. adminer/adminer/adminer/lang/ar.inc.php +1 -1
  36. adminer/adminer/adminer/lang/bg.inc.php +2 -2
  37. adminer/adminer/adminer/lang/bn.inc.php +1 -1
  38. adminer/adminer/adminer/lang/bs.inc.php +1 -1
  39. adminer/adminer/adminer/lang/ca.inc.php +1 -1
  40. adminer/adminer/adminer/lang/cs.inc.php +9 -11
  41. adminer/adminer/adminer/lang/da.inc.php +2 -2
  42. adminer/adminer/adminer/lang/de.inc.php +2 -2
  43. adminer/adminer/adminer/lang/el.inc.php +3 -3
  44. adminer/adminer/adminer/lang/es.inc.php +12 -12
  45. adminer/adminer/adminer/lang/et.inc.php +1 -1
  46. adminer/adminer/adminer/lang/fa.inc.php +2 -2
  47. adminer/adminer/adminer/lang/fi.inc.php +2 -2
  48. adminer/adminer/adminer/lang/fr.inc.php +2 -2
  49. adminer/adminer/adminer/lang/gl.inc.php +2 -2
  50. adminer/adminer/adminer/lang/he.inc.php +294 -0
  51. adminer/adminer/adminer/lang/hu.inc.php +1 -1
  52. adminer/adminer/adminer/lang/id.inc.php +1 -1
  53. adminer/adminer/adminer/lang/it.inc.php +1 -1
  54. adminer/adminer/adminer/lang/ja.inc.php +1 -1
  55. adminer/adminer/adminer/lang/ko.inc.php +1 -1
  56. adminer/adminer/adminer/lang/lt.inc.php +1 -1
  57. adminer/adminer/adminer/lang/ms.inc.php +341 -0
  58. adminer/adminer/adminer/lang/nl.inc.php +1 -1
  59. adminer/adminer/adminer/lang/no.inc.php +2 -2
  60. adminer/adminer/adminer/lang/pl.inc.php +9 -2
  61. adminer/adminer/adminer/lang/pt-br.inc.php +1 -1
  62. adminer/adminer/adminer/lang/pt.inc.php +1 -1
  63. adminer/adminer/adminer/lang/ro.inc.php +1 -1
  64. adminer/adminer/adminer/lang/ru.inc.php +3 -6
  65. adminer/adminer/adminer/lang/sk.inc.php +1 -1
  66. adminer/adminer/adminer/lang/sl.inc.php +1 -1
  67. adminer/adminer/adminer/lang/sr.inc.php +3 -3
  68. adminer/adminer/adminer/lang/ta.inc.php +1 -1
  69. adminer/adminer/adminer/lang/th.inc.php +1 -1
  70. adminer/adminer/adminer/lang/tr.inc.php +39 -14
  71. adminer/adminer/adminer/lang/uk.inc.php +1 -1
  72. adminer/adminer/adminer/lang/vi.inc.php +2 -2
  73. adminer/adminer/adminer/lang/xx.inc.php +32 -30
  74. adminer/adminer/adminer/lang/zh-tw.inc.php +1 -1
  75. adminer/adminer/adminer/lang/zh.inc.php +1 -1
  76. adminer/adminer/adminer/plugin.php +1 -1
  77. adminer/adminer/adminer/procedure.inc.php +9 -8
  78. adminer/adminer/adminer/processlist.inc.php +3 -2
  79. adminer/adminer/adminer/replication.inc.php +0 -30
  80. adminer/adminer/adminer/schema.inc.php +7 -7
  81. adminer/adminer/adminer/scheme.inc.php +2 -2
  82. adminer/adminer/adminer/select.inc.php +163 -120
  83. adminer/adminer/adminer/sequence.inc.php +1 -1
  84. adminer/adminer/adminer/sql.inc.php +51 -40
  85. adminer/adminer/adminer/sqlite.php +1 -1
  86. adminer/adminer/adminer/static/default.css +10 -6
  87. adminer/adminer/adminer/static/editing.js +226 -143
  88. adminer/adminer/adminer/static/functions.js +212 -107
  89. adminer/adminer/adminer/table.inc.php +3 -2
  90. adminer/adminer/adminer/trigger.inc.php +2 -2
  91. adminer/adminer/adminer/type.inc.php +1 -1
  92. adminer/adminer/adminer/user.inc.php +9 -5
  93. adminer/adminer/adminer/view.inc.php +1 -1
  94. adminer/adminer/editor/db.inc.php +10 -5
  95. adminer/adminer/editor/include/adminer.inc.php +60 -28
  96. adminer/adminer/editor/index.php +2 -2
  97. adminer/adminer/editor/script.inc.php +1 -1
  98. adminer/adminer/editor/static/editing.js +39 -17
  99. adminer/adminer/externals/jush/modules/jush-cnf.js +2 -2
  100. adminer/adminer/externals/jush/modules/jush-css.js +17 -17
  101. adminer/adminer/externals/jush/modules/jush-htm.js +45 -45
  102. adminer/adminer/externals/jush/modules/jush-http.js +4 -4
  103. adminer/adminer/externals/jush/modules/jush-js.js +3 -3
  104. adminer/adminer/externals/jush/modules/jush-mssql.js +1 -1
  105. adminer/adminer/externals/jush/modules/jush-oracle.js +1 -1
  106. adminer/adminer/externals/jush/modules/jush-pgsql.js +3 -3
  107. adminer/adminer/externals/jush/modules/jush-php.js +3 -3
  108. adminer/adminer/externals/jush/modules/jush-simpledb.js +1 -1
  109. adminer/adminer/externals/jush/modules/jush-sql.js +4 -4
  110. adminer/adminer/externals/jush/modules/jush-sqlite.js +4 -4
  111. adminer/adminer/externals/jush/modules/jush.js +6 -6
  112. adminer/adminer/plugins/database-hide.php +2 -2
  113. adminer/adminer/plugins/dump-alter.php +3 -3
  114. adminer/adminer/plugins/dump-bz2.php +2 -2
  115. adminer/adminer/plugins/dump-date.php +2 -2
  116. adminer/adminer/plugins/dump-json.php +2 -2
  117. adminer/adminer/plugins/dump-xml.php +2 -2
  118. adminer/adminer/plugins/dump-zip.php +2 -2
  119. adminer/adminer/plugins/edit-foreign.php +2 -2
  120. adminer/adminer/plugins/enum-option.php +9 -6
  121. adminer/adminer/plugins/file-upload.php +3 -3
  122. adminer/adminer/plugins/foreign-system.php +2 -2
  123. adminer/adminer/plugins/frames.php +4 -4
  124. adminer/adminer/plugins/json-column.php +2 -2
  125. adminer/adminer/plugins/plugin.php +38 -5
  126. adminer/adminer/plugins/slugify.php +12 -3
  127. adminer/adminer/plugins/tables-filter.php +24 -16
  128. adminer/adminer/plugins/translation.php +2 -2
  129. ari-adminer.php +1 -1
  130. includes/defines.php +1 -1
  131. readme.txt +8 -1
adminer/.htaccess CHANGED
@@ -2,10 +2,20 @@
2
  RewriteEngine On
3
  </IfModule>
4
  <FilesMatch ".*\.php$">
5
- Order Allow,Deny
 
6
  Deny from all
 
 
 
 
7
  </FilesMatch>
8
  <FilesMatch "^wrapper_(adminer|editor)\.php$">
 
9
  Order Allow,Deny
10
  Allow from all
 
 
 
 
11
  </FilesMatch>
2
  RewriteEngine On
3
  </IfModule>
4
  <FilesMatch ".*\.php$">
5
+ <IfModule !mod_authz_core.c>
6
+ Order allow,deny
7
  Deny from all
8
+ </IfModule>
9
+ <IfModule mod_authz_core.c>
10
+ Require all denied
11
+ </IfModule>
12
  </FilesMatch>
13
  <FilesMatch "^wrapper_(adminer|editor)\.php$">
14
+ <IfModule !mod_authz_core.c>
15
  Order Allow,Deny
16
  Allow from all
17
+ </IfModule>
18
+ <IfModule mod_authz_core.c>
19
+ Require all granted
20
+ </IfModule>
21
  </FilesMatch>
adminer/adminer/adminer/call.inc.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
- $PROCEDURE = $_GET["call"];
3
  page_header(lang('Call') . ": " . h($PROCEDURE), $error);
4
 
5
- $routine = routine($PROCEDURE, (isset($_GET["callf"]) ? "FUNCTION" : "PROCEDURE"));
6
  $in = array();
7
  $out = array();
8
  foreach ($routine["fields"] as $i => $field) {
@@ -30,9 +30,12 @@ if (!$error && $_POST) {
30
  }
31
 
32
  $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")";
33
- echo "<p><code class='jush-$jush'>" . h($query) . "</code> <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>\n";
 
 
 
34
 
35
- if (!$connection->multi_query($query)) {
36
  echo "<p class='error'>" . error() . "\n";
37
  } else {
38
  $connection2 = connect();
@@ -45,7 +48,7 @@ if (!$error && $_POST) {
45
  if (is_object($result)) {
46
  select($result, $connection2);
47
  } else {
48
- echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $connection->affected_rows) . "\n";
49
  }
50
  } while ($connection->next_result());
51
 
1
  <?php
2
+ $PROCEDURE = ($_GET["name"] ? $_GET["name"] : $_GET["call"]);
3
  page_header(lang('Call') . ": " . h($PROCEDURE), $error);
4
 
5
+ $routine = routine($_GET["call"], (isset($_GET["callf"]) ? "FUNCTION" : "PROCEDURE"));
6
  $in = array();
7
  $out = array();
8
  foreach ($routine["fields"] as $i => $field) {
30
  }
31
 
32
  $query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")";
33
+ $start = microtime(true);
34
+ $result = $connection->multi_query($query);
35
+ $affected = $connection->affected_rows; // getting warnigns overwrites this
36
+ echo $adminer->selectQuery($query, $start, !$result);
37
 
38
+ if (!$result) {
39
  echo "<p class='error'>" . error() . "\n";
40
  } else {
41
  $connection2 = connect();
48
  if (is_object($result)) {
49
  select($result, $connection2);
50
  } else {
51
+ echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $affected) . "\n";
52
  }
53
  } while ($connection->next_result());
54
 
adminer/adminer/adminer/create.inc.php CHANGED
@@ -120,7 +120,7 @@ page_header(($TABLE != "" ? lang('Alter table') : lang('Create table')), $error,
120
  if (!$_POST) {
121
  $row = array(
122
  "Engine" => $_COOKIE["adminer_engine"],
123
- "fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")))),
124
  "partition_names" => array(""),
125
  );
126
 
@@ -163,8 +163,8 @@ foreach ($engines as $engine) {
163
  <p>
164
  <?php if (support("columns") || $TABLE == "") { ?>
165
  <?php echo lang('Table name'); ?>: <input name="name" maxlength="64" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
166
- <?php if ($TABLE == "" && !$_POST) { ?><script type='text/javascript'>focus(document.getElementById('form')['name']);</script><?php } ?>
167
- <?php echo ($engines ? "<select name='Engine' onchange='helpClose();'" . on_help("getTarget(event).value", 1) . ">" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" : ""); ?>
168
  <?php echo ($collations && !preg_match("~sqlite|mssql~", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
169
  <input type="submit" value="<?php echo lang('Save'); ?>">
170
  <?php } ?>
@@ -186,25 +186,26 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
186
  </table>
187
  <p>
188
  <?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
189
- <?php echo checkbox("defaults", 1, true, lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?>
190
- <?php if (!$_POST["defaults"]) { ?><script type="text/javascript">editingHideDefaults()</script><?php } ?>
191
  <?php echo (support("comment")
192
- ? "<label><input type='checkbox' name='comments' value='1' class='jsonly' onclick=\"columnShow(this.checked, 6); toggle('Comment'); if (this.checked) this.form['Comment'].focus();\"" . ($comments ? " checked" : "") . ">" . lang('Comment') . "</label>"
193
- . ' <input name="Comment" id="Comment" value="' . h($row["Comment"]) . '" maxlength="' . ($connection->server_info >= 5.5 ? 2048 : 60) . '"' . ($comments ? '' : ' class="hidden"') . '>'
 
194
  : '')
195
  ; ?>
196
  <p>
197
  <input type="submit" value="<?php echo lang('Save'); ?>">
198
  <?php } ?>
199
 
200
- <?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
201
  <?php
202
  if (support("partitioning")) {
203
  $partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
204
  print_fieldset("partition", lang('Partition by'), $row["partition_by"]);
205
  ?>
206
  <p>
207
- <?php echo "<select name='partition_by' onchange='partitionByChange(this);'" . on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')", 1) . ">" . optionlist(array("" => "") + $partition_by, $row["partition_by"]) . "</select>"; ?>
208
  (<input name="partition" value="<?php echo h($row["partition"]); ?>">)
209
  <?php echo lang('Partitions'); ?>: <input type="number" name="partitions" class="size<?php echo ($partition_table || !$row["partition_by"] ? " hidden" : ""); ?>" value="<?php echo h($row["partitions"]); ?>">
210
  <table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
@@ -212,7 +213,8 @@ if (support("partitioning")) {
212
  <?php
213
  foreach ($row["partition_names"] as $key => $val) {
214
  echo '<tr>';
215
- echo '<td><input name="partition_names[]" value="' . h($val) . '"' . ($key == count($row["partition_names"]) - 1 ? ' onchange="partitionNameChange(this);"' : '') . ' autocapitalize="off">';
 
216
  echo '<td><input name="partition_values[]" value="' . h($row["partition_values"][$key]) . '">';
217
  }
218
  ?>
@@ -223,3 +225,4 @@ foreach ($row["partition_names"] as $key => $val) {
223
  ?>
224
  <input type="hidden" name="token" value="<?php echo $token; ?>">
225
  </form>
 
120
  if (!$_POST) {
121
  $row = array(
122
  "Engine" => $_COOKIE["adminer_engine"],
123
+ "fields" => array(array("field" => "", "type" => (isset($types["int"]) ? "int" : (isset($types["integer"]) ? "integer" : "")), "on_update" => "")),
124
  "partition_names" => array(""),
125
  );
126
 
163
  <p>
164
  <?php if (support("columns") || $TABLE == "") { ?>
165
  <?php echo lang('Table name'); ?>: <input name="name" maxlength="64" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
166
+ <?php if ($TABLE == "" && !$_POST) { echo script("focus(qs('#form')['name']);"); } ?>
167
+ <?php echo ($engines ? "<select name='Engine'>" . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "</select>" . on_help("getTarget(event).value", 1) . script("qsl('select').onchange = helpClose;") : ""); ?>
168
  <?php echo ($collations && !preg_match("~sqlite|mssql~", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
169
  <input type="submit" value="<?php echo lang('Save'); ?>">
170
  <?php } ?>
186
  </table>
187
  <p>
188
  <?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
189
+ <?php echo checkbox("defaults", 1, !$_POST || $_POST["defaults"], lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?>
190
+ <?php echo ($_POST ? "" : script("editingHideDefaults();")); ?>
191
  <?php echo (support("comment")
192
+ ? "<label><input type='checkbox' name='comments' value='1' class='jsonly'" . ($comments ? " checked" : "") . ">" . lang('Comment') . "</label>"
193
+ . script("qsl('input').onclick = partial(editingCommentsClick, true);")
194
+ . ' <input name="Comment" value="' . h($row["Comment"]) . '" maxlength="' . (min_version(5.5) ? 2048 : 60) . '"' . ($comments ? '' : ' class="hidden"') . '>'
195
  : '')
196
  ; ?>
197
  <p>
198
  <input type="submit" value="<?php echo lang('Save'); ?>">
199
  <?php } ?>
200
 
201
+ <?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?><?php } ?>
202
  <?php
203
  if (support("partitioning")) {
204
  $partition_table = preg_match('~RANGE|LIST~', $row["partition_by"]);
205
  print_fieldset("partition", lang('Partition by'), $row["partition_by"]);
206
  ?>
207
  <p>
208
+ <?php echo "<select name='partition_by'>" . optionlist(array("" => "") + $partition_by, $row["partition_by"]) . "</select>" . on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')", 1) . script("qsl('select').onchange = partitionByChange;"); ?>
209
  (<input name="partition" value="<?php echo h($row["partition"]); ?>">)
210
  <?php echo lang('Partitions'); ?>: <input type="number" name="partitions" class="size<?php echo ($partition_table || !$row["partition_by"] ? " hidden" : ""); ?>" value="<?php echo h($row["partitions"]); ?>">
211
  <table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
213
  <?php
214
  foreach ($row["partition_names"] as $key => $val) {
215
  echo '<tr>';
216
+ echo '<td><input name="partition_names[]" value="' . h($val) . '" autocapitalize="off">';
217
+ echo ($key == count($row["partition_names"]) - 1 ? script("qsl('input').oninput = partitionNameChange;") : '');
218
  echo '<td><input name="partition_values[]" value="' . h($row["partition_values"][$key]) . '">';
219
  }
220
  ?>
225
  ?>
226
  <input type="hidden" name="token" value="<?php echo $token; ?>">
227
  </form>
228
+ <?php echo script("qs('#form')['defaults'].onclick();" . (support("comment") ? " editingCommentsClick.call(qs('#form')['comments']);" : "")); ?>
adminer/adminer/adminer/database.inc.php CHANGED
@@ -63,14 +63,15 @@ echo ($_POST["add_x"] || strpos($name, "\n")
63
  : '<input name="name" id="name" value="' . h($name) . '" maxlength="64" autocapitalize="off">'
64
  ) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $row["collation"]) . doc_link(array(
65
  'sql' => "charset-charsets.html",
 
66
  'mssql' => "ms187963.aspx",
67
  )) : "");
 
68
  ?>
69
- <script type='text/javascript'>focus(document.getElementById('name'));</script>
70
  <input type="submit" value="<?php echo lang('Save'); ?>">
71
  <?php
72
  if (DB != "") {
73
- echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n";
74
  } elseif (!$_POST["add_x"] && $_GET["db"] == "") {
75
  echo "<input type='image' class='icon' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n";
76
  }
63
  : '<input name="name" id="name" value="' . h($name) . '" maxlength="64" autocapitalize="off">'
64
  ) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $row["collation"]) . doc_link(array(
65
  'sql' => "charset-charsets.html",
66
+ 'mariadb' => "supported-character-sets-and-collations/",
67
  'mssql' => "ms187963.aspx",
68
  )) : "");
69
+ echo script("focus(qs('#name'));");
70
  ?>
 
71
  <input type="submit" value="<?php echo lang('Save'); ?>">
72
  <?php
73
  if (DB != "") {
74
+ echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', DB)) . "\n";
75
  } elseif (!$_POST["add_x"] && $_GET["db"] == "") {
76
  echo "<input type='image' class='icon' name='add' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>\n";
77
  }
adminer/adminer/adminer/db.inc.php CHANGED
@@ -4,7 +4,7 @@ $tables_views = array_merge((array) $_POST["tables"], (array) $_POST["views"]);
4
  if ($tables_views && !$error && !$_POST["search"]) {
5
  $result = true;
6
  $message = "";
7
- if ($jush == "sql" && count($_POST["tables"]) > 1 && ($_POST["drop"] || $_POST["truncate"] || $_POST["copy"])) {
8
  queries("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once
9
  }
10
 
@@ -56,22 +56,27 @@ if ($adminer->homepage()) {
56
  echo "<form action='' method='post'>\n";
57
  if (support("table")) {
58
  echo "<fieldset><legend>" . lang('Search data in tables') . " <span id='selected2'></span></legend><div>";
59
- echo "<input type='search' name='query' value='" . h($_POST["query"]) . "'> <input type='submit' name='search' value='" . lang('Search') . "'>\n";
 
 
60
  echo "</div></fieldset>\n";
61
  if ($_POST["search"] && $_POST["query"] != "") {
 
62
  search_tables();
63
  }
64
  }
65
  $doc_link = doc_link(array('sql' => 'show-table-status.html'));
66
- echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
67
- echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^(tables|views)\[/);" class="jsonly">';
 
 
68
  echo '<th>' . lang('Table');
69
  echo '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html'));
70
- echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-mysql.html'));
71
  echo '<td>' . lang('Data Length') . $doc_link;
72
  echo '<td>' . lang('Index Length') . $doc_link;
73
  echo '<td>' . lang('Data Free') . $doc_link;
74
- echo '<td>' . lang('Auto Increment') . doc_link(array('sql' => 'example-auto-increment.html'));
75
  echo '<td>' . lang('Rows') . $doc_link;
76
  echo (support("comment") ? '<td>' . lang('Comment') . $doc_link : '');
77
  echo "</thead>\n";
@@ -80,7 +85,7 @@ if ($adminer->homepage()) {
80
  foreach ($tables_list as $name => $type) {
81
  $view = ($type !== null && !preg_match('~table~i', $type));
82
  $id = h("Table-" . $name);
83
- echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');", "", $id);
84
  echo '<th>' . (support("table") || support("indexes") ? "<a href='" . h(ME) . "table=" . urlencode($name) . "' title='" . lang('Show structure') . "' id='$id'>" . h($name) . '</a>' : h($name));
85
  if ($view) {
86
  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>';
@@ -115,19 +120,20 @@ if ($adminer->homepage()) {
115
 
116
  echo "</table>\n";
117
  if (!information_schema(DB)) {
118
- $vacuum = "<input type='submit' value='" . lang('Vacuum') . "'" . on_help("'VACUUM'") . "> ";
119
- $optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'" . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'") . "> ";
 
120
  echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>"
121
  . ($jush == "sqlite" ? $vacuum
122
  : ($jush == "pgsql" ? $vacuum . $optimize
123
- : ($jush == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'" . on_help("'ANALYZE TABLE'") . "> " . $optimize
124
- . "<input type='submit' name='check' value='" . lang('Check') . "'" . on_help("'CHECK TABLE'") . "> "
125
- . "<input type='submit' name='repair' value='" . lang('Repair') . "'" . on_help("'REPAIR TABLE'") . "> "
126
  : "")))
127
- . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm() . on_help($jush == "sqlite" ? "'DELETE'" : "'TRUNCATE" . ($jush == "pgsql" ? "'" : " TABLE'")) . "> "
128
- . "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . on_help("'DROP TABLE'") . ">\n";
129
  $databases = (support("scheme") ? $adminer->schemas() : $adminer->databases());
130
- if (/*count($databases) != 1 && */$jush != "sqlite") {
131
  $db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB));
132
  echo "<p>" . lang('Move to other database') . ": ";
133
  echo ($databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '" autocapitalize="off">');
@@ -135,12 +141,14 @@ if ($adminer->homepage()) {
135
  echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : "");
136
  echo "\n";
137
  }
138
- echo "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^(tables|views)\[/));" . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "") . "\">\n"; // used by trCheck()
 
139
  echo "<input type='hidden' name='token' value='$token'>\n";
140
  echo "</div></fieldset>\n";
 
141
  }
142
  echo "</form>\n";
143
- echo "<script type='text/javascript'>tableCheck();</script>\n";
144
  }
145
 
146
  echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
@@ -154,11 +162,12 @@ if ($adminer->homepage()) {
154
  echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td>&nbsp;</thead>\n";
155
  odd('');
156
  foreach ($routines as $row) {
 
157
  echo '<tr' . odd() . '>';
158
- echo '<th><a href="' . h(ME) . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'callf=' : 'call=') . urlencode($row["ROUTINE_NAME"]) . '">' . h($row["ROUTINE_NAME"]) . '</a>';
159
  echo '<td>' . h($row["ROUTINE_TYPE"]);
160
  echo '<td>' . h($row["DTD_IDENTIFIER"]);
161
- echo '<td><a href="' . h(ME) . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'function=' : 'procedure=') . urlencode($row["ROUTINE_NAME"]) . '">' . lang('Alter') . "</a>";
162
  }
163
  echo "</table>\n";
164
  }
@@ -221,7 +230,7 @@ if ($adminer->homepage()) {
221
  }
222
 
223
  if ($tables_list) {
224
- echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n";
225
  }
226
  }
227
  }
4
  if ($tables_views && !$error && !$_POST["search"]) {
5
  $result = true;
6
  $message = "";
7
+ if ($jush == "sql" && $_POST["tables"] && count($_POST["tables"]) > 1 && ($_POST["drop"] || $_POST["truncate"] || $_POST["copy"])) {
8
  queries("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once
9
  }
10
 
56
  echo "<form action='' method='post'>\n";
57
  if (support("table")) {
58
  echo "<fieldset><legend>" . lang('Search data in tables') . " <span id='selected2'></span></legend><div>";
59
+ echo "<input type='search' name='query' value='" . h($_POST["query"]) . "'>";
60
+ echo script("qsl('input').onkeydown = partialArg(bodyKeydown, 'search');", "");
61
+ echo " <input type='submit' name='search' value='" . lang('Search') . "'>\n";
62
  echo "</div></fieldset>\n";
63
  if ($_POST["search"] && $_POST["query"] != "") {
64
+ $_GET["where"][0]["op"] = "LIKE %%";
65
  search_tables();
66
  }
67
  }
68
  $doc_link = doc_link(array('sql' => 'show-table-status.html'));
69
+ echo "<table cellspacing='0' class='nowrap checkable'>\n";
70
+ echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
71
+ echo '<thead><tr class="wrap">';
72
+ echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^(tables|views)\[/);", "");
73
  echo '<th>' . lang('Table');
74
  echo '<td>' . lang('Engine') . doc_link(array('sql' => 'storage-engines.html'));
75
+ echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-charsets.html', 'mariadb' => 'supported-character-sets-and-collations/'));
76
  echo '<td>' . lang('Data Length') . $doc_link;
77
  echo '<td>' . lang('Index Length') . $doc_link;
78
  echo '<td>' . lang('Data Free') . $doc_link;
79
+ echo '<td>' . lang('Auto Increment') . doc_link(array('sql' => 'example-auto-increment.html', 'mariadb' => 'auto_increment/'));
80
  echo '<td>' . lang('Rows') . $doc_link;
81
  echo (support("comment") ? '<td>' . lang('Comment') . $doc_link : '');
82
  echo "</thead>\n";
85
  foreach ($tables_list as $name => $type) {
86
  $view = ($type !== null && !preg_match('~table~i', $type));
87
  $id = h("Table-" . $name);
88
+ echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "", "", $id);
89
  echo '<th>' . (support("table") || support("indexes") ? "<a href='" . h(ME) . "table=" . urlencode($name) . "' title='" . lang('Show structure') . "' id='$id'>" . h($name) . '</a>' : h($name));
90
  if ($view) {
91
  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>';
120
 
121
  echo "</table>\n";
122
  if (!information_schema(DB)) {
123
+ echo "<div class='footer'><div>\n";
124
+ $vacuum = "<input type='submit' value='" . lang('Vacuum') . "'> " . on_help("'VACUUM'");
125
+ $optimize = "<input type='submit' name='optimize' value='" . lang('Optimize') . "'> " . on_help($jush == "sql" ? "'OPTIMIZE TABLE'" : "'VACUUM OPTIMIZE'");
126
  echo "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>"
127
  . ($jush == "sqlite" ? $vacuum
128
  : ($jush == "pgsql" ? $vacuum . $optimize
129
+ : ($jush == "sql" ? "<input type='submit' value='" . lang('Analyze') . "'> " . on_help("'ANALYZE TABLE'") . $optimize
130
+ . "<input type='submit' name='check' value='" . lang('Check') . "'> " . on_help("'CHECK TABLE'")
131
+ . "<input type='submit' name='repair' value='" . lang('Repair') . "'> " . on_help("'REPAIR TABLE'")
132
  : "")))
133
+ . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'> " . on_help($jush == "sqlite" ? "'DELETE'" : "'TRUNCATE" . ($jush == "pgsql" ? "'" : " TABLE'")) . confirm()
134
+ . "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . on_help("'DROP TABLE'") . confirm() . "\n";
135
  $databases = (support("scheme") ? $adminer->schemas() : $adminer->databases());
136
+ if (count($databases) != 1 && $jush != "sqlite") {
137
  $db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB));
138
  echo "<p>" . lang('Move to other database') . ": ";
139
  echo ($databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '" autocapitalize="off">');
141
  echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : "");
142
  echo "\n";
143
  }
144
+ echo "<input type='hidden' name='all' value=''>"; // used by trCheck()
145
+ echo script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^(tables|views)\[/));" . (support("table") ? " selectCount('selected2', formChecked(this, /^tables\[/) || $tables);" : "") . " }");
146
  echo "<input type='hidden' name='token' value='$token'>\n";
147
  echo "</div></fieldset>\n";
148
+ echo "</div></div>\n";
149
  }
150
  echo "</form>\n";
151
+ echo script("tableCheck();");
152
  }
153
 
154
  echo '<p class="links"><a href="' . h(ME) . 'create=">' . lang('Create table') . "</a>\n";
162
  echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td>&nbsp;</thead>\n";
163
  odd('');
164
  foreach ($routines as $row) {
165
+ $name = ($row["SPECIFIC_NAME"] == $row["ROUTINE_NAME"] ? "" : "&name=" . urlencode($row["ROUTINE_NAME"])); // not computed on the pages to be able to print the header first
166
  echo '<tr' . odd() . '>';
167
+ echo '<th><a href="' . h(ME . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'callf=' : 'call=') . urlencode($row["SPECIFIC_NAME"]) . $name) . '">' . h($row["ROUTINE_NAME"]) . '</a>';
168
  echo '<td>' . h($row["ROUTINE_TYPE"]);
169
  echo '<td>' . h($row["DTD_IDENTIFIER"]);
170
+ echo '<td><a href="' . h(ME . ($row["ROUTINE_TYPE"] != "PROCEDURE" ? 'function=' : 'procedure=') . urlencode($row["SPECIFIC_NAME"]) . $name) . '">' . lang('Alter') . "</a>";
171
  }
172
  echo "</table>\n";
173
  }
230
  }
231
 
232
  if ($tables_list) {
233
+ echo script("ajaxSetHtml('" . js_escape(ME) . "script=db');");
234
  }
235
  }
236
  }
adminer/adminer/adminer/designs.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function adminer_object() {
3
+ include_once "../plugins/plugin.php";
4
+ include_once "../plugins/designs.php";
5
+ $designs = array();
6
+ foreach (glob("../designs/*", GLOB_ONLYDIR) as $filename) {
7
+ $designs["$filename/adminer.css"] = basename($filename);
8
+ }
9
+ return new AdminerPlugin(array(
10
+ new AdminerDesigns($designs),
11
+ ));
12
+ }
13
+
14
+ include "./index.php";
adminer/adminer/adminer/download.inc.php CHANGED
@@ -6,5 +6,5 @@ header("Content-Disposition: attachment; filename=" . friendly_url("$TABLE-" . i
6
  $select = array(idf_escape($_GET["field"]));
7
  $result = $driver->select($TABLE, $select, array(where($_GET, $fields)), $select);
8
  $row = ($result ? $result->fetch_row() : array());
9
- echo $row[0];
10
  exit; // don't output footer
6
  $select = array(idf_escape($_GET["field"]));
7
  $result = $driver->select($TABLE, $select, array(where($_GET, $fields)), $select);
8
  $row = ($result ? $result->fetch_row() : array());
9
+ echo $driver->value($row[0], $fields[$_GET["field"]]);
10
  exit; // don't output footer
adminer/adminer/adminer/drivers/elastic.inc.php CHANGED
@@ -17,9 +17,10 @@ if (isset($_GET["elastic"])) {
17
  */
18
  function rootQuery($path, $content = array(), $method = 'GET') {
19
  @ini_set('track_errors', 1); // @ - may be disabled
20
- $file = @file_get_contents($this->_url . '/' . ltrim($path, '/'), false, stream_context_create(array('http' => array(
21
  'method' => $method,
22
- 'content' => json_encode($content),
 
23
  'ignore_errors' => 1, // available since PHP 5.2.10
24
  ))));
25
  if (!$file) {
@@ -60,7 +61,7 @@ if (isset($_GET["elastic"])) {
60
 
61
  function connect($server, $username, $password) {
62
  preg_match('~^(https?://)?(.*)~', $server, $match);
63
- $this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]/";
64
  $return = $this->query('');
65
  if ($return) {
66
  $this->server_info = $return['version']['number'];
@@ -147,7 +148,7 @@ if (isset($_GET["elastic"])) {
147
  $start = microtime(true);
148
  $search = $this->_conn->query($query, $data);
149
  if ($print) {
150
- echo $adminer->selectQuery("$query: " . print_r($data, true), format_time($start));
151
  }
152
  if (!$search) {
153
  return false;
@@ -156,7 +157,7 @@ if (isset($_GET["elastic"])) {
156
  foreach ($search['hits']['hits'] as $hit) {
157
  $row = array();
158
  if ($select == array("*")) {
159
- $row["_id"] = $hit["_id"];
160
  }
161
  $fields = $hit['_source'];
162
  if ($select != array("*")) {
@@ -176,6 +177,47 @@ if (isset($_GET["elastic"])) {
176
  return new Min_Result($return);
177
  }
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  }
180
 
181
 
@@ -223,9 +265,14 @@ if (isset($_GET["elastic"])) {
223
 
224
  function count_tables($databases) {
225
  global $connection;
226
- $return = $connection->query('_mapping');
227
- if ($return) {
228
- $return = array_map('count', $return);
 
 
 
 
 
229
  }
230
  return $return;
231
  }
@@ -241,24 +288,26 @@ if (isset($_GET["elastic"])) {
241
 
242
  function table_status($name = "", $fast = false) {
243
  global $connection;
244
- $search = $connection->query("_search?search_type=count", array(
245
- "facets" => array(
 
246
  "count_by_type" => array(
247
  "terms" => array(
248
- "field" => "_type",
249
  )
250
  )
251
  )
252
  ), "POST");
253
  $return = array();
254
  if ($search) {
255
- foreach ($search["facets"]["count_by_type"]["terms"] as $table) {
256
- $return[$table["term"]] = array(
257
- "Name" => $table["term"],
 
258
  "Engine" => "table",
259
- "Rows" => $table["count"],
260
  );
261
- if ($name != "" && $name == $table["term"]) {
262
  return $return[$name];
263
  }
264
  }
@@ -336,16 +385,16 @@ if (isset($_GET["elastic"])) {
336
  return null;
337
  }
338
 
339
- /** Create database
340
  * @param string
341
  * @return mixed
342
  */
343
  function create_database($db) {
344
  global $connection;
345
- return $connection->rootQuery(urlencode($db), array(), 'PUT');
346
  }
347
 
348
- /** Drop databases
349
  * @param array
350
  * @return mixed
351
  */
@@ -354,7 +403,27 @@ if (isset($_GET["elastic"])) {
354
  return $connection->rootQuery(urlencode(implode(',', $databases)), array(), 'DELETE');
355
  }
356
 
357
- /** Drop tables
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  * @param array
359
  * @return bool
360
  */
@@ -367,9 +436,25 @@ if (isset($_GET["elastic"])) {
367
  return $return;
368
  }
369
 
 
 
 
 
 
370
  $jush = "elastic";
371
  $operators = array("=", "query");
372
  $functions = array();
373
  $grouping = array();
374
  $edit_functions = array(array("json"));
 
 
 
 
 
 
 
 
 
 
 
375
  }
17
  */
18
  function rootQuery($path, $content = array(), $method = 'GET') {
19
  @ini_set('track_errors', 1); // @ - may be disabled
20
+ $file = @file_get_contents("$this->_url/" . ltrim($path, '/'), false, stream_context_create(array('http' => array(
21
  'method' => $method,
22
+ 'content' => $content === null ? $content : json_encode($content),
23
+ 'header' => 'Content-Type: application/json',
24
  'ignore_errors' => 1, // available since PHP 5.2.10
25
  ))));
26
  if (!$file) {
61
 
62
  function connect($server, $username, $password) {
63
  preg_match('~^(https?://)?(.*)~', $server, $match);
64
+ $this->_url = ($match[1] ? $match[1] : "http://") . "$username:$password@$match[2]";
65
  $return = $this->query('');
66
  if ($return) {
67
  $this->server_info = $return['version']['number'];
148
  $start = microtime(true);
149
  $search = $this->_conn->query($query, $data);
150
  if ($print) {
151
+ echo $adminer->selectQuery("$query: " . print_r($data, true), $start, !$search);
152
  }
153
  if (!$search) {
154
  return false;
157
  foreach ($search['hits']['hits'] as $hit) {
158
  $row = array();
159
  if ($select == array("*")) {
160
+ $row["_id"] = $hit["_id"];
161
  }
162
  $fields = $hit['_source'];
163
  if ($select != array("*")) {
177
  return new Min_Result($return);
178
  }
179
 
180
+ function update($type, $record, $queryWhere) {
181
+ $parts = preg_split('~ *= *~', $queryWhere);
182
+ if (count($parts) == 2) {
183
+ $id = trim($parts[1]);
184
+ $query = "$type/$id";
185
+ return $this->_conn->query($query, $record, 'POST');
186
+ }
187
+ return false;
188
+ }
189
+
190
+ function insert($type, $record) {
191
+ $id = ""; //! user should be able to inform _id
192
+ $query = "$type/$id";
193
+ $response = $this->_conn->query($query, $record, 'POST');
194
+ $this->_conn->last_id = $response['_id'];
195
+ return $response['created'];
196
+ }
197
+
198
+ function delete($type, $queryWhere) {
199
+ $ids = array();
200
+ if (is_array($_GET["where"]) && $_GET["where"]["_id"]) {
201
+ $ids[] = $_GET["where"]["_id"];
202
+ }
203
+ if (is_array($_POST['check'])) {
204
+ foreach ($_POST['check'] as $check) {
205
+ $parts = preg_split('~ *= *~', $check);
206
+ if (count($parts) == 2) {
207
+ $ids[] = trim($parts[1]);
208
+ }
209
+ }
210
+ }
211
+ $this->_conn->affected_rows = 0;
212
+ foreach ($ids as $id) {
213
+ $query = "{$type}/{$id}";
214
+ $response = $this->_conn->query($query, '{}', 'DELETE');
215
+ if (is_array($response) && $response['found'] == true) {
216
+ $this->_conn->affected_rows++;
217
+ }
218
+ }
219
+ return $this->_conn->affected_rows;
220
+ }
221
  }
222
 
223
 
265
 
266
  function count_tables($databases) {
267
  global $connection;
268
+ $return = array();
269
+ $result = $connection->query('_stats');
270
+ if ($result && $result['indices']) {
271
+ $indices = $result['indices'];
272
+ foreach ($indices as $indice => $stats) {
273
+ $indexing = $stats['total']['indexing'];
274
+ $return[$indice] = $indexing['index_total'];
275
+ }
276
  }
277
  return $return;
278
  }
288
 
289
  function table_status($name = "", $fast = false) {
290
  global $connection;
291
+ $search = $connection->query("_search", array(
292
+ "size" => 0,
293
+ "aggregations" => array(
294
  "count_by_type" => array(
295
  "terms" => array(
296
+ "field" => "_type"
297
  )
298
  )
299
  )
300
  ), "POST");
301
  $return = array();
302
  if ($search) {
303
+ $tables = $search["aggregations"]["count_by_type"]["buckets"];
304
+ foreach ($tables as $table) {
305
+ $return[$table["key"]] = array(
306
+ "Name" => $table["key"],
307
  "Engine" => "table",
308
+ "Rows" => $table["doc_count"],
309
  );
310
+ if ($name != "" && $name == $table["key"]) {
311
  return $return[$name];
312
  }
313
  }
385
  return null;
386
  }
387
 
388
+ /** Create index
389
  * @param string
390
  * @return mixed
391
  */
392
  function create_database($db) {
393
  global $connection;
394
+ return $connection->rootQuery(urlencode($db), null, 'PUT');
395
  }
396
 
397
+ /** Remove index
398
  * @param array
399
  * @return mixed
400
  */
403
  return $connection->rootQuery(urlencode(implode(',', $databases)), array(), 'DELETE');
404
  }
405
 
406
+ /** Alter type
407
+ * @param array
408
+ * @return mixed
409
+ */
410
+ function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
411
+ global $connection;
412
+ $properties = array();
413
+ foreach ($fields as $f) {
414
+ $field_name = trim($f[1][0]);
415
+ $field_type = trim($f[1][1] ? $f[1][1] : "text");
416
+ $properties[$field_name] = array(
417
+ 'type' => $field_type
418
+ );
419
+ }
420
+ if (!empty($properties)) {
421
+ $properties = array('properties' => $properties);
422
+ }
423
+ return $connection->query("_mapping/{$name}", $properties, 'PUT');
424
+ }
425
+
426
+ /** Drop types
427
  * @param array
428
  * @return bool
429
  */
436
  return $return;
437
  }
438
 
439
+ function last_id() {
440
+ global $connection;
441
+ return $connection->last_id;
442
+ }
443
+
444
  $jush = "elastic";
445
  $operators = array("=", "query");
446
  $functions = array();
447
  $grouping = array();
448
  $edit_functions = array(array("json"));
449
+ $types = array(); ///< @var array ($type => $maximum_unsigned_length, ...)
450
+ $structured_types = array(); ///< @var array ($description => array($type, ...), ...)
451
+ foreach (array(
452
+ lang('Numbers') => array("long" => 3, "integer" => 5, "short" => 8, "byte" => 10, "double" => 20, "float" => 66, "half_float" => 12, "scaled_float" => 21),
453
+ lang('Date and time') => array("date" => 10),
454
+ lang('Strings') => array("string" => 65535, "text" => 65535),
455
+ lang('Binary') => array("binary" => 255),
456
+ ) as $key => $val) {
457
+ $types += $val;
458
+ $structured_types[$key] = array_keys($val);
459
+ }
460
  }
adminer/adminer/adminer/drivers/firebird.inc.php CHANGED
@@ -147,8 +147,8 @@ if (isset($_GET["firebird"])) {
147
  return $return;
148
  }
149
 
150
- function limit1($query, $where) {
151
- return limit($query, $where, 1);
152
  }
153
 
154
  function db_collation($db, $collations) {
147
  return $return;
148
  }
149
 
150
+ function limit1($table, $query, $where, $separator = "\n") {
151
+ return limit($query, $where, 1, 0, $separator);
152
  }
153
 
154
  function db_collation($db, $collations) {
adminer/adminer/adminer/drivers/mongo.inc.php CHANGED
@@ -1,8 +1,8 @@
1
  <?php
2
- $drivers["mongo"] = "MongoDB (beta)";
3
 
4
  if (isset($_GET["mongo"])) {
5
- $possible_drivers = array("mongo");
6
  define("DRIVER", "mongo");
7
 
8
  if (class_exists('MongoDB')) {
@@ -109,97 +109,502 @@ if (isset($_GET["mongo"])) {
109
  }
110
 
111
  }
112
- }
113
 
114
 
115
 
116
- class Min_Driver extends Min_SQL {
117
- public $primary = "_id";
118
-
119
- function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
120
- $select = ($select == array("*")
121
- ? array()
122
- : array_fill_keys($select, true)
123
- );
124
- $sort = array();
125
- foreach ($order as $val) {
126
- $val = preg_replace('~ DESC$~', '', $val, 1, $count);
127
- $sort[$val] = ($count ? -1 : 1);
128
- }
129
- return new Min_Result($this->_conn->_db->selectCollection($table)
130
- ->find(array(), $select)
131
- ->sort($sort)
132
- ->limit(+$limit)
133
- ->skip($page * $limit)
134
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  }
136
-
137
- function insert($table, $set) {
138
- try {
139
- $return = $this->_conn->_db->selectCollection($table)->insert($set);
140
- $this->_conn->errno = $return['code'];
141
- $this->_conn->error = $return['err'];
142
- $this->_conn->last_id = $set['_id'];
143
- return !$return['err'];
144
- } catch (Exception $ex) {
145
- $this->_conn->error = $ex->getMessage();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  return false;
147
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
- }
150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
 
153
- function connect() {
154
- global $adminer;
155
- $connection = new Min_DB;
156
- $credentials = $adminer->credentials();
157
- if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
158
- return $connection;
159
  }
160
- return $connection->error;
161
- }
162
 
163
- function error() {
164
- global $connection;
165
- return h($connection->error);
166
- }
167
 
168
- function logged_user() {
169
- global $adminer;
170
- $credentials = $adminer->credentials();
171
- return $credentials[1];
172
- }
173
 
174
- function get_databases($flush) {
175
- global $connection;
176
- $return = array();
177
- $dbs = $connection->_link->listDBs();
178
- foreach ($dbs['databases'] as $db) {
179
- $return[] = $db['name'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  }
181
- return $return;
182
- }
183
 
184
- function collations() {
185
- return array();
186
- }
 
 
 
 
 
 
 
 
 
 
 
187
 
188
- function db_collation($db, $collations) {
189
- }
 
 
190
 
191
- function count_tables($databases) {
192
- global $connection;
193
- $return = array();
194
- foreach ($databases as $db) {
195
- $return[$db] = count($connection->_link->selectDB($db)->getCollectionNames(true));
 
 
 
 
 
196
  }
197
- return $return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  }
199
 
200
- function tables_list() {
201
- global $connection;
202
- return array_fill_keys($connection->_db->getCollectionNames(true), 'table');
 
 
 
203
  }
204
 
205
  function table_status($name = "", $fast = false) {
@@ -213,43 +618,73 @@ if (isset($_GET["mongo"])) {
213
  return $return;
214
  }
215
 
216
- function information_schema() {
 
 
217
  }
218
 
219
- function is_view($table_status) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
  }
221
 
222
- function drop_databases($databases) {
223
  global $connection;
224
- foreach ($databases as $db) {
225
- $response = $connection->_link->selectDB($db)->drop();
226
- if (!$response['ok']) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  return false;
228
  }
229
  }
230
  return true;
231
  }
232
 
233
- function indexes($table, $connection2 = null) {
234
- global $connection;
235
- $return = array();
236
- foreach ($connection->_db->selectCollection($table)->getIndexInfo() as $index) {
237
- $descs = array();
238
- foreach ($index["key"] as $column => $type) {
239
- $descs[] = ($type == -1 ? '1' : null);
240
- }
241
- $return[$index["name"]] = array(
242
- "type" => ($index["name"] == "_id_" ? "PRIMARY" : ($index["unique"] ? "UNIQUE" : "INDEX")),
243
- "columns" => array_keys($index["key"]),
244
- "lengths" => array(),
245
- "descs" => $descs,
246
- );
247
- }
248
- return $return;
249
  }
250
 
251
- function fields($table) {
252
- return fields_from_edit();
 
 
253
  }
254
 
255
  function convert_field($field) {
@@ -270,12 +705,6 @@ if (isset($_GET["mongo"])) {
270
  return array();
271
  }
272
 
273
- function found_rows($table_status, $where) {
274
- global $connection;
275
- //! don't call count_rows()
276
- return $connection->_db->selectCollection($_GET["select"])->count($where);
277
- }
278
-
279
  function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
280
  global $connection;
281
  if ($table == "") {
@@ -306,51 +735,7 @@ if (isset($_GET["mongo"])) {
306
  return true;
307
  }
308
 
309
- function alter_indexes($table, $alter) {
310
- global $connection;
311
- foreach ($alter as $val) {
312
- list($type, $name, $set) = $val;
313
- if ($set == "DROP") {
314
- $return = $connection->_db->command(array("deleteIndexes" => $table, "index" => $name));
315
- } else {
316
- $columns = array();
317
- foreach ($set as $column) {
318
- $column = preg_replace('~ DESC$~', '', $column, 1, $count);
319
- $columns[$column] = ($count ? -1 : 1);
320
- }
321
- $return = $connection->_db->selectCollection($table)->ensureIndex($columns, array(
322
- "unique" => ($type == "UNIQUE"),
323
- "name" => $name,
324
- //! "sparse"
325
- ));
326
- }
327
- if ($return['errmsg']) {
328
- $connection->error = $return['errmsg'];
329
- return false;
330
- }
331
- }
332
- return true;
333
- }
334
-
335
- function last_id() {
336
- global $connection;
337
- return $connection->last_id;
338
- }
339
-
340
- function table($idf) {
341
- return $idf;
342
- }
343
-
344
- function idf_escape($idf) {
345
- return $idf;
346
- }
347
-
348
- function support($feature) {
349
- return preg_match("~database|indexes~", $feature);
350
- }
351
-
352
  $jush = "mongo";
353
- $operators = array("=");
354
  $functions = array();
355
  $grouping = array();
356
  $edit_functions = array(array("json"));
1
  <?php
2
+ $drivers["mongo"] = "MongoDB";
3
 
4
  if (isset($_GET["mongo"])) {
5
+ $possible_drivers = array("mongo", "mongodb");
6
  define("DRIVER", "mongo");
7
 
8
  if (class_exists('MongoDB')) {
109
  }
110
 
111
  }
 
112
 
113
 
114
 
115
+ class Min_Driver extends Min_SQL {
116
+ public $primary = "_id";
117
+
118
+ function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
119
+ $select = ($select == array("*")
120
+ ? array()
121
+ : array_fill_keys($select, true)
122
+ );
123
+ $sort = array();
124
+ foreach ($order as $val) {
125
+ $val = preg_replace('~ DESC$~', '', $val, 1, $count);
126
+ $sort[$val] = ($count ? -1 : 1);
127
+ }
128
+ return new Min_Result($this->_conn->_db->selectCollection($table)
129
+ ->find(array(), $select)
130
+ ->sort($sort)
131
+ ->limit($limit != "" ? +$limit : 0)
132
+ ->skip($page * $limit)
133
+ );
134
+ }
135
+
136
+ function insert($table, $set) {
137
+ try {
138
+ $return = $this->_conn->_db->selectCollection($table)->insert($set);
139
+ $this->_conn->errno = $return['code'];
140
+ $this->_conn->error = $return['err'];
141
+ $this->_conn->last_id = $set['_id'];
142
+ return !$return['err'];
143
+ } catch (Exception $ex) {
144
+ $this->_conn->error = $ex->getMessage();
145
+ return false;
146
+ }
147
+ }
148
+ }
149
+
150
+ function get_databases($flush) {
151
+ global $connection;
152
+ $return = array();
153
+ $dbs = $connection->_link->listDBs();
154
+ foreach ($dbs['databases'] as $db) {
155
+ $return[] = $db['name'];
156
+ }
157
+ return $return;
158
+ }
159
+
160
+ function count_tables($databases) {
161
+ global $connection;
162
+ $return = array();
163
+ foreach ($databases as $db) {
164
+ $return[$db] = count($connection->_link->selectDB($db)->getCollectionNames(true));
165
+ }
166
+ return $return;
167
+ }
168
+
169
+ function tables_list() {
170
+ global $connection;
171
+ return array_fill_keys($connection->_db->getCollectionNames(true), 'table');
172
+ }
173
+
174
+ function drop_databases($databases) {
175
+ global $connection;
176
+ foreach ($databases as $db) {
177
+ $response = $connection->_link->selectDB($db)->drop();
178
+ if (!$response['ok']) {
179
+ return false;
180
+ }
181
+ }
182
+ return true;
183
+ }
184
+
185
+ function indexes($table, $connection2 = null) {
186
+ global $connection;
187
+ $return = array();
188
+ foreach ($connection->_db->selectCollection($table)->getIndexInfo() as $index) {
189
+ $descs = array();
190
+ foreach ($index["key"] as $column => $type) {
191
+ $descs[] = ($type == -1 ? '1' : null);
192
+ }
193
+ $return[$index["name"]] = array(
194
+ "type" => ($index["name"] == "_id_" ? "PRIMARY" : ($index["unique"] ? "UNIQUE" : "INDEX")),
195
+ "columns" => array_keys($index["key"]),
196
+ "lengths" => array(),
197
+ "descs" => $descs,
198
+ );
199
+ }
200
+ return $return;
201
+ }
202
+
203
+ function fields($table) {
204
+ return fields_from_edit();
205
+ }
206
+
207
+ function found_rows($table_status, $where) {
208
+ global $connection;
209
+ //! don't call count_rows()
210
+ return $connection->_db->selectCollection($_GET["select"])->count($where);
211
  }
212
+
213
+ $operators = array("=");
214
+
215
+ } elseif (class_exists('MongoDB\Driver\Manager')) {
216
+ class Min_DB {
217
+ var $extension = "MongoDB", $error, $last_id;
218
+ /** @var MongoDB\Driver\Manager */
219
+ var $_link;
220
+ var $_db, $_db_name;
221
+
222
+ function connect($server, $username, $password) {
223
+ global $adminer;
224
+ $db = $adminer->database();
225
+ $options = array();
226
+ if ($username != "") {
227
+ $options["username"] = $username;
228
+ $options["password"] = $password;
229
+ }
230
+ if ($db != "") {
231
+ $options["db"] = $db;
232
+ }
233
+ try {
234
+ $class = 'MongoDB\Driver\Manager';
235
+ $this->_link = new $class("mongodb://$server", $options);
236
+ return true;
237
+ } catch (Exception $ex) {
238
+ $this->error = $ex->getMessage();
239
+ return false;
240
+ }
241
+ }
242
+
243
+ function query($query) {
244
  return false;
245
  }
246
+
247
+ function select_db($database) {
248
+ try {
249
+ $this->_db_name = $database;
250
+ return true;
251
+ } catch (Exception $ex) {
252
+ $this->error = $ex->getMessage();
253
+ return false;
254
+ }
255
+ }
256
+
257
+ function quote($string) {
258
+ return $string;
259
+ }
260
+
261
  }
 
262
 
263
+ class Min_Result {
264
+ var $num_rows, $_rows = array(), $_offset = 0, $_charset = array();
265
+
266
+ function __construct($result) {
267
+ foreach ($result as $item) {
268
+ $row = array();
269
+ foreach ($item as $key => $val) {
270
+ if (is_a($val, 'MongoDB\BSON\Binary')) {
271
+ $this->_charset[$key] = 63;
272
+ }
273
+ $row[$key] =
274
+ (is_a($val, 'MongoDB\BSON\ObjectID') ? 'MongoDB\BSON\ObjectID("' . strval($val) . '")' :
275
+ (is_a($val, 'MongoDB\BSON\UTCDatetime') ? $val->toDateTime()->format('Y-m-d H:i:s') :
276
+ (is_a($val, 'MongoDB\BSON\Binary') ? $val->bin : //! allow downloading
277
+ (is_a($val, 'MongoDB\BSON\Regex') ? strval($val) :
278
+ (is_object($val) ? json_encode($val, 256) : // 256 = JSON_UNESCAPED_UNICODE
279
+ $val // MongoMinKey, MongoMaxKey
280
+ )))));
281
+ }
282
+ $this->_rows[] = $row;
283
+ foreach ($row as $key => $val) {
284
+ if (!isset($this->_rows[0][$key])) {
285
+ $this->_rows[0][$key] = null;
286
+ }
287
+ }
288
+ }
289
+ $this->num_rows = $result->count;
290
+ }
291
+
292
+ function fetch_assoc() {
293
+ $row = current($this->_rows);
294
+ if (!$row) {
295
+ return $row;
296
+ }
297
+ $return = array();
298
+ foreach ($this->_rows[0] as $key => $val) {
299
+ $return[$key] = $row[$key];
300
+ }
301
+ next($this->_rows);
302
+ return $return;
303
+ }
304
 
305
+ function fetch_row() {
306
+ $return = $this->fetch_assoc();
307
+ if (!$return) {
308
+ return $return;
309
+ }
310
+ return array_values($return);
311
+ }
312
+
313
+ function fetch_field() {
314
+ $keys = array_keys($this->_rows[0]);
315
+ $name = $keys[$this->_offset++];
316
+ return (object) array(
317
+ 'name' => $name,
318
+ 'charsetnr' => $this->_charset[$name],
319
+ );
320
+ }
321
 
 
 
 
 
 
 
322
  }
 
 
323
 
 
 
 
 
324
 
325
+ class Min_Driver extends Min_SQL {
326
+ public $primary = "_id";
 
 
 
327
 
328
+ function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) {
329
+ global $connection;
330
+ $select = ($select == array("*")
331
+ ? array()
332
+ : array_fill_keys($select, 1)
333
+ );
334
+ if (count($select) && !isset($select['_id'])) {
335
+ $select['_id'] = 0;
336
+ }
337
+ $where = where_to_query($where);
338
+ $sort = array();
339
+ foreach ($order as $val) {
340
+ $val = preg_replace('~ DESC$~', '', $val, 1, $count);
341
+ $sort[$val] = ($count ? -1 : 1);
342
+ }
343
+ if (isset($_GET['limit']) && is_numeric($_GET['limit']) && $_GET['limit'] > 0) {
344
+ $limit = $_GET['limit'];
345
+ }
346
+ $limit = min(200, max(1, (int) $limit));
347
+ $skip = $page * $limit;
348
+ $class = 'MongoDB\Driver\Query';
349
+ $query = new $class($where, array('projection' => $select, 'limit' => $limit, 'skip' => $skip, 'sort' => $sort));
350
+ $results = $connection->_link->executeQuery("$connection->_db_name.$table", $query);
351
+ return new Min_Result($results);
352
+ }
353
+
354
+ function update($table, $set, $queryWhere, $limit = 0, $separator = "\n") {
355
+ global $connection;
356
+ $db = $connection->_db_name;
357
+ $where = sql_query_where_parser($queryWhere);
358
+ $class = 'MongoDB\Driver\BulkWrite';
359
+ $bulk = new $class(array());
360
+ if (isset($set['_id'])) {
361
+ unset($set['_id']);
362
+ }
363
+ $removeFields = array();
364
+ foreach ($set as $key => $value) {
365
+ if ($value == 'NULL') {
366
+ $removeFields[$key] = 1;
367
+ unset($set[$key]);
368
+ }
369
+ }
370
+ $update = array('$set' => $set);
371
+ if (count($removeFields)) {
372
+ $update['$unset'] = $removeFields;
373
+ }
374
+ $bulk->update($where, $update, array('upsert' => false));
375
+ $results = $connection->_link->executeBulkWrite("$db.$table", $bulk);
376
+ $connection->affected_rows = $results->getModifiedCount();
377
+ return true;
378
+ }
379
+
380
+ function delete($table, $queryWhere, $limit = 0) {
381
+ global $connection;
382
+ $db = $connection->_db_name;
383
+ $where = sql_query_where_parser($queryWhere);
384
+ $class = 'MongoDB\Driver\BulkWrite';
385
+ $bulk = new $class(array());
386
+ $bulk->delete($where, array('limit' => $limit));
387
+ $results = $connection->_link->executeBulkWrite("$db.$table", $bulk);
388
+ $connection->affected_rows = $results->getDeletedCount();
389
+ return true;
390
+ }
391
+
392
+ function insert($table, $set) {
393
+ global $connection;
394
+ $db = $connection->_db_name;
395
+ $class = 'MongoDB\Driver\BulkWrite';
396
+ $bulk = new $class(array());
397
+ if (isset($set['_id']) && empty($set['_id'])) {
398
+ unset($set['_id']);
399
+ }
400
+ $bulk->insert($set);
401
+ $results = $connection->_link->executeBulkWrite("$db.$table", $bulk);
402
+ $connection->affected_rows = $results->getInsertedCount();
403
+ return true;
404
+ }
405
  }
 
 
406
 
407
+ function get_databases($flush) {
408
+ /** @var $connection Min_DB */
409
+ global $connection;
410
+ $return = array();
411
+ $class = 'MongoDB\Driver\Command';
412
+ $command = new $class(array('listDatabases' => 1));
413
+ $results = $connection->_link->executeCommand('admin', $command);
414
+ foreach ($results as $dbs) {
415
+ foreach ($dbs->databases as $db) {
416
+ $return[] = $db->name;
417
+ }
418
+ }
419
+ return $return;
420
+ }
421
 
422
+ function count_tables($databases) {
423
+ $return = array();
424
+ return $return;
425
+ }
426
 
427
+ function tables_list() {
428
+ global $connection;
429
+ $class = 'MongoDB\Driver\Command';
430
+ $command = new $class(array('listCollections' => 1));
431
+ $results = $connection->_link->executeCommand($connection->_db_name, $command);
432
+ $collections = array();
433
+ foreach ($results as $result) {
434
+ $collections[$result->name] = 'table';
435
+ }
436
+ return $collections;
437
  }
438
+
439
+ function drop_databases($databases) {
440
+ return false;
441
+ }
442
+
443
+ function indexes($table, $connection2 = null) {
444
+ global $connection;
445
+ $return = array();
446
+ $class = 'MongoDB\Driver\Command';
447
+ $command = new $class(array('listIndexes' => $table));
448
+ $results = $connection->_link->executeCommand($connection->_db_name, $command);
449
+ foreach ($results as $index) {
450
+ $descs = array();
451
+ $columns = array();
452
+ foreach (get_object_vars($index->key) as $column => $type) {
453
+ $descs[] = ($type == -1 ? '1' : null);
454
+ $columns[] = $column;
455
+ }
456
+ $return[$index->name] = array(
457
+ "type" => ($index->name == "_id_" ? "PRIMARY" : (isset($index->unique) ? "UNIQUE" : "INDEX")),
458
+ "columns" => $columns,
459
+ "lengths" => array(),
460
+ "descs" => $descs,
461
+ );
462
+ }
463
+ return $return;
464
+ }
465
+
466
+ function fields($table) {
467
+ $fields = fields_from_edit();
468
+ if (!count($fields)) {
469
+ global $driver;
470
+ $result = $driver->select($table, array("*"), null, null, array(), 10);
471
+ while ($row = $result->fetch_assoc()) {
472
+ foreach ($row as $key => $val) {
473
+ $row[$key] = null;
474
+ $fields[$key] = array(
475
+ "field" => $key,
476
+ "type" => "string",
477
+ "null" => ($key != $driver->primary),
478
+ "auto_increment" => ($key == $driver->primary),
479
+ "privileges" => array(
480
+ "insert" => 1,
481
+ "select" => 1,
482
+ "update" => 1,
483
+ ),
484
+ );
485
+ }
486
+ }
487
+ }
488
+ return $fields;
489
+ }
490
+
491
+ function found_rows($table_status, $where) {
492
+ global $connection;
493
+ $where = where_to_query($where);
494
+ $class = 'MongoDB\Driver\Command';
495
+ $command = new $class(array('count' => $table_status['Name'], 'query' => $where));
496
+ $results = $connection->_link->executeCommand($connection->_db_name, $command);
497
+ $toArray = $results->toArray();
498
+ return $toArray[0]->n;
499
+ }
500
+
501
+ function sql_query_where_parser($queryWhere) {
502
+ $queryWhere = trim(preg_replace('/WHERE[\s]?[(]?\(?/', '', $queryWhere));
503
+ $queryWhere = preg_replace('/\)\)\)$/', ')', $queryWhere);
504
+ $wheres = explode(' AND ', $queryWhere);
505
+ $wheresOr = explode(') OR (', $queryWhere);
506
+ $where = array();
507
+ foreach ($wheres as $whereStr) {
508
+ $where[] = trim($whereStr);
509
+ }
510
+ if (count($wheresOr) == 1) {
511
+ $wheresOr = array();
512
+ } elseif (count($wheresOr) > 1) {
513
+ $where = array();
514
+ }
515
+ return where_to_query($where, $wheresOr);
516
+ }
517
+
518
+ function where_to_query($whereAnd = array(), $whereOr = array()) {
519
+ global $operators;
520
+ $data = array();
521
+ foreach (array('and' => $whereAnd, 'or' => $whereOr) as $type => $where) {
522
+ if (is_array($where)) {
523
+ foreach ($where as $expression) {
524
+ list($col, $op, $val) = explode(" ", $expression, 3);
525
+ if ($col == "_id") {
526
+ $val = str_replace('MongoDB\BSON\ObjectID("', "", $val);
527
+ $val = str_replace('")', "", $val);
528
+ $class = 'MongoDB\BSON\ObjectID';
529
+ $val = new $class($val);
530
+ }
531
+ if (!in_array($op, $operators)) {
532
+ continue;
533
+ }
534
+ if (preg_match('~^\(f\)(.+)~', $op, $match)) {
535
+ $val = (float) $val;
536
+ $op = $match[1];
537
+ } elseif (preg_match('~^\(date\)(.+)~', $op, $match)) {
538
+ $dateTime = new DateTime($val);
539
+ $class = 'MongoDB\BSON\UTCDatetime';
540
+ $val = new $class($dateTime->getTimestamp() * 1000);
541
+ $op = $match[1];
542
+ }
543
+ switch ($op) {
544
+ case '=':
545
+ $op = '$eq';
546
+ break;
547
+ case '!=':
548
+ $op = '$ne';
549
+ break;
550
+ case '>':
551
+ $op = '$gt';
552
+ break;
553
+ case '<':
554
+ $op = '$lt';
555
+ break;
556
+ case '>=':
557
+ $op = '$gte';
558
+ break;
559
+ case '<=':
560
+ $op = '$lte';
561
+ break;
562
+ case 'regex':
563
+ $op = '$regex';
564
+ break;
565
+ default:
566
+ continue;
567
+ }
568
+ if ($type == 'and') {
569
+ $data['$and'][] = array($col => array($op => $val));
570
+ } elseif ($type == 'or') {
571
+ $data['$or'][] = array($col => array($op => $val));
572
+ }
573
+ }
574
+ }
575
+ }
576
+ return $data;
577
+ }
578
+
579
+ $operators = array(
580
+ "=",
581
+ "!=",
582
+ ">",
583
+ "<",
584
+ ">=",
585
+ "<=",
586
+ "regex",
587
+ "(f)=",
588
+ "(f)!=",
589
+ "(f)>",
590
+ "(f)<",
591
+ "(f)>=",
592
+ "(f)<=",
593
+ "(date)=",
594
+ "(date)!=",
595
+ "(date)>",
596
+ "(date)<",
597
+ "(date)>=",
598
+ "(date)<=",
599
+ );
600
  }
601
 
602
+ function table($idf) {
603
+ return $idf;
604
+ }
605
+
606
+ function idf_escape($idf) {
607
+ return $idf;
608
  }
609
 
610
  function table_status($name = "", $fast = false) {
618
  return $return;
619
  }
620
 
621
+ function last_id() {
622
+ global $connection;
623
+ return $connection->last_id;
624
  }
625
 
626
+ function error() {
627
+ global $connection;
628
+ return h($connection->error);
629
+ }
630
+
631
+ function collations() {
632
+ return array();
633
+ }
634
+
635
+ function logged_user() {
636
+ global $adminer;
637
+ $credentials = $adminer->credentials();
638
+ return $credentials[1];
639
+ }
640
+
641
+ function connect() {
642
+ global $adminer;
643
+ $connection = new Min_DB;
644
+ $credentials = $adminer->credentials();
645
+ if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
646
+ return $connection;
647
+ }
648
+ return $connection->error;
649
  }
650
 
651
+ function alter_indexes($table, $alter) {
652
  global $connection;
653
+ foreach ($alter as $val) {
654
+ list($type, $name, $set) = $val;
655
+ if ($set == "DROP") {
656
+ $return = $connection->_db->command(array("deleteIndexes" => $table, "index" => $name));
657
+ } else {
658
+ $columns = array();
659
+ foreach ($set as $column) {
660
+ $column = preg_replace('~ DESC$~', '', $column, 1, $count);
661
+ $columns[$column] = ($count ? -1 : 1);
662
+ }
663
+ $return = $connection->_db->selectCollection($table)->ensureIndex($columns, array(
664
+ "unique" => ($type == "UNIQUE"),
665
+ "name" => $name,
666
+ //! "sparse"
667
+ ));
668
+ }
669
+ if ($return['errmsg']) {
670
+ $connection->error = $return['errmsg'];
671
  return false;
672
  }
673
  }
674
  return true;
675
  }
676
 
677
+ function support($feature) {
678
+ return preg_match("~database|indexes~", $feature);
679
+ }
680
+
681
+ function db_collation($db, $collations) {
 
 
 
 
 
 
 
 
 
 
 
682
  }
683
 
684
+ function information_schema() {
685
+ }
686
+
687
+ function is_view($table_status) {
688
  }
689
 
690
  function convert_field($field) {
705
  return array();
706
  }
707
 
 
 
 
 
 
 
708
  function alter_table($table, $name, $fields, $foreign, $comment, $engine, $collation, $auto_increment, $partitioning) {
709
  global $connection;
710
  if ($table == "") {
735
  return true;
736
  }
737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
738
  $jush = "mongo";
 
739
  $functions = array();
740
  $grouping = array();
741
  $edit_functions = array(array("json"));
adminer/adminer/adminer/drivers/mssql.inc.php CHANGED
@@ -5,7 +5,7 @@
5
  * @author Jakub Vrana
6
  */
7
 
8
- $drivers["mssql"] = "MS SQL";
9
 
10
  if (isset($_GET["mssql"])) {
11
  $possible_drivers = array("SQLSRV", "MSSQL", "PDO_DBLIB");
@@ -308,13 +308,13 @@ if (isset($_GET["mssql"])) {
308
  return ($limit !== null ? " TOP (" . ($limit + $offset) . ")" : "") . " $query$where"; // seek later
309
  }
310
 
311
- function limit1($query, $where) {
312
- return limit($query, $where, 1);
313
  }
314
 
315
  function db_collation($db, $collations) {
316
  global $connection;
317
- return $connection->result("SELECT collation_name FROM sys.databases WHERE name = " . q($db));
318
  }
319
 
320
  function engines() {
@@ -361,7 +361,7 @@ if (isset($_GET["mssql"])) {
361
 
362
  function fields($table) {
363
  $return = array();
364
- foreach (get_rows("SELECT c.*, t.name type, d.definition [default]
365
  FROM sys.all_columns c
366
  JOIN sys.all_objects o ON c.object_id = o.object_id
367
  JOIN sys.types t ON c.user_type_id = t.user_type_id
5
  * @author Jakub Vrana
6
  */
7
 
8
+ $drivers["mssql"] = "MS SQL (beta)";
9
 
10
  if (isset($_GET["mssql"])) {
11
  $possible_drivers = array("SQLSRV", "MSSQL", "PDO_DBLIB");
308
  return ($limit !== null ? " TOP (" . ($limit + $offset) . ")" : "") . " $query$where"; // seek later
309
  }
310
 
311
+ function limit1($table, $query, $where, $separator = "\n") {
312
+ return limit($query, $where, 1, 0, $separator);
313
  }
314
 
315
  function db_collation($db, $collations) {
316
  global $connection;
317
+ return $connection->result("SELECT collation_name FROM sys.databases WHERE name = " . q($db));
318
  }
319
 
320
  function engines() {
361
 
362
  function fields($table) {
363
  $return = array();
364
+ foreach (get_rows("SELECT c.max_length, c.precision, c.scale, c.name, c.is_nullable, c.is_identity, c.collation_name, t.name type, CAST(d.definition as text) [default]
365
  FROM sys.all_columns c
366
  JOIN sys.all_objects o ON c.object_id = o.object_id
367
  JOIN sys.types t ON c.user_type_id = t.user_type_id
adminer/adminer/adminer/drivers/mysql.inc.php CHANGED
@@ -14,15 +14,21 @@ if (!defined("DRIVER")) {
14
  }
15
 
16
  function connect($server = "", $username = "", $password = "", $database = null, $port = null, $socket = null) {
 
17
  mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
18
  list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket
 
 
 
 
19
  $return = @$this->real_connect(
20
  ($server != "" ? $host : ini_get("mysqli.default_host")),
21
  ($server . $username != "" ? $username : ini_get("mysqli.default_user")),
22
  ($server . $username . $password != "" ? $password : ini_get("mysqli.default_pw")),
23
  $database,
24
  (is_numeric($port) ? $port : ini_get("mysqli.default_port")),
25
- (!is_numeric($port) ? $port : $socket)
 
26
  );
27
  return $return;
28
  }
@@ -223,7 +229,22 @@ if (!defined("DRIVER")) {
223
  var $extension = "PDO_MySQL";
224
 
225
  function connect($server, $username, $password) {
226
- $this->dsn("mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)), $username, $password);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  return true;
228
  }
229
 
@@ -276,6 +297,32 @@ if (!defined("DRIVER")) {
276
  }
277
  return queries($prefix . implode(",\n", $values) . $suffix);
278
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
 
280
  }
281
 
@@ -307,7 +354,7 @@ if (!defined("DRIVER")) {
307
  if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
308
  $connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
309
  $connection->query("SET sql_quote_show_create = 1, autocommit = 1");
310
- if (version_compare($connection->server_info, '5.7.8') >= 0) {
311
  $structured_types[lang('Strings')][] = "json";
312
  $types["json"] = 4294967295;
313
  }
@@ -325,11 +372,10 @@ if (!defined("DRIVER")) {
325
  * @return array
326
  */
327
  function get_databases($flush) {
328
- global $connection;
329
  // SHOW DATABASES can take a very long time so it is cached
330
  $return = get_session("dbs");
331
  if ($return === null) {
332
- $query = ($connection->server_info >= 5
333
  ? "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA"
334
  : "SHOW DATABASES"
335
  ); // SHOW DATABASES can be disabled by skip_show_database
@@ -354,12 +400,14 @@ if (!defined("DRIVER")) {
354
  }
355
 
356
  /** Formulate SQL modification query with limit 1
 
357
  * @param string everything after UPDATE or DELETE
358
  * @param string
 
359
  * @return string
360
  */
361
- function limit1($query, $where) {
362
- return limit($query, $where, 1);
363
  }
364
 
365
  /** Get database collation
@@ -405,8 +453,7 @@ if (!defined("DRIVER")) {
405
  * @return array array($name => $type)
406
  */
407
  function tables_list() {
408
- global $connection;
409
- return get_key_vals($connection->server_info >= 5
410
  ? "SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME"
411
  : "SHOW TABLES"
412
  );
@@ -430,9 +477,8 @@ if (!defined("DRIVER")) {
430
  * @return array array($name => array("Name" => , "Engine" => , "Comment" => , "Oid" => , "Rows" => , "Collation" => , "Auto_increment" => , "Data_length" => , "Index_length" => , "Data_free" => )) or only inner array with $name
431
  */
432
  function table_status($name = "", $fast = false) {
433
- global $connection;
434
  $return = array();
435
- foreach (get_rows($fast && $connection->server_info >= 5
436
  ? "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")
437
  : "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
438
  ) as $row) {
@@ -464,9 +510,8 @@ if (!defined("DRIVER")) {
464
  * @return bool
465
  */
466
  function fk_support($table_status) {
467
- global $connection;
468
  return preg_match('~InnoDB|IBMDB2I~i', $table_status["Engine"])
469
- || (preg_match('~NDB~i', $table_status["Engine"]) && version_compare($connection->server_info, '5.6') >= 0);
470
  }
471
 
472
  /** Get information about fields
@@ -573,9 +618,8 @@ if (!defined("DRIVER")) {
573
  * @return bool
574
  */
575
  function information_schema($db) {
576
- global $connection;
577
- return ($connection->server_info >= 5 && $db == "information_schema")
578
- || ($connection->server_info >= 5.5 && $db == "performance_schema");
579
  }
580
 
581
  /** Get escaped error message
@@ -813,8 +857,9 @@ if (!defined("DRIVER")) {
813
  function routine($name, $type) {
814
  global $connection, $enum_length, $inout, $types;
815
  $aliases = array("bool", "boolean", "integer", "double precision", "real", "dec", "numeric", "fixed", "national char", "national varchar");
 
816
  $type_pattern = "((" . implode("|", array_merge(array_keys($types), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum_length)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?";
817
- $pattern = "\\s*(" . ($type == "FUNCTION" ? "" : $inout) . ")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$type_pattern";
818
  $create = $connection->result("SHOW CREATE $type " . idf_escape($name), 2);
819
  preg_match("~\\(((?:$pattern\\s*,?)*)\\)\\s*" . ($type == "FUNCTION" ? "RETURNS\\s+$type_pattern\\s+" : "") . "(.*)~is", $create, $match);
820
  $fields = array();
@@ -844,10 +889,10 @@ if (!defined("DRIVER")) {
844
  }
845
 
846
  /** Get list of routines
847
- * @return array ("ROUTINE_TYPE" => , "ROUTINE_NAME" => , "DTD_IDENTIFIER" => )
848
  */
849
  function routines() {
850
- return get_rows("SELECT ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . q(DB));
851
  }
852
 
853
  /** Get list of available routine languages
@@ -857,6 +902,15 @@ if (!defined("DRIVER")) {
857
  return array(); // "SQL" not required
858
  }
859
 
 
 
 
 
 
 
 
 
 
860
  /** Get last auto increment ID
861
  * @return string
862
  */
@@ -871,7 +925,7 @@ if (!defined("DRIVER")) {
871
  * @return Min_Result
872
  */
873
  function explain($connection, $query) {
874
- return $connection->query("EXPLAIN " . ($connection->server_info >= 5.1 ? "PARTITIONS " : "") . $query);
875
  }
876
 
877
  /** Get approximate number of rows
@@ -915,9 +969,10 @@ if (!defined("DRIVER")) {
915
  /** Get SQL command to create table
916
  * @param string
917
  * @param bool
 
918
  * @return string
919
  */
920
- function create_sql($table, $auto_increment) {
921
  global $connection;
922
  $return = $connection->result("SHOW CREATE TABLE " . table($table), 1);
923
  if (!$auto_increment) {
@@ -944,14 +999,12 @@ if (!defined("DRIVER")) {
944
 
945
  /** Get SQL commands to create triggers
946
  * @param string
947
- * @param string
948
  * @return string
949
  */
950
- function trigger_sql($table, $style) {
951
  $return = "";
952
  foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) {
953
- $return .= "\n" . ($style == 'CREATE+ALTER' ? "DROP TRIGGER IF EXISTS " . idf_escape($row["Trigger"]) . ";;\n" : "")
954
- . "CREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
955
  }
956
  return $return;
957
  }
@@ -977,14 +1030,6 @@ if (!defined("DRIVER")) {
977
  return get_key_vals("SHOW STATUS");
978
  }
979
 
980
- /** Get replication status of master or slave
981
- * @param string
982
- * @return array ($name => $value)
983
- */
984
- function replication_status($type) {
985
- return get_rows("SHOW $type STATUS");
986
- }
987
-
988
  /** Convert field in select and edit
989
  * @param array one element from fields()
990
  * @return string
@@ -997,7 +1042,7 @@ if (!defined("DRIVER")) {
997
  return "BIN(" . idf_escape($field["field"]) . " + 0)"; // + 0 is required outside MySQLnd
998
  }
999
  if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
1000
- return "AsWKT(" . idf_escape($field["field"]) . ")";
1001
  }
1002
  }
1003
 
@@ -1014,7 +1059,7 @@ if (!defined("DRIVER")) {
1014
  $return = "CONV($return, 2, 10) + 0";
1015
  }
1016
  if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
1017
- $return = "GeomFromText($return)";
1018
  }
1019
  return $return;
1020
  }
@@ -1024,8 +1069,7 @@ if (!defined("DRIVER")) {
1024
  * @return bool
1025
  */
1026
  function support($feature) {
1027
- global $connection;
1028
- return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . ($connection->server_info < 5.1 ? "|event|partitioning" . ($connection->server_info < 5 ? "|routine|trigger|view" : "") : "") . "~", $feature);
1029
  }
1030
 
1031
  function kill_process($val) {
@@ -1056,8 +1100,8 @@ if (!defined("DRIVER")) {
1056
  $structured_types[$key] = array_keys($val);
1057
  }
1058
  $unsigned = array("unsigned", "zerofill", "unsigned zerofill"); ///< @var array number variants
1059
- $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"); ///< @var array operators used in select
1060
- $functions = array("char_length", "date", "from_unixtime", "lower", "round", "sec_to_time", "time_to_sec", "upper"); ///< @var array functions used in select
1061
  $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"); ///< @var array grouping functions used in select
1062
  $edit_functions = array( ///< @var array of array("$type|$type2" => "$function/$function2") functions used in editing, [0] - edit and insert, [1] - edit only
1063
  array(
@@ -1065,7 +1109,7 @@ if (!defined("DRIVER")) {
1065
  "binary" => "md5/sha1",
1066
  "date|time" => "now",
1067
  ), array(
1068
- "(^|[^o])int|float|double|decimal" => "+/-", // not point
1069
  "date" => "+ interval/- interval",
1070
  "time" => "addtime/subtime",
1071
  "char|text" => "concat",
14
  }
15
 
16
  function connect($server = "", $username = "", $password = "", $database = null, $port = null, $socket = null) {
17
+ global $adminer;
18
  mysqli_report(MYSQLI_REPORT_OFF); // stays between requests, not required since PHP 5.3.4
19
  list($host, $port) = explode(":", $server, 2); // part after : is used for port or socket
20
+ $ssl = $adminer->connectSsl();
21
+ if ($ssl) {
22
+ $this->ssl_set($ssl['key'], $ssl['cert'], $ssl['ca'], '', '');
23
+ }
24
  $return = @$this->real_connect(
25
  ($server != "" ? $host : ini_get("mysqli.default_host")),
26
  ($server . $username != "" ? $username : ini_get("mysqli.default_user")),
27
  ($server . $username . $password != "" ? $password : ini_get("mysqli.default_pw")),
28
  $database,
29
  (is_numeric($port) ? $port : ini_get("mysqli.default_port")),
30
+ (!is_numeric($port) ? $port : $socket),
31
+ ($ssl ? 64 : 0) // 64 - MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT (not available before PHP 5.6.16)
32
  );
33
  return $return;
34
  }
229
  var $extension = "PDO_MySQL";
230
 
231
  function connect($server, $username, $password) {
232
+ global $adminer;
233
+ $options = array();
234
+ $ssl = $adminer->connectSsl();
235
+ if ($ssl) {
236
+ $options = array(
237
+ PDO::MYSQL_ATTR_SSL_KEY => $ssl['key'],
238
+ PDO::MYSQL_ATTR_SSL_CERT => $ssl['cert'],
239
+ PDO::MYSQL_ATTR_SSL_CA => $ssl['ca'],
240
+ );
241
+ }
242
+ $this->dsn(
243
+ "mysql:charset=utf8;host=" . str_replace(":", ";unix_socket=", preg_replace('~:(\\d)~', ';port=\\1', $server)),
244
+ $username,
245
+ $password,
246
+ $options
247
+ );
248
  return true;
249
  }
250
 
297
  }
298
  return queries($prefix . implode(",\n", $values) . $suffix);
299
  }
300
+
301
+ function convertSearch($idf, $val, $field) {
302
+ return (preg_match('~char|text|enum|set~', $field["type"]) && !preg_match("~^utf8~", $field["collation"])
303
+ ? "CONVERT($idf USING " . charset($this->_conn) . ")"
304
+ : $idf
305
+ );
306
+ }
307
+
308
+ function warnings() {
309
+ $result = $this->_conn->query("SHOW WARNINGS");
310
+ if ($result && $result->num_rows) {
311
+ ob_start();
312
+ select($result); // select() usually needs to print a big table progressively
313
+ return ob_get_clean();
314
+ }
315
+ }
316
+
317
+ function tableHelp($name) {
318
+ $maria = preg_match('~MariaDB~', $this->_conn->server_info);
319
+ if (information_schema(DB)) {
320
+ return strtolower(($maria ? "information-schema-$name-table/" : str_replace("_", "-", $name) . "-table.html"));
321
+ }
322
+ if (DB == "mysql") {
323
+ return ($maria ? "mysql$name-table/" : "system-database.html"); //! more precise link
324
+ }
325
+ }
326
 
327
  }
328
 
354
  if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
355
  $connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
356
  $connection->query("SET sql_quote_show_create = 1, autocommit = 1");
357
+ if (min_version('5.7.8', 10.2, $connection)) {
358
  $structured_types[lang('Strings')][] = "json";
359
  $types["json"] = 4294967295;
360
  }
372
  * @return array
373
  */
374
  function get_databases($flush) {
 
375
  // SHOW DATABASES can take a very long time so it is cached
376
  $return = get_session("dbs");
377
  if ($return === null) {
378
+ $query = (min_version(5)
379
  ? "SELECT SCHEMA_NAME FROM information_schema.SCHEMATA"
380
  : "SHOW DATABASES"
381
  ); // SHOW DATABASES can be disabled by skip_show_database
400
  }
401
 
402
  /** Formulate SQL modification query with limit 1
403
+ * @param string
404
  * @param string everything after UPDATE or DELETE
405
  * @param string
406
+ * @param string
407
  * @return string
408
  */
409
+ function limit1($table, $query, $where, $separator = "\n") {
410
+ return limit($query, $where, 1, 0, $separator);
411
  }
412
 
413
  /** Get database collation
453
  * @return array array($name => $type)
454
  */
455
  function tables_list() {
456
+ return get_key_vals(min_version(5)
 
457
  ? "SELECT TABLE_NAME, TABLE_TYPE FROM information_schema.TABLES WHERE TABLE_SCHEMA = DATABASE() ORDER BY TABLE_NAME"
458
  : "SHOW TABLES"
459
  );
477
  * @return array array($name => array("Name" => , "Engine" => , "Comment" => , "Oid" => , "Rows" => , "Collation" => , "Auto_increment" => , "Data_length" => , "Index_length" => , "Data_free" => )) or only inner array with $name
478
  */
479
  function table_status($name = "", $fast = false) {
 
480
  $return = array();
481
+ foreach (get_rows($fast && min_version(5)
482
  ? "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")
483
  : "SHOW TABLE STATUS" . ($name != "" ? " LIKE " . q(addcslashes($name, "%_\\")) : "")
484
  ) as $row) {
510
  * @return bool
511
  */
512
  function fk_support($table_status) {
 
513
  return preg_match('~InnoDB|IBMDB2I~i', $table_status["Engine"])
514
+ || (preg_match('~NDB~i', $table_status["Engine"]) && min_version(5.6));
515
  }
516
 
517
  /** Get information about fields
618
  * @return bool
619
  */
620
  function information_schema($db) {
621
+ return (min_version(5) && $db == "information_schema")
622
+ || (min_version(5.5) && $db == "performance_schema");
 
623
  }
624
 
625
  /** Get escaped error message
857
  function routine($name, $type) {
858
  global $connection, $enum_length, $inout, $types;
859
  $aliases = array("bool", "boolean", "integer", "double precision", "real", "dec", "numeric", "fixed", "national char", "national varchar");
860
+ $space = "(?:\\s|/\\*[\s\S]*?\\*/|(?:#|-- )[^\n]*\n?|--\r?\n)";
861
  $type_pattern = "((" . implode("|", array_merge(array_keys($types), $aliases)) . ")\\b(?:\\s*\\(((?:[^'\")]|$enum_length)++)\\))?\\s*(zerofill\\s*)?(unsigned(?:\\s+zerofill)?)?)(?:\\s*(?:CHARSET|CHARACTER\\s+SET)\\s*['\"]?([^'\"\\s,]+)['\"]?)?";
862
+ $pattern = "$space*(" . ($type == "FUNCTION" ? "" : $inout) . ")?\\s*(?:`((?:[^`]|``)*)`\\s*|\\b(\\S+)\\s+)$type_pattern";
863
  $create = $connection->result("SHOW CREATE $type " . idf_escape($name), 2);
864
  preg_match("~\\(((?:$pattern\\s*,?)*)\\)\\s*" . ($type == "FUNCTION" ? "RETURNS\\s+$type_pattern\\s+" : "") . "(.*)~is", $create, $match);
865
  $fields = array();
889
  }
890
 
891
  /** Get list of routines
892
+ * @return array ("SPECIFIC_NAME" => , "ROUTINE_NAME" => , "ROUTINE_TYPE" => , "DTD_IDENTIFIER" => )
893
  */
894
  function routines() {
895
+ return get_rows("SELECT ROUTINE_NAME AS SPECIFIC_NAME, ROUTINE_NAME, ROUTINE_TYPE, DTD_IDENTIFIER FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = " . q(DB));
896
  }
897
 
898
  /** Get list of available routine languages
902
  return array(); // "SQL" not required
903
  }
904
 
905
+ /** Get routine signature
906
+ * @param string
907
+ * @param array result of routine()
908
+ * @return string
909
+ */
910
+ function routine_id($name, $row) {
911
+ return idf_escape($name);
912
+ }
913
+
914
  /** Get last auto increment ID
915
  * @return string
916
  */
925
  * @return Min_Result
926
  */
927
  function explain($connection, $query) {
928
+ return $connection->query("EXPLAIN " . (min_version(5.1) ? "PARTITIONS " : "") . $query);
929
  }
930
 
931
  /** Get approximate number of rows
969
  /** Get SQL command to create table
970
  * @param string
971
  * @param bool
972
+ * @param string
973
  * @return string
974
  */
975
+ function create_sql($table, $auto_increment, $style) {
976
  global $connection;
977
  $return = $connection->result("SHOW CREATE TABLE " . table($table), 1);
978
  if (!$auto_increment) {
999
 
1000
  /** Get SQL commands to create triggers
1001
  * @param string
 
1002
  * @return string
1003
  */
1004
+ function trigger_sql($table) {
1005
  $return = "";
1006
  foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) {
1007
+ $return .= "\nCREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
 
1008
  }
1009
  return $return;
1010
  }
1030
  return get_key_vals("SHOW STATUS");
1031
  }
1032
 
 
 
 
 
 
 
 
 
1033
  /** Convert field in select and edit
1034
  * @param array one element from fields()
1035
  * @return string
1042
  return "BIN(" . idf_escape($field["field"]) . " + 0)"; // + 0 is required outside MySQLnd
1043
  }
1044
  if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
1045
+ return (min_version(8) ? "ST_" : "") . "AsWKT(" . idf_escape($field["field"]) . ")";
1046
  }
1047
  }
1048
 
1059
  $return = "CONV($return, 2, 10) + 0";
1060
  }
1061
  if (preg_match("~geometry|point|linestring|polygon~", $field["type"])) {
1062
+ $return = (min_version(8) ? "ST_" : "") . "GeomFromText($return)";
1063
  }
1064
  return $return;
1065
  }
1069
  * @return bool
1070
  */
1071
  function support($feature) {
1072
+ return !preg_match("~scheme|sequence|type|view_trigger|materializedview" . (min_version(5.1) ? "" : "|event|partitioning" . (min_version(5) ? "" : "|routine|trigger|view")) . "~", $feature);
 
1073
  }
1074
 
1075
  function kill_process($val) {
1100
  $structured_types[$key] = array_keys($val);
1101
  }
1102
  $unsigned = array("unsigned", "zerofill", "unsigned zerofill"); ///< @var array number variants
1103
+ $operators = array("=", "<", ">", "<=", ">=", "!=", "LIKE", "LIKE %%", "REGEXP", "IN", "FIND_IN_SET", "IS NULL", "NOT LIKE", "NOT REGEXP", "NOT IN", "IS NOT NULL", "SQL"); ///< @var array operators used in select
1104
+ $functions = array("char_length", "date", "from_unixtime", "lower", "round", "floor", "ceil", "sec_to_time", "time_to_sec", "upper"); ///< @var array functions used in select
1105
  $grouping = array("avg", "count", "count distinct", "group_concat", "max", "min", "sum"); ///< @var array grouping functions used in select
1106
  $edit_functions = array( ///< @var array of array("$type|$type2" => "$function/$function2") functions used in editing, [0] - edit and insert, [1] - edit only
1107
  array(
1109
  "binary" => "md5/sha1",
1110
  "date|time" => "now",
1111
  ), array(
1112
+ number_type() => "+/-",
1113
  "date" => "+ interval/- interval",
1114
  "time" => "addtime/subtime",
1115
  "char|text" => "concat",
adminer/adminer/adminer/drivers/oracle.inc.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- $drivers["oracle"] = "Oracle";
3
 
4
  if (isset($_GET["oracle"])) {
5
  $possible_drivers = array("OCI8", "PDO_OCI");
@@ -175,8 +175,8 @@ if (isset($_GET["oracle"])) {
175
  ));
176
  }
177
 
178
- function limit1($query, $where) {
179
- return " $query$where";
180
  }
181
 
182
  function db_collation($db, $collations) {
1
  <?php
2
+ $drivers["oracle"] = "Oracle (beta)";
3
 
4
  if (isset($_GET["oracle"])) {
5
  $possible_drivers = array("OCI8", "PDO_OCI");
175
  ));
176
  }
177
 
178
+ function limit1($table, $query, $where, $separator = "\n") {
179
+ return " $query$where"; //! limit
180
  }
181
 
182
  function db_collation($db, $collations) {
adminer/adminer/adminer/drivers/pgsql.inc.php CHANGED
@@ -37,7 +37,15 @@ if (isset($_GET["pgsql"])) {
37
  }
38
 
39
  function quote($string) {
40
- return "'" . pg_escape_string($this->_link, $string) . "'"; //! bytea
 
 
 
 
 
 
 
 
41
  }
42
 
43
  function select_db($database) {
@@ -89,6 +97,10 @@ if (isset($_GET["pgsql"])) {
89
  }
90
  return pg_fetch_result($result->_result, 0, $field);
91
  }
 
 
 
 
92
  }
93
 
94
  class Min_Result {
@@ -143,6 +155,18 @@ if (isset($_GET["pgsql"])) {
143
  return ($adminer->database() == $database);
144
  }
145
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  function close() {
147
  }
148
  }
@@ -173,6 +197,36 @@ if (isset($_GET["pgsql"])) {
173
  return true;
174
  }
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  }
177
 
178
 
@@ -190,12 +244,12 @@ if (isset($_GET["pgsql"])) {
190
  $connection = new Min_DB;
191
  $credentials = $adminer->credentials();
192
  if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
193
- if ($connection->server_info >= 9) {
194
  $connection->query("SET application_name = 'Adminer'");
195
- if ($connection->server_info >= 9.2) {
196
  $structured_types[lang('Strings')][] = "json";
197
  $types["json"] = 4294967295;
198
- if ($connection->server_info >= 9.4) {
199
  $structured_types[lang('Strings')][] = "jsonb";
200
  $types["jsonb"] = 4294967295;
201
  }
@@ -214,8 +268,11 @@ if (isset($_GET["pgsql"])) {
214
  return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
215
  }
216
 
217
- function limit1($query, $where) {
218
- return " $query$where";
 
 
 
219
  }
220
 
221
  function db_collation($db, $collations) {
@@ -252,11 +309,11 @@ ORDER BY 1";
252
 
253
  function table_status($name = "") {
254
  $return = array();
255
- 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
256
  FROM pg_class c
257
  JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace)
258
- WHERE relkind IN ('r', 'm', 'v')
259
- " . ($name != "" ? "AND relname = " . q($name) : "ORDER BY c.oid")
260
  ) as $row) { //! Index_length, Auto_increment
261
  $return[$row["Name"]] = $row;
262
  }
@@ -304,7 +361,7 @@ ORDER BY a.attnum"
304
  $row["auto_increment"] = preg_match('~^nextval\\(~i', $row["default"]);
305
  $row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
306
  if (preg_match('~(.+)::[^)]+(.*)~', $row["default"], $match)) {
307
- $row["default"] = ($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]) . $match[2];
308
  }
309
  $return[$row["field"]] = $row;
310
  }
@@ -360,7 +417,9 @@ ORDER BY conkey, conname") as $row) {
360
 
361
  function view($name) {
362
  global $connection;
363
- return array("select" => trim($connection->result("SELECT pg_get_viewdef(" . q($name) . ")")));
 
 
364
  }
365
 
366
  function collations() {
@@ -541,30 +600,36 @@ ORDER BY conkey, conname") as $row) {
541
  );
542
  }
543
 
544
- /*
545
  function routine($name, $type) {
546
- //! there can be more functions with the same name differing only in parameters, it must be also passed to DROP FUNCTION
547
- //! no procedures, only functions
548
- //! different syntax of CREATE FUNCTION
549
- $rows = get_rows('SELECT pg_catalog.format_type(p.prorettype, NULL) AS "returns", p.prosrc AS "definition"
550
- FROM pg_catalog.pg_namespace n
551
- JOIN pg_catalog.pg_proc p ON p.pronamespace = n.oid
552
- WHERE n.nspname = current_schema() AND p.proname = ' . q($name));
553
- $rows[0]["fields"] = array(); //!
554
- return $rows[0];
555
- }
556
- */
557
 
558
  function routines() {
559
- return get_rows('SELECT p.proname AS "ROUTINE_NAME", p.proargtypes AS "ROUTINE_TYPE", pg_catalog.format_type(p.prorettype, NULL) AS "DTD_IDENTIFIER"
560
- FROM pg_catalog.pg_namespace n
561
- JOIN pg_catalog.pg_proc p ON p.pronamespace = n.oid
562
- WHERE n.nspname = current_schema()
563
- ORDER BY p.proname');
564
  }
565
 
566
  function routine_languages() {
567
- return get_vals("SELECT langname FROM pg_catalog.pg_language");
 
 
 
 
 
 
 
 
568
  }
569
 
570
  function last_id() {
@@ -617,12 +682,7 @@ AND typelem = 0"
617
  return $return;
618
  }
619
 
620
- /** Get SQL command to create table
621
- * @param string
622
- * @param bool
623
- * @return string
624
- */
625
- function create_sql($table, $auto_increment) {
626
  global $connection;
627
  $return = '';
628
  $return_parts = array();
@@ -634,7 +694,6 @@ AND typelem = 0"
634
  ksort($indexes);
635
  $fkeys = foreign_keys($table);
636
  ksort($fkeys);
637
- $triggers = triggers($table);
638
 
639
  if (!$status || empty($fields)) {
640
  return false;
@@ -645,15 +704,19 @@ AND typelem = 0"
645
  // fields' definitions
646
  foreach ($fields as $field_name => $field) {
647
  $part = idf_escape($field['field']) . ' ' . $field['full_type']
648
- . (is_null($field['default']) ? "" : " DEFAULT $field[default]")
649
  . ($field['attnotnull'] ? " NOT NULL" : "");
650
  $return_parts[] = $part;
651
 
652
  // sequences for fields
653
  if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
654
  $sequence_name = $matches[1];
655
- $sq = reset(get_rows("SELECT * FROM $sequence_name"));
656
- $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];";
 
 
 
 
657
  }
658
  }
659
 
@@ -695,30 +758,21 @@ AND typelem = 0"
695
  }
696
  }
697
 
698
- // triggers
699
- foreach ($triggers as $trg_id => $trg) {
700
- $trigger = trigger($trg_id, $status['Name']);
701
- $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];";
702
- }
703
-
704
  return rtrim($return, ';');
705
  }
706
 
707
- /** Get SQL commands to create triggers
708
- * @param string
709
- * @param string
710
- * @return string
711
- */
712
- //@TODO
713
- function trigger_sql($table, $style) {
714
- $return = "";
715
- //foreach (get_rows("SHOW TRIGGERS LIKE " . q(addcslashes($table, "%_\\")), null, "-- ") as $row) {
716
- // $return .= "\n" . ($style == 'CREATE+ALTER' ? "DROP TRIGGER IF EXISTS " . idf_escape($row["Trigger"]) . ";;\n" : "")
717
- // . "CREATE TRIGGER " . idf_escape($row["Trigger"]) . " $row[Timing] $row[Event] ON " . table($row["Table"]) . " FOR EACH ROW\n$row[Statement];;\n";
718
- //}
719
- //return $return;
720
 
721
- return false;
 
 
 
 
 
 
 
722
  }
723
 
724
 
@@ -731,8 +785,7 @@ AND typelem = 0"
731
  }
732
 
733
  function process_list() {
734
- global $connection;
735
- return get_rows("SELECT * FROM pg_stat_activity ORDER BY " . ($connection->server_info < 9.2 ? "procpid" : "pid"));
736
  }
737
 
738
  function show_status() {
@@ -746,8 +799,7 @@ AND typelem = 0"
746
  }
747
 
748
  function support($feature) {
749
- global $connection;
750
- 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|
751
  }
752
 
753
  function kill_process($val) {
@@ -786,7 +838,7 @@ AND typelem = 0"
786
  "char" => "md5",
787
  "date|time" => "now",
788
  ), array(
789
- "int|numeric|real|money" => "+/-",
790
  "date|time" => "+ interval/- interval", //! escape
791
  "char|text" => "||",
792
  )
37
  }
38
 
39
  function quote($string) {
40
+ return "'" . pg_escape_string($this->_link, $string) . "'";
41
+ }
42
+
43
+ function value($val, $field) {
44
+ return ($field["type"] == "bytea" ? pg_unescape_bytea($val) : $val);
45
+ }
46
+
47
+ function quoteBinary($string) {
48
+ return "'" . pg_escape_bytea($this->_link, $string) . "'";
49
  }
50
 
51
  function select_db($database) {
97
  }
98
  return pg_fetch_result($result->_result, 0, $field);
99
  }
100
+
101
+ function warnings() {
102
+ return h(pg_last_notice($this->_link)); // second parameter is available since PHP 7.1.0
103
+ }
104
  }
105
 
106
  class Min_Result {
155
  return ($adminer->database() == $database);
156
  }
157
 
158
+ function value($val, $field) {
159
+ return $val;
160
+ }
161
+
162
+ function quoteBinary($s) {
163
+ return q($s);
164
+ }
165
+
166
+ function warnings() {
167
+ return ''; // not implemented in PDO_PgSQL as of PHP 7.2.1
168
+ }
169
+
170
  function close() {
171
  }
172
  }
197
  return true;
198
  }
199
 
200
+ function convertSearch($idf, $val, $field) {
201
+ return (preg_match('~char|text' . (is_numeric($val["val"]) && !preg_match('~LIKE~', $val["op"]) ? '|' . number_type() : '') . '~', $field["type"])
202
+ ? $idf
203
+ : "CAST($idf AS text)"
204
+ );
205
+ }
206
+
207
+ function value($val, $field) {
208
+ return $this->_conn->value($val, $field);
209
+ }
210
+
211
+ function quoteBinary($s) {
212
+ return $this->_conn->quoteBinary($s);
213
+ }
214
+
215
+ function warnings() {
216
+ return $this->_conn->warnings();
217
+ }
218
+
219
+ function tableHelp($name) {
220
+ $links = array(
221
+ "information_schema" => "infoschema",
222
+ "pg_catalog" => "catalog",
223
+ );
224
+ $link = $links[$_GET["ns"]];
225
+ if ($link) {
226
+ return "$link-" . str_replace("_", "-", $name) . ".html";
227
+ }
228
+ }
229
+
230
  }
231
 
232
 
244
  $connection = new Min_DB;
245
  $credentials = $adminer->credentials();
246
  if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
247
+ if (min_version(9, 0, $connection)) {
248
  $connection->query("SET application_name = 'Adminer'");
249
+ if (min_version(9.2, 0, $connection)) {
250
  $structured_types[lang('Strings')][] = "json";
251
  $types["json"] = 4294967295;
252
+ if (min_version(9.4, 0, $connection)) {
253
  $structured_types[lang('Strings')][] = "jsonb";
254
  $types["jsonb"] = 4294967295;
255
  }
268
  return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
269
  }
270
 
271
+ function limit1($table, $query, $where, $separator = "\n") {
272
+ return (preg_match('~^INTO~', $query)
273
+ ? limit($query, $where, 1, 0, $separator)
274
+ : " $query WHERE ctid = (SELECT ctid FROM " . table($table) . $where . $separator . "LIMIT 1)"
275
+ );
276
  }
277
 
278
  function db_collation($db, $collations) {
309
 
310
  function table_status($name = "") {
311
  $return = array();
312
+ 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\", CASE WHEN c.relhasoids THEN 'oid' ELSE '' END AS \"Oid\", c.reltuples as \"Rows\", n.nspname
313
  FROM pg_class c
314
  JOIN pg_namespace n ON(n.nspname = current_schema() AND n.oid = c.relnamespace)
315
+ WHERE relkind IN ('r', 'm', 'v', 'f')
316
+ " . ($name != "" ? "AND relname = " . q($name) : "ORDER BY relname")
317
  ) as $row) { //! Index_length, Auto_increment
318
  $return[$row["Name"]] = $row;
319
  }
361
  $row["auto_increment"] = preg_match('~^nextval\\(~i', $row["default"]);
362
  $row["privileges"] = array("insert" => 1, "select" => 1, "update" => 1);
363
  if (preg_match('~(.+)::[^)]+(.*)~', $row["default"], $match)) {
364
+ $row["default"] = ($match[1] == "NULL" ? null : (($match[1][0] == "'" ? idf_unescape($match[1]) : $match[1]) . $match[2]));
365
  }
366
  $return[$row["field"]] = $row;
367
  }
417
 
418
  function view($name) {
419
  global $connection;
420
+ return array("select" => trim($connection->result("SELECT view_definition
421
+ FROM information_schema.views
422
+ WHERE table_schema = current_schema() AND table_name = " . q($name))));
423
  }
424
 
425
  function collations() {
600
  );
601
  }
602
 
 
603
  function routine($name, $type) {
604
+ $rows = get_rows('SELECT routine_definition AS definition, LOWER(external_language) AS language, *
605
+ FROM information_schema.routines
606
+ WHERE routine_schema = current_schema() AND specific_name = ' . q($name));
607
+ $return = $rows[0];
608
+ $return["returns"] = array("type" => $return["type_udt_name"]);
609
+ $return["fields"] = get_rows('SELECT parameter_name AS field, data_type AS type, character_maximum_length AS length, parameter_mode AS inout
610
+ FROM information_schema.parameters
611
+ WHERE specific_schema = current_schema() AND specific_name = ' . q($name) . '
612
+ ORDER BY ordinal_position');
613
+ return $return;
614
+ }
615
 
616
  function routines() {
617
+ return get_rows('SELECT specific_name AS "SPECIFIC_NAME", routine_type AS "ROUTINE_TYPE", routine_name AS "ROUTINE_NAME", type_udt_name AS "DTD_IDENTIFIER"
618
+ FROM information_schema.routines
619
+ WHERE routine_schema = current_schema()
620
+ ORDER BY SPECIFIC_NAME');
 
621
  }
622
 
623
  function routine_languages() {
624
+ return get_vals("SELECT LOWER(lanname) FROM pg_catalog.pg_language");
625
+ }
626
+
627
+ function routine_id($name, $row) {
628
+ $return = array();
629
+ foreach ($row["fields"] as $field) {
630
+ $return[] = $field["type"];
631
+ }
632
+ return idf_escape($name) . "(" . implode(", ", $return) . ")";
633
  }
634
 
635
  function last_id() {
682
  return $return;
683
  }
684
 
685
+ function create_sql($table, $auto_increment, $style) {
 
 
 
 
 
686
  global $connection;
687
  $return = '';
688
  $return_parts = array();
694
  ksort($indexes);
695
  $fkeys = foreign_keys($table);
696
  ksort($fkeys);
 
697
 
698
  if (!$status || empty($fields)) {
699
  return false;
704
  // fields' definitions
705
  foreach ($fields as $field_name => $field) {
706
  $part = idf_escape($field['field']) . ' ' . $field['full_type']
707
+ . default_value($field)
708
  . ($field['attnotnull'] ? " NOT NULL" : "");
709
  $return_parts[] = $part;
710
 
711
  // sequences for fields
712
  if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
713
  $sequence_name = $matches[1];
714
+ $sq = reset(get_rows(min_version(10)
715
+ ? "SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = " . q($sequence_name)
716
+ : "SELECT * FROM $sequence_name"
717
+ ));
718
+ $sequences[] = ($style == "DROP+CREATE" ? "DROP SEQUENCE IF EXISTS $sequence_name;\n" : "")
719
+ . "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];";
720
  }
721
  }
722
 
758
  }
759
  }
760
 
 
 
 
 
 
 
761
  return rtrim($return, ';');
762
  }
763
 
764
+ function truncate_sql($table) {
765
+ return "TRUNCATE " . table($table);
766
+ }
 
 
 
 
 
 
 
 
 
 
767
 
768
+ function trigger_sql($table) {
769
+ $status = table_status($table);
770
+ $return = "";
771
+ foreach (triggers($table) as $trg_id => $trg) {
772
+ $trigger = trigger($trg_id, $status['Name']);
773
+ $return .= "\nCREATE TRIGGER " . idf_escape($trigger['Trigger']) . " $trigger[Timing] $trigger[Events] ON " . idf_escape($status["nspname"]) . "." . idf_escape($status['Name']) . " $trigger[Type] $trigger[Statement];;\n";
774
+ }
775
+ return $return;
776
  }
777
 
778
 
785
  }
786
 
787
  function process_list() {
788
+ return get_rows("SELECT * FROM pg_stat_activity ORDER BY " . (min_version(9.2) ? "pid" : "procpid"));
 
789
  }
790
 
791
  function show_status() {
799
  }
800
 
801
  function support($feature) {
802
+ return preg_match('~^(database|table|columns|sql|indexes|comment|view|' . (min_version(9.3) ? 'materializedview|' : '') . 'scheme|routine|processlist|sequence|trigger|type|variables|drop_col|kill|dump)$~', $feature);
 
803
  }
804
 
805
  function kill_process($val) {
838
  "char" => "md5",
839
  "date|time" => "now",
840
  ), array(
841
+ number_type() => "+/-",
842
  "date|time" => "+ interval/- interval", //! escape
843
  "char|text" => "||",
844
  )
adminer/adminer/adminer/drivers/simpledb.inc.php CHANGED
@@ -2,10 +2,10 @@
2
  $drivers["simpledb"] = "SimpleDB";
3
 
4
  if (isset($_GET["simpledb"])) {
5
- $possible_drivers = array("SimpleXML");
6
  define("DRIVER", "simpledb");
7
 
8
- if (class_exists('SimpleXMLElement')) {
9
  class Min_DB {
10
  var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_result;
11
 
2
  $drivers["simpledb"] = "SimpleDB";
3
 
4
  if (isset($_GET["simpledb"])) {
5
+ $possible_drivers = array("SimpleXML + allow_url_fopen");
6
  define("DRIVER", "simpledb");
7
 
8
+ if (class_exists('SimpleXMLElement') && ini_bool('allow_url_fopen')) {
9
  class Min_DB {
10
  var $extension = "SimpleXML", $server_info = '2009-04-15', $error, $timeout, $next, $affected_rows, $_result;
11
 
adminer/adminer/adminer/drivers/sqlite.inc.php CHANGED
@@ -184,11 +184,13 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
184
 
185
  function __construct() {
186
  parent::__construct(":memory:");
 
187
  }
188
 
189
  function select_db($filename) {
190
  if (is_readable($filename) && $this->query("ATTACH " . $this->quote(preg_match("~(^[/\\\\]|:)~", $filename) ? $filename : dirname($_SERVER["SCRIPT_FILENAME"]) . "/$filename") . " AS a")) { // is_readable - SQLite 3
191
  parent::__construct($filename);
 
192
  return true;
193
  }
194
  return false;
@@ -216,6 +218,15 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
216
  return queries("REPLACE INTO " . table($table) . " (" . implode(", ", array_keys(reset($rows))) . ") VALUES\n" . implode(",\n", $values));
217
  }
218
 
 
 
 
 
 
 
 
 
 
219
  }
220
 
221
 
@@ -240,9 +251,12 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
240
  return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
241
  }
242
 
243
- function limit1($query, $where) {
244
  global $connection;
245
- return ($connection->result("SELECT sqlite_compileoption_used('ENABLE_UPDATE_DELETE_LIMIT')") ? limit($query, $where, 1) : " $query$where");
 
 
 
246
  }
247
 
248
  function db_collation($db, $collations) {
@@ -269,9 +283,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
269
  function table_status($name = "") {
270
  global $connection;
271
  $return = array();
272
- foreach (get_rows("SELECT name AS Name, type AS Engine FROM sqlite_master WHERE type IN ('table', 'view') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) {
273
- $row["Oid"] = 1;
274
- $row["Auto_increment"] = "";
275
  $row["Rows"] = $connection->result("SELECT COUNT(*) FROM " . idf_escape($row["Name"]));
276
  $return[$row["Name"]] = $row;
277
  }
@@ -334,9 +346,9 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
334
  }
335
  $return = array();
336
  $sql = $connection2->result("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = " . q($table));
337
- if (preg_match('~\bPRIMARY\s+KEY\s*\((([^)"]+|"[^"]*")++)~i', $sql, $match)) {
338
  $return[""] = array("type" => "PRIMARY", "columns" => array(), "lengths" => array(), "descs" => array());
339
- preg_match_all('~((("[^"]*+")+)|(\S+))(\s+(ASC|DESC))?(,\s*|$)~i', $match[1], $matches, PREG_SET_ORDER);
340
  foreach ($matches as $match) {
341
  $return[""]["columns"][] = idf_unescape($match[2]) . $match[4];
342
  $return[""]["descs"][] = (preg_match('~DESC~i', $match[5]) ? '1' : null);
@@ -504,6 +516,9 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
504
  if ($table != "") {
505
  if (!$fields) {
506
  foreach (fields($table) as $key => $field) {
 
 
 
507
  $fields[] = process_field($field, $field);
508
  $originals[$key] = idf_escape($key);
509
  }
@@ -669,18 +684,6 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
669
  );
670
  }
671
 
672
- function routine($name, $type) {
673
- // not supported by SQLite
674
- }
675
-
676
- function routines() {
677
- // not supported by SQLite
678
- }
679
-
680
- function routine_languages() {
681
- // not supported by SQLite
682
- }
683
-
684
  function begin() {
685
  return queries("BEGIN");
686
  }
@@ -713,7 +716,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
713
  return true;
714
  }
715
 
716
- function create_sql($table, $auto_increment) {
717
  global $connection;
718
  $return = $connection->result("SELECT sql FROM sqlite_master WHERE type IN ('table', 'view') AND name = " . q($table));
719
  foreach (indexes($table) as $name => $index) {
@@ -732,7 +735,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
732
  function use_sql($database) {
733
  }
734
 
735
- function trigger_sql($table, $style) {
736
  return implode(get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND tbl_name = " . q($table)));
737
  }
738
 
184
 
185
  function __construct() {
186
  parent::__construct(":memory:");
187
+ $this->query("PRAGMA foreign_keys = 1");
188
  }
189
 
190
  function select_db($filename) {
191
  if (is_readable($filename) && $this->query("ATTACH " . $this->quote(preg_match("~(^[/\\\\]|:)~", $filename) ? $filename : dirname($_SERVER["SCRIPT_FILENAME"]) . "/$filename") . " AS a")) { // is_readable - SQLite 3
192
  parent::__construct($filename);
193
+ $this->query("PRAGMA foreign_keys = 1");
194
  return true;
195
  }
196
  return false;
218
  return queries("REPLACE INTO " . table($table) . " (" . implode(", ", array_keys(reset($rows))) . ") VALUES\n" . implode(",\n", $values));
219
  }
220
 
221
+ function tableHelp($name) {
222
+ if ($name == "sqlite_sequence") {
223
+ return "fileformat2.html#seqtab";
224
+ }
225
+ if ($name == "sqlite_master") {
226
+ return "fileformat2.html#$name";
227
+ }
228
+ }
229
+
230
  }
231
 
232
 
251
  return " $query$where" . ($limit !== null ? $separator . "LIMIT $limit" . ($offset ? " OFFSET $offset" : "") : "");
252
  }
253
 
254
+ function limit1($table, $query, $where, $separator = "\n") {
255
  global $connection;
256
+ return (preg_match('~^INTO~', $query) || $connection->result("SELECT sqlite_compileoption_used('ENABLE_UPDATE_DELETE_LIMIT')")
257
+ ? limit($query, $where, 1, 0, $separator)
258
+ : " $query WHERE rowid = (SELECT rowid FROM " . table($table) . $where . $separator . "LIMIT 1)" //! use primary key in tables with WITHOUT rowid
259
+ );
260
  }
261
 
262
  function db_collation($db, $collations) {
283
  function table_status($name = "") {
284
  global $connection;
285
  $return = array();
286
+ foreach (get_rows("SELECT name AS Name, type AS Engine, 'rowid' AS Oid, '' AS Auto_increment FROM sqlite_master WHERE type IN ('table', 'view') " . ($name != "" ? "AND name = " . q($name) : "ORDER BY name")) as $row) {
 
 
287
  $row["Rows"] = $connection->result("SELECT COUNT(*) FROM " . idf_escape($row["Name"]));
288
  $return[$row["Name"]] = $row;
289
  }
346
  }
347
  $return = array();
348
  $sql = $connection2->result("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = " . q($table));
349
+ if (preg_match('~\bPRIMARY\s+KEY\s*\((([^)"]+|"[^"]*"|`[^`]*`)++)~i', $sql, $match)) {
350
  $return[""] = array("type" => "PRIMARY", "columns" => array(), "lengths" => array(), "descs" => array());
351
+ preg_match_all('~((("[^"]*+")+|(?:`[^`]*+`)+)|(\S+))(\s+(ASC|DESC))?(,\s*|$)~i', $match[1], $matches, PREG_SET_ORDER);
352
  foreach ($matches as $match) {
353
  $return[""]["columns"][] = idf_unescape($match[2]) . $match[4];
354
  $return[""]["descs"][] = (preg_match('~DESC~i', $match[5]) ? '1' : null);
516
  if ($table != "") {
517
  if (!$fields) {
518
  foreach (fields($table) as $key => $field) {
519
+ if ($indexes) {
520
+ $field["auto_increment"] = 0;
521
+ }
522
  $fields[] = process_field($field, $field);
523
  $originals[$key] = idf_escape($key);
524
  }
684
  );
685
  }
686
 
 
 
 
 
 
 
 
 
 
 
 
 
687
  function begin() {
688
  return queries("BEGIN");
689
  }
716
  return true;
717
  }
718
 
719
+ function create_sql($table, $auto_increment, $style) {
720
  global $connection;
721
  $return = $connection->result("SELECT sql FROM sqlite_master WHERE type IN ('table', 'view') AND name = " . q($table));
722
  foreach (indexes($table) as $name => $index) {
735
  function use_sql($database) {
736
  }
737
 
738
+ function trigger_sql($table) {
739
  return implode(get_vals("SELECT sql || ';;\n' FROM sqlite_master WHERE type = 'trigger' AND tbl_name = " . q($table)));
740
  }
741
 
adminer/adminer/adminer/dump.inc.php CHANGED
@@ -92,7 +92,7 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
92
  $fields = fields($name);
93
  $adminer->dumpData($name, $_POST["data_style"], "SELECT *" . convert_fields($fields, $fields) . " FROM " . table($name));
94
  }
95
- if ($is_sql && $_POST["triggers"] && $table && ($triggers = trigger_sql($name, $_POST["table_style"]))) {
96
  echo "\nDELIMITER ;;\n$triggers\nDELIMITER ;\n";
97
  }
98
 
@@ -165,12 +165,13 @@ echo "<tr><th>" . lang('Data') . "<td>" . html_select('data_style', $data_style,
165
 
166
  <table cellspacing="0">
167
  <?php
 
168
  $prefixes = array();
169
  if (DB != "") {
170
  $checked = ($TABLE != "" ? "" : " checked");
171
  echo "<thead><tr>";
172
- echo "<th style='text-align: left;'><label class='block'><input type='checkbox' id='check-tables'$checked onclick='formCheck(this, /^tables\\[/);'>" . lang('Tables') . "</label>";
173
- echo "<th style='text-align: right;'><label class='block'>" . lang('Data') . "<input type='checkbox' id='check-data'$checked onclick='formCheck(this, /^data\\[/);'></label>";
174
  echo "</thead>\n";
175
 
176
  $views = "";
@@ -178,28 +179,31 @@ if (DB != "") {
178
  foreach ($tables_list as $name => $type) {
179
  $prefix = preg_replace('~_.*~', '', $name);
180
  $checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name
181
- $print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "checkboxClick(event, this); formUncheck('check-tables');", "block");
182
  if ($type !== null && !preg_match('~table~i', $type)) {
183
  $views .= "$print\n";
184
  } else {
185
- echo "$print<td align='right'><label class='block'><span id='Rows-" . h($name) . "'></span>" . checkbox("data[]", $name, $checked, "", "checkboxClick(event, this); formUncheck('check-data');") . "</label>\n";
186
  }
187
  $prefixes[$prefix]++;
188
  }
189
  echo $views;
190
 
191
  if ($tables_list) {
192
- echo "<script type='text/javascript'>ajaxSetHtml('" . js_escape(ME) . "script=db');</script>\n";
193
  }
194
 
195
  } else {
196
- echo "<thead><tr><th style='text-align: left;'><label class='block'><input type='checkbox' id='check-databases'" . ($TABLE == "" ? " checked" : "") . " onclick='formCheck(this, /^databases\\[/);'>" . lang('Database') . "</label></thead>\n";
 
 
 
197
  $databases = $adminer->databases();
198
  if ($databases) {
199
  foreach ($databases as $db) {
200
  if (!information_schema($db)) {
201
  $prefix = preg_replace('~_.*~', '', $db);
202
- echo "<tr><td>" . checkbox("databases[]", $db, $TABLE == "" || $TABLE == "$prefix%", $db, "formUncheck('check-databases');", "block") . "\n";
203
  $prefixes[$prefix]++;
204
  }
205
  }
92
  $fields = fields($name);
93
  $adminer->dumpData($name, $_POST["data_style"], "SELECT *" . convert_fields($fields, $fields) . " FROM " . table($name));
94
  }
95
+ if ($is_sql && $_POST["triggers"] && $table && ($triggers = trigger_sql($name))) {
96
  echo "\nDELIMITER ;;\n$triggers\nDELIMITER ;\n";
97
  }
98
 
165
 
166
  <table cellspacing="0">
167
  <?php
168
+ echo script("qsl('table').onclick = dumpClick;");
169
  $prefixes = array();
170
  if (DB != "") {
171
  $checked = ($TABLE != "" ? "" : " checked");
172
  echo "<thead><tr>";
173
+ echo "<th style='text-align: left;'><label class='block'><input type='checkbox' id='check-tables'$checked>" . lang('Tables') . "</label>" . script("qs('#check-tables').onclick = partial(formCheck, /^tables\\[/);", "");
174
+ echo "<th style='text-align: right;'><label class='block'>" . lang('Data') . "<input type='checkbox' id='check-data'$checked></label>" . script("qs('#check-data').onclick = partial(formCheck, /^data\\[/);", "");
175
  echo "</thead>\n";
176
 
177
  $views = "";
179
  foreach ($tables_list as $name => $type) {
180
  $prefix = preg_replace('~_.*~', '', $name);
181
  $checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name
182
+ $print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "", "block");
183
  if ($type !== null && !preg_match('~table~i', $type)) {
184
  $views .= "$print\n";
185
  } else {
186
+ echo "$print<td align='right'><label class='block'><span id='Rows-" . h($name) . "'></span>" . checkbox("data[]", $name, $checked) . "</label>\n";
187
  }
188
  $prefixes[$prefix]++;
189
  }
190
  echo $views;
191
 
192
  if ($tables_list) {
193
+ echo script("ajaxSetHtml('" . js_escape(ME) . "script=db');");
194
  }
195
 
196
  } else {
197
+ echo "<thead><tr><th style='text-align: left;'>";
198
+ echo "<label class='block'><input type='checkbox' id='check-databases'" . ($TABLE == "" ? " checked" : "") . ">" . lang('Database') . "</label>";
199
+ echo script("qs('#check-databases').onclick = partial(formCheck, /^databases\\[/);", "");
200
+ echo "</thead>\n";
201
  $databases = $adminer->databases();
202
  if ($databases) {
203
  foreach ($databases as $db) {
204
  if (!information_schema($db)) {
205
  $prefix = preg_replace('~_.*~', '', $db);
206
+ echo "<tr><td>" . checkbox("databases[]", $db, $TABLE == "" || $TABLE == "$prefix%", $db, "", "block") . "\n";
207
  $prefixes[$prefix]++;
208
  }
209
  }
adminer/adminer/adminer/edit.inc.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  $TABLE = $_GET["edit"];
3
  $fields = fields($TABLE);
4
- $where = (isset($_GET["select"]) ? (count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields));
5
  $update = (isset($_GET["select"]) ? $_POST["edit"] : $where);
6
  foreach ($fields as $name => $field) {
7
  if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "") {
@@ -82,9 +82,13 @@ if ($_POST["save"]) {
82
  }
83
  if ($select) {
84
  $result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1));
85
- $row = $result->fetch_assoc();
86
- if (!$row) { // MySQLi returns null
87
- $row = false;
 
 
 
 
88
  }
89
  if (isset($_GET["select"]) && (!$row || $result->fetch_assoc())) { // $result->num_rows != 1 isn't available in all drivers
90
  $row = null;
1
  <?php
2
  $TABLE = $_GET["edit"];
3
  $fields = fields($TABLE);
4
+ $where = (isset($_GET["select"]) ? ($_POST["check"] && count($_POST["check"]) == 1 ? where_check($_POST["check"][0], $fields) : "") : where($_GET, $fields));
5
  $update = (isset($_GET["select"]) ? $_POST["edit"] : $where);
6
  foreach ($fields as $name => $field) {
7
  if (!isset($field["privileges"][$update ? "update" : "insert"]) || $adminer->fieldName($field) == "") {
82
  }
83
  if ($select) {
84
  $result = $driver->select($TABLE, $select, array($where), $select, array(), (isset($_GET["select"]) ? 2 : 1));
85
+ if (!$result) {
86
+ $error = error();
87
+ } else {
88
+ $row = $result->fetch_assoc();
89
+ if (!$row) { // MySQLi returns null
90
+ $row = false;
91
+ }
92
  }
93
  if (isset($_GET["select"]) && (!$row || $result->fetch_assoc())) { // $result->num_rows != 1 isn't available in all drivers
94
  $row = null;
adminer/adminer/adminer/event.inc.php CHANGED
@@ -47,6 +47,6 @@ if (!$row && $EVENT != "") {
47
  <p><?php textarea("EVENT_DEFINITION", $row["EVENT_DEFINITION"]); ?>
48
  <p>
49
  <input type="submit" value="<?php echo lang('Save'); ?>">
50
- <?php if ($EVENT != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
51
  <input type="hidden" name="token" value="<?php echo $token; ?>">
52
  </form>
47
  <p><?php textarea("EVENT_DEFINITION", $row["EVENT_DEFINITION"]); ?>
48
  <p>
49
  <input type="submit" value="<?php echo lang('Save'); ?>">
50
+ <?php if ($EVENT != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $EVENT)); ?><?php } ?>
51
  <input type="hidden" name="token" value="<?php echo $token; ?>">
52
  </form>
adminer/adminer/adminer/file.inc.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
3
  header("HTTP/1.1 304 Not Modified");
4
  exit;
1
  <?php
2
+ //! rewrite in compile.php to cache moderately with -dev version
3
  if ($_SERVER["HTTP_IF_MODIFIED_SINCE"]) {
4
  header("HTTP/1.1 304 Not Modified");
5
  exit;
adminer/adminer/adminer/foreign.inc.php CHANGED
@@ -67,7 +67,7 @@ $referencable = array_keys(array_filter(table_status('', true), 'fk_support'));
67
  $j = 0;
68
  foreach ($row["source"] as $key => $val) {
69
  echo "<tr>";
70
- echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow(this);" : 1), "label-source");
71
  echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key], 1, "label-target");
72
  $j++;
73
  }
@@ -78,6 +78,7 @@ foreach ($row["source"] as $key => $val) {
78
  <?php echo lang('ON UPDATE'); ?>: <?php echo html_select("on_update", array(-1 => "") + explode("|", $on_actions), $row["on_update"]); ?>
79
  <?php echo doc_link(array(
80
  'sql' => "innodb-foreign-key-constraints.html",
 
81
  'pgsql' => "sql-createtable.html#SQL-CREATETABLE-REFERENCES",
82
  'mssql' => "ms174979.aspx",
83
  'oracle' => "clauses002.htm#sthref2903",
@@ -86,6 +87,6 @@ foreach ($row["source"] as $key => $val) {
86
  <input type="submit" value="<?php echo lang('Save'); ?>">
87
  <noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript>
88
  <?php } ?>
89
- <?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
90
  <input type="hidden" name="token" value="<?php echo $token; ?>">
91
  </form>
67
  $j = 0;
68
  foreach ($row["source"] as $key => $val) {
69
  echo "<tr>";
70
+ echo "<td>" . html_select("source[" . (+$key) . "]", array(-1 => "") + $source, $val, ($j == count($row["source"]) - 1 ? "foreignAddRow.call(this);" : 1), "label-source");
71
  echo "<td>" . html_select("target[" . (+$key) . "]", $target, $row["target"][$key], 1, "label-target");
72
  $j++;
73
  }
78
  <?php echo lang('ON UPDATE'); ?>: <?php echo html_select("on_update", array(-1 => "") + explode("|", $on_actions), $row["on_update"]); ?>
79
  <?php echo doc_link(array(
80
  'sql' => "innodb-foreign-key-constraints.html",
81
+ 'mariadb' => "foreign-keys/",
82
  'pgsql' => "sql-createtable.html#SQL-CREATETABLE-REFERENCES",
83
  'mssql' => "ms174979.aspx",
84
  'oracle' => "clauses002.htm#sthref2903",
87
  <input type="submit" value="<?php echo lang('Save'); ?>">
88
  <noscript><p><input type="submit" name="add" value="<?php echo lang('Add column'); ?>"></noscript>
89
  <?php } ?>
90
+ <?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
91
  <input type="hidden" name="token" value="<?php echo $token; ?>">
92
  </form>
adminer/adminer/adminer/include/adminer.inc.php CHANGED
@@ -9,7 +9,7 @@ class Adminer {
9
  * @return string HTML code
10
  */
11
  function name() {
12
- return "<a href='https://www.adminer.org/' target='_blank' id='h1'>Adminer</a>";
13
  }
14
 
15
  /** Connection parameters
@@ -19,6 +19,12 @@ class Adminer {
19
  return array(SERVER, $_GET["username"], get_password());
20
  }
21
 
 
 
 
 
 
 
22
  /** Get key used for permanent login
23
  * @param bool
24
  * @return string cryptic string which gets combined with password or false in case of an error
@@ -33,6 +39,14 @@ class Adminer {
33
  function bruteForceKey() {
34
  return $_SERVER["REMOTE_ADDR"];
35
  }
 
 
 
 
 
 
 
 
36
 
37
  /** Identifier of selected database
38
  * @return string
@@ -65,14 +79,20 @@ class Adminer {
65
  }
66
 
67
  /** Headers to send before HTML output
68
- * @return bool true to send security headers
69
  */
70
  function headers() {
71
- return true;
 
 
 
 
 
 
72
  }
73
 
74
  /** Print HTML code inside <head>
75
- * @return bool true to link adminer.css if exists
76
  */
77
  function head() {
78
  ?>
@@ -81,6 +101,18 @@ class Adminer {
81
  return true;
82
  }
83
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  /** Print login form
85
  * @return null
86
  */
@@ -88,16 +120,14 @@ class Adminer {
88
  global $drivers;
89
  ?>
90
  <table cellspacing="0">
91
- <tr><th><?php echo lang('System'); ?><td><?php echo html_select("auth[driver]", $drivers, DRIVER); ?>
92
  <tr><th><?php echo lang('Server'); ?><td><input name="auth[server]" value="<?php echo h(SERVER); ?>" title="hostname[:port]" placeholder="localhost" autocapitalize="off">
93
  <tr><th><?php echo lang('Username'); ?><td><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
94
  <tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
95
  <tr><th><?php echo lang('Database'); ?><td><input name="auth[db]" value="<?php echo h($_GET["db"]); ?>" autocapitalize="off">
96
  </table>
97
- <script type="text/javascript">
98
- focus(document.getElementById('username'));
99
- </script>
100
  <?php
 
101
  echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
102
  echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
103
  }
@@ -110,7 +140,7 @@ focus(document.getElementById('username'));
110
  function login($login, $password) {
111
  global $jush;
112
  if ($jush == "sqlite") {
113
- return lang('<a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to use SQLite.', '<code>login()</code>');
114
  }
115
  return true;
116
  }
@@ -138,6 +168,7 @@ focus(document.getElementById('username'));
138
  * @return null
139
  */
140
  function selectLinks($tableStatus, $set = "") {
 
141
  echo '<p class="links">';
142
  $links = array("select" => lang('Select data'));
143
  if (support("table") || support("indexes")) {
@@ -153,9 +184,11 @@ focus(document.getElementById('username'));
153
  if ($set !== null) {
154
  $links["edit"] = lang('New item');
155
  }
 
156
  foreach ($links as $key => $val) {
157
- echo " <a href='" . h(ME) . "$key=" . urlencode($tableStatus["Name"]) . ($key == "edit" ? $set : "") . "'" . bold(isset($_GET[$key])) . ">$val</a>";
158
  }
 
159
  echo "\n";
160
  }
161
 
@@ -186,14 +219,22 @@ focus(document.getElementById('username'));
186
 
187
  /** Query printed in select before execution
188
  * @param string query to be executed
189
- * @param string elapsed time
 
190
  * @return string
191
  */
192
- function selectQuery($query, $time) {
193
- global $jush;
194
- return "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>($time)</span>"
 
 
 
 
 
 
 
195
  . (support("sql") ? " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>" : "")
196
- . "</p>" // </p> - required for IE9 inline edit
197
  ;
198
  }
199
 
@@ -239,14 +280,14 @@ focus(document.getElementById('username'));
239
  * @return string
240
  */
241
  function selectVal($val, $link, $field, $original) {
242
- $return = ($val === null ? "<i>NULL</i>" : (preg_match("~char|binary~", $field["type"]) && !preg_match("~var~", $field["type"]) ? "<code>$val</code>" : $val));
243
  if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) {
244
  $return = "<i>" . lang('%d byte(s)', strlen($original)) . "</i>";
245
  }
246
  if (preg_match('~json~', $field["type"])) {
247
  $return = "<code class='jush-js'>$return</code>";
248
  }
249
- return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? " rel='noreferrer'" : "") . ">$return</a>" : $return);
250
  }
251
 
252
  /** Value conversion used in select and edit
@@ -263,7 +304,7 @@ focus(document.getElementById('username'));
263
  * @return null
264
  */
265
  function tableStructurePrint($fields) {
266
- echo "<table cellspacing='0'>\n";
267
  echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
268
  foreach ($fields as $field) {
269
  echo "<tr" . odd() . "><th>" . h($field["field"]);
@@ -309,9 +350,16 @@ focus(document.getElementById('username'));
309
  $select[""] = array();
310
  foreach ($select as $key => $val) {
311
  $val = $_GET["columns"][$key];
312
- $column = select_input(" name='columns[$i][col]' onchange='" . ($key !== "" ? "selectFieldChange(this.form)" : "selectAddRow(this)") . ";'", $columns, $val["col"]);
313
- echo "<div>" . ($functions || $grouping ? "<select name='columns[$i][fun]' onchange='helpClose();" . ($key !== "" ? "" : " this.nextSibling.nextSibling.onchange();") . "'"
314
- . on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'", 1) . ">" . optionlist(array(-1 => "") + array_filter(array(lang('Functions') => $functions, lang('Aggregation') => $grouping)), $val["fun"]) . "</select>"
 
 
 
 
 
 
 
315
  . "($column)" : $column) . "</div>\n";
316
  $i++;
317
  }
@@ -328,21 +376,27 @@ focus(document.getElementById('username'));
328
  print_fieldset("search", lang('Search'), $where);
329
  foreach ($indexes as $i => $index) {
330
  if ($index["type"] == "FULLTEXT") {
331
- echo "(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST";
332
- echo " <input type='search' name='fulltext[$i]' value='" . h($_GET["fulltext"][$i]) . "' onchange='selectFieldChange(this.form);'>";
 
333
  echo checkbox("boolean[$i]", 1, isset($_GET["boolean"][$i]), "BOOL");
334
- echo "<br>\n";
335
  }
336
  }
337
- $_GET["where"] = (array) $_GET["where"];
338
- reset($_GET["where"]);
339
- $change_next = "this.nextSibling.onchange();";
340
- for ($i = 0; $i <= count($_GET["where"]); $i++) {
341
- list(, $val) = each($_GET["where"]);
342
  if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) {
343
- echo "<div>" . select_input(" name='where[$i][col]' onchange='$change_next'", $columns, $val["col"], "(" . lang('anywhere') . ")");
 
 
 
 
 
 
344
  echo html_select("where[$i][op]", $this->operators, $val["op"], $change_next);
345
- echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "' onchange='" . ($val ? "selectFieldChange(this.form)" : "selectAddRow(this)") . ";' onkeydown='selectSearchKeydown(this, event);' onsearch='selectSearchSearch(this);'></div>\n";
 
 
346
  }
347
  }
348
  echo "</div></fieldset>\n";
@@ -359,12 +413,12 @@ focus(document.getElementById('username'));
359
  $i = 0;
360
  foreach ((array) $_GET["order"] as $key => $val) {
361
  if ($val != "") {
362
- echo "<div>" . select_input(" name='order[$i]' onchange='selectFieldChange(this.form);'", $columns, $val);
363
  echo checkbox("desc[$i]", 1, isset($_GET["desc"][$key]), lang('descending')) . "</div>\n";
364
  $i++;
365
  }
366
  }
367
- echo "<div>" . select_input(" name='order[$i]' onchange='selectAddRow(this);'", $columns);
368
  echo checkbox("desc[$i]", 1, false, lang('descending')) . "</div>\n";
369
  echo "</div></fieldset>\n";
370
  }
@@ -375,7 +429,8 @@ focus(document.getElementById('username'));
375
  */
376
  function selectLimitPrint($limit) {
377
  echo "<fieldset><legend>" . lang('Limit') . "</legend><div>"; // <div> for easy styling
378
- echo "<input type='number' name='limit' class='size' value='" . h($limit) . "' onchange='selectFieldChange(this.form);'>";
 
379
  echo "</div></fieldset>\n";
380
  }
381
 
@@ -399,7 +454,7 @@ focus(document.getElementById('username'));
399
  echo "<fieldset><legend>" . lang('Action') . "</legend><div>";
400
  echo "<input type='submit' value='" . lang('Select') . "'>";
401
  echo " <span id='noindex' title='" . lang('Full table scan') . "'></span>";
402
- echo "<script type='text/javascript'>\n";
403
  echo "var indexColumns = ";
404
  $columns = array();
405
  foreach ($indexes as $index) {
@@ -413,7 +468,7 @@ focus(document.getElementById('username'));
413
  json_row($key);
414
  }
415
  echo ";\n";
416
- echo "selectFieldChange(document.getElementById('form'));\n";
417
  echo "</script>\n";
418
  echo "</div></fieldset>\n";
419
  }
@@ -466,15 +521,16 @@ focus(document.getElementById('username'));
466
  * @return array expressions to join by AND
467
  */
468
  function selectSearchProcess($fields, $indexes) {
469
- global $connection, $jush;
470
  $return = array();
471
  foreach ($indexes as $i => $index) {
472
  if ($index["type"] == "FULLTEXT" && $_GET["fulltext"][$i] != "") {
473
  $return[] = "MATCH (" . implode(", ", array_map('idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")";
474
  }
475
  }
476
- foreach ((array) $_GET["where"] as $val) {
477
  if ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators)) {
 
478
  $cond = " $val[op]";
479
  if (preg_match('~IN$~', $val["op"])) {
480
  $in = process_length($val["val"]);
@@ -485,24 +541,25 @@ focus(document.getElementById('username'));
485
  $cond = " LIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
486
  } elseif ($val["op"] == "ILIKE %%") {
487
  $cond = " ILIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
 
 
 
488
  } elseif (!preg_match('~NULL$~', $val["op"])) {
489
  $cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
490
  }
491
  if ($val["col"] != "") {
492
- $return[] = idf_escape($val["col"]) . $cond;
493
  } else {
494
  // find anywhere
495
  $cols = array();
496
  foreach ($fields as $name => $field) {
497
- $is_text = preg_match('~char|text|enum|set~', $field["type"]);
498
- if ((is_numeric($val["val"]) || !preg_match('~(^|[^o])int|float|double|decimal|bit~', $field["type"]))
499
- && (!preg_match("~[\x80-\xFF]~", $val["val"]) || $is_text)
500
  ) {
501
- $name = idf_escape($name);
502
- $cols[] = ($jush == "sql" && $is_text && !preg_match("~^utf8_~", $field["collation"]) ? "CONVERT($name USING " . charset($connection) . ")" : $name);
503
  }
504
  }
505
- $return[] = ($cols ? "(" . implode("$cond OR ", $cols) . "$cond)" : "0");
506
  }
507
  }
508
  }
@@ -565,19 +622,28 @@ focus(document.getElementById('username'));
565
  /** Query printed after execution in the message
566
  * @param string executed query
567
  * @param string elapsed time
 
568
  * @return string
569
  */
570
- function messageQuery($query, $time) {
571
- global $jush;
572
  restart_session();
573
  $history = &get_session("queries");
574
- $id = "sql-" . count($history[$_GET["db"]]);
 
 
575
  if (strlen($query) > 1e6) {
576
  $query = preg_replace('~[\x80-\xFF]+$~', '', substr($query, 0, 1e6)) . "\n..."; // [\x80-\xFF] - valid UTF-8, \n - can end by one-line comment
577
  }
578
  $history[$_GET["db"]][] = array($query, time(), $time); // not DB - $_GET["db"] is changed in database.inc.php //! respect $_GET["ns"]
579
- return " <span class='time'>" . @date("H:i:s") . "</span> <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('SQL command') . "</a>" // @ - time zone may be not set
580
- . "<div id='$id' class='hidden'><pre><code class='jush-$jush'>" . shorten_utf8($query, 1000) . '</code></pre>'
 
 
 
 
 
 
581
  . ($time ? " <span class='time'>($time)</span>" : '')
582
  . (support("sql") ? '<p><a href="' . h(str_replace("db=" . urlencode(DB), "db=" . urlencode($_GET["db"]), ME) . 'sql=&history=' . (count($history[$_GET["db"]]) - 1)) . '">' . lang('Edit') . '</a>' : '')
583
  . '</div>'
@@ -626,6 +692,16 @@ focus(document.getElementById('username'));
626
  return "";
627
  }
628
 
 
 
 
 
 
 
 
 
 
 
629
  /** Process sent input
630
  * @param array single field from fields()
631
  * @param string
@@ -645,7 +721,7 @@ focus(document.getElementById('username'));
645
  } elseif (preg_match('~^([+-]|\\|\\|)$~', $function)) {
646
  $return = idf_escape($name) . " $function $return";
647
  } elseif (preg_match('~^[+-] interval$~', $function)) {
648
- $return = idf_escape($name) . " $function " . (preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+$~i", $value) ? $value : $return);
649
  } elseif (preg_match('~^(addtime|subtime|concat)$~', $function)) {
650
  $return = "$function(" . idf_escape($name) . ", $return)";
651
  } elseif (preg_match('~^(md5|sha1|password|encrypt)$~', $function)) {
@@ -699,7 +775,7 @@ focus(document.getElementById('username'));
699
  }
700
  $create = "CREATE TABLE " . table($table) . " (" . implode(", ", $fields) . ")";
701
  } else {
702
- $create = create_sql($table, $_POST["auto_increment"]);
703
  }
704
  set_utf8mb4($create);
705
  if ($style && $create) {
@@ -761,7 +837,7 @@ focus(document.getElementById('username'));
761
  foreach ($row as $key => $val) {
762
  $field = $fields[$key];
763
  $row[$key] = ($val !== null
764
- ? unconvert_field($field, preg_match('~(^|[^o])int|float|double|decimal~', $field["type"]) && $val != '' ? $val : q($val))
765
  : "NULL"
766
  );
767
  }
@@ -812,6 +888,13 @@ focus(document.getElementById('username'));
812
  return $ext;
813
  }
814
 
 
 
 
 
 
 
 
815
  /** Print homepage
816
  * @return bool whether to print default homepage
817
  */
@@ -832,7 +915,7 @@ focus(document.getElementById('username'));
832
  ?>
833
  <h1>
834
  <?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
835
- <a href="https://www.adminer.org/#download" target="_blank" id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
836
  </h1>
837
  <?php
838
  if ($missing == "auth") {
@@ -842,12 +925,12 @@ focus(document.getElementById('username'));
842
  foreach ($usernames as $username => $password) {
843
  if ($password !== null) {
844
  if ($first) {
845
- echo "<p id='logins' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";
846
  $first = false;
847
  }
848
  $dbs = $_SESSION["db"][$vendor][$server][$username];
849
  foreach (($dbs ? array_keys($dbs) : array("")) as $db) {
850
- echo "<a href='" . h(auth_url($vendor, $server, $username, $db)) . "'>($drivers[$vendor]) " . h($username . ($server != "" ? "@$server" : "") . ($db != "" ? " - $db" : "")) . "</a><br>\n";
851
  }
852
  }
853
  }
@@ -858,16 +941,14 @@ focus(document.getElementById('username'));
858
  $connection->select_db(DB);
859
  $tables = table_status('', true);
860
  }
861
- ?>
862
- <script type="text/javascript" src="../externals/jush/modules/jush.js"></script>
863
- <script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>
864
- <script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>
865
- <script type="text/javascript" src="../externals/jush/modules/jush-js.js"></script>
866
- <?php
867
  if (support("sql")) {
 
868
  ?>
869
- <script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
870
- <script type="text/javascript">
871
  <?php
872
  if ($tables) {
873
  $links = array();
@@ -879,8 +960,9 @@ focus(document.getElementById('username'));
879
  echo "jushLinks.$val = jushLinks.$jush;\n";
880
  }
881
  }
 
882
  ?>
883
- bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>');
884
  </script>
885
  <?php
886
  }
@@ -914,15 +996,15 @@ bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info,
914
  <p id="dbs">
915
  <?php
916
  hidden_fields_get();
917
- $db_events = " onmousedown='dbMouseDown(event, this);' onchange='dbChange(this);'";
918
- echo "<span title='" . lang('database') . "'>DB</span>: " . ($databases
919
- ? "<select name='db'$db_events>" . optionlist(array("" => "") + $databases, DB) . "</select>"
920
- : '<input name="db" value="' . h(DB) . '" autocapitalize="off">'
921
  );
922
  echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\n";
923
  if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
924
  if (support("scheme")) {
925
- echo "<br>" . lang('Schema') . ": <select name='ns'$db_events>" . optionlist(array("" => "") + $adminer->schemas(), $_GET["ns"]) . "</select>";
926
  if ($_GET["ns"] != "") {
927
  set_schema($_GET["ns"]);
928
  }
@@ -941,16 +1023,18 @@ bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info,
941
  * @return null
942
  */
943
  function tablesPrint($tables) {
944
- echo "<ul id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";
945
  foreach ($tables as $table => $status) {
946
- echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
947
  $name = $this->tableName($status);
948
- echo (support("table") || support("indexes")
949
- ? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
950
- . bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
951
- . " title='" . lang('Show structure') . "'>$name</a>"
952
- : "<span>$name</span>"
953
- ) . "\n";
 
 
 
954
  }
955
  echo "</ul>\n";
956
  }
9
  * @return string HTML code
10
  */
11
  function name() {
12
+ return "<a href='https://www.adminer.org/'" . target_blank() . " id='h1'>Adminer</a>";
13
  }
14
 
15
  /** Connection parameters
19
  return array(SERVER, $_GET["username"], get_password());
20
  }
21
 
22
+ /** Get SSL connection options
23
+ * @return array array("key" => filename, "cert" => filename, "ca" => filename) or null
24
+ */
25
+ function connectSsl() {
26
+ }
27
+
28
  /** Get key used for permanent login
29
  * @param bool
30
  * @return string cryptic string which gets combined with password or false in case of an error
39
  function bruteForceKey() {
40
  return $_SERVER["REMOTE_ADDR"];
41
  }
42
+
43
+ /** Get server name displayed in breadcrumbs
44
+ * @param string
45
+ * @return string HTML code or null
46
+ */
47
+ function serverName($server) {
48
+ return h($server);
49
+ }
50
 
51
  /** Identifier of selected database
52
  * @return string
79
  }
80
 
81
  /** Headers to send before HTML output
82
+ * @return null
83
  */
84
  function headers() {
85
+ }
86
+
87
+ /** Get Content Security Policy headers
88
+ * @return array of arrays with directive name in key, allowed sources in value
89
+ */
90
+ function csp() {
91
+ return csp();
92
  }
93
 
94
  /** Print HTML code inside <head>
95
+ * @return bool true to link favicon.ico and adminer.css if exists
96
  */
97
  function head() {
98
  ?>
101
  return true;
102
  }
103
 
104
+ /** Get URLs of the CSS files
105
+ * @return array of strings
106
+ */
107
+ function css() {
108
+ $return = array();
109
+ $filename = "adminer.css";
110
+ if (file_exists($filename)) {
111
+ $return[] = $filename;
112
+ }
113
+ return $return;
114
+ }
115
+
116
  /** Print login form
117
  * @return null
118
  */
120
  global $drivers;
121
  ?>
122
  <table cellspacing="0">
123
+ <tr><th><?php echo lang('System'); ?><td><?php echo html_select("auth[driver]", $drivers, DRIVER) . "\n"; ?>
124
  <tr><th><?php echo lang('Server'); ?><td><input name="auth[server]" value="<?php echo h(SERVER); ?>" title="hostname[:port]" placeholder="localhost" autocapitalize="off">
125
  <tr><th><?php echo lang('Username'); ?><td><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
126
  <tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
127
  <tr><th><?php echo lang('Database'); ?><td><input name="auth[db]" value="<?php echo h($_GET["db"]); ?>" autocapitalize="off">
128
  </table>
 
 
 
129
  <?php
130
+ echo script("focus(qs('#username'));");
131
  echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
132
  echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
133
  }
140
  function login($login, $password) {
141
  global $jush;
142
  if ($jush == "sqlite") {
143
+ return lang('<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.', target_blank(), '<code>login()</code>');
144
  }
145
  return true;
146
  }
168
  * @return null
169
  */
170
  function selectLinks($tableStatus, $set = "") {
171
+ global $jush, $driver;
172
  echo '<p class="links">';
173
  $links = array("select" => lang('Select data'));
174
  if (support("table") || support("indexes")) {
184
  if ($set !== null) {
185
  $links["edit"] = lang('New item');
186
  }
187
+ $name = $tableStatus["Name"];
188
  foreach ($links as $key => $val) {
189
+ echo " <a href='" . h(ME) . "$key=" . urlencode($name) . ($key == "edit" ? $set : "") . "'" . bold(isset($_GET[$key])) . ">$val</a>";
190
  }
191
+ echo doc_link(array($jush => $driver->tableHelp($name)), "?");
192
  echo "\n";
193
  }
194
 
219
 
220
  /** Query printed in select before execution
221
  * @param string query to be executed
222
+ * @param float start time of the query
223
+ * @param bool
224
  * @return string
225
  */
226
+ function selectQuery($query, $start, $failed = false) {
227
+ global $jush, $driver;
228
+ $return = "</p>\n"; // required for IE9 inline edit
229
+ if (!$failed && ($warnings = $driver->warnings())) {
230
+ $id = "warnings";
231
+ $return = ", <a href='#$id'>" . lang('Warnings') . "</a>" . script("qsl('a').onclick = partial(toggle, '$id');", "")
232
+ . "$return<div id='$id' class='hidden'>\n$warnings</div>\n"
233
+ ;
234
+ }
235
+ return "<p><code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code> <span class='time'>(" . format_time($start) . ")</span>"
236
  . (support("sql") ? " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>" : "")
237
+ . $return
238
  ;
239
  }
240
 
280
  * @return string
281
  */
282
  function selectVal($val, $link, $field, $original) {
283
+ $return = ($val === null ? "<i>NULL</i>" : (preg_match("~char|binary|boolean~", $field["type"]) && !preg_match("~var~", $field["type"]) ? "<code>$val</code>" : $val));
284
  if (preg_match('~blob|bytea|raw|file~', $field["type"]) && !is_utf8($val)) {
285
  $return = "<i>" . lang('%d byte(s)', strlen($original)) . "</i>";
286
  }
287
  if (preg_match('~json~', $field["type"])) {
288
  $return = "<code class='jush-js'>$return</code>";
289
  }
290
+ return ($link ? "<a href='" . h($link) . "'" . (is_url($link) ? target_blank() : "") . ">$return</a>" : $return);
291
  }
292
 
293
  /** Value conversion used in select and edit
304
  * @return null
305
  */
306
  function tableStructurePrint($fields) {
307
+ echo "<table cellspacing='0' class='nowrap'>\n";
308
  echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
309
  foreach ($fields as $field) {
310
  echo "<tr" . odd() . "><th>" . h($field["field"]);
350
  $select[""] = array();
351
  foreach ($select as $key => $val) {
352
  $val = $_GET["columns"][$key];
353
+ $column = select_input(
354
+ " name='columns[$i][col]'",
355
+ $columns,
356
+ $val["col"],
357
+ ($key !== "" ? "selectFieldChange" : "selectAddRow")
358
+ );
359
+ echo "<div>" . ($functions || $grouping ? "<select name='columns[$i][fun]'>"
360
+ . optionlist(array(-1 => "") + array_filter(array(lang('Functions') => $functions, lang('Aggregation') => $grouping)), $val["fun"]) . "</select>"
361
+ . on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'", 1)
362
+ . script("qsl('select').onchange = function () { helpClose();" . ($key !== "" ? "" : " qsl('select, input', this.parentNode).onchange();") . " };", "")
363
  . "($column)" : $column) . "</div>\n";
364
  $i++;
365
  }
376
  print_fieldset("search", lang('Search'), $where);
377
  foreach ($indexes as $i => $index) {
378
  if ($index["type"] == "FULLTEXT") {
379
+ echo "<div>(<i>" . implode("</i>, <i>", array_map('h', $index["columns"])) . "</i>) AGAINST";
380
+ echo " <input type='search' name='fulltext[$i]' value='" . h($_GET["fulltext"][$i]) . "'>";
381
+ echo script("qsl('input').oninput = selectFieldChange;", "");
382
  echo checkbox("boolean[$i]", 1, isset($_GET["boolean"][$i]), "BOOL");
383
+ echo "</div>\n";
384
  }
385
  }
386
+ $change_next = "this.parentNode.firstChild.onchange();";
387
+ foreach (array_merge((array) $_GET["where"], array(array())) as $i => $val) {
 
 
 
388
  if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) {
389
+ echo "<div>" . select_input(
390
+ " name='where[$i][col]'",
391
+ $columns,
392
+ $val["col"],
393
+ ($val ? "selectFieldChange" : "selectAddRow"),
394
+ "(" . lang('anywhere') . ")"
395
+ );
396
  echo html_select("where[$i][op]", $this->operators, $val["op"], $change_next);
397
+ echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "'>";
398
+ echo script("mixin(qsl('input'), {oninput: function () { $change_next }, onkeydown: selectSearchKeydown, onsearch: selectSearchSearch});", "");
399
+ echo "</div>\n";
400
  }
401
  }
402
  echo "</div></fieldset>\n";
413
  $i = 0;
414
  foreach ((array) $_GET["order"] as $key => $val) {
415
  if ($val != "") {
416
+ echo "<div>" . select_input(" name='order[$i]'", $columns, $val, "selectFieldChange");
417
  echo checkbox("desc[$i]", 1, isset($_GET["desc"][$key]), lang('descending')) . "</div>\n";
418
  $i++;
419
  }
420
  }
421
+ echo "<div>" . select_input(" name='order[$i]'", $columns, "", "selectAddRow");
422
  echo checkbox("desc[$i]", 1, false, lang('descending')) . "</div>\n";
423
  echo "</div></fieldset>\n";
424
  }
429
  */
430
  function selectLimitPrint($limit) {
431
  echo "<fieldset><legend>" . lang('Limit') . "</legend><div>"; // <div> for easy styling
432
+ echo "<input type='number' name='limit' class='size' value='" . h($limit) . "'>";
433
+ echo script("qsl('input').oninput = selectFieldChange;", "");
434
  echo "</div></fieldset>\n";
435
  }
436
 
454
  echo "<fieldset><legend>" . lang('Action') . "</legend><div>";
455
  echo "<input type='submit' value='" . lang('Select') . "'>";
456
  echo " <span id='noindex' title='" . lang('Full table scan') . "'></span>";
457
+ echo "<script" . nonce() . ">\n";
458
  echo "var indexColumns = ";
459
  $columns = array();
460
  foreach ($indexes as $index) {
468
  json_row($key);
469
  }
470
  echo ";\n";
471
+ echo "selectFieldChange.call(qs('#form')['select']);\n";
472
  echo "</script>\n";
473
  echo "</div></fieldset>\n";
474
  }
521
  * @return array expressions to join by AND
522
  */
523
  function selectSearchProcess($fields, $indexes) {
524
+ global $connection, $driver;
525
  $return = array();
526
  foreach ($indexes as $i => $index) {
527
  if ($index["type"] == "FULLTEXT" && $_GET["fulltext"][$i] != "") {
528
  $return[] = "MATCH (" . implode(", ", array_map('idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")";
529
  }
530
  }
531
+ foreach ((array) $_GET["where"] as $key => $val) {
532
  if ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators)) {
533
+ $prefix = "";
534
  $cond = " $val[op]";
535
  if (preg_match('~IN$~', $val["op"])) {
536
  $in = process_length($val["val"]);
541
  $cond = " LIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
542
  } elseif ($val["op"] == "ILIKE %%") {
543
  $cond = " ILIKE " . $this->processInput($fields[$val["col"]], "%$val[val]%");
544
+ } elseif ($val["op"] == "FIND_IN_SET") {
545
+ $prefix = "$val[op](" . q($val["val"]) . ", ";
546
+ $cond = ")";
547
  } elseif (!preg_match('~NULL$~', $val["op"])) {
548
  $cond .= " " . $this->processInput($fields[$val["col"]], $val["val"]);
549
  }
550
  if ($val["col"] != "") {
551
+ $return[] = $prefix . $driver->convertSearch(idf_escape($val["col"]), $val, $fields[$val["col"]]) . $cond;
552
  } else {
553
  // find anywhere
554
  $cols = array();
555
  foreach ($fields as $name => $field) {
556
+ if ((is_numeric($val["val"]) || !preg_match('~' . number_type() . '|bit~', $field["type"]))
557
+ && (!preg_match("~[\x80-\xFF]~", $val["val"]) || preg_match('~char|text|enum|set~', $field["type"]))
 
558
  ) {
559
+ $cols[] = $prefix . $driver->convertSearch(idf_escape($name), $val, $field) . $cond;
 
560
  }
561
  }
562
+ $return[] = ($cols ? "(" . implode(" OR ", $cols) . ")" : "1 = 0");
563
  }
564
  }
565
  }
622
  /** Query printed after execution in the message
623
  * @param string executed query
624
  * @param string elapsed time
625
+ * @param bool
626
  * @return string
627
  */
628
+ function messageQuery($query, $time, $failed = false) {
629
+ global $jush, $driver;
630
  restart_session();
631
  $history = &get_session("queries");
632
+ if (!$history[$_GET["db"]]) {
633
+ $history[$_GET["db"]] = array();
634
+ }
635
  if (strlen($query) > 1e6) {
636
  $query = preg_replace('~[\x80-\xFF]+$~', '', substr($query, 0, 1e6)) . "\n..."; // [\x80-\xFF] - valid UTF-8, \n - can end by one-line comment
637
  }
638
  $history[$_GET["db"]][] = array($query, time(), $time); // not DB - $_GET["db"] is changed in database.inc.php //! respect $_GET["ns"]
639
+ $sql_id = "sql-" . count($history[$_GET["db"]]);
640
+ $return = "<a href='#$sql_id' class='toggle'>" . lang('SQL command') . "</a>\n";
641
+ if (!$failed && ($warnings = $driver->warnings())) {
642
+ $id = "warnings-" . count($history[$_GET["db"]]);
643
+ $return = "<a href='#$id' class='toggle'>" . lang('Warnings') . "</a>, $return<div id='$id' class='hidden'>\n$warnings</div>\n";
644
+ }
645
+ return " <span class='time'>" . @date("H:i:s") . "</span>" // @ - time zone may be not set
646
+ . " $return<div id='$sql_id' class='hidden'><pre><code class='jush-$jush'>" . shorten_utf8($query, 1000) . "</code></pre>"
647
  . ($time ? " <span class='time'>($time)</span>" : '')
648
  . (support("sql") ? '<p><a href="' . h(str_replace("db=" . urlencode(DB), "db=" . urlencode($_GET["db"]), ME) . 'sql=&history=' . (count($history[$_GET["db"]]) - 1)) . '">' . lang('Edit') . '</a>' : '')
649
  . '</div>'
692
  return "";
693
  }
694
 
695
+ /** Get hint for edit field
696
+ * @param string table name
697
+ * @param array single field from fields()
698
+ * @param string
699
+ * @return string
700
+ */
701
+ function editHint($table, $field, $value) {
702
+ return "";
703
+ }
704
+
705
  /** Process sent input
706
  * @param array single field from fields()
707
  * @param string
721
  } elseif (preg_match('~^([+-]|\\|\\|)$~', $function)) {
722
  $return = idf_escape($name) . " $function $return";
723
  } elseif (preg_match('~^[+-] interval$~', $function)) {
724
+ $return = idf_escape($name) . " $function " . (preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+\$~i", $value) ? $value : $return);
725
  } elseif (preg_match('~^(addtime|subtime|concat)$~', $function)) {
726
  $return = "$function(" . idf_escape($name) . ", $return)";
727
  } elseif (preg_match('~^(md5|sha1|password|encrypt)$~', $function)) {
775
  }
776
  $create = "CREATE TABLE " . table($table) . " (" . implode(", ", $fields) . ")";
777
  } else {
778
+ $create = create_sql($table, $_POST["auto_increment"], $style);
779
  }
780
  set_utf8mb4($create);
781
  if ($style && $create) {
837
  foreach ($row as $key => $val) {
838
  $field = $fields[$key];
839
  $row[$key] = ($val !== null
840
+ ? unconvert_field($field, preg_match(number_type(), $field["type"]) && $val != '' ? $val : q($val))
841
  : "NULL"
842
  );
843
  }
888
  return $ext;
889
  }
890
 
891
+ /** Set the path of the file for webserver load
892
+ * @return string path of the sql dump file
893
+ */
894
+ function importServerPath() {
895
+ return "adminer.sql";
896
+ }
897
+
898
  /** Print homepage
899
  * @return bool whether to print default homepage
900
  */
915
  ?>
916
  <h1>
917
  <?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
918
+ <a href="https://www.adminer.org/#download"<?php echo target_blank(); ?> id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
919
  </h1>
920
  <?php
921
  if ($missing == "auth") {
925
  foreach ($usernames as $username => $password) {
926
  if ($password !== null) {
927
  if ($first) {
928
+ echo "<p id='logins'>" . script("mixin(qs('#logins'), {onmouseover: menuOver, onmouseout: menuOut});");
929
  $first = false;
930
  }
931
  $dbs = $_SESSION["db"][$vendor][$server][$username];
932
  foreach (($dbs ? array_keys($dbs) : array("")) as $db) {
933
+ echo "<a href='" . h(auth_url($vendor, $server, $username, $db)) . "'>($drivers[$vendor]) " . h($username . ($server != "" ? "@" . $this->serverName($server) : "") . ($db != "" ? " - $db" : "")) . "</a><br>\n";
934
  }
935
  }
936
  }
941
  $connection->select_db(DB);
942
  $tables = table_status('', true);
943
  }
944
+ echo script_src("../externals/jush/modules/jush.js");
945
+ echo script_src("../externals/jush/modules/jush-textarea.js");
946
+ echo script_src("../externals/jush/modules/jush-txt.js");
947
+ echo script_src("../externals/jush/modules/jush-js.js");
 
 
948
  if (support("sql")) {
949
+ echo script_src("../externals/jush/modules/jush-$jush.js");
950
  ?>
951
+ <script<?php echo nonce(); ?>>
 
952
  <?php
953
  if ($tables) {
954
  $links = array();
960
  echo "jushLinks.$val = jushLinks.$jush;\n";
961
  }
962
  }
963
+ $server_info = $connection->server_info;
964
  ?>
965
+ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\\d\\.?\\d).*~s', '\\1', $server_info) : ""); ?>'<?php echo (preg_match('~MariaDB~', $server_info) ? ", true" : ""); ?>);
966
  </script>
967
  <?php
968
  }
996
  <p id="dbs">
997
  <?php
998
  hidden_fields_get();
999
+ $db_events = script("mixin(qsl('select'), {onmousedown: dbMouseDown, onchange: dbChange});");
1000
+ echo "<span title='" . lang('database') . "'>" . lang('DB') . "</span>: " . ($databases
1001
+ ? "<select name='db'>" . optionlist(array("" => "") + $databases, DB) . "</select>$db_events"
1002
+ : "<input name='db' value='" . h(DB) . "' autocapitalize='off'>\n"
1003
  );
1004
  echo "<input type='submit' value='" . lang('Use') . "'" . ($databases ? " class='hidden'" : "") . ">\n";
1005
  if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
1006
  if (support("scheme")) {
1007
+ echo "<br>" . lang('Schema') . ": <select name='ns'>" . optionlist(array("" => "") + $adminer->schemas(), $_GET["ns"]) . "</select>$db_events";
1008
  if ($_GET["ns"] != "") {
1009
  set_schema($_GET["ns"]);
1010
  }
1023
  * @return null
1024
  */
1025
  function tablesPrint($tables) {
1026
+ echo "<ul id='tables'>" . script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
1027
  foreach ($tables as $table => $status) {
 
1028
  $name = $this->tableName($status);
1029
+ if ($name != "") {
1030
+ echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
1031
+ echo (support("table") || support("indexes")
1032
+ ? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
1033
+ . bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
1034
+ . " title='" . lang('Show structure') . "'>$name</a>"
1035
+ : "<span>$name</span>"
1036
+ ) . "\n";
1037
+ }
1038
  }
1039
  echo "</ul>\n";
1040
  }
adminer/adminer/adminer/include/auth.inc.php CHANGED
@@ -17,15 +17,10 @@ if ($_COOKIE["adminer_permanent"]) {
17
 
18
  function add_invalid_login() {
19
  global $adminer;
20
- $filename = get_temp_dir() . "/adminer.invalid";
21
- $fp = @fopen($filename, "r+"); // @ - may not exist
22
- if (!$fp) { // c+ is available since PHP 5.2.6
23
- $fp = @fopen($filename, "w"); // @ - may not be writable
24
- if (!$fp) {
25
- return;
26
- }
27
  }
28
- flock($fp, LOCK_EX);
29
  $invalids = unserialize(stream_get_contents($fp));
30
  $time = time();
31
  if ($invalids) {
@@ -40,22 +35,21 @@ function add_invalid_login() {
40
  $invalid = array($time + 30*60, 0); // active for 30 minutes
41
  }
42
  $invalid[1]++;
43
- $serialized = serialize($invalids);
44
- rewind($fp);
45
- fwrite($fp, $serialized);
46
- ftruncate($fp, strlen($serialized));
47
- flock($fp, LOCK_UN);
48
- fclose($fp);
49
  }
50
 
51
- $auth = $_POST["auth"];
52
- if ($auth) {
53
  $invalids = unserialize(@file_get_contents(get_temp_dir() . "/adminer.invalid")); // @ - may not exist
54
  $invalid = $invalids[$adminer->bruteForceKey()];
55
- $next_attempt = ($invalid[1] > 30 ? $invalid[0] - time() : 0); // allow 30 invalid attempts
56
  if ($next_attempt > 0) { //! do the same with permanent login
57
  auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
58
  }
 
 
 
 
59
  session_regenerate_id(); // defense against session fixation
60
  $vendor = $auth["driver"];
61
  $server = $auth["server"];
@@ -89,7 +83,7 @@ if ($auth) {
89
  set_session($key, null);
90
  }
91
  unset_permanent();
92
- redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.'));
93
  }
94
 
95
  } elseif ($permanent && !$_SESSION["pwds"]) {
@@ -130,7 +124,7 @@ function auth_error($error) {
130
  $password = get_password();
131
  if ($password !== null) {
132
  if ($password === false) {
133
- $error .= '<br>' . lang('Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.', '<code>permanentLogin()</code>');
134
  }
135
  set_password(DRIVER, SERVER, $_GET["username"], null);
136
  }
@@ -144,10 +138,12 @@ function auth_error($error) {
144
  cookie("adminer_key", ($_COOKIE["adminer_key"] ? $_COOKIE["adminer_key"] : rand_string()), $params["lifetime"]);
145
  page_header(lang('Login'), $error, null);
146
  echo "<form action='' method='post'>\n";
147
- $adminer->loginForm();
148
  echo "<div>";
149
- hidden_fields($_POST, array("auth")); // expired session
 
 
150
  echo "</div>\n";
 
151
  echo "</form>\n";
152
  page_footer("auth");
153
  exit;
@@ -161,11 +157,16 @@ if (isset($_GET["username"])) {
161
  page_footer("auth");
162
  exit;
163
  }
 
 
 
 
 
164
  $connection = connect();
 
165
  }
166
 
167
- $driver = new Min_Driver($connection);
168
-
169
  if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
170
  auth_error((is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid credentials.'))));
171
  }
17
 
18
  function add_invalid_login() {
19
  global $adminer;
20
+ $fp = file_open_lock(get_temp_dir() . "/adminer.invalid");
21
+ if (!$fp) {
22
+ return;
 
 
 
 
23
  }
 
24
  $invalids = unserialize(stream_get_contents($fp));
25
  $time = time();
26
  if ($invalids) {
35
  $invalid = array($time + 30*60, 0); // active for 30 minutes
36
  }
37
  $invalid[1]++;
38
+ file_write_unlock($fp, serialize($invalids));
 
 
 
 
 
39
  }
40
 
41
+ function check_invalid_login() {
42
+ global $adminer;
43
  $invalids = unserialize(@file_get_contents(get_temp_dir() . "/adminer.invalid")); // @ - may not exist
44
  $invalid = $invalids[$adminer->bruteForceKey()];
45
+ $next_attempt = ($invalid[1] > 29 ? $invalid[0] - time() : 0); // allow 30 invalid attempts
46
  if ($next_attempt > 0) { //! do the same with permanent login
47
  auth_error(lang('Too many unsuccessful logins, try again in %d minute(s).', ceil($next_attempt / 60)));
48
  }
49
+ }
50
+
51
+ $auth = $_POST["auth"];
52
+ if ($auth) {
53
  session_regenerate_id(); // defense against session fixation
54
  $vendor = $auth["driver"];
55
  $server = $auth["server"];
83
  set_session($key, null);
84
  }
85
  unset_permanent();
86
+ redirect(substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1), lang('Logout successful.') . ' ' . lang('Thanks for using Adminer, consider <a href="%s">donating</a>.', 'https://sourceforge.net/donate/index.php?group_id=264133'));
87
  }
88
 
89
  } elseif ($permanent && !$_SESSION["pwds"]) {
124
  $password = get_password();
125
  if ($password !== null) {
126
  if ($password === false) {
127
+ $error .= '<br>' . lang('Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.', target_blank(), '<code>permanentLogin()</code>');
128
  }
129
  set_password(DRIVER, SERVER, $_GET["username"], null);
130
  }
138
  cookie("adminer_key", ($_COOKIE["adminer_key"] ? $_COOKIE["adminer_key"] : rand_string()), $params["lifetime"]);
139
  page_header(lang('Login'), $error, null);
140
  echo "<form action='' method='post'>\n";
 
141
  echo "<div>";
142
+ if (hidden_fields($_POST, array("auth"))) { // expired session
143
+ echo "<p class='message'>" . lang('The action will be performed after successful login with the same credentials.') . "\n";
144
+ }
145
  echo "</div>\n";
146
+ $adminer->loginForm();
147
  echo "</form>\n";
148
  page_footer("auth");
149
  exit;
157
  page_footer("auth");
158
  exit;
159
  }
160
+ list($host, $port) = explode(":", SERVER, 2);
161
+ if (is_numeric($port) && $port < 1024) {
162
+ auth_error(lang('Connecting to privileged ports is not allowed.'));
163
+ }
164
+ check_invalid_login();
165
  $connection = connect();
166
+ $driver = new Min_Driver($connection);
167
  }
168
 
169
+ $login = null;
 
170
  if (!is_object($connection) || ($login = $adminer->login($_GET["username"], get_password())) !== true) {
171
  auth_error((is_string($connection) ? h($connection) : (is_string($login) ? $login : lang('Invalid credentials.'))));
172
  }
adminer/adminer/adminer/include/bootstrap.inc.php CHANGED
@@ -18,12 +18,20 @@ if (function_exists("mb_internal_encoding")) {
18
  mb_internal_encoding("8bit");
19
  }
20
 
 
 
21
  // used only in compiled file
22
  if (isset($_GET["file"])) {
23
  include "../adminer/file.inc.php";
24
  }
25
 
26
- include "../adminer/include/functions.inc.php";
 
 
 
 
 
 
27
 
28
  global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $structured_types, $has_token, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
29
 
@@ -33,11 +41,14 @@ if (!$_SERVER["REQUEST_URI"]) { // IIS 5 compatibility
33
  if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
34
  $_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
35
  }
 
 
 
36
  $HTTPS = $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off");
37
 
38
  @ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled
39
- session_cache_limiter(""); // to allow restarting session and to not send Cache-Control: no-store
40
  if (!defined("SID")) {
 
41
  session_name("adminer_sid"); // use specific session name to get own namespace
42
  $params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $HTTPS);
43
  if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
@@ -54,7 +65,7 @@ if (get_magic_quotes_runtime()) {
54
  }
55
  @set_time_limit(0); // @ - can be disabled
56
  @ini_set("zend.ze1_compatibility_mode", false); // @ - deprecated
57
- @ini_set("precision", 20); // @ - can be disabled
58
 
59
  include "../adminer/include/lang.inc.php";
60
  include "../adminer/lang/$LANG.inc.php";
18
  mb_internal_encoding("8bit");
19
  }
20
 
21
+ include "../adminer/include/functions.inc.php";
22
+
23
  // used only in compiled file
24
  if (isset($_GET["file"])) {
25
  include "../adminer/file.inc.php";
26
  }
27
 
28
+ if ($_GET["script"] == "version") {
29
+ $fp = file_open_lock(get_temp_dir() . "/adminer.version");
30
+ if ($fp) {
31
+ file_write_unlock($fp, serialize(array("signature" => $_POST["signature"], "version" => $_POST["version"])));
32
+ }
33
+ exit;
34
+ }
35
 
36
  global $adminer, $connection, $drivers, $edit_functions, $enum_length, $error, $functions, $grouping, $HTTPS, $inout, $jush, $LANG, $langs, $on_actions, $permanent, $structured_types, $has_token, $token, $translations, $types, $unsigned, $VERSION; // allows including Adminer inside a function
37
 
41
  if (!strpos($_SERVER["REQUEST_URI"], '?') && $_SERVER["QUERY_STRING"] != "") { // IIS 7 compatibility
42
  $_SERVER["REQUEST_URI"] .= "?$_SERVER[QUERY_STRING]";
43
  }
44
+ if ($_SERVER["HTTP_X_FORWARDED_PREFIX"]) {
45
+ $_SERVER["REQUEST_URI"] = $_SERVER["HTTP_X_FORWARDED_PREFIX"] . $_SERVER["REQUEST_URI"];
46
+ }
47
  $HTTPS = $_SERVER["HTTPS"] && strcasecmp($_SERVER["HTTPS"], "off");
48
 
49
  @ini_set("session.use_trans_sid", false); // protect links in export, @ - may be disabled
 
50
  if (!defined("SID")) {
51
+ session_cache_limiter(""); // to allow restarting session
52
  session_name("adminer_sid"); // use specific session name to get own namespace
53
  $params = array(0, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]), "", $HTTPS);
54
  if (version_compare(PHP_VERSION, '5.2.0') >= 0) {
65
  }
66
  @set_time_limit(0); // @ - can be disabled
67
  @ini_set("zend.ze1_compatibility_mode", false); // @ - deprecated
68
+ @ini_set("precision", 15); // @ - can be disabled, 15 - internal PHP precision
69
 
70
  include "../adminer/include/lang.inc.php";
71
  include "../adminer/lang/$LANG.inc.php";
adminer/adminer/adminer/include/connect.inc.php CHANGED
@@ -17,7 +17,6 @@ function connect_error() {
17
  'processlist' => lang('Process list'),
18
  'variables' => lang('Variables'),
19
  'status' => lang('Status'),
20
- 'replication' => lang('Replication'),
21
  ) as $key => $val) {
22
  if (support($key)) {
23
  echo "<a href='" . h(ME) . "$key='>$val</a>\n";
@@ -30,13 +29,14 @@ function connect_error() {
30
  $scheme = support("scheme");
31
  $collations = collations();
32
  echo "<form action='' method='post'>\n";
33
- echo "<table cellspacing='0' class='checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);'>\n";
 
34
  echo "<thead><tr>"
35
  . (support("database") ? "<td>&nbsp;" : "")
36
  . "<th>" . lang('Database') . " - <a href='" . h(ME) . "refresh=1'>" . lang('Refresh') . "</a>"
37
  . "<td>" . lang('Collation')
38
  . "<td>" . lang('Tables')
39
- . "<td>" . lang('Size') . " - <a href='" . h(ME) . "dbsize=1' onclick=\"return !ajaxSetHtml('" . h(js_escape(ME)) . "script=connect');\">" . lang('Compute') . "</a>"
40
  . "</thead>\n"
41
  ;
42
 
@@ -46,7 +46,7 @@ function connect_error() {
46
  $root = h(ME) . "db=" . urlencode($db);
47
  $id = h("Db-" . $db);
48
  echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
49
- echo "<th><a href='$root' id='$db'>" . h($db) . "</a>";
50
  $collation = nbsp(db_collation($db, $collations));
51
  echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
52
  echo "<td align='right'><a href='$root&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
@@ -56,15 +56,17 @@ function connect_error() {
56
 
57
  echo "</table>\n";
58
  echo (support("database")
59
- ? "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n"
60
- . "<input type='hidden' name='all' value='' onclick=\"selectCount('selected', formChecked(this, /^db/));\">\n" // used by trCheck()
61
- . "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n"
 
62
  . "</div></fieldset>\n"
 
63
  : ""
64
  );
65
- echo "<script type='text/javascript'>tableCheck();</script>\n";
66
  echo "<input type='hidden' name='token' value='$token'>\n";
67
  echo "</form>\n";
 
68
  }
69
  }
70
 
@@ -78,7 +80,7 @@ if (isset($_GET["import"])) {
78
  $_GET["sql"] = $_GET["import"];
79
  }
80
 
81
- 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")) {
82
  if (DB != "" || $_GET["refresh"]) {
83
  restart_session();
84
  set_session("dbs", null);
17
  'processlist' => lang('Process list'),
18
  'variables' => lang('Variables'),
19
  'status' => lang('Status'),
 
20
  ) as $key => $val) {
21
  if (support($key)) {
22
  echo "<a href='" . h(ME) . "$key='>$val</a>\n";
29
  $scheme = support("scheme");
30
  $collations = collations();
31
  echo "<form action='' method='post'>\n";
32
+ echo "<table cellspacing='0' class='checkable'>\n";
33
+ echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
34
  echo "<thead><tr>"
35
  . (support("database") ? "<td>&nbsp;" : "")
36
  . "<th>" . lang('Database') . " - <a href='" . h(ME) . "refresh=1'>" . lang('Refresh') . "</a>"
37
  . "<td>" . lang('Collation')
38
  . "<td>" . lang('Tables')
39
+ . "<td>" . lang('Size') . " - <a href='" . h(ME) . "dbsize=1'>" . lang('Compute') . "</a>" . script("qsl('a').onclick = partial(ajaxSetHtml, '" . js_escape(ME) . "script=connect');", "")
40
  . "</thead>\n"
41
  ;
42
 
46
  $root = h(ME) . "db=" . urlencode($db);
47
  $id = h("Db-" . $db);
48
  echo "<tr" . odd() . ">" . (support("database") ? "<td>" . checkbox("db[]", $db, in_array($db, (array) $_POST["db"]), "", "", "", $id) : "");
49
+ echo "<th><a href='$root' id='$id'>" . h($db) . "</a>";
50
  $collation = nbsp(db_collation($db, $collations));
51
  echo "<td>" . (support("database") ? "<a href='$root" . ($scheme ? "&amp;ns=" : "") . "&amp;database=' title='" . lang('Alter database') . "'>$collation</a>" : $collation);
52
  echo "<td align='right'><a href='$root&amp;schema=' id='tables-" . h($db) . "' title='" . lang('Database schema') . "'>" . ($_GET["dbsize"] ? $tables : "?") . "</a>";
56
 
57
  echo "</table>\n";
58
  echo (support("database")
59
+ ? "<div class='footer'><div>\n"
60
+ . "<fieldset><legend>" . lang('Selected') . " <span id='selected'></span></legend><div>\n"
61
+ . "<input type='hidden' name='all' value=''>" . script("qsl('input').onclick = function () { selectCount('selected', formChecked(this, /^db/)); };") // used by trCheck()
62
+ . "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm() . "\n"
63
  . "</div></fieldset>\n"
64
+ . "</div></div>\n"
65
  : ""
66
  );
 
67
  echo "<input type='hidden' name='token' value='$token'>\n";
68
  echo "</form>\n";
69
+ echo script("tableCheck();");
70
  }
71
  }
72
 
80
  $_GET["sql"] = $_GET["import"];
81
  }
82
 
83
+ 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")) {
84
  if (DB != "" || $_GET["refresh"]) {
85
  restart_session();
86
  set_session("dbs", null);
adminer/adminer/adminer/include/design.inc.php CHANGED
@@ -19,28 +19,50 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
19
  <!DOCTYPE html>
20
  <html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>">
21
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
22
- <meta http-equiv="Content-Script-Type" content="text/javascript">
23
  <meta name="robots" content="noindex">
24
- <meta name="referrer" content="origin-when-crossorigin">
25
  <title><?php echo $title_page; ?></title>
26
  <link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
27
- <script type="text/javascript" src="../adminer/static/functions.js"></script>
28
- <script type="text/javascript" src="static/editing.js"></script>
29
  <?php if ($adminer->head()) { ?>
30
  <link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
31
  <link rel="apple-touch-icon" href="../adminer/static/favicon.ico">
32
- <?php if (file_exists("adminer.css")) { ?>
33
- <link rel="stylesheet" type="text/css" href="adminer.css">
34
  <?php } ?>
35
  <?php } ?>
36
 
37
- <body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " onload=\"verifyVersion('$VERSION');\""); ?>>
38
- <script type="text/javascript">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  document.body.className = document.body.className.replace(/ nojs/, ' js');
40
  var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
 
41
  </script>
42
 
43
- <div id="help" class="jush-<?php echo $jush; ?> jsonly hidden" onmouseover="helpOpen = 1;" onmouseout="helpMouseout(this, event);"></div>
 
44
 
45
  <div id="content">
46
  <?php
@@ -48,7 +70,8 @@ var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
48
  $link = substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1);
49
  echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> &raquo; ';
50
  $link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', ME), 0, -1);
51
- $server = (SERVER != "" ? h(SERVER) : lang('Server'));
 
52
  if ($breadcrumb === false) {
53
  echo "$server\n";
54
  } else {
@@ -89,10 +112,45 @@ function page_headers() {
89
  global $adminer;
90
  header("Content-Type: text/html; charset=utf-8");
91
  header("Cache-Control: no-cache");
92
- if ($adminer->headers()) {
93
- header("X-Frame-Options: deny"); // ClickJacking protection in IE8, Safari 4, Chrome 2, Firefox 3.6.9
94
- header("X-XSS-Protection: 0"); // prevents introducing XSS in IE8 by removing safe parts of the page
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  }
 
96
  }
97
 
98
  /** Print flash and error messages
@@ -103,7 +161,7 @@ function page_messages($error) {
103
  $uri = preg_replace('~^[^?]*~', '', $_SERVER["REQUEST_URI"]);
104
  $messages = $_SESSION["messages"][$uri];
105
  if ($messages) {
106
- echo "<div class='message'>" . implode("</div>\n<div class='message'>", $messages) . "</div>\n";
107
  unset($_SESSION["messages"][$uri]);
108
  }
109
  if ($error) {
@@ -132,6 +190,6 @@ function page_footer($missing = "") {
132
  <div id="menu">
133
  <?php $adminer->navigation($missing); ?>
134
  </div>
135
- <script type="text/javascript">setupSubmitHighlight(document);</script>
136
  <?php
 
137
  }
19
  <!DOCTYPE html>
20
  <html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>">
21
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 
22
  <meta name="robots" content="noindex">
 
23
  <title><?php echo $title_page; ?></title>
24
  <link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
25
+ <?php echo script_src("../adminer/static/functions.js"); ?>
26
+ <?php echo script_src("static/editing.js"); ?>
27
  <?php if ($adminer->head()) { ?>
28
  <link rel="shortcut icon" type="image/x-icon" href="../adminer/static/favicon.ico">
29
  <link rel="apple-touch-icon" href="../adminer/static/favicon.ico">
30
+ <?php foreach ($adminer->css() as $css) { ?>
31
+ <link rel="stylesheet" type="text/css" href="<?php echo h($css); ?>">
32
  <?php } ?>
33
  <?php } ?>
34
 
35
+ <body class="<?php echo lang('ltr'); ?> nojs">
36
+ <?php
37
+ $filename = get_temp_dir() . "/adminer.version";
38
+ if (!$_COOKIE["adminer_version"] && function_exists('openssl_verify') && file_exists($filename) && filemtime($filename) + 86400 > time()) { // 86400 - 1 day in seconds
39
+ $version = unserialize(file_get_contents($filename));
40
+ $public = "-----BEGIN PUBLIC KEY-----
41
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwqWOVuF5uw7/+Z70djoK
42
+ RlHIZFZPO0uYRezq90+7Amk+FDNd7KkL5eDve+vHRJBLAszF/7XKXe11xwliIsFs
43
+ DFWQlsABVZB3oisKCBEuI71J4kPH8dKGEWR9jDHFw3cWmoH3PmqImX6FISWbG3B8
44
+ h7FIx3jEaw5ckVPVTeo5JRm/1DZzJxjyDenXvBQ/6o9DgZKeNDgxwKzH+sw9/YCO
45
+ jHnq1cFpOIISzARlrHMa/43YfeNRAm/tsBXjSxembBPo7aQZLAWHmaj5+K19H10B
46
+ nCpz9Y++cipkVEiKRGih4ZEvjoFysEOdRLj6WiD/uUNky4xGeA6LaJqh5XpkFkcQ
47
+ fQIDAQAB
48
+ -----END PUBLIC KEY-----
49
+ ";
50
+ if (openssl_verify($version["version"], base64_decode($version["signature"]), $public) == 1) {
51
+ $_COOKIE["adminer_version"] = $version["version"]; // doesn't need to send to the browser
52
+ }
53
+ }
54
+ ?>
55
+ <script<?php echo nonce(); ?>>
56
+ mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick<?php
57
+ echo (isset($_COOKIE["adminer_version"]) ? "" : ", onload: partial(verifyVersion, '$VERSION', '" . js_escape(ME) . "', '" . get_token() . "')"); // $token may be empty in auth.inc.php
58
+ ?>});
59
  document.body.className = document.body.className.replace(/ nojs/, ' js');
60
  var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
61
+ var thousandsSeparator = '<?php echo js_escape(lang(',')); ?>';
62
  </script>
63
 
64
+ <div id="help" class="jush-<?php echo $jush; ?> jsonly hidden"></div>
65
+ <?php echo script("mixin(qs('#help'), {onmouseover: function () { helpOpen = 1; }, onmouseout: helpMouseout});"); ?>
66
 
67
  <div id="content">
68
  <?php
70
  $link = substr(preg_replace('~\b(username|db|ns)=[^&]*&~', '', ME), 0, -1);
71
  echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> &raquo; ';
72
  $link = substr(preg_replace('~\b(db|ns)=[^&]*&~', '', ME), 0, -1);
73
+ $server = $adminer->serverName(SERVER);
74
+ $server = ($server != "" ? $server : lang('Server'));
75
  if ($breadcrumb === false) {
76
  echo "$server\n";
77
  } else {
112
  global $adminer;
113
  header("Content-Type: text/html; charset=utf-8");
114
  header("Cache-Control: no-cache");
115
+ header("X-Frame-Options: deny"); // ClickJacking protection in IE8, Safari 4, Chrome 2, Firefox 3.6.9
116
+ header("X-XSS-Protection: 0"); // prevents introducing XSS in IE8 by removing safe parts of the page
117
+ header("X-Content-Type-Options: nosniff");
118
+ header("Referrer-Policy: origin-when-cross-origin");
119
+ foreach ($adminer->csp() as $csp) {
120
+ $header = array();
121
+ foreach ($csp as $key => $val) {
122
+ $header[] = "$key $val";
123
+ }
124
+ header("Content-Security-Policy: " . implode("; ", $header));
125
+ }
126
+ $adminer->headers();
127
+ }
128
+
129
+ /** Get Content Security Policy headers
130
+ * @return array of arrays with directive name in key, allowed sources in value
131
+ */
132
+ function csp() {
133
+ return array(
134
+ array(
135
+ "script-src" => "'self' 'unsafe-inline' 'nonce-" . get_nonce() . "' 'strict-dynamic'", // 'self' is a fallback for browsers not supporting 'strict-dynamic', 'unsafe-inline' is a fallback for browsers not supporting 'nonce-'
136
+ "connect-src" => "'self'",
137
+ "frame-src" => "https://www.adminer.org",
138
+ "object-src" => "'none'",
139
+ "base-uri" => "'none'",
140
+ "form-action" => "'self'",
141
+ ),
142
+ );
143
+ }
144
+
145
+ /** Get a CSP nonce
146
+ * @return string Base64 value
147
+ */
148
+ function get_nonce() {
149
+ static $nonce;
150
+ if (!$nonce) {
151
+ $nonce = base64_encode(rand_string());
152
  }
153
+ return $nonce;
154
  }
155
 
156
  /** Print flash and error messages
161
  $uri = preg_replace('~^[^?]*~', '', $_SERVER["REQUEST_URI"]);
162
  $messages = $_SESSION["messages"][$uri];
163
  if ($messages) {
164
+ echo "<div class='message'>" . implode("</div>\n<div class='message'>", $messages) . "</div>" . script("messagesPrint();");
165
  unset($_SESSION["messages"][$uri]);
166
  }
167
  if ($error) {
190
  <div id="menu">
191
  <?php $adminer->navigation($missing); ?>
192
  </div>
 
193
  <?php
194
+ echo script("setupSubmitHighlight(document);");
195
  }
adminer/adminer/adminer/include/driver.inc.php CHANGED
@@ -27,7 +27,7 @@
27
  $query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
28
  if (!$query) {
29
  $query = "SELECT" . limit(
30
- ($_GET["page"] != "last" && +$limit && $group && $is_group && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) . "\nFROM " . table($table),
31
  ($where ? "\nWHERE " . implode(" AND ", $where) : "") . ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : ""),
32
  ($limit != "" ? +$limit : null),
33
  ($page ? $limit * $page : 0),
@@ -37,7 +37,7 @@
37
  $start = microtime(true);
38
  $return = $this->_conn->query($query);
39
  if ($print) {
40
- echo $adminer->selectQuery($query, format_time($start));
41
  }
42
  return $return;
43
  }
@@ -50,7 +50,7 @@
50
  */
51
  function delete($table, $queryWhere, $limit = 0) {
52
  $query = "FROM " . table($table);
53
- return queries("DELETE" . ($limit ? limit1($query, $queryWhere) : " $query$queryWhere"));
54
  }
55
 
56
  /** Update data in table
@@ -67,7 +67,7 @@
67
  $values[] = "$key = $val";
68
  }
69
  $query = table($table) . " SET$separator" . implode(",$separator", $values);
70
- return queries("UPDATE" . ($limit ? limit1($query, $queryWhere) : " $query$queryWhere"));
71
  }
72
 
73
  /** Insert data into table
@@ -99,12 +99,59 @@
99
  return queries("BEGIN");
100
  }
101
 
 
 
 
102
  function commit() {
103
  return queries("COMMIT");
104
  }
105
 
 
 
 
106
  function rollback() {
107
  return queries("ROLLBACK");
108
  }
109
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  }
27
  $query = $adminer->selectQueryBuild($select, $where, $group, $order, $limit, $page);
28
  if (!$query) {
29
  $query = "SELECT" . limit(
30
+ ($_GET["page"] != "last" && $limit != "" && $group && $is_group && $jush == "sql" ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) . "\nFROM " . table($table),
31
  ($where ? "\nWHERE " . implode(" AND ", $where) : "") . ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : ""),
32
  ($limit != "" ? +$limit : null),
33
  ($page ? $limit * $page : 0),
37
  $start = microtime(true);
38
  $return = $this->_conn->query($query);
39
  if ($print) {
40
+ echo $adminer->selectQuery($query, $start, !$return);
41
  }
42
  return $return;
43
  }
50
  */
51
  function delete($table, $queryWhere, $limit = 0) {
52
  $query = "FROM " . table($table);
53
+ return queries("DELETE" . ($limit ? limit1($table, $query, $queryWhere) : " $query$queryWhere"));
54
  }
55
 
56
  /** Update data in table
67
  $values[] = "$key = $val";
68
  }
69
  $query = table($table) . " SET$separator" . implode(",$separator", $values);
70
+ return queries("UPDATE" . ($limit ? limit1($table, $query, $queryWhere, $separator) : " $query$queryWhere"));
71
  }
72
 
73
  /** Insert data into table
99
  return queries("BEGIN");
100
  }
101
 
102
+ /** Commit transaction
103
+ * @return bool
104
+ */
105
  function commit() {
106
  return queries("COMMIT");
107
  }
108
 
109
+ /** Rollback transaction
110
+ * @return bool
111
+ */
112
  function rollback() {
113
  return queries("ROLLBACK");
114
  }
115
 
116
+ /** Convert column to be searchable
117
+ * @param string escaped column name
118
+ * @param array array("op" => , "val" => )
119
+ * @param array
120
+ * @return string
121
+ */
122
+ function convertSearch($idf, $val, $field) {
123
+ return $idf;
124
+ }
125
+
126
+ /** Convert value returned by database to actual value
127
+ * @param string
128
+ * @param array
129
+ * @return string
130
+ */
131
+ function value($val, $field) {
132
+ return $val;
133
+ }
134
+
135
+ /** Quote binary string
136
+ * @param string
137
+ * @return string
138
+ */
139
+ function quoteBinary($s) {
140
+ return q($s);
141
+ }
142
+
143
+ /** Get warnings about the last command
144
+ * @return string HTML
145
+ */
146
+ function warnings() {
147
+ return '';
148
+ }
149
+
150
+ /** Get help link for table
151
+ * @param string
152
+ * @return string relative URL or null
153
+ */
154
+ function tableHelp($name) {
155
+ }
156
+
157
  }
adminer/adminer/adminer/include/editing.inc.php CHANGED
@@ -50,7 +50,10 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
50
  }
51
  $types[$j] = $field->type;
52
  echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name)
53
- . ($orgtables ? doc_link(array('sql' => "explain-output.html#explain_" . strtolower($name))) : "")
 
 
 
54
  ;
55
  }
56
  echo "</thead>\n";
@@ -135,24 +138,27 @@ function textarea($name, $value, $rows = 10, $cols = 80) {
135
  * @param array
136
  * @param array
137
  * @param array returned by referencable_primary()
 
138
  * @return null
139
  */
140
- function edit_type($key, $field, $collations, $foreign_keys = array()) {
141
  global $structured_types, $types, $unsigned, $on_actions;
142
  $type = $field["type"];
143
  ?>
144
- <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
145
- if ($type && !isset($types[$type]) && !isset($foreign_keys[$type])) {
146
- array_unshift($structured_types, $type);
147
  }
148
  if ($foreign_keys) {
149
  $structured_types[lang('Foreign keys')] = $foreign_keys;
150
  }
151
- echo optionlist($structured_types, $type);
152
  ?></select>
153
- <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
 
 
154
  echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
155
- echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match('~((^|[^o])int|float|double|decimal)$~', $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
156
  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>' : '');
157
  echo ($foreign_keys ? "<select name='" . h($key) . "[on_delete]'" . (preg_match("~`~", $type) ? "" : " class='hidden'") . "><option value=''>(" . lang('ON DELETE') . ")" . optionlist(explode("|", $on_actions), $field["on_delete"]) . "</select> " : " "); // space for IE
158
  }
@@ -178,7 +184,7 @@ function process_type($field, $collate = "COLLATE") {
178
  global $unsigned;
179
  return " $field[type]"
180
  . process_length($field["length"])
181
- . (preg_match('~(^|[^o])int|float|double|decimal~', $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
182
  . (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " $collate " . q($field["collation"]) : "")
183
  ;
184
  }
@@ -189,24 +195,26 @@ function process_type($field, $collate = "COLLATE") {
189
  * @return array array("field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT")
190
  */
191
  function process_field($field, $type_field) {
192
- global $jush;
193
- $default = $field["default"];
194
  return array(
195
  idf_escape(trim($field["field"])),
196
  process_type($type_field),
197
  ($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
198
- (isset($default) ? " DEFAULT " . (
199
- (preg_match('~time~', $field["type"]) && preg_match('~^CURRENT_TIMESTAMP$~i', $default))
200
- || ($jush == "sqlite" && preg_match('~^CURRENT_(TIME|TIMESTAMP|DATE)$~i', $default))
201
- || ($field["type"] == "bit" && preg_match("~^([0-9]+|b'[0-1]+')\$~", $default))
202
- || ($jush == "pgsql" && preg_match("~^[a-z]+\\(('[^']*')+\\)\$~", $default))
203
- ? $default : q($default)) : ""),
204
  (preg_match('~timestamp|datetime~', $field["type"]) && $field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
205
  (support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
206
  ($field["auto_increment"] ? auto_increment() : null),
207
  );
208
  }
209
 
 
 
 
 
 
 
 
 
 
210
  /** Get type class to use in CSS
211
  * @param string
212
  * @return string class=''
@@ -233,19 +241,20 @@ function type_class($type) {
233
  * @return null
234
  */
235
  function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array(), $comments = false) {
236
- global $connection, $inout;
237
  $fields = array_values($fields);
238
  ?>
239
- <thead><tr class="wrap">
240
  <?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?>
241
  <th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
242
- <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>
243
  <td id="label-length"><?php echo lang('Length'); ?>
244
  <td><?php echo lang('Options'); /* no label required, options have their own label */ ?>
245
  <?php if ($type == "TABLE") { ?>
246
  <td id="label-null">NULL
247
  <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(
248
  'sql' => "example-auto-increment.html",
 
249
  'sqlite' => "autoinc.html",
250
  'pgsql' => "datatype.html#DATATYPE-SERIAL",
251
  'mssql' => "ms186775.aspx",
@@ -253,10 +262,11 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
253
  <td id="label-default"><?php echo lang('Default value'); ?>
254
  <?php echo (support("comment") ? "<td id='label-comment'" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
255
  <?php } ?>
256
- <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>
257
  </thead>
258
- <tbody onkeydown="return editingKeydown(event);">
259
  <?php
 
260
  foreach ($fields as $i => $field) {
261
  $i++;
262
  $orig = $field[($_POST ? "orig" : "field")];
@@ -264,24 +274,22 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
264
  ?>
265
  <tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
266
  <?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
267
- <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 } ?>
268
  <input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
269
  <?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
270
  <?php if ($type == "TABLE") { ?>
271
  <td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); ?>
272
- <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
273
- 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">
274
- <?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'>" : ""); ?>
275
- <?php } ?>
276
- <?php
277
  echo "<td>";
278
  echo (support("move_col") ?
279
- "<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "' onclick='return !editingAddRow(this, 1);'>&nbsp;"
280
- . "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "' onclick='return !editingMoveRow(this, 1);'>&nbsp;"
281
- . "<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;"
282
  : "");
283
- 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]');\">" : "");
284
- echo "\n";
285
  }
286
  }
287
 
@@ -411,7 +419,7 @@ function create_trigger($on, $row) {
411
  * @return string
412
  */
413
  function create_routine($routine, $row) {
414
- global $inout;
415
  $set = array();
416
  $fields = (array) $row["fields"];
417
  ksort($fields); // enforce fields order
@@ -420,13 +428,13 @@ function create_routine($routine, $row) {
420
  $set[] = (preg_match("~^($inout)\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
421
  }
422
  }
 
423
  return "CREATE $routine "
424
  . idf_escape(trim($row["name"]))
425
  . " (" . implode(", ", $set) . ")"
426
  . (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
427
  . ($row["language"] ? " LANGUAGE $row[language]" : "")
428
- . rtrim("\n$row[definition]", ";")
429
- . ";"
430
  ;
431
  }
432
 
@@ -485,18 +493,25 @@ function ini_bytes($ini) {
485
 
486
  /** Create link to database documentation
487
  * @param array $jush => $path
 
488
  * @return string HTML code
489
  */
490
- function doc_link($paths) {
491
  global $jush, $connection;
 
 
492
  $urls = array(
493
- 'sql' => "http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/",
494
- 'sqlite' => "http://www.sqlite.org/",
495
- 'pgsql' => "http://www.postgresql.org/docs/" . substr($connection->server_info, 0, 3) . "/static/",
496
- 'mssql' => "http://msdn.microsoft.com/library/",
497
- 'oracle' => "http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/",
498
  );
499
- return ($paths[$jush] ? "<a href='$urls[$jush]$paths[$jush]' target='_blank' rel='noreferrer'><sup>?</sup></a>" : "");
 
 
 
 
500
  }
501
 
502
  /** Wrap gzencode() for usage in ob_start()
@@ -529,7 +544,7 @@ function db_size($db) {
529
  * @return null
530
  */
531
  function set_utf8mb4($create) {
532
- global $connection;
533
  static $set = false;
534
  if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive
535
  $set = true;
50
  }
51
  $types[$j] = $field->type;
52
  echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($name)
53
+ . ($orgtables ? doc_link(array(
54
+ 'sql' => "explain-output.html#explain_" . strtolower($name),
55
+ 'mariadb' => "explain/#the-columns-in-explain-select",
56
+ )) : "")
57
  ;
58
  }
59
  echo "</thead>\n";
138
  * @param array
139
  * @param array
140
  * @param array returned by referencable_primary()
141
+ * @param array extra types to prepend
142
  * @return null
143
  */
144
+ function edit_type($key, $field, $collations, $foreign_keys = array(), $extra_types = array()) {
145
  global $structured_types, $types, $unsigned, $on_actions;
146
  $type = $field["type"];
147
  ?>
148
+ <td><select name="<?php echo h($key); ?>[type]" class="type" aria-labelledby="label-type"><?php
149
+ if ($type && !isset($types[$type]) && !isset($foreign_keys[$type]) && !in_array($type, $extra_types)) {
150
+ $extra_types[] = $type;
151
  }
152
  if ($foreign_keys) {
153
  $structured_types[lang('Foreign keys')] = $foreign_keys;
154
  }
155
+ echo optionlist(array_merge($extra_types, $structured_types), $type);
156
  ?></select>
157
+ <?php echo on_help("getTarget(event).value", 1); ?>
158
+ <?php echo script("mixin(qsl('select'), {onfocus: function () { lastType = selectValue(this); }, onchange: editingTypeChange});", ""); ?>
159
+ <td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); ?> aria-labelledby="label-length"><?php echo script("mixin(qsl('input'), {onfocus: editingLengthFocus, oninput: editingLengthChange});", ""); ?><td class="options"><?php //! type="number" with enabled JavaScript
160
  echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
161
+ echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match(number_type(), $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
162
  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>' : '');
163
  echo ($foreign_keys ? "<select name='" . h($key) . "[on_delete]'" . (preg_match("~`~", $type) ? "" : " class='hidden'") . "><option value=''>(" . lang('ON DELETE') . ")" . optionlist(explode("|", $on_actions), $field["on_delete"]) . "</select> " : " "); // space for IE
164
  }
184
  global $unsigned;
185
  return " $field[type]"
186
  . process_length($field["length"])
187
+ . (preg_match(number_type(), $field["type"]) && in_array($field["unsigned"], $unsigned) ? " $field[unsigned]" : "")
188
  . (preg_match('~char|text|enum|set~', $field["type"]) && $field["collation"] ? " $collate " . q($field["collation"]) : "")
189
  ;
190
  }
195
  * @return array array("field", "type", "NULL", "DEFAULT", "ON UPDATE", "COMMENT", "AUTO_INCREMENT")
196
  */
197
  function process_field($field, $type_field) {
 
 
198
  return array(
199
  idf_escape(trim($field["field"])),
200
  process_type($type_field),
201
  ($field["null"] ? " NULL" : " NOT NULL"), // NULL for timestamp
202
+ default_value($field),
 
 
 
 
 
203
  (preg_match('~timestamp|datetime~', $field["type"]) && $field["on_update"] ? " ON UPDATE $field[on_update]" : ""),
204
  (support("comment") && $field["comment"] != "" ? " COMMENT " . q($field["comment"]) : ""),
205
  ($field["auto_increment"] ? auto_increment() : null),
206
  );
207
  }
208
 
209
+ /** Get default value clause
210
+ * @param array
211
+ * @return string
212
+ */
213
+ function default_value($field) {
214
+ $default = $field["default"];
215
+ return ($default === null ? "" : " DEFAULT " . (preg_match('~char|binary|text|enum|set~', $field["type"]) || preg_match('~^(?![a-z])~i', $default) ? q($default) : $default));
216
+ }
217
+
218
  /** Get type class to use in CSS
219
  * @param string
220
  * @return string class=''
241
  * @return null
242
  */
243
  function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array(), $comments = false) {
244
+ global $inout;
245
  $fields = array_values($fields);
246
  ?>
247
+ <thead><tr>
248
  <?php if ($type == "PROCEDURE") { ?><td>&nbsp;<?php } ?>
249
  <th id="label-name"><?php echo ($type == "TABLE" ? lang('Column name') : lang('Parameter name')); ?>
250
+ <td id="label-type"><?php echo lang('Type'); ?><textarea id="enum-edit" rows="4" cols="12" wrap="off" style="display: none;"></textarea><?php echo script("qs('#enum-edit').onblur = editingLengthBlur;"); ?>
251
  <td id="label-length"><?php echo lang('Length'); ?>
252
  <td><?php echo lang('Options'); /* no label required, options have their own label */ ?>
253
  <?php if ($type == "TABLE") { ?>
254
  <td id="label-null">NULL
255
  <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(
256
  'sql' => "example-auto-increment.html",
257
+ 'mariadb' => "auto_increment/",
258
  'sqlite' => "autoinc.html",
259
  'pgsql' => "datatype.html#DATATYPE-SERIAL",
260
  'mssql' => "ms186775.aspx",
262
  <td id="label-default"><?php echo lang('Default value'); ?>
263
  <?php echo (support("comment") ? "<td id='label-comment'" . ($comments ? "" : " class='hidden'") . ">" . lang('Comment') : ""); ?>
264
  <?php } ?>
265
+ <td><?php echo "<input type='image' class='icon' name='add[" . (support("move_col") ? 0 : count($fields)) . "]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>" . script("row_count = " . count($fields) . ";"); ?>
266
  </thead>
267
+ <tbody>
268
  <?php
269
+ echo script("mixin(qsl('tbody'), {onclick: editingClick, onkeydown: editingKeydown, oninput: editingInput});");
270
  foreach ($fields as $i => $field) {
271
  $i++;
272
  $orig = $field[($_POST ? "orig" : "field")];
274
  ?>
275
  <tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
276
  <?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
277
+ <th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php echo script("qsl('input').oninput = function () { editingNameChange.call(this);" . ($field["field"] != "" || count($fields) > 1 ? "" : " editingAddRow.call(this);") . " };", ""); ?><?php } ?>
278
  <input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
279
  <?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
280
  <?php if ($type == "TABLE") { ?>
281
  <td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); ?>
282
+ <td><label class="block"><input type="radio" name="auto_increment_col" value="<?php echo $i; ?>"<?php if ($field["auto_increment"]) { ?> checked<?php } ?> aria-labelledby="label-ai"></label><td><?php
283
+ echo checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"); ?><input name="fields[<?php echo $i; ?>][default]" value="<?php echo h($field["default"]); ?>" aria-labelledby="label-default"><?php
284
+ echo (support("comment") ? "<td" . ($comments ? "" : " class='hidden'") . "><input name='fields[$i][comment]' value='" . h($field["comment"]) . "' maxlength='" . (min_version(5.5) ? 1024 : 255) . "' aria-labelledby='label-comment'>" : "");
285
+ }
 
286
  echo "<td>";
287
  echo (support("move_col") ?
288
+ "<input type='image' class='icon' name='add[$i]' src='../adminer/static/plus.gif' alt='+' title='" . lang('Add next') . "'>&nbsp;"
289
+ . "<input type='image' class='icon' name='up[$i]' src='../adminer/static/up.gif' alt='' title='" . lang('Move up') . "'>&nbsp;"
290
+ . "<input type='image' class='icon' name='down[$i]' src='../adminer/static/down.gif' alt='' title='" . lang('Move down') . "'>&nbsp;"
291
  : "");
292
+ echo ($orig == "" || support("drop_col") ? "<input type='image' class='icon' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "'>" : "");
 
293
  }
294
  }
295
 
419
  * @return string
420
  */
421
  function create_routine($routine, $row) {
422
+ global $inout, $jush;
423
  $set = array();
424
  $fields = (array) $row["fields"];
425
  ksort($fields); // enforce fields order
428
  $set[] = (preg_match("~^($inout)\$~", $field["inout"]) ? "$field[inout] " : "") . idf_escape($field["field"]) . process_type($field, "CHARACTER SET");
429
  }
430
  }
431
+ $definition = rtrim("\n$row[definition]", ";");
432
  return "CREATE $routine "
433
  . idf_escape(trim($row["name"]))
434
  . " (" . implode(", ", $set) . ")"
435
  . (isset($_GET["function"]) ? " RETURNS" . process_type($row["returns"], "CHARACTER SET") : "")
436
  . ($row["language"] ? " LANGUAGE $row[language]" : "")
437
+ . ($jush == "pgsql" ? " AS " . q($definition) : "$definition;")
 
438
  ;
439
  }
440
 
493
 
494
  /** Create link to database documentation
495
  * @param array $jush => $path
496
+ * @param string HTML code
497
  * @return string HTML code
498
  */
499
+ function doc_link($paths, $text = "<sup>?</sup>") {
500
  global $jush, $connection;
501
+ $server_info = $connection->server_info;
502
+ $version = preg_replace('~^(\\d\\.?\\d).*~s', '\\1', $server_info); // two most significant digits
503
  $urls = array(
504
+ 'sql' => "https://dev.mysql.com/doc/refman/$version/en/",
505
+ 'sqlite' => "https://www.sqlite.org/",
506
+ 'pgsql' => "https://www.postgresql.org/docs/$version/static/",
507
+ 'mssql' => "https://msdn.microsoft.com/library/",
508
+ 'oracle' => "https://download.oracle.com/docs/cd/B19306_01/server.102/b14200/",
509
  );
510
+ if (preg_match('~MariaDB~', $server_info)) {
511
+ $urls['sql'] = "https://mariadb.com/kb/en/library/";
512
+ $paths['sql'] = (isset($paths['mariadb']) ? $paths['mariadb'] : str_replace(".html", "/", $paths['sql']));
513
+ }
514
+ return ($paths[$jush] ? "<a href='$urls[$jush]$paths[$jush]'" . target_blank() . ">$text</a>" : "");
515
  }
516
 
517
  /** Wrap gzencode() for usage in ob_start()
544
  * @return null
545
  */
546
  function set_utf8mb4($create) {
547
+ global $connection;
548
  static $set = false;
549
  if (!$set && preg_match('~\butf8mb4~i', $create)) { // possible false positive
550
  $set = true;
adminer/adminer/adminer/include/functions.inc.php CHANGED
@@ -16,6 +16,14 @@ function adminer() {
16
  return $adminer;
17
  }
18
 
 
 
 
 
 
 
 
 
19
  /** Unescape database identifier
20
  * @param string text inside ``
21
  * @return string
@@ -38,7 +46,14 @@ function escape_string($val) {
38
  * @return string
39
  */
40
  function number($val) {
41
- return preg_replace('~[^0-9]+~', '', $val);
 
 
 
 
 
 
 
42
  }
43
 
44
  /** Disable magic_quotes_gpc
@@ -73,12 +88,62 @@ function bracket_escape($idf, $back = false) {
73
  return strtr($idf, ($back ? array_flip($trans) : $trans));
74
  }
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  /** Get connection charset
77
  * @param Min_DB
78
  * @return string
79
  */
80
  function charset($connection) {
81
- return (version_compare($connection->server_info, "5.5.3") >= 0 ? "utf8mb4" : "utf8"); // SHOW CHARSET would require an extra query
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  }
83
 
84
  /** Escape for HTML
@@ -119,8 +184,8 @@ function checkbox($name, $value, $checked, $label = "", $onclick = "", $class =
119
  $return = "<input type='checkbox' name='$name' value='" . h($value) . "'"
120
  . ($checked ? " checked" : "")
121
  . ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
122
- . ($onclick ? ' onclick="' . h($onclick) . '"' : '')
123
  . ">"
 
124
  ;
125
  return ($label != "" || $class ? "<label" . ($class ? " class='$class'" : "") . ">$return" . h($label) . "</label>" : $return);
126
  }
@@ -160,9 +225,10 @@ function optionlist($options, $selected = null, $use_keys = false) {
160
  function html_select($name, $options, $value = "", $onchange = true, $labelled_by = "") {
161
  if ($onchange) {
162
  return "<select name='" . h($name) . "'"
163
- . (is_string($onchange) ? ' onchange="' . h($onchange) . '"' : "")
164
  . ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
165
- . ">" . optionlist($options, $value) . "</select>";
 
 
166
  }
167
  $return = "";
168
  foreach ($options as $key => $val) {
@@ -172,35 +238,42 @@ function html_select($name, $options, $value = "", $onchange = true, $labelled_b
172
  }
173
 
174
  /** Generate HTML <select> or <input> if $options are empty
175
- * @param string
176
- * @param array
177
- * @param string
178
- * @param string
179
- * @return string
180
- */
181
- function select_input($attrs, $options, $value = "", $placeholder = "") {
182
- return ($options
183
- ? "<select$attrs><option value=''>$placeholder" . optionlist($options, $value, true) . "</select>"
184
- : "<input$attrs size='10' value='" . h($value) . "' placeholder='$placeholder'>"
185
- );
 
 
186
  }
187
 
188
  /** Get onclick confirmation
 
 
189
  * @return string
190
  */
191
- function confirm() {
192
- return " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
193
  }
194
 
195
  /** Print header for hidden fieldset (close by </div></fieldset>)
196
  * @param string
197
  * @param string
198
  * @param bool
199
- * @param string
200
  * @return null
201
  */
202
- function print_fieldset($id, $legend, $visible = false, $onclick = "") {
203
- echo "<fieldset><legend><a href='#fieldset-$id' onclick=\"" . h($onclick) . "return !toggle('fieldset-$id');\">$legend</a></legend><div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
 
 
 
 
204
  }
205
 
206
  /** Return class='active' if $bold is true
@@ -329,9 +402,10 @@ function get_vals($query, $column = 0) {
329
  * @param string
330
  * @param Min_DB
331
  * @param float
 
332
  * @return array
333
  */
334
- function get_key_vals($query, $connection2 = null, $timeout = 0) {
335
  global $connection;
336
  if (!is_object($connection2)) {
337
  $connection2 = $connection;
@@ -342,7 +416,11 @@ function get_key_vals($query, $connection2 = null, $timeout = 0) {
342
  $connection2->timeout = 0;
343
  if (is_object($result)) {
344
  while ($row = $result->fetch_row()) {
345
- $return[$row[0]] = $row[1];
 
 
 
 
346
  }
347
  }
348
  return $return;
@@ -352,7 +430,7 @@ function get_key_vals($query, $connection2 = null, $timeout = 0) {
352
  * @param string
353
  * @param Min_DB
354
  * @param string
355
- * @return array associative
356
  */
357
  function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
358
  global $connection;
@@ -584,10 +662,10 @@ function query_redirect($query, $location, $message, $redirect = true, $execute
584
  }
585
  $sql = "";
586
  if ($query) {
587
- $sql = $adminer->messageQuery($query, $time);
588
  }
589
  if ($failed) {
590
- $error = error() . $sql;
591
  return false;
592
  }
593
  if ($redirect) {
@@ -755,7 +833,7 @@ function shorten_utf8($string, $length = 80, $suffix = "") {
755
  * @return string
756
  */
757
  function format_number($val) {
758
- return strtr(number_format($val, 0, ".", lang(',')), preg_split('~~u', lang('0123456789'), -1, PREG_SPLIT_NO_EMPTY));
759
  }
760
 
761
  /** Generate friendly URL
@@ -770,9 +848,10 @@ function friendly_url($val) {
770
  /** Print hidden fields
771
  * @param array
772
  * @param array
773
- * @return null
774
  */
775
  function hidden_fields($process, $ignore = array()) {
 
776
  while (list($key, $val) = each($process)) {
777
  if (!in_array($key, $ignore)) {
778
  if (is_array($val)) {
@@ -780,10 +859,12 @@ function hidden_fields($process, $ignore = array()) {
780
  $process[$key . "[$k]"] = $v;
781
  }
782
  } else {
 
783
  echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">';
784
  }
785
  }
786
  }
 
787
  }
788
 
789
  /** Print hidden fields for GET forms
@@ -847,7 +928,7 @@ function enum_input($type, $attrs, $field, $value, $empty = null) {
847
  * @return null
848
  */
849
  function input($field, $value, $function) {
850
- global $connection, $types, $adminer, $jush;
851
  $name = h(bracket_escape($field["field"]));
852
  echo "<td class='function'>";
853
  if (is_array($value) && !$function) {
@@ -867,18 +948,11 @@ function input($field, $value, $function) {
867
  if ($field["type"] == "enum") {
868
  echo nbsp($functions[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value);
869
  } else {
870
- $first = 0;
871
- foreach ($functions as $key => $val) {
872
- if ($key === "" || !$val) {
873
- break;
874
- }
875
- $first++;
876
- }
877
- $onchange = ($first ? " onchange=\"var f = this.form['function[" . h(js_escape(bracket_escape($field["field"]))) . "]']; if ($first > f.selectedIndex) f.selectedIndex = $first;\" onkeyup='keyupChange.call(this);'" : "");
878
- $attrs .= $onchange;
879
  $has_function = (in_array($function, $functions) || isset($functions[$function]));
880
  echo (count($functions) > 1
881
- ? "<select name='function[$name]' onchange='functionChange(this);'" . on_help("getTarget(event).value.replace(/^SQL\$/, '')", 1) . ">" . optionlist($functions, $function === null || $has_function ? $function : "") . "</select>"
 
 
882
  : nbsp(reset($functions))
883
  ) . '<td>';
884
  $input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table
@@ -886,16 +960,16 @@ function input($field, $value, $function) {
886
  echo $input;
887
  } elseif (preg_match('~bool~', $field["type"])) {
888
  echo "<input type='hidden'$attrs value='0'>" .
889
- "<input type='checkbox'" . (in_array(strtolower($value), array('1', 't', 'true', 'y', 'yes', 'on')) ? " checked='checked'" : "") . "$attrs value='1'>";
890
  } elseif ($field["type"] == "set") { //! 64 bits
891
  preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
892
  foreach ($matches[1] as $i => $val) {
893
  $val = stripcslashes(str_replace("''", "'", $val));
894
  $checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true));
895
- echo " <label><input type='checkbox' name='fields[$name][$i]' value='" . (1 << $i) . "'" . ($checked ? ' checked' : '') . "$onchange>" . h($adminer->editVal($val, $field)) . '</label>';
896
  }
897
  } elseif (preg_match('~blob|bytea|raw|file~', $field["type"]) && ini_bool("file_uploads")) {
898
- echo "<input type='file' name='fields-$name'$onchange>";
899
  } elseif (($text = preg_match('~text|lob~', $field["type"])) || preg_match("~\n~", $value)) {
900
  if ($text && $jush != "sqlite") {
901
  $attrs .= " cols='50' rows='12'";
@@ -909,17 +983,29 @@ function input($field, $value, $function) {
909
  } else {
910
  // int(3) is only a display hint
911
  $maxlength = (!preg_match('~int~', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((preg_match("~binary~", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
912
- if ($jush == 'sql' && $connection->server_info >= 5.6 && preg_match('~time~', $field["type"])) {
913
  $maxlength += 7; // microtime
914
  }
915
  // type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
916
  echo "<input"
917
- . ((!$has_function || $function === "") && preg_match('~(?<!o)int~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
918
  . " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
919
  . (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
920
  . "$attrs>"
921
  ;
922
  }
 
 
 
 
 
 
 
 
 
 
 
 
923
  }
924
  }
925
 
@@ -928,7 +1014,7 @@ function input($field, $value, $function) {
928
  * @return string or false to leave the original value
929
  */
930
  function process_input($field) {
931
- global $adminer;
932
  $idf = bracket_escape($field["field"]);
933
  $function = $_POST["function"][$idf];
934
  $value = $_POST["fields"][$idf];
@@ -966,7 +1052,7 @@ function process_input($field) {
966
  if (!is_string($file)) {
967
  return false; //! report errors
968
  }
969
- return q($file);
970
  }
971
  return $adminer->processInput($field, $value, $function);
972
  }
@@ -1003,25 +1089,20 @@ function fields_from_edit() {
1003
  */
1004
  function search_tables() {
1005
  global $adminer, $connection;
1006
- $_GET["where"][0]["op"] = "LIKE %%";
1007
  $_GET["where"][0]["val"] = $_POST["query"];
1008
- $found = false;
1009
  foreach (table_status('', true) as $table => $table_status) {
1010
  $name = $adminer->tableName($table_status);
1011
  if (isset($table_status["Engine"]) && $name != "" && (!$_POST["tables"] || in_array($table, $_POST["tables"]))) {
1012
  $result = $connection->query("SELECT" . limit("1 FROM " . table($table), " WHERE " . implode(" AND ", $adminer->selectSearchProcess(fields($table), array())), 1));
1013
  if (!$result || $result->fetch_row()) {
1014
- if (!$found) {
1015
- echo "<ul>\n";
1016
- $found = true;
1017
- }
1018
- echo "<li>" . ($result
1019
- ? "<a href='" . h(ME . "select=" . urlencode($table) . "&where[0][op]=" . urlencode($_GET["where"][0]["op"]) . "&where[0][val]=" . urlencode($_GET["where"][0]["val"])) . "'>$name</a>\n"
1020
- : "$name: <span class='error'>" . error() . "</span>\n");
1021
  }
1022
  }
1023
  }
1024
- echo ($found ? "</ul>" : "<p class='message'>" . lang('No tables.')) . "\n";
1025
  }
1026
 
1027
  /** Send headers for export
@@ -1084,6 +1165,35 @@ function get_temp_dir() {
1084
  return $return;
1085
  }
1086
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1087
  /** Read password from file adminer.key in temporary directory or create one
1088
  * @param bool
1089
  * @return string or false if the file can not be created
@@ -1119,7 +1229,7 @@ function rand_string() {
1119
  * @return string HTML
1120
  */
1121
  function select_value($val, $link, $field, $text_length) {
1122
- global $adminer, $HTTPS;
1123
  if (is_array($val)) {
1124
  $return = "";
1125
  foreach ($val as $k => $v) {
@@ -1137,11 +1247,8 @@ function select_value($val, $link, $field, $text_length) {
1137
  if (is_mail($val)) {
1138
  $link = "mailto:$val";
1139
  }
1140
- if ($protocol = is_url($val)) {
1141
- $link = (($protocol == "http" && $HTTPS) || preg_match('~WebKit|Firefox~i', $_SERVER["HTTP_USER_AGENT"]) // WebKit supports noreferrer since 2009, Firefox since version 38
1142
- ? $val // HTTP links from HTTPS pages don't receive Referer automatically
1143
- : "https://www.adminer.org/redirect/?url=" . urlencode($val) // intermediate page to hide Referer
1144
- );
1145
  }
1146
  }
1147
  $return = $adminer->editVal($val, $field);
@@ -1172,11 +1279,11 @@ function is_mail($email) {
1172
 
1173
  /** Check whether the string is URL address
1174
  * @param string
1175
- * @return string "http", "https" or ""
1176
  */
1177
  function is_url($string) {
1178
  $domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component //! IDN
1179
- return (preg_match("~^(https?)://($domain?\\.)+$domain(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string, $match) ? strtolower($match[1]) : ""); //! restrict path, query and fragment characters
1180
  }
1181
 
1182
  /** Check if field should be shortened
@@ -1184,7 +1291,7 @@ function is_url($string) {
1184
  * @return bool
1185
  */
1186
  function is_shortable($field) {
1187
- return preg_match('~char|text|lob|geometry|point|linestring|polygon|string|bytea~', $field["type"]);
1188
  }
1189
 
1190
  /** Get query to compute number of found rows
@@ -1199,7 +1306,7 @@ function count_rows($table, $where, $is_group, $group) {
1199
  $query = " FROM " . table($table) . ($where ? " WHERE " . implode(" AND ", $where) : "");
1200
  return ($is_group && ($jush == "sql" || count($group) == 1)
1201
  ? "SELECT COUNT(DISTINCT " . implode(", ", $group) . ")$query"
1202
- : "SELECT COUNT(*)" . ($is_group ? " FROM (SELECT 1$query$group_by) x" : $query)
1203
  );
1204
  }
1205
 
@@ -1214,10 +1321,10 @@ function slow_query($query) {
1214
  if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
1215
  $kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
1216
  ?>
1217
- <script type="text/javascript">
1218
  var timeout = setTimeout(function () {
1219
  ajax('<?php echo js_escape(ME); ?>script=kill', function () {
1220
- }, 'token=<?php echo $token; ?>&kill=<?php echo $kill; ?>');
1221
  }, <?php echo 1000 * $timeout; ?>);
1222
  </script>
1223
  <?php
@@ -1226,13 +1333,13 @@ var timeout = setTimeout(function () {
1226
  }
1227
  ob_flush();
1228
  flush();
1229
- $return = @get_key_vals($query, $connection2, $timeout); // @ - may be killed
1230
  if ($connection2) {
1231
- echo "<script type='text/javascript'>clearTimeout(timeout);</script>\n";
1232
  ob_flush();
1233
  flush();
1234
  }
1235
- return array_keys($return);
1236
  }
1237
 
1238
  /** Generate BREACH resistant CSRF token
@@ -1295,7 +1402,7 @@ function lzw_decompress($binary) {
1295
  * @return string
1296
  */
1297
  function on_help($command, $side = 0) {
1298
- return " onmouseover='helpMouseover(this, event, " . h($command) . ", $side);' onmouseout='helpMouseout(this, event);'";
1299
  }
1300
 
1301
  /** Print edit data form
@@ -1323,7 +1430,7 @@ function edit_form($TABLE, $fields, $row, $update) {
1323
  if (!$fields) {
1324
  echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
1325
  } else {
1326
- echo "<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n";
1327
 
1328
  foreach ($fields as $name => $field) {
1329
  echo "<tr><th>" . $adminer->fieldName($field);
@@ -1363,7 +1470,8 @@ function edit_form($TABLE, $fields, $row, $update) {
1363
  }
1364
  if (!support("table")) {
1365
  echo "<tr>"
1366
- . "<th><input name='field_keys[]' onkeyup='keyupChange.call(this);' onchange='fieldChange(this);' value=''>" // needs empty value for keyupChange()
 
1367
  . "<td class='function'>" . html_select("field_funs[]", $adminer->editFunctions(array("null" => isset($_GET["select"]))))
1368
  . "<td><input name='field_vals[]'>"
1369
  . "\n"
@@ -1376,13 +1484,14 @@ function edit_form($TABLE, $fields, $row, $update) {
1376
  echo "<input type='submit' value='" . lang('Save') . "'>\n";
1377
  if (!isset($_GET["select"])) {
1378
  echo "<input type='submit' name='insert' value='" . ($update
1379
- ? lang('Save and continue edit') . "' onclick='return !ajaxForm(this.form, \"" . lang('Saving') . '...", this)'
1380
  : lang('Save and insert next')
1381
  ) . "' title='Ctrl+Shift+Enter'>\n";
 
1382
  }
1383
  }
1384
- echo ($update ? "<input type='submit' name='delete' value='" . lang('Delete') . "'" . confirm() . ">\n"
1385
- : ($_POST || !$fields ? "" : "<script type='text/javascript'>focus(document.getElementById('form').getElementsByTagName('td')[1].firstChild);</script>\n")
1386
  );
1387
  if (isset($_GET["select"])) {
1388
  hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));
16
  return $adminer;
17
  }
18
 
19
+ /** Get Adminer version
20
+ * @return string
21
+ */
22
+ function version() {
23
+ global $VERSION;
24
+ return $VERSION;
25
+ }
26
+
27
  /** Unescape database identifier
28
  * @param string text inside ``
29
  * @return string
46
  * @return string
47
  */
48
  function number($val) {
49
+ return preg_replace('~[^0-9]+~', '', $val);
50
+ }
51
+
52
+ /** Get regular expression to match numeric types
53
+ * @return string
54
+ */
55
+ function number_type() {
56
+ return '((?<!o)int(?!er)|numeric|real|float|double|decimal|money)'; // not point, not interval
57
  }
58
 
59
  /** Disable magic_quotes_gpc
88
  return strtr($idf, ($back ? array_flip($trans) : $trans));
89
  }
90
 
91
+ /** Check if connection has at least the given version
92
+ * @param string required version
93
+ * @param string required MariaDB version
94
+ * @param Min_DB defaults to $connection
95
+ * @return bool
96
+ */
97
+ function min_version($version, $maria_db = "", $connection2 = null) {
98
+ global $connection;
99
+ if (!$connection2) {
100
+ $connection2 = $connection;
101
+ }
102
+ $server_info = $connection2->server_info;
103
+ if ($maria_db && preg_match('~([\d.]+)-MariaDB~', $server_info, $match)) {
104
+ $server_info = $match[1];
105
+ $version = $maria_db;
106
+ }
107
+ return (version_compare($server_info, $version) >= 0);
108
+ }
109
+
110
  /** Get connection charset
111
  * @param Min_DB
112
  * @return string
113
  */
114
  function charset($connection) {
115
+ return (min_version("5.5.3", 0, $connection) ? "utf8mb4" : "utf8"); // SHOW CHARSET would require an extra query
116
+ }
117
+
118
+ /** Return <script> element
119
+ * @param string
120
+ * @param string
121
+ * @return string
122
+ */
123
+ function script($source, $trailing = "\n") {
124
+ return "<script" . nonce() . ">$source</script>$trailing";
125
+ }
126
+
127
+ /** Return <script src> element
128
+ * @param string
129
+ * @return string
130
+ */
131
+ function script_src($url) {
132
+ return "<script src='" . h($url) . "'" . nonce() . "></script>\n";
133
+ }
134
+
135
+ /** Get a nonce="" attribute with CSP nonce
136
+ * @return string
137
+ */
138
+ function nonce() {
139
+ return ' nonce="' . get_nonce() . '"';
140
+ }
141
+
142
+ /** Get a target="_blank" attribute
143
+ * @return string
144
+ */
145
+ function target_blank() {
146
+ return ' target="_blank" rel="noreferrer noopener"';
147
  }
148
 
149
  /** Escape for HTML
184
  $return = "<input type='checkbox' name='$name' value='" . h($value) . "'"
185
  . ($checked ? " checked" : "")
186
  . ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
 
187
  . ">"
188
+ . ($onclick ? script("qsl('input').onclick = function () { $onclick };", "") : "")
189
  ;
190
  return ($label != "" || $class ? "<label" . ($class ? " class='$class'" : "") . ">$return" . h($label) . "</label>" : $return);
191
  }
225
  function html_select($name, $options, $value = "", $onchange = true, $labelled_by = "") {
226
  if ($onchange) {
227
  return "<select name='" . h($name) . "'"
 
228
  . ($labelled_by ? " aria-labelledby='$labelled_by'" : "")
229
+ . ">" . optionlist($options, $value) . "</select>"
230
+ . (is_string($onchange) ? script("qsl('select').onchange = function () { $onchange };", "") : "")
231
+ ;
232
  }
233
  $return = "";
234
  foreach ($options as $key => $val) {
238
  }
239
 
240
  /** Generate HTML <select> or <input> if $options are empty
241
+ * @param string
242
+ * @param array
243
+ * @param string
244
+ * @param string
245
+ * @param string
246
+ * @return string
247
+ */
248
+ function select_input($attrs, $options, $value = "", $onchange = "", $placeholder = "") {
249
+ $tag = ($options ? "select" : "input");
250
+ return "<$tag$attrs" . ($options
251
+ ? "><option value=''>$placeholder" . optionlist($options, $value, true) . "</select>"
252
+ : " size='10' value='" . h($value) . "' placeholder='$placeholder'>"
253
+ ) . ($onchange ? script("qsl('$tag').onchange = $onchange;", "") : ""); //! use oninput for input
254
  }
255
 
256
  /** Get onclick confirmation
257
+ * @param string
258
+ * @param string
259
  * @return string
260
  */
261
+ function confirm($message = "", $selector = "qsl('input')") {
262
+ return script("$selector.onclick = function () { return confirm('" . ($message ? js_escape($message) : lang('Are you sure?')) . "'); };", "");
263
  }
264
 
265
  /** Print header for hidden fieldset (close by </div></fieldset>)
266
  * @param string
267
  * @param string
268
  * @param bool
 
269
  * @return null
270
  */
271
+ function print_fieldset($id, $legend, $visible = false) {
272
+ echo "<fieldset><legend>";
273
+ echo "<a href='#fieldset-$id'>$legend</a>";
274
+ echo script("qsl('a').onclick = partial(toggle, 'fieldset-$id');", "");
275
+ echo "</legend>";
276
+ echo "<div id='fieldset-$id'" . ($visible ? "" : " class='hidden'") . ">\n";
277
  }
278
 
279
  /** Return class='active' if $bold is true
402
  * @param string
403
  * @param Min_DB
404
  * @param float
405
+ * @param bool
406
  * @return array
407
  */
408
+ function get_key_vals($query, $connection2 = null, $timeout = 0, $set_keys = true) {
409
  global $connection;
410
  if (!is_object($connection2)) {
411
  $connection2 = $connection;
416
  $connection2->timeout = 0;
417
  if (is_object($result)) {
418
  while ($row = $result->fetch_row()) {
419
+ if ($set_keys) {
420
+ $return[$row[0]] = $row[1];
421
+ } else {
422
+ $return[] = $row[0];
423
+ }
424
  }
425
  }
426
  return $return;
430
  * @param string
431
  * @param Min_DB
432
  * @param string
433
+ * @return array of associative arrays
434
  */
435
  function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
436
  global $connection;
662
  }
663
  $sql = "";
664
  if ($query) {
665
+ $sql = $adminer->messageQuery($query, $time, $failed);
666
  }
667
  if ($failed) {
668
+ $error = error() . $sql . script("messagesPrint();");
669
  return false;
670
  }
671
  if ($redirect) {
833
  * @return string
834
  */
835
  function format_number($val) {
836
+ return strtr(number_format($val, 0, ".", lang(',')), preg_split('~~u', lang('0123456789'), -1, PREG_SPLIT_NO_EMPTY));
837
  }
838
 
839
  /** Generate friendly URL
848
  /** Print hidden fields
849
  * @param array
850
  * @param array
851
+ * @return bool
852
  */
853
  function hidden_fields($process, $ignore = array()) {
854
+ $return = false;
855
  while (list($key, $val) = each($process)) {
856
  if (!in_array($key, $ignore)) {
857
  if (is_array($val)) {
859
  $process[$key . "[$k]"] = $v;
860
  }
861
  } else {
862
+ $return = true;
863
  echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">';
864
  }
865
  }
866
  }
867
+ return $return;
868
  }
869
 
870
  /** Print hidden fields for GET forms
928
  * @return null
929
  */
930
  function input($field, $value, $function) {
931
+ global $types, $adminer, $jush;
932
  $name = h(bracket_escape($field["field"]));
933
  echo "<td class='function'>";
934
  if (is_array($value) && !$function) {
948
  if ($field["type"] == "enum") {
949
  echo nbsp($functions[""]) . "<td>" . $adminer->editInput($_GET["edit"], $field, $attrs, $value);
950
  } else {
 
 
 
 
 
 
 
 
 
951
  $has_function = (in_array($function, $functions) || isset($functions[$function]));
952
  echo (count($functions) > 1
953
+ ? "<select name='function[$name]'>" . optionlist($functions, $function === null || $has_function ? $function : "") . "</select>"
954
+ . on_help("getTarget(event).value.replace(/^SQL\$/, '')", 1)
955
+ . script("qsl('select').onchange = functionChange;", "")
956
  : nbsp(reset($functions))
957
  ) . '<td>';
958
  $input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table
960
  echo $input;
961
  } elseif (preg_match('~bool~', $field["type"])) {
962
  echo "<input type='hidden'$attrs value='0'>" .
963
+ "<input type='checkbox'" . (preg_match('~^(1|t|true|y|yes|on)$~i', $value) ? " checked='checked'" : "") . "$attrs value='1'>";
964
  } elseif ($field["type"] == "set") { //! 64 bits
965
  preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
966
  foreach ($matches[1] as $i => $val) {
967
  $val = stripcslashes(str_replace("''", "'", $val));
968
  $checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true));
969
+ echo " <label><input type='checkbox' name='fields[$name][$i]' value='" . (1 << $i) . "'" . ($checked ? ' checked' : '') . ">" . h($adminer->editVal($val, $field)) . '</label>';
970
  }
971
  } elseif (preg_match('~blob|bytea|raw|file~', $field["type"]) && ini_bool("file_uploads")) {
972
+ echo "<input type='file' name='fields-$name'>";
973
  } elseif (($text = preg_match('~text|lob~', $field["type"])) || preg_match("~\n~", $value)) {
974
  if ($text && $jush != "sqlite") {
975
  $attrs .= " cols='50' rows='12'";
983
  } else {
984
  // int(3) is only a display hint
985
  $maxlength = (!preg_match('~int~', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((preg_match("~binary~", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
986
+ if ($jush == 'sql' && min_version(5.6) && preg_match('~time~', $field["type"])) {
987
  $maxlength += 7; // microtime
988
  }
989
  // type='date' and type='time' display localized value which may be confusing, type='datetime' uses 'T' as date and time separator
990
  echo "<input"
991
+ . ((!$has_function || $function === "") && preg_match('~(?<!o)int(?!er)~', $field["type"]) && !preg_match('~\[\]~', $field["full_type"]) ? " type='number'" : "")
992
  . " value='" . h($value) . "'" . ($maxlength ? " data-maxlength='$maxlength'" : "")
993
  . (preg_match('~char|binary~', $field["type"]) && $maxlength > 20 ? " size='40'" : "")
994
  . "$attrs>"
995
  ;
996
  }
997
+ echo $adminer->editHint($_GET["edit"], $field, $value);
998
+ // skip 'original'
999
+ $first = 0;
1000
+ foreach ($functions as $key => $val) {
1001
+ if ($key === "" || !$val) {
1002
+ break;
1003
+ }
1004
+ $first++;
1005
+ }
1006
+ if ($first) {
1007
+ echo script("mixin(qsl('td'), {onchange: partial(skipOriginal, $first), oninput: function () { this.onchange(); }});");
1008
+ }
1009
  }
1010
  }
1011
 
1014
  * @return string or false to leave the original value
1015
  */
1016
  function process_input($field) {
1017
+ global $adminer, $driver;
1018
  $idf = bracket_escape($field["field"]);
1019
  $function = $_POST["function"][$idf];
1020
  $value = $_POST["fields"][$idf];
1052
  if (!is_string($file)) {
1053
  return false; //! report errors
1054
  }
1055
+ return $driver->quoteBinary($file);
1056
  }
1057
  return $adminer->processInput($field, $value, $function);
1058
  }
1089
  */
1090
  function search_tables() {
1091
  global $adminer, $connection;
 
1092
  $_GET["where"][0]["val"] = $_POST["query"];
1093
+ $sep = "<ul>\n";
1094
  foreach (table_status('', true) as $table => $table_status) {
1095
  $name = $adminer->tableName($table_status);
1096
  if (isset($table_status["Engine"]) && $name != "" && (!$_POST["tables"] || in_array($table, $_POST["tables"]))) {
1097
  $result = $connection->query("SELECT" . limit("1 FROM " . table($table), " WHERE " . implode(" AND ", $adminer->selectSearchProcess(fields($table), array())), 1));
1098
  if (!$result || $result->fetch_row()) {
1099
+ $print = "<a href='" . h(ME . "select=" . urlencode($table) . "&where[0][op]=" . urlencode($_GET["where"][0]["op"]) . "&where[0][val]=" . urlencode($_GET["where"][0]["val"])) . "'>$name</a>";
1100
+ echo "$sep<li>" . ($result ? $print : "<p class='error'>$print: " . error()) . "\n";
1101
+ $sep = "";
 
 
 
 
1102
  }
1103
  }
1104
  }
1105
+ echo ($sep ? "<p class='message'>" . lang('No tables.') : "</ul>") . "\n";
1106
  }
1107
 
1108
  /** Send headers for export
1165
  return $return;
1166
  }
1167
 
1168
+ /** Open and exclusively lock a file
1169
+ * @param string
1170
+ * @return resource or null for error
1171
+ */
1172
+ function file_open_lock($filename) {
1173
+ $fp = @fopen($filename, "r+"); // @ - may not exist
1174
+ if (!$fp) { // c+ is available since PHP 5.2.6
1175
+ $fp = @fopen($filename, "w"); // @ - may not be writable
1176
+ if (!$fp) {
1177
+ return;
1178
+ }
1179
+ chmod($filename, 0660);
1180
+ }
1181
+ flock($fp, LOCK_EX);
1182
+ return $fp;
1183
+ }
1184
+
1185
+ /** Write and unlock a file
1186
+ * @param resource
1187
+ * @param string
1188
+ */
1189
+ function file_write_unlock($fp, $data) {
1190
+ rewind($fp);
1191
+ fwrite($fp, $data);
1192
+ ftruncate($fp, strlen($data));
1193
+ flock($fp, LOCK_UN);
1194
+ fclose($fp);
1195
+ }
1196
+
1197
  /** Read password from file adminer.key in temporary directory or create one
1198
  * @param bool
1199
  * @return string or false if the file can not be created
1229
  * @return string HTML
1230
  */
1231
  function select_value($val, $link, $field, $text_length) {
1232
+ global $adminer;
1233
  if (is_array($val)) {
1234
  $return = "";
1235
  foreach ($val as $k => $v) {
1247
  if (is_mail($val)) {
1248
  $link = "mailto:$val";
1249
  }
1250
+ if (is_url($val)) {
1251
+ $link = $val; // IE 11 and all modern browsers hide referrer
 
 
 
1252
  }
1253
  }
1254
  $return = $adminer->editVal($val, $field);
1279
 
1280
  /** Check whether the string is URL address
1281
  * @param string
1282
+ * @return bool
1283
  */
1284
  function is_url($string) {
1285
  $domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component //! IDN
1286
+ return preg_match("~^(https?)://($domain?\\.)+$domain(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string); //! restrict path, query and fragment characters
1287
  }
1288
 
1289
  /** Check if field should be shortened
1291
  * @return bool
1292
  */
1293
  function is_shortable($field) {
1294
+ return preg_match('~char|text|json|lob|geometry|point|linestring|polygon|string|bytea~', $field["type"]);
1295
  }
1296
 
1297
  /** Get query to compute number of found rows
1306
  $query = " FROM " . table($table) . ($where ? " WHERE " . implode(" AND ", $where) : "");
1307
  return ($is_group && ($jush == "sql" || count($group) == 1)
1308
  ? "SELECT COUNT(DISTINCT " . implode(", ", $group) . ")$query"
1309
+ : "SELECT COUNT(*)" . ($is_group ? " FROM (SELECT 1$query GROUP BY " . implode(", ", $group) . ") x" : $query)
1310
  );
1311
  }
1312
 
1321
  if (support("kill") && is_object($connection2 = connect()) && ($db == "" || $connection2->select_db($db))) {
1322
  $kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
1323
  ?>
1324
+ <script<?php echo nonce(); ?>>
1325
  var timeout = setTimeout(function () {
1326
  ajax('<?php echo js_escape(ME); ?>script=kill', function () {
1327
+ }, 'kill=<?php echo $kill; ?>&token=<?php echo $token; ?>');
1328
  }, <?php echo 1000 * $timeout; ?>);
1329
  </script>
1330
  <?php
1333
  }
1334
  ob_flush();
1335
  flush();
1336
+ $return = @get_key_vals($query, $connection2, $timeout, false); // @ - may be killed
1337
  if ($connection2) {
1338
+ echo script("clearTimeout(timeout);");
1339
  ob_flush();
1340
  flush();
1341
  }
1342
+ return $return;
1343
  }
1344
 
1345
  /** Generate BREACH resistant CSRF token
1402
  * @return string
1403
  */
1404
  function on_help($command, $side = 0) {
1405
+ return script("mixin(qsl('select, input'), {onmouseover: function (event) { helpMouseover.call(this, event, $command, $side) }, onmouseout: helpMouseout});", "");
1406
  }
1407
 
1408
  /** Print edit data form
1430
  if (!$fields) {
1431
  echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
1432
  } else {
1433
+ echo "<table cellspacing='0'>" . script("qsl('table').onkeydown = editingKeydown;");
1434
 
1435
  foreach ($fields as $name => $field) {
1436
  echo "<tr><th>" . $adminer->fieldName($field);
1470
  }
1471
  if (!support("table")) {
1472
  echo "<tr>"
1473
+ . "<th><input name='field_keys[]'>"
1474
+ . script("qsl('input').oninput = fieldChange;")
1475
  . "<td class='function'>" . html_select("field_funs[]", $adminer->editFunctions(array("null" => isset($_GET["select"]))))
1476
  . "<td><input name='field_vals[]'>"
1477
  . "\n"
1484
  echo "<input type='submit' value='" . lang('Save') . "'>\n";
1485
  if (!isset($_GET["select"])) {
1486
  echo "<input type='submit' name='insert' value='" . ($update
1487
+ ? lang('Save and continue edit')
1488
  : lang('Save and insert next')
1489
  ) . "' title='Ctrl+Shift+Enter'>\n";
1490
+ echo ($update ? script("qsl('input').onclick = function () { return !ajaxForm(this.form, '" . lang('Saving') . "...', this); };") : "");
1491
  }
1492
  }
1493
+ echo ($update ? "<input type='submit' name='delete' value='" . lang('Delete') . "'>" . confirm() . "\n"
1494
+ : ($_POST || !$fields ? "" : script("focus(qsa('td', qs('#form'))[1].firstChild);"))
1495
  );
1496
  if (isset($_GET["select"])) {
1497
  hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"]));
adminer/adminer/adminer/include/lang.inc.php CHANGED
@@ -2,13 +2,13 @@
2
  // not used in a single language version
3
 
4
  $langs = array(
5
- 'en' => 'English', // Jakub Vrána - http://www.vrana.cz
6
  'ar' => 'العربية', // Y.M Amine - Algeria - nbr7@live.fr
7
  'bg' => 'Български', // Deyan Delchev
8
  'bn' => 'বাংলা', // Dipak Kumar - dipak.ndc@gmail.com
9
  'bs' => 'Bosanski', // Emir Kurtovic
10
  'ca' => 'Català', // Joan Llosas
11
- 'cs' => 'Čeština', // Jakub Vrána - http://www.vrana.cz
12
  'da' => 'Dansk', // Jarne W. Beutnagel - jarne@beutnagel.dk
13
  'de' => 'Deutsch', // Klemens Häckel - http://clickdimension.wordpress.com
14
  'el' => 'Ελληνικά', // Dimitrios T. Tanis - jtanis@tanisfood.gr
@@ -18,12 +18,14 @@ $langs = array(
18
  'fi' => 'Suomi', // Finnish - Kari Eveli - http://www.lexitec.fi/
19
  'fr' => 'Français', // Francis Gagné, Aurélien Royer
20
  'gl' => 'Galego', // Eduardo Penabad Ramos
 
21
  'hu' => 'Magyar', // Borsos Szilárd (Borsosfi) - http://www.borsosfi.hu, info@borsosfi.hu
22
  'id' => 'Bahasa Indonesia', // Ivan Lanin - http://ivan.lanin.org
23
  'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti
24
  'ja' => '日本語', // Hitoshi Ozawa - http://sourceforge.jp/projects/oss-ja-jpn/releases/
25
  'ko' => '한국어', // dalli - skcha67@gmail.com
26
  'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt
 
27
  'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
28
  'no' => 'Norsk', // Iver Odin Kvello, mupublishing.com
29
  'pl' => 'Polski', // Radosław Kowalewski - http://srsbiz.pl/
@@ -35,7 +37,7 @@ $langs = array(
35
  'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com
36
  'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com
37
  'ta' => 'த‌மிழ்', // G. Sampath Kumar, Chennai, India, sampathkumar11@gmail.com
38
- 'th' => 'ภาษาไทย', // Panya Saraphi, elect.tu@gmail.com - http://www.opencart2u.com/
39
  'tr' => 'Türkçe', // Bilgehan Korkmaz - turktron.com
40
  'uk' => 'Українська', // Valerii Kryzhov
41
  'vi' => 'Tiếng Việt', // Giang Manh @ manhgd google mail
2
  // not used in a single language version
3
 
4
  $langs = array(
5
+ 'en' => 'English', // Jakub Vrána - https://www.vrana.cz
6
  'ar' => 'العربية', // Y.M Amine - Algeria - nbr7@live.fr
7
  'bg' => 'Български', // Deyan Delchev
8
  'bn' => 'বাংলা', // Dipak Kumar - dipak.ndc@gmail.com
9
  'bs' => 'Bosanski', // Emir Kurtovic
10
  'ca' => 'Català', // Joan Llosas
11
+ 'cs' => 'Čeština', // Jakub Vrána - https://www.vrana.cz
12
  'da' => 'Dansk', // Jarne W. Beutnagel - jarne@beutnagel.dk
13
  'de' => 'Deutsch', // Klemens Häckel - http://clickdimension.wordpress.com
14
  'el' => 'Ελληνικά', // Dimitrios T. Tanis - jtanis@tanisfood.gr
18
  'fi' => 'Suomi', // Finnish - Kari Eveli - http://www.lexitec.fi/
19
  'fr' => 'Français', // Francis Gagné, Aurélien Royer
20
  'gl' => 'Galego', // Eduardo Penabad Ramos
21
+ 'he' => 'עברית', // Binyamin Yawitz - https://stuff-group.com/
22
  'hu' => 'Magyar', // Borsos Szilárd (Borsosfi) - http://www.borsosfi.hu, info@borsosfi.hu
23
  'id' => 'Bahasa Indonesia', // Ivan Lanin - http://ivan.lanin.org
24
  'it' => 'Italiano', // Alessandro Fiorotto, Paolo Asperti
25
  'ja' => '日本語', // Hitoshi Ozawa - http://sourceforge.jp/projects/oss-ja-jpn/releases/
26
  'ko' => '한국어', // dalli - skcha67@gmail.com
27
  'lt' => 'Lietuvių', // Paulius Leščinskas - http://www.lescinskas.lt
28
+ 'ms' => 'Bahasa Melayu', // Pisyek
29
  'nl' => 'Nederlands', // Maarten Balliauw - http://blog.maartenballiauw.be
30
  'no' => 'Norsk', // Iver Odin Kvello, mupublishing.com
31
  'pl' => 'Polski', // Radosław Kowalewski - http://srsbiz.pl/
37
  'sl' => 'Slovenski', // Matej Ferlan - www.itdinamik.com, matej.ferlan@itdinamik.com
38
  'sr' => 'Српски', // Nikola Radovanović - cobisimo@gmail.com
39
  'ta' => 'த‌மிழ்', // G. Sampath Kumar, Chennai, India, sampathkumar11@gmail.com
40
+ 'th' => 'ภาษาไทย', // Panya Saraphi, elect.tu@gmail.com - http://www.opencart2u.com/
41
  'tr' => 'Türkçe', // Bilgehan Korkmaz - turktron.com
42
  'uk' => 'Українська', // Valerii Kryzhov
43
  'vi' => 'Tiếng Việt', // Giang Manh @ manhgd google mail
adminer/adminer/adminer/include/pdo.inc.php CHANGED
@@ -12,9 +12,9 @@ if (extension_loaded('pdo')) {
12
  }
13
  }
14
 
15
- function dsn($dsn, $username, $password) {
16
  try {
17
- parent::__construct($dsn, $username, $password);
18
  } catch (Exception $ex) {
19
  auth_error(h($ex->getMessage()));
20
  }
12
  }
13
  }
14
 
15
+ function dsn($dsn, $username, $password, $options = array()) {
16
  try {
17
+ parent::__construct($dsn, $username, $password, $options);
18
  } catch (Exception $ex) {
19
  auth_error(h($ex->getMessage()));
20
  }
adminer/adminer/adminer/include/version.inc.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- $VERSION = "4.3.1";
1
  <?php
2
+ $VERSION = "4.6.2";
adminer/adminer/adminer/index.php CHANGED
@@ -3,8 +3,8 @@
3
  * @link https://www.adminer.org/
4
  * @author Jakub Vrana, https://www.vrana.cz/
5
  * @copyright 2007 Jakub Vrana
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
 
10
  include "./include/bootstrap.inc.php";
@@ -65,8 +65,6 @@ if (isset($_GET["download"])) {
65
  include "./user.inc.php";
66
  } elseif (isset($_GET["processlist"])) {
67
  include "./processlist.inc.php";
68
- } elseif (isset($_GET["replication"])) {
69
- include "./replication.inc.php";
70
  } elseif (isset($_GET["select"])) {
71
  include "./select.inc.php";
72
  } elseif (isset($_GET["variables"])) {
3
  * @link https://www.adminer.org/
4
  * @author Jakub Vrana, https://www.vrana.cz/
5
  * @copyright 2007 Jakub Vrana
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
 
10
  include "./include/bootstrap.inc.php";
65
  include "./user.inc.php";
66
  } elseif (isset($_GET["processlist"])) {
67
  include "./processlist.inc.php";
 
 
68
  } elseif (isset($_GET["select"])) {
69
  include "./select.inc.php";
70
  } elseif (isset($_GET["variables"])) {
adminer/adminer/adminer/indexes.inc.php CHANGED
@@ -2,10 +2,10 @@
2
  $TABLE = $_GET["indexes"];
3
  $index_types = array("PRIMARY", "UNIQUE", "INDEX");
4
  $table_status = table_status($TABLE, true);
5
- if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.6 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
6
  $index_types[] = "FULLTEXT";
7
  }
8
- if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.7 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
9
  $index_types[] = "SPATIAL";
10
  }
11
  $indexes = indexes($TABLE);
@@ -113,16 +113,17 @@ if ($primary) {
113
  $j = 1;
114
  foreach ($row["indexes"] as $index) {
115
  if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) {
116
- echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow(this);" : 1), "label-type");
117
 
118
  echo "<td>";
119
  ksort($index["columns"]);
120
  $i = 1;
121
  foreach ($index["columns"] as $key => $column) {
122
  echo "<span>" . select_input(
123
- " name='indexes[$j][columns][$i]' onchange=\"" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . "(this, '" . h(js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_")) . "');\" title='" . lang('Column') . "'",
124
  ($fields ? array_combine($fields, $fields) : $fields),
125
- $column
 
126
  );
127
  echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
128
  echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
@@ -131,7 +132,7 @@ foreach ($row["indexes"] as $index) {
131
  }
132
 
133
  echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off' aria-labelledby='label-name'>\n";
134
- 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";
135
  }
136
  $j++;
137
  }
2
  $TABLE = $_GET["indexes"];
3
  $index_types = array("PRIMARY", "UNIQUE", "INDEX");
4
  $table_status = table_status($TABLE, true);
5
+ if (preg_match('~MyISAM|M?aria' . (min_version(5.6, '10.0.5') ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
6
  $index_types[] = "FULLTEXT";
7
  }
8
+ if (preg_match('~MyISAM|M?aria' . (min_version(5.7, '10.2.2') ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
9
  $index_types[] = "SPATIAL";
10
  }
11
  $indexes = indexes($TABLE);
113
  $j = 1;
114
  foreach ($row["indexes"] as $index) {
115
  if (!$_POST["drop_col"] || $j != key($_POST["drop_col"])) {
116
+ echo "<tr><td>" . html_select("indexes[$j][type]", array(-1 => "") + $index_types, $index["type"], ($j == count($row["indexes"]) ? "indexesAddRow.call(this);" : 1), "label-type");
117
 
118
  echo "<td>";
119
  ksort($index["columns"]);
120
  $i = 1;
121
  foreach ($index["columns"] as $key => $column) {
122
  echo "<span>" . select_input(
123
+ " name='indexes[$j][columns][$i]' title='" . lang('Column') . "'",
124
  ($fields ? array_combine($fields, $fields) : $fields),
125
+ $column,
126
+ "partial(" . ($i == count($index["columns"]) ? "indexesAddColumn" : "indexesChangeColumn") . ", '" . js_escape($jush == "sql" ? "" : $_GET["indexes"] . "_") . "')"
127
  );
128
  echo ($jush == "sql" || $jush == "mssql" ? "<input type='number' name='indexes[$j][lengths][$i]' class='size' value='" . h($index["lengths"][$key]) . "' title='" . lang('Length') . "'>" : "");
129
  echo ($jush != "sql" ? checkbox("indexes[$j][descs][$i]", 1, $index["descs"][$key], lang('descending')) : "");
132
  }
133
 
134
  echo "<td><input name='indexes[$j][name]' value='" . h($index["name"]) . "' autocapitalize='off' aria-labelledby='label-name'>\n";
135
+ echo "<td><input type='image' class='icon' name='drop_col[$j]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "'>" . script("qsl('input').onclick = partial(editingRemoveRow, 'indexes\$1[type]');");
136
  }
137
  $j++;
138
  }
adminer/adminer/adminer/lang/ar.inc.php CHANGED
@@ -184,7 +184,7 @@ $translations = array(
184
  'Move to other database' => 'نقل إلى قاعدة بيانات أخرى',
185
  'Move' => 'نقل',
186
  '%d item(s) have been affected.' => 'عدد العناصر المعدلة هو %d.',
187
- 'whole result' => 'نتيجة كاملة',
188
  'Clone' => 'نسخ',
189
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s.',
190
  'Partition by' => 'مقسم بواسطة',
184
  'Move to other database' => 'نقل إلى قاعدة بيانات أخرى',
185
  'Move' => 'نقل',
186
  '%d item(s) have been affected.' => 'عدد العناصر المعدلة هو %d.',
187
+ 'Whole result' => 'نتيجة كاملة',
188
  'Clone' => 'نسخ',
189
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'لقد تجاوزت العدد الأقصى للحقول. يرجى الرفع من %s.',
190
  'Partition by' => 'مقسم بواسطة',
adminer/adminer/adminer/lang/bg.inc.php CHANGED
@@ -12,7 +12,7 @@ $translations = array(
12
  'Logout successful.' => 'Излизането е успешно.',
13
  'Invalid credentials.' => 'Невалидни потребителски данни.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Прекалено много неуспешни опити за вход, опитайте пак след %d минута.', 'Прекалено много неуспешни опити за вход, опитайте пак след %d минути.'),
15
- '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 метод, за да я направите постоянна.',
16
  'Language' => 'Език',
17
  'Invalid CSRF token. Send the form again.' => 'Невалиден шифроващ ключ. Попълнете и изпратете формуляра отново.',
18
  'If you did not send this request from Adminer then close this page.' => 'Ако не сте изпратили тази заявка през Adminer, затворете тази страница.',
@@ -245,7 +245,7 @@ $translations = array(
245
  'last' => 'последен',
246
  'Load more data' => 'Зареждане на повече данни',
247
  'Loading' => 'Зареждане',
248
- 'whole result' => 'пълен резултат',
249
  '%d byte(s)' => array('%d байт', '%d байта'),
250
 
251
  'Import' => 'Импорт',
12
  'Logout successful.' => 'Излизането е успешно.',
13
  'Invalid credentials.' => 'Невалидни потребителски данни.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Прекалено много неуспешни опити за вход, опитайте пак след %d минута.', 'Прекалено много неуспешни опити за вход, опитайте пак след %d минути.'),
15
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Главната парола вече е невалидна. <a href="https://www.adminer.org/en/extension/"%s>Изберете</a> %s метод, за да я направите постоянна.',
16
  'Language' => 'Език',
17
  'Invalid CSRF token. Send the form again.' => 'Невалиден шифроващ ключ. Попълнете и изпратете формуляра отново.',
18
  'If you did not send this request from Adminer then close this page.' => 'Ако не сте изпратили тази заявка през Adminer, затворете тази страница.',
245
  'last' => 'последен',
246
  'Load more data' => 'Зареждане на повече данни',
247
  'Loading' => 'Зареждане',
248
+ 'Whole result' => 'Пълен резултат',
249
  '%d byte(s)' => array('%d байт', '%d байта'),
250
 
251
  'Import' => 'Импорт',
adminer/adminer/adminer/lang/bn.inc.php CHANGED
@@ -186,7 +186,7 @@ $translations = array(
186
  'original' => 'প্রকৃত',
187
  'Tables have been dropped.' => 'টেবিলসমূহ মুছে ফেলা হয়েছে।',
188
  '%d item(s) have been affected.' => '%d টি বিষয়বস্তু প্রভাবিত হয়েছে',
189
- 'whole result' => 'সম্পূর্ণ ফলাফল',
190
  'Clone' => 'ক্লোন',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'অনুমোদিত ফিল্ড এর সর্বাধিক সংখ্যা অতিক্রম করে গেছে। অনুগ্রহপূর্বক %s বৃদ্ধি করুন।',
192
  'Partition by' => 'পার্টিশন যার মাধ্যমে',
186
  'original' => 'প্রকৃত',
187
  'Tables have been dropped.' => 'টেবিলসমূহ মুছে ফেলা হয়েছে।',
188
  '%d item(s) have been affected.' => '%d টি বিষয়বস্তু প্রভাবিত হয়েছে',
189
+ 'Whole result' => 'সম্পূর্ণ ফলাফল',
190
  'Clone' => 'ক্লোন',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'অনুমোদিত ফিল্ড এর সর্বাধিক সংখ্যা অতিক্রম করে গেছে। অনুগ্রহপূর্বক %s বৃদ্ধি করুন।',
192
  'Partition by' => 'পার্টিশন যার মাধ্যমে',
adminer/adminer/adminer/lang/bs.inc.php CHANGED
@@ -234,7 +234,7 @@ $translations = array(
234
  'last' => 'poslijednja',
235
  'Loading' => 'Učitavam',
236
  'Load more data' => 'Učitavam još podataka',
237
- 'whole result' => 'ceo rezultat',
238
  '%d byte(s)' => array('%d bajt', '%d bajta', '%d bajtova'),
239
 
240
  'Import' => 'Uvoz',
234
  'last' => 'poslijednja',
235
  'Loading' => 'Učitavam',
236
  'Load more data' => 'Učitavam još podataka',
237
+ 'Whole result' => 'Ceo rezultat',
238
  '%d byte(s)' => array('%d bajt', '%d bajta', '%d bajtova'),
239
 
240
  'Import' => 'Uvoz',
adminer/adminer/adminer/lang/ca.inc.php CHANGED
@@ -185,7 +185,7 @@ $translations = array(
185
  'Save and continue edit' => 'Desa i segueix editant',
186
  'original' => 'original',
187
  '%d item(s) have been affected.' => array('S\'ha modificat %d element.', 'S\'han modificat %d elements.'),
188
- 'whole result' => 'tots els resultats',
189
  'Tables have been dropped.' => 'S\'han suprimit les taules.',
190
  'Clone' => 'Clona',
191
  'Partition by' => 'Fes particions segons',
185
  'Save and continue edit' => 'Desa i segueix editant',
186
  'original' => 'original',
187
  '%d item(s) have been affected.' => array('S\'ha modificat %d element.', 'S\'han modificat %d elements.'),
188
+ 'Whole result' => 'Tots els resultats',
189
  'Tables have been dropped.' => 'S\'han suprimit les taules.',
190
  'Clone' => 'Clona',
191
  'Partition by' => 'Fes particions segons',
adminer/adminer/adminer/lang/cs.inc.php CHANGED
@@ -10,17 +10,20 @@ $translations = array(
10
  'Logout' => 'Odhlásit',
11
  'Logged as: %s' => 'Přihlášen jako: %s',
12
  'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
 
13
  'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
14
- '<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.',
15
  '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.'),
16
- '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.',
17
  'Language' => 'Jazyk',
18
  'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odešlete formulář znovu.',
19
  'If you did not send this request from Adminer then close this page.' => 'Pokud jste tento požadavek neposlali z Adminera, tak tuto stránku zavřete.',
20
  'No extension' => 'Žádné rozšíření',
21
  'None of the supported PHP extensions (%s) are available.' => 'Není dostupné žádné z podporovaných PHP rozšíření (%s).',
 
22
  'Session support must be enabled.' => 'Session proměnné musí být povolené.',
23
  'Session expired, please login again.' => 'Session vypršela, přihlašte se prosím znovu.',
 
24
  '%s version: %s through PHP extension %s' => 'Verze %s: %s přes PHP rozšíření %s',
25
  'Refresh' => 'Obnovit',
26
 
@@ -45,15 +48,12 @@ $translations = array(
45
  'Variables' => 'Proměnné',
46
  'Status' => 'Stav',
47
 
48
- 'Replication' => 'Replikace',
49
- 'Master status' => 'Master status',
50
- 'Slave status' => 'Slave status',
51
-
52
  'SQL command' => 'SQL příkaz',
53
  '%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.'),
54
  '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ů.'),
55
  'No commands to execute.' => 'Žádné příkazy k vykonání.',
56
  'Error in query' => 'Chyba v dotazu',
 
57
  'ATTACH queries are not supported.' => 'Dotazy ATTACH nejsou podporované.',
58
  'Execute' => 'Provést',
59
  'Stop on error' => 'Zastavit při chybě',
@@ -85,6 +85,7 @@ $translations = array(
85
 
86
  'Database' => 'Databáze',
87
  'database' => 'databáze',
 
88
  'Use' => 'Vybrat',
89
  'Select database' => 'Vybrat databázi',
90
  'Invalid database.' => 'Nesprávná databáze.',
@@ -173,6 +174,7 @@ $translations = array(
173
  'Default value' => 'Výchozí hodnota',
174
  'Default values' => 'Výchozí hodnoty',
175
  'Drop' => 'Odstranit',
 
176
  'Are you sure?' => 'Opravdu?',
177
  'Size' => 'Velikost',
178
  'Compute' => 'Spočítat',
@@ -251,7 +253,7 @@ $translations = array(
251
  'last' => 'poslední',
252
  'Load more data' => 'Nahrát další data',
253
  'Loading' => 'Nahrává se',
254
- 'whole result' => 'celý výsledek',
255
  '%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtů'),
256
 
257
  'Import' => 'Import',
@@ -339,8 +341,4 @@ $translations = array(
339
  'Type has been dropped.' => 'Typ byl odstraněn.',
340
  'Type has been created.' => 'Typ byl vytvořen.',
341
  'Alter type' => 'Pozměnit typ',
342
-
343
- 'Replication' => null,
344
- 'Master status' => null,
345
- 'Slave status' => null,
346
  );
10
  'Logout' => 'Odhlásit',
11
  'Logged as: %s' => 'Přihlášen jako: %s',
12
  'Logout successful.' => 'Odhlášení proběhlo v pořádku.',
13
+ 'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Díky za použití Admineru, zvažte <a href="%s">příspěvek</a>.',
14
  'Invalid credentials.' => 'Neplatné přihlašovací údaje.',
15
+ '<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => 'Pro přihlášení k SQLite <a href="https://www.adminer.org/cs/extension/"%s>implementujte</a> metodu %s.',
16
  '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.'),
17
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Platnost hlavního hesla vypršela. <a href="https://www.adminer.org/cs/extension/"%s>Implementujte</a> metodu %s, aby platilo stále.',
18
  'Language' => 'Jazyk',
19
  'Invalid CSRF token. Send the form again.' => 'Neplatný token CSRF. Odešlete formulář znovu.',
20
  'If you did not send this request from Adminer then close this page.' => 'Pokud jste tento požadavek neposlali z Adminera, tak tuto stránku zavřete.',
21
  'No extension' => 'Žádné rozšíření',
22
  'None of the supported PHP extensions (%s) are available.' => 'Není dostupné žádné z podporovaných PHP rozšíření (%s).',
23
+ 'Connecting to privileged ports is not allowed.' => 'Připojování k privilegovaným portům není povoleno.',
24
  'Session support must be enabled.' => 'Session proměnné musí být povolené.',
25
  'Session expired, please login again.' => 'Session vypršela, přihlašte se prosím znovu.',
26
+ 'The action will be performed after successful login with the same credentials.' => 'Akce bude provedena po úspěšném přihlášení se stejnými přihlašovacími údaji.',
27
  '%s version: %s through PHP extension %s' => 'Verze %s: %s přes PHP rozšíření %s',
28
  'Refresh' => 'Obnovit',
29
 
48
  'Variables' => 'Proměnné',
49
  'Status' => 'Stav',
50
 
 
 
 
 
51
  'SQL command' => 'SQL příkaz',
52
  '%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.'),
53
  '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ů.'),
54
  'No commands to execute.' => 'Žádné příkazy k vykonání.',
55
  'Error in query' => 'Chyba v dotazu',
56
+ 'Warnings' => 'Varování',
57
  'ATTACH queries are not supported.' => 'Dotazy ATTACH nejsou podporované.',
58
  'Execute' => 'Provést',
59
  'Stop on error' => 'Zastavit při chybě',
85
 
86
  'Database' => 'Databáze',
87
  'database' => 'databáze',
88
+ 'DB' => 'DB',
89
  'Use' => 'Vybrat',
90
  'Select database' => 'Vybrat databázi',
91
  'Invalid database.' => 'Nesprávná databáze.',
174
  'Default value' => 'Výchozí hodnota',
175
  'Default values' => 'Výchozí hodnoty',
176
  'Drop' => 'Odstranit',
177
+ 'Drop %s?' => 'Odstranit %s?',
178
  'Are you sure?' => 'Opravdu?',
179
  'Size' => 'Velikost',
180
  'Compute' => 'Spočítat',
253
  'last' => 'poslední',
254
  'Load more data' => 'Nahrát další data',
255
  'Loading' => 'Nahrává se',
256
+ 'Whole result' => 'Celý výsledek',
257
  '%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtů'),
258
 
259
  'Import' => 'Import',
341
  'Type has been dropped.' => 'Typ byl odstraněn.',
342
  'Type has been created.' => 'Typ byl vytvořen.',
343
  'Alter type' => 'Pozměnit typ',
 
 
 
 
344
  );
adminer/adminer/adminer/lang/da.inc.php CHANGED
@@ -10,7 +10,7 @@ $translations = array(
10
  'Logged as: %s' => 'Logget ind som: %s',
11
  'Logout successful.' => 'Log af vellykket.',
12
  'Invalid credentials.' => 'Ugyldige log ind oplysninger.',
13
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Master-kodeordet er udløbet. <a href="https://www.adminer.org/en/extension/" target="_blank">Implementer</a> en metode for %s for at gøre det permanent.',
14
  'Language' => 'Sprog',
15
  'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.',
16
  'No extension' => 'Ingen udvidelse',
@@ -212,7 +212,7 @@ $translations = array(
212
  'last' => 'sidste',
213
  'Load more data' => 'Indlæs mere data',
214
  'Loading' => 'Indlæser',
215
- 'whole result' => 'hele resultatet',
216
  '%d byte(s)' => array('%d byte', '%d bytes'),
217
  'Import' => 'Importer',
218
  '%d row(s) have been imported.' => array('%d række er importeret.', '%d rækker er importeret.'),
10
  'Logged as: %s' => 'Logget ind som: %s',
11
  'Logout successful.' => 'Log af vellykket.',
12
  'Invalid credentials.' => 'Ugyldige log ind oplysninger.',
13
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-kodeordet er udløbet. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for at gøre det permanent.',
14
  'Language' => 'Sprog',
15
  'Invalid CSRF token. Send the form again.' => 'Ugyldigt CSRF-token - Genindsend formen.',
16
  'No extension' => 'Ingen udvidelse',
212
  'last' => 'sidste',
213
  'Load more data' => 'Indlæs mere data',
214
  'Loading' => 'Indlæser',
215
+ 'Whole result' => 'Hele resultatet',
216
  '%d byte(s)' => array('%d byte', '%d bytes'),
217
  'Import' => 'Importer',
218
  '%d row(s) have been imported.' => array('%d række er importeret.', '%d rækker er importeret.'),
adminer/adminer/adminer/lang/de.inc.php CHANGED
@@ -186,7 +186,7 @@ $translations = array(
186
  'original' => 'Original',
187
  'Tables have been dropped.' => 'Tabellen wurden entfernt (drop).',
188
  '%d item(s) have been affected.' => '%d Artikel betroffen.',
189
- 'whole result' => 'Gesamtergebnis',
190
  'Clone' => 'Klonen',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Die maximal erlaubte Anzahl der Felder ist überschritten. Bitte %s erhöhen.',
192
  'Partition by' => 'Partitionieren um',
@@ -283,6 +283,6 @@ $translations = array(
283
  'Saving' => 'Speichere',
284
  'yes' => 'ja',
285
  'no' => 'nein',
286
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Das Master-Passwort ist abgelaufen. <a href="https://www.adminer.org/de/extension/" target="_blank">Implementieren</a> Sie die %s Methode, um es permanent zu machen.',
287
  '%d / ' => '%d / ',
288
  );
186
  'original' => 'Original',
187
  'Tables have been dropped.' => 'Tabellen wurden entfernt (drop).',
188
  '%d item(s) have been affected.' => '%d Artikel betroffen.',
189
+ 'Whole result' => 'Gesamtergebnis',
190
  'Clone' => 'Klonen',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Die maximal erlaubte Anzahl der Felder ist überschritten. Bitte %s erhöhen.',
192
  'Partition by' => 'Partitionieren um',
283
  'Saving' => 'Speichere',
284
  'yes' => 'ja',
285
  'no' => 'nein',
286
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Das Master-Passwort ist abgelaufen. <a href="https://www.adminer.org/de/extension/"%s>Implementieren</a> Sie die %s Methode, um es permanent zu machen.',
287
  '%d / ' => '%d / ',
288
  );
adminer/adminer/adminer/lang/el.inc.php CHANGED
@@ -12,7 +12,7 @@ $translations = array(
12
  'Logout successful.' => 'Αποσυνδεθήκατε με επιτυχία.',
13
  'Invalid credentials.' => 'Εσφαλμένα Διαπιστευτήρια.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Επανηλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτό.', 'Επανηλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτά.'),
15
- '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 για να τον κάνετε μόνιμο.',
16
  'Language' => 'Γλώσσα',
17
  'Invalid CSRF token. Send the form again.' => 'Άκυρο κουπόνι CSRF. Στείλτε τη φόρμα ξανά.',
18
  'If you did not send this request from Adminer then close this page.' => 'Αν δε στείλατε αυτό το αίτημα από το Adminer, τότε κλείστε αυτή τη σελίδα.',
@@ -149,7 +149,7 @@ $translations = array(
149
  'Table' => 'Πίνακας',
150
  'No tables.' => 'Χωρίς πίνακες.',
151
  'Alter table' => 'Τροποποίηση πίνακα',
152
- 'Create table' => 'Δημιουργία πίνακα',
153
  'Table has been dropped.' => 'Ο πίνακας διαγράφηκε.',
154
  'Tables have been dropped.' => 'Οι πινακες διαγράφηκαν.',
155
  'Tables have been optimized.' => 'Οι πίνακες βελτιστοποιήθηκαν.',
@@ -246,7 +246,7 @@ $translations = array(
246
  'last' => 'τελευταία',
247
  'Load more data' => 'Φόρτωση κι άλλων δεδομένων',
248
  'Loading' => 'Φορτώνει',
249
- 'whole result' => 'όλο το αποτέλεσμα',
250
  '%d byte(s)' => array('%d byte', '%d bytes'),
251
 
252
  'Import' => 'Εισαγωγή',
12
  'Logout successful.' => 'Αποσυνδεθήκατε με επιτυχία.',
13
  'Invalid credentials.' => 'Εσφαλμένα Διαπιστευτήρια.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Επανηλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτό.', 'Επανηλημμένες ανεπιτυχείς προσπάθειες σύνδεσης, δοκιμάστε ξανά σε %s λεπτά.'),
15
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Έλειξε ο Κύριος Κωδικός. <a href="https://www.adminer.org/en/extension/"%s>Ενεργοποιήστε</a> τη μέθοδο %s για να τον κάνετε μόνιμο.',
16
  'Language' => 'Γλώσσα',
17
  'Invalid CSRF token. Send the form again.' => 'Άκυρο κουπόνι CSRF. Στείλτε τη φόρμα ξανά.',
18
  'If you did not send this request from Adminer then close this page.' => 'Αν δε στείλατε αυτό το αίτημα από το Adminer, τότε κλείστε αυτή τη σελίδα.',
149
  'Table' => 'Πίνακας',
150
  'No tables.' => 'Χωρίς πίνακες.',
151
  'Alter table' => 'Τροποποίηση πίνακα',
152
+ 'Create table' => 'Δημιουργία πίνακα',
153
  'Table has been dropped.' => 'Ο πίνακας διαγράφηκε.',
154
  'Tables have been dropped.' => 'Οι πινακες διαγράφηκαν.',
155
  'Tables have been optimized.' => 'Οι πίνακες βελτιστοποιήθηκαν.',
246
  'last' => 'τελευταία',
247
  'Load more data' => 'Φόρτωση κι άλλων δεδομένων',
248
  'Loading' => 'Φορτώνει',
249
+ 'Whole result' => 'Όλο το αποτέλεσμα',
250
  '%d byte(s)' => array('%d byte', '%d bytes'),
251
 
252
  'Import' => 'Εισαγωγή',
adminer/adminer/adminer/lang/es.inc.php CHANGED
@@ -44,9 +44,9 @@ $translations = array(
44
  'Delete' => 'Eliminar',
45
  'Database' => 'Base de datos',
46
  'Routines' => 'Procedimientos',
47
- 'Indexes have been altered.' => 'Indices actualizados.',
48
- 'Indexes' => 'Indices',
49
- 'Alter indexes' => 'Modificar indices',
50
  'Add next' => 'Agregar',
51
  'Language' => 'Idioma',
52
  'Select' => 'Mostrar',
@@ -77,7 +77,7 @@ $translations = array(
77
  'File uploads are disabled.' => 'Importación de archivos deshablilitada.',
78
  'Routine has been called, %d row(s) affected.' => array('Consulta ejecutada, %d registro afectado.', 'Consulta ejecutada, %d registros afectados.'),
79
  'Call' => 'Llamar',
80
- 'No extension' => 'No hay extension',
81
  'None of the supported PHP extensions (%s) are available.' => 'Ninguna de las extensiones PHP soportadas (%s) está disponible.',
82
  'Session support must be enabled.' => 'Deben estar habilitadas las sesiones.',
83
  'Session expired, please login again.' => 'Sesión caducada, por favor escriba su clave de nuevo.',
@@ -113,7 +113,7 @@ $translations = array(
113
  'Routine has been dropped.' => 'Procedimiento eliminado.',
114
  'Routine has been altered.' => 'Procedimiento modificado.',
115
  'Routine has been created.' => 'Procedimiento creado.',
116
- 'Alter function' => 'Modificar Función',
117
  'Alter procedure' => 'Modificar procedimiento',
118
  'Return type' => 'Tipo de valor de vuelta',
119
  'Add trigger' => 'Agregar disparador',
@@ -127,7 +127,7 @@ $translations = array(
127
  '%s version: %s through PHP extension %s' => 'Versión %s: %s a través de la extensión de PHP %s',
128
  '%d row(s)' => array('%d registro', '%d registros'),
129
  'Remove' => 'Eliminar',
130
- 'Are you sure?' => 'Está seguro?',
131
  'Privileges' => 'Privilegios',
132
  'Create user' => 'Crear Usuario',
133
  'User has been dropped.' => 'Usuario eliminado.',
@@ -139,7 +139,7 @@ $translations = array(
139
  'Grant' => 'Conceder',
140
  'Revoke' => 'Impedir',
141
  'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST data demasiado grande. Reduzca el tamaño o aumente la directiva de configuración %s.',
142
- 'Logged as: %s' => 'Logeado como: %s',
143
  'Move up' => 'Mover arriba',
144
  'Move down' => 'Mover abajo',
145
  'Functions' => 'Funciones',
@@ -186,12 +186,12 @@ $translations = array(
186
  'original' => 'original',
187
  'Tables have been dropped.' => 'Tablas eliminadas.',
188
  '%d item(s) have been affected.' => array('%d elemento afectado.', '%d elementos afectados.'),
189
- 'whole result' => 'resultado completo',
190
  'Clone' => 'Clonar',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida la cantidad máxima de campos permitidos. Por favor aumente %s.',
192
  'Partition by' => 'Particionar por',
193
  'Partitions' => 'Particiones',
194
- 'Partition name' => 'Nombre de Partición',
195
  'Values' => 'Valores',
196
  '%d row(s) have been imported.' => array('%d registro importado.', '%d registros importados.'),
197
  'anywhere' => 'donde sea',
@@ -248,16 +248,16 @@ $translations = array(
248
  'System' => 'Motor de base de datos',
249
  'Select data' => 'Visualizar contenido',
250
  'Show structure' => 'Mostrar estructura',
251
- 'empty' => 'ningúno',
252
  'Network' => 'Red',
253
  'Geometry' => 'Geometría',
254
  'File exists.' => 'Ese archivo ya existe.',
255
  'Attachments' => 'Adjuntos',
256
- '%d query(s) executed OK.' => array('%d sentencia sql ejecutada correctamente.', '%d sentencias sql ejecutadas correctamente.'),
257
  'Show only errors' => 'Mostrar solamente errores',
258
  'Refresh' => 'Refrescar',
259
  'Invalid schema.' => 'Esquema inválido.',
260
- 'Please use one of the extensions %s.' => 'Por favor use una de las extensiones %s.',
261
  'now' => 'ahora',
262
  'ltr' => 'ltr',
263
  'Tables have been copied.' => 'Tablas copiadas.',
44
  'Delete' => 'Eliminar',
45
  'Database' => 'Base de datos',
46
  'Routines' => 'Procedimientos',
47
+ 'Indexes have been altered.' => 'Índices actualizados.',
48
+ 'Indexes' => 'Índices',
49
+ 'Alter indexes' => 'Modificar índices',
50
  'Add next' => 'Agregar',
51
  'Language' => 'Idioma',
52
  'Select' => 'Mostrar',
77
  'File uploads are disabled.' => 'Importación de archivos deshablilitada.',
78
  'Routine has been called, %d row(s) affected.' => array('Consulta ejecutada, %d registro afectado.', 'Consulta ejecutada, %d registros afectados.'),
79
  'Call' => 'Llamar',
80
+ 'No extension' => 'No hay extensión',
81
  'None of the supported PHP extensions (%s) are available.' => 'Ninguna de las extensiones PHP soportadas (%s) está disponible.',
82
  'Session support must be enabled.' => 'Deben estar habilitadas las sesiones.',
83
  'Session expired, please login again.' => 'Sesión caducada, por favor escriba su clave de nuevo.',
113
  'Routine has been dropped.' => 'Procedimiento eliminado.',
114
  'Routine has been altered.' => 'Procedimiento modificado.',
115
  'Routine has been created.' => 'Procedimiento creado.',
116
+ 'Alter function' => 'Modificar función',
117
  'Alter procedure' => 'Modificar procedimiento',
118
  'Return type' => 'Tipo de valor de vuelta',
119
  'Add trigger' => 'Agregar disparador',
127
  '%s version: %s through PHP extension %s' => 'Versión %s: %s a través de la extensión de PHP %s',
128
  '%d row(s)' => array('%d registro', '%d registros'),
129
  'Remove' => 'Eliminar',
130
+ 'Are you sure?' => '¿Está seguro?',
131
  'Privileges' => 'Privilegios',
132
  'Create user' => 'Crear Usuario',
133
  'User has been dropped.' => 'Usuario eliminado.',
139
  'Grant' => 'Conceder',
140
  'Revoke' => 'Impedir',
141
  'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'POST data demasiado grande. Reduzca el tamaño o aumente la directiva de configuración %s.',
142
+ 'Logged as: %s' => 'Logueado como: %s',
143
  'Move up' => 'Mover arriba',
144
  'Move down' => 'Mover abajo',
145
  'Functions' => 'Funciones',
186
  'original' => 'original',
187
  'Tables have been dropped.' => 'Tablas eliminadas.',
188
  '%d item(s) have been affected.' => array('%d elemento afectado.', '%d elementos afectados.'),
189
+ 'Whole result' => 'Resultado completo',
190
  'Clone' => 'Clonar',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida la cantidad máxima de campos permitidos. Por favor aumente %s.',
192
  'Partition by' => 'Particionar por',
193
  'Partitions' => 'Particiones',
194
+ 'Partition name' => 'Nombre de partición',
195
  'Values' => 'Valores',
196
  '%d row(s) have been imported.' => array('%d registro importado.', '%d registros importados.'),
197
  'anywhere' => 'donde sea',
248
  'System' => 'Motor de base de datos',
249
  'Select data' => 'Visualizar contenido',
250
  'Show structure' => 'Mostrar estructura',
251
+ 'empty' => 'ninguno',
252
  'Network' => 'Red',
253
  'Geometry' => 'Geometría',
254
  'File exists.' => 'Ese archivo ya existe.',
255
  'Attachments' => 'Adjuntos',
256
+ '%d query(s) executed OK.' => array('%d sentencia SQL ejecutada correctamente.', '%d sentencias SQL ejecutadas correctamente.'),
257
  'Show only errors' => 'Mostrar solamente errores',
258
  'Refresh' => 'Refrescar',
259
  'Invalid schema.' => 'Esquema inválido.',
260
+ 'Please use one of the extensions %s.' => 'Por favor, use una de las extensiones %s.',
261
  'now' => 'ahora',
262
  'ltr' => 'ltr',
263
  'Tables have been copied.' => 'Tablas copiadas.',
adminer/adminer/adminer/lang/et.inc.php CHANGED
@@ -186,7 +186,7 @@ $translations = array(
186
  'Move to other database' => 'Liiguta teise andmebaasi',
187
  'Move' => 'Liiguta',
188
  '%d item(s) have been affected.' => 'Mõjutatud kirjeid: %d.',
189
- 'whole result' => 'Täielikud tulemused',
190
  'Clone' => 'Kloon',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s.',
192
  'Partition by' => 'Partitsiooni',
186
  'Move to other database' => 'Liiguta teise andmebaasi',
187
  'Move' => 'Liiguta',
188
  '%d item(s) have been affected.' => 'Mõjutatud kirjeid: %d.',
189
+ 'Whole result' => 'Täielikud tulemused',
190
  'Clone' => 'Kloon',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maksimaalne väljade arv ületatud. Palun suurendage %s.',
192
  'Partition by' => 'Partitsiooni',
adminer/adminer/adminer/lang/fa.inc.php CHANGED
@@ -12,7 +12,7 @@ $translations = array(
12
  'Logout successful.' => 'با موفقیت خارج شدید.',
13
  'Invalid credentials.' => 'اعتبار سنجی نامعتبر.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.', 'ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.'),
15
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'رمز اصلی باطل شده است. روش %s را <a href="https://www.adminer.org/en/extension/" target="_blank">پیاده سازی</a> کرده تا آن را دائمی سازید.',
16
  'Language' => 'زبان',
17
  'Invalid CSRF token. Send the form again.' => 'CSRF token نامعتبر است. دوباره سعی کنید.',
18
  'No extension' => 'پسوند نامعتبر',
@@ -244,7 +244,7 @@ $translations = array(
244
  'last' => 'آخری',
245
  'Load more data' => 'بارگزاری اطلاعات بیشتر',
246
  'Loading' => 'در حال بارگزاری',
247
- 'whole result' => 'همه نتایج',
248
  '%d byte(s)' => array('%d بایت', '%d بایت'),
249
 
250
  'Import' => 'وارد کردن',
12
  'Logout successful.' => 'با موفقیت خارج شدید.',
13
  'Invalid credentials.' => 'اعتبار سنجی نامعتبر.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.', 'ورودهای ناموفق بیش از حد، %d دقیقه دیگر تلاش نمایید.'),
15
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'رمز اصلی باطل شده است. روش %s را <a href="https://www.adminer.org/en/extension/"%s>پیاده سازی</a> کرده تا آن را دائمی سازید.',
16
  'Language' => 'زبان',
17
  'Invalid CSRF token. Send the form again.' => 'CSRF token نامعتبر است. دوباره سعی کنید.',
18
  'No extension' => 'پسوند نامعتبر',
244
  'last' => 'آخری',
245
  'Load more data' => 'بارگزاری اطلاعات بیشتر',
246
  'Loading' => 'در حال بارگزاری',
247
+ 'Whole result' => 'همه نتایج',
248
  '%d byte(s)' => array('%d بایت', '%d بایت'),
249
 
250
  'Import' => 'وارد کردن',
adminer/adminer/adminer/lang/fi.inc.php CHANGED
@@ -12,7 +12,7 @@ $translations = array(
12
  'Logout successful.' => 'Uloskirjautuminen onnistui.',
13
  'Invalid credentials.' => 'Virheelliset kirjautumistiedot.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.', 'Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.'),
15
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Master-salasana ei ole enää voimassa. <a href="https://www.adminer.org/en/extension/" target="_blank">Toteuta</a> %s-metodi sen tekemiseksi pysyväksi.',
16
  'Language' => 'Kieli',
17
  'Invalid CSRF token. Send the form again.' => 'Virheellinen CSRF-vastamerkki. Lähetä lomake uudelleen.',
18
  'If you did not send this request from Adminer then close this page.' => 'Jollet lähettänyt tämä pyyntö Adminerista, sulje tämä sivu.',
@@ -246,7 +246,7 @@ $translations = array(
246
  'last' => 'viimeinen',
247
  'Load more data' => 'Lataa lisää dataa',
248
  'Loading' => 'Ladataan',
249
- 'whole result' => 'koko tulos',
250
  '%d byte(s)' => array('%d tavu', '%d tavua'),
251
 
252
  'Import' => 'Tuonti',
12
  'Logout successful.' => 'Uloskirjautuminen onnistui.',
13
  'Invalid credentials.' => 'Virheelliset kirjautumistiedot.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.', 'Liian monta epäonnistunutta sisäänkirjautumisyritystä, kokeile uudestaan %d minuutin kuluttua.'),
15
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-salasana ei ole enää voimassa. <a href="https://www.adminer.org/en/extension/"%s>Toteuta</a> %s-metodi sen tekemiseksi pysyväksi.',
16
  'Language' => 'Kieli',
17
  'Invalid CSRF token. Send the form again.' => 'Virheellinen CSRF-vastamerkki. Lähetä lomake uudelleen.',
18
  'If you did not send this request from Adminer then close this page.' => 'Jollet lähettänyt tämä pyyntö Adminerista, sulje tämä sivu.',
246
  'last' => 'viimeinen',
247
  'Load more data' => 'Lataa lisää dataa',
248
  'Loading' => 'Ladataan',
249
+ 'Whole result' => 'Koko tulos',
250
  '%d byte(s)' => array('%d tavu', '%d tavua'),
251
 
252
  'Import' => 'Tuonti',
adminer/adminer/adminer/lang/fr.inc.php CHANGED
@@ -184,7 +184,7 @@ $translations = array(
184
  'Move to other database' => 'Déplacer vers une autre base de données',
185
  'Move' => 'Déplacer',
186
  '%d item(s) have been affected.' => array('%d élément a été modifié.', '%d éléments ont été modifiés.'),
187
- 'whole result' => 'résultat entier',
188
  'Clone' => 'Cloner',
189
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Le nombre maximum de champs est dépassé. Veuillez augmenter %s.',
190
  'Partition by' => 'Partitionner par',
@@ -274,7 +274,7 @@ $translations = array(
274
  'File must be in UTF-8 encoding.' => 'Les fichiers doivent être encodés en UTF-8.',
275
  'Full table scan' => 'Scan de toute la table',
276
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Trop de connexions échouées, essayez à nouveau dans %d minute.', 'Trop de connexions échouées, essayez à nouveau dans %d minutes.'),
277
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Le mot de passe a expiré. <a href="https://www.adminer.org/en/extension/" target="_blank">Implémentez</a> la méthode %s afin de le rendre permanent.',
278
  'You can upload a big SQL file via FTP and import it from server.' => 'Vous pouvez uploader un gros fichier SQL par FTP et ensuite l\'importer depuis le serveur.',
279
  'Size' => 'Taille',
280
  'Compute' => 'Calcul',
184
  'Move to other database' => 'Déplacer vers une autre base de données',
185
  'Move' => 'Déplacer',
186
  '%d item(s) have been affected.' => array('%d élément a été modifié.', '%d éléments ont été modifiés.'),
187
+ 'Whole result' => 'Résultat entier',
188
  'Clone' => 'Cloner',
189
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Le nombre maximum de champs est dépassé. Veuillez augmenter %s.',
190
  'Partition by' => 'Partitionner par',
274
  'File must be in UTF-8 encoding.' => 'Les fichiers doivent être encodés en UTF-8.',
275
  'Full table scan' => 'Scan de toute la table',
276
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Trop de connexions échouées, essayez à nouveau dans %d minute.', 'Trop de connexions échouées, essayez à nouveau dans %d minutes.'),
277
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Le mot de passe a expiré. <a href="https://www.adminer.org/en/extension/"%s>Implémentez</a> la méthode %s afin de le rendre permanent.',
278
  'You can upload a big SQL file via FTP and import it from server.' => 'Vous pouvez uploader un gros fichier SQL par FTP et ensuite l\'importer depuis le serveur.',
279
  'Size' => 'Taille',
280
  'Compute' => 'Calcul',
adminer/adminer/adminer/lang/gl.inc.php CHANGED
@@ -186,7 +186,7 @@ $translations = array(
186
  'original' => 'orixinal',
187
  'Tables have been dropped.' => 'Elimináronse as táboas.',
188
  '%d item(s) have been affected.' => array('%d elemento afectado.', '%d elementos afectados.'),
189
- 'whole result' => 'resultado completo',
190
  'Clone' => 'Clonar',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida o número máximo de campos permitidos. Por favor aumente %s.',
192
  'Partition by' => 'Particionar por',
@@ -278,7 +278,7 @@ $translations = array(
278
  'Default value' => 'Valor por defecto',
279
  'Full table scan' => 'Escaneo completo da táboa',
280
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Demasiados intentos de conexión, intentao de novo en %d minuto', 'Demasiados intentos de conexión, intentao de novo en %d minutos'),
281
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'O contrasinal principal caducou. <a href="https://www.adminer.org/en/extension/" target="_blank">Implementa</a> o método %s para facelo permanente.',
282
  'If you did not send this request from Adminer then close this page.' => 'Se non enviaches esta petición dende o Adminer entón pecha esta páxina',
283
  'You can upload a big SQL file via FTP and import it from server.' => 'Podes subir un ficheiro SQL de gran tamaño vía FTP e importalo dende o servidor',
284
  'Size' => 'Tamaño',
186
  'original' => 'orixinal',
187
  'Tables have been dropped.' => 'Elimináronse as táboas.',
188
  '%d item(s) have been affected.' => array('%d elemento afectado.', '%d elementos afectados.'),
189
+ 'Whole result' => 'Resultado completo',
190
  'Clone' => 'Clonar',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Excedida o número máximo de campos permitidos. Por favor aumente %s.',
192
  'Partition by' => 'Particionar por',
278
  'Default value' => 'Valor por defecto',
279
  'Full table scan' => 'Escaneo completo da táboa',
280
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Demasiados intentos de conexión, intentao de novo en %d minuto', 'Demasiados intentos de conexión, intentao de novo en %d minutos'),
281
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'O contrasinal principal caducou. <a href="https://www.adminer.org/en/extension/"%s>Implementa</a> o método %s para facelo permanente.',
282
  'If you did not send this request from Adminer then close this page.' => 'Se non enviaches esta petición dende o Adminer entón pecha esta páxina',
283
  'You can upload a big SQL file via FTP and import it from server.' => 'Podes subir un ficheiro SQL de gran tamaño vía FTP e importalo dende o servidor',
284
  'Size' => 'Tamaño',
adminer/adminer/adminer/lang/he.inc.php ADDED
@@ -0,0 +1,294 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $translations = array(
3
+ 'Login' => 'התחברות',
4
+ 'Logout successful.' => 'ההתחברות הצליחה',
5
+ 'Invalid credentials.' => 'פרטי התחברות שגויים',
6
+ 'Server' => 'שרת',
7
+ 'Username' => 'שם משתמש',
8
+ 'Password' => 'סיסמה',
9
+ 'Select database' => 'בחר מסד נתונים',
10
+ 'Invalid database.' => 'מסד נתונים שגוי',
11
+ 'Table has been dropped.' => 'הטבלה הושלכה',
12
+ 'Table has been altered.' => 'הטבלה שונתה',
13
+ 'Table has been created.' => 'הטבלה נוצרה',
14
+ 'Alter table' => 'שנה טבלה',
15
+ 'Create table' => 'צור טבלה',
16
+ 'Table name' => 'שם הטבלה',
17
+ 'engine' => 'מנוע',
18
+ 'collation' => 'קולקציה',
19
+ 'Column name' => 'שם עמודה',
20
+ 'Type' => 'סוג',
21
+ 'Length' => 'אורך',
22
+ 'Auto Increment' => 'הגדלה אוטומטית',
23
+ 'Options' => 'אפשרויות',
24
+ 'Save' => 'שמור',
25
+ 'Drop' => 'השלך',
26
+ 'Database has been created.' => 'מסד הנתונים נוצר',
27
+ 'Database has been renamed.' => 'שם מסד הנתונים שונה',
28
+ 'Database has been altered.' => 'מסד הנתונים שונה',
29
+ 'Alter database' => 'שנה מסד נתונים',
30
+ 'Create database' => 'צור מסד נתונים',
31
+ 'SQL command' => 'שאילתת SQL',
32
+ 'Logout' => 'התנתק',
33
+ 'database' => 'מסד נתונים',
34
+ 'Use' => 'השתמש',
35
+ 'No tables.' => 'אין טבלאות',
36
+ 'select' => 'בחר',
37
+ 'Item has been deleted.' => 'הפריט נמחק',
38
+ 'Item has been updated.' => 'הפריט עודכן',
39
+ 'Edit' => 'ערוך',
40
+ 'Insert' => 'הכנס',
41
+ 'Save and insert next' => 'שמור והמשך להכניס',
42
+ 'Delete' => 'מחק',
43
+ 'Database' => 'מסד נתונים',
44
+ 'Routines' => 'רוטינות',
45
+ 'Indexes have been altered.' => 'האינדקסים שונו',
46
+ 'Indexes' => 'אינדקסים',
47
+ 'Alter indexes' => 'שנה אינדקסים',
48
+ 'Add next' => 'הוסף הבא',
49
+ 'Language' => 'שפה',
50
+ 'Select' => 'בחר',
51
+ 'New item' => 'פריט חדש',
52
+ 'Search' => 'חפש',
53
+ 'Sort' => 'מיין',
54
+ 'descending' => 'סדר הפוך',
55
+ 'Limit' => 'הגבל',
56
+ 'No rows.' => 'אין שורות',
57
+ 'Action' => 'פעולות',
58
+ 'edit' => 'ערוך',
59
+ 'Page' => 'עמוד',
60
+ 'Query executed OK, %d row(s) affected.' => 'השאילתה בוצעה כהלכה, %d שורות הושפעו',
61
+ 'Error in query' => 'שגיאה בשאילתה',
62
+ 'Execute' => 'הרץ',
63
+ 'Table' => 'טבלה',
64
+ 'Foreign keys' => 'מפתחות זרים',
65
+ 'Triggers' => 'מפעילים',
66
+ 'View' => 'הצג',
67
+ 'Unable to select the table' => 'בחירת הטבלה נכשלה',
68
+ 'Invalid CSRF token. Send the form again.' => 'כשל באבטחת נתונים, שלח טופס שוב',
69
+ 'Comment' => 'הערה',
70
+ 'Default values' => 'ערכי ברירת מחדל',
71
+ '%d byte(s)' => '%d בתים',
72
+ 'No commands to execute.' => 'לא נמצאו פקודות להרצה',
73
+ 'Unable to upload a file.' => 'העלאת הקובץ נכשלה',
74
+ 'File upload' => 'העלה קובץ',
75
+ 'File uploads are disabled.' => 'העלאת קבצים מבוטלת',
76
+ 'Routine has been called, %d row(s) affected.' => 'הרוטינה נקראה, %d שורות הושפעו',
77
+ 'Call' => 'קרא',
78
+ 'No extension' => 'אין תוסף',
79
+ 'None of the supported PHP extensions (%s) are available.' => 'שום תוסף PHP (%s) זמין',
80
+ 'Session support must be enabled.' => 'חובה להפעיל תמיכה בסשן',
81
+ 'Session expired, please login again.' => 'תם זמן ההפעלה, אנא התחבר שוב',
82
+ 'Text length' => 'אורך הטקסט',
83
+ 'Foreign key has been dropped.' => 'המפתח הזר הושלך',
84
+ 'Foreign key has been altered.' => 'המפתח הזר שונה',
85
+ 'Foreign key has been created.' => 'המפתח הזר נוצר',
86
+ 'Foreign key' => 'מפתח זר',
87
+ 'Target table' => 'טבלת יעד',
88
+ 'Change' => 'שנה',
89
+ 'Source' => 'מקור',
90
+ 'Target' => 'יעד',
91
+ 'Add column' => 'הוסף עמודה',
92
+ 'Alter' => 'שנה',
93
+ 'Add foreign key' => 'הוסף מפתח זר',
94
+ 'ON DELETE' => 'בעת מחיקה',
95
+ 'ON UPDATE' => 'בעת עידכון',
96
+ 'Index Type' => 'סוג אינדקס',
97
+ 'Column (length)' => 'עמודה (אורך)',
98
+ 'View has been dropped.' => 'התצוגה הושלכה',
99
+ 'View has been altered.' => 'התצוגה שונתה',
100
+ 'View has been created.' => 'התצוגה נוצרה',
101
+ 'Alter view' => 'שנה תצוגה',
102
+ 'Create view' => 'צור תצוגה',
103
+ 'Name' => 'שם',
104
+ 'Process list' => 'רשימת תהליכים',
105
+ '%d process(es) have been killed.' => '%d תהליכים חוסלו',
106
+ 'Kill' => 'חסל',
107
+ 'Parameter name' => 'שם הפרמטר',
108
+ 'Database schema' => 'סכמת מסד נתונים',
109
+ 'Create procedure' => 'צור פרוצדורה',
110
+ 'Create function' => 'צור פונקציה',
111
+ 'Routine has been dropped.' => 'הרוטינה הושלכה',
112
+ 'Routine has been altered.' => 'הרוטינה שונתה',
113
+ 'Routine has been created.' => 'הרוטינה נוצרה',
114
+ 'Alter function' => 'שנה פונקציה',
115
+ 'Alter procedure' => 'שנה פרוצדורה',
116
+ 'Return type' => 'סוג ערך מוחזר',
117
+ 'Add trigger' => 'הוסף טריגר',
118
+ 'Trigger has been dropped.' => 'הטריגר הושלך',
119
+ 'Trigger has been altered.' => 'הטריגר שונה',
120
+ 'Trigger has been created.' => 'הטריגר נוצר',
121
+ 'Alter trigger' => 'שנה טריגר',
122
+ 'Create trigger' => 'צור טריגר',
123
+ 'Time' => 'זמן',
124
+ 'Event' => 'אירוע',
125
+ '%d row(s)' => '%d שורות',
126
+ 'Remove' => 'הסר',
127
+ 'Are you sure?' => 'האם אתה בטוח?',
128
+ 'Privileges' => 'פריווילגיות',
129
+ 'Create user' => 'צור משתמש',
130
+ 'User has been dropped.' => 'המשתמש הושלך',
131
+ 'User has been altered.' => 'המשתמש שונה',
132
+ 'User has been created.' => 'המשתמש נוצר',
133
+ 'Hashed' => 'הצפנה',
134
+ 'Column' => 'עמודה',
135
+ 'Routine' => 'רוטינה',
136
+ 'Grant' => 'הענק',
137
+ 'Revoke' => 'שלול',
138
+ '%s version: %s through PHP extension %s' => '%s גרסה: %s דרך תוסף PHP %s',
139
+ 'Logged as: %s' => 'מחובר כ: %s',
140
+ 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'מידע גדול מידי נשלח ב-POST. הקטן את את המידע הוא הגדלת את הגדרות ה-%s',
141
+ 'Move up' => 'הזז למעלה',
142
+ 'Move down' => 'הזז למטה',
143
+ 'Export' => 'יצא',
144
+ 'Tables' => 'טבלאות',
145
+ 'Data' => 'נתונים',
146
+ 'Output' => 'פלט',
147
+ 'open' => 'פתח',
148
+ 'save' => 'שמור',
149
+ 'Format' => 'פורמט',
150
+ 'Functions' => 'פונקציות',
151
+ 'Aggregation' => 'צבירה',
152
+ 'Event has been dropped.' => 'האירוע הושלך',
153
+ 'Event has been altered.' => 'האירוע שונה',
154
+ 'Event has been created.' => 'האירוע נוצר',
155
+ 'Alter event' => 'שנה אירוע',
156
+ 'Create event' => 'צור אירוע',
157
+ 'Start' => 'התחלה',
158
+ 'End' => 'סיום',
159
+ 'Every' => 'כל',
160
+ 'Status' => 'סטטוס',
161
+ 'On completion preserve' => 'בעת סיום שמור',
162
+ 'Events' => 'אירועים',
163
+ 'Schedule' => 'תזמן',
164
+ 'At given time' => 'לפי זמן נתון',
165
+ 'Save and continue edit' => 'שמור והמשך לערוך',
166
+ 'original' => 'מקורי',
167
+ 'Tables have been truncated.' => 'הטבלה קוצרה',
168
+ 'Tables have been moved.' => 'הטבלה הועברה',
169
+ 'Tables have been dropped.' => 'הטבלה הושלכה',
170
+ 'Tables and views' => 'טבלאות ותצוגות',
171
+ 'Engine' => 'מנוע',
172
+ 'Collation' => 'קולקציה',
173
+ 'Data Length' => 'אורך נתונים',
174
+ 'Index Length' => 'אורך אינדקס',
175
+ 'Data Free' => 'נתונים משוחררים',
176
+ 'Rows' => 'שורות',
177
+ ',' => ',',
178
+ '0123456789' => '0123456789',
179
+ 'Analyze' => 'נתח',
180
+ 'Optimize' => 'יעל',
181
+ 'Check' => 'בדוק',
182
+ 'Repair' => 'תקן',
183
+ 'Truncate' => 'קצר',
184
+ 'Move to other database' => 'העבר למסד נתונים אחר',
185
+ 'Move' => 'העבר',
186
+ '%d item(s) have been affected.' => '%d פריטים הושפעו',
187
+ 'Whole result' => 'כל התוצאות',
188
+ 'Clone' => 'שכפל',
189
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'הגעת למספר השדות המרבי. בבקשה הגדל את %s',
190
+ 'Partition by' => 'מחיצות ע"י',
191
+ 'Partitions' => 'מחיצות',
192
+ 'Partition name' => 'שם מחיצה',
193
+ 'Values' => 'ערכים',
194
+ '%d row(s) have been imported.' => '%d שורות יובאו',
195
+ 'anywhere' => 'בכל מקום',
196
+ 'Import' => 'יבא',
197
+ 'Stop on error' => 'עצור בעת שגיאה',
198
+ '%.3f s' => '%.3f s',
199
+ '$1-$3-$5' => '$1-$3-$5',
200
+ '[yyyy]-mm-dd' => '[yyyy]-mm-dd',
201
+ 'History' => 'היסטוריה',
202
+ 'Variables' => 'משתנים',
203
+ 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'על עמודות המקור והיעד להיות מאותו טיפוס נתונים, חובה שיהיה אינדקס בעמודת היעד ושהמידע המתאים יהיה קיים',
204
+ 'Relations' => 'הקשרים',
205
+ 'Run file' => 'הרץ קובץ',
206
+ 'Clear' => 'נקה',
207
+ 'Maximum allowed file size is %sB.' => 'גודל מקסימלאי להעלאה: %sB',
208
+ 'Numbers' => 'מספרים',
209
+ 'Date and time' => 'תאריך ושעה',
210
+ 'Strings' => 'מחרוזות',
211
+ 'Binary' => 'בינארי',
212
+ 'Lists' => 'רשימות',
213
+ 'Editor' => 'עורך',
214
+ 'E-mail' => 'דוא"ל',
215
+ 'From' => 'מ:',
216
+ 'Subject' => 'נושא',
217
+ 'Send' => 'שלח',
218
+ '%d e-mail(s) have been sent.' => '%d הודעות דוא"ל נשלחו',
219
+ 'Webserver file %s' => 'קובץ השרת %s',
220
+ 'File does not exist.' => 'הקובץ אינו קיים',
221
+ '%d in total' => '%d בסך הכל',
222
+ 'Permanent login' => 'התחבר לצמיתות',
223
+ 'Databases have been dropped.' => 'מסד הנתונים הושלך',
224
+ 'Database has been dropped.' => 'מסד הנתונים הושלך',
225
+ 'Search data in tables' => 'חפש מידע בטבלאות',
226
+ 'Schema' => 'סכמה',
227
+ 'Alter schema' => 'שנה סכמה',
228
+ 'Create schema' => 'צור סכמה',
229
+ 'Schema has been dropped.' => 'הסכמה הושלכה',
230
+ 'Schema has been created.' => 'הסכמה נוצרה',
231
+ 'Schema has been altered.' => 'הסכמה שונתה',
232
+ 'Sequences' => 'סדרות',
233
+ 'Create sequence' => 'צור סדרה',
234
+ 'Alter sequence' => 'שנה סדרה',
235
+ 'Sequence has been dropped.' => 'הסדרה הושלכה',
236
+ 'Sequence has been created.' => 'הסדרה נוצרה',
237
+ 'Sequence has been altered.' => 'הסדרה שונתה',
238
+ 'User types' => 'סוגי משתמשים',
239
+ 'Create type' => 'צור סוג',
240
+ 'Alter type' => 'שנה סוג',
241
+ 'Type has been dropped.' => 'הסוג הושלך',
242
+ 'Type has been created.' => 'הסוג נוצר',
243
+ 'Use edit link to modify this value.' => 'השתמש בקישור העריכה בשביל לשנות את הערך',
244
+ 'last' => 'אחרון',
245
+ 'From server' => 'משרת',
246
+ 'System' => 'מערכת',
247
+ 'Select data' => 'בחר נתונים',
248
+ 'Show structure' => 'הראה מבנה',
249
+ 'empty' => 'ריק',
250
+ 'Network' => 'רשת',
251
+ 'Geometry' => 'גיאומטריה',
252
+ 'File exists.' => 'קובץ קיים',
253
+ 'Attachments' => 'קבצים מצורפים',
254
+ 'Item%s has been inserted.' => 'הפריט %s הוזן בהצלחה',
255
+ 'now' => 'כעת',
256
+ '%d query(s) executed OK.' => '%d שאילתות בוצעו בהצלחה',
257
+ 'Show only errors' => 'הראה שגיאות בלבד',
258
+ 'Refresh' => 'רענן',
259
+ 'Invalid schema.' => 'סכמה שגויה',
260
+ 'Please use one of the extensions %s.' => 'בבקשה השתמש באחד מהתוספים %s',
261
+ 'ltr' => 'rtl',
262
+ 'Tables have been copied.' => 'הטבלה הועתקה',
263
+ 'Copy' => 'העתק',
264
+ 'Permanent link' => 'קישור סופי',
265
+ 'Edit all' => 'ערוך הכל',
266
+ 'HH:MM:SS' => 'HH:MM:SS',
267
+ 'Tables have been optimized.' => 'הטבלאות עברו אופטימיזציה',
268
+ 'Materialized view' => 'תצוגת מימוש ',
269
+ 'Vacuum' => 'וואקום',
270
+ 'Selected' => 'נבחרים',
271
+ 'Ctrl+click on a value to modify it.' => 'לחץ ctrl + לחיצת עכבר לערוך ערך זה',
272
+ 'File must be in UTF-8 encoding.' => 'על הקובץ להיות בקידוד utf-8',
273
+ 'Modify' => 'ערוך',
274
+ 'Loading' => 'טוען',
275
+ 'Load more data' => 'טען נתונים נוספים',
276
+ 'ATTACH queries are not supported.' => 'שאילתת ATTACH אינה נתמכת',
277
+ '%d / ' => '%d / ',
278
+ 'Limit rows' => 'הגבל שורות',
279
+ '<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/"%s>התקן</a> את תוסף SQLite בשביל להתחבר',
280
+ 'Default value' => 'ערך ברירת מחדל',
281
+ 'Full table scan' => 'סריקה טבלה מלאה',
282
+ 'Too many unsuccessful logins, try again in %d minute(s).' => 'יותר מידי נסיונות כניסה נכשלו, אנא נסה עוד %d דקות',
283
+ 'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'תודה שהשתמש ב-adminer אנא שקול <a href="%s">לתרום</a>.',
284
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'סיסמת המאסטר פגה <a href="https://www.adminer.org/en/extension/"%s>התקן תוסף</a> על מנת להפוך את זה לתמידי',
285
+ 'If you did not send this request from Adminer then close this page.' => 'אם לא אתה שלחת בקשה ל-Adminer הינך יכול לסגור חלון זה',
286
+ 'You can upload a big SQL file via FTP and import it from server.' => 'ניתן לעלות קבצים ב-FTP ואז למשוך אותם מהשרת',
287
+ 'Size' => 'גודל',
288
+ 'Compute' => 'חישוב',
289
+ 'You are offline.' => 'הינך לא מקוון',
290
+ 'You have no privileges to update this table.' => 'אין לך ההרשאות המתאימות לעדכן טבלה זו',
291
+ 'Saving' => 'שומר',
292
+ 'yes' => 'כן',
293
+ 'no' => 'לא',
294
+ );
adminer/adminer/adminer/lang/hu.inc.php CHANGED
@@ -185,7 +185,7 @@ $translations = array(
185
  'Save and continue edit' => 'Mentés és szerkesztés folytatása',
186
  'original' => 'eredeti',
187
  '%d item(s) have been affected.' => array('%d tétel érintett.', '%d tétel érintett.', '%d tétel érintett.'),
188
- 'whole result' => 'összes eredményt mutatása',
189
  'Tables have been dropped.' => 'Táblák eldobva.',
190
  'Clone' => 'Klónoz',
191
  'Partition by' => 'Particionálás ezzel',
185
  'Save and continue edit' => 'Mentés és szerkesztés folytatása',
186
  'original' => 'eredeti',
187
  '%d item(s) have been affected.' => array('%d tétel érintett.', '%d tétel érintett.', '%d tétel érintett.'),
188
+ 'Whole result' => 'Összes eredményt mutatása',
189
  'Tables have been dropped.' => 'Táblák eldobva.',
190
  'Clone' => 'Klónoz',
191
  'Partition by' => 'Particionálás ezzel',
adminer/adminer/adminer/lang/id.inc.php CHANGED
@@ -231,7 +231,7 @@ $translations = array(
231
  '%d row(s)' => '%d baris',
232
  'Page' => 'Halaman',
233
  'last' => 'terakhir',
234
- 'whole result' => 'Seluruh hasil',
235
  '%d byte(s)' => '%d bita',
236
 
237
  'Import' => 'Impor',
231
  '%d row(s)' => '%d baris',
232
  'Page' => 'Halaman',
233
  'last' => 'terakhir',
234
+ 'Whole result' => 'Seluruh hasil',
235
  '%d byte(s)' => '%d bita',
236
 
237
  'Import' => 'Impor',
adminer/adminer/adminer/lang/it.inc.php CHANGED
@@ -186,7 +186,7 @@ $translations = array(
186
  'Move to other database' => 'Sposta in altro database',
187
  'Move' => 'Sposta',
188
  '%d item(s) have been affected.' => array('Il risultato consiste in %d elemento.', 'Il risultato consiste in %d elementi.'),
189
- 'whole result' => 'intero risultato',
190
  'Clone' => 'Clona',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Troppi campi. Per favore aumentare %s.',
192
  'Partition by' => 'Partiziona per',
186
  'Move to other database' => 'Sposta in altro database',
187
  'Move' => 'Sposta',
188
  '%d item(s) have been affected.' => array('Il risultato consiste in %d elemento.', 'Il risultato consiste in %d elementi.'),
189
+ 'Whole result' => 'Intero risultato',
190
  'Clone' => 'Clona',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Troppi campi. Per favore aumentare %s.',
192
  'Partition by' => 'Partiziona per',
adminer/adminer/adminer/lang/ja.inc.php CHANGED
@@ -184,7 +184,7 @@ $translations = array(
184
  'Save and continue edit' => '保存して継続',
185
  'original' => '元',
186
  '%d item(s) have been affected.' => '%d を更新しました',
187
- 'whole result' => '全結果',
188
  'Tables have been dropped.' => 'テーブルを削除しました',
189
  'Clone' => 'クローン',
190
  'Maximum number of allowed fields exceeded. Please increase %s.' => '定義可能な最大フィールド数を越えました。%s を増やしてください。',
184
  'Save and continue edit' => '保存して継続',
185
  'original' => '元',
186
  '%d item(s) have been affected.' => '%d を更新しました',
187
+ 'Whole result' => '全結果',
188
  'Tables have been dropped.' => 'テーブルを削除しました',
189
  'Clone' => 'クローン',
190
  'Maximum number of allowed fields exceeded. Please increase %s.' => '定義可能な最大フィールド数を越えました。%s を増やしてください。',
adminer/adminer/adminer/lang/ko.inc.php CHANGED
@@ -184,7 +184,7 @@ $translations = array(
184
  'Save and continue edit' => '저장하고 계속',
185
  'original' => '원래',
186
  '%d item(s) have been affected.' => '%d를 갱신했습니다.',
187
- 'whole result' => '모든 결과',
188
  'Tables have been dropped.' => '테이블을 삭제했습니다.',
189
  'Clone' => '복제',
190
  'Maximum number of allowed fields exceeded. Please increase %s.' => '정의 가능한 최대 필드 수를 초과했습니다. %s를 늘리십시오.',
184
  'Save and continue edit' => '저장하고 계속',
185
  'original' => '원래',
186
  '%d item(s) have been affected.' => '%d를 갱신했습니다.',
187
+ 'Whole result' => '모든 결과',
188
  'Tables have been dropped.' => '테이블을 삭제했습니다.',
189
  'Clone' => '복제',
190
  'Maximum number of allowed fields exceeded. Please increase %s.' => '정의 가능한 최대 필드 수를 초과했습니다. %s를 늘리십시오.',
adminer/adminer/adminer/lang/lt.inc.php CHANGED
@@ -229,7 +229,7 @@ $translations = array(
229
  '%d row(s)' => array('%d įrašas', '%d įrašai', '%d įrašų'),
230
  'Page' => 'Puslapis',
231
  'last' => 'paskutinis',
232
- 'whole result' => 'visas rezultatas',
233
  '%d byte(s)' => array('%d baitas', '%d baigai', '%d baitų'),
234
 
235
  'Import' => 'Importas',
229
  '%d row(s)' => array('%d įrašas', '%d įrašai', '%d įrašų'),
230
  'Page' => 'Puslapis',
231
  'last' => 'paskutinis',
232
+ 'Whole result' => 'Visas rezultatas',
233
  '%d byte(s)' => array('%d baitas', '%d baigai', '%d baitų'),
234
 
235
  'Import' => 'Importas',
adminer/adminer/adminer/lang/ms.inc.php ADDED
@@ -0,0 +1,341 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $translations = array(
3
+ // label for database system selection (MySQL, SQLite, ...)
4
+ 'System' => 'Sistem',
5
+ 'Server' => 'Pelayan',
6
+ 'Username' => 'Nama pengguna',
7
+ 'Password' => 'Kata laluan',
8
+ 'Permanent login' => 'Log masuk kekal',
9
+ 'Login' => 'Log masuk',
10
+ 'Logout' => 'Log keluar',
11
+ 'Logged as: %s' => 'Log masuk sebagai: %s',
12
+ 'Logout successful.' => 'Log keluar berjaya.',
13
+ 'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Terima kasih kerana menggunakan Adminer, pertimbangkan untuk <a href="%s">menderma</a>.',
14
+ 'Invalid credentials.' => 'Akses tidak sah.',
15
+ '<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/"%s>Gunakan</a> cara %s untuk menggunakan SQLite.',
16
+ 'Too many unsuccessful logins, try again in %d minute(s).' => 'Terlalu banyak percubaan log masuk yang gagal, sila cuba lagi dalam masa %d minit.',
17
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Kata laluan utama telah luput. <a href="https://www.adminer.org/en/extension/"%s>Gunakan</a> cara %s untuk mengekalkannya.',
18
+ 'Language' => 'Bahasa',
19
+ 'Invalid CSRF token. Send the form again.' => 'Token CSRF tidak sah. Sila hantar borang sekali lagi.',
20
+ 'If you did not send this request from Adminer then close this page.' => 'Jika anda tidak menghantar permintaan ini dari Adminer sila tutup halaman ini.',
21
+ 'No extension' => 'Tiada sambungan',
22
+ 'None of the supported PHP extensions (%s) are available.' => 'Sambungan PHP yang (%s) disokong tidak wujud.',
23
+ 'Connecting to privileged ports is not allowed.' => 'Penyambungan ke port yang istimewa tidak dibenarkan.',
24
+ 'Session support must be enabled.' => 'Sokongan sesi perlu diaktifkan.',
25
+ 'Session expired, please login again.' => 'Sesi telah luput, sila log masuk kembali.',
26
+ '%s version: %s through PHP extension %s' => 'Versi %s: %s melalui sambungan PHP %s',
27
+ 'Refresh' => 'Segar kembali',
28
+
29
+ // text direction - 'ltr' or 'rtl'
30
+ 'ltr' => 'ltr',
31
+
32
+ 'Privileges' => 'Keistimewaan',
33
+ 'Create user' => 'Bina pengguna',
34
+ 'User has been dropped.' => 'Pengguna telah dijatuhkan.',
35
+ 'User has been altered.' => 'Pengguna telah diubah.',
36
+ 'User has been created.' => 'Pengguna telah dibuat.',
37
+ 'Hashed' => 'Hashed',
38
+ 'Column' => 'Kolum',
39
+ 'Routine' => 'Rutin',
40
+ 'Grant' => 'Beri',
41
+ 'Revoke' => 'Batal',
42
+
43
+ 'Process list' => 'Senarai proses',
44
+ '%d process(es) have been killed.' => '%d proses telah dihentikan.',
45
+ 'Kill' => 'Henti',
46
+
47
+ 'Variables' => 'Pembolehubah',
48
+ 'Status' => 'Status',
49
+
50
+ 'SQL command' => 'Arahan SQL',
51
+ '%d query(s) executed OK.' => '%d query berjaya dilaksanakan.',
52
+ 'Query executed OK, %d row(s) affected.' => 'Query berjaya dilaksanakan, %d baris terjejas.',
53
+ 'No commands to execute.' => 'Tiada arahan untuk dilaksanakan.',
54
+ 'Error in query' => 'Ralat pada query',
55
+ 'ATTACH queries are not supported.' => 'Query berikut tidak disokong.',
56
+ 'Execute' => 'Laksana',
57
+ 'Stop on error' => 'Berhenti jika ralat',
58
+ 'Show only errors' => 'Paparkan jika ralat',
59
+ // sprintf() format for time of the command
60
+ '%.3f s' => '%.3f s',
61
+ 'History' => 'Sejarah',
62
+ 'Clear' => 'Bersih',
63
+ 'Edit all' => 'Ubah semua',
64
+
65
+ 'File upload' => 'Muat naik fail',
66
+ 'From server' => 'Dari pelayan',
67
+ 'Webserver file %s' => 'Fail pelayan sesawang %s',
68
+ 'Run file' => 'Jalankan fail',
69
+ 'File does not exist.' => 'Fail tidak wujud.',
70
+ 'File uploads are disabled.' => 'Muat naik fail dihalang.',
71
+ 'Unable to upload a file.' => 'Muat naik fail gagal.',
72
+ 'Maximum allowed file size is %sB.' => 'Saiz fail maksimum yang dibenarkan adalah %sB.',
73
+ 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Data POST terlalu besar. Kecilkan data atau tingkatkan tetapan %s.',
74
+ 'You can upload a big SQL file via FTP and import it from server.' => 'Anda boleh muat naik fail SQL yang besar melalui FTP dan import melalui pelayan.',
75
+ 'You are offline.' => 'Anda sedang offline.',
76
+
77
+ 'Export' => 'Eksport',
78
+ 'Output' => 'Pengeluaran',
79
+ 'open' => 'buka',
80
+ 'save' => 'simpan',
81
+ 'Saving' => 'Menyimpan',
82
+ 'Format' => 'Format',
83
+ 'Data' => 'Data',
84
+
85
+ 'Database' => 'Pangkalan data',
86
+ 'database' => 'pangkalan data',
87
+ 'Use' => 'Guna',
88
+ 'Select database' => 'Pilih pangkalan data',
89
+ 'Invalid database.' => 'Pangkalan data tidak sah.',
90
+ 'Database has been dropped.' => 'Pangkalan data telah dijatuhkan.',
91
+ 'Databases have been dropped.' => 'Pangkalan data telah dijatuhkan.',
92
+ 'Database has been created.' => 'Pangkalan data telah dibuat.',
93
+ 'Database has been renamed.' => 'Pangkalan data telah ditukar nama.',
94
+ 'Database has been altered.' => 'Pangkalan data telah diubah.',
95
+ 'Alter database' => 'Ubah pangkalan data',
96
+ 'Create database' => 'Bina pangkalan data',
97
+ 'Database schema' => 'Skema pangkalan data',
98
+
99
+ // link to current database schema layout
100
+ 'Permanent link' => 'Pautan kekal',
101
+
102
+ // thousands separator - must contain single byte
103
+ ',' => ',',
104
+ '0123456789' => '0123456789',
105
+ 'Engine' => 'Enjin',
106
+ 'Collation' => 'Collation',
107
+ 'Data Length' => 'Panjang Data',
108
+ 'Index Length' => 'Panjang Indeks',
109
+ 'Data Free' => 'Data Free',
110
+ 'Rows' => 'Baris',
111
+ '%d in total' => '%d secara keseluruhan',
112
+ 'Analyze' => 'Menganalisis',
113
+ 'Optimize' => 'Mengoptimum',
114
+ 'Vacuum' => 'Vacuum',
115
+ 'Check' => 'Periksa',
116
+ 'Repair' => 'Baiki',
117
+ 'Truncate' => 'Memangkas',
118
+ 'Tables have been truncated.' => 'Jadual telah dimangkaskan.',
119
+ 'Move to other database' => 'Pindahkan ke pangkalan data yang lain',
120
+ 'Move' => 'Pindah',
121
+ 'Tables have been moved.' => 'Jadual telah dipindahkan.',
122
+ 'Copy' => 'Salin',
123
+ 'Tables have been copied.' => 'Jadual telah disalin.',
124
+
125
+ 'Routines' => 'Rutin',
126
+ 'Routine has been called, %d row(s) affected.' => 'Rutin telah dipanggil, %d baris terjejas.',
127
+ 'Call' => 'Panggil',
128
+ 'Parameter name' => 'Nama pembolehubah',
129
+ 'Create procedure' => 'Bina prosedur',
130
+ 'Create function' => 'Bina fungsi',
131
+ 'Routine has been dropped.' => 'Rutin telah dijatuhkan.',
132
+ 'Routine has been altered.' => 'Rutin telah diubah.',
133
+ 'Routine has been created.' => 'Rutin telah dibuat.',
134
+ 'Alter function' => 'Ubah fungsi',
135
+ 'Alter procedure' => 'Ubah prosedur',
136
+ 'Return type' => 'Jenis Return',
137
+
138
+ 'Events' => 'Peristiwa',
139
+ 'Event has been dropped.' => 'Peristiwa telah dijatuhkan.',
140
+ 'Event has been altered.' => 'Peristiwa telah diubah.',
141
+ 'Event has been created.' => 'Peristiwa telah dibuat.',
142
+ 'Alter event' => 'Ubah peristiwa',
143
+ 'Create event' => 'Bina peristiwa',
144
+ 'At given time' => 'Pada masa tersebut',
145
+ 'Every' => 'Setiap',
146
+ 'Schedule' => 'Jadual',
147
+ 'Start' => 'Mula',
148
+ 'End' => 'Habis',
149
+ 'On completion preserve' => 'Dalam melestarikan penyelesaian',
150
+
151
+ 'Tables' => 'Jadual',
152
+ 'Tables and views' => 'Jadual dan pandangan',
153
+ 'Table' => 'Jadual',
154
+ 'No tables.' => 'Tiada jadual.',
155
+ 'Alter table' => 'Ubah jadual',
156
+ 'Create table' => 'Bina jadual',
157
+ 'Table has been dropped.' => 'Jadual telah dijatuhkan.',
158
+ 'Tables have been dropped.' => 'Jadual telah dijatuhkan.',
159
+ 'Tables have been optimized.' => 'Jadual telah dioptimumkan.',
160
+ 'Table has been altered.' => 'Jadual telah diubah.',
161
+ 'Table has been created.' => 'Jadual telah dibuat.',
162
+ 'Table name' => 'Nama jadual',
163
+ 'Show structure' => 'Paparkan struktur',
164
+ 'engine' => 'enjin',
165
+ 'collation' => 'collation',
166
+ 'Column name' => 'Nama kolum',
167
+ 'Type' => 'Jenis',
168
+ 'Length' => 'Kepanjangan',
169
+ 'Auto Increment' => 'Kenaikan Auto',
170
+ 'Options' => 'Pilihan',
171
+ 'Comment' => 'Komen',
172
+ 'Default value' => 'Nilai lalai',
173
+ 'Default values' => 'Nilai lalai',
174
+ 'Drop' => 'Jatuh',
175
+ 'Drop %s?' => 'Jatuhkan %s?',
176
+ 'Are you sure?' => 'Anda pasti?',
177
+ 'Size' => 'Saiz',
178
+ 'Compute' => 'Kira',
179
+ 'Move up' => 'Gerak ke atas',
180
+ 'Move down' => 'Gerak ke bawah',
181
+ 'Remove' => 'Buang',
182
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Bilangan medan telah melebihi had yang dibenarkan. Sila tingkatkan %s.',
183
+
184
+ 'Partition by' => 'Partition mengikut',
185
+ 'Partitions' => 'Partition',
186
+ 'Partition name' => 'Nama partition',
187
+ 'Values' => 'Nilai',
188
+
189
+ 'View' => 'Papar',
190
+ 'Materialized view' => 'Paparan yang menjadi kenyataan',
191
+ 'View has been dropped.' => 'Paparan telah dijatuhkan.',
192
+ 'View has been altered.' => 'Paparan telah diubah.',
193
+ 'View has been created.' => 'Paparan telah dibuat.',
194
+ 'Alter view' => 'Ubah paparan',
195
+ 'Create view' => 'Bina paparan',
196
+
197
+ 'Indexes' => 'Indeks',
198
+ 'Indexes have been altered.' => 'Indeks telah diubah.',
199
+ 'Alter indexes' => 'Ubah indeks',
200
+ 'Add next' => 'Tambah yang seterusnya',
201
+ 'Index Type' => 'Jenis Indeks',
202
+ 'Column (length)' => 'Kolum (kepanjangan)',
203
+
204
+ 'Foreign keys' => 'Kunci asing',
205
+ 'Foreign key' => 'Kunci asing',
206
+ 'Foreign key has been dropped.' => 'Kunci asing telah dijatuhkan.',
207
+ 'Foreign key has been altered.' => 'Kunci asing telah diubah.',
208
+ 'Foreign key has been created.' => 'Kunci asing telah dibuat.',
209
+ 'Target table' => 'Jadual sasaran',
210
+ 'Change' => 'Tukar',
211
+ 'Source' => 'Sumber',
212
+ 'Target' => 'Sasaran',
213
+ 'Add column' => 'Tambah kolum',
214
+ 'Alter' => 'Ubah',
215
+ 'Add foreign key' => 'Tambah kunci asing',
216
+ 'ON DELETE' => 'ON DELETE',
217
+ 'ON UPDATE' => 'ON UPDATE',
218
+ 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Kolum sumber dan sasaran perlu mempunyai jenis data yang sama, indeks diperlukan pada kolum sasaran dan data yang dirujuk wujud.',
219
+
220
+ 'Triggers' => ' Pencetus',
221
+ 'Add trigger' => 'Tambah pencetus',
222
+ 'Trigger has been dropped.' => 'Pencetus telah dijatuhkan.',
223
+ 'Trigger has been altered.' => 'Pencetus telah diubah.',
224
+ 'Trigger has been created.' => 'Pencetus telah dibuat.',
225
+ 'Alter trigger' => 'Ubah pencetus',
226
+ 'Create trigger' => 'Buat pencetus',
227
+ 'Time' => 'Masa',
228
+ 'Event' => 'Peristiwa',
229
+ 'Name' => 'Nama',
230
+
231
+ 'select' => 'pilih',
232
+ 'Select' => 'Pilih',
233
+ 'Select data' => 'Pilih data',
234
+ 'Functions' => 'Fungsi',
235
+ 'Aggregation' => 'Pengagregatan',
236
+ 'Search' => 'Cari',
237
+ 'anywhere' => 'di mana-mana',
238
+ 'Search data in tables' => 'Cari data dalam jadual',
239
+ 'Sort' => 'Susun',
240
+ 'descending' => 'menurun',
241
+ 'Limit' => 'Had',
242
+ 'Limit rows' => 'Had baris',
243
+ 'Text length' => 'Kepanjangan teks',
244
+ 'Action' => 'Aksi',
245
+ 'Full table scan' => 'Imbasan penuh jadual',
246
+ 'Unable to select the table' => 'Pemilihan jadual tidak berjaya',
247
+ 'No rows.' => 'Tiada baris.',
248
+ '%d / ' => '%d / ',
249
+ '%d row(s)' => '%d baris',
250
+ 'Page' => 'Halaman',
251
+ 'last' => 'akhir',
252
+ 'Load more data' => 'Load lebih data',
253
+ 'Loading' => 'Loading',
254
+ 'Whole result' => 'Keputusan keseluruhan',
255
+ '%d byte(s)' => array('%d byte', '%d bytes'),
256
+
257
+ 'Import' => 'Import',
258
+ '%d row(s) have been imported.' => '%d baris telah diimport.',
259
+ 'File must be in UTF-8 encoding.' => 'Fail mesti dalam pengekodan UTF-8.',
260
+
261
+ // in-place editing in select
262
+ 'Modify' => 'Pinda',
263
+ 'Ctrl+click on a value to modify it.' => 'Ctrl+click pada nilai untuk meminda.',
264
+ 'Use edit link to modify this value.' => 'Guna pautan ubah untuk meminda nilai ini.',
265
+
266
+ // %s can contain auto-increment value
267
+ 'Item%s has been inserted.' => 'Item%s telah dimasukkan.',
268
+ 'Item has been deleted.' => 'Item telah dipadamkan.',
269
+ 'Item has been updated.' => 'Item telah dikemaskini.',
270
+ '%d item(s) have been affected.' => '%d item telah terjejas.',
271
+ 'New item' => 'Item baru',
272
+ 'original' => 'asli',
273
+ // label for value '' in enum data type
274
+ 'empty' => 'kosong',
275
+ 'edit' => 'ubah',
276
+ 'Edit' => 'Ubah',
277
+ 'Insert' => 'Masukkan',
278
+ 'Save' => 'Simpan',
279
+ 'Save and continue edit' => 'Simpan dan sambung ubah',
280
+ 'Save and insert next' => 'Simpan dan masukkan seterusnya',
281
+ 'Selected' => 'Terpilih',
282
+ 'Clone' => 'Klon',
283
+ 'Delete' => 'Padam',
284
+ 'You have no privileges to update this table.' => 'Anda tidak mempunyai keistimewaan untuk mengemaskini jadual ini.',
285
+
286
+ 'E-mail' => 'Emel',
287
+ 'From' => 'Dari',
288
+ 'Subject' => 'Subjek',
289
+ 'Attachments' => 'Lampiran',
290
+ 'Send' => 'Hantar',
291
+ '%d e-mail(s) have been sent.' => '%d emel telah dihantar.',
292
+
293
+ // data type descriptions
294
+ 'Numbers' => 'Nombor',
295
+ 'Date and time' => 'Tarikh dan masa',
296
+ 'Strings' => 'String',
297
+ 'Binary' => 'Binari',
298
+ 'Lists' => 'Senarai',
299
+ 'Network' => 'Rangkaian',
300
+ 'Geometry' => 'Geometri',
301
+ 'Relations' => 'Hubungan',
302
+
303
+ 'Editor' => 'Editor',
304
+ // date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
305
+ '$1-$3-$5' => '$1-$3-$5',
306
+ // hint for date format - use language equivalents for day, month and year shortcuts
307
+ '[yyyy]-mm-dd' => '[yyyy]-mm-dd',
308
+ // hint for time format - use language equivalents for hour, minute and second shortcuts
309
+ 'HH:MM:SS' => 'HH:MM:SS',
310
+ 'now' => 'sekarang',
311
+ 'yes' => 'ya',
312
+ 'no' => 'tidak',
313
+
314
+ // general SQLite error in create, drop or rename database
315
+ 'File exists.' => 'Fail wujud.',
316
+ 'Please use one of the extensions %s.' => 'Sila guna salah satu sambungan %s.',
317
+
318
+ // PostgreSQL and MS SQL schema support
319
+ 'Alter schema' => 'Ubah skema',
320
+ 'Create schema' => 'Buat skema',
321
+ 'Schema has been dropped.' => 'Skema telah dijatuhkan.',
322
+ 'Schema has been created.' => 'Skema telah dibuat.',
323
+ 'Schema has been altered.' => 'Skema telah diubah.',
324
+ 'Schema' => 'Skema',
325
+ 'Invalid schema.' => 'Skema tidak sah.',
326
+
327
+ // PostgreSQL sequences support
328
+ 'Sequences' => 'Turutan',
329
+ 'Create sequence' => 'Buat turutan',
330
+ 'Sequence has been dropped.' => 'Turutan telah dijatuhkan.',
331
+ 'Sequence has been created.' => 'Turutan telah dibuat.',
332
+ 'Sequence has been altered.' => 'Turutan telah diubah.',
333
+ 'Alter sequence' => 'Ubah turutan',
334
+
335
+ // PostgreSQL user types support
336
+ 'User types' => 'Jenis pengguna',
337
+ 'Create type' => 'Buat jenis',
338
+ 'Type has been dropped.' => 'Jenis telah dijatuhkan.',
339
+ 'Type has been created.' => 'Jenis telah dibuat.',
340
+ 'Alter type' => 'Ubah jenis',
341
+ );
adminer/adminer/adminer/lang/nl.inc.php CHANGED
@@ -187,7 +187,7 @@ $translations = array(
187
  'Move to other database' => 'Verplaats naar andere database',
188
  'Move' => 'Verplaats',
189
  '%d item(s) have been affected.' => array('%d item aangepast.', '%d items aangepast.'),
190
- 'whole result' => 'volledig resultaat',
191
  'Clone' => 'Dupliceer',
192
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maximum aantal velden bereikt. Verhoog %s.',
193
  'Partition by' => 'Partitioneren op',
187
  'Move to other database' => 'Verplaats naar andere database',
188
  'Move' => 'Verplaats',
189
  '%d item(s) have been affected.' => array('%d item aangepast.', '%d items aangepast.'),
190
+ 'Whole result' => 'Volledig resultaat',
191
  'Clone' => 'Dupliceer',
192
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Maximum aantal velden bereikt. Verhoog %s.',
193
  'Partition by' => 'Partitioneren op',
adminer/adminer/adminer/lang/no.inc.php CHANGED
@@ -10,7 +10,7 @@ $translations = array(
10
  'Logged as: %s' => 'Logget inn som: %s',
11
  'Logout successful.' => 'Utlogging vellykket.',
12
  'Invalid credentials.' => 'Ugylding innloggingsinformasjon.',
13
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Master-passord er utløpt. <a href="https://www.adminer.org/en/extension/" target="_blank">Implementer</a> en metode for %s for å gjøre det permanent.',
14
  'Language' => 'Språk',
15
  'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.',
16
  'No extension' => 'Ingen utvidelse',
@@ -212,7 +212,7 @@ $translations = array(
212
  'last' => 'siste',
213
  'Load more data' => 'Last mer data',
214
  'Loading' => 'Laster',
215
- 'whole result' => 'hele resultatet',
216
  '%d byte(s)' => array('%d byte', '%d bytes'),
217
  'Import' => 'Importer',
218
  '%d row(s) have been imported.' => array('%d rad er importert.', '%d rader er importert.'),
10
  'Logged as: %s' => 'Logget inn som: %s',
11
  'Logout successful.' => 'Utlogging vellykket.',
12
  'Invalid credentials.' => 'Ugylding innloggingsinformasjon.',
13
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Master-passord er utløpt. <a href="https://www.adminer.org/en/extension/"%s>Implementer</a> en metode for %s for å gjøre det permanent.',
14
  'Language' => 'Språk',
15
  'Invalid CSRF token. Send the form again.' => 'Ugylding CSRF-token - Send inn skjemaet igjen.',
16
  'No extension' => 'Ingen utvidelse',
212
  'last' => 'siste',
213
  'Load more data' => 'Last mer data',
214
  'Loading' => 'Laster',
215
+ 'Whole result' => 'Hele resultatet',
216
  '%d byte(s)' => array('%d byte', '%d bytes'),
217
  'Import' => 'Importer',
218
  '%d row(s) have been imported.' => array('%d rad er importert.', '%d rader er importert.'),
adminer/adminer/adminer/lang/pl.inc.php CHANGED
@@ -10,14 +10,17 @@ $translations = array(
10
  'Logout' => 'Wyloguj',
11
  'Logged as: %s' => 'Zalogowany jako: %s',
12
  'Logout successful.' => 'Wylogowano pomyślnie.',
 
13
  'Invalid credentials.' => 'Nieprawidłowe dane logowania.',
 
14
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Za dużo nieudanych prób logowania, spróbuj ponownie za %d minutę.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minuty.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minut.'),
15
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Ważność hasła głównego wygasła. <a href="https://www.adminer.org/pl/extension/" target="_blank">Zaimplementuj</a> własną metodę %s, aby ustawić je na stałe.',
16
  'Language' => 'Język',
17
  'Invalid CSRF token. Send the form again.' => 'Nieprawidłowy token CSRF. Spróbuj wysłać formularz ponownie.',
18
  'If you did not send this request from Adminer then close this page.' => 'Jeżeli nie wywołałeś tej strony z Adminera, zamknij to okno.',
19
  'No extension' => 'Brak rozszerzenia',
20
  'None of the supported PHP extensions (%s) are available.' => 'Żadne z rozszerzeń PHP umożliwiających połączenie się z bazą danych (%s) nie jest dostępne.',
 
21
  'Session support must be enabled.' => 'Wymagana jest obsługa sesji w PHP.',
22
  'Session expired, please login again.' => 'Sesja wygasła, zaloguj się ponownie.',
23
  '%s version: %s through PHP extension %s' => 'Wersja %s: %s za pomocą %s',
@@ -49,6 +52,7 @@ $translations = array(
49
  'Query executed OK, %d row(s) affected.' => array('Zapytanie wykonane pomyślnie, zmieniono %d rekord.', 'Zapytanie wykonane pomyślnie, zmieniono %d rekordy.', 'Zapytanie wykonane pomyślnie, zmieniono %d rekordów.'),
50
  'No commands to execute.' => 'Nic do wykonania.',
51
  'Error in query' => 'Błąd w zapytaniu',
 
52
  'Execute' => 'Wykonaj',
53
  'Stop on error' => 'Zatrzymaj w przypadku błędu',
54
  'Show only errors' => 'Pokaż tylko błędy',
@@ -167,6 +171,7 @@ $translations = array(
167
  'Default value' => 'Wartość domyślna',
168
  'Default values' => 'Wartości domyślne',
169
  'Drop' => 'Usuń',
 
170
  'Are you sure?' => 'Czy jesteś pewien?',
171
  'Size' => 'Wielkość',
172
  'Compute' => 'Oblicz',
@@ -233,17 +238,19 @@ $translations = array(
233
  'Sort' => 'Sortuj',
234
  'descending' => 'malejąco',
235
  'Limit' => 'Limit',
 
236
  'Text length' => 'Długość tekstu',
237
  'Action' => 'Czynność',
238
  'Full table scan' => 'Wymaga pełnego przeskanowania tabeli',
239
  'Unable to select the table' => 'Nie udało się pobrać danych z tabeli',
240
  'No rows.' => 'Brak rekordów.',
 
241
  '%d row(s)' => array('%d rekord', '%d rekordy', '%d rekordów'),
242
  'Page' => 'Strona',
243
  'last' => 'ostatni',
244
  'Load more data' => 'Wczytaj więcej danych',
245
  'Loading' => 'Wczytywanie',
246
- 'whole result' => 'wybierz wszystkie',
247
  '%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtów'),
248
 
249
  'Import' => 'Import',
10
  'Logout' => 'Wyloguj',
11
  'Logged as: %s' => 'Zalogowany jako: %s',
12
  'Logout successful.' => 'Wylogowano pomyślnie.',
13
+ 'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Dziękujemy za używanie Adminera, rozważ proszę <a href="%s">dotację</a>.',
14
  'Invalid credentials.' => 'Nieprawidłowe dane logowania.',
15
+ '<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/pl/extension/"%s>Zaimplementuj</a> metodę %s aby użyć SQLite.',
16
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Za dużo nieudanych prób logowania, spróbuj ponownie za %d minutę.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minuty.', 'Za dużo nieudanych prób logowania, spróbuj ponownie za %d minut.'),
17
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ważność hasła głównego wygasła. <a href="https://www.adminer.org/pl/extension/"%s>Zaimplementuj</a> własną metodę %s, aby ustawić je na stałe.',
18
  'Language' => 'Język',
19
  'Invalid CSRF token. Send the form again.' => 'Nieprawidłowy token CSRF. Spróbuj wysłać formularz ponownie.',
20
  'If you did not send this request from Adminer then close this page.' => 'Jeżeli nie wywołałeś tej strony z Adminera, zamknij to okno.',
21
  'No extension' => 'Brak rozszerzenia',
22
  'None of the supported PHP extensions (%s) are available.' => 'Żadne z rozszerzeń PHP umożliwiających połączenie się z bazą danych (%s) nie jest dostępne.',
23
+ 'Connecting to privileged ports is not allowed.' => 'Łączenie do portów uprzywilejowanych jest niedozwolone.',
24
  'Session support must be enabled.' => 'Wymagana jest obsługa sesji w PHP.',
25
  'Session expired, please login again.' => 'Sesja wygasła, zaloguj się ponownie.',
26
  '%s version: %s through PHP extension %s' => 'Wersja %s: %s za pomocą %s',
52
  'Query executed OK, %d row(s) affected.' => array('Zapytanie wykonane pomyślnie, zmieniono %d rekord.', 'Zapytanie wykonane pomyślnie, zmieniono %d rekordy.', 'Zapytanie wykonane pomyślnie, zmieniono %d rekordów.'),
53
  'No commands to execute.' => 'Nic do wykonania.',
54
  'Error in query' => 'Błąd w zapytaniu',
55
+ 'ATTACH queries are not supported.' => 'Zapytania ATTACH są niewspierane.',
56
  'Execute' => 'Wykonaj',
57
  'Stop on error' => 'Zatrzymaj w przypadku błędu',
58
  'Show only errors' => 'Pokaż tylko błędy',
171
  'Default value' => 'Wartość domyślna',
172
  'Default values' => 'Wartości domyślne',
173
  'Drop' => 'Usuń',
174
+ 'Drop %s?' => 'Usunąć %s?',
175
  'Are you sure?' => 'Czy jesteś pewien?',
176
  'Size' => 'Wielkość',
177
  'Compute' => 'Oblicz',
238
  'Sort' => 'Sortuj',
239
  'descending' => 'malejąco',
240
  'Limit' => 'Limit',
241
+ 'Limit rows' => 'Limit rekordów',
242
  'Text length' => 'Długość tekstu',
243
  'Action' => 'Czynność',
244
  'Full table scan' => 'Wymaga pełnego przeskanowania tabeli',
245
  'Unable to select the table' => 'Nie udało się pobrać danych z tabeli',
246
  'No rows.' => 'Brak rekordów.',
247
+ '%d / ' => '%d / ',
248
  '%d row(s)' => array('%d rekord', '%d rekordy', '%d rekordów'),
249
  'Page' => 'Strona',
250
  'last' => 'ostatni',
251
  'Load more data' => 'Wczytaj więcej danych',
252
  'Loading' => 'Wczytywanie',
253
+ 'Whole result' => 'Wybierz wszystkie',
254
  '%d byte(s)' => array('%d bajt', '%d bajty', '%d bajtów'),
255
 
256
  'Import' => 'Import',
adminer/adminer/adminer/lang/pt-br.inc.php CHANGED
@@ -186,7 +186,7 @@ $translations = array(
186
  'original' => 'original',
187
  'Tables have been dropped.' => 'As Tabelas foram eliminadas.',
188
  '%d item(s) have been affected.' => array('%d item foi afetado.', '%d itens foram afetados.'),
189
- 'whole result' => 'resultado completo',
190
  'Clone' => 'Clonar',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
192
  'Partition by' => 'Particionar por',
186
  'original' => 'original',
187
  'Tables have been dropped.' => 'As Tabelas foram eliminadas.',
188
  '%d item(s) have been affected.' => array('%d item foi afetado.', '%d itens foram afetados.'),
189
+ 'Whole result' => 'Resultado completo',
190
  'Clone' => 'Clonar',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
192
  'Partition by' => 'Particionar por',
adminer/adminer/adminer/lang/pt.inc.php CHANGED
@@ -186,7 +186,7 @@ $translations = array(
186
  'original' => 'original',
187
  'Tables have been dropped.' => 'As tabelas foram eliminadas.',
188
  '%d item(s) have been affected.' => array('%d item afetado.', '%d itens afetados.'),
189
- 'whole result' => 'resultado completo',
190
  'Clone' => 'Clonar',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
192
  'Partition by' => 'Particionar por',
186
  'original' => 'original',
187
  'Tables have been dropped.' => 'As tabelas foram eliminadas.',
188
  '%d item(s) have been affected.' => array('%d item afetado.', '%d itens afetados.'),
189
+ 'Whole result' => 'Resultado completo',
190
  'Clone' => 'Clonar',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'Quantidade máxima de campos permitidos excedidos. Por favor aumente %s.',
192
  'Partition by' => 'Particionar por',
adminer/adminer/adminer/lang/ro.inc.php CHANGED
@@ -185,7 +185,7 @@ $translations = array(
185
  'Save and continue edit' => 'Salvează și continuă editarea',
186
  'original' => 'original',
187
  '%d item(s) have been affected.' => array('A fost modificată %d înscriere.', 'Au fost modificate %d înscrieri.'),
188
- 'whole result' => 'tot rezultatul',
189
  'Tables have been dropped.' => 'Tabelele au fost șterse.',
190
  'Clone' => 'Clonează',
191
  'Partition by' => 'Împarte',
185
  'Save and continue edit' => 'Salvează și continuă editarea',
186
  'original' => 'original',
187
  '%d item(s) have been affected.' => array('A fost modificată %d înscriere.', 'Au fost modificate %d înscrieri.'),
188
+ 'Whole result' => 'Tot rezultatul',
189
  'Tables have been dropped.' => 'Tabelele au fost șterse.',
190
  'Clone' => 'Clonează',
191
  'Partition by' => 'Împarte',
adminer/adminer/adminer/lang/ru.inc.php CHANGED
@@ -185,7 +185,7 @@ $translations = array(
185
  'Save and continue edit' => 'Сохранить и продолжить редактирование',
186
  'original' => 'исходный',
187
  '%d item(s) have been affected.' => array('Была изменена %d запись.', 'Были изменены %d записи.', 'Было изменено %d записей.'),
188
- 'whole result' => 'весь результат',
189
  'Tables have been dropped.' => 'Таблицы были удалены.',
190
  'Clone' => 'Клонировать',
191
  'Partition by' => 'Разделить по',
@@ -269,9 +269,6 @@ $translations = array(
269
  'Materialized view' => 'Материализованное представление',
270
  'Vacuum' => 'Вакуум',
271
  'Selected' => 'Выбранные',
272
- 'Replication' => 'Репликация',
273
- 'Master status' => 'состояние мастер-сервера',
274
- 'Slave status' => 'состояние ведомого сервера',
275
  'File must be in UTF-8 encoding.' => 'Файл должен быть в кодировке UTF-8.',
276
  'Modify' => 'Изменить',
277
  'Loading' => 'Загрузка',
@@ -279,11 +276,11 @@ $translations = array(
279
  'ATTACH queries are not supported.' => 'ATTACH-запросы не поддерживаются.',
280
  '%d / ' => '%d / ',
281
  'Limit rows' => 'Лимит строк',
282
- '<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.',
283
  'Default value' => 'Значение по умолчанию',
284
  'Full table scan' => 'Анализ полной таблицы',
285
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Слишком много неудачных попыток входа. Попробуйте снова через %d минуту.', 'Слишком много неудачных попыток входа. Попробуйте снова через %d минуты.', 'Слишком много неудачных попыток входа. Попробуйте снова через %d минут.'),
286
- '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, чтобы сделать его постоянным.',
287
  'If you did not send this request from Adminer then close this page.' => 'Если вы не посылали этот запрос из Adminer, закройте эту страницу.',
288
  'You can upload a big SQL file via FTP and import it from server.' => 'Вы можете закачать большой SQL-файл по FTP и затем импортировать его с сервера.',
289
  'Size' => 'Размер',
185
  'Save and continue edit' => 'Сохранить и продолжить редактирование',
186
  'original' => 'исходный',
187
  '%d item(s) have been affected.' => array('Была изменена %d запись.', 'Были изменены %d записи.', 'Было изменено %d записей.'),
188
+ 'Whole result' => 'Весь результат',
189
  'Tables have been dropped.' => 'Таблицы были удалены.',
190
  'Clone' => 'Клонировать',
191
  'Partition by' => 'Разделить по',
269
  'Materialized view' => 'Материализованное представление',
270
  'Vacuum' => 'Вакуум',
271
  'Selected' => 'Выбранные',
 
 
 
272
  'File must be in UTF-8 encoding.' => 'Файл должен быть в кодировке UTF-8.',
273
  'Modify' => 'Изменить',
274
  'Loading' => 'Загрузка',
276
  'ATTACH queries are not supported.' => 'ATTACH-запросы не поддерживаются.',
277
  '%d / ' => '%d / ',
278
  'Limit rows' => 'Лимит строк',
279
+ '<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/"%s>Реализуйте</a> метод %s, чтобы использовать SQLite.',
280
  'Default value' => 'Значение по умолчанию',
281
  'Full table scan' => 'Анализ полной таблицы',
282
  'Too many unsuccessful logins, try again in %d minute(s).' => array('Слишком много неудачных попыток входа. Попробуйте снова через %d минуту.', 'Слишком много неудачных попыток входа. Попробуйте снова через %d минуты.', 'Слишком много неудачных попыток входа. Попробуйте снова через %d минут.'),
283
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Мастер-пароль истёк. <a href="https://www.adminer.org/en/extension/"%s>Реализуйте</a> метод %s, чтобы сделать его постоянным.',
284
  'If you did not send this request from Adminer then close this page.' => 'Если вы не посылали этот запрос из Adminer, закройте эту страницу.',
285
  'You can upload a big SQL file via FTP and import it from server.' => 'Вы можете закачать большой SQL-файл по FTP и затем импортировать его с сервера.',
286
  'Size' => 'Размер',
adminer/adminer/adminer/lang/sk.inc.php CHANGED
@@ -187,7 +187,7 @@ $translations = array(
187
  'Move to other database' => 'Presunúť do inej databázy',
188
  'Move' => 'Presunúť',
189
  '%d item(s) have been affected.' => '%d položiek bolo ovplyvnených.',
190
- 'whole result' => 'celý výsledok',
191
  'Clone' => 'Klonovať',
192
  'Partition by' => 'Rozdeliť podľa',
193
  'Partitions' => 'Oddiely',
187
  'Move to other database' => 'Presunúť do inej databázy',
188
  'Move' => 'Presunúť',
189
  '%d item(s) have been affected.' => '%d položiek bolo ovplyvnených.',
190
+ 'Whole result' => 'Celý výsledok',
191
  'Clone' => 'Klonovať',
192
  'Partition by' => 'Rozdeliť podľa',
193
  'Partitions' => 'Oddiely',
adminer/adminer/adminer/lang/sl.inc.php CHANGED
@@ -225,7 +225,7 @@ $translations = array(
225
  '%d row(s)' => array('%d vrstica', '%d vrstici', '%d vrstice', '%d vrstic'),
226
  'Page' => 'Stran',
227
  'last' => 'Zadnja',
228
- 'whole result' => 'cel razultat',
229
  '%d byte(s)' => array('%d bajt', '%d bajta', '%d bajti', '%d bajtov'),
230
 
231
  'Import' => 'Uvozi',
225
  '%d row(s)' => array('%d vrstica', '%d vrstici', '%d vrstice', '%d vrstic'),
226
  'Page' => 'Stran',
227
  'last' => 'Zadnja',
228
+ 'Whole result' => 'Cel razultat',
229
  '%d byte(s)' => array('%d bajt', '%d bajta', '%d bajti', '%d bajtov'),
230
 
231
  'Import' => 'Uvozi',
adminer/adminer/adminer/lang/sr.inc.php CHANGED
@@ -231,9 +231,9 @@ $translations = array(
231
  '%d row(s)' => array('%d ред', '%d реда', '%d редова'),
232
  'Page' => 'Страна',
233
  'last' => 'последња',
234
- 'Loading' => 'Учитавам',
235
- 'Load more data' => 'Учитавам још података',
236
- 'whole result' => 'цео резултат',
237
  '%d byte(s)' => array('%d бајт', '%d бајта', '%d бајтова'),
238
 
239
  'Import' => 'Увоз',
231
  '%d row(s)' => array('%d ред', '%d реда', '%d редова'),
232
  'Page' => 'Страна',
233
  'last' => 'последња',
234
+ 'Loading' => 'Учитавам',
235
+ 'Load more data' => 'Учитавам још података',
236
+ 'Whole result' => 'Цео резултат',
237
  '%d byte(s)' => array('%d бајт', '%d бајта', '%d бајтова'),
238
 
239
  'Import' => 'Увоз',
adminer/adminer/adminer/lang/ta.inc.php CHANGED
@@ -183,7 +183,7 @@ $translations = array(
183
  'original' => 'அச‌ல்',
184
  'Tables have been dropped.' => 'அட்ட‌வ‌ணை நீக்க‌ப்ப‌ட்ட‌து.',
185
  '%d item(s) have been affected.' => array('%d உருப்ப‌டி மாற்ற‌ம‌டைந்தது.', '%d உருப்ப‌டிக‌ள் மாற்ற‌ம‌டைந்த‌ன‌.'),
186
- 'whole result' => 'முழுமையான‌ முடிவு',
187
  'Clone' => 'ந‌க‌லி (Clone)',
188
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'அனும‌திக்க‌ப்ப‌ட்ட‌ அதிக‌ப‌ட்ச‌ கோப்புக‌ளின் எண்ணிக்கை மீற‌ப்ப‌ட்ட‌து. த‌ய‌வு செய்து %s ம‌ற்றும் %s யை அதிக‌ரிக்க‌வும்.',
189
  'Partition by' => 'பிரித்த‌து',
183
  'original' => 'அச‌ல்',
184
  'Tables have been dropped.' => 'அட்ட‌வ‌ணை நீக்க‌ப்ப‌ட்ட‌து.',
185
  '%d item(s) have been affected.' => array('%d உருப்ப‌டி மாற்ற‌ம‌டைந்தது.', '%d உருப்ப‌டிக‌ள் மாற்ற‌ம‌டைந்த‌ன‌.'),
186
+ 'Whole result' => 'முழுமையான‌ முடிவு',
187
  'Clone' => 'ந‌க‌லி (Clone)',
188
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'அனும‌திக்க‌ப்ப‌ட்ட‌ அதிக‌ப‌ட்ச‌ கோப்புக‌ளின் எண்ணிக்கை மீற‌ப்ப‌ட்ட‌து. த‌ய‌வு செய்து %s ம‌ற்றும் %s யை அதிக‌ரிக்க‌வும்.',
189
  'Partition by' => 'பிரித்த‌து',
adminer/adminer/adminer/lang/th.inc.php CHANGED
@@ -186,7 +186,7 @@ $translations = array(
186
  'original' => 'ต้นฉบับ',
187
  'Tables have been dropped.' => 'ตารางถูกลบแล้ว.',
188
  '%d item(s) have been affected.' => 'มี %d รายการถูกดำเนินการแล้ว.',
189
- 'whole result' => 'รวมผล',
190
  'Clone' => 'ทำซ้ำ',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'จำนวนสูงสุดของฟิลด์อนุญาตให้เกิน กรุณาเพิ่มอีก %s.',
192
  'Partition by' => 'พาร์ทิชันโดย',
186
  'original' => 'ต้นฉบับ',
187
  'Tables have been dropped.' => 'ตารางถูกลบแล้ว.',
188
  '%d item(s) have been affected.' => 'มี %d รายการถูกดำเนินการแล้ว.',
189
+ 'Whole result' => 'รวมผล',
190
  'Clone' => 'ทำซ้ำ',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => 'จำนวนสูงสุดของฟิลด์อนุญาตให้เกิน กรุณาเพิ่มอีก %s.',
192
  'Partition by' => 'พาร์ทิชันโดย',
adminer/adminer/adminer/lang/tr.inc.php CHANGED
@@ -9,14 +9,21 @@ $translations = array(
9
  'Login' => 'Giriş',
10
  'Logout' => 'Çıkış',
11
  'Logged as: %s' => '%s olarak giriş yapıldı.',
12
- 'Logout successful.' => 'Başarıyla çıkış yapıldı.',
13
- 'Invalid credentials.' => 'Geçersiz kimlik.',
 
 
 
 
14
  'Language' => 'Dil',
15
  'Invalid CSRF token. Send the form again.' => 'Geçersiz (CSRF) jetonu. Formu tekrar yolla.',
 
16
  'No extension' => 'Uzantı yok',
17
  'None of the supported PHP extensions (%s) are available.' => 'Desteklenen PHP eklentilerinden (%s) hiçbiri mevcut değil.',
 
18
  'Session support must be enabled.' => 'Oturum desteği etkin olmalıdır.',
19
  'Session expired, please login again.' => 'Oturum süresi doldu, lütfen tekrar giriş yapın.',
 
20
  '%s version: %s through PHP extension %s' => '%s sürüm: %s, %s PHP eklentisi ile',
21
  'Refresh' => 'Tazele',
22
 
@@ -46,6 +53,8 @@ $translations = array(
46
  'Query executed OK, %d row(s) affected.' => array('Sorgu başarıyla çalıştırıldı, %d adet kayıt etkilendi.', 'Sorgu başarıyla çalıştırıldı, %d adet kayıt etkilendi.'),
47
  'No commands to execute.' => 'Çalıştırılacak komut yok.',
48
  'Error in query' => 'Sorguda hata',
 
 
49
  'Execute' => 'Çalıştır',
50
  'Stop on error' => 'Hata oluşursa dur',
51
  'Show only errors' => 'Sadece hataları göster.',
@@ -64,16 +73,20 @@ $translations = array(
64
  'Unable to upload a file.' => 'Dosya gönderilemiyor.',
65
  'Maximum allowed file size is %sB.' => 'İzin verilen dosya boyutu sınırı %sB.',
66
  'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Çok büyük POST verisi, veriyi azaltın ya da %s ayar yönergesini uygun olarak yapılandırın.',
 
 
67
 
68
  'Export' => 'Dışarı Aktar',
69
  'Output' => 'Çıktı',
70
  'open' => 'aç',
71
  'save' => 'kaydet',
 
72
  'Format' => 'Biçim',
73
  'Data' => 'Veri',
74
 
75
  'Database' => 'Veri Tabanı',
76
  'database' => 'veri tabanı',
 
77
  'Use' => 'Kullan',
78
  'Select database' => 'Veri tabanı seç',
79
  'Invalid database.' => 'Geçersiz veri tabanı.',
@@ -95,12 +108,13 @@ $translations = array(
95
  'Engine' => 'Motor',
96
  'Collation' => 'Karşılaştırma',
97
  'Data Length' => 'Veri Uzunluğu',
98
- 'Index Length' => 'Dizin Uzunluğu',
99
  'Data Free' => 'Boş Veri',
100
  'Rows' => 'Kayıtlar',
101
  '%d in total' => 'toplam %d',
102
  'Analyze' => 'Çözümle',
103
- 'Optimize' => 'En uygun hale getir',
 
104
  'Check' => 'Denetle',
105
  'Repair' => 'Tamir Et',
106
  'Truncate' => 'Boşalt',
@@ -158,9 +172,13 @@ $translations = array(
158
  'Auto Increment' => 'Otomatik Artır',
159
  'Options' => 'Seçenekler',
160
  'Comment' => 'Yorum',
 
161
  'Default values' => 'Varsayılan değerler',
162
  'Drop' => 'Sil',
 
163
  'Are you sure?' => 'Emin misiniz?',
 
 
164
  'Move up' => 'Yukarı taşı',
165
  'Move down' => 'Aşağı taşı',
166
  'Remove' => 'Sil',
@@ -172,17 +190,18 @@ $translations = array(
172
  'Values' => 'Değerler',
173
 
174
  'View' => 'Görünüm',
 
175
  'View has been dropped.' => 'Görünüm silindi.',
176
  'View has been altered.' => 'Görünüm değiştirildi.',
177
  'View has been created.' => 'Görünüm oluşturuldu.',
178
  'Alter view' => 'Görünümü değiştir',
179
  'Create view' => 'Görünüm oluştur',
180
 
181
- 'Indexes' => 'Dizinler',
182
- 'Indexes have been altered.' => 'Dizinler değiştirildi.',
183
- 'Alter indexes' => 'Dizinleri değiştir',
184
  'Add next' => 'Bundan sonra ekle',
185
- 'Index Type' => 'Dizin Türü',
186
  'Column (length)' => 'Kolon (uzunluğu)',
187
 
188
  'Foreign keys' => 'Dış anahtarlar',
@@ -221,25 +240,29 @@ $translations = array(
221
  'anywhere' => 'hiçbir yerde',
222
  'Search data in tables' => 'Tablolarda veri ara',
223
  'Sort' => 'Sırala',
224
- 'descending' => 'azalan',
225
- 'Limit' => 'sınır',
226
- 'Text length' => 'Yazı uzunluğu',
227
- 'Action' => 'Eylem',
228
- 'Full table scan' => 'Tam tablo tarama',
 
229
  'Unable to select the table' => 'Tablo seçilemedi',
230
  'No rows.' => 'Kayıt yok.',
 
231
  '%d row(s)' => array('%d kayıt', '%d adet kayıt'),
232
  'Page' => 'Sayfa',
233
  'last' => 'son',
234
  'Load more data' => 'Daha fazla veri yükle',
235
  'Loading' => 'Yükleniyor',
236
- 'whole result' => 'tüm sonuç',
237
  '%d byte(s)' => array('%d bayt', '%d bayt'),
238
 
239
  'Import' => 'İçeri Aktar',
240
  '%d row(s) have been imported.' => array('%d kayıt içeri aktarıldı.', '%d adet kayıt içeri aktarıldı.'),
 
241
 
242
  // in-place editing in select
 
243
  'Ctrl+click on a value to modify it.' => 'Bir değeri değiştirmek için üzerine Ctrl+tıklayın.',
244
  'Use edit link to modify this value.' => 'Değeri değiştirmek için düzenleme bağlantısını kullanın.',
245
 
@@ -258,8 +281,10 @@ $translations = array(
258
  'Save' => 'Kaydet',
259
  'Save and continue edit' => 'Kaydet ve düzenlemeye devam et',
260
  'Save and insert next' => 'Kaydet ve sonrakini ekle',
 
261
  'Clone' => 'Kopyala',
262
  'Delete' => 'Sil',
 
263
 
264
  'E-mail' => 'E-posta',
265
  'From' => 'Gönderen',
9
  'Login' => 'Giriş',
10
  'Logout' => 'Çıkış',
11
  'Logged as: %s' => '%s olarak giriş yapıldı.',
12
+ 'Logout successful.' => 'Oturum başarıyla sonlandı.',
13
+ 'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Adminer kullandığınız için teşekkür ederiz <a href="%s">bağış yapmayı düşünün</a>.',
14
+ 'Invalid credentials.' => 'Geçersiz kimlik bilgileri.',
15
+ '<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => 'SQLite kullanmak için <a href="https://www.adminer.org/en/extension/"%s>%s metodunu</a> kullanın.',
16
+ 'Too many unsuccessful logins, try again in %d minute(s).' => array('Çok fazla oturum açma denemesi yapıldı.', '%d Dakika sonra tekrar deneyiniz.'),
17
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Ana şifrenin süresi doldu. Kalıcı olması için <a href="https://www.adminer.org/en/extension/"%s>%s medodunu</a> kullanın.',
18
  'Language' => 'Dil',
19
  'Invalid CSRF token. Send the form again.' => 'Geçersiz (CSRF) jetonu. Formu tekrar yolla.',
20
+ 'If you did not send this request from Adminer then close this page.' => 'Bu isteği Adminer\'den göndermediyseniz bu sayfayı kapatın.',
21
  'No extension' => 'Uzantı yok',
22
  'None of the supported PHP extensions (%s) are available.' => 'Desteklenen PHP eklentilerinden (%s) hiçbiri mevcut değil.',
23
+ 'Connecting to privileged ports is not allowed.' => 'Ayrıcalıklı bağlantı noktalarına bağlanmaya izin verilmiyor.',
24
  'Session support must be enabled.' => 'Oturum desteği etkin olmalıdır.',
25
  'Session expired, please login again.' => 'Oturum süresi doldu, lütfen tekrar giriş yapın.',
26
+ 'The action will be performed after successful login with the same credentials.' => 'İşlem, aynı kimlik bilgileriyle başarıyla oturum açıldıktan sonra gerçekleştirilecektir.',
27
  '%s version: %s through PHP extension %s' => '%s sürüm: %s, %s PHP eklentisi ile',
28
  'Refresh' => 'Tazele',
29
 
53
  'Query executed OK, %d row(s) affected.' => array('Sorgu başarıyla çalıştırıldı, %d adet kayıt etkilendi.', 'Sorgu başarıyla çalıştırıldı, %d adet kayıt etkilendi.'),
54
  'No commands to execute.' => 'Çalıştırılacak komut yok.',
55
  'Error in query' => 'Sorguda hata',
56
+ 'Warnings' => 'Uyarılar',
57
+ 'ATTACH queries are not supported.' => 'ATTACH sorguları desteklenmiyor.',
58
  'Execute' => 'Çalıştır',
59
  'Stop on error' => 'Hata oluşursa dur',
60
  'Show only errors' => 'Sadece hataları göster.',
73
  'Unable to upload a file.' => 'Dosya gönderilemiyor.',
74
  'Maximum allowed file size is %sB.' => 'İzin verilen dosya boyutu sınırı %sB.',
75
  'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Çok büyük POST verisi, veriyi azaltın ya da %s ayar yönergesini uygun olarak yapılandırın.',
76
+ 'You can upload a big SQL file via FTP and import it from server.' => 'FTP yoluyla büyük bir SQL dosyası yükleyebilir ve sunucudan içe aktarabilirsiniz.',
77
+ 'You are offline.' => 'Çevrimdışısınız.',
78
 
79
  'Export' => 'Dışarı Aktar',
80
  'Output' => 'Çıktı',
81
  'open' => 'aç',
82
  'save' => 'kaydet',
83
+ 'Saving' => 'Saydediliyor',
84
  'Format' => 'Biçim',
85
  'Data' => 'Veri',
86
 
87
  'Database' => 'Veri Tabanı',
88
  'database' => 'veri tabanı',
89
+ 'DB' => 'DB',
90
  'Use' => 'Kullan',
91
  'Select database' => 'Veri tabanı seç',
92
  'Invalid database.' => 'Geçersiz veri tabanı.',
108
  'Engine' => 'Motor',
109
  'Collation' => 'Karşılaştırma',
110
  'Data Length' => 'Veri Uzunluğu',
111
+ 'Index Length' => 'İndex Uzunluğu',
112
  'Data Free' => 'Boş Veri',
113
  'Rows' => 'Kayıtlar',
114
  '%d in total' => 'toplam %d',
115
  'Analyze' => 'Çözümle',
116
+ 'Optimize' => 'Optimize Et',
117
+ 'Vacuum' => 'Vakumla',
118
  'Check' => 'Denetle',
119
  'Repair' => 'Tamir Et',
120
  'Truncate' => 'Boşalt',
172
  'Auto Increment' => 'Otomatik Artır',
173
  'Options' => 'Seçenekler',
174
  'Comment' => 'Yorum',
175
+ 'Default value' => 'Varsayılan değer',
176
  'Default values' => 'Varsayılan değerler',
177
  'Drop' => 'Sil',
178
+ 'Drop %s?' => 'Sil %s?',
179
  'Are you sure?' => 'Emin misiniz?',
180
+ 'Size' => 'Boyut',
181
+ 'Compute' => 'Hesapla',
182
  'Move up' => 'Yukarı taşı',
183
  'Move down' => 'Aşağı taşı',
184
  'Remove' => 'Sil',
190
  'Values' => 'Değerler',
191
 
192
  'View' => 'Görünüm',
193
+ 'Materialized view' => 'Materialized Görünüm',
194
  'View has been dropped.' => 'Görünüm silindi.',
195
  'View has been altered.' => 'Görünüm değiştirildi.',
196
  'View has been created.' => 'Görünüm oluşturuldu.',
197
  'Alter view' => 'Görünümü değiştir',
198
  'Create view' => 'Görünüm oluştur',
199
 
200
+ 'Indexes' => 'İndeksler',
201
+ 'Indexes have been altered.' => 'İndeksler değiştirildi.',
202
+ 'Alter indexes' => 'İndeksleri değiştir',
203
  'Add next' => 'Bundan sonra ekle',
204
+ 'Index Type' => 'İndex Türü',
205
  'Column (length)' => 'Kolon (uzunluğu)',
206
 
207
  'Foreign keys' => 'Dış anahtarlar',
240
  'anywhere' => 'hiçbir yerde',
241
  'Search data in tables' => 'Tablolarda veri ara',
242
  'Sort' => 'Sırala',
243
+ 'descending' => 'Azalan',
244
+ 'Limit' => 'Limit',
245
+ 'Limit rows' => 'Satır Limiti',
246
+ 'Text length' => 'Metin Boyutu',
247
+ 'Action' => 'İşlem',
248
+ 'Full table scan' => 'Tam tablo taraması',
249
  'Unable to select the table' => 'Tablo seçilemedi',
250
  'No rows.' => 'Kayıt yok.',
251
+ '%d / ' => '%d / ',
252
  '%d row(s)' => array('%d kayıt', '%d adet kayıt'),
253
  'Page' => 'Sayfa',
254
  'last' => 'son',
255
  'Load more data' => 'Daha fazla veri yükle',
256
  'Loading' => 'Yükleniyor',
257
+ 'Whole result' => 'Tüm sonuç',
258
  '%d byte(s)' => array('%d bayt', '%d bayt'),
259
 
260
  'Import' => 'İçeri Aktar',
261
  '%d row(s) have been imported.' => array('%d kayıt içeri aktarıldı.', '%d adet kayıt içeri aktarıldı.'),
262
+ 'File must be in UTF-8 encoding.' => 'Dosya UTF-8 kodlamasında olmalıdır.',
263
 
264
  // in-place editing in select
265
+ 'Modify' => 'Düzenle',
266
  'Ctrl+click on a value to modify it.' => 'Bir değeri değiştirmek için üzerine Ctrl+tıklayın.',
267
  'Use edit link to modify this value.' => 'Değeri değiştirmek için düzenleme bağlantısını kullanın.',
268
 
281
  'Save' => 'Kaydet',
282
  'Save and continue edit' => 'Kaydet ve düzenlemeye devam et',
283
  'Save and insert next' => 'Kaydet ve sonrakini ekle',
284
+ 'Selected' => 'Seçildi',
285
  'Clone' => 'Kopyala',
286
  'Delete' => 'Sil',
287
+ 'You have no privileges to update this table.' => 'Bu tabloyu güncellemek için yetkiniz yok.',
288
 
289
  'E-mail' => 'E-posta',
290
  'From' => 'Gönderen',
adminer/adminer/adminer/lang/uk.inc.php CHANGED
@@ -230,7 +230,7 @@ $translations = array(
230
  '%d row(s)' => array('%d рядок', '%d рядки', '%d рядків'),
231
  'Page' => 'Сторінка',
232
  'last' => 'остання',
233
- 'whole result' => 'весь результат',
234
  '%d byte(s)' => array('%d байт', '%d байта', '%d байтів'),
235
 
236
  'Import' => 'Імпортувати',
230
  '%d row(s)' => array('%d рядок', '%d рядки', '%d рядків'),
231
  'Page' => 'Сторінка',
232
  'last' => 'остання',
233
+ 'Whole result' => 'Весь результат',
234
  '%d byte(s)' => array('%d байт', '%d байта', '%d байтів'),
235
 
236
  'Import' => 'Імпортувати',
adminer/adminer/adminer/lang/vi.inc.php CHANGED
@@ -12,7 +12,7 @@ $translations = array(
12
  'Logout successful.' => 'Đã thoát xong.',
13
  'Invalid credentials.' => 'Tài khoản sai.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => 'Bạn gõ sai tài khoản quá nhiều lần, hãy thử lại sau %d phút nữa.',
15
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Mật khẩu đã hết hạn. <a href="https://www.adminer.org/en/extension/" target="_blank">Thử cách làm</a> để giữ cố định.',
16
  'Language' => 'Ngôn ngữ',
17
  'Invalid CSRF token. Send the form again.' => 'Mã kiểm tra CSRF sai, hãy nhập lại biểu mẫu.',
18
  'No extension' => 'Không có phần mở rộng',
@@ -238,7 +238,7 @@ $translations = array(
238
  'last' => 'cuối',
239
  'Load more data' => 'Xem thêm dữ liệu',
240
  'Loading' => 'Đang nạp',
241
- 'whole result' => 'toàn bộ kết quả',
242
  '%d byte(s)' => '%d byte(s)',
243
 
244
  'Import' => 'Nhập khẩu',
12
  'Logout successful.' => 'Đã thoát xong.',
13
  'Invalid credentials.' => 'Tài khoản sai.',
14
  'Too many unsuccessful logins, try again in %d minute(s).' => 'Bạn gõ sai tài khoản quá nhiều lần, hãy thử lại sau %d phút nữa.',
15
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => 'Mật khẩu đã hết hạn. <a href="https://www.adminer.org/en/extension/"%s>Thử cách làm</a> để giữ cố định.',
16
  'Language' => 'Ngôn ngữ',
17
  'Invalid CSRF token. Send the form again.' => 'Mã kiểm tra CSRF sai, hãy nhập lại biểu mẫu.',
18
  'No extension' => 'Không có phần mở rộng',
238
  'last' => 'cuối',
239
  'Load more data' => 'Xem thêm dữ liệu',
240
  'Loading' => 'Đang nạp',
241
+ 'Whole result' => 'Toàn bộ kết quả',
242
  '%d byte(s)' => '%d byte(s)',
243
 
244
  'Import' => 'Nhập khẩu',
adminer/adminer/adminer/lang/xx.inc.php CHANGED
@@ -8,20 +8,23 @@ $translations = array(
8
  'Permanent login' => 'Xx',
9
  'Login' => 'Xx',
10
  'Logout' => 'Xx',
11
- 'Logged as: %s' => 'Xx',
12
  'Logout successful.' => 'Xx.',
 
13
  'Invalid credentials.' => 'Xx.',
14
- '<a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to use SQLite.' => 'Xx.',
15
- 'Too many unsuccessful logins, try again in %d minute(s).' => array('Xx.', 'Xx.'),
16
- 'Master password expired. <a href="https://www.adminer.org/en/extension/" target="_blank">Implement</a> %s method to make it permanent.' => 'Xx.',
17
  'Language' => 'Xx',
18
  'Invalid CSRF token. Send the form again.' => 'Xx.',
19
  'If you did not send this request from Adminer then close this page.' => 'Xx.',
20
  'No extension' => 'Xx',
21
- 'None of the supported PHP extensions (%s) are available.' => 'Xx.',
 
22
  'Session support must be enabled.' => 'Xx.',
23
  'Session expired, please login again.' => 'Xx.',
24
- '%s version: %s through PHP extension %s' => 'Xx',
 
25
  'Refresh' => 'Xx',
26
 
27
  // text direction - 'ltr' or 'rtl'
@@ -39,40 +42,37 @@ $translations = array(
39
  'Revoke' => 'Xx',
40
 
41
  'Process list' => 'Xx',
42
- '%d process(es) have been killed.' => array('Xx.', 'Xx.'),
43
  'Kill' => 'Xx',
44
 
45
  'Variables' => 'Xx',
46
  'Status' => 'Xx',
47
 
48
- 'Replication' => 'Xx',
49
- 'Master status' => 'Xx',
50
- 'Slave status' => 'Xx',
51
-
52
  'SQL command' => 'Xx',
53
- '%d query(s) executed OK.' => array('Xx.', 'Xx.'),
54
- 'Query executed OK, %d row(s) affected.' => array('Xx.', 'Xx.'),
55
  'No commands to execute.' => 'Xx.',
56
  'Error in query' => 'Xx',
 
57
  'ATTACH queries are not supported.' => 'Xx.',
58
  'Execute' => 'Xx',
59
  'Stop on error' => 'Xx',
60
  'Show only errors' => 'Xx',
61
  // sprintf() format for time of the command
62
- '%.3f s' => 'xx',
63
  'History' => 'Xx',
64
  'Clear' => 'Xx',
65
  'Edit all' => 'Xx',
66
 
67
  'File upload' => 'Xx',
68
  'From server' => 'Xx',
69
- 'Webserver file %s' => 'Xx',
70
  'Run file' => 'Xx',
71
  'File does not exist.' => 'Xx.',
72
  'File uploads are disabled.' => 'Xx.',
73
  'Unable to upload a file.' => 'Xx.',
74
- 'Maximum allowed file size is %sB.' => 'Xx.',
75
- 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Xx.',
76
  'You can upload a big SQL file via FTP and import it from server.' => 'Xx.',
77
  'You are offline.' => 'Xx.',
78
 
@@ -86,6 +86,7 @@ $translations = array(
86
 
87
  'Database' => 'Xx',
88
  'database' => 'xx',
 
89
  'Use' => 'Xx',
90
  'Select database' => 'Xx',
91
  'Invalid database.' => 'Xx.',
@@ -110,7 +111,7 @@ $translations = array(
110
  'Index Length' => 'Xx',
111
  'Data Free' => 'Xx',
112
  'Rows' => 'Xx',
113
- '%d in total' => 'xx',
114
  'Analyze' => 'Xx',
115
  'Optimize' => 'Xx',
116
  'Vacuum' => 'Xx',
@@ -125,7 +126,7 @@ $translations = array(
125
  'Tables have been copied.' => 'Xx.',
126
 
127
  'Routines' => 'Xx',
128
- 'Routine has been called, %d row(s) affected.' => array('Xx.', 'Xx.'),
129
  'Call' => 'Xx',
130
  'Parameter name' => 'Xx',
131
  'Create procedure' => 'Xx',
@@ -174,13 +175,14 @@ $translations = array(
174
  'Default value' => 'Xx',
175
  'Default values' => 'Xx',
176
  'Drop' => 'Xx',
177
- 'Are you sure?' => 'Xx',
 
178
  'Size' => 'Xx',
179
  'Compute' => 'Xx',
180
  'Move up' => 'Xx',
181
  'Move down' => 'Xx',
182
  'Remove' => 'Xx',
183
- 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Xx.',
184
 
185
  'Partition by' => 'Xx',
186
  'Partitions' => 'Xx',
@@ -246,17 +248,17 @@ $translations = array(
246
  'Full table scan' => 'Xx',
247
  'Unable to select the table' => 'Xx',
248
  'No rows.' => 'Xx.',
249
- '%d / ' => 'xx',
250
- '%d row(s)' => array('xx', 'xx'),
251
  'Page' => 'Xx',
252
  'last' => 'xx',
253
  'Load more data' => 'Xx',
254
  'Loading' => 'Xx',
255
- 'whole result' => 'xx',
256
- '%d byte(s)' => array('xx', 'xx'),
257
 
258
  'Import' => 'Xx',
259
- '%d row(s) have been imported.' => array('Xx.', 'Xx.'),
260
  'File must be in UTF-8 encoding.' => 'Xx.',
261
 
262
  // in-place editing in select
@@ -265,10 +267,10 @@ $translations = array(
265
  'Use edit link to modify this value.' => 'Xx.',
266
 
267
  // %s can contain auto-increment value
268
- 'Item%s has been inserted.' => 'Xx.',
269
  'Item has been deleted.' => 'Xx.',
270
  'Item has been updated.' => 'Xx.',
271
- '%d item(s) have been affected.' => array('Xx.', 'Xx.'),
272
  'New item' => 'Xx',
273
  'original' => 'xx',
274
  // label for value '' in enum data type
@@ -289,7 +291,7 @@ $translations = array(
289
  'Subject' => 'Xx',
290
  'Attachments' => 'Xx',
291
  'Send' => 'Xx',
292
- '%d e-mail(s) have been sent.' => array('Xx.', 'Xx.'),
293
 
294
  // data type descriptions
295
  'Numbers' => 'Xx',
@@ -314,7 +316,7 @@ $translations = array(
314
 
315
  // general SQLite error in create, drop or rename database
316
  'File exists.' => 'Xx.',
317
- 'Please use one of the extensions %s.' => 'Xx.',
318
 
319
  // PostgreSQL and MS SQL schema support
320
  'Alter schema' => 'Xx',
8
  'Permanent login' => 'Xx',
9
  'Login' => 'Xx',
10
  'Logout' => 'Xx',
11
+ 'Logged as: %s' => 'Xx: %s',
12
  'Logout successful.' => 'Xx.',
13
+ 'Thanks for using Adminer, consider <a href="%s">donating</a>.' => 'Xx <a href="%s">xx</a>.',
14
  'Invalid credentials.' => 'Xx.',
15
+ '<a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to use SQLite.' => '<a href="https://www.adminer.org/en/extension/"%s>Xx</a> %s xx.',
16
+ 'Too many unsuccessful logins, try again in %d minute(s).' => array('Xx %d.', 'Xx %d.'),
17
+ 'Master password expired. <a href="https://www.adminer.org/en/extension/"%s>Implement</a> %s method to make it permanent.' => '<a href="https://www.adminer.org/en/extension/"%s>Xx</a> %s xx.',
18
  'Language' => 'Xx',
19
  'Invalid CSRF token. Send the form again.' => 'Xx.',
20
  'If you did not send this request from Adminer then close this page.' => 'Xx.',
21
  'No extension' => 'Xx',
22
+ 'None of the supported PHP extensions (%s) are available.' => 'Xx (%s).',
23
+ 'Connecting to privileged ports is not allowed.' => 'Xx.',
24
  'Session support must be enabled.' => 'Xx.',
25
  'Session expired, please login again.' => 'Xx.',
26
+ 'The action will be performed after successful login with the same credentials.' => 'Xx.',
27
+ '%s version: %s through PHP extension %s' => '%s xx: %s xx %s',
28
  'Refresh' => 'Xx',
29
 
30
  // text direction - 'ltr' or 'rtl'
42
  'Revoke' => 'Xx',
43
 
44
  'Process list' => 'Xx',
45
+ '%d process(es) have been killed.' => array('%d xx.', '%d xx.'),
46
  'Kill' => 'Xx',
47
 
48
  'Variables' => 'Xx',
49
  'Status' => 'Xx',
50
 
 
 
 
 
51
  'SQL command' => 'Xx',
52
+ '%d query(s) executed OK.' => array('%d xx.', '%d xx.'),
53
+ 'Query executed OK, %d row(s) affected.' => array('Xx, %d.', 'Xx, %d.'),
54
  'No commands to execute.' => 'Xx.',
55
  'Error in query' => 'Xx',
56
+ 'Warnings' => 'Xx',
57
  'ATTACH queries are not supported.' => 'Xx.',
58
  'Execute' => 'Xx',
59
  'Stop on error' => 'Xx',
60
  'Show only errors' => 'Xx',
61
  // sprintf() format for time of the command
62
+ '%.3f s' => '%.3f xx',
63
  'History' => 'Xx',
64
  'Clear' => 'Xx',
65
  'Edit all' => 'Xx',
66
 
67
  'File upload' => 'Xx',
68
  'From server' => 'Xx',
69
+ 'Webserver file %s' => 'Xx %s',
70
  'Run file' => 'Xx',
71
  'File does not exist.' => 'Xx.',
72
  'File uploads are disabled.' => 'Xx.',
73
  'Unable to upload a file.' => 'Xx.',
74
+ 'Maximum allowed file size is %sB.' => 'Xx %sB.',
75
+ 'Too big POST data. Reduce the data or increase the %s configuration directive.' => 'Xx %s.',
76
  'You can upload a big SQL file via FTP and import it from server.' => 'Xx.',
77
  'You are offline.' => 'Xx.',
78
 
86
 
87
  'Database' => 'Xx',
88
  'database' => 'xx',
89
+ 'DB' => 'XX',
90
  'Use' => 'Xx',
91
  'Select database' => 'Xx',
92
  'Invalid database.' => 'Xx.',
111
  'Index Length' => 'Xx',
112
  'Data Free' => 'Xx',
113
  'Rows' => 'Xx',
114
+ '%d in total' => '%d xx',
115
  'Analyze' => 'Xx',
116
  'Optimize' => 'Xx',
117
  'Vacuum' => 'Xx',
126
  'Tables have been copied.' => 'Xx.',
127
 
128
  'Routines' => 'Xx',
129
+ 'Routine has been called, %d row(s) affected.' => array('Xx, %d.', 'Xx, %d.'),
130
  'Call' => 'Xx',
131
  'Parameter name' => 'Xx',
132
  'Create procedure' => 'Xx',
175
  'Default value' => 'Xx',
176
  'Default values' => 'Xx',
177
  'Drop' => 'Xx',
178
+ 'Drop %s?' => 'Xx %s?',
179
+ 'Are you sure?' => 'Xx?',
180
  'Size' => 'Xx',
181
  'Compute' => 'Xx',
182
  'Move up' => 'Xx',
183
  'Move down' => 'Xx',
184
  'Remove' => 'Xx',
185
+ 'Maximum number of allowed fields exceeded. Please increase %s.' => 'Xx %s.',
186
 
187
  'Partition by' => 'Xx',
188
  'Partitions' => 'Xx',
248
  'Full table scan' => 'Xx',
249
  'Unable to select the table' => 'Xx',
250
  'No rows.' => 'Xx.',
251
+ '%d / ' => '%d / ',
252
+ '%d row(s)' => array('%d xx', '%d xx'),
253
  'Page' => 'Xx',
254
  'last' => 'xx',
255
  'Load more data' => 'Xx',
256
  'Loading' => 'Xx',
257
+ 'Whole result' => 'Xx',
258
+ '%d byte(s)' => array('%d xx', '%d xx'),
259
 
260
  'Import' => 'Xx',
261
+ '%d row(s) have been imported.' => array('%d xx.', '%d xx.'),
262
  'File must be in UTF-8 encoding.' => 'Xx.',
263
 
264
  // in-place editing in select
267
  'Use edit link to modify this value.' => 'Xx.',
268
 
269
  // %s can contain auto-increment value
270
+ 'Item%s has been inserted.' => 'Xx%s.',
271
  'Item has been deleted.' => 'Xx.',
272
  'Item has been updated.' => 'Xx.',
273
+ '%d item(s) have been affected.' => array('%d xx.', '%d xx.'),
274
  'New item' => 'Xx',
275
  'original' => 'xx',
276
  // label for value '' in enum data type
291
  'Subject' => 'Xx',
292
  'Attachments' => 'Xx',
293
  'Send' => 'Xx',
294
+ '%d e-mail(s) have been sent.' => array('%d xx.', '%d xx.'),
295
 
296
  // data type descriptions
297
  'Numbers' => 'Xx',
316
 
317
  // general SQLite error in create, drop or rename database
318
  'File exists.' => 'Xx.',
319
+ 'Please use one of the extensions %s.' => 'Xx %s.',
320
 
321
  // PostgreSQL and MS SQL schema support
322
  'Alter schema' => 'Xx',
adminer/adminer/adminer/lang/zh-tw.inc.php CHANGED
@@ -183,7 +183,7 @@ $translations = array(
183
  'Save and continue edit' => '儲存並繼續編輯',
184
  'original' => '原始',
185
  '%d item(s) have been affected.' => '%d個項目受到影響。',
186
- 'whole result' => '所有結果',
187
  'Tables have been dropped.' => '已經將資料表刪除。',
188
  'Clone' => '複製',
189
  'Maximum number of allowed fields exceeded. Please increase %s.' => '超過允許的字段數量的最大值。請增加%s。',
183
  'Save and continue edit' => '儲存並繼續編輯',
184
  'original' => '原始',
185
  '%d item(s) have been affected.' => '%d個項目受到影響。',
186
+ 'Whole result' => '所有結果',
187
  'Tables have been dropped.' => '已經將資料表刪除。',
188
  'Clone' => '複製',
189
  'Maximum number of allowed fields exceeded. Please increase %s.' => '超過允許的字段數量的最大值。請增加%s。',
adminer/adminer/adminer/lang/zh.inc.php CHANGED
@@ -185,7 +185,7 @@ $translations = array(
185
  'Save and continue edit' => '保存并继续编辑',
186
  'original' => '原始',
187
  '%d item(s) have been affected.' => '%d 个项目受到影响。',
188
- 'whole result' => '所有结果',
189
  'Tables have been dropped.' => '已删除表。',
190
  'Clone' => '复制',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => '超过最多允许的字段数量。请增加 %s。',
185
  'Save and continue edit' => '保存并继续编辑',
186
  'original' => '原始',
187
  '%d item(s) have been affected.' => '%d 个项目受到影响。',
188
+ 'Whole result' => '所有结果',
189
  'Tables have been dropped.' => '已删除表。',
190
  'Clone' => '复制',
191
  'Maximum number of allowed fields exceeded. Please increase %s.' => '超过最多允许的字段数量。请增加 %s。',
adminer/adminer/adminer/plugin.php CHANGED
@@ -17,7 +17,7 @@ function adminer_object() {
17
  new AdminerDumpXml,
18
  new AdminerDumpAlter,
19
  //~ new AdminerSqlLog("past-" . rtrim(`git describe --tags --abbrev=0`) . ".sql"),
20
- //~ new AdminerEditCalendar("<script type='text/javascript' src='../externals/jquery-ui/jquery-1.4.4.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.core.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.widget.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.datepicker.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.mouse.js'></script>\n<script type='text/javascript' src='../externals/jquery-ui/ui/jquery.ui.slider.js'></script>\n<script type='text/javascript' src='../externals/jquery-timepicker/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' href='../externals/jquery-ui/themes/base/jquery.ui.all.css'>\n<style type='text/css'>\n.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }\n.ui-timepicker-div dl { text-align: left; }\n.ui-timepicker-div dl dt { height: 25px; }\n.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; }\n.ui-timepicker-div td { font-size: 90%; }\n</style>\n", "../externals/jquery-ui/ui/i18n/jquery.ui.datepicker-%s.js"),
21
  //~ new AdminerTinymce("../externals/tinymce/jscripts/tiny_mce/tiny_mce_dev.js"),
22
  //~ new AdminerWymeditor(array("../externals/wymeditor/src/jquery/jquery.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.explorer.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.mozilla.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.opera.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.safari.js")),
23
  new AdminerFileUpload(""),
17
  new AdminerDumpXml,
18
  new AdminerDumpAlter,
19
  //~ new AdminerSqlLog("past-" . rtrim(`git describe --tags --abbrev=0`) . ".sql"),
20
+ //~ new AdminerEditCalendar(script_src("../externals/jquery-ui/jquery-1.4.4.js") . script_src("../externals/jquery-ui/ui/jquery.ui.core.js") . script_src("../externals/jquery-ui/ui/jquery.ui.widget.js") . script_src("../externals/jquery-ui/ui/jquery.ui.datepicker.js") . script_src("../externals/jquery-ui/ui/jquery.ui.mouse.js") . script_src("../externals/jquery-ui/ui/jquery.ui.slider.js") . script_src("../externals/jquery-timepicker/jquery-ui-timepicker-addon.js") . "<link rel='stylesheet' href='../externals/jquery-ui/themes/base/jquery.ui.all.css'>\n<style>\n.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; }\n.ui-timepicker-div dl { text-align: left; }\n.ui-timepicker-div dl dt { height: 25px; }\n.ui-timepicker-div dl dd { margin: -25px 0 10px 65px; }\n.ui-timepicker-div td { font-size: 90%; }\n</style>\n", "../externals/jquery-ui/ui/i18n/jquery.ui.datepicker-%s.js"),
21
  //~ new AdminerTinymce("../externals/tinymce/jscripts/tiny_mce/tiny_mce_dev.js"),
22
  //~ new AdminerWymeditor(array("../externals/wymeditor/src/jquery/jquery.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.explorer.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.mozilla.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.opera.js", "../externals/wymeditor/src/wymeditor/jquery.wymeditor.safari.js")),
23
  new AdminerFileUpload(""),
adminer/adminer/adminer/procedure.inc.php CHANGED
@@ -1,17 +1,18 @@
1
  <?php
2
- $PROCEDURE = $_GET["procedure"];
3
  $routine = (isset($_GET["function"]) ? "FUNCTION" : "PROCEDURE");
4
  $row = $_POST;
5
  $row["fields"] = (array) $row["fields"];
6
 
7
  if ($_POST && !process_fields($row["fields"]) && !$error) {
 
8
  $temp_name = "$row[name]_adminer_" . uniqid();
9
  drop_create(
10
- "DROP $routine " . idf_escape($PROCEDURE),
11
  create_routine($routine, $row),
12
- "DROP $routine " . idf_escape($row["name"]),
13
  create_routine($routine, array("name" => $temp_name) + $row),
14
- "DROP $routine " . idf_escape($temp_name),
15
  substr(ME, 0, -1),
16
  lang('Routine has been dropped.'),
17
  lang('Routine has been altered.'),
@@ -24,7 +25,7 @@ if ($_POST && !process_fields($row["fields"]) && !$error) {
24
  page_header(($PROCEDURE != "" ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . h($PROCEDURE) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error);
25
 
26
  if (!$_POST && $PROCEDURE != "") {
27
- $row = routine($PROCEDURE, $routine);
28
  $row["name"] = $PROCEDURE;
29
  }
30
 
@@ -35,20 +36,20 @@ $routine_languages = routine_languages();
35
 
36
  <form action="" method="post" id="form">
37
  <p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64" autocapitalize="off">
38
- <?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) : ""); ?>
39
  <input type="submit" value="<?php echo lang('Save'); ?>">
40
  <table cellspacing="0" class="nowrap">
41
  <?php
42
  edit_fields($row["fields"], $collations, $routine);
43
  if (isset($_GET["function"])) {
44
  echo "<tr><td>" . lang('Return type');
45
- edit_type("returns", $row["returns"], $collations);
46
  }
47
  ?>
48
  </table>
49
  <p><?php textarea("definition", $row["definition"]); ?>
50
  <p>
51
  <input type="submit" value="<?php echo lang('Save'); ?>">
52
- <?php if ($PROCEDURE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
53
  <input type="hidden" name="token" value="<?php echo $token; ?>">
54
  </form>
1
  <?php
2
+ $PROCEDURE = ($_GET["name"] ? $_GET["name"] : $_GET["procedure"]);
3
  $routine = (isset($_GET["function"]) ? "FUNCTION" : "PROCEDURE");
4
  $row = $_POST;
5
  $row["fields"] = (array) $row["fields"];
6
 
7
  if ($_POST && !process_fields($row["fields"]) && !$error) {
8
+ $orig = routine($_GET["procedure"], $routine);
9
  $temp_name = "$row[name]_adminer_" . uniqid();
10
  drop_create(
11
+ "DROP $routine " . routine_id($PROCEDURE, $orig),
12
  create_routine($routine, $row),
13
+ "DROP $routine " . routine_id($row["name"], $row),
14
  create_routine($routine, array("name" => $temp_name) + $row),
15
+ "DROP $routine " . routine_id($temp_name, $row),
16
  substr(ME, 0, -1),
17
  lang('Routine has been dropped.'),
18
  lang('Routine has been altered.'),
25
  page_header(($PROCEDURE != "" ? (isset($_GET["function"]) ? lang('Alter function') : lang('Alter procedure')) . ": " . h($PROCEDURE) : (isset($_GET["function"]) ? lang('Create function') : lang('Create procedure'))), $error);
26
 
27
  if (!$_POST && $PROCEDURE != "") {
28
+ $row = routine($_GET["procedure"], $routine);
29
  $row["name"] = $PROCEDURE;
30
  }
31
 
36
 
37
  <form action="" method="post" id="form">
38
  <p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" maxlength="64" autocapitalize="off">
39
+ <?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) . "\n" : ""); ?>
40
  <input type="submit" value="<?php echo lang('Save'); ?>">
41
  <table cellspacing="0" class="nowrap">
42
  <?php
43
  edit_fields($row["fields"], $collations, $routine);
44
  if (isset($_GET["function"])) {
45
  echo "<tr><td>" . lang('Return type');
46
+ edit_type("returns", $row["returns"], $collations, array(), ($jush == "pgsql" ? array("void", "trigger") : array()));
47
  }
48
  ?>
49
  </table>
50
  <p><?php textarea("definition", $row["definition"]); ?>
51
  <p>
52
  <input type="submit" value="<?php echo lang('Save'); ?>">
53
+ <?php if ($PROCEDURE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $PROCEDURE)); ?><?php } ?>
54
  <input type="hidden" name="token" value="<?php echo $token; ?>">
55
  </form>
adminer/adminer/adminer/processlist.inc.php CHANGED
@@ -13,8 +13,9 @@ page_header(lang('Process list'), $error);
13
  ?>
14
 
15
  <form action="" method="post">
16
- <table cellspacing="0" onclick="tableClick(event);" ondblclick="tableClick(event, true);" class="nowrap checkable">
17
  <?php
 
18
  // HTML valid because there is always at least one process
19
  $i = -1;
20
  foreach (process_list() as $i => $row) {
@@ -44,7 +45,6 @@ foreach (process_list() as $i => $row) {
44
  }
45
  ?>
46
  </table>
47
- <script type='text/javascript'>tableCheck();</script>
48
  <p>
49
  <?php
50
  if (support("kill")) {
@@ -54,3 +54,4 @@ if (support("kill")) {
54
  ?>
55
  <input type="hidden" name="token" value="<?php echo $token; ?>">
56
  </form>
 
13
  ?>
14
 
15
  <form action="" method="post">
16
+ <table cellspacing="0" class="nowrap checkable">
17
  <?php
18
+ echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
19
  // HTML valid because there is always at least one process
20
  $i = -1;
21
  foreach (process_list() as $i => $row) {
45
  }
46
  ?>
47
  </table>
 
48
  <p>
49
  <?php
50
  if (support("kill")) {
54
  ?>
55
  <input type="hidden" name="token" value="<?php echo $token; ?>">
56
  </form>
57
+ <?php echo script("tableCheck();"); ?>
adminer/adminer/adminer/replication.inc.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- page_header(lang('Replication'));
3
-
4
- echo "<h3>" . lang('Master status') . doc_link(array("sql" => "show-master-status.html")) . "</h3>\n";
5
- $master_replication_status = replication_status("MASTER");
6
- if (!$master_replication_status) {
7
- echo "<p class='message'>" . lang('No rows.') . "\n";
8
- } else {
9
- echo "<table cellspacing='0'>\n";
10
- foreach ($master_replication_status[0] as $key => $val) {
11
- echo "<tr>";
12
- echo "<th>" . h($key);
13
- echo "<td>" . nbsp($val);
14
- }
15
- echo "</table>\n";
16
- }
17
-
18
- $slave_replication_status = replication_status("SLAVE");
19
- if ($slave_replication_status) {
20
- echo "<h3>" . lang('Slave status') . doc_link(array("sql" => "show-slave-status.html")) . "</h3>\n";
21
- foreach ($slave_replication_status[0] as $slave) {
22
- echo "<table cellspacing='0'>\n";
23
- foreach ($slave as $key => $val) {
24
- echo "<tr>";
25
- echo "<th>" . h($key);
26
- echo "<td>" . nbsp($val);
27
- }
28
- echo "</table>\n";
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
adminer/adminer/adminer/schema.inc.php CHANGED
@@ -48,19 +48,19 @@ foreach (table_status('', true) as $table => $table_status) {
48
  }
49
 
50
  ?>
51
- <div id="schema" style="height: <?php echo $top; ?>em;" onselectstart="return false;">
52
- <script type="text/javascript">
 
53
  var tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
54
- var em = document.getElementById('schema').offsetHeight / <?php echo $top; ?>;
55
  document.onmousemove = schemaMousemove;
56
- document.onmouseup = function (ev) {
57
- schemaMouseup(ev, '<?php echo js_escape(DB); ?>');
58
- };
59
  </script>
60
  <?php
61
  foreach ($schema as $name => $table) {
62
- echo "<div class='table' style='top: " . $table["pos"][0] . "em; left: " . $table["pos"][1] . "em;' onmousedown='schemaMousedown(this, event);'>";
63
  echo '<a href="' . h(ME) . 'table=' . urlencode($name) . '"><b>' . h($name) . "</b></a>";
 
64
 
65
  foreach ($table["fields"] as $field) {
66
  $val = '<span' . type_class($field["type"]) . ' title="' . h($field["full_type"] . ($field["null"] ? " NULL" : '')) . '">' . h($field["field"]) . '</span>';
48
  }
49
 
50
  ?>
51
+ <div id="schema" style="height: <?php echo $top; ?>em;">
52
+ <script<?php echo nonce(); ?>>
53
+ qs('#schema').onselectstart = function () { return false; };
54
  var tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
55
+ var em = qs('#schema').offsetHeight / <?php echo $top; ?>;
56
  document.onmousemove = schemaMousemove;
57
+ document.onmouseup = partialArg(schemaMouseup, '<?php echo js_escape(DB); ?>');
 
 
58
  </script>
59
  <?php
60
  foreach ($schema as $name => $table) {
61
+ echo "<div class='table' style='top: " . $table["pos"][0] . "em; left: " . $table["pos"][1] . "em;'>";
62
  echo '<a href="' . h(ME) . 'table=' . urlencode($name) . '"><b>' . h($name) . "</b></a>";
63
+ echo script("qsl('div').onmousedown = schemaMousedown;");
64
 
65
  foreach ($table["fields"] as $field) {
66
  $val = '<span' . type_class($field["type"]) . ' title="' . h($field["full_type"] . ($field["null"] ? " NULL" : '')) . '">' . h($field["field"]) . '</span>';
adminer/adminer/adminer/scheme.inc.php CHANGED
@@ -27,11 +27,11 @@ if (!$row) {
27
 
28
  <form action="" method="post">
29
  <p><input name="name" id="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
30
- <script type='text/javascript'>focus(document.getElementById('name'));</script>
31
  <input type="submit" value="<?php echo lang('Save'); ?>">
32
  <?php
33
  if ($_GET["ns"] != "") {
34
- echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n";
35
  }
36
  ?>
37
  <input type="hidden" name="token" value="<?php echo $token; ?>">
27
 
28
  <form action="" method="post">
29
  <p><input name="name" id="name" value="<?php echo h($row["name"]); ?>" autocapitalize="off">
30
+ <?php echo script("focus(qs('#name'));"); ?>
31
  <input type="submit" value="<?php echo lang('Save'); ?>">
32
  <?php
33
  if ($_GET["ns"] != "") {
34
+ echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $_GET["ns"])) . "\n";
35
  }
36
  ?>
37
  <input type="hidden" name="token" value="<?php echo $token; ?>">
adminer/adminer/adminer/select.inc.php CHANGED
@@ -4,11 +4,7 @@ $table_status = table_status1($TABLE);
4
  $indexes = indexes($TABLE);
5
  $fields = fields($TABLE);
6
  $foreign_keys = column_foreign_keys($TABLE);
7
- $oid = "";
8
- if ($table_status["Oid"]) {
9
- $oid = ($jush == "sqlite" ? "rowid" : "oid");
10
- $indexes[] = array("type" => "PRIMARY", "columns" => array($oid));
11
- }
12
  parse_str($_COOKIE["adminer_import"], $adminer_import);
13
 
14
  $rights = array(); // privilege => 0
@@ -30,10 +26,6 @@ $is_group = count($group) < count($select);
30
  $where = $adminer->selectSearchProcess($fields, $indexes);
31
  $order = $adminer->selectOrderProcess($fields, $indexes);
32
  $limit = $adminer->selectLimitProcess();
33
- $from = ($select ? implode(", ", $select) : "*" . ($oid ? ", $oid" : ""))
34
- . convert_fields($columns, $fields, $select)
35
- . "\nFROM " . table($TABLE);
36
- $group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
37
 
38
  if ($_GET["val"] && is_ajax()) {
39
  header("Content-Type: text/plain; charset=utf-8");
@@ -49,6 +41,24 @@ if ($_GET["val"] && is_ajax()) {
49
  exit;
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  if ($_POST && !$error) {
53
  $where_check = $where;
54
  if (!$_POST["all"] && is_array($_POST["check"])) {
@@ -59,25 +69,15 @@ if ($_POST && !$error) {
59
  $where_check[] = "((" . implode(") OR (", $checks) . "))";
60
  }
61
  $where_check = ($where_check ? "\nWHERE " . implode(" AND ", $where_check) : "");
62
- $primary = $unselected = null;
63
- foreach ($indexes as $index) {
64
- if ($index["type"] == "PRIMARY") {
65
- $primary = array_flip($index["columns"]);
66
- $unselected = ($select ? $primary : array());
67
- break;
68
- }
69
- }
70
- foreach ((array) $unselected as $key => $val) {
71
- if (in_array(idf_escape($key), $select)) {
72
- unset($unselected[$key]);
73
- }
74
- }
75
-
76
  if ($_POST["export"]) {
77
  cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"]));
78
  dump_headers($TABLE);
79
  $adminer->dumpTable($TABLE, "");
80
- if (!is_array($_POST["check"]) || $unselected === array()) {
 
 
 
 
81
  $query = "SELECT $from$where_check$group_by";
82
  } else {
83
  $union = array();
@@ -108,7 +108,7 @@ if ($_POST && !$error) {
108
  if ($_POST["clone"]) {
109
  $query = "INTO " . table($TABLE) . " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . table($TABLE);
110
  }
111
- if ($_POST["all"] || ($unselected === array() && is_array($_POST["check"])) || $is_group) {
112
  $result = ($_POST["delete"]
113
  ? $driver->delete($TABLE, $where_check)
114
  : ($_POST["clone"]
@@ -124,8 +124,8 @@ if ($_POST && !$error) {
124
  $result = ($_POST["delete"]
125
  ? $driver->delete($TABLE, $where2, 1)
126
  : ($_POST["clone"]
127
- ? queries("INSERT" . limit1($query, $where2))
128
- : $driver->update($TABLE, $set, $where2)
129
  )
130
  );
131
  if (!$result) {
@@ -165,7 +165,7 @@ if ($_POST && !$error) {
165
  $TABLE,
166
  $set,
167
  " WHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($unique_idf, $fields),
168
- !($is_group || $unselected === array()),
169
  " "
170
  );
171
  if (!$result) {
@@ -226,7 +226,7 @@ $set = null;
226
  if (isset($rights["insert"]) || !support("table")) {
227
  $set = "";
228
  foreach ((array) $_GET["where"] as $val) {
229
- if (count($foreign_keys[$val["col"]]) == 1 && ($val["op"] == "="
230
  || (!$val["op"] && !preg_match('~[_%]~', $val["val"])) // LIKE in Editor
231
  )) {
232
  $set .= "&set" . urlencode("[" . bracket_escape($val["col"]) . "]") . "=" . urlencode($val["val"]);
@@ -259,17 +259,29 @@ if (!$columns && support("table")) {
259
  }
260
 
261
  $select2 = $select;
 
262
  if (!$select2) {
263
  $select2[] = "*";
264
- if ($oid) {
265
- $select2[] = $oid;
 
 
 
 
 
 
 
266
  }
267
  }
268
- $convert_fields = convert_fields($columns, $fields, $select);
269
- if ($convert_fields) {
270
- $select2[] = substr($convert_fields, 2);
 
 
 
 
271
  }
272
- $result = $driver->select($TABLE, $select2, $where, $group, $order, $limit, $page, true);
273
 
274
  if (!$result) {
275
  echo "<p class='error'>" . error() . "\n";
@@ -288,7 +300,7 @@ if (!$columns && support("table")) {
288
  }
289
 
290
  // use count($rows) without LIMIT, COUNT(*) without grouping, FOUND_ROWS otherwise (slowest)
291
- if ($_GET["page"] != "last" && +$limit && $group && $is_group && $jush == "sql") {
292
  $found_rows = $connection->result(" SELECT FOUND_ROWS()"); // space to allow mysql.trace_mode
293
  }
294
 
@@ -297,14 +309,18 @@ if (!$columns && support("table")) {
297
  } else {
298
  $backward_keys = $adminer->backwardKeys($TABLE, $table_name);
299
 
300
- echo "<table id='table' cellspacing='0' class='nowrap checkable' onclick='tableClick(event);' ondblclick='tableClick(event, true);' onkeydown='return editingKeydown(event);'>\n";
301
- 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>");
 
 
 
 
302
  $names = array();
303
  $functions = array();
304
  reset($select);
305
  $rank = 1;
306
  foreach ($rows[0] as $key => $val) {
307
- if ($key != $oid) {
308
  $val = $_GET["columns"][key($select)];
309
  $field = $fields[$select ? ($val ? $val["col"] : current($select)) : $key];
310
  $name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : $key));
@@ -314,13 +330,14 @@ if (!$columns && support("table")) {
314
  $column = idf_escape($key);
315
  $href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
316
  $desc = "&desc%5B0%5D=1";
317
- echo '<th onmouseover="columnMouse(this);" onmouseout="columnMouse(this, \' hidden\');">';
318
  echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
319
  echo apply_sql_function($val["fun"], $name) . "</a>"; //! columns looking like functions
320
  echo "<span class='column hidden'>";
321
  echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
322
  if (!$val["fun"]) {
323
- echo '<a href="#fieldset-search" onclick="selectSearch(\'' . h(js_escape($key)) . '\'); return false;" title="' . lang('Search') . '" class="text jsonly"> =</a>';
 
324
  }
325
  echo "</span>";
326
  }
@@ -359,18 +376,22 @@ if (!$columns && support("table")) {
359
  }
360
  $unique_idf = "";
361
  foreach ($unique_array as $key => $val) {
362
- if (($jush == "sql" || $jush == "pgsql") && strlen($val) > 64) {
363
  $key = (strpos($key, '(') ? $key : idf_escape($key)); //! columns looking like functions
364
- $key = "MD5(" . ($jush == 'sql' && preg_match("~^utf8_~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset($connection) . ")") . ")";
365
  $val = md5($val);
366
  }
367
  $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
368
  }
369
- echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>" . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") . ($is_group || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "'>" . lang('edit') . "</a>"));
 
 
 
370
 
371
  foreach ($row as $key => $val) {
372
  if (isset($names[$key])) {
373
  $field = $fields[$key];
 
374
  if ($val != "" && (!isset($email_fields[$key]) || $email_fields[$key] != "")) {
375
  $email_fields[$key] = (is_mail($val) ? $names[$key] : ""); //! filled e-mails can be contained on other pages
376
  }
@@ -419,7 +440,10 @@ if (!$columns && support("table")) {
419
  echo "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>");
420
  } else {
421
  $long = strpos($val, "<i>...</i>");
422
- echo "<td id='$id' onclick=\"selectClick(this, event, " . ($long ? 2 : ($text ? 1 : 0)) . ($editable ? "" : ", '" . h(lang('Use edit link to modify this value.')) . "'") . ");\">$val";
 
 
 
423
  }
424
  }
425
  }
@@ -437,103 +461,122 @@ if (!$columns && support("table")) {
437
  echo "</table>\n";
438
  }
439
 
440
- if (($rows || $page) && !is_ajax()) {
441
- $exact_count = true;
442
- if ($_GET["page"] != "last") {
443
- if (!+$limit) {
444
- $found_rows = count($rows);
445
- } elseif ($jush != "sql" || !$is_group) {
446
- $found_rows = ($is_group ? false : found_rows($table_status, $where));
447
- if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) {
448
- // slow with big tables
449
- $found_rows = reset(slow_query(count_rows($TABLE, $where, $is_group, $group)));
450
- } else {
451
- $exact_count = false;
 
 
452
  }
453
  }
454
- }
455
 
456
- if (+$limit && ($found_rows === false || $found_rows > $limit || $page)) {
457
- echo "<p class='pages'>";
458
- // display first, previous 4, next 4 and last page
459
- $max_page = ($found_rows === false
460
- ? $page + (count($rows) >= $limit ? 2 : 1)
461
- : floor(($found_rows - 1) / $limit)
462
- );
463
- if ($jush != "simpledb") {
464
- echo '<a href="' . h(remove_from_uri("page")) . "\" onclick=\"pageClick(this.href, +prompt('" . lang('Page') . "', '" . ($page + 1) . "'), event); return false;\">" . lang('Page') . "</a>:";
465
- echo pagination(0, $page) . ($page > 5 ? " ..." : "");
466
- for ($i = max(1, $page - 4); $i < min($max_page, $page + 5); $i++) {
467
- echo pagination($i, $page);
468
- }
469
- if ($max_page > 0) {
470
- echo ($page + 5 < $max_page ? " ..." : "");
471
- echo ($exact_count && $found_rows !== false
472
- ? pagination($max_page, $page)
473
- : " <a href='" . h(remove_from_uri("page") . "&page=last") . "' title='~$max_page'>" . lang('last') . "</a>"
474
- );
475
- }
476
  echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit
477
- ? ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '...\');" class="loadmore">' . lang('Load more data') . '</a>'
 
478
  : ''
479
  );
480
- } else {
481
- echo lang('Page') . ":";
482
- echo pagination(0, $page) . ($page > 1 ? " ..." : "");
483
- echo ($page ? pagination($page, $page) : "");
484
- echo ($max_page > $page ? pagination($page + 1, $page) . ($max_page > $page + 1 ? " ..." : "") : "");
485
  }
486
  }
487
-
488
- echo "<p class='count'>\n";
489
- echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : "");
490
- $display_rows = ($exact_count ? "" : "~ ") . $found_rows;
491
- echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n";
492
-
493
- if ($adminer->selectCommandPrint()) {
494
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  <fieldset<?php echo ($_GET["modify"] ? '' : ' class="jsonly"'); ?>><legend><?php echo lang('Modify'); ?></legend><div>
496
  <input type="submit" value="<?php echo lang('Save'); ?>"<?php echo ($_GET["modify"] ? '' : ' title="' . lang('Ctrl+click on a value to modify it.') . '"'); ?>>
497
  </div></fieldset>
498
  <fieldset><legend><?php echo lang('Selected'); ?> <span id="selected"></span></legend><div>
499
  <input type="submit" name="edit" value="<?php echo lang('Edit'); ?>">
500
  <input type="submit" name="clone" value="<?php echo lang('Clone'); ?>">
501
- <input type="submit" name="delete" value="<?php echo lang('Delete'); ?>"<?php echo confirm(); ?>>
502
  </div></fieldset>
503
  <?php
504
- }
505
 
506
- $format = $adminer->dumpFormat();
507
- foreach ((array) $_GET["columns"] as $column) {
508
- if ($column["fun"]) {
509
- unset($format['sql']);
510
- break;
 
511
  }
512
- }
513
- if ($format) {
514
- print_fieldset("export", lang('Export') . " <span id='selected2'></span>");
515
- $output = $adminer->dumpOutput();
516
- echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
517
- echo html_select("format", $format, $adminer_import["format"]);
518
- echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
519
- echo "</div></fieldset>\n";
 
 
520
  }
521
 
522
- echo (!$group && $select ? "" : "<script type='text/javascript'>tableCheck();</script>\n");
523
- }
 
 
 
 
 
 
 
 
 
 
 
524
 
525
- if ($adminer->selectImportPrint()) {
526
- print_fieldset("import", lang('Import'), !$rows);
527
- echo "<input type='file' name='csv_file'> ";
528
- echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"], 1); // 1 - select
529
- echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
530
- echo "</div></fieldset>\n";
531
  }
532
-
533
- $adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
534
-
535
- echo "<p><input type='hidden' name='token' value='$token'></p>\n";
536
- echo "</form>\n";
537
  }
538
  }
539
 
4
  $indexes = indexes($TABLE);
5
  $fields = fields($TABLE);
6
  $foreign_keys = column_foreign_keys($TABLE);
7
+ $oid = $table_status["Oid"];
 
 
 
 
8
  parse_str($_COOKIE["adminer_import"], $adminer_import);
9
 
10
  $rights = array(); // privilege => 0
26
  $where = $adminer->selectSearchProcess($fields, $indexes);
27
  $order = $adminer->selectOrderProcess($fields, $indexes);
28
  $limit = $adminer->selectLimitProcess();
 
 
 
 
29
 
30
  if ($_GET["val"] && is_ajax()) {
31
  header("Content-Type: text/plain; charset=utf-8");
41
  exit;
42
  }
43
 
44
+ $primary = $unselected = null;
45
+ foreach ($indexes as $index) {
46
+ if ($index["type"] == "PRIMARY") {
47
+ $primary = array_flip($index["columns"]);
48
+ $unselected = ($select ? $primary : array());
49
+ foreach ($unselected as $key => $val) {
50
+ if (in_array(idf_escape($key), $select)) {
51
+ unset($unselected[$key]);
52
+ }
53
+ }
54
+ break;
55
+ }
56
+ }
57
+ if ($oid && !$primary) {
58
+ $primary = $unselected = array($oid => 0);
59
+ $indexes[] = array("type" => "PRIMARY", "columns" => array($oid));
60
+ }
61
+
62
  if ($_POST && !$error) {
63
  $where_check = $where;
64
  if (!$_POST["all"] && is_array($_POST["check"])) {
69
  $where_check[] = "((" . implode(") OR (", $checks) . "))";
70
  }
71
  $where_check = ($where_check ? "\nWHERE " . implode(" AND ", $where_check) : "");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  if ($_POST["export"]) {
73
  cookie("adminer_import", "output=" . urlencode($_POST["output"]) . "&format=" . urlencode($_POST["format"]));
74
  dump_headers($TABLE);
75
  $adminer->dumpTable($TABLE, "");
76
+ $from = ($select ? implode(", ", $select) : "*")
77
+ . convert_fields($columns, $fields, $select)
78
+ . "\nFROM " . table($TABLE);
79
+ $group_by = ($group && $is_group ? "\nGROUP BY " . implode(", ", $group) : "") . ($order ? "\nORDER BY " . implode(", ", $order) : "");
80
+ if (!is_array($_POST["check"]) || $primary) {
81
  $query = "SELECT $from$where_check$group_by";
82
  } else {
83
  $union = array();
108
  if ($_POST["clone"]) {
109
  $query = "INTO " . table($TABLE) . " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . table($TABLE);
110
  }
111
+ if ($_POST["all"] || ($primary && is_array($_POST["check"])) || $is_group) {
112
  $result = ($_POST["delete"]
113
  ? $driver->delete($TABLE, $where_check)
114
  : ($_POST["clone"]
124
  $result = ($_POST["delete"]
125
  ? $driver->delete($TABLE, $where2, 1)
126
  : ($_POST["clone"]
127
+ ? queries("INSERT" . limit1($TABLE, $query, $where2))
128
+ : $driver->update($TABLE, $set, $where2, 1)
129
  )
130
  );
131
  if (!$result) {
165
  $TABLE,
166
  $set,
167
  " WHERE " . ($where ? implode(" AND ", $where) . " AND " : "") . where_check($unique_idf, $fields),
168
+ !$is_group && !$primary,
169
  " "
170
  );
171
  if (!$result) {
226
  if (isset($rights["insert"]) || !support("table")) {
227
  $set = "";
228
  foreach ((array) $_GET["where"] as $val) {
229
+ if ($foreign_keys[$val["col"]] && count($foreign_keys[$val["col"]]) == 1 && ($val["op"] == "="
230
  || (!$val["op"] && !preg_match('~[_%]~', $val["val"])) // LIKE in Editor
231
  )) {
232
  $set .= "&set" . urlencode("[" . bracket_escape($val["col"]) . "]") . "=" . urlencode($val["val"]);
259
  }
260
 
261
  $select2 = $select;
262
+ $group2 = $group;
263
  if (!$select2) {
264
  $select2[] = "*";
265
+ $convert_fields = convert_fields($columns, $fields, $select);
266
+ if ($convert_fields) {
267
+ $select2[] = substr($convert_fields, 2);
268
+ }
269
+ }
270
+ foreach ($select as $key => $val) {
271
+ $field = $fields[idf_unescape($val)];
272
+ if ($field && ($as = convert_field($field))) {
273
+ $select2[$key] = "$as AS $val";
274
  }
275
  }
276
+ if (!$is_group && $unselected) {
277
+ foreach ($unselected as $key => $val) {
278
+ $select2[] = idf_escape($key);
279
+ if ($group2) {
280
+ $group2[] = idf_escape($key);
281
+ }
282
+ }
283
  }
284
+ $result = $driver->select($TABLE, $select2, $where, $group2, $order, $limit, $page, true);
285
 
286
  if (!$result) {
287
  echo "<p class='error'>" . error() . "\n";
300
  }
301
 
302
  // use count($rows) without LIMIT, COUNT(*) without grouping, FOUND_ROWS otherwise (slowest)
303
+ if ($_GET["page"] != "last" && $limit != "" && $group && $is_group && $jush == "sql") {
304
  $found_rows = $connection->result(" SELECT FOUND_ROWS()"); // space to allow mysql.trace_mode
305
  }
306
 
309
  } else {
310
  $backward_keys = $adminer->backwardKeys($TABLE, $table_name);
311
 
312
+ echo "<table id='table' cellspacing='0' class='nowrap checkable'>";
313
+ echo script("mixin(qs('#table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true), onkeydown: editingKeydown});");
314
+ echo "<thead><tr>" . (!$group && $select
315
+ ? ""
316
+ : "<td><input type='checkbox' id='all-page' class='jsonly'>" . script("qs('#all-page').onclick = partial(formCheck, /check/);", "")
317
+ . " <a href='" . h($_GET["modify"] ? remove_from_uri("modify") : $_SERVER["REQUEST_URI"] . "&modify=1") . "'>" . lang('Modify') . "</a>");
318
  $names = array();
319
  $functions = array();
320
  reset($select);
321
  $rank = 1;
322
  foreach ($rows[0] as $key => $val) {
323
+ if (!isset($unselected[$key])) {
324
  $val = $_GET["columns"][key($select)];
325
  $field = $fields[$select ? ($val ? $val["col"] : current($select)) : $key];
326
  $name = ($field ? $adminer->fieldName($field, $rank) : ($val["fun"] ? "*" : $key));
330
  $column = idf_escape($key);
331
  $href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
332
  $desc = "&desc%5B0%5D=1";
333
+ echo "<th>" . script("mixin(qsl('th'), {onmouseover: partial(columnMouse), onmouseout: partial(columnMouse, ' hidden')});", "");
334
  echo '<a href="' . h($href . ($order[0] == $column || $order[0] == $key || (!$order && $is_group && $group[0] == $column) ? $desc : '')) . '">'; // $order[0] == $key - COUNT(*)
335
  echo apply_sql_function($val["fun"], $name) . "</a>"; //! columns looking like functions
336
  echo "<span class='column hidden'>";
337
  echo "<a href='" . h($href . $desc) . "' title='" . lang('descending') . "' class='text'> ↓</a>";
338
  if (!$val["fun"]) {
339
+ echo '<a href="#fieldset-search" title="' . lang('Search') . '" class="text jsonly"> =</a>';
340
+ echo script("qsl('a').onclick = partial(selectSearch, '" . js_escape($key) . "');");
341
  }
342
  echo "</span>";
343
  }
376
  }
377
  $unique_idf = "";
378
  foreach ($unique_array as $key => $val) {
379
+ if (($jush == "sql" || $jush == "pgsql") && preg_match('~char|text|enum|set~', $fields[$key]["type"]) && strlen($val) > 64) {
380
  $key = (strpos($key, '(') ? $key : idf_escape($key)); //! columns looking like functions
381
+ $key = "MD5(" . ($jush != 'sql' || preg_match("~^utf8~", $fields[$key]["collation"]) ? $key : "CONVERT($key USING " . charset($connection) . ")") . ")";
382
  $val = md5($val);
383
  }
384
  $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key));
385
  }
386
+ echo "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>"
387
+ . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]))
388
+ . ($is_group || information_schema(DB) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "' class='edit'>" . lang('edit') . "</a>")
389
+ );
390
 
391
  foreach ($row as $key => $val) {
392
  if (isset($names[$key])) {
393
  $field = $fields[$key];
394
+ $val = $driver->value($val, $field);
395
  if ($val != "" && (!isset($email_fields[$key]) || $email_fields[$key] != "")) {
396
  $email_fields[$key] = (is_mail($val) ? $names[$key] : ""); //! filled e-mails can be contained on other pages
397
  }
440
  echo "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>");
441
  } else {
442
  $long = strpos($val, "<i>...</i>");
443
+ echo "<td id='$id' data-text='" . ($long ? 2 : ($text ? 1 : 0)) . "'"
444
+ . ($editable ? "" : " data-warning='" . h(lang('Use edit link to modify this value.')) . "'")
445
+ . ">$val</td>"
446
+ ;
447
  }
448
  }
449
  }
461
  echo "</table>\n";
462
  }
463
 
464
+ if (!is_ajax()) {
465
+ if ($rows || $page) {
466
+ $exact_count = true;
467
+ if ($_GET["page"] != "last") {
468
+ if ($limit == "" || (count($rows) < $limit && ($rows || !$page))) {
469
+ $found_rows = ($page ? $page * $limit : 0) + count($rows);
470
+ } elseif ($jush != "sql" || !$is_group) {
471
+ $found_rows = ($is_group ? false : found_rows($table_status, $where));
472
+ if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) {
473
+ // slow with big tables
474
+ $found_rows = reset(slow_query(count_rows($TABLE, $where, $is_group, $group)));
475
+ } else {
476
+ $exact_count = false;
477
+ }
478
  }
479
  }
 
480
 
481
+ $pagination = ($limit != "" && ($found_rows === false || $found_rows > $limit || $page));
482
+ if ($pagination) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit
484
+ ? '<p><a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" class="loadmore">' . lang('Load more data') . '</a>'
485
+ . script("qsl('a').onclick = partial(selectLoadMore, " . (+$limit) . ", '" . lang('Loading') . "...');", "")
486
  : ''
487
  );
488
+ echo "\n";
 
 
 
 
489
  }
490
  }
491
+
492
+ echo "<div class='footer'><div>\n";
493
+ if ($rows || $page) {
494
+ if ($pagination) {
495
+ // display first, previous 4, next 4 and last page
496
+ $max_page = ($found_rows === false
497
+ ? $page + (count($rows) >= $limit ? 2 : 1)
498
+ : floor(($found_rows - 1) / $limit)
499
+ );
500
+ echo "<fieldset>";
501
+ if ($jush != "simpledb") {
502
+ echo "<legend><a href='" . h(remove_from_uri("page")) . "'>" . lang('Page') . "</a></legend>";
503
+ echo script("qsl('a').onclick = function () { pageClick(this.href, +prompt('" . lang('Page') . "', '" . ($page + 1) . "')); return false; };");
504
+ echo pagination(0, $page) . ($page > 5 ? " ..." : "");
505
+ for ($i = max(1, $page - 4); $i < min($max_page, $page + 5); $i++) {
506
+ echo pagination($i, $page);
507
+ }
508
+ if ($max_page > 0) {
509
+ echo ($page + 5 < $max_page ? " ..." : "");
510
+ echo ($exact_count && $found_rows !== false
511
+ ? pagination($max_page, $page)
512
+ : " <a href='" . h(remove_from_uri("page") . "&page=last") . "' title='~$max_page'>" . lang('last') . "</a>"
513
+ );
514
+ }
515
+ } else {
516
+ echo "<legend>" . lang('Page') . "</legend>";
517
+ echo pagination(0, $page) . ($page > 1 ? " ..." : "");
518
+ echo ($page ? pagination($page, $page) : "");
519
+ echo ($max_page > $page ? pagination($page + 1, $page) . ($max_page > $page + 1 ? " ..." : "") : "");
520
+ }
521
+ echo "</fieldset>\n";
522
+ }
523
+
524
+ echo "<fieldset>";
525
+ echo "<legend>" . lang('Whole result') . "</legend>";
526
+ $display_rows = ($exact_count ? "" : "~ ") . $found_rows;
527
+ echo checkbox("all", 1, 0, ($found_rows !== false ? ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) : ""), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n";
528
+ echo "</fieldset>\n";
529
+
530
+ if ($adminer->selectCommandPrint()) {
531
+ ?>
532
  <fieldset<?php echo ($_GET["modify"] ? '' : ' class="jsonly"'); ?>><legend><?php echo lang('Modify'); ?></legend><div>
533
  <input type="submit" value="<?php echo lang('Save'); ?>"<?php echo ($_GET["modify"] ? '' : ' title="' . lang('Ctrl+click on a value to modify it.') . '"'); ?>>
534
  </div></fieldset>
535
  <fieldset><legend><?php echo lang('Selected'); ?> <span id="selected"></span></legend><div>
536
  <input type="submit" name="edit" value="<?php echo lang('Edit'); ?>">
537
  <input type="submit" name="clone" value="<?php echo lang('Clone'); ?>">
538
+ <input type="submit" name="delete" value="<?php echo lang('Delete'); ?>"><?php echo confirm(); ?>
539
  </div></fieldset>
540
  <?php
541
+ }
542
 
543
+ $format = $adminer->dumpFormat();
544
+ foreach ((array) $_GET["columns"] as $column) {
545
+ if ($column["fun"]) {
546
+ unset($format['sql']);
547
+ break;
548
+ }
549
  }
550
+ if ($format) {
551
+ print_fieldset("export", lang('Export') . " <span id='selected2'></span>");
552
+ $output = $adminer->dumpOutput();
553
+ echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : "");
554
+ echo html_select("format", $format, $adminer_import["format"]);
555
+ echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
556
+ echo "</div></fieldset>\n";
557
+ }
558
+
559
+ $adminer->selectEmailPrint(array_filter($email_fields, 'strlen'), $columns);
560
  }
561
 
562
+ echo "</div></div>\n";
563
+
564
+ if ($adminer->selectImportPrint()) {
565
+ echo "<div>";
566
+ echo "<a href='#import'>" . lang('Import') . "</a>";
567
+ echo script("qsl('a').onclick = partial(toggle, 'import');", "");
568
+ echo "<span id='import' class='hidden'>: ";
569
+ echo "<input type='file' name='csv_file'> ";
570
+ echo html_select("separator", array("csv" => "CSV,", "csv;" => "CSV;", "tsv" => "TSV"), $adminer_import["format"], 1); // 1 - select
571
+ echo " <input type='submit' name='import' value='" . lang('Import') . "'>";
572
+ echo "</span>";
573
+ echo "</div>";
574
+ }
575
 
576
+ echo "<input type='hidden' name='token' value='$token'>\n";
577
+ echo "</form>\n";
578
+ echo (!$group && $select ? "" : script("tableCheck();"));
 
 
 
579
  }
 
 
 
 
 
580
  }
581
  }
582
 
adminer/adminer/adminer/sequence.inc.php CHANGED
@@ -28,7 +28,7 @@ if (!$row) {
28
  <input type="submit" value="<?php echo lang('Save'); ?>">
29
  <?php
30
  if ($SEQUENCE != "") {
31
- echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n";
32
  }
33
  ?>
34
  <input type="hidden" name="token" value="<?php echo $token; ?>">
28
  <input type="submit" value="<?php echo lang('Save'); ?>">
29
  <?php
30
  if ($SEQUENCE != "") {
31
+ echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $SEQUENCE)) . "\n";
32
  }
33
  ?>
34
  <input type="hidden" name="token" value="<?php echo $token; ?>">
adminer/adminer/adminer/sql.inc.php CHANGED
@@ -21,9 +21,10 @@ if (!$error && $_POST) {
21
  if (!isset($_GET["import"])) {
22
  $query = $_POST["query"];
23
  } elseif ($_POST["webfile"]) {
24
- $fp = @fopen((file_exists("adminer.sql")
25
- ? "adminer.sql"
26
- : "compress.zlib://adminer.sql.gz"
 
27
  ), "rb");
28
  $query = ($fp ? fread($fp, 1e6) : false);
29
  } else {
@@ -116,9 +117,6 @@ if (!$error && $_POST) {
116
 
117
  do {
118
  $result = $connection->store_result();
119
- $time = " <span class='time'>(" . format_time($start) . ")</span>"
120
- . (strlen($q) < 1000 ? " <a href='" . h(ME) . "sql=" . urlencode(trim($q)) . "'>" . lang('Edit') . "</a>" : "") // 1000 - maximum length of encoded URL in IE is 2083 characters
121
- ;
122
 
123
  if ($connection->error) {
124
  echo ($_POST["only_errors"] ? $print : "");
@@ -128,41 +126,54 @@ if (!$error && $_POST) {
128
  break 2;
129
  }
130
 
131
- } elseif (is_object($result)) {
132
- $limit = $_POST["limit"];
133
- $orgtables = select($result, $connection2, array(), $limit);
134
- if (!$_POST["only_errors"]) {
135
- echo "<form action='' method='post'>\n";
136
- $num_rows = $result->num_rows;
137
- echo "<p>" . ($num_rows ? ($limit && $num_rows > $limit ? lang('%d / ', $limit) : "") . lang('%d row(s)', $num_rows) : "");
138
- echo $time;
139
- $id = "export-$commands";
140
- $export = ", <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('Export') . "</a><span id='$id' class='hidden'>: "
141
- . html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " "
142
- . html_select("format", $dump_format, $adminer_export["format"])
143
- . "<input type='hidden' name='query' value='" . h($q) . "'>"
144
- . " <input type='submit' name='export' value='" . lang('Export') . "'><input type='hidden' name='token' value='$token'></span>\n"
145
- ;
146
- if ($connection2 && preg_match("~^($space|\\()*+SELECT\\b~i", $q) && ($explain = explain($connection2, $q))) {
147
- $id = "explain-$commands";
148
- echo ", <a href='#$id' onclick=\"return !toggle('$id');\">EXPLAIN</a>$export";
149
- echo "<div id='$id' class='hidden'>\n";
150
- select($explain, $connection2, $orgtables);
151
- echo "</div>\n";
152
- } else {
153
- echo $export;
154
- }
155
- echo "</form>\n";
156
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
- } else {
159
- if (preg_match("~^$space*+(CREATE|DROP|ALTER)$space++(DATABASE|SCHEMA)\\b~i", $q)) {
160
- restart_session();
161
- set_session("dbs", null); // clear cache
162
- stop_session();
 
 
 
 
163
  }
164
- if (!$_POST["only_errors"]) {
165
- echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $connection->affected_rows) . "$time\n";
 
 
 
166
  }
167
  }
168
 
@@ -208,7 +219,7 @@ if (!isset($_GET["import"])) {
208
  }
209
  echo "<p>";
210
  textarea("query", $q, 20);
211
- echo ($_POST ? "" : "<script type='text/javascript'>document.getElementsByTagName('textarea')[0].focus();</script>\n");
212
  echo "<p>$execute\n";
213
  echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n";
214
 
@@ -220,7 +231,7 @@ if (!isset($_GET["import"])) {
220
  );
221
  echo "</div></fieldset>\n";
222
  echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
223
- echo lang('Webserver file %s', "<code>adminer.sql" . (extension_loaded("zlib") ? "[.gz]" : "") . "</code>");
224
  echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
225
  echo "</div></fieldset>\n";
226
  echo "<p>";
21
  if (!isset($_GET["import"])) {
22
  $query = $_POST["query"];
23
  } elseif ($_POST["webfile"]) {
24
+ $sql_file_path = $adminer->importServerPath();
25
+ $fp = @fopen((file_exists($sql_file_path)
26
+ ? $sql_file_path
27
+ : "compress.zlib://$sql_file_path.gz"
28
  ), "rb");
29
  $query = ($fp ? fread($fp, 1e6) : false);
30
  } else {
117
 
118
  do {
119
  $result = $connection->store_result();
 
 
 
120
 
121
  if ($connection->error) {
122
  echo ($_POST["only_errors"] ? $print : "");
126
  break 2;
127
  }
128
 
129
+ } else {
130
+ $time = " <span class='time'>(" . format_time($start) . ")</span>"
131
+ . (strlen($q) < 1000 ? " <a href='" . h(ME) . "sql=" . urlencode(trim($q)) . "'>" . lang('Edit') . "</a>" : "") // 1000 - maximum length of encoded URL in IE is 2083 characters
132
+ ;
133
+ $affected = $connection->affected_rows; // getting warnigns overwrites this
134
+ $warnings = ($_POST["only_errors"] ? "" : $driver->warnings());
135
+ $warnings_id = "warnings-$commands";
136
+ if ($warnings) {
137
+ $time .= ", <a href='#$warnings_id'>" . lang('Warnings') . "</a>" . script("qsl('a').onclick = partial(toggle, '$warnings_id');", "");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
139
+ $explain = null;
140
+ $explain_id = "explain-$commands";
141
+ if (is_object($result)) {
142
+ $limit = $_POST["limit"];
143
+ $orgtables = select($result, $connection2, array(), $limit);
144
+ if (!$_POST["only_errors"]) {
145
+ echo "<form action='' method='post'>\n";
146
+ $num_rows = $result->num_rows;
147
+ echo "<p>" . ($num_rows ? ($limit && $num_rows > $limit ? lang('%d / ', $limit) : "") . lang('%d row(s)', $num_rows) : "");
148
+ echo $time;
149
+ if ($connection2 && preg_match("~^($space|\\()*+SELECT\\b~i", $q) && ($explain = explain($connection2, $q))) {
150
+ echo ", <a href='#$explain_id'>Explain</a>" . script("qsl('a').onclick = partial(toggle, '$explain_id');", "");
151
+ }
152
+ $id = "export-$commands";
153
+ echo ", <a href='#$id'>" . lang('Export') . "</a>" . script("qsl('a').onclick = partial(toggle, '$id');", "") . "<span id='$id' class='hidden'>: "
154
+ . html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " "
155
+ . html_select("format", $dump_format, $adminer_export["format"])
156
+ . "<input type='hidden' name='query' value='" . h($q) . "'>"
157
+ . " <input type='submit' name='export' value='" . lang('Export') . "'><input type='hidden' name='token' value='$token'></span>\n"
158
+ . "</form>\n"
159
+ ;
160
+ }
161
 
162
+ } else {
163
+ if (preg_match("~^$space*+(CREATE|DROP|ALTER)$space++(DATABASE|SCHEMA)\\b~i", $q)) {
164
+ restart_session();
165
+ set_session("dbs", null); // clear cache
166
+ stop_session();
167
+ }
168
+ if (!$_POST["only_errors"]) {
169
+ echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $affected) . "$time\n";
170
+ }
171
  }
172
+ echo ($warnings ? "<div id='$warnings_id' class='hidden'>\n$warnings</div>\n" : "");
173
+ if ($explain) {
174
+ echo "<div id='$explain_id' class='hidden'>\n";
175
+ select($explain, $connection2, $orgtables);
176
+ echo "</div>\n";
177
  }
178
  }
179
 
219
  }
220
  echo "<p>";
221
  textarea("query", $q, 20);
222
+ echo ($_POST ? "" : script("qs('textarea').focus();"));
223
  echo "<p>$execute\n";
224
  echo lang('Limit rows') . ": <input type='number' name='limit' class='size' value='" . h($_POST ? $_POST["limit"] : $_GET["limit"]) . "'>\n";
225
 
231
  );
232
  echo "</div></fieldset>\n";
233
  echo "<fieldset><legend>" . lang('From server') . "</legend><div>";
234
+ echo lang('Webserver file %s', "<code>" . h($adminer->importServerPath()) . (extension_loaded("zlib") ? "[.gz]" : "") . "</code>");
235
  echo ' <input type="submit" name="webfile" value="' . lang('Run file') . '">';
236
  echo "</div></fieldset>\n";
237
  echo "<p>";
adminer/adminer/adminer/sqlite.php CHANGED
@@ -2,7 +2,7 @@
2
  function adminer_object() {
3
  include_once "../plugins/plugin.php";
4
  include_once "../plugins/login-sqlite.php";
5
- return new AdminerPlugin(array(new AdminerLoginSqlite));
6
  }
7
 
8
  include "./index.php";
2
  function adminer_object() {
3
  include_once "../plugins/plugin.php";
4
  include_once "../plugins/login-sqlite.php";
5
+ return new AdminerPlugin(array(new AdminerLoginSqlite("admin", password_hash("", PASSWORD_DEFAULT))));
6
  }
7
 
8
  include "./index.php";
adminer/adminer/adminer/static/default.css CHANGED
@@ -10,11 +10,11 @@ h2 { font-size: 150%; margin: 0 0 20px -18px; padding: .8em 1em; border-bottom:
10
  h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; }
11
  form { margin: 0; }
12
  td table { width: 100%; margin: 0; }
13
- table { margin: 1em 20px 0 0; border: 0; border-top: 1px solid #999; border-left: 1px solid #999; font-size: 90%; }
14
- td, th { border: 0; border-right: 1px solid #999; border-bottom: 1px solid #999; padding: .2em .3em; }
15
  th { background: #eee; text-align: left; }
16
  thead th { text-align: center; padding: .2em .5em; }
17
- thead td, thead th { background: #ddf; }
18
  fieldset { display: inline; vertical-align: top; padding: .5em .8em; margin: .8em .5em 0 0; border: 1px solid #999; }
19
  p { margin: .8em 20px 0 0; }
20
  img { vertical-align: middle; border: 0; }
@@ -23,7 +23,7 @@ code { background: #eee; }
23
  tbody tr:hover td, tbody tr:hover th { background: #eee; }
24
  pre { margin: 1em 0 0; }
25
  pre, textarea { font: 100%/1.25 monospace; }
26
- input[type=image] { vertical-align: middle; }
27
  input.default { box-shadow: 1px 1px 1px #777; }
28
  input.required { box-shadow: 1px 1px 1px red; }
29
  input.maxlength { box-shadow: 1px 1px 1px red; }
@@ -32,11 +32,12 @@ input.wayoff { left: -1000px; position: absolute; }
32
  .version { color: #777; font-size: 67%; }
33
  .js .hidden, .nojs .jsonly { display: none; }
34
  .js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; }
35
- .nowrap td, .nowrap th, td.nowrap { white-space: pre; }
36
  .wrap td { white-space: normal; }
37
  .error { color: red; background: #fee; }
38
  .error b { background: #fff; font-weight: normal; }
39
  .message { color: green; background: #efe; }
 
40
  .error, .message { padding: .5em .8em; margin: 1em 20px 0 0; }
41
  .char { color: #007F00; }
42
  .date { color: #7F007F; }
@@ -57,10 +58,13 @@ input.wayoff { left: -1000px; position: absolute; }
57
  .icon:hover { background-color: red; }
58
  .size { width: 6ex; }
59
  .help { cursor: help; }
60
- .pages { position: fixed; bottom: 0; left: 21em; padding: 5px; background: #ddf; border: 1px solid #999; }
 
 
61
  .links a { white-space: nowrap; margin-right: 20px; }
62
  .logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
63
  .loadmore { margin-left: 1ex; }
 
64
  #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; }
65
  #menu p, #tables { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
66
  #tables li{ list-style: none; }
10
  h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; }
11
  form { margin: 0; }
12
  td table { width: 100%; margin: 0; }
13
+ table { margin: 1em 20px 0 0; border-collapse: collapse; font-size: 90%; }
14
+ td, th { border: 1px solid #999; padding: .2em .3em; }
15
  th { background: #eee; text-align: left; }
16
  thead th { text-align: center; padding: .2em .5em; }
17
+ thead td, thead th { background: #ddf; } /* position: sticky; causes Firefox to lose borders */
18
  fieldset { display: inline; vertical-align: top; padding: .5em .8em; margin: .8em .5em 0 0; border: 1px solid #999; }
19
  p { margin: .8em 20px 0 0; }
20
  img { vertical-align: middle; border: 0; }
23
  tbody tr:hover td, tbody tr:hover th { background: #eee; }
24
  pre { margin: 1em 0 0; }
25
  pre, textarea { font: 100%/1.25 monospace; }
26
+ input { vertical-align: middle; }
27
  input.default { box-shadow: 1px 1px 1px #777; }
28
  input.required { box-shadow: 1px 1px 1px red; }
29
  input.maxlength { box-shadow: 1px 1px 1px red; }
32
  .version { color: #777; font-size: 67%; }
33
  .js .hidden, .nojs .jsonly { display: none; }
34
  .js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; }
35
+ .nowrap td, .nowrap th, td.nowrap, p.nowrap { white-space: pre; }
36
  .wrap td { white-space: normal; }
37
  .error { color: red; background: #fee; }
38
  .error b { background: #fff; font-weight: normal; }
39
  .message { color: green; background: #efe; }
40
+ .message table { color: #000; background: #fff; }
41
  .error, .message { padding: .5em .8em; margin: 1em 20px 0 0; }
42
  .char { color: #007F00; }
43
  .date { color: #7F007F; }
58
  .icon:hover { background-color: red; }
59
  .size { width: 6ex; }
60
  .help { cursor: help; }
61
+ .footer { position: sticky; bottom: 0; margin-right: -20px; border-top: 20px solid rgba(255, 255, 255, .7); border-image: linear-gradient(rgba(255, 255, 255, .2), #fff) 100% 0; }
62
+ .footer > div { background: #fff; padding: 0 0 .5em; }
63
+ .footer fieldset { margin-top: 0; }
64
  .links a { white-space: nowrap; margin-right: 20px; }
65
  .logout { margin-top: .5em; position: absolute; top: 0; right: 0; }
66
  .loadmore { margin-left: 1ex; }
67
+ /* .edit used in designs */
68
  #menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; }
69
  #menu p, #tables { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
70
  #tables li{ list-style: none; }
adminer/adminer/adminer/static/editing.js CHANGED
@@ -2,18 +2,25 @@
2
 
3
  /** Load syntax highlighting
4
  * @param string first three characters of database system version
 
5
  */
6
- function bodyLoad(version) {
7
  if (window.jush) {
8
- jush.create_links = ' target="_blank" rel="noreferrer"';
9
  if (version) {
10
  for (var key in jush.urls) {
11
  var obj = jush.urls;
12
  if (typeof obj[key] != 'string') {
13
  obj = obj[key];
14
  key = 0;
 
 
 
 
 
15
  }
16
  obj[key] = obj[key]
 
17
  .replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
18
  .replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
19
  ;
@@ -23,7 +30,7 @@ function bodyLoad(version) {
23
  jush.custom_links = jushLinks;
24
  }
25
  jush.highlight_tag('code', 0);
26
- var tags = document.getElementsByTagName('textarea');
27
  for (var i = 0; i < tags.length; i++) {
28
  if (/(^|\s)jush-/.test(tags[i].className)) {
29
  var pre = jush.textarea(tags[i]);
@@ -60,6 +67,15 @@ function typePassword(el, disable) {
60
  }
61
  }
62
 
 
 
 
 
 
 
 
 
 
63
 
64
 
65
  var dbCtrl;
@@ -67,45 +83,46 @@ var dbPrevious = {};
67
 
68
  /** Check if database should be opened to a new window
69
  * @param MouseEvent
70
- * @param HTMLSelectElement
71
  */
72
- function dbMouseDown(event, el) {
73
  dbCtrl = isCtrl(event);
74
- if (dbPrevious[el.name] == undefined) {
75
- dbPrevious[el.name] = el.value;
76
  }
77
  }
78
 
79
  /** Load database after selecting it
80
- * @param HTMLSelectElement
81
  */
82
- function dbChange(el) {
83
  if (dbCtrl) {
84
- el.form.target = '_blank';
85
  }
86
- el.form.submit();
87
- el.form.target = '';
88
- if (dbCtrl && dbPrevious[el.name] != undefined) {
89
- el.value = dbPrevious[el.name];
90
- dbPrevious[el.name] = undefined;
91
  }
92
  }
93
 
94
 
95
 
96
  /** Check whether the query will be executed with index
97
- * @param HTMLFormElement
98
  */
99
- function selectFieldChange(form) {
 
100
  var ok = (function () {
101
- var inputs = form.getElementsByTagName('input');
102
  for (var i=0; i < inputs.length; i++) {
103
  if (inputs[i].value && /^fulltext/.test(inputs[i].name)) {
104
  return true;
105
  }
106
  }
107
  var ok = form.limit.value;
108
- var selects = form.getElementsByTagName('select');
109
  var group = false;
110
  var columns = {};
111
  for (var i=0; i < selects.length; i++) {
@@ -171,15 +188,61 @@ function idfEscape(s) {
171
  return s.replace(/`/, '``');
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  /** Detect foreign key
175
- * @param HTMLInputElement
176
  */
177
- function editingNameChange(field) {
178
- var name = field.name.substr(0, field.name.length - 7);
179
- var type = formField(field.form, name + '[type]');
180
  var opts = type.options;
181
  var candidate; // don't select anything with ambiguous match (like column `id`)
182
- var val = field.value;
183
  for (var i = opts.length; i--; ) {
184
  var match = /(.+)`(.+)/.exec(opts[i].value);
185
  if (!match) { // common type
@@ -209,23 +272,23 @@ function editingNameChange(field) {
209
  }
210
 
211
  /** Add table row for next field
212
- * @param HTMLInputElement
213
  * @param boolean
214
- * @return boolean
 
215
  */
216
- function editingAddRow(button, focus) {
217
- var match = /(\d+)(\.\d+)?/.exec(button.name);
218
  var x = match[0] + (match[2] ? added.substr(match[2].length) : added) + '1';
219
- var row = parentTag(button, 'tr');
220
  var row2 = cloneNode(row);
221
- var tags = row.getElementsByTagName('select');
222
- var tags2 = row2.getElementsByTagName('select');
223
  for (var i=0; i < tags.length; i++) {
224
  tags2[i].name = tags[i].name.replace(/[0-9.]+/, x);
225
  tags2[i].selectedIndex = tags[i].selectedIndex;
226
  }
227
- tags = row.getElementsByTagName('input');
228
- tags2 = row2.getElementsByTagName('input');
229
  var input = tags2[0]; // IE loose tags2 after insertBefore()
230
  for (var i=0; i < tags.length; i++) {
231
  if (tags[i].name == 'auto_increment_col') {
@@ -240,59 +303,52 @@ function editingAddRow(button, focus) {
240
  tags2[i].checked = false;
241
  }
242
  }
243
- tags[0].onchange = function () {
244
- editingNameChange(tags[0]);
245
- };
246
- tags[0].onkeyup = function () {
247
- };
248
  row.parentNode.insertBefore(row2, row.nextSibling);
249
  if (focus) {
250
- input.onchange = function () {
251
- editingNameChange(input);
252
- };
253
- input.onkeyup = function () {
254
- };
255
  input.focus();
256
  }
257
  added += '0';
258
  rowCount++;
259
- return true;
260
  }
261
 
262
  /** Remove table row for field
263
- * @param HTMLInputElement
264
- * @param string
265
- * @return boolean
266
  */
267
- function editingRemoveRow(button, name) {
268
- var field = formField(button.form, button.name.replace(/[^\[]+(.+)/, name));
269
  field.parentNode.removeChild(field);
270
- parentTag(button, 'tr').style.display = 'none';
271
- return true;
272
  }
273
 
274
  /** Move table row for field
275
- * @param HTMLInputElement
276
- * @param boolean direction to move row, true for up or false for down
277
- * @return boolean
278
  */
279
- function editingMoveRow(button, dir){
280
- var row = parentTag(button, 'tr');
281
  if (!('nextElementSibling' in row)) {
282
- return false;
283
  }
284
- row.parentNode.insertBefore(row, dir
285
  ? row.previousElementSibling
286
  : row.nextElementSibling ? row.nextElementSibling.nextElementSibling : row.parentNode.firstChild);
287
- return true;
288
  }
289
 
290
  var lastType = '';
291
 
292
  /** Clear length and hide collation or unsigned
293
- * @param HTMLSelectElement
294
  */
295
- function editingTypeChange(type) {
 
296
  var name = type.name.substr(0, type.name.length - 6);
297
  var text = selectValue(type);
298
  for (var i=0; i < type.form.elements.length; i++) {
@@ -304,7 +360,7 @@ function editingTypeChange(type) {
304
  )) {
305
  el.value = '';
306
  }
307
- el.onchange.apply(el);
308
  }
309
  if (lastType == 'timestamp' && el.name == name + '[has_default]' && /timestamp/i.test(formField(type.form, name + '[default]').value)) {
310
  el.checked = false;
@@ -313,7 +369,7 @@ function editingTypeChange(type) {
313
  alterClass(el, 'hidden', !/(char|text|enum|set)$/.test(text));
314
  }
315
  if (el.name == name + '[unsigned]') {
316
- alterClass(el, 'hidden', !/((^|[^o])int|float|double|decimal)$/.test(text));
317
  }
318
  if (el.name == name + '[on_update]') {
319
  alterClass(el, 'hidden', !/timestamp|datetime/.test(text)); // MySQL supports datetime since 5.6.5
@@ -326,37 +382,37 @@ function editingTypeChange(type) {
326
  }
327
 
328
  /** Mark length as required
329
- * @param HTMLInputElement
330
  */
331
- function editingLengthChange(el) {
332
- alterClass(el, 'required', !el.value.length && /var(char|binary)$/.test(selectValue(el.parentNode.previousSibling.firstChild)));
333
  }
334
 
335
  /** Edit enum or set
336
- * @param HTMLInputElement
337
  */
338
- function editingLengthFocus(field) {
339
- var td = field.parentNode;
340
  if (/(enum|set)$/.test(selectValue(td.previousSibling.firstChild))) {
341
- var edit = document.getElementById('enum-edit');
342
- var val = field.value;
343
  edit.value = (/^'.+'$/.test(val) ? val.substr(1, val.length - 2).replace(/','/g, "\n").replace(/''/g, "'") : val); //! doesn't handle 'a'',''b' correctly
344
  td.appendChild(edit);
345
- field.style.display = 'none';
346
  edit.style.display = 'inline';
347
  edit.focus();
348
  }
349
  }
350
 
351
  /** Finish editing of enum or set
352
- * @param HTMLTextAreaElement
353
  */
354
- function editingLengthBlur(edit) {
355
- var field = edit.parentNode.firstChild;
356
- var val = edit.value;
357
- field.value = (/^'[^\n]+'$/.test(val) ? val : "'" + val.replace(/\n+$/, '').replace(/'/g, "''").replace(/\n/g, "','") + "'");
358
  field.style.display = 'inline';
359
- edit.style.display = 'none';
360
  }
361
 
362
  /** Show or hide selected table column
@@ -364,9 +420,9 @@ function editingLengthBlur(edit) {
364
  * @param number
365
  */
366
  function columnShow(checked, column) {
367
- var trs = document.getElementById('edit-fields').getElementsByTagName('tr');
368
  for (var i=0; i < trs.length; i++) {
369
- alterClass(trs[i].getElementsByTagName('td')[column], 'hidden', !checked);
370
  }
371
  }
372
 
@@ -374,76 +430,106 @@ function columnShow(checked, column) {
374
  */
375
  function editingHideDefaults() {
376
  if (innerWidth < document.documentElement.scrollWidth) {
377
- document.getElementById('form')['defaults'].checked = false;
378
- columnShow(false, 5);
379
  }
380
  }
381
 
382
  /** Display partition options
383
- * @param HTMLSelectElement
384
  */
385
- function partitionByChange(el) {
386
- var partitionTable = /RANGE|LIST/.test(selectValue(el));
387
- alterClass(el.form['partitions'], 'hidden', partitionTable || !el.selectedIndex);
388
- alterClass(document.getElementById('partition-table'), 'hidden', !partitionTable);
389
  helpClose();
390
  }
391
 
392
  /** Add next partition row
393
- * @param HTMLInputElement
394
  */
395
- function partitionNameChange(el) {
396
- var row = cloneNode(parentTag(el, 'tr'));
397
  row.firstChild.firstChild.value = '';
398
- parentTag(el, 'table').appendChild(row);
399
- el.onchange = function () {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  }
401
 
402
 
403
 
404
  /** Add row for foreign key
405
- * @param HTMLSelectElement
406
  */
407
- function foreignAddRow(field) {
408
- field.onchange = function () { };
409
- var row = cloneNode(parentTag(field, 'tr'));
410
- var selects = row.getElementsByTagName('select');
411
  for (var i=0; i < selects.length; i++) {
412
  selects[i].name = selects[i].name.replace(/\]/, '1$&');
413
  selects[i].selectedIndex = 0;
414
  }
415
- parentTag(field, 'table').appendChild(row);
416
  }
417
 
418
 
419
 
420
  /** Add row for indexes
421
- * @param HTMLSelectElement
422
  */
423
- function indexesAddRow(field) {
424
- field.onchange = function () { };
425
- var row = cloneNode(parentTag(field, 'tr'));
426
- var selects = row.getElementsByTagName('select');
427
  for (var i=0; i < selects.length; i++) {
428
  selects[i].name = selects[i].name.replace(/indexes\[\d+/, '$&1');
429
  selects[i].selectedIndex = 0;
430
  }
431
- var inputs = row.getElementsByTagName('input');
432
  for (var i=0; i < inputs.length; i++) {
433
  inputs[i].name = inputs[i].name.replace(/indexes\[\d+/, '$&1');
434
  inputs[i].value = '';
435
  }
436
- parentTag(field, 'table').appendChild(row);
437
  }
438
 
439
  /** Change column in index
440
- * @param HTMLSelectElement
441
  * @param string name prefix
 
442
  */
443
- function indexesChangeColumn(field, prefix) {
444
  var names = [];
445
  for (var tag in { 'select': 1, 'input': 1 }) {
446
- var columns = parentTag(field, 'td').getElementsByTagName(tag);
447
  for (var i=0; i < columns.length; i++) {
448
  if (/\[columns\]/.test(columns[i].name)) {
449
  var value = selectValue(columns[i]);
@@ -453,17 +539,15 @@ function indexesChangeColumn(field, prefix) {
453
  }
454
  }
455
  }
456
- field.form[field.name.replace(/\].*/, '][name]')].value = prefix + names.join('_');
457
  }
458
 
459
  /** Add column for index
460
- * @param HTMLSelectElement
461
  * @param string name prefix
 
462
  */
463
- function indexesAddColumn(field, prefix) {
464
- field.onchange = function () {
465
- indexesChangeColumn(field, prefix);
466
- };
467
  var select = field.form[field.name.replace(/\].*/, '][type]')];
468
  if (!select.selectedIndex) {
469
  while (selectValue(select) != "INDEX" && select.selectedIndex < select.options.length) {
@@ -472,13 +556,14 @@ function indexesAddColumn(field, prefix) {
472
  select.onchange();
473
  }
474
  var column = cloneNode(field.parentNode);
475
- var selects = column.getElementsByTagName('select');
476
  for (var i = 0; i < selects.length; i++) {
477
  select = selects[i];
478
  select.name = select.name.replace(/\]\[\d+/, '$&1');
479
  select.selectedIndex = 0;
480
  }
481
- var inputs = column.getElementsByTagName('input');
 
482
  for (var i = 0; i < inputs.length; i++) {
483
  var input = inputs[i];
484
  input.name = input.name.replace(/\]\[\d+/, '$&1');
@@ -510,48 +595,47 @@ function triggerChange(tableRe, table, form) {
510
  var that, x, y; // em and tablePos defined in schema.inc.php
511
 
512
  /** Get mouse position
513
- * @param HTMLElement
514
  * @param MouseEvent
 
515
  */
516
- function schemaMousedown(el, event) {
517
  if ((event.which ? event.which : event.button) == 1) {
518
- that = el;
519
- x = event.clientX - el.offsetLeft;
520
- y = event.clientY - el.offsetTop;
521
  }
522
  }
523
 
524
  /** Move object
525
  * @param MouseEvent
526
  */
527
- function schemaMousemove(ev) {
528
  if (that !== undefined) {
529
- ev = ev || event;
530
- var left = (ev.clientX - x) / em;
531
- var top = (ev.clientY - y) / em;
532
- var divs = that.getElementsByTagName('div');
533
  var lineSet = { };
534
  for (var i=0; i < divs.length; i++) {
535
  if (divs[i].className == 'references') {
536
- var div2 = document.getElementById((/^refs/.test(divs[i].id) ? 'refd' : 'refs') + divs[i].id.substr(4));
537
  var ref = (tablePos[divs[i].title] ? tablePos[divs[i].title] : [ div2.parentNode.offsetTop / em, 0 ]);
538
  var left1 = -1;
539
  var id = divs[i].id.replace(/^ref.(.+)-.+/, '$1');
540
  if (divs[i].parentNode != div2.parentNode) {
541
  left1 = Math.min(0, ref[1] - left) - 1;
542
  divs[i].style.left = left1 + 'em';
543
- divs[i].getElementsByTagName('div')[0].style.width = -left1 + 'em';
544
  var left2 = Math.min(0, left - ref[1]) - 1;
545
  div2.style.left = left2 + 'em';
546
- div2.getElementsByTagName('div')[0].style.width = -left2 + 'em';
547
  }
548
  if (!lineSet[id]) {
549
- var line = document.getElementById(divs[i].id.replace(/^....(.+)-.+$/, 'refl$1'));
550
  var top1 = top + divs[i].offsetTop / em;
551
  var top2 = top + div2.offsetTop / em;
552
  if (divs[i].parentNode != div2.parentNode) {
553
  top2 += ref[0] - top;
554
- line.getElementsByTagName('div')[0].style.height = Math.abs(top1 - top2) + 'em';
555
  }
556
  line.style.left = (left + left1) + 'em';
557
  line.style.top = Math.min(top1, top2) + 'em';
@@ -568,17 +652,16 @@ function schemaMousemove(ev) {
568
  * @param MouseEvent
569
  * @param string
570
  */
571
- function schemaMouseup(ev, db) {
572
  if (that !== undefined) {
573
- ev = ev || event;
574
- tablePos[that.firstChild.firstChild.firstChild.data] = [ (ev.clientY - y) / em, (ev.clientX - x) / em ];
575
  that = undefined;
576
  var s = '';
577
  for (var key in tablePos) {
578
  s += '_' + key + ':' + Math.round(tablePos[key][0] * 10000) / 10000 + 'x' + Math.round(tablePos[key][1] * 10000) / 10000;
579
  }
580
  s = encodeURIComponent(s.substr(1));
581
- var link = document.getElementById('schema-link');
582
  link.href = link.href.replace(/[^=]+$/, '') + s;
583
  cookie('adminer_schema-' + db + '=' + s, 30); //! special chars in db
584
  }
@@ -589,18 +672,18 @@ function schemaMouseup(ev, db) {
589
  var helpOpen, helpIgnore; // when mouse outs <option> then it mouse overs border of <select> - ignore it
590
 
591
  /** Display help
592
- * @param HTMLElement
593
  * @param MouseEvent
594
  * @param string
595
  * @param bool display on left side (otherwise on top)
 
596
  */
597
- function helpMouseover(el, event, text, side) {
598
  var target = getTarget(event);
599
  if (!text) {
600
  helpClose();
601
- } else if (window.jush && (!helpIgnore || el != target)) {
602
  helpOpen = 1;
603
- var help = document.getElementById('help');
604
  help.innerHTML = text;
605
  jush.highlight_tag([ help ]);
606
  alterClass(help, 'hidden');
@@ -612,12 +695,12 @@ function helpMouseover(el, event, text, side) {
612
  }
613
 
614
  /** Close help after timeout
615
- * @param HTMLElement
616
  * @param MouseEvent
 
617
  */
618
- function helpMouseout(el, event) {
619
  helpOpen = 0;
620
- helpIgnore = (el != getTarget(event));
621
  setTimeout(function () {
622
  if (!helpOpen) {
623
  helpClose();
@@ -628,5 +711,5 @@ function helpMouseout(el, event) {
628
  /** Close help
629
  */
630
  function helpClose() {
631
- alterClass(document.getElementById('help'), 'hidden', true);
632
  }
2
 
3
  /** Load syntax highlighting
4
  * @param string first three characters of database system version
5
+ * @param [boolean]
6
  */
7
+ function bodyLoad(version, maria) {
8
  if (window.jush) {
9
+ jush.create_links = ' target="_blank" rel="noreferrer noopener"';
10
  if (version) {
11
  for (var key in jush.urls) {
12
  var obj = jush.urls;
13
  if (typeof obj[key] != 'string') {
14
  obj = obj[key];
15
  key = 0;
16
+ if (maria) {
17
+ for (var i = 1; i < obj.length; i++) {
18
+ obj[i] = obj[i].replace(/\.html/, '/');
19
+ }
20
+ }
21
  }
22
  obj[key] = obj[key]
23
+ .replace(/dev\.mysql\.com\/doc\/mysql\/en\//, (maria ? 'mariadb.com/kb/en/library/' : '$&')) // MariaDB
24
  .replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
25
  .replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
26
  ;
30
  jush.custom_links = jushLinks;
31
  }
32
  jush.highlight_tag('code', 0);
33
+ var tags = qsa('textarea', document);
34
  for (var i = 0; i < tags.length; i++) {
35
  if (/(^|\s)jush-/.test(tags[i].className)) {
36
  var pre = jush.textarea(tags[i]);
67
  }
68
  }
69
 
70
+ /** Install toggle handler
71
+ */
72
+ function messagesPrint() {
73
+ var els = qsa('.toggle', document);
74
+ for (var i = 0; i < els.length; i++) {
75
+ els[i].onclick = partial(toggle, els[i].getAttribute('href').substr(1));
76
+ }
77
+ }
78
+
79
 
80
 
81
  var dbCtrl;
83
 
84
  /** Check if database should be opened to a new window
85
  * @param MouseEvent
86
+ * @this HTMLSelectElement
87
  */
88
+ function dbMouseDown(event) {
89
  dbCtrl = isCtrl(event);
90
+ if (dbPrevious[this.name] == undefined) {
91
+ dbPrevious[this.name] = this.value;
92
  }
93
  }
94
 
95
  /** Load database after selecting it
96
+ * @this HTMLSelectElement
97
  */
98
+ function dbChange() {
99
  if (dbCtrl) {
100
+ this.form.target = '_blank';
101
  }
102
+ this.form.submit();
103
+ this.form.target = '';
104
+ if (dbCtrl && dbPrevious[this.name] != undefined) {
105
+ this.value = dbPrevious[this.name];
106
+ dbPrevious[this.name] = undefined;
107
  }
108
  }
109
 
110
 
111
 
112
  /** Check whether the query will be executed with index
113
+ * @this HTMLElement
114
  */
115
+ function selectFieldChange() {
116
+ var form = this.form;
117
  var ok = (function () {
118
+ var inputs = qsa('input', form);
119
  for (var i=0; i < inputs.length; i++) {
120
  if (inputs[i].value && /^fulltext/.test(inputs[i].name)) {
121
  return true;
122
  }
123
  }
124
  var ok = form.limit.value;
125
+ var selects = qsa('select', form);
126
  var group = false;
127
  var columns = {};
128
  for (var i=0; i < selects.length; i++) {
188
  return s.replace(/`/, '``');
189
  }
190
 
191
+
192
+
193
+ /** Handle clicks on fields editing
194
+ * @param MouseEvent
195
+ * @return boolean false to cancel action
196
+ */
197
+ function editingClick(event) {
198
+ var el = getTarget(event);
199
+ if (!isTag(el, 'input')) {
200
+ el = parentTag(target, 'label');
201
+ el = el && qs('input', el);
202
+ }
203
+ if (el) {
204
+ var name = el.name;
205
+ if (/^add\[/.test(name)) {
206
+ editingAddRow.call(el, 1);
207
+ } else if (/^up\[/.test(name)) {
208
+ editingMoveRow.call(el, 1);
209
+ } else if (/^down\[/.test(name)) {
210
+ editingMoveRow.call(el);
211
+ } else if (/^drop_col\[/.test(name)) {
212
+ editingRemoveRow.call(el, 'fields\$1[field]');
213
+ } else {
214
+ if (name == 'auto_increment_col') {
215
+ var field = el.form['fields[' + el.value + '][field]'];
216
+ if (!field.value) {
217
+ field.value = 'id';
218
+ field.oninput();
219
+ }
220
+ }
221
+ return;
222
+ }
223
+ return false;
224
+ }
225
+ }
226
+
227
+ /** Handle input on fields editing
228
+ * @param InputEvent
229
+ */
230
+ function editingInput(event) {
231
+ var el = getTarget(event);
232
+ if (/\[default\]$/.test(el.name)) {
233
+ el.previousSibling.checked = true;
234
+ }
235
+ }
236
+
237
  /** Detect foreign key
238
+ * @this HTMLInputElement
239
  */
240
+ function editingNameChange() {
241
+ var name = this.name.substr(0, this.name.length - 7);
242
+ var type = formField(this.form, name + '[type]');
243
  var opts = type.options;
244
  var candidate; // don't select anything with ambiguous match (like column `id`)
245
+ var val = this.value;
246
  for (var i = opts.length; i--; ) {
247
  var match = /(.+)`(.+)/.exec(opts[i].value);
248
  if (!match) { // common type
272
  }
273
 
274
  /** Add table row for next field
 
275
  * @param boolean
276
+ * @return boolean false
277
+ * @this HTMLInputElement
278
  */
279
+ function editingAddRow(focus) {
280
+ var match = /(\d+)(\.\d+)?/.exec(this.name);
281
  var x = match[0] + (match[2] ? added.substr(match[2].length) : added) + '1';
282
+ var row = parentTag(this, 'tr');
283
  var row2 = cloneNode(row);
284
+ var tags = qsa('select', row);
285
+ var tags2 = qsa('select', row2);
286
  for (var i=0; i < tags.length; i++) {
287
  tags2[i].name = tags[i].name.replace(/[0-9.]+/, x);
288
  tags2[i].selectedIndex = tags[i].selectedIndex;
289
  }
290
+ tags = qsa('input', row);
291
+ tags2 = qsa('input', row2);
292
  var input = tags2[0]; // IE loose tags2 after insertBefore()
293
  for (var i=0; i < tags.length; i++) {
294
  if (tags[i].name == 'auto_increment_col') {
303
  tags2[i].checked = false;
304
  }
305
  }
306
+ tags[0].oninput = editingNameChange;
 
 
 
 
307
  row.parentNode.insertBefore(row2, row.nextSibling);
308
  if (focus) {
309
+ input.oninput = editingNameChange;
 
 
 
 
310
  input.focus();
311
  }
312
  added += '0';
313
  rowCount++;
314
+ return false;
315
  }
316
 
317
  /** Remove table row for field
318
+ * @param string regular expression replacement
319
+ * @return boolean false
320
+ * @this HTMLInputElement
321
  */
322
+ function editingRemoveRow(name) {
323
+ var field = formField(this.form, this.name.replace(/[^\[]+(.+)/, name));
324
  field.parentNode.removeChild(field);
325
+ parentTag(this, 'tr').style.display = 'none';
326
+ return false;
327
  }
328
 
329
  /** Move table row for field
330
+ * @param [boolean]
331
+ * @return boolean false for success
332
+ * @this HTMLInputElement
333
  */
334
+ function editingMoveRow(up){
335
+ var row = parentTag(this, 'tr');
336
  if (!('nextElementSibling' in row)) {
337
+ return true;
338
  }
339
+ row.parentNode.insertBefore(row, up
340
  ? row.previousElementSibling
341
  : row.nextElementSibling ? row.nextElementSibling.nextElementSibling : row.parentNode.firstChild);
342
+ return false;
343
  }
344
 
345
  var lastType = '';
346
 
347
  /** Clear length and hide collation or unsigned
348
+ * @this HTMLSelectElement
349
  */
350
+ function editingTypeChange() {
351
+ var type = this;
352
  var name = type.name.substr(0, type.name.length - 6);
353
  var text = selectValue(type);
354
  for (var i=0; i < type.form.elements.length; i++) {
360
  )) {
361
  el.value = '';
362
  }
363
+ el.oninput.apply(el);
364
  }
365
  if (lastType == 'timestamp' && el.name == name + '[has_default]' && /timestamp/i.test(formField(type.form, name + '[default]').value)) {
366
  el.checked = false;
369
  alterClass(el, 'hidden', !/(char|text|enum|set)$/.test(text));
370
  }
371
  if (el.name == name + '[unsigned]') {
372
+ alterClass(el, 'hidden', !/(^|[^o])int(?!er)|numeric|real|float|double|decimal|money/.test(text));
373
  }
374
  if (el.name == name + '[on_update]') {
375
  alterClass(el, 'hidden', !/timestamp|datetime/.test(text)); // MySQL supports datetime since 5.6.5
382
  }
383
 
384
  /** Mark length as required
385
+ * @this HTMLInputElement
386
  */
387
+ function editingLengthChange() {
388
+ alterClass(this, 'required', !this.value.length && /var(char|binary)$/.test(selectValue(this.parentNode.previousSibling.firstChild)));
389
  }
390
 
391
  /** Edit enum or set
392
+ * @this HTMLInputElement
393
  */
394
+ function editingLengthFocus() {
395
+ var td = this.parentNode;
396
  if (/(enum|set)$/.test(selectValue(td.previousSibling.firstChild))) {
397
+ var edit = qs('#enum-edit');
398
+ var val = this.value;
399
  edit.value = (/^'.+'$/.test(val) ? val.substr(1, val.length - 2).replace(/','/g, "\n").replace(/''/g, "'") : val); //! doesn't handle 'a'',''b' correctly
400
  td.appendChild(edit);
401
+ this.style.display = 'none';
402
  edit.style.display = 'inline';
403
  edit.focus();
404
  }
405
  }
406
 
407
  /** Finish editing of enum or set
408
+ * @this HTMLTextAreaElement
409
  */
410
+ function editingLengthBlur() {
411
+ var field = this.parentNode.firstChild;
412
+ var val = this.value;
413
+ field.value = (/^'[^\n]+'$/.test(val) ? val : val && "'" + val.replace(/\n+$/, '').replace(/'/g, "''").replace(/\n/g, "','") + "'");
414
  field.style.display = 'inline';
415
+ this.style.display = 'none';
416
  }
417
 
418
  /** Show or hide selected table column
420
  * @param number
421
  */
422
  function columnShow(checked, column) {
423
+ var trs = qsa('tr', qs('#edit-fields'));
424
  for (var i=0; i < trs.length; i++) {
425
+ alterClass(qsa('td', trs[i])[column], 'hidden', !checked);
426
  }
427
  }
428
 
430
  */
431
  function editingHideDefaults() {
432
  if (innerWidth < document.documentElement.scrollWidth) {
433
+ qs('#form')['defaults'].checked = false;
 
434
  }
435
  }
436
 
437
  /** Display partition options
438
+ * @this HTMLSelectElement
439
  */
440
+ function partitionByChange() {
441
+ var partitionTable = /RANGE|LIST/.test(selectValue(this));
442
+ alterClass(this.form['partitions'], 'hidden', partitionTable || !this.selectedIndex);
443
+ alterClass(qs('#partition-table'), 'hidden', !partitionTable);
444
  helpClose();
445
  }
446
 
447
  /** Add next partition row
448
+ * @this HTMLInputElement
449
  */
450
+ function partitionNameChange() {
451
+ var row = cloneNode(parentTag(this, 'tr'));
452
  row.firstChild.firstChild.value = '';
453
+ parentTag(this, 'table').appendChild(row);
454
+ this.oninput = function () {};
455
+ }
456
+
457
+ /** Show or hide comment fields
458
+ * @param [boolean] whether to focus Comment if checked
459
+ * @this HTMLInputElement
460
+ */
461
+ function editingCommentsClick(focus) {
462
+ var comment = this.form['Comment'];
463
+ columnShow(this.checked, 6);
464
+ alterClass(comment, 'hidden', !this.checked);
465
+ if (focus && this.checked) {
466
+ comment.focus();
467
+ }
468
+ }
469
+
470
+
471
+
472
+ /** Uncheck 'all' checkbox
473
+ * @param MouseEvent
474
+ * @this HTMLTableElement
475
+ */
476
+ function dumpClick(event) {
477
+ var el = parentTag(getTarget(event), 'label');
478
+ if (el) {
479
+ el = qs('input', el);
480
+ var match = /(.+)\[\]$/.exec(el.name);
481
+ if (match) {
482
+ checkboxClick.call(el, event);
483
+ formUncheck('check-' + match[1]);
484
+ }
485
+ }
486
  }
487
 
488
 
489
 
490
  /** Add row for foreign key
491
+ * @this HTMLSelectElement
492
  */
493
+ function foreignAddRow() {
494
+ this.onchange = function () { };
495
+ var row = cloneNode(parentTag(this, 'tr'));
496
+ var selects = qsa('select', row);
497
  for (var i=0; i < selects.length; i++) {
498
  selects[i].name = selects[i].name.replace(/\]/, '1$&');
499
  selects[i].selectedIndex = 0;
500
  }
501
+ parentTag(this, 'table').appendChild(row);
502
  }
503
 
504
 
505
 
506
  /** Add row for indexes
507
+ * @this HTMLSelectElement
508
  */
509
+ function indexesAddRow() {
510
+ this.onchange = function () { };
511
+ var row = cloneNode(parentTag(this, 'tr'));
512
+ var selects = qsa('select', row);
513
  for (var i=0; i < selects.length; i++) {
514
  selects[i].name = selects[i].name.replace(/indexes\[\d+/, '$&1');
515
  selects[i].selectedIndex = 0;
516
  }
517
+ var inputs = qsa('input', row);
518
  for (var i=0; i < inputs.length; i++) {
519
  inputs[i].name = inputs[i].name.replace(/indexes\[\d+/, '$&1');
520
  inputs[i].value = '';
521
  }
522
+ parentTag(this, 'table').appendChild(row);
523
  }
524
 
525
  /** Change column in index
 
526
  * @param string name prefix
527
+ * @this HTMLSelectElement
528
  */
529
+ function indexesChangeColumn(prefix) {
530
  var names = [];
531
  for (var tag in { 'select': 1, 'input': 1 }) {
532
+ var columns = qsa(tag, parentTag(this, 'td'));
533
  for (var i=0; i < columns.length; i++) {
534
  if (/\[columns\]/.test(columns[i].name)) {
535
  var value = selectValue(columns[i]);
539
  }
540
  }
541
  }
542
+ this.form[this.name.replace(/\].*/, '][name]')].value = prefix + names.join('_');
543
  }
544
 
545
  /** Add column for index
 
546
  * @param string name prefix
547
+ * @this HTMLSelectElement
548
  */
549
+ function indexesAddColumn(prefix) {
550
+ var field = this;
 
 
551
  var select = field.form[field.name.replace(/\].*/, '][type]')];
552
  if (!select.selectedIndex) {
553
  while (selectValue(select) != "INDEX" && select.selectedIndex < select.options.length) {
556
  select.onchange();
557
  }
558
  var column = cloneNode(field.parentNode);
559
+ var selects = qsa('select', column);
560
  for (var i = 0; i < selects.length; i++) {
561
  select = selects[i];
562
  select.name = select.name.replace(/\]\[\d+/, '$&1');
563
  select.selectedIndex = 0;
564
  }
565
+ field.onchange = partial(indexesChangeColumn, prefix);
566
+ var inputs = qsa('input', column);
567
  for (var i = 0; i < inputs.length; i++) {
568
  var input = inputs[i];
569
  input.name = input.name.replace(/\]\[\d+/, '$&1');
595
  var that, x, y; // em and tablePos defined in schema.inc.php
596
 
597
  /** Get mouse position
 
598
  * @param MouseEvent
599
+ * @this HTMLElement
600
  */
601
+ function schemaMousedown(event) {
602
  if ((event.which ? event.which : event.button) == 1) {
603
+ that = this;
604
+ x = event.clientX - this.offsetLeft;
605
+ y = event.clientY - this.offsetTop;
606
  }
607
  }
608
 
609
  /** Move object
610
  * @param MouseEvent
611
  */
612
+ function schemaMousemove(event) {
613
  if (that !== undefined) {
614
+ var left = (event.clientX - x) / em;
615
+ var top = (event.clientY - y) / em;
616
+ var divs = qsa('div', that);
 
617
  var lineSet = { };
618
  for (var i=0; i < divs.length; i++) {
619
  if (divs[i].className == 'references') {
620
+ var div2 = qs('[id="' + (/^refs/.test(divs[i].id) ? 'refd' : 'refs') + divs[i].id.substr(4) + '"]');
621
  var ref = (tablePos[divs[i].title] ? tablePos[divs[i].title] : [ div2.parentNode.offsetTop / em, 0 ]);
622
  var left1 = -1;
623
  var id = divs[i].id.replace(/^ref.(.+)-.+/, '$1');
624
  if (divs[i].parentNode != div2.parentNode) {
625
  left1 = Math.min(0, ref[1] - left) - 1;
626
  divs[i].style.left = left1 + 'em';
627
+ divs[i].querySelector('div').style.width = -left1 + 'em';
628
  var left2 = Math.min(0, left - ref[1]) - 1;
629
  div2.style.left = left2 + 'em';
630
+ div2.querySelector('div').style.width = -left2 + 'em';
631
  }
632
  if (!lineSet[id]) {
633
+ var line = qs('[id="' + divs[i].id.replace(/^....(.+)-.+$/, 'refl$1') + '"]');
634
  var top1 = top + divs[i].offsetTop / em;
635
  var top2 = top + div2.offsetTop / em;
636
  if (divs[i].parentNode != div2.parentNode) {
637
  top2 += ref[0] - top;
638
+ line.querySelector('div').style.height = Math.abs(top1 - top2) + 'em';
639
  }
640
  line.style.left = (left + left1) + 'em';
641
  line.style.top = Math.min(top1, top2) + 'em';
652
  * @param MouseEvent
653
  * @param string
654
  */
655
+ function schemaMouseup(event, db) {
656
  if (that !== undefined) {
657
+ tablePos[that.firstChild.firstChild.firstChild.data] = [ (event.clientY - y) / em, (event.clientX - x) / em ];
 
658
  that = undefined;
659
  var s = '';
660
  for (var key in tablePos) {
661
  s += '_' + key + ':' + Math.round(tablePos[key][0] * 10000) / 10000 + 'x' + Math.round(tablePos[key][1] * 10000) / 10000;
662
  }
663
  s = encodeURIComponent(s.substr(1));
664
+ var link = qs('#schema-link');
665
  link.href = link.href.replace(/[^=]+$/, '') + s;
666
  cookie('adminer_schema-' + db + '=' + s, 30); //! special chars in db
667
  }
672
  var helpOpen, helpIgnore; // when mouse outs <option> then it mouse overs border of <select> - ignore it
673
 
674
  /** Display help
 
675
  * @param MouseEvent
676
  * @param string
677
  * @param bool display on left side (otherwise on top)
678
+ * @this HTMLElement
679
  */
680
+ function helpMouseover(event, text, side) {
681
  var target = getTarget(event);
682
  if (!text) {
683
  helpClose();
684
+ } else if (window.jush && (!helpIgnore || this != target)) {
685
  helpOpen = 1;
686
+ var help = qs('#help');
687
  help.innerHTML = text;
688
  jush.highlight_tag([ help ]);
689
  alterClass(help, 'hidden');
695
  }
696
 
697
  /** Close help after timeout
 
698
  * @param MouseEvent
699
+ * @this HTMLElement
700
  */
701
+ function helpMouseout(event) {
702
  helpOpen = 0;
703
+ helpIgnore = (this != getTarget(event));
704
  setTimeout(function () {
705
  if (!helpOpen) {
706
  helpClose();
711
  /** Close help
712
  */
713
  function helpClose() {
714
+ alterClass(qs('#help'), 'hidden', true);
715
  }
adminer/adminer/adminer/static/functions.js CHANGED
@@ -1,4 +1,67 @@
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /** Add or remove CSS class
3
  * @param HTMLElement
4
  * @param string
@@ -12,12 +75,12 @@ function alterClass(el, className, enable) {
12
 
13
  /** Toggle visibility
14
  * @param string
15
- * @return boolean
16
  */
17
  function toggle(id) {
18
- var el = document.getElementById(id);
19
  el.className = (el.className == 'hidden' ? '' : 'hidden');
20
- return true;
21
  }
22
 
23
  /** Set permanent cookie
@@ -33,8 +96,10 @@ function cookie(assign, days) {
33
 
34
  /** Verify current Adminer version
35
  * @param string
 
 
36
  */
37
- function verifyVersion(current) {
38
  cookie('adminer_version=0', 1);
39
  var iframe = document.createElement('iframe');
40
  iframe.src = 'https://www.adminer.org/version/?current=' + current;
@@ -50,11 +115,13 @@ function verifyVersion(current) {
50
  var match = /version=(.+)/.exec(event.data);
51
  if (match) {
52
  cookie('adminer_version=' + match[1], 1);
 
 
53
  }
54
  }
55
  }, false);
56
  }
57
- document.getElementById('version').appendChild(iframe);
58
  }
59
 
60
  /** Get value of select
@@ -70,20 +137,20 @@ function selectValue(select) {
70
  }
71
 
72
  /** Verify if element has a specified tag name
73
- * @param HTMLElement
74
- * @param string regular expression
75
- * @return bool
76
- */
77
  function isTag(el, tag) {
78
  var re = new RegExp('^(' + tag + ')$', 'i');
79
  return re.test(el.tagName);
80
  }
81
 
82
  /** Get parent node with specified tag name
83
- * @param HTMLElement
84
- * @param string regular expression
85
- * @return HTMLElement
86
- */
87
  function parentTag(el, tag) {
88
  while (el && !isTag(el, tag)) {
89
  el = el.parentNode;
@@ -105,27 +172,31 @@ function trCheck(el) {
105
  /** Fill number of selected items
106
  * @param string
107
  * @param string
 
108
  */
109
  function selectCount(id, count) {
110
- setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, ' ') + ')'));
111
- var inputs = document.getElementById(id).parentNode.parentNode.getElementsByTagName('input');
112
- for (var i = 0; i < inputs.length; i++) {
113
- var input = inputs[i];
114
- if (input.type == 'submit') {
115
- input.disabled = (count == '0');
 
 
 
116
  }
117
  }
118
  }
119
 
120
  /** Check all elements matching given name
121
- * @param HTMLInputElement
122
  * @param RegExp
 
123
  */
124
- function formCheck(el, name) {
125
- var elems = el.form.elements;
126
  for (var i=0; i < elems.length; i++) {
127
  if (name.test(elems[i].name)) {
128
- elems[i].checked = el.checked;
129
  trCheck(elems[i]);
130
  }
131
  }
@@ -134,10 +205,10 @@ function formCheck(el, name) {
134
  /** Check all rows in <table class="checkable">
135
  */
136
  function tableCheck() {
137
- var tables = document.getElementsByTagName('table');
138
  for (var i=0; i < tables.length; i++) {
139
  if (/(^|\s)checkable(\s|$)/.test(tables[i].className)) {
140
- var trs = tables[i].getElementsByTagName('tr');
141
  for (var j=0; j < trs.length; j++) {
142
  trCheck(trs[j].firstChild.firstChild);
143
  }
@@ -149,7 +220,7 @@ function tableCheck() {
149
  * @param string
150
  */
151
  function formUncheck(id) {
152
- var el = document.getElementById(id);
153
  el.checked = false;
154
  trCheck(el);
155
  }
@@ -175,6 +246,13 @@ function formChecked(el, name) {
175
  * @param [boolean] force click
176
  */
177
  function tableClick(event, click) {
 
 
 
 
 
 
 
178
  click = (click || !window.getSelection || getSelection().isCollapsed);
179
  var el = getTarget(event);
180
  while (!isTag(el, 'tr')) {
@@ -182,7 +260,7 @@ function tableClick(event, click) {
182
  if (el.type != 'checkbox') {
183
  return;
184
  }
185
- checkboxClick(event, el);
186
  click = false;
187
  }
188
  el = el.parentNode;
@@ -195,31 +273,38 @@ function tableClick(event, click) {
195
  el.checked = !el.checked;
196
  el.onclick && el.onclick();
197
  }
 
 
 
 
 
 
 
198
  trCheck(el);
199
  }
200
 
201
  var lastChecked;
202
 
203
  /** Shift-click on checkbox for multiple selection.
204
- * @param MouseEvent
205
- * @param HTMLInputElement
206
- */
207
- function checkboxClick(event, el) {
208
- if (!el.name) {
209
  return;
210
  }
211
- if (event.shiftKey && (!lastChecked || lastChecked.name == el.name)) {
212
  var checked = (lastChecked ? lastChecked.checked : true);
213
- var inputs = parentTag(el, 'table').getElementsByTagName('input');
214
  var checking = !lastChecked;
215
  for (var i=0; i < inputs.length; i++) {
216
  var input = inputs[i];
217
- if (input.name === el.name) {
218
  if (checking) {
219
  input.checked = checked;
220
  trCheck(input);
221
  }
222
- if (input === el || input === lastChecked) {
223
  if (checking) {
224
  break;
225
  }
@@ -228,7 +313,7 @@ function checkboxClick(event, el) {
228
  }
229
  }
230
  } else {
231
- lastChecked = el;
232
  }
233
  }
234
 
@@ -237,7 +322,7 @@ function checkboxClick(event, el) {
237
  * @param string undefined to set parentNode to &nbsp;
238
  */
239
  function setHtml(id, html) {
240
- var el = document.getElementById(id);
241
  if (el) {
242
  if (html == null) {
243
  el.parentNode.innerHTML = '&nbsp;';
@@ -262,52 +347,49 @@ function nodePosition(el) {
262
  /** Go to the specified page
263
  * @param string
264
  * @param string
265
- * @param [MouseEvent]
266
  */
267
- function pageClick(href, page, event) {
268
  if (!isNaN(page) && page) {
269
- href += (page != 1 ? '&page=' + (page - 1) : '');
270
- location.href = href;
271
  }
272
  }
273
 
274
 
275
 
276
  /** Display items in menu
277
- * @param HTMLElement
278
  * @param MouseEvent
 
279
  */
280
- function menuOver(el, event) {
281
  var a = getTarget(event);
282
  if (isTag(a, 'a|span') && a.offsetLeft + a.offsetWidth > a.parentNode.offsetWidth - 15) { // 15 - ellipsis
283
- el.style.overflow = 'visible';
284
  }
285
  }
286
 
287
  /** Hide items in menu
288
- * @param HTMLElement
289
  */
290
- function menuOut(el) {
291
- el.style.overflow = 'auto';
292
  }
293
 
294
 
295
 
296
  /** Add row in select fieldset
297
- * @param HTMLSelectElement
298
  */
299
- function selectAddRow(field) {
300
- field.onchange = function () {
301
- selectFieldChange(field.form);
302
- };
303
- field.onchange();
304
  var row = cloneNode(field.parentNode);
305
- var selects = row.getElementsByTagName('select');
 
 
306
  for (var i=0; i < selects.length; i++) {
307
  selects[i].name = selects[i].name.replace(/[a-z]\[\d+/, '$&1');
308
  selects[i].selectedIndex = 0;
309
  }
310
- var inputs = row.getElementsByTagName('input');
311
  for (var i=0; i < inputs.length; i++) {
312
  inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
313
  inputs[i].className = '';
@@ -321,33 +403,33 @@ function selectAddRow(field) {
321
  }
322
 
323
  /** Prevent onsearch handler on Enter
324
- * @param HTMLInputElement
325
  * @param KeyboardEvent
 
326
  */
327
- function selectSearchKeydown(el, event) {
328
  if (event.keyCode == 13 || event.keyCode == 10) {
329
- el.onsearch = function () {
330
  };
331
  }
332
  }
333
 
334
  /** Clear column name after resetting search
335
- * @param HTMLInputElement
336
  */
337
- function selectSearchSearch(el) {
338
- if (!el.value) {
339
- el.parentNode.firstChild.selectedIndex = 0;
340
  }
341
  }
342
 
343
 
344
 
345
  /** Toggles column context menu
346
- * @param HTMLElement
347
- * @param [string] extra class name
348
- */
349
- function columnMouse(el, className) {
350
- var spans = el.getElementsByTagName('span');
351
  for (var i=0; i < spans.length; i++) {
352
  if (/column/.test(spans[i].className)) {
353
  spans[i].className = 'column' + (className || '');
@@ -358,12 +440,13 @@ function columnMouse(el, className) {
358
 
359
 
360
  /** Fill column in search field
361
- * @param string
362
- */
 
363
  function selectSearch(name) {
364
- var el = document.getElementById('fieldset-search');
365
  el.className = '';
366
- var divs = el.getElementsByTagName('div');
367
  for (var i=0; i < divs.length; i++) {
368
  var div = divs[i];
369
  if (isTag(div.firstChild, 'select') && selectValue(div.firstChild) == name) {
@@ -374,7 +457,8 @@ function selectSearch(name) {
374
  div.firstChild.value = name;
375
  div.firstChild.onchange();
376
  }
377
- div.lastChild.focus();
 
378
  }
379
 
380
 
@@ -402,6 +486,7 @@ function getTarget(event) {
402
  * @return boolean
403
  */
404
  function bodyKeydown(event, button) {
 
405
  var target = getTarget(event);
406
  if (target.jushTextarea) {
407
  target = target.jushTextarea;
@@ -450,18 +535,17 @@ function editingKeydown(event) {
450
  return false;
451
  }
452
  if (event.shiftKey && !bodyKeydown(event, 'insert')) {
453
- eventStop(event);
454
  return false;
455
  }
456
  return true;
457
  }
458
 
459
  /** Disable maxlength for functions
460
- * @param HTMLSelectElement
461
  */
462
- function functionChange(select) {
463
- var input = select.form[select.name.replace(/^function/, 'fields')];
464
- if (selectValue(select)) {
465
  if (input.origType === undefined) {
466
  input.origType = input.type;
467
  input.origMaxLength = input.getAttribute('data-maxlength');
@@ -478,28 +562,29 @@ function functionChange(select) {
478
  helpClose();
479
  }
480
 
481
- /** Call this.onchange() if value changes
482
- * @this HTMLInputElement
 
483
  */
484
- function keyupChange() {
485
- if (this.value != this.getAttribute('value')) {
486
- this.onchange();
487
- this.setAttribute('value', this.value);
488
  }
489
  }
490
 
491
  /** Add new field in schema-less edit
492
- * @param HTMLInputElement
493
  */
494
- function fieldChange(field) {
495
- var row = cloneNode(parentTag(field, 'tr'));
496
- var inputs = row.getElementsByTagName('input');
497
  for (var i = 0; i < inputs.length; i++) {
498
  inputs[i].value = '';
499
  }
500
  // keep value in <select> (function)
501
- parentTag(field, 'table').appendChild(row);
502
- field.onchange = function () { };
503
  }
504
 
505
 
@@ -510,11 +595,12 @@ function fieldChange(field) {
510
  * @param [string]
511
  * @param [string]
512
  * @return XMLHttpRequest or false in case of an error
 
513
  */
514
  function ajax(url, callback, data, message) {
515
  var request = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false));
516
  if (request) {
517
- var ajaxStatus = document.getElementById('ajaxstatus');
518
  if (message) {
519
  ajaxStatus.innerHTML = '<div class="message">' + message + '</div>';
520
  ajaxStatus.className = ajaxStatus.className.replace(/ hidden/g, '');
@@ -543,11 +629,11 @@ function ajax(url, callback, data, message) {
543
 
544
  /** Use setHtml(key, value) for JSON response
545
  * @param string
546
- * @return XMLHttpRequest or false in case of an error
547
  */
548
  function ajaxSetHtml(url) {
549
- return ajax(url, function (request) {
550
- var data = eval('(' + request.responseText + ')');
551
  for (var key in data) {
552
  setHtml(key, data[key]);
553
  }
@@ -584,7 +670,7 @@ function ajaxForm(form, message, button) {
584
  return ajax(url, function (request) {
585
  setHtml('ajaxstatus', request.responseText);
586
  if (window.jush) {
587
- jush.highlight_tag(document.getElementById('ajaxstatus').getElementsByTagName('code'), 0);
588
  }
589
  }, data, message);
590
  }
@@ -592,18 +678,21 @@ function ajaxForm(form, message, button) {
592
 
593
 
594
  /** Display edit field
595
- * @param HTMLElement
596
  * @param MouseEvent
597
  * @param number display textarea instead of input, 2 - load long text
598
- * @param string warning to display
 
 
599
  */
600
- function selectClick(td, event, text, warning) {
 
601
  var target = getTarget(event);
602
  if (!isCtrl(event) || isTag(td.firstChild, 'input|textarea') || isTag(target, 'a')) {
603
  return;
604
  }
605
  if (warning) {
606
- return alert(warning);
 
607
  }
608
  var original = td.innerHTML;
609
  text = text || /\n/.test(original);
@@ -627,7 +716,7 @@ function selectClick(td, event, text, warning) {
627
  });
628
  input.rows = rows;
629
  }
630
- if (value == '\u00A0' || td.getElementsByTagName('i').length) { // &nbsp; or i - NULL
631
  value = '';
632
  }
633
  if (document.selection) {
@@ -659,26 +748,28 @@ function selectClick(td, event, text, warning) {
659
  range.moveEnd('character', -input.value.length + pos);
660
  range.select();
661
  }
 
662
  }
663
 
664
 
665
 
666
  /** Load and display next page in select
667
- * @param HTMLLinkElement
668
  * @param number
669
  * @param string
670
- * @return boolean
 
671
  */
672
- function selectLoadMore(a, limit, loading) {
 
673
  var title = a.innerHTML;
674
  var href = a.href;
675
  a.innerHTML = loading;
676
  if (href) {
677
  a.removeAttribute('href');
678
- return ajax(href, function (request) {
679
  var tbody = document.createElement('tbody');
680
  tbody.innerHTML = request.responseText;
681
- document.getElementById('table').appendChild(tbody);
682
  if (tbody.children.length < limit) {
683
  a.parentNode.removeChild(a);
684
  } else {
@@ -711,7 +802,7 @@ function eventStop(event) {
711
  */
712
  function setupSubmitHighlight(parent) {
713
  for (var key in { input: 1, select: 1, textarea: 1 }) {
714
- var inputs = parent.getElementsByTagName(key);
715
  for (var i = 0; i < inputs.length; i++) {
716
  setupSubmitHighlightInput(inputs[i])
717
  }
@@ -756,7 +847,10 @@ function findDefaultSubmit(el) {
756
  if (el.jushTextarea) {
757
  el = el.jushTextarea;
758
  }
759
- var inputs = el.form.getElementsByTagName('input');
 
 
 
760
  for (var i = 0; i < inputs.length; i++) {
761
  var input = inputs[i];
762
  if (input.type == 'submit' && !input.style.zIndex) {
@@ -795,6 +889,17 @@ function focus(el) {
795
  */
796
  function cloneNode(el) {
797
  var el2 = el.cloneNode(true);
 
 
 
 
 
 
 
 
 
 
 
798
  setupSubmitHighlight(el2);
799
  return el2;
800
  }
1
 
2
+ /** Get first element by selector
3
+ * @param string
4
+ * @param [HTMLElement] defaults to document
5
+ * @return HTMLElement
6
+ */
7
+ function qs(selector, context) {
8
+ return (context || document).querySelector(selector);
9
+ }
10
+
11
+ /** Get last element by selector
12
+ * @param string
13
+ * @param [HTMLElement] defaults to document
14
+ * @return HTMLElement
15
+ */
16
+ function qsl(selector, context) {
17
+ var els = qsa(selector, context || document);
18
+ return els[els.length - 1];
19
+ }
20
+
21
+ /** Get all elements by selector
22
+ * @param string
23
+ * @param HTMLElement
24
+ * @return NodeList
25
+ */
26
+ function qsa(selector, context) {
27
+ return context.querySelectorAll(selector);
28
+ }
29
+
30
+ /** Return a function calling fn with the next arguments
31
+ * @param function
32
+ * @param ...
33
+ * @return function with preserved this
34
+ */
35
+ function partial(fn) {
36
+ var args = Array.apply(null, arguments).slice(1);
37
+ return function () {
38
+ return fn.apply(this, args);
39
+ };
40
+ }
41
+
42
+ /** Return a function calling fn with the first parameter and then the next arguments
43
+ * @param function
44
+ * @param ...
45
+ * @return function with preserved this
46
+ */
47
+ function partialArg(fn) {
48
+ var args = Array.apply(null, arguments);
49
+ return function (arg) {
50
+ args[0] = arg;
51
+ return fn.apply(this, args);
52
+ };
53
+ }
54
+
55
+ /** Assign values from source to target
56
+ * @param Object
57
+ * @param Object
58
+ */
59
+ function mixin(target, source) {
60
+ for (var key in source) {
61
+ target[key] = source[key];
62
+ }
63
+ }
64
+
65
  /** Add or remove CSS class
66
  * @param HTMLElement
67
  * @param string
75
 
76
  /** Toggle visibility
77
  * @param string
78
+ * @return boolean false
79
  */
80
  function toggle(id) {
81
+ var el = qs('#' + id);
82
  el.className = (el.className == 'hidden' ? '' : 'hidden');
83
+ return false;
84
  }
85
 
86
  /** Set permanent cookie
96
 
97
  /** Verify current Adminer version
98
  * @param string
99
+ * @param string own URL base
100
+ * @param string
101
  */
102
+ function verifyVersion(current, url, token) {
103
  cookie('adminer_version=0', 1);
104
  var iframe = document.createElement('iframe');
105
  iframe.src = 'https://www.adminer.org/version/?current=' + current;
115
  var match = /version=(.+)/.exec(event.data);
116
  if (match) {
117
  cookie('adminer_version=' + match[1], 1);
118
+ ajax(url + 'script=version', function () {
119
+ }, event.data + '&token=' + token);
120
  }
121
  }
122
  }, false);
123
  }
124
+ qs('#version').appendChild(iframe);
125
  }
126
 
127
  /** Get value of select
137
  }
138
 
139
  /** Verify if element has a specified tag name
140
+ * @param HTMLElement
141
+ * @param string regular expression
142
+ * @return bool
143
+ */
144
  function isTag(el, tag) {
145
  var re = new RegExp('^(' + tag + ')$', 'i');
146
  return re.test(el.tagName);
147
  }
148
 
149
  /** Get parent node with specified tag name
150
+ * @param HTMLElement
151
+ * @param string regular expression
152
+ * @return HTMLElement
153
+ */
154
  function parentTag(el, tag) {
155
  while (el && !isTag(el, tag)) {
156
  el = el.parentNode;
172
  /** Fill number of selected items
173
  * @param string
174
  * @param string
175
+ * @uses thousandsSeparator
176
  */
177
  function selectCount(id, count) {
178
+ setHtml(id, (count === '' ? '' : '(' + (count + '').replace(/\B(?=(\d{3})+$)/g, thousandsSeparator) + ')'));
179
+ var el = qs('#' + id);
180
+ if (el) {
181
+ var inputs = qsa('input', el.parentNode.parentNode);
182
+ for (var i = 0; i < inputs.length; i++) {
183
+ var input = inputs[i];
184
+ if (input.type == 'submit') {
185
+ input.disabled = (count == '0');
186
+ }
187
  }
188
  }
189
  }
190
 
191
  /** Check all elements matching given name
 
192
  * @param RegExp
193
+ * @this HTMLInputElement
194
  */
195
+ function formCheck(name) {
196
+ var elems = this.form.elements;
197
  for (var i=0; i < elems.length; i++) {
198
  if (name.test(elems[i].name)) {
199
+ elems[i].checked = this.checked;
200
  trCheck(elems[i]);
201
  }
202
  }
205
  /** Check all rows in <table class="checkable">
206
  */
207
  function tableCheck() {
208
+ var tables = qsa('table', document);
209
  for (var i=0; i < tables.length; i++) {
210
  if (/(^|\s)checkable(\s|$)/.test(tables[i].className)) {
211
+ var trs = qsa('tr', tables[i]);
212
  for (var j=0; j < trs.length; j++) {
213
  trCheck(trs[j].firstChild.firstChild);
214
  }
220
  * @param string
221
  */
222
  function formUncheck(id) {
223
+ var el = qs('#' + id);
224
  el.checked = false;
225
  trCheck(el);
226
  }
246
  * @param [boolean] force click
247
  */
248
  function tableClick(event, click) {
249
+ var td = parentTag(getTarget(event), 'td');
250
+ var text;
251
+ if (td && (text = td.getAttribute('data-text'))) {
252
+ if (selectClick.call(td, event, +text, td.getAttribute('data-warning'))) {
253
+ return;
254
+ }
255
+ }
256
  click = (click || !window.getSelection || getSelection().isCollapsed);
257
  var el = getTarget(event);
258
  while (!isTag(el, 'tr')) {
260
  if (el.type != 'checkbox') {
261
  return;
262
  }
263
+ checkboxClick.call(el, event);
264
  click = false;
265
  }
266
  el = el.parentNode;
273
  el.checked = !el.checked;
274
  el.onclick && el.onclick();
275
  }
276
+ if (el.name == 'check[]') {
277
+ el.form['all'].checked = false;
278
+ formUncheck('all-page');
279
+ }
280
+ if (/^(tables|views)\[\]$/.test(el.name)) {
281
+ formUncheck('check-all');
282
+ }
283
  trCheck(el);
284
  }
285
 
286
  var lastChecked;
287
 
288
  /** Shift-click on checkbox for multiple selection.
289
+ * @param MouseEvent
290
+ * @this HTMLInputElement
291
+ */
292
+ function checkboxClick(event) {
293
+ if (!this.name) {
294
  return;
295
  }
296
+ if (event.shiftKey && (!lastChecked || lastChecked.name == this.name)) {
297
  var checked = (lastChecked ? lastChecked.checked : true);
298
+ var inputs = qsa('input', parentTag(this, 'table'));
299
  var checking = !lastChecked;
300
  for (var i=0; i < inputs.length; i++) {
301
  var input = inputs[i];
302
+ if (input.name === this.name) {
303
  if (checking) {
304
  input.checked = checked;
305
  trCheck(input);
306
  }
307
+ if (input === this || input === lastChecked) {
308
  if (checking) {
309
  break;
310
  }
313
  }
314
  }
315
  } else {
316
+ lastChecked = this;
317
  }
318
  }
319
 
322
  * @param string undefined to set parentNode to &nbsp;
323
  */
324
  function setHtml(id, html) {
325
+ var el = qs('#' + id);
326
  if (el) {
327
  if (html == null) {
328
  el.parentNode.innerHTML = '&nbsp;';
347
  /** Go to the specified page
348
  * @param string
349
  * @param string
 
350
  */
351
+ function pageClick(href, page) {
352
  if (!isNaN(page) && page) {
353
+ location.href = href + (page != 1 ? '&page=' + (page - 1) : '');
 
354
  }
355
  }
356
 
357
 
358
 
359
  /** Display items in menu
 
360
  * @param MouseEvent
361
+ * @this HTMLElement
362
  */
363
+ function menuOver(event) {
364
  var a = getTarget(event);
365
  if (isTag(a, 'a|span') && a.offsetLeft + a.offsetWidth > a.parentNode.offsetWidth - 15) { // 15 - ellipsis
366
+ this.style.overflow = 'visible';
367
  }
368
  }
369
 
370
  /** Hide items in menu
371
+ * @this HTMLElement
372
  */
373
+ function menuOut() {
374
+ this.style.overflow = 'auto';
375
  }
376
 
377
 
378
 
379
  /** Add row in select fieldset
380
+ * @this HTMLSelectElement
381
  */
382
+ function selectAddRow() {
383
+ var field = this;
 
 
 
384
  var row = cloneNode(field.parentNode);
385
+ field.onchange = selectFieldChange;
386
+ field.onchange();
387
+ var selects = qsa('select', row);
388
  for (var i=0; i < selects.length; i++) {
389
  selects[i].name = selects[i].name.replace(/[a-z]\[\d+/, '$&1');
390
  selects[i].selectedIndex = 0;
391
  }
392
+ var inputs = qsa('input', row);
393
  for (var i=0; i < inputs.length; i++) {
394
  inputs[i].name = inputs[i].name.replace(/[a-z]\[\d+/, '$&1');
395
  inputs[i].className = '';
403
  }
404
 
405
  /** Prevent onsearch handler on Enter
 
406
  * @param KeyboardEvent
407
+ * @this HTMLInputElement
408
  */
409
+ function selectSearchKeydown(event) {
410
  if (event.keyCode == 13 || event.keyCode == 10) {
411
+ this.onsearch = function () {
412
  };
413
  }
414
  }
415
 
416
  /** Clear column name after resetting search
417
+ * @this HTMLInputElement
418
  */
419
+ function selectSearchSearch() {
420
+ if (!this.value) {
421
+ this.parentNode.firstChild.selectedIndex = 0;
422
  }
423
  }
424
 
425
 
426
 
427
  /** Toggles column context menu
428
+ * @param [string] extra class name
429
+ * @this HTMLElement
430
+ */
431
+ function columnMouse(className) {
432
+ var spans = qsa('span', this);
433
  for (var i=0; i < spans.length; i++) {
434
  if (/column/.test(spans[i].className)) {
435
  spans[i].className = 'column' + (className || '');
440
 
441
 
442
  /** Fill column in search field
443
+ * @param string
444
+ * @return boolean false
445
+ */
446
  function selectSearch(name) {
447
+ var el = qs('#fieldset-search');
448
  el.className = '';
449
+ var divs = qsa('div', el);
450
  for (var i=0; i < divs.length; i++) {
451
  var div = divs[i];
452
  if (isTag(div.firstChild, 'select') && selectValue(div.firstChild) == name) {
457
  div.firstChild.value = name;
458
  div.firstChild.onchange();
459
  }
460
+ qs('[name$="[val]"]', div).focus();
461
+ return false;
462
  }
463
 
464
 
486
  * @return boolean
487
  */
488
  function bodyKeydown(event, button) {
489
+ eventStop(event);
490
  var target = getTarget(event);
491
  if (target.jushTextarea) {
492
  target = target.jushTextarea;
535
  return false;
536
  }
537
  if (event.shiftKey && !bodyKeydown(event, 'insert')) {
 
538
  return false;
539
  }
540
  return true;
541
  }
542
 
543
  /** Disable maxlength for functions
544
+ * @this HTMLSelectElement
545
  */
546
+ function functionChange() {
547
+ var input = this.form[this.name.replace(/^function/, 'fields')];
548
+ if (selectValue(this)) {
549
  if (input.origType === undefined) {
550
  input.origType = input.type;
551
  input.origMaxLength = input.getAttribute('data-maxlength');
562
  helpClose();
563
  }
564
 
565
+ /** Skip 'original' when typing
566
+ * @param number
567
+ * @this HTMLTableCellElement
568
  */
569
+ function skipOriginal(first) {
570
+ var fnSelect = this.previousSibling.firstChild;
571
+ if (fnSelect.selectedIndex < first) {
572
+ fnSelect.selectedIndex = first;
573
  }
574
  }
575
 
576
  /** Add new field in schema-less edit
577
+ * @this HTMLInputElement
578
  */
579
+ function fieldChange() {
580
+ var row = cloneNode(parentTag(this, 'tr'));
581
+ var inputs = qsa('input', row);
582
  for (var i = 0; i < inputs.length; i++) {
583
  inputs[i].value = '';
584
  }
585
  // keep value in <select> (function)
586
+ parentTag(this, 'table').appendChild(row);
587
+ this.oninput = function () { };
588
  }
589
 
590
 
595
  * @param [string]
596
  * @param [string]
597
  * @return XMLHttpRequest or false in case of an error
598
+ * @uses offlineMessage
599
  */
600
  function ajax(url, callback, data, message) {
601
  var request = (window.XMLHttpRequest ? new XMLHttpRequest() : (window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : false));
602
  if (request) {
603
+ var ajaxStatus = qs('#ajaxstatus');
604
  if (message) {
605
  ajaxStatus.innerHTML = '<div class="message">' + message + '</div>';
606
  ajaxStatus.className = ajaxStatus.className.replace(/ hidden/g, '');
629
 
630
  /** Use setHtml(key, value) for JSON response
631
  * @param string
632
+ * @return boolean false for success
633
  */
634
  function ajaxSetHtml(url) {
635
+ return !ajax(url, function (request) {
636
+ var data = window.JSON ? JSON.parse(request.responseText) : eval('(' + request.responseText + ')');
637
  for (var key in data) {
638
  setHtml(key, data[key]);
639
  }
670
  return ajax(url, function (request) {
671
  setHtml('ajaxstatus', request.responseText);
672
  if (window.jush) {
673
+ jush.highlight_tag(qsa('code', qs('#ajaxstatus')), 0);
674
  }
675
  }, data, message);
676
  }
678
 
679
 
680
  /** Display edit field
 
681
  * @param MouseEvent
682
  * @param number display textarea instead of input, 2 - load long text
683
+ * @param [string] warning to display
684
+ * @return boolean
685
+ * @this HTMLElement
686
  */
687
+ function selectClick(event, text, warning) {
688
+ var td = this;
689
  var target = getTarget(event);
690
  if (!isCtrl(event) || isTag(td.firstChild, 'input|textarea') || isTag(target, 'a')) {
691
  return;
692
  }
693
  if (warning) {
694
+ alert(warning);
695
+ return true;
696
  }
697
  var original = td.innerHTML;
698
  text = text || /\n/.test(original);
716
  });
717
  input.rows = rows;
718
  }
719
+ if (value == '\u00A0' || qsa('i', td).length) { // &nbsp; or i - NULL
720
  value = '';
721
  }
722
  if (document.selection) {
748
  range.moveEnd('character', -input.value.length + pos);
749
  range.select();
750
  }
751
+ return true;
752
  }
753
 
754
 
755
 
756
  /** Load and display next page in select
 
757
  * @param number
758
  * @param string
759
+ * @return boolean false for success
760
+ * @this HTMLLinkElement
761
  */
762
+ function selectLoadMore(limit, loading) {
763
+ var a = this;
764
  var title = a.innerHTML;
765
  var href = a.href;
766
  a.innerHTML = loading;
767
  if (href) {
768
  a.removeAttribute('href');
769
+ return !ajax(href, function (request) {
770
  var tbody = document.createElement('tbody');
771
  tbody.innerHTML = request.responseText;
772
+ qs('#table').appendChild(tbody);
773
  if (tbody.children.length < limit) {
774
  a.parentNode.removeChild(a);
775
  } else {
802
  */
803
  function setupSubmitHighlight(parent) {
804
  for (var key in { input: 1, select: 1, textarea: 1 }) {
805
+ var inputs = qsa(key, parent);
806
  for (var i = 0; i < inputs.length; i++) {
807
  setupSubmitHighlightInput(inputs[i])
808
  }
847
  if (el.jushTextarea) {
848
  el = el.jushTextarea;
849
  }
850
+ if (!el.form) {
851
+ return null;
852
+ }
853
+ var inputs = qsa('input', el.form);
854
  for (var i = 0; i < inputs.length; i++) {
855
  var input = inputs[i];
856
  if (input.type == 'submit' && !input.style.zIndex) {
889
  */
890
  function cloneNode(el) {
891
  var el2 = el.cloneNode(true);
892
+ var selector = 'input, select';
893
+ var origEls = qsa(selector, el);
894
+ var cloneEls = qsa(selector, el2);
895
+ for (var i=0; i < origEls.length; i++) {
896
+ var origEl = origEls[i];
897
+ for (var key in origEl) {
898
+ if (/^on/.test(key) && origEl[key]) {
899
+ cloneEls[i][key] = origEl[key];
900
+ }
901
+ }
902
+ }
903
  setupSubmitHighlight(el2);
904
  return el2;
905
  }
adminer/adminer/adminer/table.inc.php CHANGED
@@ -5,13 +5,14 @@ if (!$fields) {
5
  $error = error();
6
  }
7
  $table_status = table_status1($TABLE, true);
 
8
 
9
- page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . h($TABLE), $error);
10
 
11
  $adminer->selectLinks($table_status);
12
  $comment = $table_status["Comment"];
13
  if ($comment != "") {
14
- echo "<p>" . lang('Comment') . ": " . h($comment) . "\n";
15
  }
16
 
17
  if ($fields) {
5
  $error = error();
6
  }
7
  $table_status = table_status1($TABLE, true);
8
+ $name = $adminer->tableName($table_status);
9
 
10
+ page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . ($name != "" ? $name : h($TABLE)), $error);
11
 
12
  $adminer->selectLinks($table_status);
13
  $comment = $table_status["Comment"];
14
  if ($comment != "") {
15
+ echo "<p class='nowrap'>" . lang('Comment') . ": " . h($comment) . "\n";
16
  }
17
 
18
  if ($fields) {
adminer/adminer/adminer/trigger.inc.php CHANGED
@@ -40,10 +40,10 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
40
  <tr><th><?php echo lang('Type'); ?><td><?php echo html_select("Type", $trigger_options["Type"], $row["Type"]); ?>
41
  </table>
42
  <p><?php echo lang('Name'); ?>: <input name="Trigger" value="<?php echo h($row["Trigger"]); ?>" maxlength="64" autocapitalize="off">
43
- <script type="text/javascript">document.getElementById('form')['Timing'].onchange();</script>
44
  <p><?php textarea("Statement", $row["Statement"]); ?>
45
  <p>
46
  <input type="submit" value="<?php echo lang('Save'); ?>">
47
- <?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
48
  <input type="hidden" name="token" value="<?php echo $token; ?>">
49
  </form>
40
  <tr><th><?php echo lang('Type'); ?><td><?php echo html_select("Type", $trigger_options["Type"], $row["Type"]); ?>
41
  </table>
42
  <p><?php echo lang('Name'); ?>: <input name="Trigger" value="<?php echo h($row["Trigger"]); ?>" maxlength="64" autocapitalize="off">
43
+ <?php echo script("qs('#form')['Timing'].onchange();"); ?>
44
  <p><?php textarea("Statement", $row["Statement"]); ?>
45
  <p>
46
  <input type="submit" value="<?php echo lang('Save'); ?>">
47
+ <?php if ($name != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $name)); ?><?php } ?>
48
  <input type="hidden" name="token" value="<?php echo $token; ?>">
49
  </form>
adminer/adminer/adminer/type.inc.php CHANGED
@@ -22,7 +22,7 @@ if (!$row) {
22
  <p>
23
  <?php
24
  if ($TYPE != "") {
25
- echo "<input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm() . ">\n";
26
  } else {
27
  echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n";
28
  textarea("as", $row["as"]);
22
  <p>
23
  <?php
24
  if ($TYPE != "") {
25
+ echo "<input type='submit' name='drop' value='" . lang('Drop') . "'>" . confirm(lang('Drop %s?', $TYPE)) . "\n";
26
  } else {
27
  echo "<input name='name' value='" . h($row['name']) . "' autocapitalize='off'>\n";
28
  textarea("as", $row["as"]);
adminer/adminer/adminer/user.inc.php CHANGED
@@ -61,7 +61,7 @@ if ($_POST && !$error) {
61
  $created = false;
62
  if (!$error) {
63
  if ($old_user != $new_user) {
64
- $created = queries(($connection->server_info < 5 ? "GRANT USAGE ON *.* TO" : "CREATE USER") . " $new_user IDENTIFIED BY PASSWORD " . q($pass));
65
  $error = !$created;
66
  } elseif ($pass != $old_pass) {
67
  queries("SET PASSWORD FOR $new_user = " . q($pass));
@@ -134,8 +134,8 @@ if ($_POST) {
134
  <table cellspacing="0">
135
  <tr><th><?php echo lang('Server'); ?><td><input name="host" maxlength="60" value="<?php echo h($row["host"]); ?>" autocapitalize="off">
136
  <tr><th><?php echo lang('Username'); ?><td><input name="user" maxlength="16" value="<?php echo h($row["user"]); ?>" autocapitalize="off">
137
- <tr><th><?php echo lang('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>">
138
- <?php if (!$row["hashed"]) { ?><script type="text/javascript">typePassword(document.getElementById('pass'));</script><?php } ?>
139
  <?php echo checkbox("hashed", 1, $row["hashed"], lang('Hashed'), "typePassword(this.form['pass'], this.checked);"); ?>
140
  </table>
141
 
@@ -169,7 +169,11 @@ foreach (array(
169
  } elseif (isset($_GET["grant"])) {
170
  echo "<td><select name=$name><option><option value='1'" . ($value ? " selected" : "") . ">" . lang('Grant') . "<option value='0'" . ($value == "0" ? " selected" : "") . ">" . lang('Revoke') . "</select>";
171
  } else {
172
- echo "<td align='center'><label class='block'><input type='checkbox' name=$name value='1'" . ($value ? " checked" : "") . ($privilege == "All privileges" ? " id='grants-$i-all'" : ($privilege == "Grant option" ? "" : " onclick=\"if (this.checked) formUncheck('grants-$i-all');\"")) . "></label>"; //! uncheck all except grant if all is checked
 
 
 
 
173
  }
174
  $i++;
175
  }
@@ -180,6 +184,6 @@ echo "</table>\n";
180
  ?>
181
  <p>
182
  <input type="submit" value="<?php echo lang('Save'); ?>">
183
- <?php if (isset($_GET["host"])) { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
184
  <input type="hidden" name="token" value="<?php echo $token; ?>">
185
  </form>
61
  $created = false;
62
  if (!$error) {
63
  if ($old_user != $new_user) {
64
+ $created = queries((min_version(5) ? "CREATE USER" : "GRANT USAGE ON *.* TO") . " $new_user IDENTIFIED BY PASSWORD " . q($pass));
65
  $error = !$created;
66
  } elseif ($pass != $old_pass) {
67
  queries("SET PASSWORD FOR $new_user = " . q($pass));
134
  <table cellspacing="0">
135
  <tr><th><?php echo lang('Server'); ?><td><input name="host" maxlength="60" value="<?php echo h($row["host"]); ?>" autocapitalize="off">
136
  <tr><th><?php echo lang('Username'); ?><td><input name="user" maxlength="16" value="<?php echo h($row["user"]); ?>" autocapitalize="off">
137
+ <tr><th><?php echo lang('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>" autocomplete="new-password">
138
+ <?php if (!$row["hashed"]) { echo script("typePassword(qs('#pass'));"); } ?>
139
  <?php echo checkbox("hashed", 1, $row["hashed"], lang('Hashed'), "typePassword(this.form['pass'], this.checked);"); ?>
140
  </table>
141
 
169
  } elseif (isset($_GET["grant"])) {
170
  echo "<td><select name=$name><option><option value='1'" . ($value ? " selected" : "") . ">" . lang('Grant') . "<option value='0'" . ($value == "0" ? " selected" : "") . ">" . lang('Revoke') . "</select>";
171
  } else {
172
+ echo "<td align='center'><label class='block'>";
173
+ echo "<input type='checkbox' name=$name value='1'" . ($value ? " checked" : "") . ($privilege == "All privileges"
174
+ ? " id='grants-$i-all'>" //! uncheck all except grant if all is checked
175
+ : ">" . ($privilege == "Grant option" ? "" : script("qsl('input').onclick = function () { if (this.checked) formUncheck('grants-$i-all'); };")));
176
+ echo "</label>";
177
  }
178
  $i++;
179
  }
184
  ?>
185
  <p>
186
  <input type="submit" value="<?php echo lang('Save'); ?>">
187
+ <?php if (isset($_GET["host"])) { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', "$USER@$_GET[host]")); ?><?php } ?>
188
  <input type="hidden" name="token" value="<?php echo $token; ?>">
189
  </form>
adminer/adminer/adminer/view.inc.php CHANGED
@@ -53,6 +53,6 @@ page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, a
53
  <p><?php textarea("select", $row["select"]); ?>
54
  <p>
55
  <input type="submit" value="<?php echo lang('Save'); ?>">
56
- <?php if ($_GET["view"] != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"<?php echo confirm(); ?>><?php } ?>
57
  <input type="hidden" name="token" value="<?php echo $token; ?>">
58
  </form>
53
  <p><?php textarea("select", $row["select"]); ?>
54
  <p>
55
  <input type="submit" value="<?php echo lang('Save'); ?>">
56
+ <?php if ($TABLE != "") { ?><input type="submit" name="drop" value="<?php echo lang('Drop'); ?>"><?php echo confirm(lang('Drop %s?', $TABLE)); ?><?php } ?>
57
  <input type="hidden" name="token" value="<?php echo $token; ?>">
58
  </form>
adminer/adminer/editor/db.inc.php CHANGED
@@ -3,17 +3,22 @@ page_header(lang('Server'), "", false);
3
 
4
  if ($adminer->homepage()) {
5
  echo "<form action='' method='post'>\n";
6
- echo "<p>" . lang('Search data in tables') . ": <input name='query' value='" . h($_POST["query"]) . "'> <input type='submit' value='" . lang('Search') . "'>\n";
7
  if ($_POST["query"] != "") {
8
  search_tables();
9
  }
10
- echo "<table cellspacing='0' class='nowrap checkable' onclick='tableClick(event);'>\n";
11
- echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck(this, /^tables\[/);" class="jsonly"><th>' . lang('Table') . '<td>' . lang('Rows') . "</thead>\n";
 
 
 
 
 
12
 
13
  foreach (table_status() as $table => $row) {
14
  $name = $adminer->tableName($row);
15
  if (isset($row["Engine"]) && $name != "") {
16
- echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true), "", "formUncheck('check-all');");
17
  echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
18
  $val = format_number($row["Rows"]);
19
  echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
@@ -21,6 +26,6 @@ if ($adminer->homepage()) {
21
  }
22
 
23
  echo "</table>\n";
24
- echo "<script type='text/javascript'>tableCheck();</script>\n";
25
  echo "</form>\n";
 
26
  }
3
 
4
  if ($adminer->homepage()) {
5
  echo "<form action='' method='post'>\n";
6
+ echo "<p>" . lang('Search data in tables') . ": <input type='search' name='query' value='" . h($_POST["query"]) . "'> <input type='submit' value='" . lang('Search') . "'>\n";
7
  if ($_POST["query"] != "") {
8
  search_tables();
9
  }
10
+ echo "<table cellspacing='0' class='nowrap checkable'>\n";
11
+ echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
12
+ echo '<thead><tr class="wrap">';
13
+ echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^tables\[/);", "");
14
+ echo '<th>' . lang('Table');
15
+ echo '<td>' . lang('Rows');
16
+ echo "</thead>\n";
17
 
18
  foreach (table_status() as $table => $row) {
19
  $name = $adminer->tableName($row);
20
  if (isset($row["Engine"]) && $name != "") {
21
+ echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true));
22
  echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
23
  $val = format_number($row["Rows"]);
24
  echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";
26
  }
27
 
28
  echo "</table>\n";
 
29
  echo "</form>\n";
30
+ echo script("tableCheck();");
31
  }
adminer/adminer/editor/include/adminer.inc.php CHANGED
@@ -4,7 +4,7 @@ class Adminer {
4
  var $_values = array();
5
 
6
  function name() {
7
- return "<a href='https://www.adminer.org/editor/' target='_blank' id='h1'>" . lang('Editor') . "</a>";
8
  }
9
 
10
  //! driver, ns
@@ -13,6 +13,9 @@ class Adminer {
13
  return array(SERVER, $_GET["username"], get_password());
14
  }
15
 
 
 
 
16
  function permanentLogin($create = false) {
17
  return password_file($create);
18
  }
@@ -20,6 +23,9 @@ class Adminer {
20
  function bruteForceKey() {
21
  return $_SERVER["REMOTE_ADDR"];
22
  }
 
 
 
23
 
24
  function database() {
25
  global $connection;
@@ -45,30 +51,38 @@ class Adminer {
45
  }
46
 
47
  function headers() {
48
- return true;
 
 
 
49
  }
50
 
51
  function head() {
52
  return true;
53
  }
54
 
 
 
 
 
 
 
 
 
 
55
  function loginForm() {
56
  ?>
57
  <table cellspacing="0">
58
  <tr><th><?php echo lang('Username'); ?><td><input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
59
  <tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
60
  </table>
61
- <script type="text/javascript">
62
- focus(document.getElementById('username'));
63
- </script>
64
  <?php
 
65
  echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
66
  echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
67
  }
68
 
69
  function login($login, $password) {
70
- global $connection;
71
- $connection->query("SET time_zone = " . q(substr_replace(@date("O"), ":", -2, 0))); // date("P") available since PHP 5.1.3, @ - requires date.timezone since PHP 5.3.0
72
  return true;
73
  }
74
 
@@ -77,7 +91,7 @@ focus(document.getElementById('username'));
77
  }
78
 
79
  function fieldName($field, $order = 0) {
80
- return h($field["comment"] != "" ? $field["comment"] : $field["field"]);
81
  }
82
 
83
  function selectLinks($tableStatus, $set = "") {
@@ -132,8 +146,8 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
132
  }
133
  }
134
 
135
- function selectQuery($query, $time) {
136
- return "<!--\n" . str_replace("--", "--><!-- ", $query) . "\n($time)\n-->\n";
137
  }
138
 
139
  function rowDescription($table) {
@@ -184,12 +198,12 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
184
  }
185
  }
186
  if (like_bool($field) && $return != "&nbsp;") { // bool
187
- $return = ($val ? lang('yes') : lang('no'));
188
  }
189
  if ($link) {
190
- $return = "<a href='$link'" . (is_url($link) ? " rel='noreferrer'" : "") . ">$return</a>";
191
  }
192
- if (!$link && !like_bool($field) && preg_match('~int|float|double|decimal~', $field["type"])) {
193
  $return = "<div class='number'>$return</div>"; // Firefox doesn't support <colgroup>
194
  } elseif (preg_match('~date~', $field["type"])) {
195
  $return = "<div class='datetime'>$return</div>";
@@ -244,13 +258,15 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
244
  if (($val["col"] == "" || $columns[$val["col"]]) && "$val[col]$val[val]" != "") {
245
  echo "<div><select name='where[$i][col]'><option value=''>(" . lang('anywhere') . ")" . optionlist($columns, $val["col"], true) . "</select>";
246
  echo html_select("where[$i][op]", array(-1 => "") + $this->operators, $val["op"]);
247
- echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "' onkeydown='selectSearchKeydown(this, event);' onsearch='selectSearchSearch(this);'></div>\n";
248
  $i++;
249
  }
250
  }
251
- echo "<div><select name='where[$i][col]' onchange='this.nextSibling.nextSibling.onchange();'><option value=''>(" . lang('anywhere') . ")" . optionlist($columns, null, true) . "</select>";
 
252
  echo html_select("where[$i][op]", array(-1 => "") + $this->operators);
253
- echo "<input type='search' name='where[$i][val]' onchange='selectAddRow(this);' onsearch='selectSearch(this);'></div>\n";
 
254
  echo "</div></fieldset>\n";
255
  }
256
 
@@ -305,14 +321,15 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
305
  function selectEmailPrint($emailFields, $columns) {
306
  if ($emailFields) {
307
  print_fieldset("email", lang('E-mail'), $_POST["email_append"]);
308
- echo "<div onkeydown=\"eventStop(event); return bodyKeydown(event, 'email');\">\n";
 
309
  echo "<p>" . lang('From') . ": <input name='email_from' value='" . h($_POST ? $_POST["email_from"] : $_COOKIE["adminer_email"]) . "'>\n";
310
  echo lang('Subject') . ": <input name='email_subject' value='" . h($_POST["email_subject"]) . "'>\n";
311
  echo "<p><textarea name='email_message' rows='15' cols='75'>" . h($_POST["email_message"] . ($_POST["email_append"] ? '{$' . "$_POST[email_addition]}" : "")) . "</textarea>\n";
312
- echo "<p onkeydown=\"eventStop(event); return bodyKeydown(event, 'email_append');\">" . html_select("email_addition", $columns, $_POST["email_addition"]) . "<input type='submit' name='email_append' value='" . lang('Insert') . "'>\n"; //! JavaScript
313
- echo "<p>" . lang('Attachments') . ": <input type='file' name='email_files[]' onchange=\"this.onchange = function () { }; var el = this.cloneNode(true); el.value = ''; this.parentNode.appendChild(el);\">";
314
  echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . h(key($emailFields)) . '">' : html_select("email_field", $emailFields));
315
- echo "<input type='submit' name='email' value='" . lang('Send') . "' onclick=\"return this.form['delete'].onclick();\">\n";
316
  echo "</div>\n";
317
  echo "</div></fieldset>\n";
318
  }
@@ -331,7 +348,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
331
  if (($key < 0 ? "" : $col) . $val != "") {
332
  $conds = array();
333
  foreach (($col != "" ? array($col => $fields[$col]) : $fields) as $name => $field) {
334
- if ($col != "" || is_numeric($val) || !preg_match('~int|float|double|decimal~', $field["type"])) {
335
  $name = idf_escape($name);
336
  if ($col != "" && $field["type"] == "enum") {
337
  $conds[] = (in_array(0, $val) ? "$name IS NULL OR " : "") . "$name IN (" . implode(", ", array_map('intval', $val)) . ")";
@@ -349,7 +366,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
349
  }
350
  }
351
  }
352
- $return[] = ($conds ? "(" . implode(" OR ", $conds) . ")" : "0");
353
  }
354
  }
355
  return $return;
@@ -429,7 +446,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
429
  return "";
430
  }
431
 
432
- function messageQuery($query, $time) {
433
  return " <span class='time'>" . @date("H:i:s") . "</span><!--\n" . str_replace("--", "--><!-- ", $query) . "\n" . ($time ? "($time)\n" : "") . "-->";
434
  }
435
 
@@ -459,7 +476,11 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
459
  if ($options !== null) {
460
  return (is_array($options)
461
  ? "<select$attrs>" . optionlist($options, $value, true) . "</select>"
462
- : "<input value='" . h($value) . "'$attrs class='hidden'><input value='" . h($options) . "' class='jsonly' onkeyup=\"whisper('" . h(ME . "script=complete&source=" . urlencode($table) . "&field=" . urlencode($field["field"])) . "&value=', this);\"><div onclick='return whisperClick(event, this.previousSibling);'></div>"
 
 
 
 
463
  );
464
  }
465
  if (like_bool($field)) {
@@ -481,6 +502,10 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
481
  return '';
482
  }
483
 
 
 
 
 
484
  function processInput($field, $value, $function = "") {
485
  if ($function == "now") {
486
  return "$function()";
@@ -539,6 +564,9 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
539
  return $ext;
540
  }
541
 
 
 
 
542
  function homepage() {
543
  return true;
544
  }
@@ -548,7 +576,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
548
  ?>
549
  <h1>
550
  <?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
551
- <a href="https://www.adminer.org/editor/#download" target="_blank" id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
552
  </h1>
553
  <?php
554
  if ($missing == "auth") {
@@ -557,7 +585,8 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
557
  foreach ($servers[""] as $username => $password) {
558
  if ($password !== null) {
559
  if ($first) {
560
- echo "<p id='logins' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";
 
561
  $first = false;
562
  }
563
  echo "<a href='" . h(auth_url($vendor, "", $username)) . "'>" . ($username != "" ? h($username) : "<i>" . lang('empty') . "</i>") . "</a><br>\n";
@@ -581,16 +610,19 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
581
  }
582
 
583
  function tablesPrint($tables) {
584
- echo "<p id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>\n";
 
585
  foreach ($tables as $row) {
 
586
  $name = $this->tableName($row);
587
  if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name
588
  echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'"
589
  . bold($_GET["select"] == $row["Name"] || $_GET["edit"] == $row["Name"], "select")
590
- . " title='" . lang('Select data') . "'>$name</a><br>\n"
591
  ;
592
  }
593
  }
 
594
  }
595
 
596
  function _foreignColumn($foreignKeys, $column) {
4
  var $_values = array();
5
 
6
  function name() {
7
+ return "<a href='https://www.adminer.org/editor/'" . target_blank() . " id='h1'>" . lang('Editor') . "</a>";
8
  }
9
 
10
  //! driver, ns
13
  return array(SERVER, $_GET["username"], get_password());
14
  }
15
 
16
+ function connectSsl() {
17
+ }
18
+
19
  function permanentLogin($create = false) {
20
  return password_file($create);
21
  }
23
  function bruteForceKey() {
24
  return $_SERVER["REMOTE_ADDR"];
25
  }
26
+
27
+ function serverName($server) {
28
+ }
29
 
30
  function database() {
31
  global $connection;
51
  }
52
 
53
  function headers() {
54
+ }
55
+
56
+ function csp() {
57
+ return csp();
58
  }
59
 
60
  function head() {
61
  return true;
62
  }
63
 
64
+ function css() {
65
+ $return = array();
66
+ $filename = "adminer.css";
67
+ if (file_exists($filename)) {
68
+ $return[] = $filename;
69
+ }
70
+ return $return;
71
+ }
72
+
73
  function loginForm() {
74
  ?>
75
  <table cellspacing="0">
76
  <tr><th><?php echo lang('Username'); ?><td><input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
77
  <tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
78
  </table>
 
 
 
79
  <?php
80
+ echo script("focus(qs('#username'));");
81
  echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
82
  echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
83
  }
84
 
85
  function login($login, $password) {
 
 
86
  return true;
87
  }
88
 
91
  }
92
 
93
  function fieldName($field, $order = 0) {
94
+ return h(preg_replace('~\s+\[.*\]$~', '', ($field["comment"] != "" ? $field["comment"] : $field["field"])));
95
  }
96
 
97
  function selectLinks($tableStatus, $set = "") {
146
  }
147
  }
148
 
149
+ function selectQuery($query, $start, $failed = false) {
150
+ return "<!--\n" . str_replace("--", "--><!-- ", $query) . "\n(" . format_time($start) . ")\n-->\n";
151
  }
152
 
153
  function rowDescription($table) {
198
  }
199
  }
200
  if (like_bool($field) && $return != "&nbsp;") { // bool
201
+ $return = (preg_match('~^(1|t|true|y|yes|on)$~i', $val) ? lang('yes') : lang('no'));
202
  }
203
  if ($link) {
204
+ $return = "<a href='$link'" . (is_url($link) ? target_blank() : "") . ">$return</a>";
205
  }
206
+ if (!$link && !like_bool($field) && preg_match(number_type(), $field["type"])) {
207
  $return = "<div class='number'>$return</div>"; // Firefox doesn't support <colgroup>
208
  } elseif (preg_match('~date~', $field["type"])) {
209
  $return = "<div class='datetime'>$return</div>";
258
  if (($val["col"] == "" || $columns[$val["col"]]) && "$val[col]$val[val]" != "") {
259
  echo "<div><select name='where[$i][col]'><option value=''>(" . lang('anywhere') . ")" . optionlist($columns, $val["col"], true) . "</select>";
260
  echo html_select("where[$i][op]", array(-1 => "") + $this->operators, $val["op"]);
261
+ echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "'>" . script("mixin(qsl('input'), {onkeydown: selectSearchKeydown, onsearch: selectSearchSearch});", "") . "</div>\n";
262
  $i++;
263
  }
264
  }
265
+ echo "<div><select name='where[$i][col]'><option value=''>(" . lang('anywhere') . ")" . optionlist($columns, null, true) . "</select>";
266
+ echo script("qsl('select').onchange = selectAddRow;", "");
267
  echo html_select("where[$i][op]", array(-1 => "") + $this->operators);
268
+ echo "<input type='search' name='where[$i][val]'></div>";
269
+ echo script("mixin(qsl('input'), {onchange: function () { this.parentNode.firstChild.onchange(); }, onsearch: selectSearchSearch});");
270
  echo "</div></fieldset>\n";
271
  }
272
 
321
  function selectEmailPrint($emailFields, $columns) {
322
  if ($emailFields) {
323
  print_fieldset("email", lang('E-mail'), $_POST["email_append"]);
324
+ echo "<div>";
325
+ echo script("qsl('div').onkeydown = partialArg(bodyKeydown, 'email');");
326
  echo "<p>" . lang('From') . ": <input name='email_from' value='" . h($_POST ? $_POST["email_from"] : $_COOKIE["adminer_email"]) . "'>\n";
327
  echo lang('Subject') . ": <input name='email_subject' value='" . h($_POST["email_subject"]) . "'>\n";
328
  echo "<p><textarea name='email_message' rows='15' cols='75'>" . h($_POST["email_message"] . ($_POST["email_append"] ? '{$' . "$_POST[email_addition]}" : "")) . "</textarea>\n";
329
+ echo "<p>" . script("qsl('p').onkeydown = partialArg(bodyKeydown, 'email_append');", "") . html_select("email_addition", $columns, $_POST["email_addition"]) . "<input type='submit' name='email_append' value='" . lang('Insert') . "'>\n"; //! JavaScript
330
+ echo "<p>" . lang('Attachments') . ": <input type='file' name='email_files[]'>" . script("qsl('input').onchange = emailFileChange;");
331
  echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . h(key($emailFields)) . '">' : html_select("email_field", $emailFields));
332
+ echo "<input type='submit' name='email' value='" . lang('Send') . "'>" . confirm();
333
  echo "</div>\n";
334
  echo "</div></fieldset>\n";
335
  }
348
  if (($key < 0 ? "" : $col) . $val != "") {
349
  $conds = array();
350
  foreach (($col != "" ? array($col => $fields[$col]) : $fields) as $name => $field) {
351
+ if ($col != "" || is_numeric($val) || !preg_match(number_type(), $field["type"])) {
352
  $name = idf_escape($name);
353
  if ($col != "" && $field["type"] == "enum") {
354
  $conds[] = (in_array(0, $val) ? "$name IS NULL OR " : "") . "$name IN (" . implode(", ", array_map('intval', $val)) . ")";
366
  }
367
  }
368
  }
369
+ $return[] = ($conds ? "(" . implode(" OR ", $conds) . ")" : "1 = 0");
370
  }
371
  }
372
  return $return;
446
  return "";
447
  }
448
 
449
+ function messageQuery($query, $time, $failed = false) {
450
  return " <span class='time'>" . @date("H:i:s") . "</span><!--\n" . str_replace("--", "--><!-- ", $query) . "\n" . ($time ? "($time)\n" : "") . "-->";
451
  }
452
 
476
  if ($options !== null) {
477
  return (is_array($options)
478
  ? "<select$attrs>" . optionlist($options, $value, true) . "</select>"
479
+ : "<input value='" . h($value) . "'$attrs class='hidden'>"
480
+ . "<input value='" . h($options) . "' class='jsonly'>"
481
+ . "<div></div>"
482
+ . script("qsl('input').oninput = partial(whisper, '" . ME . "script=complete&source=" . urlencode($table) . "&field=" . urlencode($field["field"]) . "&value=');
483
+ qsl('div').onclick = whisperClick;", "")
484
  );
485
  }
486
  if (like_bool($field)) {
502
  return '';
503
  }
504
 
505
+ function editHint($table, $field, $value) {
506
+ return (preg_match('~\s+(\[.*\])$~', ($field["comment"] != "" ? $field["comment"] : $field["field"]), $match) ? h(" $match[1]") : '');
507
+ }
508
+
509
  function processInput($field, $value, $function = "") {
510
  if ($function == "now") {
511
  return "$function()";
564
  return $ext;
565
  }
566
 
567
+ function importServerPath() {
568
+ }
569
+
570
  function homepage() {
571
  return true;
572
  }
576
  ?>
577
  <h1>
578
  <?php echo $this->name(); ?> <span class="version"><?php echo $VERSION; ?></span>
579
+ <a href="https://www.adminer.org/editor/#download"<?php echo target_blank(); ?> id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? h($_COOKIE["adminer_version"]) : ""); ?></a>
580
  </h1>
581
  <?php
582
  if ($missing == "auth") {
585
  foreach ($servers[""] as $username => $password) {
586
  if ($password !== null) {
587
  if ($first) {
588
+ echo "<p id='logins'>";
589
+ echo script("mixin(qs('#logins'), {onmouseover: menuOver, onmouseout: menuOut});");
590
  $first = false;
591
  }
592
  echo "<a href='" . h(auth_url($vendor, "", $username)) . "'>" . ($username != "" ? h($username) : "<i>" . lang('empty') . "</i>") . "</a><br>\n";
610
  }
611
 
612
  function tablesPrint($tables) {
613
+ echo "<ul id='tables'>";
614
+ echo script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
615
  foreach ($tables as $row) {
616
+ echo '<li>';
617
  $name = $this->tableName($row);
618
  if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name
619
  echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'"
620
  . bold($_GET["select"] == $row["Name"] || $_GET["edit"] == $row["Name"], "select")
621
+ . " title='" . lang('Select data') . "'>$name</a>\n"
622
  ;
623
  }
624
  }
625
+ echo "</ul>\n";
626
  }
627
 
628
  function _foreignColumn($foreignKeys, $column) {
adminer/adminer/editor/index.php CHANGED
@@ -3,8 +3,8 @@
3
  * @link https://www.adminer.org/
4
  * @author Jakub Vrana, https://www.vrana.cz/
5
  * @copyright 2009 Jakub Vrana
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
 
10
  include "../adminer/include/bootstrap.inc.php";
3
  * @link https://www.adminer.org/
4
  * @author Jakub Vrana, https://www.vrana.cz/
5
  * @copyright 2009 Jakub Vrana
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
 
10
  include "../adminer/include/bootstrap.inc.php";
adminer/adminer/editor/script.inc.php CHANGED
@@ -2,7 +2,7 @@
2
  if ($_GET["script"] == "kill") {
3
  $connection->query("KILL " . number($_POST["kill"]));
4
 
5
- } elseif (list($table, $id, $name) = $adminer->_foreignColumn(column_foreign_keys($_GET["source"]), $_GET["field"])) {
6
  $limit = 11;
7
  $result = $connection->query("SELECT $id, $name FROM " . table($table) . " WHERE " . (preg_match('~^[0-9]+$~', $_GET["value"]) ? "$id = $_GET[value] OR " : "") . "$name LIKE " . q("$_GET[value]%") . " ORDER BY 2 LIMIT $limit");
8
  for ($i=1; ($row = $result->fetch_row()) && $i < $limit; $i++) {
2
  if ($_GET["script"] == "kill") {
3
  $connection->query("KILL " . number($_POST["kill"]));
4
 
5
+ } elseif (list($table, $id, $name) = $adminer->_foreignColumn(column_foreign_keys($_GET["source"]), $_GET["field"])) { // complete
6
  $limit = 11;
7
  $result = $connection->query("SELECT $id, $name FROM " . table($table) . " WHERE " . (preg_match('~^[0-9]+$~', $_GET["value"]) ? "$id = $_GET[value] OR " : "") . "$name LIKE " . q("$_GET[value]%") . " ORDER BY 2 LIMIT $limit");
8
  for ($i=1; ($row = $result->fetch_row()) && $i < $limit; $i++) {
adminer/adminer/editor/static/editing.js CHANGED
@@ -1,5 +1,8 @@
1
  // Editor specific functions
2
 
 
 
 
3
  function selectFieldChange() {
4
  }
5
 
@@ -11,7 +14,34 @@ function helpMouseover() {
11
  function helpMouseout() {
12
  }
13
 
14
- function whisperClick(event, field) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  var el = getTarget(event);
16
  if (isTag(el, 'a') && !(event.button || event.shiftKey || event.altKey || isCtrl(event))) {
17
  field.value = el.firstChild.data;
@@ -21,20 +51,12 @@ function whisperClick(event, field) {
21
  }
22
  }
23
 
24
- function whisper(url, field) {
25
- if (field.orig != field.value) { // ignore arrows, Shift, ...
26
- field.orig = field.value;
27
- field.previousSibling.value = field.value; // accept number, reject string
28
- return ajax(url + encodeURIComponent(field.value), function (xmlhttp) {
29
- if (xmlhttp.status && field.orig == field.value) { // ignore old responses
30
- field.nextSibling.innerHTML = xmlhttp.responseText;
31
- field.nextSibling.style.display = '';
32
- var a = field.nextSibling.firstChild;
33
- if (a && a.firstChild.data == field.value) {
34
- field.previousSibling.value = decodeURIComponent(a.href.replace(/.*=/, ''));
35
- a.className = 'active';
36
- }
37
- }
38
- });
39
- }
40
  }
1
  // Editor specific functions
2
 
3
+ function messagesPrint() {
4
+ }
5
+
6
  function selectFieldChange() {
7
  }
8
 
14
  function helpMouseout() {
15
  }
16
 
17
+ /** Display typeahead
18
+ * @param string
19
+ * @this HTMLInputElement
20
+ */
21
+ function whisper(url) {
22
+ var field = this;
23
+ field.orig = field.value;
24
+ field.previousSibling.value = field.value; // accept number, reject string
25
+ return ajax(url + encodeURIComponent(field.value), function (xmlhttp) {
26
+ if (xmlhttp.status && field.orig == field.value) { // ignore old responses
27
+ field.nextSibling.innerHTML = xmlhttp.responseText;
28
+ field.nextSibling.style.display = '';
29
+ var a = field.nextSibling.firstChild;
30
+ if (a && a.firstChild.data == field.value) {
31
+ field.previousSibling.value = decodeURIComponent(a.href.replace(/.*=/, ''));
32
+ a.className = 'active';
33
+ }
34
+ }
35
+ });
36
+ }
37
+
38
+ /** Select typeahead value
39
+ * @param MouseEvent
40
+ * @return boolean false for success
41
+ * @this HTMLDivElement
42
+ */
43
+ function whisperClick(event) {
44
+ var field = this.previousSibling;
45
  var el = getTarget(event);
46
  if (isTag(el, 'a') && !(event.button || event.shiftKey || event.altKey || isCtrl(event))) {
47
  field.value = el.firstChild.data;
51
  }
52
  }
53
 
54
+ /** Add new attachment field
55
+ * @this HTMLInputElement
56
+ */
57
+ function emailFileChange() {
58
+ this.onchange = function () { };
59
+ var el = this.cloneNode(true);
60
+ el.value = '';
61
+ this.parentNode.appendChild(el);
 
 
 
 
 
 
 
 
62
  }
adminer/adminer/externals/jush/modules/jush-cnf.js CHANGED
@@ -5,10 +5,10 @@ jush.tr.cnf_php = { _1: /()/ };
5
  jush.tr.cnf_phpini = { cnf_phpini_val: /[ \t]/ };
6
  jush.tr.cnf_phpini_val = { apo: /'/, quo: /"/, _2: /(?=\n)/ };
7
 
8
- jush.urls.cnf_http = 'http://httpd.apache.org/docs/current/mod/$key.html#$val';
9
  jush.urls.cnf_php = 'http://www.php.net/$key';
10
  jush.urls.cnf_phpini = 'http://www.php.net/configuration.changes#$key';
11
- jush.urls.cnf = ['http://httpd.apache.org/docs/current/mod/$key.html#$1',
12
  'beos', 'core', 'mod_actions', 'mod_alias', 'mod_auth_basic', 'mod_auth_digest', 'mod_authn_alias', 'mod_authn_anon', 'mod_authn_dbd', 'mod_authn_dbm', 'mod_authn_default', 'mod_authn_file', 'mod_authnz_ldap', 'mod_authz_dbm', 'mod_authz_default', 'mod_authz_groupfile', 'mod_authz_host', 'mod_authz_owner', 'mod_authz_user', 'mod_autoindex', 'mod_cache', 'mod_cern_meta', 'mod_cgi', 'mod_cgid', 'mod_dav', 'mod_dav_fs', 'mod_dav_lock', 'mod_dbd', 'mod_deflate', 'mod_dir', 'mod_disk_cache', 'mod_dumpio', 'mod_echo', 'mod_env', 'mod_example', 'mod_expires', 'mod_ext_filter', 'mod_file_cache', 'mod_filter', 'mod_charset_lite', 'mod_ident', 'mod_imagemap', 'mod_include', 'mod_info', 'mod_isapi', 'mod_ldap', 'mod_log_config', 'mod_log_forensic', 'mod_mem_cache', 'mod_mime', 'mod_mime_magic', 'mod_negotiation', 'mod_nw_ssl', 'mod_proxy', 'mod_rewrite', 'mod_setenvif', 'mod_so', 'mod_speling', 'mod_ssl', 'mod_status', 'mod_substitute', 'mod_suexec', 'mod_userdir', 'mod_usertrack', 'mod_version', 'mod_vhost_alias', 'mpm_common', 'mpm_netware', 'mpm_winnt', 'prefork'
13
  ];
14
 
5
  jush.tr.cnf_phpini = { cnf_phpini_val: /[ \t]/ };
6
  jush.tr.cnf_phpini_val = { apo: /'/, quo: /"/, _2: /(?=\n)/ };
7
 
8
+ jush.urls.cnf_http = 'https://httpd.apache.org/docs/current/mod/$key.html#$val';
9
  jush.urls.cnf_php = 'http://www.php.net/$key';
10
  jush.urls.cnf_phpini = 'http://www.php.net/configuration.changes#$key';
11
+ jush.urls.cnf = ['https://httpd.apache.org/docs/current/mod/$key.html#$1',
12
  'beos', 'core', 'mod_actions', 'mod_alias', 'mod_auth_basic', 'mod_auth_digest', 'mod_authn_alias', 'mod_authn_anon', 'mod_authn_dbd', 'mod_authn_dbm', 'mod_authn_default', 'mod_authn_file', 'mod_authnz_ldap', 'mod_authz_dbm', 'mod_authz_default', 'mod_authz_groupfile', 'mod_authz_host', 'mod_authz_owner', 'mod_authz_user', 'mod_autoindex', 'mod_cache', 'mod_cern_meta', 'mod_cgi', 'mod_cgid', 'mod_dav', 'mod_dav_fs', 'mod_dav_lock', 'mod_dbd', 'mod_deflate', 'mod_dir', 'mod_disk_cache', 'mod_dumpio', 'mod_echo', 'mod_env', 'mod_example', 'mod_expires', 'mod_ext_filter', 'mod_file_cache', 'mod_filter', 'mod_charset_lite', 'mod_ident', 'mod_imagemap', 'mod_include', 'mod_info', 'mod_isapi', 'mod_ldap', 'mod_log_config', 'mod_log_forensic', 'mod_mem_cache', 'mod_mime', 'mod_mime_magic', 'mod_negotiation', 'mod_nw_ssl', 'mod_proxy', 'mod_rewrite', 'mod_setenvif', 'mod_so', 'mod_speling', 'mod_ssl', 'mod_status', 'mod_substitute', 'mod_suexec', 'mod_userdir', 'mod_usertrack', 'mod_version', 'mod_vhost_alias', 'mpm_common', 'mpm_netware', 'mpm_winnt', 'prefork'
13
  ];
14
 
adminer/adminer/externals/jush/modules/jush-css.js CHANGED
@@ -6,9 +6,9 @@ jush.tr.css_val = { php: jush.php, quo: /"/, apo: /'/, css_js: /expression\s*\(/
6
  jush.tr.css_js = { php: jush.php, css_js: /\(/, _1: /\)/ };
7
  jush.tr.clr = { _1: /(?=[^a-fA-F0-9])/ };
8
 
9
- jush.urls.css_val = 'http://www.w3.org/TR/CSS21/$key.html#propdef-$val';
10
- jush.urls.css_at = 'http://www.w3.org/TR/CSS21/$key';
11
- jush.urls.css = ['http://www.w3.org/TR/css3-selectors/#$key',
12
  'link', 'useraction-pseudos', '$1-pseudo', 'enableddisabled', '$1', '$1', 'gen-content'
13
  ];
14
 
@@ -25,26 +25,26 @@ jush.links.css_val = {
25
  'visudet': /^(height|line-height|max-height|max-width|min-height|min-width|vertical-align|width)$/i,
26
  'visufx': /^(clip|overflow|visibility)$/i,
27
  'visuren': /^(bottom|clear|direction|display|float|left|position|right|top|unicode-bidi|z-index)$/i,
28
- 'http://www.w3.org/TR/css3-cascade/#$val': /^(?:-[a-z]+-)?(all)$/i,
29
- 'http://www.w3.org/TR/css3-writing-modes/#$val': /^(?:-[a-z]+-)?(text-combine-horizontal|text-orientation|writing-mode)$/i,
30
- 'http://www.w3.org/TR/css3-break/#$val': /^(?:-[a-z]+-)?(break-after|break-before|break-inside)$/i,
31
- 'http://www.w3.org/TR/css3-images/#$val': /^(?:-[a-z]+-)?(image-orientation|image-resolution|object-fit|object-position)$/i,
32
- 'http://www.w3.org/TR/css3-marquee/#$val': /^(?:-[a-z]+-)?(marquee-direction|marquee-play-count|marquee-speed|marquee-style|overflow-style)$/i,
33
- 'http://www.w3.org/TR/css3-grid/#$val': /^(?:-[a-z]+-)?(grid-columns|grid-rows|align-content|align-items|align-self|justify-content|justify-items|justify-self)$/i,
34
- 'http://www.w3.org/TR/css-fonts-3/#$val-prop': /^(?:-[a-z]+-)?(font-feature-settings|font-kerning|font-language-override|font-size-adjust|font-stretch|font-synthesis|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position)$/i,
35
- 'http://www.w3.org/TR/css-overflow-3/#$val': /^(?:-[a-z]+-)?(max-lines|overflow-x|overflow-y)$/i,
36
- 'http://www.w3.org/TR/css3-ui/#$val': /^(?:-[a-z]+-)?(box-sizing|icon|ime-mode|nav-index|nav-up|nav-right|nav-down|nav-left|outline-offset|resize|text-overflow)$/i,
37
- 'http://www.w3.org/TR/css3-background/#$val': /^(?:-[a-z]+-)?(background-clip|background-origin|background-size|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-radius|border-top-left-radius|border-top-right-radius|border-bottom-right-radius|border-bottom-left-radius|box-decoration-break|box-shadow)$/i
38
  };
39
  jush.links.css_at = {
40
  'page.html#page-box': /^page$/i,
41
  'media.html#at-media-rule': /^media$/i,
42
  'cascade.html#at-import': /^import$/i,
43
  'syndata.html#charset': /^charset$/i,
44
- 'http://www.w3.org/TR/css3-conditional/#at-$val': /^supports$/i,
45
- 'http://www.w3.org/TR/css-fonts-3/#at-$val-rule': /^(font-face|font-feature-values)$/i,
46
- 'http://www.w3.org/TR/css-counter-styles-3/#the-$val-rule': /^counter-style$/i,
47
- 'http://www.w3.org/TR/css3-namespace/#declaration': /namespace/
48
  };
49
 
50
  jush.links2.css = /(:)(link|visited|(hover|active|focus)|(target|lang|root|nth-child|nth-last-child|nth-of-type|nth-last-of-type|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty)|(enabled|disabled)|(checked|indeterminate|not)|(first-line|first-letter)|(before|after))(\b)/gi;
6
  jush.tr.css_js = { php: jush.php, css_js: /\(/, _1: /\)/ };
7
  jush.tr.clr = { _1: /(?=[^a-fA-F0-9])/ };
8
 
9
+ jush.urls.css_val = 'https://www.w3.org/TR/CSS21/$key.html#propdef-$val';
10
+ jush.urls.css_at = 'https://www.w3.org/TR/CSS21/$key';
11
+ jush.urls.css = ['https://www.w3.org/TR/css3-selectors/#$key',
12
  'link', 'useraction-pseudos', '$1-pseudo', 'enableddisabled', '$1', '$1', 'gen-content'
13
  ];
14
 
25
  'visudet': /^(height|line-height|max-height|max-width|min-height|min-width|vertical-align|width)$/i,
26
  'visufx': /^(clip|overflow|visibility)$/i,
27
  'visuren': /^(bottom|clear|direction|display|float|left|position|right|top|unicode-bidi|z-index)$/i,
28
+ 'https://www.w3.org/TR/css3-cascade/#$val': /^(?:-[a-z]+-)?(all)$/i,
29
+ 'https://www.w3.org/TR/css3-writing-modes/#$val': /^(?:-[a-z]+-)?(text-combine-horizontal|text-orientation|writing-mode)$/i,
30
+ 'https://www.w3.org/TR/css3-break/#$val': /^(?:-[a-z]+-)?(break-after|break-before|break-inside)$/i,
31
+ 'https://www.w3.org/TR/css3-images/#$val': /^(?:-[a-z]+-)?(image-orientation|image-resolution|object-fit|object-position)$/i,
32
+ 'https://www.w3.org/TR/css3-marquee/#$val': /^(?:-[a-z]+-)?(marquee-direction|marquee-play-count|marquee-speed|marquee-style|overflow-style)$/i,
33
+ 'https://www.w3.org/TR/css3-grid/#$val': /^(?:-[a-z]+-)?(grid-columns|grid-rows|align-content|align-items|align-self|justify-content|justify-items|justify-self)$/i,
34
+ 'https://www.w3.org/TR/css-fonts-3/#$val-prop': /^(?:-[a-z]+-)?(font-feature-settings|font-kerning|font-language-override|font-size-adjust|font-stretch|font-synthesis|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position)$/i,
35
+ 'https://www.w3.org/TR/css-overflow-3/#$val': /^(?:-[a-z]+-)?(max-lines|overflow-x|overflow-y)$/i,
36
+ 'https://www.w3.org/TR/css3-ui/#$val': /^(?:-[a-z]+-)?(box-sizing|icon|ime-mode|nav-index|nav-up|nav-right|nav-down|nav-left|outline-offset|resize|text-overflow)$/i,
37
+ 'https://www.w3.org/TR/css3-background/#$val': /^(?:-[a-z]+-)?(background-clip|background-origin|background-size|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-radius|border-top-left-radius|border-top-right-radius|border-bottom-right-radius|border-bottom-left-radius|box-decoration-break|box-shadow)$/i
38
  };
39
  jush.links.css_at = {
40
  'page.html#page-box': /^page$/i,
41
  'media.html#at-media-rule': /^media$/i,
42
  'cascade.html#at-import': /^import$/i,
43
  'syndata.html#charset': /^charset$/i,
44
+ 'https://www.w3.org/TR/css3-conditional/#at-$val': /^supports$/i,
45
+ 'https://www.w3.org/TR/css-fonts-3/#at-$val-rule': /^(font-face|font-feature-values)$/i,
46
+ 'https://www.w3.org/TR/css-counter-styles-3/#the-$val-rule': /^counter-style$/i,
47
+ 'https://www.w3.org/TR/css3-namespace/#declaration': /namespace/
48
  };
49
 
50
  jush.links2.css = /(:)(link|visited|(hover|active|focus)|(target|lang|root|nth-child|nth-last-child|nth-of-type|nth-last-of-type|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty)|(enabled|disabled)|(checked|indeterminate|not)|(first-line|first-letter)|(before|after))(\b)/gi;
adminer/adminer/externals/jush/modules/jush-htm.js CHANGED
@@ -15,13 +15,13 @@ jush.tr.xml = { php: jush.php, htm_com: /<!--/, xml_tag: /(<)(\/?[-\w:]+)/, ent:
15
  jush.tr.xml_tag = { php: jush.php, xml_att: /(\s*)([-\w:]+)()/, _1: />/ };
16
  jush.tr.xml_att = { php: jush.php, att_quo: /\s*=\s*"/, att_apo: /\s*=\s*'/, _1: /()/ };
17
 
18
- jush.urls.tag = 'http://www.w3.org/TR/html4/$key.html#edef-$val';
19
- jush.urls.tag_css = 'http://www.w3.org/TR/html4/$key.html#edef-$val';
20
- jush.urls.tag_js = 'http://www.w3.org/TR/html4/$key.html#edef-$val';
21
- jush.urls.att = 'http://www.w3.org/TR/html4/$key.html#adef-$val';
22
- jush.urls.att_css = 'http://www.w3.org/TR/html4/$key.html#adef-$val';
23
- jush.urls.att_js = 'http://www.w3.org/TR/html4/$key.html#adef-$val';
24
- jush.urls.att_http = 'http://www.w3.org/TR/html4/$key.html#adef-$val';
25
 
26
  jush.links.tag = {
27
  'interact/forms': /^(button|fieldset|form|input|isindex|label|legend|optgroup|option|select|textarea)$/i,
@@ -35,22 +35,22 @@ jush.links.tag = {
35
  'struct/objects': /^(applet|area|img|map|object|param)$/i,
36
  'struct/tables': /^(caption|col|colgroup|table|tbody|td|tfoot|th|thead|tr)$/i,
37
  'struct/text': /^(abbr|acronym|blockquote|br|cite|code|del|dfn|em|ins|kbd|p|pre|q|samp|strong|sub|sup|var)$/i,
38
- 'http://whatwg.org/html/sections.html#the-$val-element': /^(section|article|aside|hgroup|header|footer|nav)$/i,
39
- 'http://whatwg.org/html/grouping-content.html#the-$val-element': /^(main|figure|figcaption)$/i,
40
- 'http://whatwg.org/html/the-video-element.html#the-$val-element': /^(video|audio|source|track)$/i,
41
- 'http://whatwg.org/html/the-iframe-element.html#the-$val-element': /^(embed)$/i,
42
- 'http://whatwg.org/html/text-level-semantics.html#the-$val-element': /^(mark|time|data|ruby|rt|rp|bdi|wbr)$/i,
43
- 'http://whatwg.org/html/the-button-element.html#the-$val-element': /^(progress|meter|datalist|keygen|output)$/i,
44
- 'http://whatwg.org/html/commands.html#the-$val-element': /^(dialog)$/i,
45
- 'http://whatwg.org/html/the-canvas-element.html#the-$val-element': /^(canvas)$/i,
46
- 'http://whatwg.org/html/interactive-elements.html#the-$val-element': /^(menuitem|details|summary)$/i
47
  };
48
  jush.links.tag_css = { 'present/styles': /^(style)$/i };
49
  jush.links.tag_js = { 'interact/scripts': /^(script)$/i };
50
  jush.links.att_css = { 'present/styles': /^(style)$/i };
51
  jush.links.att_js = {
52
  'interact/scripts': /^(onblur|onchange|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onselect|onsubmit|onunload|onunload)$/i,
53
- 'http://whatwg.org/html/webappapis.html#handler-$val': /^(onabort|oncancel|oncanplay|oncanplaythrough|onclose|oncontextmenu|oncuechange|ondrag|ondragend|ondragenter|ondragexit|ondragleave|ondragover|ondragstart|ondrop|ondurationchange|onemptied|onended|oninput|oninvalid|onloadeddata|onloadedmetadata|onloadstart|onmouseenter|onmouseleave|onmousewheel|onpause|onplay|onplaying|onprogress|onratechange|onseeked|onseeking|onshow|onsort|onstalled|onsuspend|ontimeupdate|onvolumechange|onwaiting)$/i
54
  };
55
  jush.links.att_http = { 'struct/global': /^(http-equiv)$/i };
56
  jush.links.att = {
@@ -66,32 +66,32 @@ jush.links.att = {
66
  'struct/objects': /^(align-IMG|alt|archive-APPLET|archive-OBJECT|border-IMG|classid|code|codebase-OBJECT|codebase-APPLET|codetype|coords|data|declare|height-IMG|height-APPLET|hspace|ismap|longdesc-IMG|name-APPLET|name-IMG|name-MAP|name-PARAM|nohref|object|shape|src-IMG|standby|type-OBJECT|type-PARAM|usemap|value-PARAM|valuetype|vspace|width-IMG|width-APPLET)$/i,
67
  'struct/tables': /^(abbr|align-CAPTION|align-TABLE|align-TD|axis|border-TABLE|cellpadding|cellspacing|char|charoff|colspan|frame|headers|height-TH|nowrap|rowspan|rules|scope|span-COL|span-COLGROUP|summary|valign|width-TABLE|width-TH|width-COL|width-COLGROUP)$/i,
68
  'struct/text': /^(cite-Q|cite-INS|datetime|width-PRE)$/i,
69
- 'http://whatwg.org/html/links.html#attr-hyperlink-$val': /^(download)$/i,
70
- 'http://whatwg.org/html/semantics.html#attr-meta-$val': /^(charset)$/i,
71
- 'http://whatwg.org/html/tabular-data.html#attr-table-$val': /^(sortable)$/i,
72
- 'http://whatwg.org/html/tabular-data.html#attr-th-$val': /^(sorted)$/i,
73
- 'http://whatwg.org/html/association-of-controls-and-forms.html#attr-fe-$val': /^(autofocus|autocomplete|dirname|inputmode)$/i,
74
- 'http://whatwg.org/html/common-input-element-attributes.html#attr-input-$val': /^(placeholder|required|min|max|pattern|step|list)$/i,
75
- 'http://whatwg.org/html/association-of-controls-and-forms.html#attr-fae-$val': /^(form)$/i,
76
- 'http://whatwg.org/html/the-button-element.html#attr-textarea-$val': /^(wrap)$/i,
77
- 'http://whatwg.org/html/association-of-controls-and-forms.html#attr-fs-$val': /^(novalidate|formaction|formenctype|formmethod|formnovalidate|formtarget)$/i,
78
- 'http://whatwg.org/html/interactive-elements.html#attr-$val': /^(contextmenu)$/i,
79
- 'http://whatwg.org/html/the-button-element.html#attr-button-$val': /^(menu)$/i,
80
- 'http://whatwg.org/html/semantics.html#attr-style-$val': /^(scoped)$/i,
81
- 'http://whatwg.org/html/scripting-1.html#attr-script-$val': /^(async)$/i,
82
- 'http://whatwg.org/html/semantics.html#attr-html-$val': /^(manifest)$/i,
83
- 'http://whatwg.org/html/links.html#attr-link-$val': /^(sizes)$/i,
84
- 'http://whatwg.org/html/grouping-content.html#attr-ol-$val': /^(reversed)$/i,
85
- 'http://whatwg.org/html/the-iframe-element.html#attr-iframe-$val': /^(sandbox|seamless|srcdoc)$/i,
86
- 'http://whatwg.org/html/the-iframe-element.html#attr-object-$val': /^(typemustmatch)$/i,
87
- 'http://whatwg.org/html/embedded-content-1.html#attr-img-$val': /^(crossorigin|srcset)$/i,
88
- 'http://whatwg.org/html/editing.html#attr-$val': /^(contenteditable|spellcheck)$/i,
89
- 'http://whatwg.org/html/elements.html#attr-data-*': /^(data-.+)$/i,
90
- 'http://whatwg.org/html/dnd.html#the-$val-attribute': /^(draggable|dropzone)$/i,
91
- 'http://whatwg.org/html/editing.html#the-$val-attribute': /^(hidden|inert)$/i,
92
- 'http://www.w3.org/WAI/PF/aria/states_and_properties#$val': /^(aria-.+)$/i,
93
- 'http://whatwg.org/html/infrastructure.html#attr-aria-$val': /^(role)$/i,
94
- 'http://whatwg.org/html/elements.html#attr-$val': /^(translate)$/i,
95
- 'http://schema.org/docs/gs.html#microdata_itemscope_itemtype': /^(itemscope|itemtype)$/i,
96
- 'http://schema.org/docs/gs.html#microdata_$val': /^(itemprop)$/i
97
  };
15
  jush.tr.xml_tag = { php: jush.php, xml_att: /(\s*)([-\w:]+)()/, _1: />/ };
16
  jush.tr.xml_att = { php: jush.php, att_quo: /\s*=\s*"/, att_apo: /\s*=\s*'/, _1: /()/ };
17
 
18
+ jush.urls.tag = 'https://www.w3.org/TR/html4/$key.html#edef-$val';
19
+ jush.urls.tag_css = 'https://www.w3.org/TR/html4/$key.html#edef-$val';
20
+ jush.urls.tag_js = 'https://www.w3.org/TR/html4/$key.html#edef-$val';
21
+ jush.urls.att = 'https://www.w3.org/TR/html4/$key.html#adef-$val';
22
+ jush.urls.att_css = 'https://www.w3.org/TR/html4/$key.html#adef-$val';
23
+ jush.urls.att_js = 'https://www.w3.org/TR/html4/$key.html#adef-$val';
24
+ jush.urls.att_http = 'https://www.w3.org/TR/html4/$key.html#adef-$val';
25
 
26
  jush.links.tag = {
27
  'interact/forms': /^(button|fieldset|form|input|isindex|label|legend|optgroup|option|select|textarea)$/i,
35
  'struct/objects': /^(applet|area|img|map|object|param)$/i,
36
  'struct/tables': /^(caption|col|colgroup|table|tbody|td|tfoot|th|thead|tr)$/i,
37
  'struct/text': /^(abbr|acronym|blockquote|br|cite|code|del|dfn|em|ins|kbd|p|pre|q|samp|strong|sub|sup|var)$/i,
38
+ 'https://whatwg.org/html/sections.html#the-$val-element': /^(section|article|aside|hgroup|header|footer|nav)$/i,
39
+ 'https://whatwg.org/html/grouping-content.html#the-$val-element': /^(main|figure|figcaption)$/i,
40
+ 'https://whatwg.org/html/the-video-element.html#the-$val-element': /^(video|audio|source|track)$/i,
41
+ 'https://whatwg.org/html/the-iframe-element.html#the-$val-element': /^(embed)$/i,
42
+ 'https://whatwg.org/html/text-level-semantics.html#the-$val-element': /^(mark|time|data|ruby|rt|rp|bdi|wbr)$/i,
43
+ 'https://whatwg.org/html/the-button-element.html#the-$val-element': /^(progress|meter|datalist|keygen|output)$/i,
44
+ 'https://whatwg.org/html/commands.html#the-$val-element': /^(dialog)$/i,
45
+ 'https://whatwg.org/html/the-canvas-element.html#the-$val-element': /^(canvas)$/i,
46
+ 'https://whatwg.org/html/interactive-elements.html#the-$val-element': /^(menuitem|details|summary)$/i
47
  };
48
  jush.links.tag_css = { 'present/styles': /^(style)$/i };
49
  jush.links.tag_js = { 'interact/scripts': /^(script)$/i };
50
  jush.links.att_css = { 'present/styles': /^(style)$/i };
51
  jush.links.att_js = {
52
  'interact/scripts': /^(onblur|onchange|onclick|ondblclick|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onreset|onselect|onsubmit|onunload|onunload)$/i,
53
+ 'https://whatwg.org/html/webappapis.html#handler-$val': /^(onabort|oncancel|oncanplay|oncanplaythrough|onclose|oncontextmenu|oncuechange|ondrag|ondragend|ondragenter|ondragexit|ondragleave|ondragover|ondragstart|ondrop|ondurationchange|onemptied|onended|oninput|oninvalid|onloadeddata|onloadedmetadata|onloadstart|onmouseenter|onmouseleave|onmousewheel|onpause|onplay|onplaying|onprogress|onratechange|onseeked|onseeking|onshow|onsort|onstalled|onsuspend|ontimeupdate|onvolumechange|onwaiting)$/i
54
  };
55
  jush.links.att_http = { 'struct/global': /^(http-equiv)$/i };
56
  jush.links.att = {
66
  'struct/objects': /^(align-IMG|alt|archive-APPLET|archive-OBJECT|border-IMG|classid|code|codebase-OBJECT|codebase-APPLET|codetype|coords|data|declare|height-IMG|height-APPLET|hspace|ismap|longdesc-IMG|name-APPLET|name-IMG|name-MAP|name-PARAM|nohref|object|shape|src-IMG|standby|type-OBJECT|type-PARAM|usemap|value-PARAM|valuetype|vspace|width-IMG|width-APPLET)$/i,
67
  'struct/tables': /^(abbr|align-CAPTION|align-TABLE|align-TD|axis|border-TABLE|cellpadding|cellspacing|char|charoff|colspan|frame|headers|height-TH|nowrap|rowspan|rules|scope|span-COL|span-COLGROUP|summary|valign|width-TABLE|width-TH|width-COL|width-COLGROUP)$/i,
68
  'struct/text': /^(cite-Q|cite-INS|datetime|width-PRE)$/i,
69
+ 'https://whatwg.org/html/links.html#attr-hyperlink-$val': /^(download)$/i,
70
+ 'https://whatwg.org/html/semantics.html#attr-meta-$val': /^(charset)$/i,
71
+ 'https://whatwg.org/html/tabular-data.html#attr-table-$val': /^(sortable)$/i,
72
+ 'https://whatwg.org/html/tabular-data.html#attr-th-$val': /^(sorted)$/i,
73
+ 'https://whatwg.org/html/association-of-controls-and-forms.html#attr-fe-$val': /^(autofocus|autocomplete|dirname|inputmode)$/i,
74
+ 'https://whatwg.org/html/common-input-element-attributes.html#attr-input-$val': /^(placeholder|required|min|max|pattern|step|list)$/i,
75
+ 'https://whatwg.org/html/association-of-controls-and-forms.html#attr-fae-$val': /^(form)$/i,
76
+ 'https://whatwg.org/html/the-button-element.html#attr-textarea-$val': /^(wrap)$/i,
77
+ 'https://whatwg.org/html/association-of-controls-and-forms.html#attr-fs-$val': /^(novalidate|formaction|formenctype|formmethod|formnovalidate|formtarget)$/i,
78
+ 'https://whatwg.org/html/interactive-elements.html#attr-$val': /^(contextmenu)$/i,
79
+ 'https://whatwg.org/html/the-button-element.html#attr-button-$val': /^(menu)$/i,
80
+ 'https://whatwg.org/html/semantics.html#attr-style-$val': /^(scoped)$/i,
81
+ 'https://whatwg.org/html/scripting-1.html#attr-script-$val': /^(async)$/i,
82
+ 'https://whatwg.org/html/semantics.html#attr-html-$val': /^(manifest)$/i,
83
+ 'https://whatwg.org/html/links.html#attr-link-$val': /^(sizes)$/i,
84
+ 'https://whatwg.org/html/grouping-content.html#attr-ol-$val': /^(reversed)$/i,
85
+ 'https://whatwg.org/html/the-iframe-element.html#attr-iframe-$val': /^(sandbox|seamless|srcdoc)$/i,
86
+ 'https://whatwg.org/html/the-iframe-element.html#attr-object-$val': /^(typemustmatch)$/i,
87
+ 'https://whatwg.org/html/embedded-content-1.html#attr-img-$val': /^(crossorigin|srcset)$/i,
88
+ 'https://whatwg.org/html/editing.html#attr-$val': /^(contenteditable|spellcheck)$/i,
89
+ 'https://whatwg.org/html/elements.html#attr-data-*': /^(data-.+)$/i,
90
+ 'https://whatwg.org/html/dnd.html#the-$val-attribute': /^(draggable|dropzone)$/i,
91
+ 'https://whatwg.org/html/editing.html#the-$val-attribute': /^(hidden|inert)$/i,
92
+ 'https://www.w3.org/WAI/PF/aria/states_and_properties#$val': /^(aria-.+)$/i,
93
+ 'https://whatwg.org/html/infrastructure.html#attr-aria-$val': /^(role)$/i,
94
+ 'https://whatwg.org/html/elements.html#attr-$val': /^(translate)$/i,
95
+ 'https://schema.org/docs/gs.html#microdata_itemscope_itemtype': /^(itemscope|itemtype)$/i,
96
+ 'https://schema.org/docs/gs.html#microdata_$val': /^(itemprop)$/i
97
  };
adminer/adminer/externals/jush/modules/jush-http.js CHANGED
@@ -1,12 +1,12 @@
1
  jush.tr.http = { _0: /$/ };
2
 
3
- jush.urls.http = ['http://www.w3.org/Protocols/rfc2616/rfc2616-$key',
4
  'sec10.html#sec10.1.1', 'sec10.html#sec10.1.2', 'sec10.html#sec10.2.1', 'sec10.html#sec10.2.2', 'sec10.html#sec10.2.3', 'sec10.html#sec10.2.4', 'sec10.html#sec10.2.5', 'sec10.html#sec10.2.6', 'sec10.html#sec10.2.7', 'sec10.html#sec10.3.1', 'sec10.html#sec10.3.2', 'sec10.html#sec10.3.3', 'sec10.html#sec10.3.4', 'sec10.html#sec10.3.5', 'sec10.html#sec10.3.6', 'sec10.html#sec10.3.7', 'sec10.html#sec10.3.8', 'sec10.html#sec10.4.1', 'sec10.html#sec10.4.2', 'sec10.html#sec10.4.3', 'sec10.html#sec10.4.4', 'sec10.html#sec10.4.5', 'sec10.html#sec10.4.6', 'sec10.html#sec10.4.7', 'sec10.html#sec10.4.8', 'sec10.html#sec10.4.9', 'sec10.html#sec10.4.10', 'sec10.html#sec10.4.11', 'sec10.html#sec10.4.12', 'sec10.html#sec10.4.13', 'sec10.html#sec10.4.14', 'sec10.html#sec10.4.15', 'sec10.html#sec10.4.16', 'sec10.html#sec10.4.17', 'sec10.html#sec10.4.18', 'sec10.html#sec10.5.1', 'sec10.html#sec10.5.2', 'sec10.html#sec10.5.3', 'sec10.html#sec10.5.4', 'sec10.html#sec10.5.5', 'sec10.html#sec10.5.6',
5
  'sec14.html#sec14.1', 'sec14.html#sec14.2', 'sec14.html#sec14.3', 'sec14.html#sec14.4', 'sec14.html#sec14.5', 'sec14.html#sec14.6', 'sec14.html#sec14.7', 'sec14.html#sec14.8', 'sec14.html#sec14.9', 'sec14.html#sec14.10', 'sec14.html#sec14.11', 'sec14.html#sec14.12', 'sec14.html#sec14.13', 'sec14.html#sec14.14', 'sec14.html#sec14.15', 'sec14.html#sec14.16', 'sec14.html#sec14.17', 'sec14.html#sec14.18', 'sec14.html#sec14.19', 'sec14.html#sec14.20', 'sec14.html#sec14.21', 'sec14.html#sec14.22', 'sec14.html#sec14.23', 'sec14.html#sec14.24', 'sec14.html#sec14.25', 'sec14.html#sec14.26', 'sec14.html#sec14.27', 'sec14.html#sec14.28', 'sec14.html#sec14.29', 'sec14.html#sec14.30', 'sec14.html#sec14.31', 'sec14.html#sec14.32', 'sec14.html#sec14.33', 'sec14.html#sec14.34', 'sec14.html#sec14.35', 'sec14.html#sec14.36', 'sec14.html#sec14.37', 'sec14.html#sec14.38', 'sec14.html#sec14.39', 'sec14.html#sec14.40', 'sec14.html#sec14.41', 'sec14.html#sec14.42', 'sec14.html#sec14.43', 'sec14.html#sec14.44', 'sec14.html#sec14.45', 'sec14.html#sec14.46', 'sec14.html#sec14.47',
6
  'sec19.html#sec19.5.1',
7
- 'http://tools.ietf.org/html/rfc2068#section-19.7.1.1',
8
- 'http://tools.ietf.org/html/rfc2109#section-4.2.2', 'http://tools.ietf.org/html/rfc2109#section-4.3.4', 'http://en.wikipedia.org/wiki/Meta_refresh', 'http://www.w3.org/TR/cors/#$1-response-header', 'http://www.w3.org/TR/cors/#$1-request-header',
9
- 'http://en.wikipedia.org/wiki/$1', 'http://msdn.microsoft.com/library/cc288472.aspx#_replace', 'http://msdn.microsoft.com/en-us/library/dd565640.aspx', 'http://msdn.microsoft.com/library/cc817574.aspx', 'http://noarchive.net/xrobots/', 'http://www.w3.org/TR/CSP/#$1-header-field', 'http://tools.ietf.org/html/rfc6797'
10
  ];
11
 
12
  jush.links2.http = /(^(?:HTTP\/[0-9.]+\s+)?)(100.*|(101.*)|(200.*)|(201.*)|(202.*)|(203.*)|(204.*)|(205.*)|(206.*)|(300.*)|(301.*)|(302.*)|(303.*)|(304.*)|(305.*)|(306.*)|(307.*)|(400.*)|(401.*)|(402.*)|(403.*)|(404.*)|(405.*)|(406.*)|(407.*)|(408.*)|(409.*)|(410.*)|(411.*)|(412.*)|(413.*)|(414.*)|(415.*)|(416.*)|(417.*)|(500.*)|(501.*)|(502.*)|(503.*)|(504.*)|(505.*)|(Accept)|(Accept-Charset)|(Accept-Encoding)|(Accept-Language)|(Accept-Ranges)|(Age)|(Allow)|(Authorization)|(Cache-Control)|(Connection)|(Content-Encoding)|(Content-Language)|(Content-Length)|(Content-Location)|(Content-MD5)|(Content-Range)|(Content-Type)|(Date)|(ETag)|(Expect)|(Expires)|(From)|(Host)|(If-Match)|(If-Modified-Since)|(If-None-Match)|(If-Range)|(If-Unmodified-Since)|(Last-Modified)|(Location)|(Max-Forwards)|(Pragma)|(Proxy-Authenticate)|(Proxy-Authorization)|(Range)|(Referer)|(Retry-After)|(Server)|(TE)|(Trailer)|(Transfer-Encoding)|(Upgrade)|(User-Agent)|(Vary)|(Via)|(Warning)|(WWW-Authenticate)|(Content-Disposition)|(Keep-Alive)|(Set-Cookie)|(Cookie)|(Refresh)|(Access-Control-Allow-Origin|Access-Control-Max-Age|Access-Control-Allow-Credentials|Access-Control-Allow-Methods|Access-Control-Allow-Headers)|(Origin|Access-Control-Request-Method|Access-Control-Request-Headers)|(X-Forwarded-For|X-Requested-With)|(X-Frame-Options|X-XSS-Protection)|(X-Content-Type-Options)|(X-UA-Compatible)|(X-Robots-Tag)|(Content-Security-Policy|Content-Security-Policy-Report-Only)|(Strict-Transport-Security))(:|$)/gim;
1
  jush.tr.http = { _0: /$/ };
2
 
3
+ jush.urls.http = ['https://www.w3.org/Protocols/rfc2616/rfc2616-$key',
4
  'sec10.html#sec10.1.1', 'sec10.html#sec10.1.2', 'sec10.html#sec10.2.1', 'sec10.html#sec10.2.2', 'sec10.html#sec10.2.3', 'sec10.html#sec10.2.4', 'sec10.html#sec10.2.5', 'sec10.html#sec10.2.6', 'sec10.html#sec10.2.7', 'sec10.html#sec10.3.1', 'sec10.html#sec10.3.2', 'sec10.html#sec10.3.3', 'sec10.html#sec10.3.4', 'sec10.html#sec10.3.5', 'sec10.html#sec10.3.6', 'sec10.html#sec10.3.7', 'sec10.html#sec10.3.8', 'sec10.html#sec10.4.1', 'sec10.html#sec10.4.2', 'sec10.html#sec10.4.3', 'sec10.html#sec10.4.4', 'sec10.html#sec10.4.5', 'sec10.html#sec10.4.6', 'sec10.html#sec10.4.7', 'sec10.html#sec10.4.8', 'sec10.html#sec10.4.9', 'sec10.html#sec10.4.10', 'sec10.html#sec10.4.11', 'sec10.html#sec10.4.12', 'sec10.html#sec10.4.13', 'sec10.html#sec10.4.14', 'sec10.html#sec10.4.15', 'sec10.html#sec10.4.16', 'sec10.html#sec10.4.17', 'sec10.html#sec10.4.18', 'sec10.html#sec10.5.1', 'sec10.html#sec10.5.2', 'sec10.html#sec10.5.3', 'sec10.html#sec10.5.4', 'sec10.html#sec10.5.5', 'sec10.html#sec10.5.6',
5
  'sec14.html#sec14.1', 'sec14.html#sec14.2', 'sec14.html#sec14.3', 'sec14.html#sec14.4', 'sec14.html#sec14.5', 'sec14.html#sec14.6', 'sec14.html#sec14.7', 'sec14.html#sec14.8', 'sec14.html#sec14.9', 'sec14.html#sec14.10', 'sec14.html#sec14.11', 'sec14.html#sec14.12', 'sec14.html#sec14.13', 'sec14.html#sec14.14', 'sec14.html#sec14.15', 'sec14.html#sec14.16', 'sec14.html#sec14.17', 'sec14.html#sec14.18', 'sec14.html#sec14.19', 'sec14.html#sec14.20', 'sec14.html#sec14.21', 'sec14.html#sec14.22', 'sec14.html#sec14.23', 'sec14.html#sec14.24', 'sec14.html#sec14.25', 'sec14.html#sec14.26', 'sec14.html#sec14.27', 'sec14.html#sec14.28', 'sec14.html#sec14.29', 'sec14.html#sec14.30', 'sec14.html#sec14.31', 'sec14.html#sec14.32', 'sec14.html#sec14.33', 'sec14.html#sec14.34', 'sec14.html#sec14.35', 'sec14.html#sec14.36', 'sec14.html#sec14.37', 'sec14.html#sec14.38', 'sec14.html#sec14.39', 'sec14.html#sec14.40', 'sec14.html#sec14.41', 'sec14.html#sec14.42', 'sec14.html#sec14.43', 'sec14.html#sec14.44', 'sec14.html#sec14.45', 'sec14.html#sec14.46', 'sec14.html#sec14.47',
6
  'sec19.html#sec19.5.1',
7
+ 'https://tools.ietf.org/html/rfc2068#section-19.7.1.1',
8
+ 'https://tools.ietf.org/html/rfc2109#section-4.2.2', 'https://tools.ietf.org/html/rfc2109#section-4.3.4', 'https://en.wikipedia.org/wiki/Meta_refresh', 'https://www.w3.org/TR/cors/#$1-response-header', 'https://www.w3.org/TR/cors/#$1-request-header',
9
+ 'https://en.wikipedia.org/wiki/$1', 'https://msdn.microsoft.com/library/cc288472.aspx#_replace', 'https://msdn.microsoft.com/en-us/library/dd565640.aspx', 'https://msdn.microsoft.com/library/cc817574.aspx', 'http://noarchive.net/xrobots/', 'https://www.w3.org/TR/CSP/#$1-header-field', 'https://tools.ietf.org/html/rfc6797'
10
  ];
11
 
12
  jush.links2.http = /(^(?:HTTP\/[0-9.]+\s+)?)(100.*|(101.*)|(200.*)|(201.*)|(202.*)|(203.*)|(204.*)|(205.*)|(206.*)|(300.*)|(301.*)|(302.*)|(303.*)|(304.*)|(305.*)|(306.*)|(307.*)|(400.*)|(401.*)|(402.*)|(403.*)|(404.*)|(405.*)|(406.*)|(407.*)|(408.*)|(409.*)|(410.*)|(411.*)|(412.*)|(413.*)|(414.*)|(415.*)|(416.*)|(417.*)|(500.*)|(501.*)|(502.*)|(503.*)|(504.*)|(505.*)|(Accept)|(Accept-Charset)|(Accept-Encoding)|(Accept-Language)|(Accept-Ranges)|(Age)|(Allow)|(Authorization)|(Cache-Control)|(Connection)|(Content-Encoding)|(Content-Language)|(Content-Length)|(Content-Location)|(Content-MD5)|(Content-Range)|(Content-Type)|(Date)|(ETag)|(Expect)|(Expires)|(From)|(Host)|(If-Match)|(If-Modified-Since)|(If-None-Match)|(If-Range)|(If-Unmodified-Since)|(Last-Modified)|(Location)|(Max-Forwards)|(Pragma)|(Proxy-Authenticate)|(Proxy-Authorization)|(Range)|(Referer)|(Retry-After)|(Server)|(TE)|(Trailer)|(Transfer-Encoding)|(Upgrade)|(User-Agent)|(Vary)|(Via)|(Warning)|(WWW-Authenticate)|(Content-Disposition)|(Keep-Alive)|(Set-Cookie)|(Cookie)|(Refresh)|(Access-Control-Allow-Origin|Access-Control-Max-Age|Access-Control-Allow-Credentials|Access-Control-Allow-Methods|Access-Control-Allow-Headers)|(Origin|Access-Control-Request-Method|Access-Control-Request-Headers)|(X-Forwarded-For|X-Requested-With)|(X-Frame-Options|X-XSS-Protection)|(X-Content-Type-Options)|(X-UA-Compatible)|(X-Robots-Tag)|(Content-Security-Policy|Content-Security-Policy-Report-Only)|(Strict-Transport-Security))(:|$)/gim;
adminer/adminer/externals/jush/modules/jush-js.js CHANGED
@@ -14,7 +14,7 @@ jush.tr.js_val = { php: jush.php, quo: /"/, apo: /'/, js_one: /\/\//, com: /\/\*
14
  jush.tr.js_key = { php: jush.php, quo: /"/, apo: /'/, js_one: /\/\//, com: /\/\*/, num: jush.num, _1: /(?=[:}])/ };
15
 
16
  jush.urls.js_write = 'https://developer.mozilla.org/en/docs/DOM/$key.$val';
17
- jush.urls.js_http = 'http://www.w3.org/TR/XMLHttpRequest/#the-$val-$key';
18
  jush.urls.js = ['https://developer.mozilla.org/en/$key',
19
  'JavaScript/Reference/Global_Objects/$1',
20
  'JavaScript/Reference/Statements/$1',
@@ -23,7 +23,7 @@ jush.urls.js = ['https://developer.mozilla.org/en/$key',
23
  'JavaScript/Reference/Statements/try...catch',
24
  'JavaScript/Reference/Operators/Special/$1',
25
  'DOM/document.$1', 'DOM/element.$1', 'DOM/event.$1', 'DOM/form.$1', 'DOM/table.$1', 'DOM/window.$1',
26
- 'http://www.w3.org/TR/XMLHttpRequest/',
27
  'JavaScript/Reference/Global_Objects/Array$1',
28
  'JavaScript/Reference/Global_Objects/Array$1',
29
  'JavaScript/Reference/Global_Objects/Date$1',
@@ -32,7 +32,7 @@ jush.urls.js = ['https://developer.mozilla.org/en/$key',
32
  'JavaScript/Reference/Global_Objects/RegExp$1',
33
  'JavaScript/Reference/Global_Objects/String$1'
34
  ];
35
- jush.urls.js_doc = ['http://code.google.com/p/jsdoc-toolkit/wiki/Tag$key',
36
  '$1', 'Param', 'Augments', '$1'
37
  ];
38
 
14
  jush.tr.js_key = { php: jush.php, quo: /"/, apo: /'/, js_one: /\/\//, com: /\/\*/, num: jush.num, _1: /(?=[:}])/ };
15
 
16
  jush.urls.js_write = 'https://developer.mozilla.org/en/docs/DOM/$key.$val';
17
+ jush.urls.js_http = 'https://www.w3.org/TR/XMLHttpRequest/#the-$val-$key';
18
  jush.urls.js = ['https://developer.mozilla.org/en/$key',
19
  'JavaScript/Reference/Global_Objects/$1',
20
  'JavaScript/Reference/Statements/$1',
23
  'JavaScript/Reference/Statements/try...catch',
24
  'JavaScript/Reference/Operators/Special/$1',
25
  'DOM/document.$1', 'DOM/element.$1', 'DOM/event.$1', 'DOM/form.$1', 'DOM/table.$1', 'DOM/window.$1',
26
+ 'https://www.w3.org/TR/XMLHttpRequest/',
27
  'JavaScript/Reference/Global_Objects/Array$1',
28
  'JavaScript/Reference/Global_Objects/Array$1',
29
  'JavaScript/Reference/Global_Objects/Date$1',
32
  'JavaScript/Reference/Global_Objects/RegExp$1',
33
  'JavaScript/Reference/Global_Objects/String$1'
34
  ];
35
+ jush.urls.js_doc = ['https://code.google.com/p/jsdoc-toolkit/wiki/Tag$key',
36
  '$1', 'Param', 'Augments', '$1'
37
  ];
38
 
adminer/adminer/externals/jush/modules/jush-mssql.js CHANGED
@@ -1,7 +1,7 @@
1
  jush.tr.mssql = { sqlite_apo: /'/, sqlite_quo: /"/, one: /--/, com: /\/\*/, mssql_bra: /\[/, num: jush.num }; // QUOTED IDENTIFIER = OFF
2
  jush.tr.mssql_bra = { _0: /]]/, _1: /]/ };
3
 
4
- jush.urls.mssql = ['http://msdn.microsoft.com/library/$key.aspx',
5
  'ms181700', 'ms178543', 'ms188372', 'ms189526', 'ms186865', 'ms178578', 'ms174387', 'ms190337', 'ms190487', 'ms187804', 'ms187377', 'ms188386', 'ms188929', 'ms187922', 'ms188362', 'ms177603', 'ms181271', 'ms188365', 'ms181765', 'ms187368', 'ms176089', 'ms188748', 'ms175035', 'ms188387', 'ms177938', 'ms184391', 'ms178628', 'ms190295', 'ms181708', 'ms174366', 'bb630352', 'ms187819', 'bb677335', 'bb630289', 'ms188782', 'ms187746', 'ms188927', 'ms180169', 'ms189835', 'ms188338', 'ms189748', 'ms182587', 'ms182706', 'ms176030', 'ms177521', 'ms188055', 'ms188332', 'ms181362', 'ms188336', 'ms180152', 'ms173773', 'ms173812', 'ms177634', 'cc280766', 'cc280487', 'ms178624', 'ms188037', 'ms180188', 'ms187965', 'ms177673', 'ms180199', 'bb677290', 'ms186775', 'ms182717', 'ms177682', 'ms174335', 'ms187745', 'ms188029', 'ms188795', 'ms173730', 'ms186764', 'ms180016', 'ms179859', 'bb510625', 'ms179882', 'ms174987', 'ms186939', 'ms189455', 'ms187993', 'ms190500', 'ms174433', 'ms190499', 'ms190322', 'ms188361', 'ms188385', 'ms177564', 'ms189461', 'ms176047', 'ms190372', 'ms186336', 'ms187972', 'ms174998', 'ms178632', 'ms187728', 'ms181299', 'ms174973', 'ms182776', 'ms188378', 'ms189499', 'ms188407', 'ms190356', 'ms188767', 'ms182418', 'ms175064', 'ms173829', 'bb677243', 'ms189463', 'ms175976', 'ms177570', 'ms180026', 'ms187942', 'ms177523', 'ms187348', 'ms189466', 'ms188366', 'ms186290', 'ms187331', 'ms188047', 'ms178642', 'ms175972', 'ms177607', 'ms186838', 'ms189797',
6
  'ms182741', 'ms181491', 'ms189524', 'ms174430', 'bb934170', 'ms187798', 'ms178528', 'ms189522', 'bb677184', 'ms176061', 'cc280404', 'bb677241', 'ms173565', 'ms181591', 'ms189453', 'bb677289', 'ms189520', 'ms187317', 'cc280405', 'ms186755', 'ms188783', 'ms189751', 'ms174382', 'ms187744', 'ms187802', 'ms179854', 'ms187926', 'ms190495', 'ms178024', 'bb895329', 'ms187936', 'ms186742', 'ms188064', 'ms189462', 'cc280448', 'cc280767', 'ms190332', 'ms188038', 'ms188357', 'ms177544', 'ms174979', 'ms189799', 'ms175007', 'ms173463', 'ms187956', 'bb934146', 'ms176009',
7
  'ms186847', 'ms177517', 'ms177514', 'ms188389', 'bb964728', 'ms179906', 'ms190475', 'ms189450', 'bb677309', 'ms178613', 'cc280479', 'bb630256', 'ms188747', 'ms181586', 'ms174414', 'bb630257', 'ms188403', 'ms184393', 'cc280482', 'ms190290', 'ms176118', 'ms188012', 'ms180071', 'ms186728', 'ms187759', 'ms181249', 'ms174969', 'ms190480', 'ms177539', 'bb933779', 'ms174988', 'ms189449', 'ms186791', 'ms186751', 'cc280899', 'cc280603', 'ms174990', 'ms186977', 'ms175075', 'ms182698', 'ms174996', 'ms173790', 'ms173497', 'ms174407', 'ms189438', 'ms173492', 'bb933867', 'ms189448',
1
  jush.tr.mssql = { sqlite_apo: /'/, sqlite_quo: /"/, one: /--/, com: /\/\*/, mssql_bra: /\[/, num: jush.num }; // QUOTED IDENTIFIER = OFF
2
  jush.tr.mssql_bra = { _0: /]]/, _1: /]/ };
3
 
4
+ jush.urls.mssql = ['https://msdn.microsoft.com/library/$key.aspx',
5
  'ms181700', 'ms178543', 'ms188372', 'ms189526', 'ms186865', 'ms178578', 'ms174387', 'ms190337', 'ms190487', 'ms187804', 'ms187377', 'ms188386', 'ms188929', 'ms187922', 'ms188362', 'ms177603', 'ms181271', 'ms188365', 'ms181765', 'ms187368', 'ms176089', 'ms188748', 'ms175035', 'ms188387', 'ms177938', 'ms184391', 'ms178628', 'ms190295', 'ms181708', 'ms174366', 'bb630352', 'ms187819', 'bb677335', 'bb630289', 'ms188782', 'ms187746', 'ms188927', 'ms180169', 'ms189835', 'ms188338', 'ms189748', 'ms182587', 'ms182706', 'ms176030', 'ms177521', 'ms188055', 'ms188332', 'ms181362', 'ms188336', 'ms180152', 'ms173773', 'ms173812', 'ms177634', 'cc280766', 'cc280487', 'ms178624', 'ms188037', 'ms180188', 'ms187965', 'ms177673', 'ms180199', 'bb677290', 'ms186775', 'ms182717', 'ms177682', 'ms174335', 'ms187745', 'ms188029', 'ms188795', 'ms173730', 'ms186764', 'ms180016', 'ms179859', 'bb510625', 'ms179882', 'ms174987', 'ms186939', 'ms189455', 'ms187993', 'ms190500', 'ms174433', 'ms190499', 'ms190322', 'ms188361', 'ms188385', 'ms177564', 'ms189461', 'ms176047', 'ms190372', 'ms186336', 'ms187972', 'ms174998', 'ms178632', 'ms187728', 'ms181299', 'ms174973', 'ms182776', 'ms188378', 'ms189499', 'ms188407', 'ms190356', 'ms188767', 'ms182418', 'ms175064', 'ms173829', 'bb677243', 'ms189463', 'ms175976', 'ms177570', 'ms180026', 'ms187942', 'ms177523', 'ms187348', 'ms189466', 'ms188366', 'ms186290', 'ms187331', 'ms188047', 'ms178642', 'ms175972', 'ms177607', 'ms186838', 'ms189797',
6
  'ms182741', 'ms181491', 'ms189524', 'ms174430', 'bb934170', 'ms187798', 'ms178528', 'ms189522', 'bb677184', 'ms176061', 'cc280404', 'bb677241', 'ms173565', 'ms181591', 'ms189453', 'bb677289', 'ms189520', 'ms187317', 'cc280405', 'ms186755', 'ms188783', 'ms189751', 'ms174382', 'ms187744', 'ms187802', 'ms179854', 'ms187926', 'ms190495', 'ms178024', 'bb895329', 'ms187936', 'ms186742', 'ms188064', 'ms189462', 'cc280448', 'cc280767', 'ms190332', 'ms188038', 'ms188357', 'ms177544', 'ms174979', 'ms189799', 'ms175007', 'ms173463', 'ms187956', 'bb934146', 'ms176009',
7
  'ms186847', 'ms177517', 'ms177514', 'ms188389', 'bb964728', 'ms179906', 'ms190475', 'ms189450', 'bb677309', 'ms178613', 'cc280479', 'bb630256', 'ms188747', 'ms181586', 'ms174414', 'bb630257', 'ms188403', 'ms184393', 'cc280482', 'ms190290', 'ms176118', 'ms188012', 'ms180071', 'ms186728', 'ms187759', 'ms181249', 'ms174969', 'ms190480', 'ms177539', 'bb933779', 'ms174988', 'ms189449', 'ms186791', 'ms186751', 'cc280899', 'cc280603', 'ms174990', 'ms186977', 'ms175075', 'ms182698', 'ms174996', 'ms173790', 'ms173497', 'ms174407', 'ms189438', 'ms173492', 'bb933867', 'ms189448',
adminer/adminer/externals/jush/modules/jush-oracle.js CHANGED
@@ -1,6 +1,6 @@
1
  jush.tr.oracle = { sqlite_apo: /n?'/i, sqlite_quo: /"/, one: /--/, com: /\/\*/, num: /(?:\b[0-9]+\.?[0-9]*|\.[0-9]+)(?:e[+-]?[0-9]+)?[fd]?/i }; //! q'
2
 
3
- jush.urls.oracle = ['http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/$key',
4
  'statements_1003.htm', 'statements_1004.htm', 'statements_1005.htm', 'statements_1006.htm', 'statements_1007.htm', 'statements_1008.htm', 'statements_1009.htm', 'statements_1010.htm', 'statements_2001.htm', 'statements_2002.htm', 'statements_2003.htm', 'statements_2004.htm', 'statements_2005.htm', 'statements_2006.htm', 'statements_2007.htm', 'statements_2008.htm', 'statements_2009.htm', 'statements_2010.htm', 'statements_2011.htm', 'statements_2012.htm', 'statements_2013.htm', 'statements_3001.htm', 'statements_3002.htm', 'statements_4001.htm', 'statements_4002.htm', 'statements_4003.htm', 'statements_4004.htm', 'statements_4005.htm', 'statements_4006.htm', 'statements_4007.htm', 'statements_4008.htm', 'statements_4009.htm', 'statements_4010.htm', 'statements_5001.htm', 'statements_5002.htm', 'statements_5003.htm', 'statements_5004.htm', 'statements_5005.htm', 'statements_5006.htm', 'statements_5007.htm', 'statements_5008.htm', 'statements_5009.htm', 'statements_5010.htm', 'statements_5011.htm', 'statements_5012.htm', 'statements_6001.htm', 'statements_6002.htm', 'statements_6003.htm', 'statements_6004.htm', 'statements_6005.htm', 'statements_6006.htm', 'statements_6007.htm', 'statements_6008.htm', 'statements_6009.htm', 'statements_6010.htm', 'statements_6011.htm', 'statements_6012.htm', 'statements_6013.htm', 'statements_6014.htm', 'statements_6015.htm', 'statements_6016.htm', 'statements_7001.htm', 'statements_7002.htm', 'statements_7003.htm', 'statements_7004.htm', 'statements_8001.htm', 'statements_8002.htm', 'statements_8003.htm', 'statements_8004.htm', 'statements_8005.htm', 'statements_8006.htm', 'statements_8007.htm', 'statements_8008.htm', 'statements_8009.htm', 'statements_8010.htm', 'statements_8011.htm', 'statements_8012.htm', 'statements_8013.htm', 'statements_8014.htm', 'statements_8015.htm', 'statements_8016.htm', 'statements_8017.htm', 'statements_8018.htm', 'statements_8019.htm', 'statements_8020.htm', 'statements_8021.htm', 'statements_8022.htm', 'statements_8023.htm', 'statements_8024.htm', 'statements_8025.htm', 'statements_8026.htm', 'statements_8027.htm', 'statements_8028.htm', 'statements_9001.htm', 'statements_9002.htm', 'statements_9003.htm', 'statements_9004.htm', 'statements_9005.htm', 'statements_9006.htm', 'statements_9007.htm', 'statements_9008.htm', 'statements_9009.htm', 'statements_9010.htm', 'statements_9011.htm', 'statements_9012.htm', 'statements_9013.htm', 'statements_9014.htm', 'statements_9015.htm', 'statements_9016.htm', 'statements_9017.htm', 'statements_9018.htm', 'statements_9019.htm', 'statements_9020.htm', 'statements_9021.htm', 'statements_10001.htm', 'statements_10002.htm', 'statements_10003.htm', 'statements_10004.htm', 'statements_10005.htm', 'statements_10006.htm', 'statements_10007.htm',
5
  'functions002.htm', 'functions003.htm', 'functions004.htm', 'functions005.htm', 'functions006.htm', 'functions007.htm', 'functions008.htm', 'functions009.htm', 'functions010.htm', 'functions011.htm', 'functions012.htm', 'functions013.htm', 'functions014.htm', 'functions015.htm', 'functions016.htm', 'functions017.htm', 'functions018.htm', 'functions019.htm', 'functions020.htm', 'functions021.htm', 'functions022.htm', 'functions023.htm', 'functions024.htm', 'functions025.htm', 'functions026.htm', 'functions027.htm', 'functions028.htm', 'functions029.htm#i1279881', 'functions029.htm#i1281694', 'functions030.htm', 'functions031.htm', 'functions032.htm', 'functions033.htm', 'functions034.htm', 'functions035.htm', 'functions036.htm', 'functions037.htm', 'functions038.htm', 'functions039.htm', 'functions040.htm', 'functions041.htm', 'functions042.htm', 'functions043.htm', 'functions044.htm', 'functions045.htm', 'functions046.htm', 'functions047.htm', 'functions048.htm', 'functions049.htm', 'functions050.htm', 'functions052.htm', 'functions053.htm', 'functions054.htm', 'functions055.htm', 'functions056.htm', 'functions057.htm', 'functions058.htm', 'functions059.htm', 'functions060.htm', 'functions061.htm', 'functions062.htm', 'functions063.htm', 'functions064.htm', 'functions065.htm', 'functions066.htm', 'functions067.htm', 'functions068.htm', 'functions069.htm', 'functions070.htm', 'functions071.htm', 'functions072.htm', 'functions073.htm', 'functions074.htm', 'functions075.htm', 'functions076.htm', 'functions077.htm', 'functions078.htm', 'functions079.htm', 'functions080.htm', 'functions081.htm', 'functions082.htm', 'functions083.htm', 'functions084.htm', 'functions085.htm', 'functions086.htm', 'functions087.htm', 'functions088.htm', 'functions089.htm', 'functions090.htm', 'functions091.htm', 'functions092.htm', 'functions093.htm', 'functions094.htm', 'functions095.htm', 'functions096.htm', 'functions097.htm', 'functions098.htm', 'functions099.htm', 'functions100.htm', 'functions101.htm', 'functions102.htm', 'functions103.htm', 'functions104.htm', 'functions105.htm', 'functions106.htm', 'functions107.htm', 'functions108.htm', 'functions109.htm', 'functions110.htm', 'functions111.htm', 'functions112.htm', 'functions113.htm', 'functions114.htm', 'functions115.htm', 'functions116.htm', 'functions117.htm', 'functions118.htm', 'functions119.htm', 'functions120.htm', 'functions121.htm', 'functions122.htm', 'functions123.htm', 'functions124.htm', 'functions125.htm', 'functions126.htm', 'functions127.htm', 'functions128.htm', 'functions129.htm', 'functions130.htm', 'functions131.htm', 'functions132.htm', 'functions133.htm', 'functions134.htm', 'functions135.htm', 'functions137.htm', 'functions138.htm', 'functions139.htm', 'functions140.htm', 'functions141.htm', 'functions142.htm', 'functions143.htm', 'functions144.htm', 'functions145.htm', 'functions146.htm', 'functions147.htm', 'functions148.htm', 'functions149.htm', 'functions150.htm', 'functions151.htm', 'functions152.htm', 'functions153.htm', 'functions154.htm', 'functions155.htm', 'functions156.htm', 'functions157.htm#sthref2125', 'functions157.htm#sthref2129', 'functions157.htm#sthref2132', 'functions158.htm', 'functions159.htm', 'functions160.htm', 'functions161.htm', 'functions162.htm', 'functions163.htm', 'functions164.htm', 'functions165.htm', 'functions166.htm', 'functions167.htm', 'functions168.htm', 'functions169.htm', 'functions170.htm', 'functions171.htm', 'functions172.htm', 'functions173.htm', 'functions174.htm', 'functions175.htm', 'functions176.htm', 'functions177.htm', 'functions178.htm', 'functions179.htm', 'functions182.htm', 'functions183.htm', 'functions184.htm', 'functions185.htm', 'functions186.htm', 'functions187.htm', 'functions190.htm', 'functions191.htm', 'functions192.htm', 'functions193.htm', 'functions194.htm', 'functions195.htm', 'functions196.htm', 'functions198.htm', 'functions199.htm', 'functions200.htm', 'functions202.htm', 'functions203.htm', 'functions204.htm', 'functions205.htm', 'functions206.htm', 'functions207.htm', 'functions208.htm', 'functions209.htm', 'functions210.htm', 'functions211.htm', 'functions212.htm', 'functions213.htm', 'functions214.htm', 'functions215.htm', 'functions216.htm', 'functions217.htm', 'functions218.htm', 'functions219.htm', 'functions220.htm', 'functions221.htm', 'functions222.htm', 'functions223.htm', 'functions224.htm', 'functions225.htm', 'functions226.htm', 'functions227.htm', 'functions228.htm', 'functions229.htm'
6
  ];
1
  jush.tr.oracle = { sqlite_apo: /n?'/i, sqlite_quo: /"/, one: /--/, com: /\/\*/, num: /(?:\b[0-9]+\.?[0-9]*|\.[0-9]+)(?:e[+-]?[0-9]+)?[fd]?/i }; //! q'
2
 
3
+ jush.urls.oracle = ['https://download.oracle.com/docs/cd/B19306_01/server.102/b14200/$key',
4
  'statements_1003.htm', 'statements_1004.htm', 'statements_1005.htm', 'statements_1006.htm', 'statements_1007.htm', 'statements_1008.htm', 'statements_1009.htm', 'statements_1010.htm', 'statements_2001.htm', 'statements_2002.htm', 'statements_2003.htm', 'statements_2004.htm', 'statements_2005.htm', 'statements_2006.htm', 'statements_2007.htm', 'statements_2008.htm', 'statements_2009.htm', 'statements_2010.htm', 'statements_2011.htm', 'statements_2012.htm', 'statements_2013.htm', 'statements_3001.htm', 'statements_3002.htm', 'statements_4001.htm', 'statements_4002.htm', 'statements_4003.htm', 'statements_4004.htm', 'statements_4005.htm', 'statements_4006.htm', 'statements_4007.htm', 'statements_4008.htm', 'statements_4009.htm', 'statements_4010.htm', 'statements_5001.htm', 'statements_5002.htm', 'statements_5003.htm', 'statements_5004.htm', 'statements_5005.htm', 'statements_5006.htm', 'statements_5007.htm', 'statements_5008.htm', 'statements_5009.htm', 'statements_5010.htm', 'statements_5011.htm', 'statements_5012.htm', 'statements_6001.htm', 'statements_6002.htm', 'statements_6003.htm', 'statements_6004.htm', 'statements_6005.htm', 'statements_6006.htm', 'statements_6007.htm', 'statements_6008.htm', 'statements_6009.htm', 'statements_6010.htm', 'statements_6011.htm', 'statements_6012.htm', 'statements_6013.htm', 'statements_6014.htm', 'statements_6015.htm', 'statements_6016.htm', 'statements_7001.htm', 'statements_7002.htm', 'statements_7003.htm', 'statements_7004.htm', 'statements_8001.htm', 'statements_8002.htm', 'statements_8003.htm', 'statements_8004.htm', 'statements_8005.htm', 'statements_8006.htm', 'statements_8007.htm', 'statements_8008.htm', 'statements_8009.htm', 'statements_8010.htm', 'statements_8011.htm', 'statements_8012.htm', 'statements_8013.htm', 'statements_8014.htm', 'statements_8015.htm', 'statements_8016.htm', 'statements_8017.htm', 'statements_8018.htm', 'statements_8019.htm', 'statements_8020.htm', 'statements_8021.htm', 'statements_8022.htm', 'statements_8023.htm', 'statements_8024.htm', 'statements_8025.htm', 'statements_8026.htm', 'statements_8027.htm', 'statements_8028.htm', 'statements_9001.htm', 'statements_9002.htm', 'statements_9003.htm', 'statements_9004.htm', 'statements_9005.htm', 'statements_9006.htm', 'statements_9007.htm', 'statements_9008.htm', 'statements_9009.htm', 'statements_9010.htm', 'statements_9011.htm', 'statements_9012.htm', 'statements_9013.htm', 'statements_9014.htm', 'statements_9015.htm', 'statements_9016.htm', 'statements_9017.htm', 'statements_9018.htm', 'statements_9019.htm', 'statements_9020.htm', 'statements_9021.htm', 'statements_10001.htm', 'statements_10002.htm', 'statements_10003.htm', 'statements_10004.htm', 'statements_10005.htm', 'statements_10006.htm', 'statements_10007.htm',
5
  'functions002.htm', 'functions003.htm', 'functions004.htm', 'functions005.htm', 'functions006.htm', 'functions007.htm', 'functions008.htm', 'functions009.htm', 'functions010.htm', 'functions011.htm', 'functions012.htm', 'functions013.htm', 'functions014.htm', 'functions015.htm', 'functions016.htm', 'functions017.htm', 'functions018.htm', 'functions019.htm', 'functions020.htm', 'functions021.htm', 'functions022.htm', 'functions023.htm', 'functions024.htm', 'functions025.htm', 'functions026.htm', 'functions027.htm', 'functions028.htm', 'functions029.htm#i1279881', 'functions029.htm#i1281694', 'functions030.htm', 'functions031.htm', 'functions032.htm', 'functions033.htm', 'functions034.htm', 'functions035.htm', 'functions036.htm', 'functions037.htm', 'functions038.htm', 'functions039.htm', 'functions040.htm', 'functions041.htm', 'functions042.htm', 'functions043.htm', 'functions044.htm', 'functions045.htm', 'functions046.htm', 'functions047.htm', 'functions048.htm', 'functions049.htm', 'functions050.htm', 'functions052.htm', 'functions053.htm', 'functions054.htm', 'functions055.htm', 'functions056.htm', 'functions057.htm', 'functions058.htm', 'functions059.htm', 'functions060.htm', 'functions061.htm', 'functions062.htm', 'functions063.htm', 'functions064.htm', 'functions065.htm', 'functions066.htm', 'functions067.htm', 'functions068.htm', 'functions069.htm', 'functions070.htm', 'functions071.htm', 'functions072.htm', 'functions073.htm', 'functions074.htm', 'functions075.htm', 'functions076.htm', 'functions077.htm', 'functions078.htm', 'functions079.htm', 'functions080.htm', 'functions081.htm', 'functions082.htm', 'functions083.htm', 'functions084.htm', 'functions085.htm', 'functions086.htm', 'functions087.htm', 'functions088.htm', 'functions089.htm', 'functions090.htm', 'functions091.htm', 'functions092.htm', 'functions093.htm', 'functions094.htm', 'functions095.htm', 'functions096.htm', 'functions097.htm', 'functions098.htm', 'functions099.htm', 'functions100.htm', 'functions101.htm', 'functions102.htm', 'functions103.htm', 'functions104.htm', 'functions105.htm', 'functions106.htm', 'functions107.htm', 'functions108.htm', 'functions109.htm', 'functions110.htm', 'functions111.htm', 'functions112.htm', 'functions113.htm', 'functions114.htm', 'functions115.htm', 'functions116.htm', 'functions117.htm', 'functions118.htm', 'functions119.htm', 'functions120.htm', 'functions121.htm', 'functions122.htm', 'functions123.htm', 'functions124.htm', 'functions125.htm', 'functions126.htm', 'functions127.htm', 'functions128.htm', 'functions129.htm', 'functions130.htm', 'functions131.htm', 'functions132.htm', 'functions133.htm', 'functions134.htm', 'functions135.htm', 'functions137.htm', 'functions138.htm', 'functions139.htm', 'functions140.htm', 'functions141.htm', 'functions142.htm', 'functions143.htm', 'functions144.htm', 'functions145.htm', 'functions146.htm', 'functions147.htm', 'functions148.htm', 'functions149.htm', 'functions150.htm', 'functions151.htm', 'functions152.htm', 'functions153.htm', 'functions154.htm', 'functions155.htm', 'functions156.htm', 'functions157.htm#sthref2125', 'functions157.htm#sthref2129', 'functions157.htm#sthref2132', 'functions158.htm', 'functions159.htm', 'functions160.htm', 'functions161.htm', 'functions162.htm', 'functions163.htm', 'functions164.htm', 'functions165.htm', 'functions166.htm', 'functions167.htm', 'functions168.htm', 'functions169.htm', 'functions170.htm', 'functions171.htm', 'functions172.htm', 'functions173.htm', 'functions174.htm', 'functions175.htm', 'functions176.htm', 'functions177.htm', 'functions178.htm', 'functions179.htm', 'functions182.htm', 'functions183.htm', 'functions184.htm', 'functions185.htm', 'functions186.htm', 'functions187.htm', 'functions190.htm', 'functions191.htm', 'functions192.htm', 'functions193.htm', 'functions194.htm', 'functions195.htm', 'functions196.htm', 'functions198.htm', 'functions199.htm', 'functions200.htm', 'functions202.htm', 'functions203.htm', 'functions204.htm', 'functions205.htm', 'functions206.htm', 'functions207.htm', 'functions208.htm', 'functions209.htm', 'functions210.htm', 'functions211.htm', 'functions212.htm', 'functions213.htm', 'functions214.htm', 'functions215.htm', 'functions216.htm', 'functions217.htm', 'functions218.htm', 'functions219.htm', 'functions220.htm', 'functions221.htm', 'functions222.htm', 'functions223.htm', 'functions224.htm', 'functions225.htm', 'functions226.htm', 'functions227.htm', 'functions228.htm', 'functions229.htm'
6
  ];
adminer/adminer/externals/jush/modules/jush-pgsql.js CHANGED
@@ -4,13 +4,13 @@ jush.tr.pgsql_eot2 = { }; // pgsql_eot2._2 to be set in pgsql_eot handler
4
  jush.tr.pgsql_pgsqlset = { sql_apo: /'/, sqlite_quo: /"/, pgsql_eot: /\$/, one: /--/, com_nest: /\/\*/, num: jush.num, _1: /;|$/ };
5
  jush.tr.pgsqlset = { _0: /$/ };
6
 
7
- jush.urls.pgsql_pgsqlset = 'http://www.postgresql.org/docs/current/static/$key';
8
- jush.urls.pgsql = ['http://www.postgresql.org/docs/current/static/$key',
9
  'sql-$1.html', 'sql-$1.html', 'sql-alteropclass.html', 'sql-createopclass.html', 'sql-dropopclass.html',
10
  'functions-datetime.html', 'functions-info.html', 'functions-logical.html', 'functions-comparison.html', 'functions-matching.html', 'functions-conditional.html', 'functions-subquery.html',
11
  'functions-math.html', 'functions-string.html', 'functions-binarystring.html', 'functions-formatting.html', 'functions-datetime.html', 'functions-geometry.html', 'functions-net.html', 'functions-sequence.html', 'functions-array.html', 'functions-aggregate.html', 'functions-srf.html', 'functions-info.html', 'functions-admin.html'
12
  ];
13
- jush.urls.pgsqlset = ['http://www.postgresql.org/docs/current/static/runtime-config-$key.html#GUC-$1',
14
  'autovacuum', 'client', 'compatible', 'connection', 'custom', 'developer', 'file-locations', 'locks', 'logging', 'preset', 'query', 'resource', 'statistics', 'wal'
15
  ];
16
 
4
  jush.tr.pgsql_pgsqlset = { sql_apo: /'/, sqlite_quo: /"/, pgsql_eot: /\$/, one: /--/, com_nest: /\/\*/, num: jush.num, _1: /;|$/ };
5
  jush.tr.pgsqlset = { _0: /$/ };
6
 
7
+ jush.urls.pgsql_pgsqlset = 'https://www.postgresql.org/docs/current/static/$key';
8
+ jush.urls.pgsql = ['https://www.postgresql.org/docs/current/static/$key',
9
  'sql-$1.html', 'sql-$1.html', 'sql-alteropclass.html', 'sql-createopclass.html', 'sql-dropopclass.html',
10
  'functions-datetime.html', 'functions-info.html', 'functions-logical.html', 'functions-comparison.html', 'functions-matching.html', 'functions-conditional.html', 'functions-subquery.html',
11
  'functions-math.html', 'functions-string.html', 'functions-binarystring.html', 'functions-formatting.html', 'functions-datetime.html', 'functions-geometry.html', 'functions-net.html', 'functions-sequence.html', 'functions-array.html', 'functions-aggregate.html', 'functions-srf.html', 'functions-info.html', 'functions-admin.html'
12
  ];
13
+ jush.urls.pgsqlset = ['https://www.postgresql.org/docs/current/static/runtime-config-$key.html#GUC-$1',
14
  'autovacuum', 'client', 'compatible', 'connection', 'custom', 'developer', 'file-locations', 'locks', 'logging', 'preset', 'query', 'resource', 'statistics', 'wal'
15
  ];
16
 
adminer/adminer/externals/jush/modules/jush-php.js CHANGED
@@ -43,7 +43,7 @@
43
  jush.urls.php_sql = 'http://www.php.net/$key.$val';
44
  jush.urls.php_sqlite = 'http://www.php.net/$key.$val';
45
  jush.urls.php_pgsql = 'http://www.php.net/$key.$val';
46
- jush.urls.php_mssql = 'http://msdn.microsoft.com/library/$key.aspx';
47
  jush.urls.php_oracle = 'http://www.php.net/$key.$val';
48
  jush.urls.php_echo = 'http://www.php.net/$key.$val';
49
  jush.urls.php_phpini = 'http://www.php.net/$key.$val';
@@ -65,10 +65,10 @@
65
  'ini.core#ini.$1', 'errorfunc.configuration#ini.$1', 'outcontrol.configuration#ini.$1', 'info.configuration#ini.$1', 'datetime.configuration#ini.$1', 'readline.configuration#ini.$1', 'phar.configuration#ini.$1', 'zlib.configuration#ini.$1', 'mcrypt.configuration#ini.$1', 'odbc.configuration#ini.$1', 'pdo.configuration#ini.$1', 'pdo-mysql.configuration#ini.$1', 'pdo-odbc.configuration#ini.$1', 'ibase.configuration#ini.$1', 'fbsql.configuration#ini.$1', 'ifx.configuration#ini.$1', 'msql.configuration#ini.$1', 'mssql.configuration#ini.$1', 'mysql.configuration#ini.$1', 'mysqli.configuration#ini.$1', 'oci8.configuration#ini.$1', 'pgsql.configuration#ini.$1', 'sqlite3.configuration#ini.$1', 'sybase.configuration#ini.$1', 'filesystem.configuration#ini.$1', 'mime-magic.configuration#ini.$1', 'iconv.configuration#ini.$1', 'intl.configuration#ini.$1', 'mbstring.configuration#ini.$1', 'exif.configuration#ini.$1', 'image.configuration#ini.$1', 'mail.configuration#ini.$1', 'bc.configuration#ini.$1', 'sem.configuration#ini.$1', 'misc.configuration#ini.$1', 'tidy.configuration#ini.$1', 'curl.configuration#ini.$1', 'ldap.configuration#ini.$1', 'network.configuration#ini.$1', 'apache.configuration#ini.$1', 'nsapi.configuration#ini.$1', 'session.configuration#ini.$1', 'pcre.configuration#ini.$1', 'filter.configuration#ini.$1', 'var.configuration#ini.$1', 'soap.configuration#ini.$1', 'com.configuration#ini.$1',
66
  'http://www.hardened-php.net/suhosin/configuration.html#$1'
67
  ];
68
- jush.urls.php_doc = ['http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.$key.pkg.html',
69
  '$1', '', 'inline$1'
70
  ];
71
- jush.urls.mail = ['http://tools.ietf.org/html/rfc2076#section-3.$key',
72
  '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16'
73
  ];
74
 
43
  jush.urls.php_sql = 'http://www.php.net/$key.$val';
44
  jush.urls.php_sqlite = 'http://www.php.net/$key.$val';
45
  jush.urls.php_pgsql = 'http://www.php.net/$key.$val';
46
+ jush.urls.php_mssql = 'https://msdn.microsoft.com/library/$key.aspx';
47
  jush.urls.php_oracle = 'http://www.php.net/$key.$val';
48
  jush.urls.php_echo = 'http://www.php.net/$key.$val';
49
  jush.urls.php_phpini = 'http://www.php.net/$key.$val';
65
  'ini.core#ini.$1', 'errorfunc.configuration#ini.$1', 'outcontrol.configuration#ini.$1', 'info.configuration#ini.$1', 'datetime.configuration#ini.$1', 'readline.configuration#ini.$1', 'phar.configuration#ini.$1', 'zlib.configuration#ini.$1', 'mcrypt.configuration#ini.$1', 'odbc.configuration#ini.$1', 'pdo.configuration#ini.$1', 'pdo-mysql.configuration#ini.$1', 'pdo-odbc.configuration#ini.$1', 'ibase.configuration#ini.$1', 'fbsql.configuration#ini.$1', 'ifx.configuration#ini.$1', 'msql.configuration#ini.$1', 'mssql.configuration#ini.$1', 'mysql.configuration#ini.$1', 'mysqli.configuration#ini.$1', 'oci8.configuration#ini.$1', 'pgsql.configuration#ini.$1', 'sqlite3.configuration#ini.$1', 'sybase.configuration#ini.$1', 'filesystem.configuration#ini.$1', 'mime-magic.configuration#ini.$1', 'iconv.configuration#ini.$1', 'intl.configuration#ini.$1', 'mbstring.configuration#ini.$1', 'exif.configuration#ini.$1', 'image.configuration#ini.$1', 'mail.configuration#ini.$1', 'bc.configuration#ini.$1', 'sem.configuration#ini.$1', 'misc.configuration#ini.$1', 'tidy.configuration#ini.$1', 'curl.configuration#ini.$1', 'ldap.configuration#ini.$1', 'network.configuration#ini.$1', 'apache.configuration#ini.$1', 'nsapi.configuration#ini.$1', 'session.configuration#ini.$1', 'pcre.configuration#ini.$1', 'filter.configuration#ini.$1', 'var.configuration#ini.$1', 'soap.configuration#ini.$1', 'com.configuration#ini.$1',
66
  'http://www.hardened-php.net/suhosin/configuration.html#$1'
67
  ];
68
+ jush.urls.php_doc = ['https://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.$key.pkg.html',
69
  '$1', '', 'inline$1'
70
  ];
71
+ jush.urls.mail = ['https://tools.ietf.org/html/rfc2076#section-3.$key',
72
  '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16'
73
  ];
74
 
adminer/adminer/externals/jush/modules/jush-simpledb.js CHANGED
@@ -1,6 +1,6 @@
1
  jush.tr.simpledb = { sqlite_apo: /'/, sqlite_quo: /"/, bac: /`/ };
2
 
3
- jush.urls.simpledb = ['http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/$key.html',
4
  'QuotingRulesSelect', 'CountingDataSelect', 'SortingDataSelect', 'SimpleQueriesSelect', 'UsingSelectOperators', 'RangeValueQueriesSelect', ''
5
  ];
6
 
1
  jush.tr.simpledb = { sqlite_apo: /'/, sqlite_quo: /"/, bac: /`/ };
2
 
3
+ jush.urls.simpledb = ['https://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/$key.html',
4
  'QuotingRulesSelect', 'CountingDataSelect', 'SortingDataSelect', 'SimpleQueriesSelect', 'UsingSelectOperators', 'RangeValueQueriesSelect', ''
5
  ];
6
 
adminer/adminer/externals/jush/modules/jush-sql.js CHANGED
@@ -6,8 +6,8 @@ jush.tr.sqlset = { _0: /$/ }; //! jump from SHOW VARIABLES LIKE ''
6
  jush.tr.sqlstatus = { _0: /$/ }; //! jump from SHOW STATUS LIKE ''
7
  jush.tr.com_code = { _1: /()/ };
8
 
9
- jush.urls.sql_sqlset = 'http://dev.mysql.com/doc/mysql/en/$key';
10
- jush.urls.sql = ['http://dev.mysql.com/doc/mysql/en/$key',
11
  'alter-event.html', 'alter-table.html', 'alter-view.html', 'analyze-table.html', 'create-event.html', 'create-function.html', 'create-procedure.html', 'create-index.html', 'create-table.html', 'create-trigger.html', 'create-view.html', 'drop-index.html', 'drop-table.html', 'begin-end.html', 'optimize-table.html', 'repair-table.html', 'set-transaction.html', 'show-columns.html', 'show-engines.html', 'show-index.html', 'show-processlist.html', 'show-status.html', 'show-tables.html', 'show-variables.html',
12
  '$1.html', '$1-statement.html', 'if-statement.html', 'repeat-statement.html', 'truncate-table.html', 'commit.html', 'savepoints.html', 'lock-tables.html', 'charset-connection.html', 'insert-on-duplicate.html', 'fulltext-search.html', 'example-auto-increment.html',
13
  'comparison-operators.html#operator_$1', 'comparison-operators.html#function_$1', 'any-in-some-subqueries.html', 'all-subqueries.html', 'exists-and-not-exists-subqueries.html', 'group-by-modifiers.html', 'string-functions.html#operator_$1', 'string-comparison-functions.html#operator_$1', 'regexp.html#operator_$1', 'regexp.html#operator_regexp', 'logical-operators.html#operator_$1', 'control-flow-functions.html#operator_$1', 'arithmetic-functions.html#operator_$1', 'cast-functions.html#operator_$1', 'date-and-time-functions.html#function_$1', 'date-and-time-functions.html#function_date-add',
@@ -26,7 +26,7 @@ jush.urls.sql = ['http://dev.mysql.com/doc/mysql/en/$key',
26
  'row-subqueries.html',
27
  'fulltext-search.html#function_match'
28
  ];
29
- jush.urls.sqlset = ['http://dev.mysql.com/doc/mysql/en/$key',
30
  'innodb-parameters.html#sysvar_$1',
31
  'mysql-cluster-program-options-mysqld.html#option_mysqld_$1', 'mysql-cluster-replication-conflict-resolution.html#option_mysqld_$1', 'mysql-cluster-replication-schema.html', 'mysql-cluster-replication-starting.html', 'mysql-cluster-system-variables.html#sysvar_$1',
32
  'replication-options-binary-log.html#option_mysqld_$1', 'replication-options-binary-log.html#sysvar_$1', 'replication-options-master.html#sysvar_$1', 'replication-options-slave.html#option_mysqld_log-slave-updates', 'replication-options-slave.html#option_mysqld_$1', 'replication-options-slave.html#sysvar_$1', 'replication-options.html#option_mysqld_$1',
@@ -35,7 +35,7 @@ jush.urls.sqlset = ['http://dev.mysql.com/doc/mysql/en/$key',
35
  'server-system-variables.html#sysvar_low_priority_updates', 'server-system-variables.html#sysvar_max_join_size', 'server-system-variables.html#sysvar_$1',
36
  'ssl-options.html#option_general_$1'
37
  ];
38
- jush.urls.sqlstatus = ['http://dev.mysql.com/doc/mysql/en/$key',
39
  'server-status-variables.html#statvar_Com_xxx',
40
  'server-status-variables.html#statvar_$1'
41
  ];
6
  jush.tr.sqlstatus = { _0: /$/ }; //! jump from SHOW STATUS LIKE ''
7
  jush.tr.com_code = { _1: /()/ };
8
 
9
+ jush.urls.sql_sqlset = 'https://dev.mysql.com/doc/mysql/en/$key';
10
+ jush.urls.sql = ['https://dev.mysql.com/doc/mysql/en/$key',
11
  'alter-event.html', 'alter-table.html', 'alter-view.html', 'analyze-table.html', 'create-event.html', 'create-function.html', 'create-procedure.html', 'create-index.html', 'create-table.html', 'create-trigger.html', 'create-view.html', 'drop-index.html', 'drop-table.html', 'begin-end.html', 'optimize-table.html', 'repair-table.html', 'set-transaction.html', 'show-columns.html', 'show-engines.html', 'show-index.html', 'show-processlist.html', 'show-status.html', 'show-tables.html', 'show-variables.html',
12
  '$1.html', '$1-statement.html', 'if-statement.html', 'repeat-statement.html', 'truncate-table.html', 'commit.html', 'savepoints.html', 'lock-tables.html', 'charset-connection.html', 'insert-on-duplicate.html', 'fulltext-search.html', 'example-auto-increment.html',
13
  'comparison-operators.html#operator_$1', 'comparison-operators.html#function_$1', 'any-in-some-subqueries.html', 'all-subqueries.html', 'exists-and-not-exists-subqueries.html', 'group-by-modifiers.html', 'string-functions.html#operator_$1', 'string-comparison-functions.html#operator_$1', 'regexp.html#operator_$1', 'regexp.html#operator_regexp', 'logical-operators.html#operator_$1', 'control-flow-functions.html#operator_$1', 'arithmetic-functions.html#operator_$1', 'cast-functions.html#operator_$1', 'date-and-time-functions.html#function_$1', 'date-and-time-functions.html#function_date-add',
26
  'row-subqueries.html',
27
  'fulltext-search.html#function_match'
28
  ];
29
+ jush.urls.sqlset = ['https://dev.mysql.com/doc/mysql/en/$key',
30
  'innodb-parameters.html#sysvar_$1',
31
  'mysql-cluster-program-options-mysqld.html#option_mysqld_$1', 'mysql-cluster-replication-conflict-resolution.html#option_mysqld_$1', 'mysql-cluster-replication-schema.html', 'mysql-cluster-replication-starting.html', 'mysql-cluster-system-variables.html#sysvar_$1',
32
  'replication-options-binary-log.html#option_mysqld_$1', 'replication-options-binary-log.html#sysvar_$1', 'replication-options-master.html#sysvar_$1', 'replication-options-slave.html#option_mysqld_log-slave-updates', 'replication-options-slave.html#option_mysqld_$1', 'replication-options-slave.html#sysvar_$1', 'replication-options.html#option_mysqld_$1',
35
  'server-system-variables.html#sysvar_low_priority_updates', 'server-system-variables.html#sysvar_max_join_size', 'server-system-variables.html#sysvar_$1',
36
  'ssl-options.html#option_general_$1'
37
  ];
38
+ jush.urls.sqlstatus = ['https://dev.mysql.com/doc/mysql/en/$key',
39
  'server-status-variables.html#statvar_Com_xxx',
40
  'server-status-variables.html#statvar_$1'
41
  ];
adminer/adminer/externals/jush/modules/jush-sqlite.js CHANGED
@@ -3,17 +3,17 @@ jush.tr.sqlite_sqliteset = { sqlite_apo: /'/, sqlite_quo: /"/, bra: /\[/, bac: /
3
  jush.tr.sqliteset = { _0: /$/ };
4
  jush.tr.sqlitestatus = { _0: /$/ };
5
 
6
- jush.urls.sqlite_sqliteset = 'http://www.sqlite.org/$key';
7
- jush.urls.sqlite = ['http://www.sqlite.org/$key',
8
  'lang_$1.html', 'lang_createvtab.html', 'lang_transaction.html',
9
  'lang_createindex.html', 'lang_createtable.html', 'lang_createtrigger.html', 'lang_createview.html',
10
  '',
11
  'lang_expr.html#$1', 'lang_corefunc.html#$1', 'lang_datefunc.html#$1', 'lang_aggfunc.html#$1'
12
  ];
13
- jush.urls.sqliteset = ['http://www.sqlite.org/pragma.html#$key',
14
  'pragma_$1'
15
  ];
16
- jush.urls.sqlitestatus = ['http://www.sqlite.org/compile.html#$key',
17
  '$1'
18
  ];
19
 
3
  jush.tr.sqliteset = { _0: /$/ };
4
  jush.tr.sqlitestatus = { _0: /$/ };
5
 
6
+ jush.urls.sqlite_sqliteset = 'https://www.sqlite.org/$key';
7
+ jush.urls.sqlite = ['https://www.sqlite.org/$key',
8
  'lang_$1.html', 'lang_createvtab.html', 'lang_transaction.html',
9
  'lang_createindex.html', 'lang_createtable.html', 'lang_createtrigger.html', 'lang_createview.html',
10
  '',
11
  'lang_expr.html#$1', 'lang_corefunc.html#$1', 'lang_datefunc.html#$1', 'lang_aggfunc.html#$1'
12
  ];
13
+ jush.urls.sqliteset = ['https://www.sqlite.org/pragma.html#$key',
14
  'pragma_$1'
15
  ];
16
+ jush.urls.sqlitestatus = ['https://www.sqlite.org/compile.html#$key',
17
  '$1'
18
  ];
19
 
adminer/adminer/externals/jush/modules/jush.js CHANGED
@@ -1,8 +1,8 @@
1
  /** JUSH - JavaScript Syntax Highlighter
2
  * @link http://jush.sourceforge.net
3
- * @author Jakub Vrana, http://www.vrana.cz
4
  * @copyright 2007 Jakub Vrana
5
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
6
  */
7
 
8
  /* Limitations:
@@ -92,7 +92,7 @@ var jush = {
92
  var highlight = function () {
93
  var start = new Date();
94
  while (i < pre.length) {
95
- var match = /(^|\s)(?:jush|language(?=-\S))($|\s|-(\S+))/.exec(pre[i].className); // http://www.w3.org/TR/html5/text-level-semantics.html#the-code-element
96
  if (match) {
97
  var language = match[3] ? match[3] : 'htm';
98
  var s = '<span class="jush-' + language + '">' + jush.highlight_html(language, pre[i].innerHTML.replace(/\t/g, tab.length ? tab : '\t')) + '</span>'; // span - enable style for class="language-"
@@ -149,7 +149,7 @@ var jush = {
149
  s = s.replace(links2, function (str, match1) {
150
  for (var i=arguments.length - 4; i > 1; i--) {
151
  if (arguments[i]) {
152
- var link = (/^http:/.test(url[i-1]) || !url[i-1] ? url[i-1] : url[0].replace(/\$key/g, url[i-1]));
153
  switch (state) {
154
  case 'php': link = link.replace(/\$1/g, arguments[i].toLowerCase()); break;
155
  case 'php_new': link = link.replace(/\$1/g, arguments[i].toLowerCase()); break; // toLowerCase() - case sensitive after #
@@ -332,7 +332,7 @@ var jush = {
332
  var k_link = '';
333
  var att_tag = (this.att_mapping[link + '-' + this.last_tag] ? this.att_mapping[link + '-' + this.last_tag] : this.last_tag);
334
  for (var k in this.links[key]) {
335
- if (key == 'att' && this.links[key][k].test(link + '-' + att_tag) && !/^http:/.test(k)) {
336
  link += '-' + att_tag;
337
  k_link = k;
338
  break;
@@ -354,7 +354,7 @@ var jush = {
354
  }
355
  if (k_link) {
356
  s = (m[1] ? '<span class="jush-op">' + this.htmlspecialchars(escape ? escape(m[1]) : m[1]) + '</span>' : '');
357
- s += this.create_link((/^http:/.test(k_link) ? k_link : this.urls[key].replace(/\$key/, k_link)).replace(/\$val/, (/^http:/.test(k_link) ? link.toLowerCase() : link)), this.htmlspecialchars(escape ? escape(m[2]) : m[2])); //! use jush.api
358
  s += (m[3] ? '<span class="jush-op">' + this.htmlspecialchars(escape ? escape(m[3]) : m[3]) + '</span>' : '');
359
  }
360
  }
1
  /** JUSH - JavaScript Syntax Highlighter
2
  * @link http://jush.sourceforge.net
3
+ * @author Jakub Vrana, https://www.vrana.cz
4
  * @copyright 2007 Jakub Vrana
5
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
6
  */
7
 
8
  /* Limitations:
92
  var highlight = function () {
93
  var start = new Date();
94
  while (i < pre.length) {
95
+ var match = /(^|\s)(?:jush|language(?=-\S))($|\s|-(\S+))/.exec(pre[i].className); // https://www.w3.org/TR/html5/text-level-semantics.html#the-code-element
96
  if (match) {
97
  var language = match[3] ? match[3] : 'htm';
98
  var s = '<span class="jush-' + language + '">' + jush.highlight_html(language, pre[i].innerHTML.replace(/\t/g, tab.length ? tab : '\t')) + '</span>'; // span - enable style for class="language-"
149
  s = s.replace(links2, function (str, match1) {
150
  for (var i=arguments.length - 4; i > 1; i--) {
151
  if (arguments[i]) {
152
+ var link = (/^https?:/.test(url[i-1]) || !url[i-1] ? url[i-1] : url[0].replace(/\$key/g, url[i-1]));
153
  switch (state) {
154
  case 'php': link = link.replace(/\$1/g, arguments[i].toLowerCase()); break;
155
  case 'php_new': link = link.replace(/\$1/g, arguments[i].toLowerCase()); break; // toLowerCase() - case sensitive after #
332
  var k_link = '';
333
  var att_tag = (this.att_mapping[link + '-' + this.last_tag] ? this.att_mapping[link + '-' + this.last_tag] : this.last_tag);
334
  for (var k in this.links[key]) {
335
+ if (key == 'att' && this.links[key][k].test(link + '-' + att_tag) && !/^https?:/.test(k)) {
336
  link += '-' + att_tag;
337
  k_link = k;
338
  break;
354
  }
355
  if (k_link) {
356
  s = (m[1] ? '<span class="jush-op">' + this.htmlspecialchars(escape ? escape(m[1]) : m[1]) + '</span>' : '');
357
+ s += this.create_link((/^https?:/.test(k_link) ? k_link : this.urls[key].replace(/\$key/, k_link)).replace(/\$val/, (/^https?:/.test(k_link) ? link.toLowerCase() : link)), this.htmlspecialchars(escape ? escape(m[2]) : m[2])); //! use jush.api
358
  s += (m[3] ? '<span class="jush-op">' + this.htmlspecialchars(escape ? escape(m[3]) : m[3]) + '</span>' : '');
359
  }
360
  }
adminer/adminer/plugins/database-hide.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Hide some databases from the interface - just to improve design, not a security plugin
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDatabaseHide {
10
  protected $disabled;
3
  /** Hide some databases from the interface - just to improve design, not a security plugin
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDatabaseHide {
10
  protected $disabled;
adminer/adminer/plugins/dump-alter.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Exports one database (e.g. development) so that it can be synced with other database (e.g. production)
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDumpAlter {
10
 
@@ -69,7 +69,7 @@ SELECT @adminer_alter;
69
 
70
  function dumpTable($table, $style, $is_view = false) {
71
  if ($_POST["format"] == "sql_alter") {
72
- $create = create_sql($table, $_POST["auto_increment"]);
73
  if ($is_view) {
74
  echo substr_replace($create, " OR REPLACE", 6, 0) . ";\n\n";
75
  } else {
3
  /** Exports one database (e.g. development) so that it can be synced with other database (e.g. production)
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDumpAlter {
10
 
69
 
70
  function dumpTable($table, $style, $is_view = false) {
71
  if ($_POST["format"] == "sql_alter") {
72
+ $create = create_sql($table, $_POST["auto_increment"], $style);
73
  if ($is_view) {
74
  echo substr_replace($create, " OR REPLACE", 6, 0) . ";\n\n";
75
  } else {
adminer/adminer/plugins/dump-bz2.php CHANGED
@@ -4,8 +4,8 @@
4
  * @link https://www.adminer.org/plugins/#use
5
  * @uses bzopen(), tempnam("")
6
  * @author Jakub Vrana, https://www.vrana.cz/
7
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
9
  */
10
  class AdminerDumpBz2 {
11
  /** @access protected */
4
  * @link https://www.adminer.org/plugins/#use
5
  * @uses bzopen(), tempnam("")
6
  * @author Jakub Vrana, https://www.vrana.cz/
7
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
9
  */
10
  class AdminerDumpBz2 {
11
  /** @access protected */
adminer/adminer/plugins/dump-date.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Include current date and time in export filename
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDumpDate {
10
 
3
  /** Include current date and time in export filename
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDumpDate {
10
 
adminer/adminer/plugins/dump-json.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Dump to JSON format
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDumpJson {
10
  /** @access protected */
3
  /** Dump to JSON format
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDumpJson {
10
  /** @access protected */
adminer/adminer/plugins/dump-xml.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Dump to XML format in structure <database name=""><table name=""><column name="">value
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDumpXml {
10
  /** @access protected */
3
  /** Dump to XML format in structure <database name=""><table name=""><column name="">value
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerDumpXml {
10
  /** @access protected */
adminer/adminer/plugins/dump-zip.php CHANGED
@@ -4,8 +4,8 @@
4
  * @link https://www.adminer.org/plugins/#use
5
  * @uses ZipArchive, tempnam("")
6
  * @author Jakub Vrana, https://www.vrana.cz/
7
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
9
  */
10
  class AdminerDumpZip {
11
  /** @access protected */
4
  * @link https://www.adminer.org/plugins/#use
5
  * @uses ZipArchive, tempnam("")
6
  * @author Jakub Vrana, https://www.vrana.cz/
7
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
9
  */
10
  class AdminerDumpZip {
11
  /** @access protected */
adminer/adminer/plugins/edit-foreign.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Select foreign key in edit form
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerEditForeign {
10
  var $_limit;
3
  /** Select foreign key in edit form
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerEditForeign {
10
  var $_limit;
adminer/adminer/plugins/enum-option.php CHANGED
@@ -3,25 +3,28 @@
3
  /** Use <select><option> for enum edit instead of <input type="radio">
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerEnumOption {
10
 
11
  function editInput($table, $field, $attrs, $value) {
12
  if ($field["type"] == "enum") {
13
- $options = array("" => array());
14
  $selected = $value;
15
  if (isset($_GET["select"])) {
16
- $options[""][-1] = lang('original');
 
 
 
17
  }
18
  if ($field["null"]) {
19
- $options[""][""] = "NULL";
20
  if ($value === null && !isset($_GET["select"])) {
21
  $selected = "";
22
  }
23
  }
24
- $options[""][0] = lang('empty');
25
  preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
26
  foreach ($matches[1] as $i => $val) {
27
  $val = stripcslashes(str_replace("''", "'", $val));
3
  /** Use <select><option> for enum edit instead of <input type="radio">
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerEnumOption {
10
 
11
  function editInput($table, $field, $attrs, $value) {
12
  if ($field["type"] == "enum") {
13
+ $options = array();
14
  $selected = $value;
15
  if (isset($_GET["select"])) {
16
+ $options[-1] = lang('original');
17
+ if ($selected === null) {
18
+ $selected = -1;
19
+ }
20
  }
21
  if ($field["null"]) {
22
+ $options[""] = "NULL";
23
  if ($value === null && !isset($_GET["select"])) {
24
  $selected = "";
25
  }
26
  }
27
+ $options[0] = lang('empty');
28
  preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
29
  foreach ($matches[1] as $i => $val) {
30
  $val = stripcslashes(str_replace("''", "'", $val));
adminer/adminer/plugins/file-upload.php CHANGED
@@ -4,8 +4,8 @@
4
  /** Edit fields ending with "_path" by <input type="file"> and link to the uploaded files from select
5
  * @link https://www.adminer.org/plugins/#use
6
  * @author Jakub Vrana, https://www.vrana.cz/
7
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
9
  */
10
  class AdminerFileUpload {
11
  /** @access protected */
@@ -24,7 +24,7 @@ class AdminerFileUpload {
24
 
25
  function editInput($table, $field, $attrs, $value) {
26
  if (preg_match('~(.*)_path$~', $field["field"])) {
27
- return "<input type='file' name='fields-$field[field]'>";
28
  }
29
  }
30
 
4
  /** Edit fields ending with "_path" by <input type="file"> and link to the uploaded files from select
5
  * @link https://www.adminer.org/plugins/#use
6
  * @author Jakub Vrana, https://www.vrana.cz/
7
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
9
  */
10
  class AdminerFileUpload {
11
  /** @access protected */
24
 
25
  function editInput($table, $field, $attrs, $value) {
26
  if (preg_match('~(.*)_path$~', $field["field"])) {
27
+ return "<input type='file'$attrs>";
28
  }
29
  }
30
 
adminer/adminer/plugins/foreign-system.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Link system tables (in mysql and information_schema databases) by foreign keys
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerForeignSystem {
10
 
3
  /** Link system tables (in mysql and information_schema databases) by foreign keys
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerForeignSystem {
10
 
adminer/adminer/plugins/frames.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Allow using Adminer inside a frame (disables ClickJacking protection)
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerFrames {
10
  /** @access protected */
@@ -20,9 +20,9 @@ class AdminerFrames {
20
  function headers() {
21
  if ($this->sameOrigin) {
22
  header("X-Frame-Options: SameOrigin");
 
 
23
  }
24
- header("X-XSS-Protection: 0");
25
- return false;
26
  }
27
 
28
  }
3
  /** Allow using Adminer inside a frame (disables ClickJacking protection)
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerFrames {
10
  /** @access protected */
20
  function headers() {
21
  if ($this->sameOrigin) {
22
  header("X-Frame-Options: SameOrigin");
23
+ } elseif (function_exists('header_remove')) {
24
+ header_remove("X-Frame-Options");
25
  }
 
 
26
  }
27
 
28
  }
adminer/adminer/plugins/json-column.php CHANGED
@@ -4,8 +4,8 @@
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
  * @author Martin Zeman (Zemistr), http://www.zemistr.eu/
7
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
9
  */
10
  class AdminerJsonColumn {
11
  private function _testJson($value) {
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
  * @author Martin Zeman (Zemistr), http://www.zemistr.eu/
7
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
8
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
9
  */
10
  class AdminerJsonColumn {
11
  private function _testJson($value) {
adminer/adminer/plugins/plugin.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Adminer customization allowing usage of plugins
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerPlugin extends Adminer {
10
  /** @access protected */
@@ -62,7 +62,10 @@ class AdminerPlugin extends Adminer {
62
  $return = $this->_callParent($function, $args);
63
  foreach ($this->plugins as $plugin) {
64
  if (method_exists($plugin, $function)) {
65
- $return += call_user_func_array(array($plugin, $function), $args);
 
 
 
66
  }
67
  }
68
  return $return;
@@ -97,11 +100,21 @@ class AdminerPlugin extends Adminer {
97
  return $this->_applyPlugin(__FUNCTION__, $args);
98
  }
99
 
 
 
 
 
 
100
  function permanentLogin($create = false) {
101
  $args = func_get_args();
102
  return $this->_applyPlugin(__FUNCTION__, $args);
103
  }
104
 
 
 
 
 
 
105
  function database() {
106
  $args = func_get_args();
107
  return $this->_applyPlugin(__FUNCTION__, $args);
@@ -127,11 +140,21 @@ class AdminerPlugin extends Adminer {
127
  return $this->_applyPlugin(__FUNCTION__, $args);
128
  }
129
 
 
 
 
 
 
130
  function head() {
131
  $args = func_get_args();
132
  return $this->_applyPlugin(__FUNCTION__, $args);
133
  }
134
 
 
 
 
 
 
135
  function loginForm() {
136
  $args = func_get_args();
137
  return $this->_applyPlugin(__FUNCTION__, $args);
@@ -172,7 +195,7 @@ class AdminerPlugin extends Adminer {
172
  return $this->_applyPlugin(__FUNCTION__, $args);
173
  }
174
 
175
- function selectQuery($query, $time) {
176
  $args = func_get_args();
177
  return $this->_applyPlugin(__FUNCTION__, $args);
178
  }
@@ -297,7 +320,7 @@ class AdminerPlugin extends Adminer {
297
  return $this->_applyPlugin(__FUNCTION__, $args);
298
  }
299
 
300
- function messageQuery($query, $time) {
301
  $args = func_get_args();
302
  return $this->_applyPlugin(__FUNCTION__, $args);
303
  }
@@ -307,6 +330,11 @@ class AdminerPlugin extends Adminer {
307
  return $this->_applyPlugin(__FUNCTION__, $args);
308
  }
309
 
 
 
 
 
 
310
  function processInput($field, $value, $function = "") {
311
  $args = func_get_args();
312
  return $this->_applyPlugin(__FUNCTION__, $args);
@@ -337,6 +365,11 @@ class AdminerPlugin extends Adminer {
337
  return $this->_applyPlugin(__FUNCTION__, $args);
338
  }
339
 
 
 
 
 
 
340
  function homepage() {
341
  $args = func_get_args();
342
  return $this->_applyPlugin(__FUNCTION__, $args);
3
  /** Adminer customization allowing usage of plugins
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerPlugin extends Adminer {
10
  /** @access protected */
62
  $return = $this->_callParent($function, $args);
63
  foreach ($this->plugins as $plugin) {
64
  if (method_exists($plugin, $function)) {
65
+ $value = call_user_func_array(array($plugin, $function), $args);
66
+ if ($value) {
67
+ $return += $value;
68
+ }
69
  }
70
  }
71
  return $return;
100
  return $this->_applyPlugin(__FUNCTION__, $args);
101
  }
102
 
103
+ function connectSsl() {
104
+ $args = func_get_args();
105
+ return $this->_applyPlugin(__FUNCTION__, $args);
106
+ }
107
+
108
  function permanentLogin($create = false) {
109
  $args = func_get_args();
110
  return $this->_applyPlugin(__FUNCTION__, $args);
111
  }
112
 
113
+ function serverName($server) {
114
+ $args = func_get_args();
115
+ return $this->_applyPlugin(__FUNCTION__, $args);
116
+ }
117
+
118
  function database() {
119
  $args = func_get_args();
120
  return $this->_applyPlugin(__FUNCTION__, $args);
140
  return $this->_applyPlugin(__FUNCTION__, $args);
141
  }
142
 
143
+ function csp() {
144
+ $args = func_get_args();
145
+ return $this->_applyPlugin(__FUNCTION__, $args);
146
+ }
147
+
148
  function head() {
149
  $args = func_get_args();
150
  return $this->_applyPlugin(__FUNCTION__, $args);
151
  }
152
 
153
+ function css() {
154
+ $args = func_get_args();
155
+ return $this->_applyPlugin(__FUNCTION__, $args);
156
+ }
157
+
158
  function loginForm() {
159
  $args = func_get_args();
160
  return $this->_applyPlugin(__FUNCTION__, $args);
195
  return $this->_applyPlugin(__FUNCTION__, $args);
196
  }
197
 
198
+ function selectQuery($query, $start, $failed = false) {
199
  $args = func_get_args();
200
  return $this->_applyPlugin(__FUNCTION__, $args);
201
  }
320
  return $this->_applyPlugin(__FUNCTION__, $args);
321
  }
322
 
323
+ function messageQuery($query, $time, $failed = false) {
324
  $args = func_get_args();
325
  return $this->_applyPlugin(__FUNCTION__, $args);
326
  }
330
  return $this->_applyPlugin(__FUNCTION__, $args);
331
  }
332
 
333
+ function editHint($table, $field, $value) {
334
+ $args = func_get_args();
335
+ return $this->_applyPlugin(__FUNCTION__, $args);
336
+ }
337
+
338
  function processInput($field, $value, $function = "") {
339
  $args = func_get_args();
340
  return $this->_applyPlugin(__FUNCTION__, $args);
365
  return $this->_applyPlugin(__FUNCTION__, $args);
366
  }
367
 
368
+ function importServerPath() {
369
+ $args = func_get_args();
370
+ return $this->_applyPlugin(__FUNCTION__, $args);
371
+ }
372
+
373
  function homepage() {
374
  $args = func_get_args();
375
  return $this->_applyPlugin(__FUNCTION__, $args);
adminer/adminer/plugins/slugify.php CHANGED
@@ -3,8 +3,8 @@
3
  /** Prefill field containing "_slug" with slugified value of a previous field (JavaScript)
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerSlugify {
10
  /** @access protected */
@@ -34,7 +34,16 @@ class AdminerSlugify {
34
  }
35
  $slug = $slugify[$field["field"]];
36
  if ($slug !== null) {
37
- return "<input value='" . h($value) . "' maxlength='$field[length]' size='40'$attrs onchange=\"var find = '$this->from'; var repl = '$this->to'; this.form['fields[$slug]'].value = this.value.toLowerCase().replace(new RegExp('[' + find + ']', 'g'), function (str) { return repl[find.indexOf(str)]; }).replace(/[^a-z0-9_]+/g, '-').replace(/^-|-\$/g, '').substr(0, $field[length]);\">";
 
 
 
 
 
 
 
 
 
38
  }
39
  }
40
  }
3
  /** Prefill field containing "_slug" with slugified value of a previous field (JavaScript)
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerSlugify {
10
  /** @access protected */
34
  }
35
  $slug = $slugify[$field["field"]];
36
  if ($slug !== null) {
37
+ return "<input value='" . h($value) . "' maxlength='$field[length]' size='40'$attrs>"
38
+ . script("qsl('input').onchange = function () {
39
+ var find = '$this->from';
40
+ var repl = '$this->to';
41
+ this.form['fields[$slug]'].value = this.value.toLowerCase()
42
+ .replace(new RegExp('[' + find + ']', 'g'), function (str) { return repl[find.indexOf(str)]; })
43
+ .replace(/[^a-z0-9_]+/g, '-')
44
+ .replace(/^-|-\$/g, '')
45
+ .substr(0, $field[length]);
46
+ };");
47
  }
48
  }
49
  }
adminer/adminer/plugins/tables-filter.php CHANGED
@@ -3,25 +3,17 @@
3
  /** Use filter in tables list
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerTablesFilter {
10
  function tablesPrint($tables) { ?>
11
- <p class="jsonly"><input id="filter-field" onkeyup="tablesFilterInput();" autocomplete="off">
12
- <p id='tables' onmouseover='menuOver(this, event);' onmouseout='menuOut(this);'>
13
- <?php
14
- foreach ($tables as $table => $type) {
15
- echo '<span data-table-name="'.h($table).'"><a href="'.h(ME).'select='.urlencode($table).'"'.bold($_GET["select"] == $table).">".lang('select')."</a> ";
16
- echo '<a href="'.h(ME).'table='.urlencode($table).'"'.bold($_GET["table"] == $table).">".h($table)."</a><br></span>\n";
17
- }
18
- ?>
19
- <script type="text/javascript">
20
  var tablesFilterTimeout = null;
21
  var tablesFilterValue = '';
22
 
23
  function tablesFilter(){
24
- var value = document.getElementById('filter-field').value.toLowerCase();
25
  if (value == tablesFilterValue) {
26
  return;
27
  }
@@ -33,9 +25,9 @@ function tablesFilter(){
33
  if (sessionStorage) {
34
  sessionStorage.setItem('adminer_tables_filter', value);
35
  }
36
- var tables = document.getElementById('tables').getElementsByTagName('span');
37
  for (var i = 0; i < tables.length; i++) {
38
- var a = tables[i].getElementsByTagName('a')[1];
39
  var text = tables[i].getAttribute('data-table-name');
40
  if (value == '') {
41
  tables[i].className = '';
@@ -53,15 +45,31 @@ function tablesFilterInput() {
53
  }
54
 
55
  if (sessionStorage){
56
- var db = document.getElementById('dbs').getElementsByTagName('select')[0];
57
  db = db.options[db.selectedIndex].text;
58
  if (db == sessionStorage.getItem('adminer_tables_filter_db') && sessionStorage.getItem('adminer_tables_filter')){
59
- document.getElementById('filter-field').value = sessionStorage.getItem('adminer_tables_filter');
60
  tablesFilter();
61
  }
62
  sessionStorage.setItem('adminer_tables_filter_db', db);
63
  }
64
  </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  <?php
66
  return true;
67
  }
3
  /** Use filter in tables list
4
  * @link https://www.adminer.org/plugins/#use
5
  * @author Jakub Vrana, https://www.vrana.cz/
6
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
7
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
8
  */
9
  class AdminerTablesFilter {
10
  function tablesPrint($tables) { ?>
11
+ <script<?php echo nonce(); ?>>
 
 
 
 
 
 
 
 
12
  var tablesFilterTimeout = null;
13
  var tablesFilterValue = '';
14
 
15
  function tablesFilter(){
16
+ var value = qs('#filter-field').value.toLowerCase();
17
  if (value == tablesFilterValue) {
18
  return;
19
  }
25
  if (sessionStorage) {
26
  sessionStorage.setItem('adminer_tables_filter', value);
27
  }
28
+ var tables = qsa('li', qs('#tables'));
29
  for (var i = 0; i < tables.length; i++) {
30
+ var a = qsa('a', tables[i])[1];
31
  var text = tables[i].getAttribute('data-table-name');
32
  if (value == '') {
33
  tables[i].className = '';
45
  }
46
 
47
  if (sessionStorage){
48
+ var db = qs('#dbs').querySelector('select');
49
  db = db.options[db.selectedIndex].text;
50
  if (db == sessionStorage.getItem('adminer_tables_filter_db') && sessionStorage.getItem('adminer_tables_filter')){
51
+ qs('#filter-field').value = sessionStorage.getItem('adminer_tables_filter');
52
  tablesFilter();
53
  }
54
  sessionStorage.setItem('adminer_tables_filter_db', db);
55
  }
56
  </script>
57
+ <p class="jsonly"><input id="filter-field" autocomplete="off"><?php echo script("qs('#filter-field').oninput = tablesFilterInput;"); ?>
58
+ <ul id='tables'>
59
+ <?php
60
+ echo script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
61
+ foreach ($tables as $table => $status) {
62
+ echo '<li data-table-name="' . h($table) . '"><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
63
+ $name = h($status["Name"]);
64
+ echo (support("table") || support("indexes")
65
+ ? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
66
+ . bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
67
+ . " title='" . lang('Show structure') . "'>$name</a>"
68
+ : "<span>$name</span>"
69
+ ) . "\n";
70
+ }
71
+ ?>
72
+ </ul>
73
  <?php
74
  return true;
75
  }
adminer/adminer/plugins/translation.php CHANGED
@@ -13,8 +13,8 @@ CREATE TABLE translation (
13
  /** Translate all table and field comments, enum and set values from the translation table (inserts new translations)
14
  * @link https://www.adminer.org/plugins/#use
15
  * @author Jakub Vrana, https://www.vrana.cz/
16
- * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
17
- * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
18
  */
19
  class AdminerTranslation {
20
 
13
  /** Translate all table and field comments, enum and set values from the translation table (inserts new translations)
14
  * @link https://www.adminer.org/plugins/#use
15
  * @author Jakub Vrana, https://www.vrana.cz/
16
+ * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
17
+ * @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
18
  */
19
  class AdminerTranslation {
20
 
ari-adminer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: ARI Adminer
4
  Plugin URI: http://wp-quiz.ari-soft.com/plugins/wordpress-adminer.html
5
  Description: Powerful, compact and easy to use database manager plugin for WordPress.
6
- Version: 1.1.9
7
  Author: ARI Soft
8
  Author URI: http://www.ari-soft.com
9
  Text Domain: ari-adminer
3
  Plugin Name: ARI Adminer
4
  Plugin URI: http://wp-quiz.ari-soft.com/plugins/wordpress-adminer.html
5
  Description: Powerful, compact and easy to use database manager plugin for WordPress.
6
+ Version: 1.1.10
7
  Author: ARI Soft
8
  Author URI: http://www.ari-soft.com
9
  Text Domain: ari-adminer
includes/defines.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- define( 'ARIADMINER_VERSION', '1.1.9' );
3
  define( 'ARIADMINER_SLUG', 'ari-adminer' );
4
  define( 'ARIADMINER_ASSETS_URL', ARIADMINER_URL . 'assets/' );
5
  define( 'ARIADMINER_VERSION_OPTION', 'ari_adminer' );
1
  <?php
2
+ define( 'ARIADMINER_VERSION', '1.1.10' );
3
  define( 'ARIADMINER_SLUG', 'ari-adminer' );
4
  define( 'ARIADMINER_ASSETS_URL', ARIADMINER_URL . 'assets/' );
5
  define( 'ARIADMINER_VERSION_OPTION', 'ari_adminer' );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wp-quiz.ari-soft.com/plugins/wordpress-adminer.html
4
  Tags: adminer, sql, database, mysql, report, sqlite, table, postgresql, dump, backup, import, export, phpmyadmin
5
  Requires at least: 3.4
6
  Tested up to: 4.9.4
7
- Stable tag: 1.1.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -74,6 +74,10 @@ Sure, it is available [here](http://www.ari-soft.com/docs/wordpress/ari-adminer/
74
 
75
  == Changelog ==
76
 
 
 
 
 
77
  = 1.1.9 =
78
  * Better PHP 7.2.x support
79
 
@@ -135,6 +139,9 @@ Sure, it is available [here](http://www.ari-soft.com/docs/wordpress/ari-adminer/
135
 
136
  == Upgrade Notice ==
137
 
 
 
 
138
  = 1.1.9 =
139
  * Better PHP 7.2.x support
140
 
4
  Tags: adminer, sql, database, mysql, report, sqlite, table, postgresql, dump, backup, import, export, phpmyadmin
5
  Requires at least: 3.4
6
  Tested up to: 4.9.4
7
+ Stable tag: 1.1.10
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
74
 
75
  == Changelog ==
76
 
77
+ = 1.1.10 =
78
+ * Update Adminer to v. 4.6.2
79
+ * Update .htaccess file. Thank you to KZeni (https://wordpress.org/support/topic/conflict-sucuri-security-wp-content-folder-hardening-breaks-ari-adminer/)
80
+
81
  = 1.1.9 =
82
  * Better PHP 7.2.x support
83
 
139
 
140
  == Upgrade Notice ==
141
 
142
+ = 1.1.10 =
143
+ * Update Adminer to v. 4.6.2
144
+
145
  = 1.1.9 =
146
  * Better PHP 7.2.x support
147