X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fpage_header.php;h=c3d9a66643b51ef15f26752b1e7f0119eb7b2859;hb=61e2e861b0a0b5a056e2bdc33e8f59eeb8dbfba3;hp=349f32d731a3353049b2b0e41c38b2f14857454e;hpb=e0dcff78e5469c8dc71cc603dff6326fc4f7b3c2;p=squirrelmail.git diff --git a/functions/page_header.php b/functions/page_header.php index 349f32d7..c3d9a666 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -1,31 +1,51 @@ ' . - "\n\n\n\n"; - if ($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='') { @@ -33,30 +53,30 @@ if ($target != '') $target = " target=\"$target\""; - + echo ''.$text.''; } function displayPageHeader($color, $mailbox) { - global $delimiter; + global $delimiter, $hide_sm_attributions; displayHtmlHeader (); echo "\n\n"; /** Here is the header and wrapping table **/ $shortBoxName = readShortMailboxName($mailbox, $delimiter); - echo "\n"; - echo "\n". + " \n". + "
"; - 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"; + 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"; @@ -74,10 +94,12 @@ do_hook("menuline"); echo " \n"; - echo " SquirrelMail\n"; - echo "
\n\n"; - echo "
"; + echo ($hide_sm_attributions ? ' ' : + "SquirrelMail\n"); + echo "
\n\n"; + // echo ""; } + ?>