X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders.php;h=4718e760c23d5ee6565d48b5ec5a8f295f17eecd;hb=b2fd071870529300cfa3698f1d66f71223971b88;hp=7b7ec043a66d59175e1a7d9f9e476b01b75ac8bd;hpb=7c1b84d979f4bbbcc8ce5d7423421123c4155107;p=squirrelmail.git diff --git a/src/folders.php b/src/folders.php index 7b7ec043..4718e760 100644 --- a/src/folders.php +++ b/src/folders.php @@ -1,89 +1,121 @@ - \n"; + + displayPageHeader($color, "None"); echo "\n"; - echo " \n"; echo "
\n"; - echo " Folders\n"; + echo "
\n"; + echo " "; + echo _("Folders"); + echo "\n"; echo "
\n"; - $imapConnection = loginToImapServer($username, $key, $imapServerAddress); - - fputs($imapConnection, "1 list \"\" *\n"); - $str = imapReadData($imapConnection); - - for ($i = 0;$i < count($str); $i++) { - $mailbox = Chop($str[$i]); - // find the quote at the begining of the mailbox name. - // i subtract 1 from the strlen so it doesn't find the quote at the end of the mailbox name. - $mailbox = findMailboxName($mailbox); - $periodCount = countCharInString($mailbox, "."); - - // indent the correct number of spaces. - for ($j = 0;$j < $periodCount;$j++) - $boxes[$i] = "$boxes[$i]   "; - - $boxes[$i] = $boxes[$i] . readShortMailboxName($mailbox, "."); - $long_name_boxes[$i] = $mailbox; - } + $imapConnection = loginToImapServer($username, $key, $imapServerAddress, 0); + getFolderList($imapConnection, $boxes); /** DELETING FOLDERS **/ - - echo "
\n"; - echo "\n"; + for ($i = 0; $i < count($boxes); $i++) { $use_folder = true; for ($p = 0; $p < count($special_folders); $p++) { - if ($special_folders[$p] == $long_name_boxes[$i]) + if ($boxes[$i]["UNFORMATTED"] == $special_folders[$p]) { $use_folder = false; + } else if (substr($boxes[$i]["UNFORMATTED"], 0, strlen($trash_folder)) == $trash_folder) { + $use_folder = false; + } + } + if ($use_folder == true) { + $box = $boxes[$i]["UNFORMATTED"]; + $box2 = $boxes[$i]["FORMATTED"]; + echo "

\n"; + + echo "\n"; + echo "\n"; + echo "

\n"; /** CREATING FOLDERS **/ + echo ""; + echo _("Create Folder"); + echo ""; + echo ""; echo "
\n"; - echo "\n"; - echo "  as a subfolder of  "; - echo "
\n"; + echo ""; + echo _("as a subfolder of"); + echo "
"; + echo "\n"; - echo "\n"; - echo "
\n"; + echo "

\n"; + echo ""; + if ($show_contain_subfolders_option) + echo "  "; + echo _("Let this folder contain subfolders"); + echo "
"; + echo "
\n"; + echo "

\n"; /** RENAMING FOLDERS **/ - echo "
\n"; - echo "\n"; + for ($i = 0; $i < count($boxes); $i++) { $use_folder = true; for ($p = 0; $p < count($special_folders); $p++) { - if ($special_folders[$p] == $long_name_boxes[$i]) + if ($boxes[$i]["UNFORMATTED"] == $special_folders[$p]) { + $use_folder = false; + } else if (substr($boxes[$i]["UNFORMATTED"], 0, strlen($trash_folder)) == $trash_folder) { $use_folder = false; + } + } + if ($use_folder == true) { + $box = $boxes[$i]["UNFORMATTED"]; + $box2 = $boxes[$i]["FORMATTED"]; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
\n"; ?>