Integrate images
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@215 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
d7d9c59604
commit
57391acbca
|
@ -54,7 +54,8 @@ if ($_COOKIE["lang"]) {
|
||||||
$file = str_replace("<?php echo get_lang(); ?>", $_COOKIE["lang"], $file);
|
$file = str_replace("<?php echo get_lang(); ?>", $_COOKIE["lang"], $file);
|
||||||
}
|
}
|
||||||
$file = str_replace("favicon.ico", '<?php echo preg_replace("~\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?favicon="; ?>', $file);
|
$file = str_replace("favicon.ico", '<?php echo preg_replace("~\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?favicon="; ?>', $file);
|
||||||
$file = str_replace('session_start();', "if (isset(\$_GET['favicon'])) {\n\theader('Content-Type: image/x-icon');\n\techo base64_decode('" . base64_encode(file_get_contents("favicon.ico")) . "');\n\texit;\n}\nsession_start();", $file);
|
$file = str_replace("arrow.gif", '" . preg_replace("~\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?gif=arrow', $file);
|
||||||
|
$file = str_replace('session_start();', "if (isset(\$_GET['favicon'])) {\n\theader('Content-Type: image/x-icon');\n\techo base64_decode('" . base64_encode(file_get_contents("favicon.ico")) . "');\n\texit;\n} elseif (isset(\$_GET['gif'])) {\n\theader('Content-Type: image/gif');\n\techo base64_decode('" . base64_encode(file_get_contents("arrow.gif")) . "');\n\texit;\n}\n\nsession_start();", $file);
|
||||||
$file = str_replace('<link rel="stylesheet" type="text/css" href="default.css" />', "<style type='text/css'>\n" . file_get_contents("default.css") . "</style>", $file);
|
$file = str_replace('<link rel="stylesheet" type="text/css" href="default.css" />', "<style type='text/css'>\n" . file_get_contents("default.css") . "</style>", $file);
|
||||||
file_put_contents($filename, $file);
|
file_put_contents($filename, $file);
|
||||||
echo "$filename created.\n";
|
echo "$filename created.\n";
|
||||||
|
|
|
@ -17,6 +17,6 @@ IMG { vertical-align: middle; }
|
||||||
.binary { color: Red; }
|
.binary { color: Red; }
|
||||||
#menu { position: absolute; top: 8px; left: 8px; width: 15em; overflow: auto; overflow-y: hidden; white-space: nowrap; }
|
#menu { position: absolute; top: 8px; left: 8px; width: 15em; overflow: auto; overflow-y: hidden; white-space: nowrap; }
|
||||||
#content { margin-left: 16em; }
|
#content { margin-left: 16em; }
|
||||||
#schema { position: relative; }
|
#schema { margin-left: 60px; position: relative; }
|
||||||
#schema DIV { position: absolute; }
|
#schema DIV { position: absolute; }
|
||||||
#schema .table { left: 60px; border: 1px solid Silver; line-height: 1.25em; padding: 0 2px; }
|
#schema .table { border: 1px solid Silver; line-height: 1.25em; padding: 0 2px; }
|
||||||
|
|
|
@ -43,7 +43,7 @@ foreach ($schema as $name => $table) {
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
$top += 2.5;
|
$top += 2.5;
|
||||||
}
|
}
|
||||||
$left = 46;
|
$left = -14;
|
||||||
foreach ($schema as $name => $table) {
|
foreach ($schema as $name => $table) {
|
||||||
foreach ((array) $table["references"] as $target_name => $refs) {
|
foreach ((array) $table["references"] as $target_name => $refs) {
|
||||||
foreach ($refs as $ref) {
|
foreach ($refs as $ref) {
|
||||||
|
@ -54,10 +54,10 @@ foreach ($schema as $name => $table) {
|
||||||
$pos2 = $positions[$target_name][$target];
|
$pos2 = $positions[$target_name][$target];
|
||||||
$min_pos = min($min_pos, $pos1, $pos2);
|
$min_pos = min($min_pos, $pos1, $pos2);
|
||||||
$max_pos = max($max_pos, $pos1, $pos2);
|
$max_pos = max($max_pos, $pos1, $pos2);
|
||||||
echo "<div style='left: " . ($left+1) . "px; top: $pos1" . "em;'><img src='hline.gif' width='12' height='7' alt='' /></div>\n";
|
echo "<div style='left: " . ($left+1) . "px; top: $pos1" . "em; padding-top: .5em;'><div style='border-top: 1px solid Black; width: 12px;'></div></div>\n";
|
||||||
echo "<div style='left: " . ($left+1) . "px; top: $pos2" . "em;'><img src='arrow.gif' width='12' height='9' alt='' /></div>\n";
|
echo "<div style='left: " . ($left+1) . "px; top: $pos2" . "em;'><img src='arrow.gif' width='12' height='10' alt='' /></div>\n";
|
||||||
}
|
}
|
||||||
echo "<div style='left: $left" . "px; top: $min_pos" . "em;'><img src='vline.gif' width='1' height='12' alt='' style='padding: .5em 0; height: " . ($max_pos - $min_pos) . "em;' /></div>\n";
|
echo "<div style='left: $left" . "px; top: $min_pos" . "em; padding: .5em 0;' /><div style='border-right: 1px solid Black; height: " . ($max_pos - $min_pos) . "em;'></div></div>\n";
|
||||||
$left -= 2;
|
$left -= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue