X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Frefback_functions.php;h=f8d2ba7155dcaa961b58e3bc164eedc6f7717bf5;hb=4cf6094cc3cbebfda691fa797e00fe674bbb329c;hp=5938bd79bf606dc7c665036ac70e95576c11ccb8;hpb=ed3a88c0334600c7d7246480008c79716aa3f80b;p=mailer.git diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index 5938bd79bf..f8d2ba7155 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -50,7 +50,7 @@ function addRefbackPoints ($userid, $ref, $points, $ref_points) { $return = $ref_points; // Get all ref levels - $result_refs = SQL_QUERY('SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level` > 0 ORDER BY `level` ASC', + $result_refs = SQL_QUERY('SELECT `level`,`percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level` > 0 ORDER BY `level` ASC', __FUNCTION__, __LINE__); // "Walk" through all level @@ -274,7 +274,7 @@ function getArrayFromUserRefbackData ($id) { $id = bigintval($id); // Get entry from database - $result = SQL_QUERY_ESC("SELECT `id`, `userid`, `refid`, `refback_percents`, `level`, `refback_points` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `id`=%s AND `userid`=%s LIMIT 1", + $result = SQL_QUERY_ESC("SELECT `id`,`userid`,`refid`,`refback_percents`,`level`,`refback_points` FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `id`=%s AND `userid`=%s LIMIT 1", array($id, getMemberId()), __FUNCTION__, __LINE__); // Is there an entry? @@ -313,10 +313,10 @@ function updateMemberRefbackPercents ($id, $percents, $note) { } // Get ref entry - $dummy = getArrayFromUserRefbackData($id); + $content = getArrayFromUserRefbackData($id); // Is this valid? - if (count($dummy) == 0) { + if (count($content) == 0) { // id does not belong to user! $status['message'] = 'MEMBER_REFBACK_ERROR_ID_MISMATCH'; return $status; @@ -341,17 +341,17 @@ function updateMemberRefbackPercents ($id, $percents, $note) { } // END - if // Prepare email content - $dummy['refback_percents'] = $percents; - $dummy['refback_note'] = $note; + $content['refback_percents'] = $percents; + $content['refback_note'] = $note; // Load member email template - $mail = loadEmailTemplate('member_refback', $dummy, $dummy['refid']); + $mail = loadEmailTemplate('member_refback', $content, $content['refid']); // Send email to user - sendEmail($dummy['refid'], '{--MEMBER_REFBACK_SUBJECT--}', $mail); + sendEmail($content['refid'], '{--MEMBER_REFBACK_SUBJECT--}', $mail); // Send admin notification - sendAdminNotification('{--ADMIN_REFBACK_SUBJECT--}', 'admin_refback', $dummy, $dummy['refid']); + sendAdminNotification('{--ADMIN_REFBACK_SUBJECT--}', 'admin_refback', $content, $content['refid']); // All fine! $status['ok'] = true;