X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders.php;h=9699514de2e1644aea9de7ee01d18c43a531899f;hb=1e06e00c158b3bb0c254d8f602439069aaeb78dc;hp=e51d47e90f42c604398b46568433d189e2de8994;hpb=813eba2f5f4695bd30b895cd148658f3b90bf120;p=squirrelmail.git diff --git a/src/folders.php b/src/folders.php index e51d47e9..9699514d 100644 --- a/src/folders.php +++ b/src/folders.php @@ -1,121 +1,317 @@ -\n"; + include("../src/load_prefs.php"); displayPageHeader($color, "None"); - echo "\n"; - echo "
\n"; - echo " "; + echo "
"; + echo "\n"; + echo " \n"; + echo " \n"; echo "
\n"; echo _("Folders"); - echo "\n"; - echo "
\n"; - $imapConnection = sqimap_login ($username, $key, $imapServerAddress, 0); + if ($success || $sent_create == "true" || $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!"); + } + + echo " " . _("refresh folder list") . ""; + echo "

\n"; + } + $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); - /** DELETING FOLDERS **/ - echo "\n"; - echo ""; - echo "
"; - echo _("Delete Folder"); - echo "
"; - echo "
\n"; - 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) { - $box = $boxes[$i]["unformatted"]; - $box2 = replace_spaces($boxes[$i]["formatted"]); - echo "

\n"; + } else { + echo _("No folders were found to subscribe to!") . "
"; + } + do_hook("folders_bottom"); + sqimap_logout($imapConnection); ?>