Read style from phpMinAdmin.css if exists

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@573 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2009-04-03 14:08:58 +00:00
parent deebaa32c4
commit 5938d0a901
3 changed files with 4 additions and 3 deletions

View file

@ -109,8 +109,8 @@ if ($_COOKIE["lang"]) {
} else {
$file = preg_replace_callback("~lang\\('((?:[^\\\\']+|\\\\.)*)'([,)])~s", 'lang_ids', $file);
}
$file = preg_replace("~favicon\\.ico|default\\.css|(up|down|plus|minus)\\.gif~", '<?php echo preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=\\0"; ?>', $file);
$file = str_replace("arrow.gif", '" . preg_replace("~\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=arrow.gif', $file);
$file = preg_replace('~favicon\\.ico|(up|down|plus|minus)\\.gif~', '<?php echo preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=\\0"; ?>', $file);
$file = preg_replace('~default\\.css|arrow\\.gif~', '" . preg_replace("~\\\\\\\\?.*~", "", $_SERVER["REQUEST_URI"]) . "?file=\\0', $file);
$file = str_replace('error_reporting(E_ALL & ~E_NOTICE);', 'error_reporting(E_ALL & ~E_NOTICE);
if (isset($_GET["file"])) {
header("Expires: " . gmdate("D, d M Y H:i:s", filemtime(__FILE__) + 365*24*60*60) . " GMT");

View file

@ -6,6 +6,7 @@ Option to stop on error in SQL command (thanks to Vaclav Marik)
Cross links to select and table (bug #2236232), link new item
Suhosin compatibility (thanks to Klemens Hackel)
Remove max_allowed_packet from export
Read style from phpMinAdmin.css if exists
phpMinAdmin 1.9.1:
Update translations

View file

@ -11,7 +11,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
<meta name="robots" content="noindex" />
<title><?php echo $title . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . " - " . lang('phpMinAdmin') . " 1.10.0-dev"; ?></title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="default.css" /><?php // Ondrej Valka, http://valka.info ?>
<link rel="stylesheet" type="text/css" href="<?php echo (file_exists("phpMinAdmin.css") ? "phpMinAdmin.css" : "default.css"); // Ondrej Valka, http://valka.info ?>" />
</head>
<body>