if (empty($date_debut)) { header('Location: fiche.php?action=request&error=nodatedebut'); exit; } // Si pas de date de fin if (empty($date_fin)) { header('Location: fiche.php?action=request&error=nodatefin'); exit; } // Si date de début après la date de fin if ($date_debut > $date_fin) { header('Location: fiche.php?action=request&error=datefin'); exit; } // Check if there is already holiday for this period $verifCP = $cp->verifDateHolidayCP($userID, $date_debut, $date_fin, $halfday); if (!$verifCP) { header('Location: fiche.php?action=request&error=alreadyCP'); exit; } // Si aucun jours ouvrés dans la demande $nbopenedday = num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); if ($nbopenedday < 1) { header('Location: fiche.php?action=request&error=DureeHoliday'); exit; } // Si pas de validateur choisi if ($valideur < 1) { header('Location: fiche.php?action=request&error=Valideur'); exit; }