X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fpage_header.php;h=7ea711d077d104ddff771755a0e8eeb39ea8e5f2;hb=fbecf05fbb1c46ab5e60d5156c179502571b5dbf;hp=c3d9a66643b51ef15f26752b1e7f0119eb7b2859;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6;p=squirrelmail.git diff --git a/functions/page_header.php b/functions/page_header.php index c3d9a666..7ea711d0 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -11,95 +11,283 @@ * $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"; +require_once('../functions/strings.php'); +//require_once('../functions/imap_utf7_decode_local.php'); +require_once('../functions/html.php'); +require_once('../functions/imap_mailbox.php'); +/* Always set up the language before calling these functions */ +function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) { + global $theme_css, $custom_css, $base_uri; + + echo '' . + "\n\n\n\n"; + + if ( !isset( $custom_css ) || $custom_css == 'none' ) { if ($theme_css != '') { - echo "\n"; + echo ""; } + } else { + echo ''; + } + + if ($do_hook) { + do_hook("generic_header"); + } + + echo "\n\n" - . ' ' . _("Current Folder") . ": $shortBoxName \n" - . " | \n" - . "\n"; - displayInternalLink ('src/signout.php', _("Sign Out"), '_top'); - echo " | \n" - . "
\n"; - $urlMailbox = urlencode($mailbox); - displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right"); - echo " \n"; - displayInternalLink ("src/addressbook.php", _("Addresses"), "right"); - echo " \n"; - displayInternalLink ("src/folders.php", _("Folders"), "right"); - echo " \n"; - displayInternalLink ("src/options.php", _("Options"), "right"); - echo " \n"; - displayInternalLink ("src/search.php?mailbox=$urlMailbox", _("Search"), "right"); - echo " \n"; - displayInternalLink ("src/help.php", _("Help"), "right"); - echo " \n"; - - do_hook("menuline"); - - echo " | \n"; - echo ($hide_sm_attributions ? ' ' : - "SquirrelMail\n"); - echo " | \n". - "