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-03 05:44:44 +00:00
|
|
|
global $SELF, $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
|
|
|
?>
|
2007-07-02 05:51:26 +00:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2007-07-09 15:28:37 +00:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $LANG; ?>">
|
2007-07-02 05:51:26 +00:00
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
2007-07-13 09:13:06 +00:00
|
|
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
2007-07-11 05:53:07 +00:00
|
|
|
<meta name="robots" content="noindex" />
|
2009-07-03 05:44:44 +00:00
|
|
|
<title><?php echo $title . (strlen($title2) ? ": " . htmlspecialchars($title2) : "") . (strlen($_GET["server"]) && $_GET["server"] != "localhost" ? htmlspecialchars("- $_GET[server]") : "") . " - " . $adminer->name(); ?></title>
|
2007-07-11 09:57:06 +00:00
|
|
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
|
2009-07-03 05:44:44 +00:00
|
|
|
<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")) { ?>
|
|
|
|
<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
|
|
|
</head>
|
|
|
|
|
2009-06-08 19:02:30 +00:00
|
|
|
<body onload="load_jush();<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verify_version('$VERSION');"); ?>">
|
2009-07-03 05:44:44 +00:00
|
|
|
<script type="text/javascript" src="../adminer/functions.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)) {
|
|
|
|
$link = substr(preg_replace('~db=[^&]*&~', '', $SELF), 0, -1);
|
2007-08-09 16:47:06 +00:00
|
|
|
echo '<p id="breadcrumb"><a href="' . (strlen($link) ? htmlspecialchars($link) : ".") . '">' . (isset($_GET["server"]) ? htmlspecialchars($_GET["server"]) : lang('Server')) . '</a> » ';
|
2007-07-26 10:45:49 +00:00
|
|
|
if (is_array($breadcrumb)) {
|
|
|
|
if (strlen($_GET["db"])) {
|
2008-09-24 20:46:21 +00:00
|
|
|
echo '<a href="' . htmlspecialchars(substr($SELF, 0, -1)) . '">' . htmlspecialchars($_GET["db"]) . '</a> » ';
|
2007-07-26 10:45:49 +00:00
|
|
|
}
|
|
|
|
foreach ($breadcrumb as $key => $val) {
|
|
|
|
if (strlen($val)) {
|
2008-09-27 08:52:18 +00:00
|
|
|
echo '<a href="' . htmlspecialchars("$SELF$key=") . ($key != "privileges" ? urlencode($val) : "") . '">' . htmlspecialchars($val) . '</a> » ';
|
2007-07-26 10:45:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
echo "$title</p>\n";
|
|
|
|
}
|
|
|
|
echo "<h2>$title" . (strlen($title2) ? ": " . htmlspecialchars($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"]];
|
|
|
|
if (strlen($_GET["db"]) && $databases && !in_array($_GET["db"], $databases, true)) {
|
|
|
|
$databases = null;
|
|
|
|
}
|
2008-10-02 16:42:55 +00:00
|
|
|
if (isset($databases) && !isset($_GET["sql"]) && !isset($_SESSION["coverage"])) {
|
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-07-03 04:40:48 +00:00
|
|
|
global $SELF, $VERSION, $dbh, $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-03 05:44:44 +00:00
|
|
|
<h1><a href="http://www.adminer.org/" class="h1"><?php echo $adminer->name(); ?></a> <?php echo $VERSION; ?>
|
2009-06-15 12:14:29 +00:00
|
|
|
<a href='http://www.adminer.org/#download' id="version"><?php echo (version_compare($VERSION, $_COOKIE["adminer_version"]) < 0 ? htmlspecialchars($_COOKIE["adminer_version"]) : ""); ?></a>
|
|
|
|
</h1>
|
2009-07-03 06:26:01 +00:00
|
|
|
<?php $adminer->navigation($missing); ?>
|
2007-07-02 05:51:26 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
<?php
|
|
|
|
}
|