5 ** Prints the page header (duh)
10 if (defined('page_header_php'))
12 define('page_header_php', true);
14 // Always set up the language before calling these functions
16 function displayHtmlHeader ($title="SquirrelMail") {
19 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
23 if ($theme_css != "") {
24 printf ('<LINK REL="stylesheet" TYPE="text/css" HREF="%s">',
29 do_hook ("generic_header");
31 echo "<TITLE>$title</TITLE>\n";
35 function displayInternalLink ($path, $text, $target="") {
39 $target = " target=\"$target\"";
41 echo '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>';
44 function displayPageHeader($color, $mailbox) {
47 printf('<BODY TEXT="%s" BGCOLOR="%s" LINK="%s" VLINK="%s" ALINK="%s">',
48 $color[8], $color[4], $color[7], $color[7], $color[7]);
51 /** Here is the header and wrapping table **/
52 $shortBoxName = readShortMailboxName($mailbox, ".");
53 echo "<A NAME=pagetop></A>\n";
54 echo "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n";
55 echo " <TR BGCOLOR=\"$color[9]\">\n";
56 echo " <TD ALIGN=left WIDTH=\"30%\"><b>\n";
57 displayInternalLink ("src/signout.php", _("Sign Out"), "_top");
58 echo " </b></TD><TD ALIGN=right WIDTH=\"70%\">\n";
59 echo " <div align=right>" . _("Current Folder") . ": <B>$shortBoxName </B></div>\n";
63 echo "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n";
65 echo " <TD ALIGN=left WIDTH=\"90%\">\n";
66 $urlMailbox = urlencode($mailbox);
67 displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right");
68 echo " \n";
69 displayInternalLink ("src/addressbook.php", _("Addresses"), "right");
70 echo " \n";
71 displayInternalLink ("src/folders.php", _("Folders"), "right");
72 echo " \n";
73 displayInternalLink ("src/options.php", _("Options"), "right");
74 echo " \n";
75 displayInternalLink ("src/search.php?mailbox=$urlMailbox", _("Search"), "right");
76 echo " \n";
77 displayInternalLink ("src/help.php", _("Help"), "right");
78 echo " \n";
82 echo " </TD><TD ALIGN=right nowrap WIDTH=\"10%\">\n";
83 echo " <A HREF=\"http://www.squirrelmail.org/\" TARGET=\"_blank\">SquirrelMail</A>\n";