// Propagation aux autres jours
if (CValue::post("propagate")) {
    $days = array();
    $date = CValue::getOrSession("date", CMbDT::date());
    $monday = CMbDT::date("last monday", CMbDT::date("+1 day", $date));
    foreach (CValue::post("_days") as $_number) {
        $days[] = CMbDT::date("+{$_number} DAYS", $monday);
    }
}
$elts_id = explode("|", $event_ids);
foreach ($days as $day) {
    foreach ($elts_id as $_elt_id) {
        $evenement = new CEvenementSSR();
        $evenement->load($_elt_id);
        $evenement->loadRefsActesCdARR();
        $evenement->loadRefsActesCsARR();
        // Duplication de l'événement
        $evenement->_id = "";
        $evenement->realise = 0;
        $evenement->annule = 0;
        $evenement->debut = $day ? "{$day} " . CMbDT::time($evenement->debut) : CMbDT::dateTime($period, $evenement->debut);
        // Cas des séances collectives
        if ($evenement->seance_collective_id) {
            CAppUI::displayMsg("Impossible de dupliquer des événements qui sont dans des seances collectives", "CEvenementSSR-msg-create");
            continue;
        }
        // Autres rééducateurs
        global $can;
        $user = CAppUI::$user;
        $therapeute = $evenement->loadRefTherapeute();
        if ($therapeute->function_id != $user->function_id && !$can->admin) {