X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fpage_header.php;h=7910dd84d56b57de86ef94c86f7b6984951881ec;hp=cbda75358c0e7de738d1d350579c858881e178d9;hb=97b1248c028b0c59ccd28a094dffa41720b29006;hpb=4d641ed2312c83b3b78411c0fa55903fee9d60ae diff --git a/functions/page_header.php b/functions/page_header.php index cbda7535..7910dd84 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -13,7 +13,7 @@ require_once('../functions/strings.php'); -// Always set up the language before calling these functions +/* Always set up the language before calling these functions */ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) { global $theme_css, $custom_css, $base_uri; @@ -23,18 +23,14 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE if ( !isset( $custom_css ) || $custom_css == 'none' ) { if ($theme_css != '') { - echo "\n"; + echo ""; } } else { echo '\n"; + $base_uri . 'themes/css/'.$custom_css.'">'; } - if( $do_hook ) { - do_hook ("generic_header"); - } - - echo "$title$xtra\n\n"; + echo "\n$title$xtra\n\n"; } function displayInternalLink($path, $text, $target='') { @@ -47,12 +43,10 @@ function displayInternalLink($path, $text, $target='') { echo ''.$text.''; } -function displayPageHeader($color, $mailbox) { +function displayPageHeader($color, $mailbox, $xtra='') { global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF, $frame_top, $compose_new_win, $username, $datadir; - displayHtmlHeader (); - $module = substr( $PHP_SELF, ( strlen( $PHP_SELF ) - strlen( $base_uri ) ) * -1 ); if (!isset($frame_top)) { $frame_top = '_top'; @@ -65,9 +59,10 @@ function displayPageHeader($color, $mailbox) { case 'src/search.php': $pos = getPref($data_dir, $username, 'search_pos', 0 ) - 1; $onload = "onLoad=\"document.forms[$pos].elements[2].focus();\""; + displayHtmlHeader (); break; default: - echo '\n"; $onload = "onLoad=\"checkForm();\""; + displayHtmlHeader ('Squirrelmail', $js); break; } @@ -126,9 +123,9 @@ function displayPageHeader($color, $mailbox) { echo ' '; } echo " \n" - . " \n"; + . ' '; displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top); - echo " \n" + echo "\n" . " \n" . " \n" . " \n"; @@ -154,10 +151,10 @@ function displayPageHeader($color, $mailbox) { do_hook("menuline"); - echo " \n"; + echo " \n "; echo ($hide_sm_attributions ? ' ' : - "SquirrelMail\n"); - echo " \n". + 'SquirrelMail'); + echo "\n". " \n". "\n\n"; } @@ -167,7 +164,6 @@ function compose_Header($color, $mailbox) { global $delimiter, $hide_sm_attributions, $base_uri, $PHP_SELF, $frame_top, $compose_new_win; - displayHtmlHeader (_("Compose")); $module = substr( $PHP_SELF, ( strlen( $PHP_SELF ) - strlen( $base_uri ) ) * -1 ); if (!isset($frame_top)) { @@ -181,9 +177,10 @@ function compose_Header($color, $mailbox) { case 'src/search.php': $pos = getPref($data_dir, $username, 'search_pos', 0 ) - 1; $onload = "onLoad=\"document.forms[$pos].elements[2].focus();\""; + displayHtmlHeader (_("Compose")); break; default: - echo '\n"; $onload = "onLoad=\"checkForm();\""; + displayHtmlHeader (_("Compose"), $js); break; }