X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-unlock_sponsor.php;h=280246d77615a2d012eb2a571fde8238210c22b2;hb=4b32c7be676d4a191c869a5745f2890240852fb0;hp=af6e4257c062a90813122219c081b52314beb23f;hpb=c2e17d983fcbc0c3bd1dd37908d87c678f0367df;p=mailer.git diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index af6e4257c0..280246d776 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -1,7 +1,7 @@ 0) { + if (countSelection(postRequestParameter('id')) > 0) { // At least one entry selected - foreach (postRequestElement('id') as $id => $selected) { - // Secure ID number and init $content + foreach (postRequestParameter('id') as $id => $selected) { + // Secure id number and init $content $content = array( 'id' => bigintval($id), 'refid' => 0 @@ -91,7 +92,7 @@ ORDER BY sp.pay_name", // Transfer data to array $data = array( 'admin_id' => $content['email'], - 'order' => ($content['pay_count'] * $content['pay_rate'])." ".$content['pay_currency'], + 'order' => ($content['pay_count'] * $content['pay_rate']) . ' ' . $content['pay_currency'], 'stamp' => generateDateTime($content['pay_ordered'], 2), 'pname' => $content['pay_name'], ); @@ -136,18 +137,18 @@ LIMIT 1", FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", array(bigintval($content['refid'])), __FILE__, __LINE__); - $REFERRAL = SQL_FETCHARRAY($result); + $REFERAL = SQL_FETCHARRAY($result); // Send warnings out? - if ($REFERRAL['receive_warnings'] == 'Y') { + if ($REFERAL['receive_warnings'] == 'Y') { // Translate some data - $REFERRAL['points'] = translateComma($REFERRAL['points']); - $REFERRAL['ref_points'] = translateComma(getConfig('sponsor_ref_points')); - $REFERRAL['gender'] = translateGender($REFERRAL['gender']); + $REFERAL['points'] = translateComma($REFERAL['points']); + $REFERAL['ref_points'] = translateComma(getConfig('sponsor_ref_points')); + $REFERAL['gender'] = translateGender($REFERAL['gender']); // Send notification to referal - $REF_MSG = loadEmailTemplate('sponsor_ref_notify', $REFERRAL); - sendEmail($REFERRAL['email'], getMessage('SPONSOR_REF_NOTIFY_SUBJ'), $REF_MSG); + $REF_MSG = loadEmailTemplate('sponsor_ref_notify', $REFERAL); + sendEmail($REFERAL['email'], getMessage('SPONSOR_REF_NOTIFY_SUBJ'), $REF_MSG); } // Free memory