Code:
if(empty($paid)){
if(isset($users_credits)){
if($credits > $users_credits){
$errors[] = 'Not enough credits for this action. Visit credits page from your profile to charge up your account!';
}
} else {
$errors[] = 'You need to login before you can watch this video';
}
}
also..
Code:
$smarty->assign('paid', !empty($paid)?$paid:false);