getUserArray($id,1); if($id && $user){ $now = time(); $prot = (int)$user['protect']; $isActive = $prot > $now; $ends = $isActive ? date('d.m.Y H:i', $prot) : 'Expired'; $left = $isActive ? ceil(($prot - $now)/86400) : 0; ?>