echo "<input type='submit' value='" . lang('Select') . "'>";
echo " <span id='noindex' title='" . lang('Full table scan') . "'></span>";
echo "<script" . nonce() . ">\n";
- echo "var indexColumns = ";
+ echo "const indexColumns = ";
$columns = array();
foreach ($indexes as $index) {
$current_key = reset($index["columns"]);
. (isset($_COOKIE["adminer_version"]) ? "" : ", onload: partial(verifyVersion, '$VERSION', '" . js_escape(ME) . "', '" . get_token() . "')") // $token may be empty in auth.inc.php
. "});
document.body.className = document.body.className.replace(/ nojs/, ' js');
-var offlineMessage = '" . js_escape(lang('You are offline.')) . "';
-var thousandsSeparator = '" . js_escape(lang(',')) . "';")
+const offlineMessage = '" . js_escape(lang('You are offline.')) . "';
+const thousandsSeparator = '" . js_escape(lang(',')) . "';")
;
echo "<div id='help' class='jush-" . JUSH . " jsonly hidden'></div>\n";
echo script("mixin(qs('#help'), {onmouseover: function () { helpOpen = 1; }, onmouseout: helpMouseout});");
$connection2 = null;
if (!$slow_query && support("kill") && is_object($connection2 = connect($adminer->credentials())) && ($db == "" || $connection2->select_db($db))) {
$kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
- echo script("var timeout = setTimeout(function () { ajax('" . js_escape(ME) . "script=kill', function () {}, 'kill=$kill&token=$token'); }, 1000 * $timeout);");
+ echo script("const timeout = setTimeout(function () { ajax('" . js_escape(ME) . "script=kill', function () {}, 'kill=$kill&token=$token'); }, 1000 * $timeout);");
}
ob_flush();
flush();
<div id="schema" style="height: <?php echo $top; ?>em;">
<script<?php echo nonce(); ?>>
qs('#schema').onselectstart = function () { return false; };
-var tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
-var em = qs('#schema').offsetHeight / <?php echo $top; ?>;
+const tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
+const em = qs('#schema').offsetHeight / <?php echo $top; ?>;
document.onmousemove = schemaMousemove;
document.onmouseup = partialArg(schemaMouseup, '<?php echo js_escape(DB); ?>');
</script>
return false;
}
-var lastType = '';
+let lastType = '';
/** Clear length and hide collation or unsigned
* @this HTMLSelectElement
function tablesPrint($tables) {
?>
<script<?php echo Adminer\nonce(); ?>>
-var tablesFilterTimeout = null;
-var tablesFilterValue = '';
+let tablesFilterTimeout = null;
+let tablesFilterValue = '';
function tablesFilter() {
const value = qs('#filter-field').value.toLowerCase();