1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 01:54:00 +02:00

Avoid excessive PHP and HTML mixing

This commit is contained in:
Jakub Vrana
2025-03-18 16:45:15 +01:00
parent eeb78d7e48
commit 9cfea02e19
5 changed files with 25 additions and 45 deletions

View File

@@ -986,15 +986,10 @@ class Adminer {
*/
function navigation($missing) {
global $VERSION, $drivers, $connection;
?>
<h1>
<?php echo $this->name(); ?>
<span class="version">
<?php echo $VERSION; ?>
<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>
</span>
</h1>
<?php
echo "<h1>" . $this->name() . "<span class='version'>$VERSION";
$new_version = $_COOKIE["adminer_version"];
echo " <a href='https://www.adminer.org/#download'" . target_blank() . " id='version'>" . (version_compare($VERSION, $new_version) < 0 ? h($new_version) : "") . "</a>";
echo "</span></h1>\n";
// this is matched by compile.php
switch_lang();
if ($missing == "auth") {
@@ -1084,10 +1079,7 @@ class Adminer {
if (DB && $databases && !in_array(DB, $databases)) {
array_unshift($databases, DB);
}
?>
<form action="">
<p id="dbs">
<?php
echo "<form action=''>\n<p id='dbs'>\n";
hidden_fields_get();
$db_events = script("mixin(qsl('select'), {onmousedown: dbMouseDown, onchange: dbChange});");
echo "<span title='" . lang('Database') . "'>" . lang('DB') . ":</span> " . ($databases