Esempio n. 1
0
Libertempo : Gestion Interactive des Congés
Copyright (C) 2015 (Wouldsmina)
Copyright (C) 2015 (Prytoegrian)
Copyright (C) 2005 (cedric chauvineau)

Ce programme est libre, vous pouvez le redistribuer et/ou le modifier selon les
termes de la Licence Publique Générale GNU publiée par la Free Software Foundation.
Ce programme est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
ni explicite ni implicite, y compris les garanties de commercialisation ou d'adaptation
dans un but spécifique. Reportez-vous à la Licence Publique Générale GNU pour plus de détails.
Vous devez avoir reçu une copie de la Licence Publique Générale GNU en même temps
que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis.
*************************************************************************************************
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; either
version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
defined('_PHP_CONGES') or die('Restricted access');
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : session_id());
if (file_exists(CONFIG_PATH . 'config_ldap.php')) {
    include CONFIG_PATH . 'config_ldap.php';
}
echo \hr\Fonctions::pageJoursChomesModule($session);
Esempio n. 2
0
<?php

/*************************************************************************************************
Libertempo : Gestion Interactive des Congés
Copyright (C) 2015 (Wouldsmina)
Copyright (C) 2015 (Prytoegrian)
Copyright (C) 2005 (cedric chauvineau)

Ce programme est libre, vous pouvez le redistribuer et/ou le modifier selon les
termes de la Licence Publique Générale GNU publiée par la Free Software Foundation.
Ce programme est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
ni explicite ni implicite, y compris les garanties de commercialisation ou d'adaptation
dans un but spécifique. Reportez-vous à la Licence Publique Générale GNU pour plus de détails.
Vous devez avoir reçu une copie de la Licence Publique Générale GNU en même temps
que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis.
*************************************************************************************************
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; either
version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
defined('_PHP_CONGES') or die('Restricted access');
echo \hr\Fonctions::pageClotureYearModule($session);
Esempio n. 3
0
Ce programme est libre, vous pouvez le redistribuer et/ou le modifier selon les
termes de la Licence Publique Générale GNU publiée par la Free Software Foundation.
Ce programme est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
ni explicite ni implicite, y compris les garanties de commercialisation ou d'adaptation
dans un but spécifique. Reportez-vous à la Licence Publique Générale GNU pour plus de détails.
Vous devez avoir reçu une copie de la Licence Publique Générale GNU en même temps
que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis.
*************************************************************************************************
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; either
version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
define('ROOT_PATH', '../');
require_once ROOT_PATH . 'define.php';
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : session_id());
if (file_exists(CONFIG_PATH . 'config_ldap.php')) {
    include_once CONFIG_PATH . 'config_ldap.php';
}
include_once ROOT_PATH . 'fonctions_conges.php';
include_once INCLUDE_PATH . 'fonction.php';
include_once INCLUDE_PATH . 'session.php';
include_once ROOT_PATH . 'fonctions_calcul.php';
echo \hr\Fonctions::pageJoursFermetureModule($session);
bottom();
Esempio n. 4
0
<?php

/*************************************************************************************************
Libertempo : Gestion Interactive des Congés
Copyright (C) 2015 (Wouldsmina)
Copyright (C) 2015 (Prytoegrian)
Copyright (C) 2005 (cedric chauvineau)

Ce programme est libre, vous pouvez le redistribuer et/ou le modifier selon les
termes de la Licence Publique Générale GNU publiée par la Free Software Foundation.
Ce programme est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
ni explicite ni implicite, y compris les garanties de commercialisation ou d'adaptation
dans un but spécifique. Reportez-vous à la Licence Publique Générale GNU pour plus de détails.
Vous devez avoir reçu une copie de la Licence Publique Générale GNU en même temps
que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis.
*************************************************************************************************
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; either
version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
defined('_PHP_CONGES') or die('Restricted access');
echo \hr\Fonctions::pagePrincipaleModule($tab_type_cong, $tab_type_conges_exceptionnels, $session);
Esempio n. 5
0
 /**
  * Encapsule le comportement du module de jours de fermeture
  *
  * @param string $session
  *
  * @return void
  * @access public
  * @static
  */
 public static function pageJoursFermetureModule($session)
 {
     // verif des droits du user à afficher la page
     verif_droits_user($session, "is_hr");
     $return = '';
     /*** initialisation des variables ***/
     /*************************************/
     // recup des parametres reçus :
     // SERVER
     $PHP_SELF = $_SERVER['PHP_SELF'];
     // GET / POST
     $choix_action = getpost_variable('choix_action');
     $year = getpost_variable('year', 0);
     $groupe_id = getpost_variable('groupe_id');
     $id_type_conges = getpost_variable('id_type_conges');
     $new_date_debut = getpost_variable('new_date_debut');
     // valeur par dédaut = aujourd'hui
     $new_date_fin = getpost_variable('new_date_fin');
     // valeur par dédaut = aujourd'hui
     $fermeture_id = getpost_variable('fermeture_id', 0);
     $fermeture_date_debut = getpost_variable('fermeture_date_debut');
     $fermeture_date_fin = getpost_variable('fermeture_date_fin');
     $code_erreur = getpost_variable('code_erreur', 0);
     // si les dates de début ou de fin ne sont pas passé par get/post alors date du jour.
     if ($new_date_debut == "") {
         if ($year == 0) {
             $new_date_debut = date("d/m/Y");
         } else {
             $new_date_debut = date("d/m/Y", mktime(0, 0, 0, date("m"), date("d"), $year));
         }
     }
     if ($new_date_fin == "") {
         if ($year == 0) {
             $new_date_fin = date("d/m/Y");
         } else {
             $new_date_fin = date("d/m/Y", mktime(0, 0, 0, date("m"), date("d"), $year));
         }
     }
     if ($year == 0) {
         $year = date("Y");
     }
     /*************************************/
     /***********************************/
     /*  VERIF DES DATES RECUES   */
     $tab_date_debut = explode("/", $new_date_debut);
     // date au format d/m/Y
     $timestamp_date_debut = mktime(0, 0, 0, $tab_date_debut[1], $tab_date_debut[0], $tab_date_debut[2]);
     $date_debut_yyyy_mm_dd = $tab_date_debut[2] . "-" . $tab_date_debut[1] . "-" . $tab_date_debut[0];
     $tab_date_fin = explode("/", $new_date_fin);
     // date au format d/m/Y
     $timestamp_date_fin = mktime(0, 0, 0, $tab_date_fin[1], $tab_date_fin[0], $tab_date_fin[2]);
     $date_fin_yyyy_mm_dd = $tab_date_fin[2] . "-" . $tab_date_fin[1] . "-" . $tab_date_fin[0];
     $timestamp_today = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
     /*********************************/
     /*   COMPOSITION DES ONGLETS...  */
     /*********************************/
     $onglet = getpost_variable('onglet');
     if (!$onglet) {
         $onglet = 'saisie';
     }
     $onglets = array();
     $onglets['saisie'] = _('admin_jours_fermeture_titre') . " " . "<span class=\"current-year\">{$year}</span>";
     $onglets['calendar'] = 'Calendrier des fermetures' . " " . "<span class=\"current-year\">{$year}</span>";
     $onglets['year_nav'] = NULL;
     //initialisation de l'action par défaut
     if ($choix_action == "") {
         $choix_action = "saisie_groupe";
     }
     /*********************************/
     /*   COMPOSITION DU HEADER...    */
     /*********************************/
     $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>';
     /***********************************/
     // AFFICHAGE DE LA PAGE
     header_menu('', 'Libertempo : ' . _('divers_fermeture'), $add_css);
     include ROOT_PATH . 'fonctions_javascript.php';
     /*********************************/
     /*   AFFICHAGE DES ONGLETS...  */
     /*********************************/
     $return .= '<div id="onglet_menu">';
     foreach ($onglets as $key => $title) {
         if ($key == 'year_nav') {
             // navigation
             $prev_link = "{$PHP_SELF}?session={$session}&onglet={$onglet}&year=" . ($year - 1) . "&groupe_id={$groupe_id}";
             $next_link = "{$PHP_SELF}?session={$session}&onglet={$onglet}&year=" . ($year + 1) . "&groupe_id={$groupe_id}";
             $return .= '<div class="onglet calendar-nav">';
             $return .= '<ul>';
             $return .= '<li><a href="' . $prev_link . '" class="calendar-prev"><i class="fa fa-chevron-left"></i><span>année précédente</span></a></li>';
             $return .= '<li class="current-year">' . $year . '</li>';
             $return .= '<li><a href="' . $next_link . '" class="calendar-next"><i class="fa fa-chevron-right"></i><span>année suivante</span></a></li>';
             $return .= '</ul>';
             $return .= '</div>';
         } else {
             $return .= '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" ><a href="' . $PHP_SELF . '?session=' . $session . '&year=' . $year . '&onglet=' . $key . '">' . $title . '</a></div>';
         }
     }
     $return .= '</div>';
     // vérifie si les jours fériés sont saisie pour l'année en cours
     if (verif_jours_feries_saisis($date_debut_yyyy_mm_dd) == FALSE && verif_jours_feries_saisis($date_fin_yyyy_mm_dd) == FALSE) {
         $code_erreur = 1;
         // code erreur : jour feriés non saisis
         $onglet = "calendar";
     }
     //initialisation de l'action demandée : saisie_dates, commit_new_fermeture pour enregistrer une fermeture, annul_fermeture pour confirmer une annulation, commit_annul_fermeture pour annuler une fermeture
     //en cas de confirmation d'une fermeture :
     if ($choix_action == "commit_new_fermeture") {
         // on verifie que $new_date_debut est anterieure a $new_date_fin
         if ($timestamp_date_debut > $timestamp_date_fin) {
             $code_erreur = 2;
             // code erreur : $new_date_debut est posterieure a $new_date_fin
             $choix_action = "saisie_dates";
         } elseif ($timestamp_date_debut < $timestamp_today) {
             $code_erreur = 3;
             // code erreur : saisie de date passée
             $choix_action = "saisie_dates";
         } elseif ($timestamp_date_debut == $timestamp_today || $timestamp_date_fin == $timestamp_today) {
             $code_erreur = 4;
             // code erreur : saisie de aujourd'hui
             $choix_action = "saisie_dates";
         } else {
             // fabrication et initialisation du tableau des demi-jours de la date_debut à la date_fin
             $tab_periode_calcul = make_tab_demi_jours_periode($date_debut_yyyy_mm_dd, $date_fin_yyyy_mm_dd, "am", "pm");
             // on verifie si la periode saisie ne chevauche pas une periode existante
             if (\hr\Fonctions::verif_periode_chevauche_periode_groupe($date_debut_yyyy_mm_dd, $date_fin_yyyy_mm_dd, '', $tab_periode_calcul, $groupe_id)) {
                 $code_erreur = 5;
                 // code erreur : fermeture chevauche une periode deja saisie
                 $choix_action = "saisie_dates";
             }
         }
     }
     if ($onglet == 'calendar') {
         // les jours fériés de l'annee de la periode saisie ne sont pas enregistrés
         if ($code_erreur == 1) {
             $return .= '<div class="alert alert-danger">' . _('admin_jours_fermeture_annee_non_saisie') . '</div>';
         }
         /************************************************/
         // CALENDRIER DES FERMETURES
         $return .= \hr\Fonctions::affiche_calendrier_fermeture($year);
     } elseif ($choix_action == "saisie_dates") {
         if ($groupe_id == "") {
             // choix du groupe n'a pas été fait ($_SESSION['config']['fermeture_par_groupe']==FALSE)
             $groupe_id = 0;
         }
         // $new_date_debut est anterieure a $new_date_fin
         if ($code_erreur == 2) {
             $return .= '<div class="alert alert-danger">' . _('admin_jours_fermeture_dates_incompatibles') . '</div>';
         }
         // ce ne sont des dates passées
         if ($code_erreur == 3) {
             $return .= '<div class="alert alert-danger">' . _('admin_jours_fermeture_date_passee_error') . '</div>';
         }
         // fermeture le jour même impossible
         if ($code_erreur == 4) {
             $return .= '<div class="alert alert-danger">' . _('admin_jours_fermeture_fermeture_aujourd_hui') . '</div>';
         }
         // la periode saisie chevauche une periode existante
         if ($code_erreur == 5) {
             $return .= '<div class="alert alert-danger">' . _('admin_jours_fermeture_chevauche_periode') . '</div>';
         }
         $return .= '<div class="wrapper">';
         $return .= '<a href="' . ROOT_PATH . 'hr/hr_index.php?session=' . $session . '" class="admin-back"><i class="fa fa-arrow-circle-o-left"></i>Retour mode rh</a>';
         if ($onglet == 'saisie') {
             $return .= \hr\Fonctions::saisie_dates_fermeture($year, $groupe_id, $new_date_debut, $new_date_fin, $code_erreur);
         }
     } elseif ($choix_action == "saisie_groupe") {
         $return .= '<div class="wrapper">';
         $return .= '<a href="' . ROOT_PATH . 'hr/hr_index.php?session=' . $session . '" class="admin-back"><i class="fa fa-arrow-circle-o-left"></i>Retour mode rh</a>';
         $return .= \hr\Fonctions::saisie_groupe_fermeture();
         $return .= '</div>';
     } elseif ($choix_action == "commit_new_fermeture") {
         $return .= $title;
         $return .= \hr\Fonctions::commit_new_fermeture($new_date_debut, $new_date_fin, $groupe_id, $id_type_conges);
     } elseif ($choix_action == "annul_fermeture") {
         $return .= $title;
         $return .= \hr\Fonctions::confirm_annul_fermeture($fermeture_id, $groupe_id, $fermeture_date_debut, $fermeture_date_fin);
     } elseif ($choix_action == "commit_annul_fermeture") {
         $return .= $title;
         $return .= \hr\Fonctions::commit_annul_fermeture($fermeture_id, $groupe_id);
     }
     return $return;
 }
