2007-07-02 05:51:26 +00:00
|
|
|
<?php
|
2008-04-10 14:37:10 +00:00
|
|
|
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
|
2009-07-30 08:12:54 +00:00
|
|
|
global $LANG, $VERSION, $adminer;
|
2007-07-02 05:51:26 +00:00
|
|
|
header("Content-Type: text/html; charset=utf-8");
|
2007-07-12 10:09:37 +00:00
|
|
|
?>
|
2009-07-15 15:08:48 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
2009-07-11 20:30:40 +00:00
|
|
|
<html lang="<?php echo $LANG; ?>">
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
|
|
|
<meta name="robots" content="noindex">
|
2009-07-28 16:20:50 +00:00
|
|
|
<title><?php echo $title . (strlen($title2) ? ": " . h($title2) : "") . (strlen($_GET["server"]) && $_GET["server"] != "localhost" ? h("- $_GET[server]") : "") . " - " . $adminer->name(); ?></title>
|
2009-07-11 20:30:40 +00:00
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="../adminer/favicon.ico">
|
|
|
|
<link rel="stylesheet" type="text/css" href="../adminer/default.css<?php // Ondrej Valka, http://valka.info ?>">
|
2009-06-08 19:02:30 +00:00
|
|
|
<?php if (file_exists("adminer.css")) { ?>
|
2009-07-11 20:30:40 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="adminer.css">
|
2009-05-29 14:53:42 +00:00
|
|
|
<?php } ?>
|
2007-07-02 05:51:26 +00:00
|
|
|
|
2009-09-20 07:31:46 +00:00
|
|
|
<body onload="body_load();<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verify_version();"); ?>">
|
2009-07-03 05:44:44 +00:00
|
|
|
<script type="text/javascript" src="../adminer/functions.js"></script>
|
2009-07-13 21:40:43 +00:00
|
|
|
<script type="text/javascript" src="editing.js"></script>
|
2007-07-02 05:51:26 +00:00
|
|
|
|
2007-07-06 08:47:20 +00:00
|
|
|
<div id="content">
|
|
|
|
<?php
|
2007-07-26 10:45:49 +00:00
|
|
|
if (isset($breadcrumb)) {
|
2009-07-30 08:12:54 +00:00
|
|
|
$link = substr(preg_replace('~db=[^&]*&~', '', ME), 0, -1);
|
2009-07-28 16:20:50 +00:00
|
|
|
echo '<p id="breadcrumb"><a href="' . (strlen($link) ? h($link) : ".") . '">' . (isset($_GET["server"]) ? h($_GET["server"]) : lang('Server')) . '</a> » ';
|
2007-07-26 10:45:49 +00:00
|
|
|
if (is_array($breadcrumb)) {
|
2009-08-29 13:54:25 +00:00
|
|
|
if (strlen(DB)) {
|
|
|
|
echo '<a href="' . h(substr(ME, 0, -1)) . '">' . h(DB) . '</a> » ';
|
2007-07-26 10:45:49 +00:00
|
|
|
}
|
|
|
|
foreach ($breadcrumb as $key => $val) {
|
2009-07-11 19:45:57 +00:00
|
|
|
$desc = (is_array($val) ? $val[1] : $val);
|
|
|
|
if (strlen($desc)) {
|
2009-07-30 08:12:54 +00:00
|
|
|
echo '<a href="' . h(ME . "$key=") . urlencode(is_array($val) ? $val[0] : $val) . '">' . h($desc) . '</a> » ';
|
2007-07-26 10:45:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-07-11 20:30:40 +00:00
|
|
|
echo "$title\n";
|
2007-07-26 10:45:49 +00:00
|
|
|
}
|
2009-07-28 16:20:50 +00:00
|
|
|
echo "<h2>$title" . (strlen($title2) ? ": " . h($title2) : "") . "</h2>\n";
|
2008-04-18 12:01:53 +00:00
|
|
|
if ($_SESSION["messages"]) {
|
2009-06-25 12:46:15 +00:00
|
|
|
echo "<div class='message'>" . implode("</div>\n<div class='message'>", $_SESSION["messages"]) . "</div>\n";
|
2008-04-18 12:01:53 +00:00
|
|
|
$_SESSION["messages"] = array();
|
2007-07-06 08:47:20 +00:00
|
|
|
}
|
2008-10-02 15:25:12 +00:00
|
|
|
$databases = &$_SESSION["databases"][$_GET["server"]];
|
2009-08-29 13:54:25 +00:00
|
|
|
if (strlen(DB) && $databases && !in_array(DB, $databases, true)) {
|
2008-10-02 15:25:12 +00:00
|
|
|
$databases = null;
|
|
|
|
}
|
2009-07-24 15:50:35 +00:00
|
|
|
if (isset($databases) && !isset($_GET["sql"])) {
|
2009-06-21 23:20:32 +00:00
|
|
|
// improves concurrency if a user opens several pages at once
|
2007-07-12 10:09:37 +00:00
|
|
|
session_write_close();
|
|
|
|
}
|
2008-04-10 14:37:10 +00:00
|
|
|
if ($error) {
|
2009-06-15 11:57:40 +00:00
|
|
|
echo "<div class='error'>$error</div>\n";
|
2008-04-10 14:37:10 +00:00
|
|
|
}
|
2007-07-06 08:47:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function page_footer($missing = false) {
|
2009-09-19 20:16:15 +00:00
|
|
|
global $adminer;
|
2007-07-12 10:09:37 +00:00
|
|
|
?>
|
2007-07-06 08:47:20 +00:00
|
|
|
</div>
|
|
|
|
|
2007-08-09 16:47:06 +00:00
|
|
|
<?php switch_lang(); ?>
|
2007-07-02 05:51:26 +00:00
|
|
|
<div id="menu">
|
2009-07-27 11:25:37 +00:00
|
|
|
<?php $adminer->navigation($missing); ?>
|
2007-07-02 05:51:26 +00:00
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|