// On ajoute la modification dans le LOG $holiday->addLogCP($user->id, $userCP, $holiday->getNameEventCp($event), $new_holiday); $holiday->updateSoldeCP($userCP, $new_holiday); setEventMessage($langs->trans('AddEventToUserOkCP')); } } $langs->load('users'); $var = true; $i = 0; $cp_events = $holiday->fetchEventsCP(); if ($cp_events == 1) { print '<br><form method="POST" action="' . $_SERVER["PHP_SELF"] . '">' . "\n"; print '<input type="hidden" name="action" value="add_event" />'; print_fiche_titre($langs->trans('DefineEventUserCP'), '', ''); print $langs->trans('MotifCP') . ' : '; print $holiday->selectEventCP(); print ' ' . $langs->trans('UserCP') . ' : '; print $form->select_dolusers('', "userCP", 1, "", 0, ''); print ' <input type="submit" value="' . $langs->trans("addEventToUserCP") . '" name="bouton" class="button"/>'; print '</form><br>'; } print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">' . "\n"; print '<input type="hidden" name="action" value="update" />'; print '<table class="noborder" width="100%;">'; print "<tr class=\"liste_titre\">"; print '<td width="55%">' . $langs->trans('Employee') . '</td>'; print '<td width="20%" style="text-align:center">' . $langs->trans('Available') . '</td>'; print '<td width="20%" style="text-align:center">' . $langs->trans('Note') . '</td>'; print '<td></td>'; print '</tr>'; foreach ($listUsers as $users) {