X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fpage_header.php;h=0e204eb709c104a66981fc2678301e411ad8e839;hb=3e96355c49586d67737c36f17cd9f46d80e894d3;hp=e03a5fefc63845017d21ab8acb0cd4d0ee3fef7e;hpb=441f2d33bad826a0278aafe63e58d0b3c81b6e0c;p=squirrelmail.git diff --git a/functions/page_header.php b/functions/page_header.php index e03a5fef..0e204eb7 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -4,37 +4,22 @@ ** ** Prints the page header (duh) ** + ** $Id$ **/ - session_start(); + if (defined('page_header_php')) + return; + define('page_header_php', true); - $page_header_php = true; - - if (!isset($prefs_php)) - include ("../functions/prefs.php"); - if (!isset($i18n_php)) - include ("../functions/i18n.php"); - if (!isset($plugin_php)) - include ("../functions/plugin.php"); - - // Check to see if gettext is installed - set_up_language(getPref($data_dir, $username, "language")); - - // This is done to ensure that the character set is correct. - if ($default_charset != "") - header ("Content-Type: text/html; charset=$default_charset"); + // Always set up the language before calling these functions function displayHtmlHeader ($title="SquirrelMail") { global $theme_css; - echo ''; - echo "\n\n"; - echo "\n"; - echo "\n"; - if ($theme_css != "") { - printf ('', - $theme_css); - echo "\n"; + echo '' . + "\n\n\n\n"; + if ($theme_css != '') { + echo "\n"; } do_hook ("generic_header"); @@ -43,25 +28,22 @@ echo "\n\n"; } - function displayInternalLink ($path, $text, $target="") { + function displayInternalLink ($path, $text, $target='') { global $base_uri; - if ($target != "") + if ($target != '') $target = " target=\"$target\""; echo ''.$text.''; } function displayPageHeader($color, $mailbox) { - displayHtmlHeader ($color); + displayHtmlHeader (); - printf('', - $color[8], $color[4], $color[7], $color[7], $color[7]); - echo "\n\n"; + echo "\n\n"; /** Here is the header and wrapping table **/ $shortBoxName = readShortMailboxName($mailbox, "."); - $shortBoxName = sqStripSlashes($shortBoxName); echo "\n"; echo "\n"; echo " \n"; @@ -74,7 +56,7 @@ echo "
\n\n"; echo "\n"; echo " \n"; - echo " \n"; echo " \n"; echo "
\n"; + echo " \n"; $urlMailbox = urlencode($mailbox); displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right"); echo "  \n"; @@ -91,10 +73,10 @@ do_hook("menuline"); - echo " \n"; - echo " SquirrelMail\n"; + echo " \n"; + echo " SquirrelMail\n"; echo "
\n\n"; } -?> +?> \ No newline at end of file