X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_sponsor.php;h=3bff5d845507dca7938ad6947a2e7e8355720a55;hb=675778ff98b75b6c5071e2709c2d6b0af86cf79d;hp=ba14bdff29967cd59c62d9688777359b2dabb2df;hpb=30ae22f62ae87c53a56baf0d134569ba91011111;p=mailer.git diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index ba14bdff29..3bff5d8455 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -81,9 +81,9 @@ FROM LEFT JOIN `{?_MYSQL_PREFIX?}_sponsor_paytypes` AS sp ON - sp.id=so.payid + sp.id=so.payment_id WHERE - so.sponsorid='%s' + so.sponsor_id=%s ORDER BY sp.pay_name ASC", array($content['id']), __FILE__, __LINE__); @@ -164,8 +164,8 @@ LIMIT 1", // Send warnings out? if ($REFERAL['receive_warnings'] == 'Y') { // Send notification to referal - $REF_MSG = loadEmailTemplate('sponsor_ref_notify', $REFERAL); - sendEmail($REFERAL['email'], '{--SPONSOR_REF_NOTIFY_SUBJECT--}', $REF_MSG); + $REFERAL_MSG = loadEmailTemplate('sponsor_ref_notify', $REFERAL); + sendEmail($REFERAL['email'], '{--SPONSOR_REFERAL_NOTIFY_SUBJECT--}', $REFERAL_MSG); } // END - if // Free memory @@ -173,9 +173,6 @@ LIMIT 1", } // END - if } // END - if - // Transfer data to array - $content['points'] = translateComma($content['points_amount']); - // So let's send the email away $message = loadEmailTemplate('sponsor_unlocked', $content); sendEmail($content['email'], '{--SPONSOR_UNLOCKED_SUBJECT--}', $message); @@ -192,7 +189,7 @@ $result = SQL_QUERY("SELECT FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE - `status`='PENDING' + `status`='PENDING' OR `status`='UNCONFIRMED' ORDER BY `id`", __FILE__, __LINE__); @@ -200,16 +197,8 @@ if (!SQL_HASZERONUMS($result)) { // Entries found so let's list them! $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { - // Transfer data to array - $content = array( - 'id' => $content['id'], - 'gender' => $content['gender'], - 'surname' => $content['surname'], - 'family' => $content['family'], - 'email' => generateEmailLink($content['email'], 'sponsor_data'), - 'remote_addr' => $content['remote_addr'], - 'sponsor_created' => generateDateTime($content['sponsor_created'], 2), - ); + // Translate some data + $content['sponsor_created'] = generateDateTime($content['sponsor_created'], 2); // Load row template and switch colors $OUT .= loadTemplate('admin_unlock_sponsor_row', true, $content);