a2880de79f568c29d5c8705aa062151aa0a82f12
[squirrelmail.git] / templates / default_advanced / page_header.tpl
1 <?php
2
3 /**
4 * page_header.tpl
5 *
6 * Template to create the header for each page.
7 *
8 * @copyright &copy; 1999-2006 The SquirrelMail Project Team
9 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
10 * @version $Id: page_header.tpl 12135 2007-01-15 08:27:10Z pdontthink $
11 * @package squirrelmail
12 * @subpackage templates
13 */
14
15 /* retrieve the template vars */
16 extract($t);
17
18
19 $current_folder_str = '';
20 if ( $shortBoxName <> '' && strtolower( $shortBoxName ) <> 'none' ) {
21 $current_folder_str .= _("Current Folder") . ": <em>$shortBoxName&nbsp;</em>\n";
22 } else {
23 $current_folder_str .= '&nbsp;';
24 }
25
26 // Define our default link text.
27 $signout_link_default = _("Sign Out");
28 $compose_link_default = _("Compose");
29 $address_link_default = _("Addresses");
30 $folders_link_default = _("Folders");
31 $options_link_default = _("Options");
32 $search_link_default = _("Search");
33 $help_link_default = _("Help");
34
35 /*
36 * Create strings to use for links. If tempalte authors
37 * wish to use images instead, they may change the values
38 * below to img tags.
39
40 * Example w/ image:
41 * $compose_str = '<img src="compose.png" border="0" ' .
42 * 'alt="'.$compose_link_default.'" ' .
43 * 'title="'.$compose_link_default.'" />';
44 */
45
46 $signout_str = $signout_link_default;
47 $compose_str = $compose_link_default;
48 $address_str = $address_link_default;
49 $folders_str = $folders_link_default;
50 $options_str = $options_link_default;
51 $search_str = $search_link_default;
52 $help_str = $help_link_default;
53
54 $compose_link = makeComposeLink ('src/compose.php?mailbox='.$urlMailbox.'&amp;startMessage='.$startMessage, $compose_str);
55 $signout_link = makeInternalLink ('src/signout.php', $signout_str, $frame_top);
56 $address_link = makeInternalLink ('src/addressbook.php', $address_str);
57 $folders_link = makeInternalLink ('src/folders.php', $folders_str);
58 $search_link = makeInternalLink ('src/search.php?mailbox='.$urlMailbox, $search_str);
59 $options_link = makeInternalLink ('src/options.php', $options_str);
60 $help_link = makeInternalLink ('src/help.php', $help_str);
61
62 ?>
63 <body <?php echo $body_tag_js; ?>>
64 <?php
65
66 /** if preview pane turned on, do not show menubar above message view */
67 global $data_dir, $username, $PHP_SELF;
68 $use_previewPane = getPref($data_dir, $username, 'use_previewPane', 0);
69 $show_preview_pane = checkForJavascript() && $use_previewPane;
70 $current_page_is_read_body = (strpos($PHP_SELF, '/read_body.php') !== FALSE);
71 if (!$current_page_is_read_body || !$show_preview_pane) {
72
73 ?>
74 <div id="page_header">
75 <a name="pagetop"></a>
76 <!-- Begin Header Navigation Table -->
77 <table class="table_empty" cellspacing="0">
78 <tr>
79 <td class="sqm_currentFolder">
80 <?php echo $current_folder_str; ?>
81 </td>
82 <td class="sqm_headerSignout">
83 <?php echo $signout_link; ?>
84 </td>
85 </tr>
86 <tr>
87 <td class="sqm_topNavigation"<?php echo ($hide_sm_attributions ? ' colspan="2"' : ''); ?>>
88 <?php echo $compose_link; ?>&nbsp;&nbsp;
89 <?php echo $address_link; ?>&nbsp;&nbsp;
90 <?php echo $folders_link; ?>&nbsp;&nbsp;
91 <?php echo $options_link; ?>&nbsp;&nbsp;
92 <?php echo $search_link; ?>&nbsp;&nbsp;
93 <?php echo $help_link; ?>&nbsp;&nbsp;
94 <?php /* FIXME: no hooks in templates!! */ global $null; do_hook('menuline', $null); ?>
95 </td>
96 <?php if (!empty($sm_attribute_str))
97 echo '<td class="sqm_providerInfo">'
98 . $sm_attribute_str
99 . "</td>\n"; ?>
100 </tr>
101 </table>
102 </div>
103 <br />
104 <!-- End Header Navigation Table -->
105 <script type="text/javascript">
106 <!--
107 var delayed_page_load_uri = '';
108 function delayed_page_load(page_uri)
109 { page_load_uri = page_uri; setTimeout('page_load()', 500); }
110 function page_load()
111 { document.location = page_load_uri; }
112 // -->
113 </script>
114 <?php }