-ADD_DESCR("member", basename(__FILE__));
-
-$result_depths = SQL_QUERY("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths ORDER BY level", __FILE__, __LINE__);
-$TPTS = 0;
-while (list($lvl, $per) = SQL_FETCHROW($result_depths))
-{
- // Load referral points
- $result_points = SQL_QUERY_ESC("SELECT points FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s AND ref_depth=%d LIMIT 1",
- array($GLOBALS['userid'], bigintval($lvl)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_points) == 1)
- {
- list($points) = SQL_FETCHROW($result_points);
- SQL_FREERESULT($result_points);
- $TPTS += $points;
- }
-}