]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-unlock_sponsor.php
Even more array-element names fixed
[mailer.git] / inc / modules / admin / what-unlock_sponsor.php
index 06d20c510f98cfa790f06175b321280fb2465e49..5fde9c55716ff78d64781184eecdb0e2261f78d8 100644 (file)
@@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__);
 // Check if admin has submitted form
 if (isFormSent()) {
        // Does he have selected at least one sponsor?
-       if (countSelection(postRequestParameter('id')) > 0) {
+       if (ifPostContainsSelections('id')) {
                // At least one entry selected
                foreach (postRequestParameter('id') as $id => $selected) {
                        // Secure id number and init $content
@@ -87,7 +87,7 @@ WHERE
 ORDER BY
        sp.pay_name ASC",
                                        array($content['id']), __FILE__, __LINE__);
-                               if (SQL_NUMROWS($result) > 0) {
+                               if (!SQL_HASZERONUMS($result)) {
                                        // Payment does exist
                                        while ($content2 = SQL_FETCHARRAY($result)) {
                                                // Merge both arrays
@@ -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
@@ -196,7 +196,7 @@ WHERE
 ORDER BY
        `id`", __FILE__, __LINE__);
 
-if (SQL_NUMROWS($result) > 0) {
+if (!SQL_HASZERONUMS($result)) {
        // Entries found so let's list them!
        $OUT = '';
        while ($content = SQL_FETCHARRAY($result)) {