if (array_key_exists($curr_plage->chir_id, $listPermPrats)) { $listPrats[$curr_plage->chir_id] = $listPermPrats[$curr_plage->chir_id]; } } $opsJour = new COperation(); $where = array(); $where["date"] = "= '{$date}'"; $groupby = "chir_id"; $opsJour = $opsJour->loadList($where, null, null, $groupby); foreach ($opsJour as $curr_op) { if (array_key_exists($curr_op->chir_id, $listPermPrats)) { $listPrats[$curr_op->chir_id] = $listPermPrats[$curr_op->chir_id]; } } $listPrats = CMbArray::pluck($listPrats, "_view"); asort($listPrats); // Selection des plages opératoires de la journée $praticien = new CMediusers(); if ($praticien->load(CValue::getOrSession("praticien_id"))) { $praticien->loadRefsForDay($date); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("vueReduite", false); $smarty->assign("praticien", $praticien); $smarty->assign("salle", new CSalle()); $smarty->assign("listBlocs", $listBlocs); $smarty->assign("listPrats", $listPrats); $smarty->assign("date", $date); $smarty->assign("operation_id", $operation_id); $smarty->display("inc_liste_op_prat.tpl");