Exemple #1
0
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
define('_PHP_CONGES', 1);
define('ROOT_PATH', '../');
include ROOT_PATH . 'define.php';
defined('_PHP_CONGES') or die('Restricted access');
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : session_id());
include ROOT_PATH . 'fonctions_conges.php';
include INCLUDE_PATH . 'fonction.php';
include INCLUDE_PATH . 'session.php';
include ROOT_PATH . 'fonctions_calcul.php';
$DEBUG = FALSE;
//$DEBUG = TRUE ;
// verif des droits du user à afficher la page
verif_droits_user($session, 'is_admin', $DEBUG);
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$onglet = getpost_variable('onglet', 'admin-users');
/*********************************/
/*   COMPOSITION DES ONGLETS...  */
/*********************************/
$onglets = array();
$onglets['admin-users'] = _('admin_onglet_gestion_user');
$onglets['ajout-user'] = _('admin_onglet_add_user');
if ($_SESSION['config']['gestion_groupes']) {
    $onglets['admin-group'] = _('admin_onglet_gestion_groupe');
    $onglets['admin-group-users'] = _('admin_onglet_groupe_user');
*************************************************************************************************/
define('_PHP_CONGES', 1);
define('ROOT_PATH', '../');
include ROOT_PATH . 'define.php';
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';
}
include ROOT_PATH . 'fonctions_conges.php';
include INCLUDE_PATH . 'fonction.php';
include INCLUDE_PATH . 'session.php';
$DEBUG = FALSE;
//$DEBUG=TRUE ;
// verif des droits du user à afficher la page
verif_droits_user($session, "is_admin", $DEBUG);
/*** initialisation des variables ***/
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$choix_action = getpost_variable('choix_action');
$year_calendrier_saisie = getpost_variable('year_calendrier_saisie', 0);
$tab_checkbox_j_chome = getpost_variable('tab_checkbox_j_chome');
/*************************************/
if ($DEBUG) {
    echo "choix_action = {$choix_action} # year_calendrier_saisie = {$year_calendrier_saisie}<br>\n";
    print_r($year_calendrier_saisie);
    echo "<br>\n";
}
Exemple #3
0
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
define('_PHP_CONGES', 1);
define('ROOT_PATH', '../');
include ROOT_PATH . 'define.php';
defined('_PHP_CONGES') or die('Restricted access');
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : session_id());
include ROOT_PATH . 'fonctions_conges.php';
include INCLUDE_PATH . 'fonction.php';
include INCLUDE_PATH . 'session.php';
include ROOT_PATH . 'fonctions_calcul.php';
$DEBUG = FALSE;
//$DEBUG = TRUE ;
// verif des droits du user à afficher la page
verif_droits_user($session, "is_hr", $DEBUG);
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$onglet = getpost_variable('onglet', "page_principale");
/*********************************/
/*   COMPOSITION DES ONGLETS...  */
/*********************************/
$onglets = array();
$onglets['page_principale'] = _('resp_menu_button_retour_main');
if ($_SESSION['config']['user_saisie_demande']) {
    $onglets['traitement_demandes'] = _('resp_menu_button_traite_demande');
}
// if( $_SESSION['config']['resp_ajoute_conges'] )
Exemple #4
0
 /**
  * Encapsule le comportement du module de sauvegarde / restauration de bdd
  *
  * @param string $session
  *
  * @return void
  * @access public
  * @static
  */
 public static function saveRestoreModule($session)
 {
     // verif des droits du user à afficher la page
     verif_droits_user($session, "is_admin");
     /*** initialisation des variables ***/
     /*************************************/
     // recup des parametres reçus :
     // SERVER
     $PHP_SELF = $_SERVER['PHP_SELF'];
     // GET / POST
     $choix_action = getpost_variable('choix_action');
     $type_sauvegarde = getpost_variable('type_sauvegarde');
     $commit = getpost_variable('commit');
     $fichier_restaure_name = "";
     $fichier_restaure_tmpname = "";
     $fichier_restaure_size = 0;
     $fichier_restaure_error = 4;
     if (isset($_FILES['fichier_restaure'])) {
         $fichier_restaure_name = $_FILES['fichier_restaure']['name'];
         $fichier_restaure_size = $_FILES['fichier_restaure']['size'];
         $fichier_restaure_tmpname = $_FILES['fichier_restaure']['tmp_name'];
         $fichier_restaure_error = $_FILES['fichier_restaure']['error'];
     }
     /*************************************/
     if ($choix_action == "") {
         \admin\Fonctions::choix_save_restore();
     } elseif ($choix_action == "sauvegarde") {
         if (!isset($type_sauvegarde) || $type_sauvegarde == "") {
             \admin\Fonctions::choix_sauvegarde();
         } else {
             if (!isset($commit) || $commit == "") {
                 \admin\Fonctions::sauve($type_sauvegarde);
             } else {
                 \admin\Fonctions::commit_sauvegarde($type_sauvegarde);
             }
         }
     } elseif ($choix_action == "restaure") {
         if (!isset($fichier_restaure_name) || $fichier_restaure_name == "" || !isset($fichier_restaure_tmpname) || $fichier_restaure_tmpname == "") {
             \admin\Fonctions::choix_restaure();
         } else {
             \admin\Fonctions::restaure($fichier_restaure_name, $fichier_restaure_tmpname, $fichier_restaure_size, $fichier_restaure_error);
         }
     } else {
         /* APPEL D'UNE AUTRE PAGE immediat */
         echo "<META HTTP-EQUIV=REFRESH CONTENT=\"0; URL=admin_index.php?session={$session}&onglet=admin-users\">";
     }
 }
