* This is the code for the left bar. The left bar shows the folders
* available, and has cookie information.
*
- * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @copyright © 1999-2007 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
*/
+/** This is the left_main page */
+define('PAGE_NAME', 'left_main');
+
/**
* Include the SquirrelMail initialization file.
*/
/* SquirrelMail required files. */
require_once(SM_PATH . 'functions/imap_general.php');
require_once(SM_PATH . 'functions/date.php');
-require_once(SM_PATH . 'templates/util_global.php');
-require_once(SM_PATH . 'templates/util_left_main.php');
+require_once(SM_PATH . 'functions/template/folder_list_util.php');
/* These constants are used for folder stuff. */
define('SM_BOX_UNCOLLAPSED', 0);
/**
* Include extra javascript files needed by template
*/
-$js_includes = $oTemplate->getJavascriptIncludes();
+$js_includes = $oTemplate->get_javascript_includes(TRUE);
foreach ($js_includes as $js_file) {
$xtra .= '<script src="'.$js_file.'" type="text/javascript"></script>' ."\n";
}
// get mailbox list and cache it
$mailboxes=sqimap_get_mailboxes($imapConnection,false,$show_only_subscribed_folders);
-displayHtmlHeader( 'SquirrelMail', $xtra );
+displayHtmlHeader( $org_title, $xtra );
+$oErrorHandler->setDelayedErrors(true);
sqgetGlobalVar('auto_create_done',$auto_create_done,SQ_SESSION);
/* If requested and not yet complete, attempt to autocreate folders. */
$autocreate = array($sent_folder, $trash_folder, $draft_folder);
$folders_created = false;
foreach( $autocreate as $folder ) {
- if (($folder != '') && ($folder != 'none')) {
+ if ($folder != '') {
/**
* If $show_only_subscribed_folders is true, don't use
* $mailboxes array for checking if mailbox exists.
}
$clk = str_replace(' ',' ',$clk);
+//FIXME don't build HTML here - do it in template
$clock = '<small><span style="white-space: nowrap;">'
. str_replace(' ', ' ', _("Last Refresh"))
. ":</span><br /><span style=\"white-space: nowrap;\">$clk</span></small><br />\n";
* globals, which are dirty, filthy things in templates. :)
*/
$settings = array();
-$settings['imapConnection'] = $imapConnection;
-$settings['iconThemePath'] = $icon_theme_path;
-$settings['templateDirectory'] = $sTplDir;
+#$settings['imapConnection'] = $imapConnection;
+$settings['templateID'] = $sTemplateID;
$settings['unreadNotificationEnabled'] = $unseen_notify!=1;
$settings['unreadNotificationAllFolders'] = $unseen_notify == 3;
$settings['unreadNotificationDisplayTotal'] = $unseen_type == 2;
sqimap_logout($imapConnection);
$oTemplate->display('footer.tpl');
-?>