\n"
- . " \n";
- if ( $shortBoxName <> '' && strtolower( $shortBoxName ) <> 'none' ) {
- echo ' ' . _("Current Folder") . ": $shortBoxName \n";
+
+//FIXME: does checkForJavascript() make the 2nd part of the if() below unneccessary?? (that is, I think checkForJavascript() might already look for new_js_autodetect_results...(?))
+ if( checkForJavascript() || strpos($sHeaderJs, 'new_js_autodetect_results.value') ) {
+ $js_includes = $oTemplate->get_javascript_includes(TRUE);
+ $sJsBlock = '';
+ foreach ($js_includes as $js_file) {
+ $sJsBlock .= '' ."\n";
+ }
+ if ($sHeaderJs) {
+ $sJsBlock .= "\n\n";
+ }
+ displayHtmlHeader ($org_title, $sJsBlock);
} else {
- echo ' ';
+ /* do not use JavaScript */
+ displayHtmlHeader ($org_title);
+ $sOnload = '';
}
- echo " | \n"
- . ' ';
- displayInternalLink ('src/signout.php', _("Sign Out"), $frame_top);
- echo " | \n"
- . "
\n"
- . " \n"
- . " \n";
- $urlMailbox = urlencode($mailbox);
- if ($compose_new_win == '1') {
- echo "'. _("Compose"). '';
+ if ($mailbox) {
+ /*
+ * this explains the imap_mailbox.php dependency. We should instead store
+ * the selected mailbox in the session and fallback to the session var.
+ */
+ $shortBoxName = sm_encode_html_special_chars(imap_utf7_decode_local(
+ readShortMailboxName($mailbox, $delimiter)));
+ if (getPref($data_dir, $username, 'translate_special_folders')) {
+ global $sent_folder, $trash_folder, $draft_folder;
+ if ($mailbox == $sent_folder)
+ $shortBoxName = _("Sent");
+ else if ($mailbox == $trash_folder)
+ $shortBoxName = _("Trash");
+ else if ($mailbox == $sent_folder)
+ $shortBoxName = _("Drafts");
+ }
+ $urlMailbox = urlencode($mailbox);
+ } else {
+ $shortBoxName = '';
+ $urlMailbox = '';
}
- else {
- 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');
- echo " | \n".
- "
\n".
- "