-define('__BEG_POINTS' , TRANSLATE_COMMA($_CONFIG['beg_points']));
-define('__BEG_POINTS_MAX', TRANSLATE_COMMA($_CONFIG['beg_points_max']));
-if ($GLOBALS['refid'] > 0) {
- // Take referral ID from URL/Cookie
- define('__BEG_UID' , $GLOBALS['refid']);
-} else {
- // Take default referral ID
- define('__BEG_UID' , $_CONFIG['def_refid']);
-}
+$content['points'] = translateComma(getConfig('beg_points'));
+$content['points_max'] = translateComma(getConfig('beg_points_max'));
+$content['userid'] = determineReferalId();