Added slovak
[squirrelmail.git] / functions / page_header.php
CommitLineData
59177427 1<?php
3302d0d4 2 /**
a09387f4 3 ** page_header.php
3302d0d4 4 **
5 ** Prints the page header (duh)
6 **
245a6892 7 ** $Id$
3302d0d4 8 **/
9
f435778e 10 if (defined('page_header_php'))
11 return;
12 define('page_header_php', true);
2a32fc83 13
1026ec43 14 // Always set up the language before calling these functions
e8816411 15
a3ab54ab 16 function displayHtmlHeader ($title="SquirrelMail") {
8df1c96e 17 global $theme_css;
18
2a833d72 19 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">';
20 echo "\n\n";
21 echo "<HTML>\n";
22 echo "<HEAD>\n";
8df1c96e 23 if ($theme_css != "") {
24 printf ('<LINK REL="stylesheet" TYPE="text/css" HREF="%s">',
25 $theme_css);
26 echo "\n";
27 }
7b086a80 28
29 do_hook ("generic_header");
30
04632dbc 31 echo "<TITLE>$title</TITLE>\n";
2a833d72 32 echo "</HEAD>\n\n";
33 }
34
5bbe20e4 35 function displayInternalLink ($path, $text, $target="") {
36 global $base_uri;
37
38 if ($target != "")
39 $target = " target=\"$target\"";
d68a3926 40
5bbe20e4 41 echo '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>';
42 }
43
f8f9bed9 44 function displayPageHeader($color, $mailbox) {
67a42d95 45 displayHtmlHeader ();
2a833d72 46
fabd78f9 47 echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\" onLoad='if ( document.forms[0].elements[0].type == \"text\" ) { document.forms[0].elements[0].focus(); }'>\n\n";
2a833d72 48
3302d0d4 49 /** Here is the header and wrapping table **/
50 $shortBoxName = readShortMailboxName($mailbox, ".");
390372b4 51 echo "<A NAME=pagetop></A>\n";
761d149e 52 echo "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n";
53 echo " <TR BGCOLOR=\"$color[9]\">\n";
5bbe20e4 54 echo " <TD ALIGN=left WIDTH=\"30%\"><b>\n";
55 displayInternalLink ("src/signout.php", _("Sign Out"), "_top");
56 echo " </b></TD><TD ALIGN=right WIDTH=\"70%\">\n";
88c81396 57 echo " <div align=right>" . _("Current Folder") . ": <B>$shortBoxName&nbsp;</B></div>\n";
761d149e 58 echo " </TD>\n";
59 echo " </TR>\n";
60 echo "</TABLE>\n\n";
61 echo "<TABLE BGCOLOR=\"$color[4]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>\n";
62 echo " <TR>\n";
e7db48af 63 echo " <TD ALIGN=left WIDTH=\"90%\">\n";
d76f6440 64 $urlMailbox = urlencode($mailbox);
5bbe20e4 65 displayInternalLink ("src/compose.php?mailbox=$urlMailbox", _("Compose"), "right");
66 echo "&nbsp;&nbsp;\n";
67 displayInternalLink ("src/addressbook.php", _("Addresses"), "right");
68 echo "&nbsp;&nbsp;\n";
69 displayInternalLink ("src/folders.php", _("Folders"), "right");
70 echo "&nbsp;&nbsp;\n";
71 displayInternalLink ("src/options.php", _("Options"), "right");
72 echo "&nbsp;&nbsp;\n";
8d455c73 73 displayInternalLink ("src/search.php?mailbox=$urlMailbox", _("Search"), "right");
74 echo "&nbsp;&nbsp;\n";
d68a3926 75 displayInternalLink ("src/help.php", _("Help"), "right");
5bbe20e4 76 echo "&nbsp;&nbsp;\n";
7b086a80 77
78 do_hook("menuline");
79
e7db48af 80 echo " </TD><TD ALIGN=right nowrap WIDTH=\"10%\">\n";
fb3b73a8 81 echo " <A HREF=\"http://www.squirrelmail.org/\" TARGET=\"_blank\">SquirrelMail</A>\n";
761d149e 82 echo " </TD>\n";
83 echo " </TR>\n";
84 echo "</TABLE>\n\n";
3302d0d4 85 }
86?>