diff --git a/header.inc.php b/header.inc.php index 50f50493e..5862217e7 100644 --- a/header.inc.php +++ b/header.inc.php @@ -2,154 +2,157 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: -/** - * Gets a core script and starts output buffering work - */ -require_once('./libraries/common.lib.php'); -require_once('./libraries/ob.lib.php'); -if ($GLOBALS['cfg']['OBGzip']) { - $GLOBALS['ob_mode'] = PMA_outBufferModeGet(); - if ($GLOBALS['ob_mode']) { - PMA_outBufferPre($GLOBALS['ob_mode']); - } -} +if (empty($GLOBALS['is_header_sent'])) { -// garvin: For re-usability, moved http-headers and stylesheets -// to a seperate file. It can now be included by header.inc.php, -// queryframe.php, querywindow.php. - -require_once('./libraries/header_http.inc.php'); -require_once('./libraries/header_meta_style.inc.php'); - -$title = ''; -if (isset($GLOBALS['db'])) { - $title .= str_replace('\'', '\\\'', $GLOBALS['db']); -} -if (isset($GLOBALS['table'])) { - $title .= (empty($title) ? '' : '.') . str_replace('\'', '\\\'', $GLOBALS['table']); -} -if (!empty($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['host'])) { - $title .= (empty($title) ? 'phpMyAdmin ' : ' ') - . sprintf($GLOBALS['strRunning'], (empty($GLOBALS['cfg']['Server']['verbose']) ? str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['host']) : str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['verbose']))); -} -$title .= (empty($title) ? '' : ' - ') . 'phpMyAdmin ' . PMA_VERSION; -?> - - - -// js form validation stuff -var jsHostEmpty = ''; -var jsUserEmpty = ''; -var jsPasswordEmpty = ''; -var jsPasswordNotSame = ''; -//--> - - - -// js form validation stuff -var jsHostEmpty = ''; -var jsUserEmpty = ''; -var jsPasswordEmpty = ''; -var jsPasswordNotSame = ''; -//--> - - - -// js index validation stuff -var errorMsg0 = ''; -var errorMsg1 = ''; -var errorMsg2 = ''; -//--> - - - -//--> - - - -//--> - - - - - - - -
> -' . "\n"; - $server_info = (!empty($cfg['Server']['verbose']) - ? $cfg['Server']['verbose'] - : $server_info = $cfg['Server']['host'] . (empty($cfg['Server']['port']) - ? '' - : ':' . $cfg['Server']['port'] - ) - ); - if (isset($GLOBALS['db'])) { - echo ' ' . $GLOBALS['strDatabase'] . ' ' . htmlspecialchars($GLOBALS['db']) . '' . "\n"; - if (!empty($GLOBALS['table'])) { - echo ' - ' . $GLOBALS['strTable'] . ' ' . htmlspecialchars($GLOBALS['table']) . '' . "\n"; + /** + * Gets a core script and starts output buffering work + */ + require_once('./libraries/common.lib.php'); + require_once('./libraries/ob.lib.php'); + if ($GLOBALS['cfg']['OBGzip']) { + $GLOBALS['ob_mode'] = PMA_outBufferModeGet(); + if ($GLOBALS['ob_mode']) { + PMA_outBufferPre($GLOBALS['ob_mode']); } - echo ' ' . sprintf($GLOBALS['strRunning'], '' . htmlspecialchars($server_info) . ''); - } else { - echo ' ' . sprintf($GLOBALS['strServer'], '' . htmlspecialchars($server_info) . ''); } - echo "\n" . '' . "\n"; + + // garvin: For re-usability, moved http-headers and stylesheets + // to a seperate file. It can now be included by header.inc.php, + // queryframe.php, querywindow.php. + + require_once('./libraries/header_http.inc.php'); + require_once('./libraries/header_meta_style.inc.php'); + + $title = ''; + if (isset($GLOBALS['db'])) { + $title .= str_replace('\'', '\\\'', $GLOBALS['db']); + } + if (isset($GLOBALS['table'])) { + $title .= (empty($title) ? '' : '.') . str_replace('\'', '\\\'', $GLOBALS['table']); + } + if (!empty($GLOBALS['cfg']['Server']) && isset($GLOBALS['cfg']['Server']['host'])) { + $title .= (empty($title) ? 'phpMyAdmin ' : ' ') + . sprintf($GLOBALS['strRunning'], (empty($GLOBALS['cfg']['Server']['verbose']) ? str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['host']) : str_replace('\'', '\\\'', $GLOBALS['cfg']['Server']['verbose']))); + } + $title .= (empty($title) ? '' : ' - ') . 'phpMyAdmin ' . PMA_VERSION; + ?> + + + + // js form validation stuff + var jsHostEmpty = ''; + var jsUserEmpty = ''; + var jsPasswordEmpty = ''; + var jsPasswordNotSame = ''; + //--> + + + + // js form validation stuff + var jsHostEmpty = ''; + var jsUserEmpty = ''; + var jsPasswordEmpty = ''; + var jsPasswordNotSame = ''; + //--> + + + + // js index validation stuff + var errorMsg0 = ''; + var errorMsg1 = ''; + var errorMsg2 = ''; + //--> + + + + //--> + + + + //--> + + + + + + + + > + ' . "\n"; + $server_info = (!empty($cfg['Server']['verbose']) + ? $cfg['Server']['verbose'] + : $server_info = $cfg['Server']['host'] . (empty($cfg['Server']['port']) + ? '' + : ':' . $cfg['Server']['port'] + ) + ); + if (isset($GLOBALS['db'])) { + echo ' ' . $GLOBALS['strDatabase'] . ' ' . htmlspecialchars($GLOBALS['db']) . '' . "\n"; + if (!empty($GLOBALS['table'])) { + echo ' - ' . $GLOBALS['strTable'] . ' ' . htmlspecialchars($GLOBALS['table']) . '' . "\n"; + } + echo ' ' . sprintf($GLOBALS['strRunning'], '' . htmlspecialchars($server_info) . ''); + } else { + echo ' ' . sprintf($GLOBALS['strServer'], '' . htmlspecialchars($server_info) . ''); + } + echo "\n" . '' . "\n"; + } + echo "\n"; + + + /** + * Sets a variable to remember headers have been sent + */ + $GLOBALS['is_header_sent'] = TRUE; } -echo "\n"; - - -/** - * Sets a variable to remember headers have been sent - */ -$GLOBALS['is_header_sent'] = TRUE; ?>