<?php

/*************************************************************************************************
Libertempo : Gestion Interactive des Congés
Copyright (C) 2015 (Wouldsmina)
Copyright (C) 2015 (Prytoegrian)
Copyright (C) 2005 (cedric chauvineau)

Ce programme est libre, vous pouvez le redistribuer et/ou le modifier selon les
termes de la Licence Publique Générale GNU publiée par la Free Software Foundation.
Ce programme est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
ni explicite ni implicite, y compris les garanties de commercialisation ou d'adaptation
dans un but spécifique. Reportez-vous à la Licence Publique Générale GNU pour plus de détails.
Vous devez avoir reçu une copie de la Licence Publique Générale GNU en même temps
que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis.
*************************************************************************************************
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; either
version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
defined('_PHP_CONGES') or die('Restricted access');
echo \hr\Fonctions::pageTraitementDemandeModule($tab_type_cong, $onglet, $session);
Esempio n. 7
0
<?php

/*************************************************************************************************
Libertempo : Gestion Interactive des Congés
Copyright (C) 2015 (Wouldsmina)
Copyright (C) 2015 (Prytoegrian)
Copyright (C) 2005 (cedric chauvineau)

Ce programme est libre, vous pouvez le redistribuer et/ou le modifier selon les
termes de la Licence Publique Générale GNU publiée par la Free Software Foundation.
Ce programme est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
ni explicite ni implicite, y compris les garanties de commercialisation ou d'adaptation
dans un but spécifique. Reportez-vous à la Licence Publique Générale GNU pour plus de détails.
Vous devez avoir reçu une copie de la Licence Publique Générale GNU en même temps
que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis.
*************************************************************************************************
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; either
version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
defined('_PHP_CONGES') or die('Restricted access');
include_once ROOT_PATH . 'fonctions_javascript.php';
echo \hr\Fonctions::pageTraiteUserModule($onglet);
Esempio n. 8
0
<?php

/*************************************************************************************************
Libertempo : Gestion Interactive des Congés
Copyright (C) 2015 (Wouldsmina)
Copyright (C) 2015 (Prytoegrian)
Copyright (C) 2005 (cedric chauvineau)

Ce programme est libre, vous pouvez le redistribuer et/ou le modifier selon les
termes de la Licence Publique Générale GNU publiée par la Free Software Foundation.
Ce programme est distribué car potentiellement utile, mais SANS AUCUNE GARANTIE,
ni explicite ni implicite, y compris les garanties de commercialisation ou d'adaptation
dans un but spécifique. Reportez-vous à la Licence Publique Générale GNU pour plus de détails.
Vous devez avoir reçu une copie de la Licence Publique Générale GNU en même temps
que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis.
*************************************************************************************************
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; either
version 2 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
defined('_PHP_CONGES') or die('Restricted access');
echo \hr\Fonctions::pageAjoutCongesModule($tab_type_cong, $session);