コード例 #1
0
ファイル: Fonctions.php プロジェクト: TexGG/Libertempo
 /**
  * Encapsule le comportement du module de traitement des utilisateurs
  *
  * @param string $onglet
  *
  * @return void
  * @access public
  * @static
  */
 public static function pageTraiteUserModule($onglet)
 {
     //var pour hr_traite_user.php
     $user_login = getpost_variable('user_login');
     $tab_checkbox_annule = getpost_variable('tab_checkbox_annule');
     $tab_radio_traite_demande = getpost_variable('tab_radio_traite_demande');
     $new_demande_conges = getpost_variable('new_demande_conges', 0);
     $return = '';
     // si une annulation de conges a été selectionée :
     if ($tab_checkbox_annule != '') {
         $tab_text_annul = getpost_variable('tab_text_annul');
         $return .= \hr\Fonctions::annule_conges($user_login, $tab_checkbox_annule, $tab_text_annul);
     } elseif ($tab_radio_traite_demande != '') {
         $tab_text_refus = getpost_variable('tab_text_refus');
         $returnn .= \hr\Fonctions::traite_demandes($user_login, $tab_radio_traite_demande, $tab_text_refus);
     } elseif ($new_demande_conges == 1) {
         $new_debut = getpost_variable('new_debut');
         $new_demi_jour_deb = getpost_variable('new_demi_jour_deb');
         $new_fin = getpost_variable('new_fin');
         $new_demi_jour_fin = getpost_variable('new_demi_jour_fin');
         $new_comment = getpost_variable('new_comment');
         $new_type = getpost_variable('new_type');
         if ($_SESSION['config']['disable_saise_champ_nb_jours_pris']) {
             $new_nb_jours = compter($user_login, '', $new_debut, $new_fin, $new_demi_jour_deb, $new_demi_jour_fin, $comment);
             if ($new_nb_jours <= 0) {
                 $new_nb_jours = getpost_variable('new_nb_jours');
             }
         } else {
             $new_nb_jours = getpost_variable('new_nb_jours');
         }
         $return .= \hr\Fonctions::new_conges($user_login, $numero_int, $new_debut, $new_demi_jour_deb, $new_fin, $new_demi_jour_fin, $new_nb_jours, $new_comment, $new_type);
     } else {
         $year_calendrier_saisie_debut = getpost_variable('year_calendrier_saisie_debut', 0);
         $mois_calendrier_saisie_debut = getpost_variable('mois_calendrier_saisie_debut', 0);
         $year_calendrier_saisie_fin = getpost_variable('year_calendrier_saisie_fin', 0);
         $mois_calendrier_saisie_fin = getpost_variable('mois_calendrier_saisie_fin', 0);
         $tri_date = getpost_variable('tri_date', "ascendant");
         $year_affichage = getpost_variable('year_affichage', date("Y"));
         $return .= \hr\Fonctions::affichage($user_login, $year_affichage, $year_calendrier_saisie_debut, $mois_calendrier_saisie_debut, $year_calendrier_saisie_fin, $mois_calendrier_saisie_fin, $tri_date, $onglet);
     }
     return $return;
 }