X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fpage_header.php;h=37d6c7dd1d6128333bb6a05fea058ddfc39168ab;hb=bfa045d3d871600c3d735bc34ad8bb75594f5cdd;hp=784e552853ec025fb63de323869a037313f12b22;hpb=21a957a9a91b31034123c59b0afc2f6bd56e1847;p=squirrelmail.git diff --git a/functions/page_header.php b/functions/page_header.php index 784e5528..37d6c7dd 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -3,12 +3,12 @@ /** * page_header.php * - * Copyright (c) 1999-2003 The SquirrelMail Project Team + * Copyright (c) 1999-2005 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * * Prints the page header (duh) * - * $Id$ + * @version $Id$ * @package squirrelmail */ @@ -25,9 +25,10 @@ require_once(SM_PATH . 'functions/global.php'); * @param string title the page title, default SquirrelMail. * @param string xtra extra HTML to insert into the header * @param bool do_hook whether to execute hooks, default true + * @param bool frames generate html frameset doctype (since 1.5.1) * @return void */ -function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) { +function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = true, $frames = false ) { global $squirrelmail_language; if ( !sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) { @@ -35,27 +36,42 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE } global $theme_css, $custom_css, $pageheader_sent; - echo '' . - "\n\n" . html_tag( 'html' ,'' , '', '', 'lang="'.$squirrelmail_language.'"' ) . "\n\n"; + if ($frames) { + echo ''; + } else { + echo ''; + } + echo "\n\n" . html_tag( 'html' ,'' , '', '', 'lang="'.$squirrelmail_language.'"' ) . "\n\n"; + /* + * Add closing / to link and meta elements only after switching to xhtml 1.0 Transitional. + * It is not compatible with html 4.01 Transitional + */ if ( !isset( $custom_css ) || $custom_css == 'none' ) { if ($theme_css != '') { - echo ""; + echo ""; } } else { echo ''; + $base_uri . 'themes/css/'.$custom_css.'">'; } - + if ($squirrelmail_language == 'ja_JP') { + /* + * force correct detection of charset, when browser does not follow + * http content-type and tries to detect charset from page content. + * Shooting of browser's creator can't be implemented in php. + * We might get rid of it, if we follow http://www.w3.org/TR/japanese-xml/ + * recommendations and switch to unicode. + */ echo "\n"; echo '' . "\n"; } - + if ($do_hook) { do_hook('generic_header'); } - + echo "\n$title$xtra\n"; /* work around IE6's scrollbar bug */ @@ -63,9 +79,9 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE