/** * * Template Name: Test page for posts * */ ?> <?php if (!$ajax) { the_header(); } ?> <?php header_menu(); ?> <div class="container" style="margin-top: 30px;"> <div class="row"> <table class="table-hover"> <thead> <tr> <th>ID</th> <th>Image</th> <th>Author</th> <th>Slug</th> <th>Menu Order</th> <th>Display Title</th> <th>Title</th> <th>Content</th>
$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'); if (!$_SESSION['config']['responsable_virtuel']) { $onglets['admin-group-responsables'] = _('admin_onglet_groupe_resp'); } } if (!isset($onglets[$onglet]) && !in_array($onglet, array('chg_pwd_user', 'modif_group', 'modif_user', 'suppr_group', 'suppr_user'))) { $onglet = 'admin-users'; } /*********************************/ /* COMPOSITION DU HEADER... */ /*********************************/ $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>'; header_menu('admin', $_SESSION['config']['titre_admin_index'], $add_css); /*********************************/ /* AFFICHAGE DES ONGLETS... */ /*********************************/ echo '<div id="onglet_menu">'; foreach ($onglets as $key => $title) { echo '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" > <a href="' . $PHP_SELF . '?session=' . $session . '&onglet=' . $key . '">' . $title . '</a> </div>'; } echo '</div>'; /*********************************/ /* AFFICHAGE DE L'ONGLET ... */ /*********************************/ /** initialisation des tableaux des types de conges/absences **/ // recup du tableau des types de conges (seulement les conges)
// 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"; } // si l'année n'est pas renseignée, on prend celle du jour if ($year_calendrier_saisie == 0) { $year_calendrier_saisie = date("Y"); } $add_css = '<style>#onglet_menu .onglet{ width: 50% ;}</style>'; header_menu('admin', NULL, $add_css); echo "<div id=\"onglet_menu\">\n"; echo "<div class=\"onglet active\">" . _('admin_jours_chomes_titre') . " <span class=\"current-year\">{$year_calendrier_saisie}</span></div>"; echo "<div class=\"onglet calendar-nav\">\n"; // navigation $prev_link = "{$PHP_SELF}?session={$session}&year_calendrier_saisie=" . ($year_calendrier_saisie - 1); $next_link = "{$PHP_SELF}?session={$session}&year_calendrier_saisie=" . ($year_calendrier_saisie + 1); echo "<ul>\n"; echo "<li><a href=\"{$prev_link}\" class=\"calendar-prev\"><i class=\"fa fa-chevron-left\"></i><span>année précédente</span></a></li>\n"; echo "<li class=\"current-year\">{$year_calendrier_saisie}</li>\n"; echo "<li><a href=\"{$next_link}\" class=\"calendar-next\"><i class=\"fa fa-chevron-right\"></i><span>année suivante</span></a></li>\n"; echo "</ul>\n"; echo "</div>\n"; echo "</div>\n"; if ($choix_action == "commit") { commit_saisie($tab_checkbox_j_chome, $DEBUG);
$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'] ) $onglets['ajout_conges'] = _('resp_ajout_conges_titre'); $onglets['cloture_year'] = _('resp_cloture_exercice_titre'); if (!isset($onglets[$onglet]) && !in_array($onglet, array('traite_user'))) { $onglet = 'page_principale'; } /*********************************/ /* COMPOSITION DU HEADER... */ /*********************************/ $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>'; header_menu('responsable', $_SESSION['config']['titre_resp_index'], $add_css); /*********************************/ /* AFFICHAGE DES ONGLETS... */ /*********************************/ echo '<div id="onglet_menu">'; foreach ($onglets as $key => $title) { echo '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" > <a href="' . $PHP_SELF . '?session=' . $session . '&onglet=' . $key . '">' . $title . '</a> </div>'; } echo '</div>'; /*********************************/ /* AFFICHAGE DE L'ONGLET ... */ /*********************************/ /** initialisation des tableaux des types de conges/absences **/ // recup du tableau des types de conges (seulement les conges)
if ($_SESSION['config']['user_saisie_demande']) { $onglets['demandes_en_cours'] = _('user_onglet_demandes'); } $onglets['historique_conges'] = _('user_onglet_historique_conges'); $onglets['historique_autres_absences'] = _('user_onglet_historique_abs'); if ($_SESSION['config']['auth'] && $_SESSION['config']['user_ch_passwd']) { $onglets['changer_mot_de_passe'] = _('user_onglet_change_passwd'); } if (!isset($onglets[$onglet]) && !in_array($onglet, array('modif_demande', 'suppr_demande'))) { $onglet = 'nouvelle_absence'; } /*********************************/ /* COMPOSITION DU HEADER... */ /*********************************/ $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>'; header_menu('', 'Libertempo : ' . _('user'), $add_css); /*********************************/ /* AFFICHAGE DES ONGLETS... */ /*********************************/ echo '<div id="onglet_menu">'; foreach ($onglets as $key => $title) { echo '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" > <a href="' . $PHP_SELF . '?session=' . $session . '&onglet=' . $key . '">' . $title . '</a> </div>'; } echo '</div>'; /*********************************/ /* AFFICHAGE DU RECAP ... */ /*********************************/ echo "<div class=\"wrapper\">\n"; echo '<h3>' . _('tableau_recap') . '</h3>';
if ($_SESSION['config']['user_saisie_demande']) { $onglets['demandes_en_cours'] = _('user_onglet_demandes'); } $onglets['historique_conges'] = _('user_onglet_historique_conges'); $onglets['historique_autres_absences'] = _('user_onglet_historique_abs'); if ($_SESSION['config']['auth'] && $_SESSION['config']['user_ch_passwd']) { $onglets['changer_mot_de_passe'] = _('user_onglet_change_passwd'); } if (!isset($onglets[$onglet]) && !in_array($onglet, array('modif_demande', 'suppr_demande'))) { $onglet = 'nouvelle_absence'; } /*********************************/ /* COMPOSITION DU HEADER... */ /*********************************/ $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>'; header_menu('user', '', $add_css); /*********************************/ /* AFFICHAGE DES ONGLETS... */ /*********************************/ echo '<div id="onglet_menu">'; foreach ($onglets as $key => $title) { echo '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" > <a href="' . $PHP_SELF . '?session=' . $session . '&onglet=' . $key . '">' . $title . '</a> </div>'; } echo '</div>'; /*********************************/ /* AFFICHAGE DU RECAP ... */ /*********************************/ echo "<div class=\"wrapper\">\n"; echo '<h3>' . _('tableau_recap') . '</h3>';
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'); /*********************************/ /* COMPOSITION DU HEADER... */ /*********************************/ $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>'; header_menu('config', '', $add_css); /*********************************/ /* AFFICHAGE DES ONGLETS... */ /*********************************/ echo '<div id="onglet_menu">'; foreach ($onglets as $key => $title) { echo '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" > <a href="' . $PHP_SELF . '?session=' . $session . '&onglet=' . $key . '">' . $title . '</a> </div>'; } echo '</div>'; echo '<div class="' . $onglet . ' wrapper">'; echo '<a href="' . ROOT_PATH . "admin/admin_index.php?session={$session}\" class=\"admin-back\"><i class=\"fa fa-arrow-circle-o-left\"></i>Retour mode admin</a>\n"; if ($onglet == 'general') { include ROOT_PATH . 'config/configure.php'; } else {
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 *************************************************************************************************/ 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'; $add_css = NULL; header_menu('', 'Libertempo : ' . _('calendrier_titre'), $add_css); echo \calendrier\Fonctions::calendrierModule($session); bottom();
$onglets['traitement_demandes'] = _('resp_menu_button_traite_demande'); } if ($_SESSION['config']['resp_ajoute_conges']) { $onglets['ajout_conges'] = _('resp_ajout_conges_titre'); } if (false) { $onglets['cloture_exercice'] = _('button_cloture'); } if (!isset($onglets[$onglet]) && !in_array($onglet, array('traite_user'))) { $onglet = 'page_principale'; } /*********************************/ /* COMPOSITION DU HEADER... */ /*********************************/ $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>'; header_menu('', 'Libertempo : ' . _('divers_responsable_maj_1'), $add_css); /*********************************/ /* AFFICHAGE DES ONGLETS... */ /*********************************/ echo '<div id="onglet_menu">'; foreach ($onglets as $key => $title) { echo '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" > <a href="' . $PHP_SELF . '?session=' . $session . '&onglet=' . $key . '">' . $title . '</a> </div>'; } echo '</div>'; /*********************************/ /* AFFICHAGE DE L'ONGLET ... */ /*********************************/ /** initialisation des tableaux des types de conges/absences **/ // recup du tableau des types de conges (seulement les conges)
/* COMPOSITION DES ONGLETS... */ /*********************************/ $onglets = array(); if ($_SESSION['config']['affiche_bouton_config_pour_admin'] || $_SESSION['userlogin'] == "admin") { $onglets['general'] = _('install_config_appli'); } if ($_SESSION['config']['affiche_bouton_config_absence_pour_admin'] || $_SESSION['userlogin'] == "admin") { $onglets['type_absence'] = _('install_config_types_abs'); } if ($_SESSION['config']['affiche_bouton_config_mail_pour_admin'] || $_SESSION['userlogin'] == "admin") { $onglets['mail'] = _('install_config_mail'); } $onglets['logs'] = _('config_logs'); /*********************************/ /* COMPOSITION DU HEADER... */ /*********************************/ $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>'; header_menu('', 'Libertempo : ' . _('admin_button_config_1'), $add_css); /*********************************/ /* AFFICHAGE DES ONGLETS... */ /*********************************/ echo '<div id="onglet_menu">'; foreach ($onglets as $key => $title) { echo '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" > <a href="' . $PHP_SELF . '?session=' . $session . '&onglet=' . $key . '">' . $title . '</a> </div>'; } echo '</div>'; echo '<div class="' . $onglet . ' wrapper">'; echo '<a href="' . ROOT_PATH . "admin/admin_index.php?session={$session}\" class=\"admin-back\"><i class=\"fa fa-arrow-circle-o-left\"></i>" . _('form_retour') . "</a>\n"; if ($onglet == 'general') {
/** * 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; }
if ($_SESSION['config']['admin_see_all'] || $_SESSION['userlogin'] == "admin" || is_hr($_SESSION['userlogin'])) { $onglets['admin-group'] = _('admin_onglet_gestion_groupe'); } $onglets['admin-group-users'] = _('admin_onglet_groupe_user'); if ($_SESSION['config']['admin_see_all'] || $_SESSION['userlogin'] == "admin" || is_hr($_SESSION['userlogin'])) { $onglets['admin-group-responsables'] = _('admin_onglet_groupe_resp'); } } if (!isset($onglets[$onglet]) && !in_array($onglet, array('chg_pwd_user', 'modif_group', 'modif_user', 'suppr_group', 'suppr_user'))) { $onglet = 'admin-users'; } /*********************************/ /* COMPOSITION DU HEADER... */ /*********************************/ $add_css = '<style>#onglet_menu .onglet{ width: ' . str_replace(',', '.', 100 / count($onglets)) . '% ;}</style>'; header_menu('', 'Libertempo : ' . _('button_admin_mode'), $add_css); include ROOT_PATH . 'fonctions_javascript.php'; /*********************************/ /* AFFICHAGE DES ONGLETS... */ /*********************************/ echo '<div id="onglet_menu">'; foreach ($onglets as $key => $title) { echo '<div class="onglet ' . ($onglet == $key ? ' active' : '') . '" > <a href="' . $PHP_SELF . '?session=' . $session . '&onglet=' . $key . '">' . $title . '</a> </div>'; } echo '</div>'; /*********************************/ /* AFFICHAGE DE L'ONGLET ... */ /*********************************/ /** initialisation des tableaux des types de conges/absences **/