X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffolders.php;h=23d741048c29af88d67082f43f4fb086c52528ba;hb=cbbdef2abcc419765b40a3eda08643063216fbca;hp=128399b2f08caca4fbc4383964c7491b0bf965b8;hpb=ad6787f093ea69dccc3b49c762dc9cfa8f31b387;p=squirrelmail.git diff --git a/src/folders.php b/src/folders.php index 128399b2..23d74104 100644 --- a/src/folders.php +++ b/src/folders.php @@ -1,68 +1,321 @@ - -\n"; - echo " \n"; - echo " Folders\n"; - echo " \n"; +"; + echo "\n"; + echo " \n"; echo "
\n"; + echo _("Folders"); + echo "
\n"; - $imapConnection = loginToImapServer($username, $key, $imapServerAddress); - getFolderList($imapConnection, $boxesFormatted, $boxesUnformatted); + if ((isset($success) && $success) || + (isset($sent_create) && $sent_create == "true") || + (isset($trash_create) && $trash_create == "true")) { + echo "\n"; + echo " \n"; + echo "
\n"; + if ($success == "subscribe") { + echo "" . _("Subscribed successfully!") . "
"; + } else if ($success == "unsubscribe") { + echo "" . _("Unsubscribed successfully!") . "
"; + } else if ($success == "delete") { + echo "" . _("Deleted folder successfully!") . "
"; + } else if ($success == "create") { + echo "" . _("Created folder successfully!") . "
"; + } else if ($success == "rename") { + echo "" . _("Renamed successfully!") . "
"; + } else if (($sent_create == "true") || ($trash_create == "true")) { + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); + if ($sent_create == "true") { + sqimap_mailbox_create ($imapConnection, $sent_folder, ""); + } + if ($trash_create == "true") { + sqimap_mailbox_create ($imapConnection, $trash_folder, ""); + } + sqimap_logout($imapConnection); + echo _("Folders created successfully!"); + } - /** DELETING FOLDERS **/ - echo "
\n"; - echo "

\n"; + } + $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0); + $boxes = sqimap_mailbox_list($imapConnection); + + //display form option for creating Sent and Trash folder + if ($imap_server_type == "cyrus" && ($sent_folder != "none" || $trash_folder != "none")) { + if ((!sqimap_mailbox_exists ($imapConnection, $sent_folder)) || + (!sqimap_mailbox_exists ($imapConnection, $trash_folder))) { + echo "\n"; + echo ""; + echo "
"; + echo _("Special Folder Options"); + echo "
"; + echo _("In order for SquirrelMail to provide the full set of options you need to create the special folders listed below. Just click the check box and hit the create button."); + echo "\n"; + if (!sqimap_mailbox_exists ($imapConnection, $sent_folder) && $sent_folder != "none") { + echo _("Create Sent") . "
\n"; + } + if (!sqimap_mailbox_exists ($imapConnection, $trash_folder) && $trash_folder != "none"){ + echo _("Create Trash") . "
\n"; } + echo ""; + echo "

"; } + } - if ($use_folder == true) - echo "