case "down.gif":
echo compile_file('../adminer/static/down.gif');
break;
- case "arrow.gif":
- echo compile_file('../adminer/static/arrow.gif');
- break;
}
}
exit;
$left1 = $left - $table_pos[$name][1];
$i = 0;
foreach ($columns as $target) {
- echo "\n<div class='references' title='" . h($target_name) . "' id='refd$left-" . ($i++) . "'"
- . " style='left: $left1" . "em; top: " . $table["fields"][$target]["pos"] . "em; height: 1.25em; background: url(../adminer/static/arrow.gif) no-repeat right center;'>"
+ echo "\n<div class='references arrow' title='" . h($target_name) . "' id='refd$left-" . ($i++) . "' style='left: $left1" . "em; top: " . $table["fields"][$target]["pos"] . "em;'>"
. "<div style='height: .5em; border-bottom: 1px solid gray; width: " . (-$left1) . "em;'></div>"
. "</div>"
;
#schema { margin-left: 60px; position: relative; user-select: none; -webkit-user-select: none; }
#schema .table { border: 1px solid silver; padding: 0 2px; cursor: move; position: absolute; }
#schema .references { position: absolute; }
+#schema .arrow { height: 1.25em; background: url(arrow.gif) no-repeat right center; }
#help { position: absolute; border: 1px solid #999; background: #eee; padding: 5px; font-family: monospace; z-index: 1; }
.rtl h2 { margin: 0 -18px 20px 0; }
}
function minify_css($file) {
+ $file = preg_replace_callback('~url\((\w+\.(gif))\)~', function ($match) {
+ return "url(data:image/$match[2];base64," . base64_encode(file_get_contents(__DIR__ . "/adminer/static/$match[1]")) . ")";
+ }, $file);
return lzw_compress(preg_replace('~\s*([:;{},])\s*~', '\1', preg_replace('~/\*.*?\*/\s*~s', '', $file)));
}