if (!$error) { // Mise à jour des congés de l'utilisateur $update = $cp->updateEventCP($eventId, $eventName, $eventValue); if (!$update) { $message = 'ErrorUpdateEventCP'; } else { $message = 'UpdateEventOkCP'; } } else { $message = 'ErrorUpdateEventCP'; } dol_htmloutput_mesg($message); } elseif ($action && isset($_POST['delete_event'])) { $eventId = array_keys($_POST['delete_event']); $eventId = $eventId[0]; $result = $cp->deleteEventCP($eventId); if ($result) { print '<div class="tabBar">'; print $langs->trans('DeleteEventOkCP'); print '</div>'; } else { print '<div class="tabBar">'; print $langs->trans('ErrorDeleteEventCP'); print '</div>'; } } print '<br>'; print_fiche_titre($langs->trans('TitleOptionMainCP'), '', ''); dol_fiche_head(array(), '', ''); print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?leftmenu=setup" name="config">' . "\n"; print '<input type="hidden" name="action" value="add" />' . "\n";