'.$sm['lang'][903]['text'].'
'.$sm['lang'][900]['text'].'
'.$sm['config']['site_url'].'ref/'.$sm['user']['username'].'
'.$sm['lang'][901]['text'].''.$sm['lang'][902]['text'].'
';
$ref = getArray('referrals','WHERE ref_status = 1','ref_amount ASC');
$a = 0;
foreach ($ref as $r) {
$a++;
$delay = $a * 50;
$credits = 'credits';
$pos = strpos($r['ref_reward'], $credits);
$langTextId = getData('referrals_config','action_lang_id','WHERE action_val ="'.$r['ref_type'].'"');
$package = '';
if($langTextId == 904){
$i = substr($r['ref_type'], -1);
$i = $i-1;
$package = '
('.$sm['creditsPackages'][$i]['credits'].' '.$sm['lang'][73]['text'].')';
}
if($langTextId == 906){
$i = substr($r['ref_type'], -1);
$i = $i-1;
$package = '
('.$sm['premiumPackages'][$i]['days'].' '.$sm['lang'][332]['text'].')';
}
if ($pos == true) {
$return.='
'.$sm['lang'][897]['text'].' '.$r['ref_amount'].' '.$sm['lang'][73]['text'].' '.$sm['lang'][898]['text'].' '.$sm['lang'][$langTextId]['text'].' '.$package.'.
'.$r['ref_amount'].'
';
} else {
$return.='
'.$sm['lang'][897]['text'].' '.$r['ref_amount'].' '.$sm['lang'][332]['text'].' '.$sm['lang'][898]['text'].' '.$sm['lang'][$langTextId]['text'].' '.$package.'.
'.$r['ref_amount'].'
';
}
}
$return.='