Exemple #5
0
define('ROOT_PATH', '../');
include ROOT_PATH . 'define.php';
include INCLUDE_PATH . 'fonction.php';
defined('_PHP_CONGES') or die('Restricted access');
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : session_id());
if (empty($session)) {
    redirect(ROOT_PATH . 'index.php?return_url=config/index.php');
}
include ROOT_PATH . 'fonctions_conges.php';
$_SESSION['config'] = init_config_tab();
// on initialise le tableau des variables de config
include INCLUDE_PATH . 'session.php';
$PHP_SELF = $_SERVER['PHP_SELF'];
$session = session_id();
// verif des droits du user à afficher la page
verif_droits_user($session, "is_admin");
$_SESSION['from_config'] = TRUE;
// initialise ce flag pour changer le bouton de retour des popup
$onglet = getpost_variable('onglet');
if (!$onglet) {
    $onglet = 'general';
}
/*********************************/
/*   COMPOSITION DES ONGLETS...  */
/*********************************/
$onglets = array();
$onglets['general'] = _('install_config_appli');
$onglets['type_absence'] = _('install_config_types_abs');
$onglets['mail'] = _('install_config_mail');
$onglets['logs'] = _('config_logs');
/*********************************/
Exemple #6
0
 /**
  * Encapsule le comportement du module d'affichage des logs
  *
  * @param string $session
  *
  * @return void
  * @access public
  * @static
  */
 public static function configurationModule($session)
 {
     // verif des droits du user à afficher la page
     verif_droits_user($session, "is_admin");
     $return = '';
     /*** initialisation des variables ***/
     $action = "";
     $tab_new_values = array();
     /************************************/
     /*************************************/
     // recup des parametres reçus :
     // SERVER
     $PHP_SELF = $_SERVER['PHP_SELF'];
     // GET / POST
     $action = getpost_variable('action');
     $tab_new_values = getpost_variable('tab_new_values');
     /*************************************/
     if ($action == "commit") {
         $return .= \config\Fonctions::commit_saisie($tab_new_values, $session);
     } else {
         $return .= '<div class="wrapper configure">';
         $return .= \config\Fonctions::affichage_configuration($session);
         $return .= '<div>';
     }
     return $return;
 }
