function form_saisie($action, $new_mois, $new_year) { $PHP_SELF = $_SERVER['PHP_SELF']; $session = session_id(); header_popup(); if ($action == "imprim") { ouvre_calendrier($new_mois, $new_year); } echo "<center>\n"; echo "<h3>" . _('imprim_calendrier_titre') . "</h3>\n"; echo "<form action=\"{$PHP_SELF}?session={$session}\" method=\"POST\">\n"; echo "<table>\n"; // choix du mois et annee echo "<tr>\n"; echo "<td align=\"center\">\n"; echo "<b>" . _('divers_mois') . " : </b>\n"; $mois_default = date("m"); affiche_selection_new_mois($mois_default); // la variable est $new_mois echo "</td>\n"; echo "<td align=\"center\">\n"; echo "<b>" . _('divers_annee') . " : </b>\n"; $year_default = date("Y"); affiche_selection_new_year($year_default - 5, $year_default + 5, $year_default); // la variable est $new_year echo "</td>\n"; echo "</tr>\n"; // ligne vide echo "<tr>\n"; echo "<td colspan=\"2\"> \n"; echo "</td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td colspan=\"2\" align=\"center\">\n"; echo "\t<input type=\"hidden\" name=\"action\" value=\"imprim\">\n"; echo "\t<input type=\"submit\" value=\"" . _('form_submit') . "\">\n"; echo "</td>\n"; echo "</tr>\n"; echo "<tr>\n"; echo "<td colspan=\"2\" align=\"center\">\n"; echo "\t<input type=\"button\" value=\"" . _('form_close_window') . "\" onClick=\"javascript:window.close();\">\n"; echo "</td>\n"; echo "</tr>\n"; echo "</table>\n"; echo "</form>\n"; bottom(); }
public static function saisie_jours_absence_temps_partiel($login) { $return = ''; /* initialisation des variables **************/ $checked_option_sem_imp_lu_am = ''; $checked_option_sem_imp_lu_pm = ''; $checked_option_sem_imp_ma_am = ''; $checked_option_sem_imp_ma_pm = ''; $checked_option_sem_imp_me_am = ''; $checked_option_sem_imp_me_pm = ''; $checked_option_sem_imp_je_am = ''; $checked_option_sem_imp_je_pm = ''; $checked_option_sem_imp_ve_am = ''; $checked_option_sem_imp_ve_pm = ''; $checked_option_sem_imp_sa_am = ''; $checked_option_sem_imp_sa_pm = ''; $checked_option_sem_imp_di_am = ''; $checked_option_sem_imp_di_pm = ''; $checked_option_sem_p_lu_am = ''; $checked_option_sem_p_lu_pm = ''; $checked_option_sem_p_ma_am = ''; $checked_option_sem_p_ma_pm = ''; $checked_option_sem_p_me_am = ''; $checked_option_sem_p_me_pm = ''; $checked_option_sem_p_je_am = ''; $checked_option_sem_p_je_pm = ''; $checked_option_sem_p_ve_am = ''; $checked_option_sem_p_ve_pm = ''; $checked_option_sem_p_sa_am = ''; $checked_option_sem_p_sa_pm = ''; $checked_option_sem_p_di_am = ''; $checked_option_sem_p_di_pm = ''; /*********************************************/ // recup des données de la dernière table artt du user : $sql1 = 'SELECT * FROM conges_artt WHERE a_login="******" AND a_date_fin_grille=\'9999-12-31\' '; $ReqLog1 = \includes\SQL::query($sql1); while ($resultat1 = $ReqLog1->fetch_array()) { if ($resultat1['sem_imp_lu_am'] == 'Y') { $checked_option_sem_imp_lu_am = ' checked'; } if ($resultat1['sem_imp_lu_pm'] == 'Y') { $checked_option_sem_imp_lu_pm = ' checked'; } if ($resultat1['sem_imp_ma_am'] == 'Y') { $checked_option_sem_imp_ma_am = ' checked'; } if ($resultat1['sem_imp_ma_pm'] == 'Y') { $checked_option_sem_imp_ma_pm = ' checked'; } if ($resultat1['sem_imp_me_am'] == 'Y') { $checked_option_sem_imp_me_am = ' checked'; } if ($resultat1['sem_imp_me_pm'] == 'Y') { $checked_option_sem_imp_me_pm = ' checked'; } if ($resultat1['sem_imp_je_am'] == 'Y') { $checked_option_sem_imp_je_am = ' checked'; } if ($resultat1['sem_imp_je_pm'] == 'Y') { $checked_option_sem_imp_je_pm = ' checked'; } if ($resultat1['sem_imp_ve_am'] == 'Y') { $checked_option_sem_imp_ve_am = ' checked'; } if ($resultat1['sem_imp_ve_pm'] == 'Y') { $checked_option_sem_imp_ve_pm = ' checked'; } if ($resultat1['sem_imp_sa_am'] == 'Y') { $checked_option_sem_imp_sa_am = ' checked'; } if ($resultat1['sem_imp_sa_pm'] == 'Y') { $checked_option_sem_imp_sa_pm = ' checked'; } if ($resultat1['sem_imp_di_am'] == 'Y') { $checked_option_sem_imp_di_am = ' checked'; } if ($resultat1['sem_imp_di_pm'] == 'Y') { $checked_option_sem_imp_di_pm = ' checked'; } if ($resultat1['sem_p_lu_am'] == 'Y') { $checked_option_sem_p_lu_am = ' checked'; } if ($resultat1['sem_p_lu_pm'] == 'Y') { $checked_option_sem_p_lu_pm = ' checked'; } if ($resultat1['sem_p_ma_am'] == 'Y') { $checked_option_sem_p_ma_am = ' checked'; } if ($resultat1['sem_p_ma_pm'] == 'Y') { $checked_option_sem_p_ma_pm = ' checked'; } if ($resultat1['sem_p_me_am'] == 'Y') { $checked_option_sem_p_me_am = ' checked'; } if ($resultat1['sem_p_me_pm'] == 'Y') { $checked_option_sem_p_me_pm = ' checked'; } if ($resultat1['sem_p_je_am'] == 'Y') { $checked_option_sem_p_je_am = ' checked'; } if ($resultat1['sem_p_je_pm'] == 'Y') { $checked_option_sem_p_je_pm = ' checked'; } if ($resultat1['sem_p_ve_am'] == 'Y') { $checked_option_sem_p_ve_am = ' checked'; } if ($resultat1['sem_p_ve_pm'] == 'Y') { $checked_option_sem_p_ve_pm = ' checked'; } if ($resultat1['sem_p_sa_am'] == 'Y') { $checked_option_sem_p_sa_am = ' checked'; } if ($resultat1['sem_p_sa_pm'] == 'Y') { $checked_option_sem_p_sa_pm = ' checked'; } if ($resultat1['sem_p_di_am'] == 'Y') { $checked_option_sem_p_di_am = ' checked'; } if ($resultat1['sem_p_di_pm'] == 'Y') { $checked_option_sem_p_di_pm = ' checked'; } $date_deb_grille = $resultat1['a_date_debut_grille']; $date_fin_grille = $resultat1['a_date_fin_grille']; } $return .= '<h4>' . _('admin_temps_partiel_titre') . ' :</h4>'; $return .= '<table class="table table-hover table-responsive table-condensed table-striped">'; $return .= '<tr>'; $return .= '<td>'; //tableau semaines impaires $return .= '<b><u>' . _('admin_temps_partiel_sem_impaires') . ' :</u></b><br>'; $tab_checkbox_sem_imp = array(); $imp_lu_am = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_lu_am]" value="Y" ' . $checked_option_sem_imp_lu_am . '>'; $imp_lu_pm = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_lu_pm]" value="Y" ' . $checked_option_sem_imp_lu_pm . '>'; $imp_ma_am = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_ma_am]" value="Y" ' . $checked_option_sem_imp_ma_am . '>'; $imp_ma_pm = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_ma_pm]" value="Y" ' . $checked_option_sem_imp_ma_pm . '>'; $imp_me_am = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_me_am]" value="Y" ' . $checked_option_sem_imp_me_am . '>'; $imp_me_pm = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_me_pm]" value="Y" ' . $checked_option_sem_imp_me_pm . '>'; $imp_je_am = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_je_am]" value="Y" ' . $checked_option_sem_imp_je_am . '>'; $imp_je_pm = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_je_pm]" value="Y" ' . $checked_option_sem_imp_je_pm . '>'; $imp_ve_am = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_ve_am]" value="Y" ' . $checked_option_sem_imp_ve_am . '>'; $imp_ve_pm = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_ve_pm]" value="Y" ' . $checked_option_sem_imp_ve_pm . '>'; if ($_SESSION['config']['samedi_travail']) { $imp_sa_am = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_sa_am]" value="Y" ' . $checked_option_sem_imp_sa_am . '>'; $imp_sa_pm = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_sa_pm]" value="Y" ' . $checked_option_sem_imp_sa_pm . '>'; } if ($_SESSION['config']['dimanche_travail']) { $imp_di_am = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_di_am]" value="Y" ' . $checked_option_sem_imp_di_am . '>'; $imp_di_pm = '<input type="checkbox" name="tab_checkbox_sem_imp[sem_imp_di_pm]" value="Y" ' . $checked_option_sem_imp_di_pm . '>'; } $return .= '<table cellpadding="1" class="tablo"><thead><tr><td></td>'; $return .= '<td class="histo">' . _('lundi') . '</td>'; $return .= '<td class="histo">' . _('mardi') . '</td>'; $return .= '<td class="histo">' . _('mercredi') . '</td>'; $return .= '<td class="histo">' . _('jeudi') . '</td>'; $return .= '<td class="histo">' . _('vendredi') . '</td>'; if ($_SESSION['config']['samedi_travail']) { $return .= '<td class="histo">' . _('samedi') . '</td>'; } if ($_SESSION['config']['dimanche_travail']) { $return .= '<td class="histo">' . _('dimanche') . '</td>'; } $return .= '</tr></thead><tbody>'; $return .= '<tr align="center">'; $return .= '<td class="histo">' . _('admin_temps_partiel_am') . '</td>'; $return .= '<td class="histo">' . $imp_lu_am . '</td>'; $return .= '<td class="histo">' . $imp_ma_am . '</td>'; $return .= '<td class="histo">' . $imp_me_am . '</td>'; $return .= '<td class="histo">' . $imp_je_am . '</td>'; $return .= '<td class="histo">' . $imp_ve_am . '</td>'; if ($_SESSION['config']['samedi_travail']) { $return .= '<td class="histo">' . $imp_sa_am . '</td>'; } if ($_SESSION['config']['dimanche_travail']) { $return .= '<td class="histo">' . $imp_di_am . '</td>'; } $return .= '</tr>'; $return .= '<tr align="center">'; $return .= '<td class="histo">' . _('admin_temps_partiel_pm') . '</td>'; $return .= '<td class="histo">' . $imp_lu_pm . '</td>'; $return .= '<td class="histo">' . $imp_ma_pm . '</td>'; $return .= '<td class="histo">' . $imp_me_pm . '</td>'; $return .= '<td class="histo">' . $imp_je_pm . '</td>'; $return .= '<td class="histo">' . $imp_ve_pm . '</td>'; if ($_SESSION['config']['samedi_travail']) { $return .= '<td class="histo">' . $imp_sa_pm . '</td>'; } if ($_SESSION['config']['dimanche_travail']) { $return .= '<td class="histo">' . $imp_di_pm . '</td>'; } $return .= '</tr></tbody></table>'; $return .= '</td><td><img src="' . TEMPLATE_PATH . 'img/shim.gif" width="15" height="2" border="0" vspace="0" hspace="0"></td><td>'; //tableau semaines paires $return .= '<b><u>' . _('admin_temps_partiel_sem_paires') . ':</u></b><br>'; $tab_checkbox_sem_p = array(); $p_lu_am = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_lu_am]" value="Y" ' . $checked_option_sem_p_lu_am . '>'; $p_lu_pm = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_lu_pm]" value="Y" ' . $checked_option_sem_p_lu_pm . '>'; $p_ma_am = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_ma_am]" value="Y" ' . $checked_option_sem_p_ma_am . '>'; $p_ma_pm = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_ma_pm]" value="Y" ' . $checked_option_sem_p_ma_pm . '>'; $p_me_am = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_me_am]" value="Y" ' . $checked_option_sem_p_me_am . '>'; $p_me_pm = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_me_pm]" value="Y" ' . $checked_option_sem_p_me_pm . '>'; $p_je_am = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_je_am]" value="Y" ' . $checked_option_sem_p_je_am . '>'; $p_je_pm = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_je_pm]" value="Y" ' . $checked_option_sem_p_je_pm . '>'; $p_ve_am = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_ve_am]" value="Y" ' . $checked_option_sem_p_ve_am . '>'; $p_ve_pm = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_ve_pm]" value="Y" ' . $checked_option_sem_p_ve_pm . '>'; $p_sa_am = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_sa_am]" value="Y" ' . $checked_option_sem_p_sa_am . '>'; $p_sa_pm = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_sa_pm]" value="Y" ' . $checked_option_sem_p_sa_pm . '>'; $p_di_am = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_di_am]" value="Y" ' . $checked_option_sem_p_di_am . '>'; $p_di_pm = '<input type="checkbox" name="tab_checkbox_sem_p[sem_p_di_pm]" value="Y" ' . $checked_option_sem_p_di_pm . '>'; $return .= '<table cellpadding="1" class="tablo"><thead><tr><td></td>'; $return .= '<td class="histo">' . _('lundi') . '</td>'; $return .= '<td class="histo">' . _('mardi') . '</td>'; $return .= '<td class="histo">' . _('mercredi') . '</td>'; $return .= '<td class="histo">' . _('jeudi') . '</td>'; $return .= '<td class="histo">' . _('vendredi') . '</td>'; if ($_SESSION['config']['samedi_travail']) { $return .= '<td class="histo">' . _('samedi') . '</td>'; } if ($_SESSION['config']['dimanche_travail']) { $return .= '<td class="histo">' . _('dimanche') . '</td>'; } $return .= '</tr></thead><tbody>'; $return .= '<tr align="center">'; $return .= '<td class="histo">' . _('admin_temps_partiel_am') . '</td>'; $return .= '<td class="histo">' . $p_lu_am . '</td>'; $return .= '<td class="histo">' . $p_ma_am . '</td>'; $return .= '<td class="histo">' . $p_me_am . '</td>'; $return .= '<td class="histo">' . $p_je_am . '</td>'; $return .= '<td class="histo">' . $p_ve_am . '</td>'; if ($_SESSION['config']['samedi_travail']) { $return .= '<td class="histo">' . $p_sa_am . '</td>'; } if ($_SESSION['config']['dimanche_travail']) { $return .= '<td class="histo">' . $p_di_am . '</td>'; } $return .= '</tr>'; $return .= '<tr align="center">'; $return .= '<td class="histo">' . _('admin_temps_partiel_pm') . '</td>'; $return .= '<td class="histo">' . $p_lu_pm . '</td>'; $return .= '<td class="histo">' . $p_ma_pm . '</td>'; $return .= '<td class="histo">' . $p_me_pm . '</td>'; $return .= '<td class="histo">' . $p_je_pm . '</td>'; $return .= '<td class="histo">' . $p_ve_pm . '</td>'; if ($_SESSION['config']['samedi_travail']) { $return .= '<td class="histo">' . $p_sa_pm . '</td>'; } if ($_SESSION['config']['dimanche_travail']) { $return .= '<td class="histo">' . $p_di_pm . '</td>'; } $return .= '</tr></tbody></table></td></tr>'; $return .= '<tr>'; $return .= '<td colspan="3" class="inline-date">'; $jour_default = date('d'); $mois_default = date('m'); $year_default = date('Y'); $return .= '<strong>' . _('admin_temps_partiel_date_valid') . "</strong> "; $return .= affiche_selection_new_jour($jour_default); // la variable est $new_jour $return .= affiche_selection_new_mois($mois_default); // la variable est $new_mois $return .= affiche_selection_new_year($year_default - 2, $year_default + 10, $year_default); // la variable est $new_year $return .= '</td></tr></table>'; return $return; }