X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fpage_header.php;h=1af6a86f32de62f0b4baad6b7e156204d13ce1d6;hp=f26e19c7790350837a95ba63497d23c518544dfd;hb=7b086a8035ee92e3afe42857f6877522c13f2c76;hpb=9f2215a1f40978a370a7538229ca2f55f55026ee diff --git a/functions/page_header.php b/functions/page_header.php index f26e19c7..1af6a86f 100644 --- a/functions/page_header.php +++ b/functions/page_header.php @@ -14,6 +14,8 @@ include ("../functions/prefs.php"); if (!isset($i18n_php)) include ("../functions/i18n.php"); + if (!isset($plugin_php)) + include ("../functions/plugin.php"); // Check to see if gettext is installed if (function_exists("_")) { @@ -21,16 +23,10 @@ // (the default language) or empty. $squirrelmail_language = getPref ($data_dir, $username, "language"); if ($squirrelmail_language != "en" && $squirrelmail_language != "") { - putenv("LANG=$squirrelmail_language"); + putenv("LC_ALL=$squirrelmail_language"); bindtextdomain("squirrelmail", "../locale/"); textdomain("squirrelmail"); $default_charset = $languages[$squirrelmail_language]["CHARSET"]; - - // Setting cookie to use on the login screen the next time the - // same user logs in. - #setcookie("squirrelmail_language", $squirrelmail_language, - # time()+2592000); - $squirrelmail_language = $language; } } else { function _($string) { @@ -42,27 +38,60 @@ if ($default_charset != "") header ("Content-Type: text/html; charset=$default_charset"); + 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"); + + echo "$title"; + echo "\n\n"; + } + function displayPageHeader($color, $mailbox) { + displayHtmlHeader ($color); + + printf('', + $color[8], $color[4], $color[7], $color[7], $color[7]); + echo "\n\n"; + /** Here is the header and wrapping table **/ $shortBoxName = readShortMailboxName($mailbox, "."); $shortBoxName = stripslashes($shortBoxName); - echo ""; - echo " "; - echo " "; - echo "
"; - echo " " . _("Sign Out") . ""; - echo " "; - echo "
" . _("Current Folder: ") . "$shortBoxName 
"; - echo "
\n"; - echo ""; - echo " "; - echo "
"; - echo " " . _("Compose") . "  "; - echo " " . _("Addresses") . "  "; - echo " " . _("Folders") . "  "; - echo " " . _("Options") . "  "; - echo " "; - echo " SquirrelMail"; - echo "
"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + echo " " . _("Sign Out") . "\n"; + echo " \n"; + echo "
" . _("Current Folder: ") . "$shortBoxName 
\n"; + echo "
\n\n"; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo "
\n"; + $urlMailbox = $mailbox; + echo " " . _("Compose") . "  \n"; + echo " " . _("Addresses") . "  \n"; + echo " " . _("Folders") . "  \n"; + echo " " . _("Options") . "  \n"; + echo " " . _("Help") . "  "; + + do_hook("menuline"); + + echo " \n"; + echo " SquirrelMail\n"; + echo "
\n\n"; } ?>