"link=desc", "key2" => array("link", "desc")), null for nothing, false for driver only, true for driver and server
* @param string used after colon in title and heading
* @return null
*/
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
global $LANG, $HTTPS, $adminer, $connection, $drivers;
header("Content-Type: text/html; charset=utf-8");
$adminer->headers();
$title_all = $title . ($title2 != "" ? ": " . h($title2) : "");
if (!is_ajax()) {
$protocol = ($HTTPS ? "https" : "http");
?>
' . $drivers[DRIVER] . ' » ';
$link = substr(preg_replace('~(db|ns)=[^&]*&~', '', ME), 0, -1);
$server = (SERVER != "" ? h(SERVER) : lang('Server'));
if ($breadcrumb === false) {
echo "$server\n";
} else {
echo "
$server » ";
if ($_GET["ns"] != "" || (DB != "" && is_array($breadcrumb))) {
echo '
' . h(DB) . ' » ';
}
if (is_array($breadcrumb)) {
if ($_GET["ns"] != "") {
echo '
' . h($_GET["ns"]) . ' » ';
}
foreach ($breadcrumb as $key => $val) {
$desc = (is_array($val) ? $val[1] : $val);
if ($desc != "") {
echo '
' . h($desc) . ' » ';
}
}
}
echo "$title\n";
}
}
echo "
$title_all
\n";
restart_session();
if ($_SESSION["messages"]) {
echo "
" . implode("
\n
", $_SESSION["messages"]) . "
\n";
$_SESSION["messages"] = array();
}
$databases = &get_session("dbs");
if (DB != "" && $databases && !in_array(DB, $databases, true)) {
$databases = null;
}
if ($error) {
echo "
$error
\n";
}
}
/** Print HTML footer
* @param string "auth", "db", "ns"
* @return null
*/
function page_footer($missing = "") {
global $adminer;
if (!is_ajax()) {
?>