Exemple #7
0
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('_PHP_CONGES', 1);
define('ROOT_PATH', '../');
require_once ROOT_PATH . 'define.php';
defined('_PHP_CONGES') or die('Restricted access');
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : session_id());
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';
// verif des droits du user à afficher la page
verif_droits_user($session, "is_resp");
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$onglet = getpost_variable('onglet', "page_principale");
/*********************************/
/*   COMPOSITION DES ONGLETS...  */
/*********************************/
$onglets = array();
$onglets['page_principale'] = _('resp_menu_button_retour_main');
if ($_SESSION['config']['user_saisie_demande']) {
    $onglets['traitement_demandes'] = _('resp_menu_button_traite_demande');
}
if ($_SESSION['config']['resp_ajoute_conges']) {
Exemple #8
0
    bouton(_('button_responsable_mode'), 'user-responsable.png', ROOT_PATH . 'responsable/resp_index.php?session=' . $session, $user_mode == 'responsable');
}
bouton(_('user'), 'user.png', ROOT_PATH . 'utilisateur/user_index.php?session=' . $session, $user_mode == 'utilisateur');
echo '<div class="mode_and_user_info" >Mode ' . $user_mode . ': ' . $_SESSION['u_prenom'] . ' ' . $_SESSION['u_nom'] . ' (' . $_SESSION['userlogin'] . ')</div>';
echo '<div style="clear: right; margin : 0;"></div>';
if ($_SESSION['config']['auth']) {
    bouton(_('button_deconnect'), 'exit.png', ROOT_PATH . 'deconnexion.php?session=' . $session);
}
$PHP_SELF = $_SERVER['PHP_SELF'];
$session = session_id();
if (is_active($_SESSION['userlogin'])) {
    $_SESSION['is_active'] = "Y";
} else {
    $_SESSION['is_active'] = "N";
}
verif_droits_user($_SESSION['is_active'], "is_active", FALSE);
$onglet = getpost_variable('onglet');
bouton('Actualiser', 'refresh.png', $PHP_SELF . '?session=' . $session . '&onglet=' . $onglet);
if ($_SESSION['config']['user_affiche_calendrier']) {
    bouton_popup('Calendrier', 'calendar.png', ROOT_PATH . 'calendrier.php?session=' . $session, 'calendrier', 1280, 1024);
}
echo '<div style="float: left;">';
switch ($user_mode) {
    case 'admin':
        bouton_popup(_('admin_button_save_db_2'), 'floppy_22x22.png', ROOT_PATH . 'admin/admin_db_sauve.php?session=' . $session, 'sauvedb', 400, 300);
        bouton_popup(_('admin_button_jours_fermeture_2'), 'jours_fermeture_22x22.png', ROOT_PATH . 'admin/admin_jours_fermeture.php?session=' . $session, 'fermeture', 1080, 690);
        bouton_popup(_('admin_button_jours_chomes_2'), 'jours_feries_22x22.png', ROOT_PATH . 'admin/admin_jours_chomes.php?session=' . $session, 'jourschomes', 1080, 610);
        if (false) {
            if ($_SESSION['config']['affiche_bouton_config_mail_pour_admin']) {
                bouton_popup(_('admin_button_config_mail_2'), 'tux_config_22x22.png', ROOT_PATH . 'config/config_mail.php?session=' . $session, 'configmail', 800, 600);
            }
Exemple #9
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;
 }
Exemple #10
0
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());
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';
// verif des droits du user à afficher la page
verif_droits_user($session, 'is_admin');
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$onglet = getpost_variable('onglet', 'admin-users');
/*********************************/
/*   COMPOSITION DES ONGLETS...  */
/*********************************/
$onglets = array();
$onglets['admin-users'] = _('admin_onglet_gestion_user');
$onglets['ajout-user'] = _('admin_onglet_add_user');
if ($_SESSION['config']['gestion_groupes']) {
    if ($_SESSION['config']['admin_see_all'] || $_SESSION['userlogin'] == "admin" || is_hr($_SESSION['userlogin'])) {
        $onglets['admin-group'] = _('admin_onglet_gestion_groupe');
Exemple #11
0
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*************************************************************************************************/
define('_PHP_CONGES', 1);
define('ROOT_PATH', '../');
include ROOT_PATH . 'define.php';
defined('_PHP_CONGES') or die('Restricted access');
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : session_id());
include ROOT_PATH . 'fonctions_conges.php';
include INCLUDE_PATH . 'fonction.php';
include INCLUDE_PATH . 'session.php';
include ROOT_PATH . 'fonctions_calcul.php';
$DEBUG = FALSE;
//$DEBUG = TRUE ;
// verif des droits du user à afficher la page
verif_droits_user($session, "is_resp", $DEBUG);
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$onglet = getpost_variable('onglet', "page_principale");
/*********************************/
/*   COMPOSITION DES ONGLETS...  */
/*********************************/
$onglets = array();
$onglets['page_principale'] = _('resp_menu_button_retour_main');
if ($_SESSION['config']['user_saisie_demande']) {
    $onglets['traitement_demandes'] = _('resp_menu_button_traite_demande');
}
if ($_SESSION['config']['resp_ajoute_conges']) {