X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fpage_header.php;h=3afdeef122aae02e436b5ca8af13256d383878d8;hp=90ad7f50ad3d36d1d9eca4f608f4db4497ce0658;hb=ffd8224ce14be1e6eb40c4ace15f46c21d6f4b9b;hpb=fabd78f9fcfb1b0de884a7e3b6cd11bb33aadd0f diff --git a/functions/page_header.php b/functions/page_header.php index 90ad7f50..3afdeef1 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -2,65 +2,64 @@ /** ** page_header.php ** + ** Copyright (c) 1999-2001 The Squirrelmail Development Team + ** Licensed under the GNU GPL. For full terms see the file COPYING. + ** ** Prints the page header (duh) ** ** $Id$ **/ - if (defined('page_header_php')) - return; - define('page_header_php', true); - // 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"; - } - - do_hook ("generic_header"); + function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) { + + global $theme_css; + + echo '' . + "\n\n\n\n"; + + if ($theme_css != '') { + echo "\n"; + } + + if( $do_hook ) { + do_hook ("generic_header"); + } + + echo "$title$xtra\n\n"; - echo "$title\n"; - 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) { + global $delimiter, $hide_sm_attributions; displayHtmlHeader (); - echo "\n\n"; + echo "\n\n"; /** Here is the header and wrapping table **/ - $shortBoxName = readShortMailboxName($mailbox, "."); - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; + $shortBoxName = readShortMailboxName($mailbox, $delimiter); + echo "\n". + // "\n". + " \n". + "
". + "\n". + " \n". + " \n"; - echo " \n"; - echo "
\n"; displayInternalLink ("src/signout.php", _("Sign Out"), "_top"); - echo " \n"; - echo "
" . _("Current Folder") . ": $shortBoxName 
\n"; - echo "
\n\n"; - echo "\n"; - echo " \n"; - echo " \n". + " \n". + " \n". + " \n"; - echo " \n"; - echo "
\n"; + echo " \n". + ' ' . _("Current Folder") . ": $shortBoxName \n". + "
\n"; $urlMailbox = urlencode($mailbox); displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right"); echo "  \n"; @@ -77,10 +76,13 @@ do_hook("menuline"); - echo " \n"; - echo " SquirrelMail\n"; - echo "
\n\n"; + echo "
\n"; + echo ($hide_sm_attributions ? ' ' : + "SquirrelMail\n"); + echo "
\n\n"; + // echo "
"; } -?> + +?> \ No newline at end of file