} } if ($rep_type != 0) { $reps = mrbsGetRepeatEntryList($starttime, isset($rep_enddate) ? $rep_enddate : 0, $rep_type, $rep_opt, $max_rep_entrys, $rep_num_weeks, $rep_jour_c, $area, $rep_month_abs1, $rep_month_abs2); } $repeat_id = 0; if (isset($id) && $id != 0) { $ignore_id = $id; $repeat_id = grr_sql_query1('SELECT repeat_id FROM ' . TABLE_PREFIX . "_entry WHERE id={$id}"); if ($repeat_id < 0) { $repeat_id = 0; } } else { $ignore_id = 0; } if (!grr_sql_mutex_lock('' . TABLE_PREFIX . '_entry')) { fatal_error(1, get_vocab('failed_to_acquire')); } $date_now = time(); $error_booking_in_past = 'no'; $error_booking_room_out = 'no'; $error_duree_max_resa_area = 'no'; $error_delais_max_resa_room = 'no'; $error_delais_min_resa_room = 'no'; $error_date_option_reservation = 'no'; $error_chevaussement = 'no'; $error_qui_peut_reserver_pour = 'no'; $error_heure_debut_fin = 'no'; foreach ($_GET['rooms'] as $room_id) { if ($rep_type != 0 && !empty($reps)) { $diff = $endtime - $starttime;
# Expand a series into a list of start times: if ($rep_type != 0) // $reps est un tableau des dates de début de réservation $reps = mrbsGetRepeatEntryList($starttime, isset($rep_enddate) ? $rep_enddate : 0, $rep_type, $rep_opt, $max_rep_entrys, $rep_num_weeks,$rep_jour_c,$area); # When checking for overlaps, for Edit (not New), ignore this entry and series: $repeat_id = 0; if (isset($id) and ($id!=0)) { $ignore_id = $id; $repeat_id = grr_sql_query1("SELECT repeat_id FROM ".TABLE_PREFIX."_entry WHERE id=$id"); if ($repeat_id < 0) $repeat_id = 0; } else $ignore_id = 0; # Acquire mutex to lock out others trying to book the same slot(s). if (!grr_sql_mutex_lock("".TABLE_PREFIX."_entry")) fatal_error(1, get_vocab('failed_to_acquire')); $date_now = mktime(); $error_booking_in_past = 'no'; $error_booking_room_out = 'no'; $error_duree_max_resa_area = 'no'; $error_delais_max_resa_room = 'no'; $error_delais_min_resa_room = 'no'; $error_date_option_reservation = 'no'; $error_chevaussement = 'no'; $error_qui_peut_reserver_pour = 'no'; $error_heure_debut_fin = 'no'; foreach ( $_GET['rooms'] as $room_id ) { # On verifie qu'aucune réservation ne se situe dans la passé