Ejemplo n.º 1
0
// de configuration hours_start et hours_stop
$hours = CPlageconsult::$hours;
$min_hour = sprintf("%01d", CMbDT::transform($min, null, "%H"));
$max_hour = sprintf("%01d", CMbDT::transform($max, null, "%H"));
if (!isset($hours[$min_hour])) {
    for ($i = $min_hour; $i < CPlageconsult::$hours_start; $i++) {
        $hours[$i] = sprintf("%02d", $i);
    }
}
if (!isset($hours[$max_hour])) {
    for ($i = CPlageconsult::$hours_stop + 1; $i < $max_hour + 1; $i++) {
        $hours[$i] = sprintf("%02d", $i);
    }
}
// Vérifier le droit d'écriture sur la plage sélectionnée
$plageSel->canDo();
ksort($hours);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("_firstconsult_time", $_firstconsult_time);
$smarty->assign("_lastconsult_time", $_lastconsult_time);
$smarty->assign("plageconsult_id", $plageconsult_id);
$smarty->assign("user", CMediusers::get());
$smarty->assign("chirSel", $chirSel);
$smarty->assign("plageSel", $plageSel);
$smarty->assign("listChirs", $listChirs);
$smarty->assign("pause", $pause);
$smarty->assign("debut", $date);
$smarty->assign("listDaysSelect", $listDaysSelect);
$smarty->assign("holidays", $holidays);
$smarty->assign("listHours", $hours);