<form action="" method="post">
<?php
if ($in) {
- echo "<table cellspacing='0' class='layout'>\n";
+ echo "<table class='layout'>\n";
foreach ($in as $key) {
$field = $routine["fields"][$key];
$name = $field["field"];
<?php if (support("columns")) { ?>
<div class="scrollable">
-<table cellspacing="0" id="edit-fields" class="nowrap">
+<table id="edit-fields" class="nowrap">
<?php
edit_fields($row["fields"], $collations, "TABLE", $foreign_keys);
?>
<?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;"); ?>
(<input name="partition" value="<?php echo h($row["partition"]); ?>">)
<?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"]); ?>">
-<table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
+<table id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
<thead><tr><th><?php echo lang('Partition name'); ?><th><?php echo lang('Values'); ?></thead>
<?php
foreach ($row["partition_names"] as $key => $val) {
}
}
echo "<div class='scrollable'>\n";
- echo "<table cellspacing='0' class='nowrap checkable odds'>\n";
+ echo "<table class='nowrap checkable odds'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo '<thead><tr class="wrap">';
echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^(tables|views)\[/);", "");
echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
$routines = routines();
if ($routines) {
- echo "<table cellspacing='0' class='odds'>\n";
+ echo "<table class='odds'>\n";
echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td></thead>\n";
foreach ($routines as $row) {
$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
echo "<h3 id='sequences'>" . lang('Sequences') . "</h3>\n";
$sequences = get_vals("SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema = current_schema() ORDER BY sequence_name");
if ($sequences) {
- echo "<table cellspacing='0' class='odds'>\n";
+ echo "<table class='odds'>\n";
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
foreach ($sequences as $val) {
echo "<tr><th><a href='" . h(ME) . "sequence=" . urlencode($val) . "'>" . h($val) . "</a>\n";
echo "<h3 id='user-types'>" . lang('User types') . "</h3>\n";
$user_types = types();
if ($user_types) {
- echo "<table cellspacing='0' class='odds'>\n";
+ echo "<table class='odds'>\n";
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
foreach ($user_types as $val) {
echo "<tr><th><a href='" . h(ME) . "type=" . urlencode($val) . "'>" . h($val) . "</a>\n";
echo "<h3 id='events'>" . lang('Events') . "</h3>\n";
$rows = get_rows("SHOW EVENTS");
if ($rows) {
- echo "<table cellspacing='0'>\n";
+ echo "<table>\n";
echo "<thead><tr><th>" . lang('Name') . "<td>" . lang('Schedule') . "<td>" . lang('Start') . "<td>" . lang('End') . "<td></thead>\n";
foreach ($rows as $row) {
echo "<tr>";
?>
<form action="" method="post">
-<table cellspacing="0" class="layout">
+<table class="layout">
<?php
$db_style = array('', 'USE', 'DROP+CREATE', 'CREATE');
$table_style = array('', 'DROP+CREATE', 'CREATE');
<p><input type="submit" value="<?php echo lang('Export'); ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
-<table cellspacing="0">
+<table>
<?php
echo script("qsl('table').onclick = dumpClick;");
$prefixes = array();
?>
<form action="" method="post">
-<table cellspacing="0" class="layout">
+<table class="layout">
<tr><th><?php echo lang('Name'); ?><td><input name="EVENT_NAME" value="<?php echo h($row["EVENT_NAME"]); ?>" data-maxlength="64" autocapitalize="off">
<tr><th title="datetime"><?php echo lang('Start'); ?><td><input name="STARTS" value="<?php echo h("$row[EXECUTE_AT]$row[STARTS]"); ?>">
<tr><th title="datetime"><?php echo lang('End'); ?><td><input name="ENDS" value="<?php echo h($row["ENDS"]); ?>">
?>
<input type="hidden" name="change-js" value="">
<noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
-<table cellspacing="0">
+<table>
<thead><tr><th id="label-source"><?php echo lang('Source'); ?><th id="label-target"><?php echo lang('Target'); ?></thead>
<?php
$j = 0;
*/
function loginForm() {
global $drivers;
- echo "<table cellspacing='0' class='layout'>\n";
+ echo "<table class='layout'>\n";
echo $this->loginFormField('driver', '<tr><th>' . lang('System') . '<td>', html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);") . "\n");
echo $this->loginFormField('server', '<tr><th>' . lang('Server') . '<td>', '<input name="auth[server]" value="' . h(SERVER) . '" title="hostname[:port]" placeholder="localhost" autocapitalize="off">' . "\n");
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input name="auth[username]" id="username" autofocus value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">' . script("qs('#username').form['auth[driver]'].onchange();"));
function tableStructurePrint($fields) {
global $structured_types;
echo "<div class='scrollable'>\n";
- echo "<table cellspacing='0' class='nowrap odds'>\n";
+ echo "<table class='nowrap odds'>\n";
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
echo "<tr><th>" . h($field["field"]);
* @return null
*/
function tableIndexesPrint($indexes) {
- echo "<table cellspacing='0'>\n";
+ echo "<table>\n";
foreach ($indexes as $name => $index) {
ksort($index["columns"]); // enforce correct columns order
$print = array();
$scheme = support("scheme");
$collations = collations();
echo "<form action='' method='post'>\n";
- echo "<table cellspacing='0' class='checkable odds'>\n";
+ echo "<table class='checkable odds'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo "<thead><tr>"
. (support("database") ? "<td>" : "")
for ($i=0; (!$limit || $i < $limit) && ($row = $result->fetch_row()); $i++) {
if (!$i) {
echo "<div class='scrollable'>\n";
- echo "<table cellspacing='0' class='nowrap odds'>\n";
+ echo "<table class='nowrap odds'>\n";
echo "<thead><tr>";
for ($j=0; $j < count($row); $j++) {
$field = $result->fetch_field();
. "<td>" . select_value($v, $link, $field, $text_length)
;
}
- return "<table cellspacing='0'>$return</table>";
+ return "<table>$return</table>";
}
if (!$link) {
$link = $adminer->selectLink($val, $field);
if (!$fields) {
echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
} else {
- echo "<table cellspacing='0' class='layout'>" . script("qsl('table').onkeydown = editingKeydown;");
+ echo "<table class='layout'>" . script("qsl('table').onkeydown = editingKeydown;");
foreach ($fields as $name => $field) {
echo "<tr><th>" . $adminer->fieldName($field);
$default = $_GET["set"][bracket_escape($name)];
<form action="" method="post">
<div class="scrollable">
-<table cellspacing="0" class="nowrap">
+<table class="nowrap">
<thead><tr>
<th id="label-type"><?php echo lang('Index Type'); ?>
<th><input type="submit" class="wayoff"><?php
hidden_fields_get();
echo "<input type='hidden' name='db' value='" . h(DB) . "'>\n";
echo ($grant ? "" : "<input type='hidden' name='grant' value=''>\n");
-echo "<table cellspacing='0' class='odds'>\n";
+echo "<table class='odds'>\n";
echo "<thead><tr><th>" . lang('Username') . "<th>" . lang('Server') . "<th></thead>\n";
while ($row = $result->fetch_assoc()) {
<?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) . "\n" : ""); ?>
<input type="submit" value="<?php echo lang('Save'); ?>">
<div class="scrollable">
-<table cellspacing="0" class="nowrap">
+<table class="nowrap">
<?php
edit_fields($row["fields"], $collations, $routine);
if (isset($_GET["function"])) {
<form action="" method="post">
<div class="scrollable">
-<table cellspacing="0" class="nowrap checkable odds">
+<table class="nowrap checkable odds">
<?php
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
// HTML valid because there is always at least one process
$backward_keys = $adminer->backwardKeys($TABLE, $table_name);
echo "<div class='scrollable'>";
- echo "<table id='table' cellspacing='0' class='nowrap checkable odds'>";
+ echo "<table id='table' class='nowrap checkable odds'>";
echo script("mixin(qs('#table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true), onkeydown: editingKeydown});");
echo "<thead><tr>" . (!$group && $select
? ""
echo "<h3 id='foreign-keys'>" . lang('Foreign keys') . "</h3>\n";
$foreign_keys = foreign_keys($TABLE);
if ($foreign_keys) {
- echo "<table cellspacing='0'>\n";
+ echo "<table>\n";
echo "<thead><tr><th>" . lang('Source') . "<td>" . lang('Target') . "<td>" . lang('ON DELETE') . "<td>" . lang('ON UPDATE') . "<td></thead>\n";
foreach ($foreign_keys as $name => $foreign_key) {
echo "<tr title='" . h($name) . "'>";
echo "<h3 id='checks'>" . lang('Checks') . "</h3>\n";
$check_constraints = check_constraints($TABLE);
if ($check_constraints) {
- echo "<table cellspacing='0'>\n";
+ echo "<table>\n";
foreach ($check_constraints as $key => $val) {
echo "<tr title='" . h($key) . "'>";
echo "<td><code class='jush-$jush'>" . h($val);
echo "<h3 id='triggers'>" . lang('Triggers') . "</h3>\n";
$triggers = triggers($TABLE);
if ($triggers) {
- echo "<table cellspacing='0'>\n";
+ echo "<table>\n";
foreach ($triggers as $key => $val) {
echo "<tr valign='top'><td>" . h($val[0]) . "<td>" . h($val[1]) . "<th>" . h($key) . "<td><a href='" . h(ME . 'trigger=' . urlencode($TABLE) . '&name=' . urlencode($key)) . "'>" . lang('Alter') . "</a>\n";
}
?>
<form action="" method="post" id="form">
-<table cellspacing="0" class="layout">
+<table class="layout">
<tr><th><?php echo lang('Time'); ?><td><?php echo html_select("Timing", $trigger_options["Timing"], $row["Timing"], "triggerChange(/^" . preg_quote($TABLE, "/") . "_[ba][iud]$/, '" . js_escape($TABLE) . "', this.form);"); ?>
<tr><th><?php echo lang('Event'); ?><td><?php echo html_select("Event", $trigger_options["Event"], $row["Event"], "this.form['Timing'].onchange();"); ?>
<?php echo (in_array("UPDATE OF", $trigger_options["Event"]) ? " <input name='Of' value='" . h($row["Of"]) . "' class='hidden'>": ""); ?>
?>
<form action="" method="post">
-<table cellspacing="0" class="layout">
+<table class="layout">
<tr><th><?php echo lang('Server'); ?><td><input name="host" data-maxlength="60" value="<?php echo h($row["host"]); ?>" autocapitalize="off">
<tr><th><?php echo lang('Username'); ?><td><input name="user" data-maxlength="80" value="<?php echo h($row["user"]); ?>" autocapitalize="off">
<tr><th><?php echo lang('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>" autocomplete="new-password">
<?php
//! MAX_* limits, REQUIRE
-echo "<table cellspacing='0' class='odds'>\n";
+echo "<table class='odds'>\n";
echo "<thead><tr><th colspan='2'>" . lang('Privileges') . doc_link(array('sql' => "grant.html#priv_level"));
$i = 0;
foreach ($grants as $object => $grant) {
if (!$variables) {
echo "<p class='message'>" . lang('No rows.') . "\n";
} else {
- echo "<table cellspacing='0'>\n";
+ echo "<table>\n";
foreach ($variables as $key => $val) {
echo "<tr>";
echo "<th><code class='jush-" . $jush . ($status ? "status" : "set") . "'>" . h($key) . "</code>";
search_tables();
}
echo "<div class='scrollable'>\n";
- echo "<table cellspacing='0' class='nowrap checkable odds'>\n";
+ echo "<table class='nowrap checkable odds'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo '<thead><tr class="wrap">';
echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^tables\[/);", "");
}
function loginForm() {
- echo "<table cellspacing='0' class='layout'>\n";
+ echo "<table class='layout'>\n";
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" autofocus value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">');
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
echo "</table>\n";
}
private function _buildTable($json) {
- echo '<table cellspacing="0" style="margin:2px; font-size:100%;">';
+ echo '<table style="margin:2px; font-size:100%;">';
foreach ($json as $key => $val) {
echo '<tr>';
echo '<th>' . h($key) . '</th>';
* @return bool
*/
function tableIndexesPrint($indexes) {
- echo "<table cellspacing='0'>\n";
+ echo "<table>\n";
echo "<thead><tr><th>" . lang('Name') . "<th>" . lang('Type') . "<th>" . lang('Columns') . "</thead>\n";
foreach ($indexes as $name => $index) {
echo "<tr><th>" . h($name) . "<td>" . $index['type'];
*/
function tableStructurePrint($fields) {
echo "<div class='scrollable'>\n";
- echo "<table cellspacing='0' class='nowrap odds'>\n";
+ echo "<table class='nowrap odds'>\n";
echo "<thead><tr><th>" . lang('Column') . "<th>" . lang('Type') . "<th>" . lang('Nullable') . "<th>" . lang('Default') . (support("comment") ? "<th>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
echo "<tr><th>" . h($field["field"]) . ($field["primary"] ? " (PRIMARY)" : "");
? Aliasing of built-in functions can save 7 KB, function minification can save 7 KB, substitution of repetitive $a["a"] can save 4 KB, substitution of $_GET and friends can save 2 KB, aliasing of $connection->query can save 24 B, JS Closure compiler can save 2 KB, not enclosing HTML attribute values can save 1.2 KB, replacing \\n by \n can save .3 KB
? Branch binary_compile: LZW compression of all texts can save 11 KB, using chars 127-255 in minification can save 1 KB
-https://github.com/vrana/adminer/compare/master...adminerneo:adminerneo:main
+https://github.com/vrana/adminer/compare/master...adminneo-org:adminneo:main
MySQL: Do not show 'empty' enum value in strict mode
MySQL: Print comments of stored procedures and functions
Add drag-n-drop moving of rows in table editing