1 <HTML
><BODY TEXT
="#000000" BGCOLOR
="#FFFFFF" LINK
="#0000EE" VLINK
="#0000EE" ALINK
="#0000EE">
3 include("../config/config.php");
4 include("../functions/strings.php");
5 include("../functions/page_header.php");
6 include("../functions/imap.php");
8 displayPageHeader("None");
10 echo "<TABLE WIDTH=100% COLS=1 ALIGN=CENTER>\n";
11 echo " <TR><TD BGCOLOR=DCDCDC ALIGN=CENTER>\n";
12 echo " <FONT FACE=\"Arial,Helvetica\">Folders</FONT>\n";
16 $imapConnection = fsockopen($imapServerAddress, 143, &$errorNumber, &$errorString);
17 if (!$imapConnection) {
18 echo "Error connecting to IMAP Server.<br>";
19 echo "$errorNumber : $errorString<br>";
22 $serverInfo = fgets($imapConnection, 256);
24 fputs($imapConnection, "1 login $username $key\n");
25 $read = fgets($imapConnection, 1024);
27 fputs($imapConnection, "1 list \"\" *\n");
28 $str = imapReadData($imapConnection);
30 for ($i = 0;$i < count($str); $i++
) {
31 $mailbox = Chop($str[$i]);
32 // find the quote at the begining of the mailbox name.
33 // i subtract 1 from the strlen so it doesn't find the quote at the end of the mailbox name.
34 $mailbox = findMailboxName($mailbox);
35 $periodCount = countCharInString($mailbox, ".");
37 // indent the correct number of spaces.
38 for ($j = 0;$j < $periodCount;$j++
)
41 $mailboxURL = urlencode($mailbox);
42 echo "<FONT FACE=\"Arial,Helvetica\">\n";
43 echo readShortMailboxName($mailbox, ".");