X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Ffolders_subscribe.php;h=a887fde69bf2f4fe441b644cdcff23f004e27250;hp=c2cb6300c1a0b0b32178ad9e573479828e2b5687;hb=854000c01b0a890c69ce818a00517acb35e1857a;hpb=ff8a98e7e1d368c57b088522586bddcf68d443a5 diff --git a/src/folders_subscribe.php b/src/folders_subscribe.php index c2cb6300..a887fde6 100644 --- a/src/folders_subscribe.php +++ b/src/folders_subscribe.php @@ -1,56 +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 ""; - */ -?> \ No newline at end of file +$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 ""; +*/ +?>