]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/rallye_functions.php
Extension ext-network continued:
[mailer.git] / inc / libs / rallye_functions.php
index 11bb77c79036733fc82f1f22c378dd593a5709b1..ae706217491ef433e3b25e4ae2d24d537d6bedc2 100644 (file)
@@ -174,7 +174,7 @@ WHERE
 function addReferralRallyePrices ($rallye, $mode = 'email') {
        // Output mode
        switch($mode) {
-               case 'email': $mode = chr(10);  break;
+               case 'email': $mode = PHP_EOL;  break;
                case 'html' : $mode = '<br />'; break;
        } // END - switch
 
@@ -195,7 +195,7 @@ ORDER BY
        if (!SQL_HASZERONUMS($result_prices)) {
                // Load prices
                $prices = '';
-               if ($mode == chr(10)) {
+               if ($mode == PHP_EOL) {
                        $prices = '{--RALLYE_MEMBER_PRICES_ADDED--}:' . $mode . '------------------------------' . $mode;
                } // END - if
 
@@ -217,7 +217,7 @@ ORDER BY
        }
 
        // Add last line for email mode
-       if ($mode == chr(10)) {
+       if ($mode == PHP_EOL) {
                $prices .= '------------------------------';
        } // END - if
 
@@ -470,7 +470,7 @@ function getTotalRallyeWinners ($rallyeId) {
 
                        // Allow valid and active users with at least one ref
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'rallyeId=' . $rallyeId . ',userid=' . $userid . ',ref=' . $prices['ref'][$key] . ',cpoints=' . $prices['cpoints'][$key]);
-                       if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
+                       if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
                                $GLOBALS[__FUNCTION__][$rallyeId]++;
                        } // END - if
                } // END - foreach
@@ -511,7 +511,7 @@ function stopRallyeByResult ($result) {
                $prices['active'][$key] = $active;
 
                // Allow valid and active users with at least one ref to get points
-               if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
+               if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($active == 1) && ($prices['cpoints'][$key] > 0)) {
                        $total++;
                } // END - if
        } // END - foreach
@@ -529,7 +529,7 @@ function stopRallyeByResult ($result) {
        // Run array through (by userid is the most important 2nd-level-array)
        foreach ($prices['userid'] as $key => $userid) {
                // Allow valid and active users with at least one ref to get points
-               if ((isValidUserId($userid)) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) {
+               if ((isValidId($userid)) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0)) {
                        // Transfer data to array for the mail template
                        $content['level']  = $prices['level'][$key];
                        $content['points'] = $prices['points'][$key];