} // END - if
$result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
-$totalPoints = 0;
+$totalPoints = '0';
while ($content = SQL_FETCHARRAY($result_depths)) {
// Load referal points
$result_points = SQL_QUERY_ESC("SELECT `points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
// Calculate maximum value
$max = round($totalPoints * $content['rate'] - 0.5);
- $PAY_MAX = 0;
+ $PAY_MAX = '0';
// Calulcate points from submitted amount
- $points = 0;
+ $points = '0';
if (isPostRequestElementSet('payout')) {
$points = bigintval(postRequestElement('payout')) / $content['rate'];
$PAY_MAX = $max / $content['rate'];