X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders.php;h=f727337be6ac07b42effff21ec0c53edafcaa00d;hb=f740c049d91feb836dd9633be9e8ff52c00d066f;hp=beccf55578421156aa1155fb404e34299274173b;hpb=3e054c439cee79e856555fba92166173a197388d;p=squirrelmail.git diff --git a/src/folders.php b/src/folders.php index beccf555..f727337b 100644 --- a/src/folders.php +++ b/src/folders.php @@ -1,77 +1,292 @@ -
- - include("../config/config.php"); +\n"; - echo "\n"; + echo _("Folders"); + echo " |
"; + } 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"; + } + $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 "
"; } + } + + /** DELETING FOLDERS **/ + echo "
\n"; + } else { + echo _("No folders were found to subscribe to!") . " |