return;
} // END - if
-$result_depths = SQL_QUERY("SELECT level, percents FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
+$result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
$totalPoints = 0;
while ($content = SQL_FETCHARRAY($result_depths)) {
// Load referal points
// Free result
SQL_FREERESULT($result_points);
-}
+} // END - while
// Free memory
SQL_FREERESULT($result_depths);
if (!isGetRequestElementSet('payout')) {
// Load payout types
- $result = SQL_QUERY_ESC("SELECT id, type, rate, min_points, allow_url
-FROM `{?_MYSQL_PREFIX?}_payout_types`
-WHERE %s >= min_points
-ORDER BY type ASC",
+ $result = SQL_QUERY_ESC("SELECT
+ `id`, `type`, `rate`, `min_points`, `allow_url`
+FROM
+ `{?_MYSQL_PREFIX?}_payout_types`
+WHERE
+ %s >= `min_points`
+ORDER BY
+ `type` ASC",
array($totalPoints), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Free memory
// Output payout list
outputPayoutList($totalPoints);
+ } else {
+ // No payout types setup
+ loadTemplate('admin_settings_saved', false, geMessage('PAYOUT_NO_PAYOUT_TYPES'));
}
} else {
// Chedk if he can get paid by selected type