escape($concat_email)) : false; $unikey = ( isset($_REQUEST['uk']) ) ? stripslashes($wpdb->escape($_REQUEST['uk'])) : false; $action = ( isset($_REQUEST['ac']) ) ? stripslashes($wpdb->escape($_REQUEST['ac'])) : false; // If there is not an activation/unsubscribe request if (alo_em_can_access_subscrpage ($email, $unikey) == false ) : // if cannot // if there is action show error msg if(isset($_REQUEST['ac'])) echo "
".__("Error during operation.", "alo-easymail") ."
"; $optin_txt = ( alo_em_translate_option ( alo_em_get_language (), 'alo_em_custom_optin_msg', false) !="") ? alo_em_translate_option ( alo_em_get_language (), 'alo_em_custom_optin_msg', false) : __("Yes, I would like to receive the Newsletter", "alo-easymail"); echo "".__("Error during activation. Please check the activation link.", "alo-easymail")."
"; } else { echo "".__("Your subscription was successfully activated. You will receive the next newsletter. Thank you.", "alo-easymail")."
"; do_action ( 'alo_easymail_subscriber_updated', $email, $email ); } } // Request unsubscribe/modify subsription (step #1) if ($action == 'unsubscribe') { $mailinglists = alo_em_get_mailinglists( 'public' ); if ($mailinglists) { // only if there are public lists echo ''; } echo ''; } // Confirm unsubscribe and do it! (step #2a) if ($action == 'do_unsubscribe' && isset($_POST['submit']) ) { if (alo_em_delete_subscriber_by_email($email, $unikey)) { echo "".__("Your subscription was successfully deleted. Bye bye.", "alo-easymail")."
"; do_action ( 'alo_easymail_subscriber_deleted', $email, false ); } else { echo "".__("Error during unsubscription.", "alo-easymail")." ". __("Try again.", "alo-easymail"). "
"; echo "".__("If it fails again you can contact the administrator", "alo-easymail").": ".get_option('admin_email')."
"; } } // Modify lists subscription and save it! (step #2b) if ($action == 'do_editlists' && isset($_POST['submit']) ) { $mailinglists = alo_em_get_mailinglists( 'public' ); if ($mailinglists) { $subscriber_id = alo_em_is_subscriber( $email ); foreach ( $mailinglists as $mailinglist => $val) { if ( isset ($_POST['alo_em_profile_lists']) && is_array ($_POST['alo_em_profile_lists']) && in_array ( $mailinglist, $_POST['alo_em_profile_lists'] ) ) { alo_em_add_subscriber_to_list ( $subscriber_id, $mailinglist ); // add to list } else { alo_em_delete_subscriber_from_list ( $subscriber_id, $mailinglist ); // remove from list } } } echo "" . __("Your subscription to mailing lists successfully updated", "alo-easymail") . ".
"; } endif; // end CHECK IF CAN ACCESS ?>