X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Frefback_functions.php;h=78ad023fc754457c85db26969d3f8f7fa2a9819a;hb=5fa8c7bab284e1549611b733d09364c39a437e2d;hp=349decbc35ff85cc55cb9086091c59c35061311b;hpb=6f89f62b93d13d53d21aba27793ed283e735f410;p=mailer.git diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 349decbc35..78ad023fc7 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -1,7 +1,7 @@ ".__LINE__."):userid={$userid},ref={$ref},level={$content['level']},points={$points}
"); + //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):userid={$userid},ref={$ref},level={$content['level']},points={$points}
"); foreach (getArrayFromRefbackLevel($userid, $content['level']) as $refid) { // Skip level zero or if both are the same if ($userid == $refid) continue; // Get refback percents $percents = getRefbackPercents($userid, $refid); - //* DEBUG: */ print(__FUNCTION__."(".__LINE__."):userid={$userid},ref={$ref},refid={$refid},points={$points},percents={$percents}
"); + //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):userid={$userid},ref={$ref},refid={$refid},points={$points},percents={$percents}
"); // Some percents given? if ($percents > 0) { - //* DEBUG: */ print(__FUNCTION__."(".__LINE__."):points={$points},perc={$content['percents']},percents={$percents},level={$content['level']}
"); + //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):points={$points},perc={$content['percents']},percents={$percents},level={$content['level']}
"); // Calculate points for refback $refback = $points * ($content['percents'] / 100) * ($percents / 100); // Update refback table ('refid' and 'userid' must be exchanged!) SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_refs` SET `points`=`points`+%s WHERE `userid`=%s AND `refid`=%s LIMIT 1", array($refback, $refid, $userid), __FUNCTION__, __LINE__); - //* DEBUG: */ print(__FUNCTION__."(".__LINE__."):refback={$refback},userid={$userid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")
"); + //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):refback={$refback},userid={$userid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")
"); // Add points again, but only directly - //* DEBUG: */ print(__FUNCTION__."(".__LINE__."):refback={$refback}
"); + //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):refback={$refback}
"); addPointsDirectly(sprintf("refback:%s", $refid), $userid, $refback); // Reduce points if refid is found if ($refid == $ref) { // Reduce points here! $return = $points * ($content['percents'] / 100) - $refback; - //* DEBUG: */ print(__FUNCTION__."(".__LINE__."):points={$return} - REDUCED
"); + //* DEBUG: */ print(__FUNCTION__ . '(' . __LINE__."):points={$return} - REDUCED
"); } // END - if } // END - if } // END foreach @@ -109,7 +109,7 @@ function addRefbackPoints ($userid, $ref, $points, $ref_points) { // "Getter" for refback percents function getRefbackPercents ($userid, $ref) { //* DEBUG: */ print("----------------------- ".__FUNCTION__." - ENTRY ------------------------