if($refbalance > 0) {
$data['paid'] = '
'.htmlspecialchars($reward).' '.$unit.' + '.htmlspecialchars($refbalance).' '.$unit.' for referrals was sent to
Code:after it.
This still doesn't works

Hmm, ok, next try - please find:
break; case "paid":
echo $data["paid"];
in your template index.php file, and after that "echo" please add:
so that part of code after change would be:
break; case "paid":
echo $data["paid"];
?>
break; case "eligible":