示例#1
0
 public static function affichage_cloture_user_par_user($tab_type_conges, $tab_all_users_du_resp, $tab_all_users_du_grand_resp)
 {
     $PHP_SELF = $_SERVER['PHP_SELF'];
     $session = session_id();
     $return = '';
     /************************************************************/
     /* CLOTURE EXERCICE USER PAR USER pour tous les utilisateurs du responsable */
     if (count($tab_all_users_du_resp) != 0 || count($tab_all_users_du_grand_resp) != 0) {
         $return .= '<form action="' . $PHP_SELF . '?session=' . $session . '&onglet=cloture_exercice" method="POST">';
         $return .= '<table>';
         $return .= '<tr>';
         $return .= '<td align="center">';
         $return .= '<fieldset class="cal_saisie">';
         $return .= '<legend class="boxlogin">' . _('resp_cloture_exercice_users') . '</legend>';
         $return .= '<table>';
         $return .= '<tr>';
         $return .= '<td align="center">';
         // AFFICHAGE TITRES TABLEAU
         $return .= '<table cellpadding="2" class="table table-hover table-responsive table-condensed table-striped" width="700">';
         $return .= '<thead>';
         $return .= '<tr align="center">';
         $return .= '<th>' . _('divers_nom_maj_1') . '</th>';
         $return .= '<th>' . _('divers_prenom_maj_1') . '</th>';
         $return .= '<th>' . _('divers_quotite_maj_1') . '</th>';
         foreach ($tab_type_conges as $id_conges => $libelle) {
             $return .= '<th>' . $libelle . '<br><i>(' . _('divers_solde') . ')</i></th>';
         }
         $return .= '<th>' . _('divers_cloturer_maj_1') . '<br></th>';
         $return .= '<th>' . _('divers_comment_maj_1') . '<br></th>';
         $return .= '</tr>';
         $return .= '</thead>';
         $return .= '<tbody>';
         // AFFICHAGE LIGNES TABLEAU
         // affichage des users dont on est responsable :
         foreach ($tab_all_users_du_resp as $current_login => $tab_current_user) {
             $return .= \responsable\Fonctions::affiche_ligne_du_user($current_login, $tab_type_conges, $tab_current_user);
         }
         // affichage des users dont on est grand responsable :
         if ($_SESSION['config']['double_validation_conges'] && $_SESSION['config']['grand_resp_ajout_conges']) {
             $nb_colspan = 50;
             $return .= '<tr align="center"><td class="histo" style="background-color: #CCC;" colspan="' . $nb_colspan . '"><i>' . _('resp_etat_users_titre_double_valid') . '</i></td></tr>';
             foreach ($tab_all_users_du_grand_resp as $current_login => $tab_current_user) {
                 $return .= \responsable\Fonctions::affiche_ligne_du_user($current_login, $tab_type_conges, $tab_current_user);
             }
         }
         $return .= '</tbody>';
         $return .= '</table>';
         $return .= '</td>';
         $return .= '</tr>';
         $return .= '<tr>';
         $return .= '<td align="center">';
         $return .= '<input class="btn" type="submit" value="' . _('form_submit') . '">';
         $return .= '</td>';
         $return .= '</tr>';
         $return .= '</table>';
         $return .= '</fieldset>';
         $return .= '</td></tr>';
         $return .= '</table>';
         $return .= '<input type="hidden" name="cloture_users" value="TRUE">';
         $return .= '<input type="hidden" name="session" value="' . $session . '">';
         $return .= '</form>';
     }
     return $return;
 }