X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders_subscribe.php;h=a887fde69bf2f4fe441b644cdcff23f004e27250;hb=acc28bac454795b76c712bd9fd20b38d973be9e4;hp=5c0433669410da1016ce6b3d44cbf48b41f884c0;hpb=d4e84069d1d9af8760b8e858672d3ea3d4eac8b0;p=squirrelmail.git diff --git a/src/folders_subscribe.php b/src/folders_subscribe.php index 5c043366..a887fde6 100644 --- a/src/folders_subscribe.php +++ b/src/folders_subscribe.php @@ -1,57 +1,59 @@

"; - if ($method == "sub") { - echo _("Subscribed Successfully!"); - echo "

"; - echo _("You have been successfully subscribed."); - } else { - echo _("Unsubscribed Successfully!"); - echo "

"; - echo _("You have been successfully unsubscribed."); - } - echo "
"; - echo _("Click here"); - echo " "; - echo _("to continue."); - echo "
"; - echo ""; - */ -?> +$location = get_location(); +if ($method == 'sub') { + for ($i=0; $i < count($mailbox); $i++) { + $mailbox[$i] = trim($mailbox[$i]); + sqimap_subscribe ($imapConnection, $mailbox[$i]); + header("Location: $location/folders.php?success=subscribe"); + } +} else { + for ($i=0; $i < count($mailbox); $i++) { + $mailbox[$i] = trim($mailbox[$i]); + sqimap_unsubscribe ($imapConnection, $mailbox[$i]); + header("Location: $location/folders.php?success=unsubscribe"); + } +} +if (!isset($mailbox)) { + header("Location: $location/folders.php"); +} +sqimap_logout($imapConnection); +/* +displayPageHeader($color, 'None'); +echo "


"; +if ($method == "sub") { + echo _("Subscribed Successfully!"); + echo "

"; + echo _("You have been successfully subscribed."); +} else { + echo _("Unsubscribed Successfully!"); + echo "

"; + echo _("You have been successfully unsubscribed."); +} +echo "
"; +echo _("Click here"); +echo " "; +echo _("to continue."); +echo "
"; +echo ""; +*/ +?>