]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-unlock_sponsor.php
Typo 'referral'->'referal' fixed, more 'empty version' fixed
[mailer.git] / inc / modules / admin / what-unlock_sponsor.php
index 1684b2ae8ab73ff4f04b3a0e948bf6b6c581bb87..bd1f77f5060c45d90c026fa18ea49201a11fbeb9 100644 (file)
@@ -50,7 +50,7 @@ if (isFormSent()) {
        if (countSelection(postRequestElement('id')) > 0) {
                // At least one entry selected
                foreach (postRequestElement('id') as $id => $selected) {
-                       // Secure ID number and init $content
+                       // Secure id number and init $content
                        $content = array(
                                'id'    => bigintval($id),
                                'refid' => 0
@@ -83,7 +83,7 @@ ORDER BY sp.pay_name",
 
                                                // Set default email
                                                $content['email'] = getMessage('SPONSOR_NO_ADMIN');
-                                               if ($content['admin_id'] > '0') {
+                                               if ($content['admin_id'] > 0) {
                                                        // Load admin's email address for contact
                                                        $content['email'] = getAdminEmail($content['admin_id']);
                                                } // END - if
@@ -92,7 +92,7 @@ ORDER BY sp.pay_name",
                                                $data = array(
                                                        'admin_id'   => $content['email'],
                                                        'order' => ($content['pay_count'] * $content['pay_rate'])." ".$content['pay_currency'],
-                                                       'stamp' => generateDateTime($content['pay_ordered'], '2'),
+                                                       'stamp' => generateDateTime($content['pay_ordered'], 2),
                                                        'pname' => $content['pay_name'],
                                                );
 
@@ -136,18 +136,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
@@ -197,7 +197,7 @@ if (SQL_NUMROWS($result) > 0) {
                        'family'  => $content['family'],
                        'email'   => generateEmailLink($content['email'], 'sponsor_data'),
                        'remote'  => $content['remote_addr'],
-                       'created' => generateDateTime($content['sponsor_created'], '2'),
+                       'created' => generateDateTime($content['sponsor_created'], 2),
                );
 
                // Load row template and switch colors