<?
switch ($sub) {
    case 'kinderbonus':
        include('addpoints_kinderbonus.php');
        break;
    case 'kinderuntersuchung':
        $user = new user(0,$userId);
        $timestamp5yearsago = strtotime("5 years ago", strtotime("today"));
        $date5yearsago = date('Y-m-d', $timestamp5yearsago);
        if ($user->checklegalage()) {
            include('addpoints_kinderuntersuchung.php');
        } else {
            if ($user->geburtsdatum <= date('Y-m-d', $timestamp5yearsago)) {
                include('addpoints_kinderuntersuchung_u18.php');
            }
        }
        break;
    default:
        include('addpoints_normal.php');
        break;
}
?>
