X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=0.2.1%2Finc%2Fmonthly_newsletter.php;fp=0.2.1%2Finc%2Fmonthly_newsletter.php;h=bcb50202e579e145612a68e31a11e3c8afecf9ea;hp=ca24fe1c5d41d64d0c478251ef96a11f4ec79b87;hb=7bc25dd08431c94ce9edca131d56c1a36b13c28a;hpb=157ee010917df5ca07e6d31b42f67417b2516d74 diff --git a/0.2.1/inc/monthly_newsletter.php b/0.2.1/inc/monthly_newsletter.php index ca24fe1c5d..bcb50202e5 100644 --- a/0.2.1/inc/monthly_newsletter.php +++ b/0.2.1/inc/monthly_newsletter.php @@ -1,69 +1,69 @@ - 0) -{ - // Some unsubscriptions are found so we reset them to receive newsletters - while(list($uid, $until) = SQL_FETCHROW($result)) - { - // Update account - $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET nl_receive='Y', nl_until='0' WHERE userid='".$uid."' LIMIT 1", __FILE__, __LINE__); - - // Send email to him - $msg = LOAD_EMAIL_TEMPLATE("member_newsletter_reset", true, $uid); - SEND_EMAIL($uid, NL_MEMBER_RESET_SUBJECT, $msg); - - // Send email to admin - if (GET_EXT_VERSION("admins") >= "0.4.1") - { - SEND_ADMIN_EMAILS_PRO(NL_ADMIN_SUBJECT, "admin_newsletter_reset", "", $GLOBALS['userid']); - } - else - { - $msg = LOAD_EMAIL_TEMPLATE("admin_newsletter_reset", true, $uid); - SEND_ADMIN_EMAILS(NL_ADMIN_SUBJECT, $msg); - } - } -} - -// -?> + 0) +{ + // Some unsubscriptions are found so we reset them to receive newsletters + while(list($uid, $until) = SQL_FETCHROW($result)) + { + // Update account + $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET nl_receive='Y', nl_until='0' WHERE userid='".$uid."' LIMIT 1", __FILE__, __LINE__); + + // Send email to him + $msg = LOAD_EMAIL_TEMPLATE("member_newsletter_reset", true, $uid); + SEND_EMAIL($uid, NL_MEMBER_RESET_SUBJECT, $msg); + + // Send email to admin + if (GET_EXT_VERSION("admins") >= "0.4.1") + { + SEND_ADMIN_EMAILS_PRO(NL_ADMIN_SUBJECT, "admin_newsletter_reset", "", $GLOBALS['userid']); + } + else + { + $msg = LOAD_EMAIL_TEMPLATE("admin_newsletter_reset", true, $uid); + SEND_ADMIN_EMAILS(NL_ADMIN_SUBJECT, $msg); + } + } +} + +// +?>