/** ** left_main.php ** ** This is the code for the left bar. The left bar shows the folders ** available, and has cookie information. ** **/ if(!isset($username)) { echo "You need a valid user and password to access this page!"; exit; } ?> include("../config/config.php"); include("../functions/array.php"); include("../functions/strings.php"); include("../functions/imap.php"); include("../functions/mailbox.php"); function formatMailboxName($imapConnection, $mailbox, $delimeter) { require ("../config/config.php"); $mailboxURL = urlencode($mailbox); selectMailbox($imapConnection, $mailbox, $numNessages); $unseen = unseenMessages($imapConnection, $numUnseen); if ($unseen) $line .= ""; $special_color = false; for ($i = 0; $i < count($special_folders); $i++) { if (($special_folders[$i] == $mailbox) && ($use_special_folder_color == true)) $special_color = true; } if ($special_color == true) { $line .= ""; $line .= readShortMailboxName($mailbox, $delimeter); $line .= ""; } else { $line .= ""; $line .= readShortMailboxName($mailbox, $delimeter); $line .= ""; } if ($unseen) $line .= ""; if ($numUnseen > 0) { $line .= " ($numUnseen)"; } if (($move_to_trash == true) && (trim($mailbox) == $trash_folder)) { $urlMailbox = urlencode($mailbox); $line .= ""; $line .= " (empty)"; $line .= "\n"; } return $line; } echo "
"; echo ""; // open a connection on the imap port (143) $imapConnection = loginToImapServer($username, $key, $imapServerAddress, 10); // the 10 is to hide the output getFolderList($imapConnection, $boxes); echo "