\n";
-}
-
-do_hook('left_main_before');
-if ($advanced_tree) {
- /* nice future feature, needs layout !! volunteers? */
- $right_pos = $left_size - 20;
-/* echo '
';
- echo '
';
- echo '
';
- echo '
';
- echo '
';*/
-}
-
-echo "\n\n" . html_tag( 'table', '', 'left', '', 'border="0" cellspacing="0" cellpadding="0" width="99%"' ) .
- html_tag( 'tr' ) .
- html_tag( 'td', '', 'left' ) .
- html_tag( 'table', '', '', '', 'border="0" cellspacing="0" cellpadding="0"' ) .
- html_tag( 'tr' ) .
- html_tag( 'td', '', 'center' ) .
- '
'. _("Folders") . "
\n\n";
-
+$clock = '';
if ($date_format != 6) {
/* First, display the clock. */
if ($hour_format == 1) {
@@ -736,17 +142,12 @@ if ($date_format != 6) {
}
$clk = str_replace(' ',' ',$clk);
- echo '
'
+//FIXME don't build HTML here - do it in template
+ $clock = ''
. str_replace(' ', ' ', _("Last Refresh"))
. ":
$clk
\n";
}
-/* Next, display the refresh button. */
-echo '
\n\n";
-
-/* Lastly, display the folder list. */
-
if ( $collapse_folders ) {
/* If directed, collapse or uncollapse a folder. */
if (isset($fold)) {
@@ -775,32 +176,40 @@ if (empty($unseen_notify)) {
$unseen_notify = 0;
}
}
+
/**
* pass $mailboxes now instead of $imapconnection - sqimap_get_mailboxes() has been separated from
* sqimap_mailbox_tree() so that the cached mailbox list can be used elsewhere in left_main and beyond
*/
$boxes = sqimap_mailbox_tree($imapConnection,$mailboxes,$show_only_subscribed_folders);
+$mailbox_structure = getBoxStructure($boxes);
-if (isset($advanced_tree) && $advanced_tree) {
- echo ''."\n";
-} else {
- ListBoxes($boxes);
-}
+$oTemplate->assign('clock', $clock);
+$oTemplate->assign('mailboxes', $mailbox_structure);
-do_hook('left_main_after');
-sqimap_logout($imapConnection);
+/*
+ * Build an array to pass user prefs to the template in order to avoid using
+ * globals, which are dirty, filthy things in templates. :)
+ */
+$settings = array();
+#$settings['imapConnection'] = $imapConnection;
+$settings['templateID'] = $sTemplateID;
+$settings['unreadNotificationEnabled'] = $unseen_notify!=1;
+$settings['unreadNotificationAllFolders'] = $unseen_notify == 3;
+$settings['unreadNotificationDisplayTotal'] = $unseen_type == 2;
+$settings['unreadNotificationCummulative'] = $unseen_cum==1;
+$settings['useSpecialFolderColor'] = $use_special_folder_color;
+$settings['messageRecyclingEnabled'] = $move_to_trash;
+$settings['collapsableFoldersEnabled'] = $collapse_folders==1;
+$oTemplate->assign('settings', $settings);
+
+//access keys
+//
+$oTemplate->assign('accesskey_folders_refresh', $accesskey_folders_refresh);
+$oTemplate->assign('accesskey_folders_purge_trash', $accesskey_folders_purge_trash);
+$oTemplate->assign('accesskey_folders_inbox', $accesskey_folders_inbox);
+
+$oTemplate->display('left_main.tpl');
-?>
-
-
-display('footer.tpl');
-?>
\ No newline at end of file