]> git.mxchange.org Git - mailer.git/blobdiff - inc/referral-functions.php
Admin menu has now a JavaScript "effect":
[mailer.git] / inc / referral-functions.php
index 75945480cb6b50dd48fa3aa101271fc5be606670..7cc8b6468d5570a83d3d68a7d99cd1e207be46bd 100644 (file)
@@ -176,17 +176,17 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU
 
                        // Prepare data for the filter
                        $filterData = array(
-                               'subject'    => $subject,
-                               'userid'     => $userid,
-                               'points'     => $points,
-                               'ref_points' => $ref_points,
-                               'column'     => $pointsColumn,
-                               'notify'     => $sendNotify,
-                               'refid'      => $refid,
-                               'locked'     => $locked,
-                               'mode'       => 'add',
-                               'add_mode'   => $paymentMethod,
-                               'added'      => $added
+                               'subject'     => $subject,
+                               'userid'      => $userid,
+                               'points'      => $points,
+                               'ref_points'  => $ref_points,
+                               'column'      => $pointsColumn,
+                               'notify'      => $sendNotify,
+                               'refid'       => $refid,
+                               'locked'      => $locked,
+                               'points_mode' => 'add',
+                               'add_mode'    => $paymentMethod,
+                               'added'       => $added
                        );
 
                        // Filter it now
@@ -326,11 +326,11 @@ function subtractPoints ($subject, $userid, $points) {
 
        // Prepare filter data
        $filterData = array(
-               'subject' => $subject,
-               'userid'  => $userid,
-               'points'  => $points,
-               'mode'    => 'sub',
-               'added'   => (!SQL_HASZEROAFFECTED())
+               'subject'     => $subject,
+               'userid'      => $userid,
+               'points'      => $points,
+               'points_mode' => 'sub',
+               'added'       => (!SQL_HASZEROAFFECTED())
        );
 
        // Insert booking record
@@ -382,7 +382,7 @@ ORDER BY
                                $row['click_rate'] = ($row['mails_confirmed'] / $row['emails_received'] * 100);
                        } // END - if
 
-                       // Activity is 'active' by default because if autopurge is not installed
+                       // Activity is 'active' by default because if ext-autopurge is not installed
                        $row['activity'] = '{--MEMBER_ACTIVITY_ACTIVE--}';
 
                        // Is autopurge installed and the user inactive?
@@ -438,7 +438,7 @@ function getPointsDataArrayFromSubject ($subject) {
                $pointsData = SQL_FETCHARRAY($result);
 
                // Add all entries to our cache array
-               foreach ($pointsData as $key=>$value) {
+               foreach ($pointsData as $key => $value) {
                        $GLOBALS['cache_array']['points_data'][$subject][$key] = $value;
                } // END - foreach
        } else {
@@ -577,7 +577,7 @@ function addMissingReferralLevels ($userid) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',count()=' . count($GLOBALS['referral_refid'][$userid]));
 
        // Now walk through the array, first levels
-       foreach ($GLOBALS['referral_refid'][$userid] as $level=>$levelArray) {
+       foreach ($GLOBALS['referral_refid'][$userid] as $level => $levelArray) {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',count()=' . count($levelArray));
                // Next are the users
                foreach ($levelArray as $refid) {
@@ -586,7 +586,7 @@ function addMissingReferralLevels ($userid) {
                        if (isset($GLOBALS['referral_refid'][$refid])) {
                                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refid=' . makeNullToZero($refid) . ',count()=' . count($GLOBALS['referral_refid'][$refid]));
                                // Okay, then walk through here, too
-                               foreach ($GLOBALS['referral_refid'][$refid] as $refLevel=>$refArray) {
+                               foreach ($GLOBALS['referral_refid'][$refid] as $refLevel => $refArray) {
                                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refid=' . makeNullToZero($refid) . ',refLevel=' . $refLevel . ',count()=' . count($refArray));
                                        // Also walk through this one
                                        foreach ($refArray as $refRefid) {
@@ -629,7 +629,7 @@ function flushReferralTableToDatabase ($userid) {
        $executeSql = false;
 
        // Now walk through the array, first levels
-       foreach ($GLOBALS['referral_refid'][$userid] as $level=>$levelArray) {
+       foreach ($GLOBALS['referral_refid'][$userid] as $level => $levelArray) {
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',count()=' . count($levelArray));
                // Next are the users
                foreach ($levelArray as $refid) {