X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fpage_header.php;h=c3d9a66643b51ef15f26752b1e7f0119eb7b2859;hb=70c5cd5304754bde55f6341d090a9b321f20c92e;hp=e03a5fefc63845017d21ab8acb0cd4d0ee3fef7e;hpb=441f2d33bad826a0278aafe63e58d0b3c81b6e0c;p=squirrelmail.git diff --git a/functions/page_header.php b/functions/page_header.php index e03a5fef..c3d9a666 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -1,80 +1,82 @@ '; - echo "\n\n"; - echo "\n"; - echo "\n"; - if ($theme_css != "") { - printf ('', - $theme_css); - echo "\n"; - } - - do_hook ("generic_header"); - - echo "$title\n"; - echo "\n\n"; + +/** + * page_header.php + * + * Copyright (c) 1999-2002 The SquirrelMail Project Team + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * Prints the page header (duh) + * + * $Id$ + */ + +/*****************************************************************/ +/*** THIS FILE NEEDS TO HAVE ITS FORMATTING FIXED!!! ***/ +/*** PLEASE DO SO AND REMOVE THIS COMMENT SECTION. ***/ +/*** + Base level indent should begin at left margin, as ***/ +/*** the first line of the function definition below. ***/ +/*** + All identation should consist of four space blocks ***/ +/*** + Tab characters are evil. ***/ +/*** + all comments should use "slash-star ... star-slash" ***/ +/*** style -- no pound characters, no slash-slash style ***/ +/*** + FLOW CONTROL STATEMENTS (if, while, etc) SHOULD ***/ +/*** ALWAYS USE { AND } CHARACTERS!!! ***/ +/*** + Please use ' instead of ", when possible. Note " ***/ +/*** should always be used in _( ) function calls. ***/ +/*** Thank you for your help making the SM code more readable. ***/ +/*****************************************************************/ + +// Always set up the language before calling these functions +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"; + } - 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); + global $delimiter, $hide_sm_attributions; + 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"; - echo " \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"; + $shortBoxName = readShortMailboxName($mailbox, $delimiter); + echo "\n" + . "\n" + . " \n" + . " \n" + . " \n" + . " \n" + . " \n" + . " \n"; - echo " \n"; - echo "
\n" + . ' ' . _("Current Folder") . ": $shortBoxName \n" + . " \n"; + displayInternalLink ('src/signout.php', _("Sign Out"), '_top'); + echo "
\n"; $urlMailbox = urlencode($mailbox); displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right"); echo "  \n"; @@ -91,10 +93,13 @@ do_hook("menuline"); - echo " \n"; - echo " SquirrelMail\n"; - echo "
\n\n"; + echo "
\n"; + echo ($hide_sm_attributions ? ' ' : + "SquirrelMail\n"); + echo "
\n\n"; + // echo ""; } + ?>