X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders_subscribe.php;h=a887fde69bf2f4fe441b644cdcff23f004e27250;hb=de19cd7342abc1fb96dce8403128152b7708ec58;hp=c000722cbc37d2b191b23394a854d1e61e2d88c0;hpb=2d367c687f9813a45a3d2f1911036cfc0425fdd0;p=squirrelmail.git diff --git a/src/folders_subscribe.php b/src/folders_subscribe.php index c000722c..a887fde6 100644 --- a/src/folders_subscribe.php +++ b/src/folders_subscribe.php @@ -1,58 +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 ""; +*/ ?>