示例#1
0
 /**
  * Encapsule le comportement du module de l'export VCALENDAR
  *
  * @param string $session
  *
  * @return void
  * @access public
  * @static
  */
 public static function exportVCalendarModule($session)
 {
     /*** initialisation des variables ***/
     $session = session_id();
     /************************************/
     /*************************************/
     // recup des parametres reçus :
     // SERVER
     $PHP_SELF = $_SERVER['PHP_SELF'];
     // GET	/ POST
     $action = getpost_variable('action');
     $user_login = getpost_variable('user_login');
     $date_debut = getpost_variable('date_debut');
     $date_fin = getpost_variable('date_fin');
     $choix_format = getpost_variable('choix_format');
     /*************************************/
     \export\Fonctions::form_saisie($user_login, $date_debut, $date_fin);
 }
示例#2
0
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';
/*** initialisation des variables ***/
$session = session_id();
/************************************/
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET	/ POST
$action = getpost_variable('action');
$new_mois = getpost_variable('new_mois', date("m"));
$new_year = getpost_variable('new_year', date("Y"));
/*************************************/
form_saisie($action, $new_mois, $new_year);
/*******************************************************************************/
/**********  FONCTIONS  ********************************************************/
function form_saisie($action, $new_mois, $new_year)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
    $session = session_id();
    header_popup();
    if ($action == "imprim") {
        ouvre_calendrier($new_mois, $new_year);
    }
    echo "<center>\n";
    echo "<h3>" . _('imprim_calendrier_titre') . "</h3>\n";
    echo "<form action=\"{$PHP_SELF}?session={$session}\" method=\"POST\">\n";
示例#3
0
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');
    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';
示例#4
0
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';
if ($_SESSION['config']['where_to_find_user_email'] == "ldap") {
    include CONFIG_PATH . 'config_ldap.php';
}
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$onglet = getpost_variable('onglet');
/*********************************/
/*   COMPOSITION DES ONGLETS...  */
/*********************************/
$onglets = array();
if ($_SESSION['config']['user_saisie_demande'] || $_SESSION['config']['user_saisie_mission']) {
    $onglets['nouvelle_absence'] = _('divers_nouvelle_absence');
}
if ($_SESSION['config']['user_echange_rtt']) {
    $onglets['echange_jour_absence'] = _('user_onglet_echange_abs');
}
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');
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');
//var pour resp_traite_demande_all.php
$tab_bt_radio = getpost_variable('tab_bt_radio');
$tab_text_refus = getpost_variable('tab_text_refus');
// titre
echo '<h2>' . _('resp_traite_demandes_titre') . '</h2>';
// si le tableau des bouton radio des demandes est vide , on affiche les demandes en cours
if ($tab_bt_radio == '') {
    affiche_all_demandes_en_cours($tab_type_cong, $DEBUG);
} else {
    traite_all_demande_en_cours($tab_bt_radio, $tab_text_refus, $DEBUG);
    redirect(ROOT_PATH . 'hr/hr_index.php?session=' . $session . '&onglet=' . $onglet, false);
    exit;
}
/********************************************/
/*   FONCTIONS   */
function affiche_all_demandes_en_cours($tab_type_conges, $DEBUG = FALSE)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
示例#6
0
    $tab_new_user[0]['is_hr'] = getpost_variable('new_is_hr');
    $tab_new_user[0]['see_all'] = getpost_variable('new_see_all');
    if ($_SESSION['config']['how_to_connect_user'] == "dbconges") {
        $tab_new_user[0]['password1'] = getpost_variable('new_password1');
        $tab_new_user[0]['password2'] = getpost_variable('new_password2');
    }
    $tab_new_user[0]['email'] = getpost_variable('new_email');
    $tab_new_jours_an = getpost_variable('tab_new_jours_an');
    $tab_new_solde = getpost_variable('tab_new_solde');
    $tab_checkbox_sem_imp = getpost_variable('tab_checkbox_sem_imp');
    $tab_checkbox_sem_p = getpost_variable('tab_checkbox_sem_p');
    $tab_new_user[0]['new_jour'] = getpost_variable('new_jour');
    $tab_new_user[0]['new_mois'] = getpost_variable('new_mois');
    $tab_new_user[0]['new_year'] = getpost_variable('new_year');
}
$checkbox_user_groups = getpost_variable('checkbox_user_groups');
/* FIN de la recup des parametres    */
/*************************************/
if ($saisie_user == "ok") {
    if ($_SESSION['config']['export_users_from_ldap']) {
        foreach ($tab_login as $login) {
            ajout_user($tab_new_user[$login], $tab_checkbox_sem_imp, $tab_checkbox_sem_p, $tab_new_jours_an, $tab_new_solde, $checkbox_user_groups, $DEBUG);
        }
    } else {
        ajout_user($tab_new_user[0], $tab_checkbox_sem_imp, $tab_checkbox_sem_p, $tab_new_jours_an, $tab_new_solde, $checkbox_user_groups, $DEBUG);
    }
} else {
    affiche_formulaire_ajout_user($tab_new_user[0], $tab_new_jours_an, $tab_new_solde, $onglet, $DEBUG);
}
/*********************************************************************************/
/*  FONCTIONS   */
示例#7
0
// verif des droits du user à afficher la page
verif_droits_user($session, "is_admin", $DEBUG);
if ($DEBUG) {
    echo "SESSION = ";
    print_r($_SESSION);
    echo "<br>\n";
}
/*** initialisation des variables ***/
/************************************/
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$action = getpost_variable('action', "");
$login_par = getpost_variable('login_par', "");
/*************************************/
header_popup('CONGES : Configuration');
if ($action == "suppr_logs") {
    confirmer_vider_table_logs($session, $DEBUG);
} elseif ($action == "commit_suppr_logs") {
    commit_vider_table_logs($session, $DEBUG);
} else {
    affichage($login_par, $session, $DEBUG);
}
bottom();
/**************************************************************************************/
/**********  FONCTIONS  ***************************************************************/
function affichage($login_par, $session, $DEBUG = FALSE)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
示例#8
0
 /**
  * Encapsule le comportement du module d'ajout d'utilisateurs
  *
  * @param string $onglet
  *
  * @return void
  * @access public
  * @static
  */
 public static function ajoutUtilisateurModule($onglet)
 {
     $saisie_user = getpost_variable('saisie_user');
     $return = '';
     // si on recupere les users dans ldap et qu'on vient d'en créer un depuis la liste déroulante
     if ($_SESSION['config']['export_users_from_ldap'] && isset($_POST['new_ldap_user'])) {
         $index = 0;
         // On lance une boucle pour selectionner tous les items
         // traitements : $login contient les valeurs successives
         foreach ($_POST['new_ldap_user'] as $login) {
             $tab_login[$index] = $login;
             $index++;
             // cnx à l'annuaire ldap :
             $ds = ldap_connect($_SESSION['config']['ldap_server']);
             ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
             // Support Active Directory
             ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
             if ($_SESSION['config']['ldap_user'] == "") {
                 $bound = ldap_bind($ds);
             } else {
                 $bound = ldap_bind($ds, $_SESSION['config']['ldap_user'], $_SESSION['config']['ldap_pass']);
             }
             // recherche des entrées :
             $filter = "(" . $_SESSION['config']['ldap_login'] . "=" . $login . ")";
             $sr = ldap_search($ds, $_SESSION['config']['searchdn'], $filter);
             $data = ldap_get_entries($ds, $sr);
             foreach ($data as $info) {
                 $tab_new_user[$login]['login'] = $login;
                 $ldap_libelle_prenom = $_SESSION['config']['ldap_prenom'];
                 $ldap_libelle_nom = $_SESSION['config']['ldap_nom'];
                 $tab_new_user[$login]['prenom'] = utf8_decode($info[$ldap_libelle_prenom][0]);
                 $tab_new_user[$login]['nom'] = utf8_decode($info[$ldap_libelle_nom][0]);
                 $ldap_libelle_mail = $_SESSION['config']['ldap_mail'];
                 $tab_new_user[$login]['email'] = $info[$ldap_libelle_mail][0];
             }
             $tab_new_user[$login]['quotite'] = getpost_variable('new_quotite');
             $tab_new_user[$login]['is_resp'] = getpost_variable('new_is_resp');
             $tab_new_user[$login]['resp_login'] = getpost_variable('new_resp_login');
             $tab_new_user[$login]['is_admin'] = getpost_variable('new_is_admin');
             $tab_new_user[$login]['is_hr'] = getpost_variable('new_is_hr');
             $tab_new_user[$login]['see_all'] = getpost_variable('new_see_all');
             if ($_SESSION['config']['how_to_connect_user'] == "dbconges") {
                 $tab_new_user[$login]['password1'] = getpost_variable('new_password1');
                 $tab_new_user[$login]['password2'] = getpost_variable('new_password2');
             }
             $tab_new_jours_an = getpost_variable('tab_new_jours_an');
             $tab_new_solde = getpost_variable('tab_new_solde');
             $tab_checkbox_sem_imp = getpost_variable('tab_checkbox_sem_imp');
             $tab_checkbox_sem_p = getpost_variable('tab_checkbox_sem_p');
             $tab_new_user[$login]['new_jour'] = getpost_variable('new_jour');
             $tab_new_user[$login]['new_mois'] = getpost_variable('new_mois');
             $tab_new_user[$login]['new_year'] = getpost_variable('new_year');
         }
     } else {
         $tab_new_user[0]['login'] = getpost_variable('new_login');
         $tab_new_user[0]['nom'] = getpost_variable('new_nom');
         $tab_new_user[0]['prenom'] = getpost_variable('new_prenom');
         $tab_new_user[0]['quotite'] = getpost_variable('new_quotite');
         $tab_new_user[0]['is_resp'] = getpost_variable('new_is_resp');
         $tab_new_user[0]['resp_login'] = getpost_variable('new_resp_login');
         $tab_new_user[0]['is_admin'] = getpost_variable('new_is_admin');
         $tab_new_user[0]['is_hr'] = getpost_variable('new_is_hr');
         $tab_new_user[0]['see_all'] = getpost_variable('new_see_all');
         if ($_SESSION['config']['how_to_connect_user'] == "dbconges") {
             $tab_new_user[0]['password1'] = getpost_variable('new_password1');
             $tab_new_user[0]['password2'] = getpost_variable('new_password2');
         }
         $tab_new_user[0]['email'] = getpost_variable('new_email');
         $tab_new_jours_an = getpost_variable('tab_new_jours_an');
         $tab_new_solde = getpost_variable('tab_new_solde');
         $tab_checkbox_sem_imp = getpost_variable('tab_checkbox_sem_imp');
         $tab_checkbox_sem_p = getpost_variable('tab_checkbox_sem_p');
         $tab_new_user[0]['new_jour'] = getpost_variable('new_jour');
         $tab_new_user[0]['new_mois'] = getpost_variable('new_mois');
         $tab_new_user[0]['new_year'] = getpost_variable('new_year');
     }
     $checkbox_user_groups = getpost_variable('checkbox_user_groups');
     /* FIN de la recup des parametres    */
     /*************************************/
     if ($saisie_user == "ok") {
         if ($_SESSION['config']['export_users_from_ldap']) {
             foreach ($tab_login as $login) {
                 $return .= \admin\Fonctions::ajout_user($tab_new_user[$login], $tab_checkbox_sem_imp, $tab_checkbox_sem_p, $tab_new_jours_an, $tab_new_solde, $checkbox_user_groups);
             }
         } else {
             $return .= \admin\Fonctions::ajout_user($tab_new_user[0], $tab_checkbox_sem_imp, $tab_checkbox_sem_p, $tab_new_jours_an, $tab_new_solde, $checkbox_user_groups);
         }
     } else {
         $return .= \admin\Fonctions::affiche_formulaire_ajout_user($tab_new_user[0], $tab_new_jours_an, $tab_new_solde, $onglet);
     }
     return $return;
 }
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());
/*************************************/
// recup des parametres reçus :
$group = getpost_variable('group');
$group_to_update = getpost_variable('group_to_update');
$new_groupname = getpost_variable('new_groupname');
$new_comment = getpost_variable('new_comment');
$new_double_valid = getpost_variable('new_double_valid');
/*************************************/
// TITRE
echo "<H1>" . _('admin_modif_groupe_titre') . "</H1>\n\n";
if ($group != "") {
    modifier($group, $onglet, $DEBUG);
} elseif ($group_to_update != "") {
    commit_update($group_to_update, $new_groupname, $new_comment, $new_double_valid, $DEBUG);
} else {
    // renvoit sur la page principale .
    redirect(ROOT_PATH . 'admin/admin_index.php?session=' . $session . '&onglet=admin-group', false);
}
/**************************************************************************************/
/**********  FONCTIONS  ***************************************************************/
function modifier($group, $onglet, $DEBUG = FALSE)
{
示例#10
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;
 }
示例#11
0
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 'fonctions_edition.php';
//$DEBUG = TRUE ;
$DEBUG = FALSE;
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$user_login = getpost_variable('user_login', $_SESSION['userlogin']);
/*************************************/
if ($user_login != $_SESSION['userlogin'] && !is_hr($_SESSION['userlogin']) && !is_resp_of_user($_SESSION['userlogin'], $user_login)) {
    redirect(ROOT_PATH . 'deconnexion.php');
    exit;
}
/************************************/
header_popup(_('editions_titre') . ' : ' . $user_login);
affichage($user_login, $DEBUG);
bottom();
/**************************************************************************************/
/********  FONCTIONS      ******/
/**************************************************************************************/
function affichage($login, $DEBUG = FALSE)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
示例#12
0
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');
$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 ($DEBUG) {
    echo "_FILES = <br>\n";
    print_r($_FILES);
    echo "<br>\n";
示例#13
0
$session = session_id();
$user = "";
$date_debut = "";
$date_fin = "";
$p_num = "";
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET  / POST
$user = getpost_variable('user');
$date_debut = getpost_variable('date_debut');
$date_fin = getpost_variable('date_fin');
$opt_debut = getpost_variable('opt_debut');
$opt_fin = getpost_variable('opt_fin');
$p_num = getpost_variable('p_num');
/*************************************/
if ($user != "" && $date_debut != "" && $date_fin != "" && $opt_debut != "" && $opt_fin != "") {
    affichage($user, $date_debut, $date_fin, $opt_debut, $opt_fin, $p_num);
}
/**********  FONCTIONS  ****************************************/
function affichage($user, $date_debut, $date_fin, $opt_debut, $opt_fin, $p_num = "")
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
    $session = session_id();
    $comment = "&nbsp;";
    // calcul :
    $nb_jours = compter($user, $p_num, $date_debut, $date_fin, $opt_debut, $opt_fin, $comment);
    $tab['nb'] = $nb_jours;
    $tab['comm'] = $comment;
    if (!$_SESSION['config']['rempli_auto_champ_nb_jours_pris']) {
示例#14
0
*************************************************************************************************
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');
/*************************************/
// recup des parametres reçus :
$u_login = getpost_variable('u_login');
$u_login_to_delete = getpost_variable('u_login_to_delete');
/*************************************/
// TITRE
if ($u_login != "") {
    $login_titre = $u_login;
} elseif ($u_login_to_delete != "") {
    $login_titre = $u_login_to_delete;
}
echo "<H1>" . _('admin_suppr_user_titre') . " : {$login_titre} .</H1>\n\n";
if ($u_login != "") {
    confirmer($u_login, $onglet, $DEBUG);
} elseif ($u_login_to_delete != "") {
    suppression($u_login_to_delete, $DEBUG);
    redirect(ROOT_PATH . 'admin/admin_index.php?session=' . $session . '&onglet=admin-users', false);
    exit;
} else {
示例#15
0
 /**
  * Encapsule le comportement du module de traitement des congés des utilisateurs sous la responsabilité du responsable
  *
  * @return void
  * @access public
  * @static
  */
 public static function traitementDemandesModule($tab_type_cong)
 {
     //var pour resp_traite_demande_all.php
     $tab_bt_radio = getpost_variable('tab_bt_radio');
     $tab_text_refus = getpost_variable('tab_text_refus');
     $return = '';
     // titre
     $return .= '<h1>' . _('resp_traite_demandes_titre') . '</h1>';
     // si le tableau des bouton radio des demandes est vide , on affiche les demandes en cours
     if ($tab_bt_radio == "") {
         $return .= \responsable\Fonctions::affiche_all_demandes_en_cours($tab_type_cong);
     } else {
         $return .= \responsable\Fonctions::traite_all_demande_en_cours($tab_bt_radio, $tab_text_refus);
     }
     return $return;
 }
示例#16
0
}
/*****************************************************************/
if (isset($_SESSION['userlogin'])) {
    $request = "SELECT u_nom, u_passwd, u_prenom, u_is_resp FROM conges_users where u_login = '******'userlogin']) . "' ";
    $rs = SQL::query($request);
    if ($rs->num_rows != 1) {
        redirect(ROOT_PATH . 'index.php');
    } else {
        $session = session_id();
        $row = $rs->fetch_array();
        $NOM = $row["u_nom"];
        $PRENOM = $row["u_prenom"];
        $is_resp = $row["u_is_resp"];
        // si le login est celui d'un responsable ET on est pas en mode "responsable virtuel"
        // OU on est en mode "responsable virtuel" avec login= celui du resp virtuel
        $return_url = getpost_variable('return_url');
        if (!empty($return_url)) {
            if (strpos($return_url, '?')) {
                redirect(ROOT_PATH . $return_url . '&session=' . $session);
            } else {
                redirect(ROOT_PATH . $return_url . '?session=' . $session);
            }
        } elseif ($is_resp == "Y" && $_SESSION['config']['responsable_virtuel'] == FALSE || $_SESSION['config']['responsable_virtuel'] && $session_username == "conges") {
            // redirection vers responsable/resp_index.php
            redirect(ROOT_PATH . 'responsable/resp_index.php?session=' . $session);
        } else {
            // redirection vers utilisateur/user_index.php
            redirect(ROOT_PATH . 'utilisateur/user_index.php?session=' . $session);
        }
    }
}
示例#17
0
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 'fonctions_edition.php';
include ROOT_PATH . 'fonctions_conges.php';
include INCLUDE_PATH . 'fonction.php';
include INCLUDE_PATH . 'session.php';
//$DEBUG = TRUE ;
$DEBUG = FALSE;
/*************************************/
// recup des parametres reçus :
// GET / POST
$user_login = getpost_variable('user_login');
$edit_id = getpost_variable('edit_id', 0);
/*************************************/
if ($user_login != $_SESSION['userlogin'] && !is_hr($_SESSION['userlogin']) && !is_resp_of_user($_SESSION['userlogin'], $user_login)) {
    redirect(ROOT_PATH . 'deconnexion.php');
    exit;
}
/************************************/
$css = '<link href="' . TEMPLATE_PATH . 'style_calendar_edition.css" rel="stylesheet" type="text/css">';
header_popup(_('editions_etat_conges') . ' : ' . $user_login, $css);
$session = session_id();
if ($edit_id == 0) {
    // si c'est une nouvelle édition, on insert dans la base avant d'éditer et on renvoit l'id de l'édition
    $edit_id = enregistrement_edition($user_login, $DEBUG);
}
if ($edit_id != "0101010") {
    edition($user_login, $edit_id, $session, $DEBUG);
示例#18
0
$p_num = getpost_variable('p_num');
$onglet = getpost_variable('onglet');
$p_num_to_update = getpost_variable('p_num_to_update');
$p_etat = getpost_variable('p_etat');
$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');
//conversion des dates
$new_debut = convert_date($new_debut);
$new_fin = convert_date($new_fin);
if ($_SESSION['config']['disable_saise_champ_nb_jours_pris']) {
    $new_nb_jours = compter($user_login, $p_num_to_update, $new_debut, $new_fin, $new_demi_jour_deb, $new_demi_jour_fin, $new_comment, $DEBUG);
} else {
    $new_nb_jours = getpost_variable('new_nb_jours');
}
/*************************************/
// TITRE
echo '<h1>' . _('user_modif_demande_titre') . '</h1>';
if ($p_num != "") {
    confirmer($p_num, $onglet, $DEBUG);
} else {
    if ($p_num_to_update != "") {
        modifier($p_num_to_update, $new_debut, $new_demi_jour_deb, $new_fin, $new_demi_jour_fin, $new_nb_jours, $new_comment, $p_etat, $onglet, $DEBUG);
    } else {
        // renvoit sur la page principale .
        redirect(ROOT_PATH . 'utilisateur/user_index.php', false);
    }
}
/********************************************************************************************************/
示例#19
0
    $tab_commentaire_saisie = getpost_variable('tab_commentaire_saisie');
    ajout_conges($tab_champ_saisie, $tab_commentaire_saisie, $DEBUG);
    redirect(ROOT_PATH . 'hr/hr_index.php?session=' . $session, false);
    exit;
} elseif ($ajout_global == "TRUE") {
    $tab_new_nb_conges_all = getpost_variable('tab_new_nb_conges_all');
    $tab_calcul_proportionnel = getpost_variable('tab_calcul_proportionnel');
    $tab_new_comment_all = getpost_variable('tab_new_comment_all');
    ajout_global($tab_new_nb_conges_all, $tab_calcul_proportionnel, $tab_new_comment_all, $DEBUG);
    redirect(ROOT_PATH . 'hr/hr_index.php?session=' . $session, false);
    exit;
} elseif ($ajout_groupe == "TRUE") {
    $tab_new_nb_conges_all = getpost_variable('tab_new_nb_conges_all');
    $tab_calcul_proportionnel = getpost_variable('tab_calcul_proportionnel');
    $tab_new_comment_all = getpost_variable('tab_new_comment_all');
    $choix_groupe = getpost_variable('choix_groupe');
    ajout_global_groupe($choix_groupe, $tab_new_nb_conges_all, $tab_calcul_proportionnel, $tab_new_comment_all, $DEBUG);
    redirect(ROOT_PATH . 'hr/hr_index.php?session=' . $session, false);
    exit;
} else {
    saisie_ajout($tab_type_cong, $DEBUG);
}
/************************************************************************/
/*** FONCTIONS ***/
function saisie_ajout($tab_type_conges, $DEBUG)
{
    //$DEBUG;
    $PHP_SELF = $_SERVER['PHP_SELF'];
    $session = session_id();
    // recup du tableau des types de conges (seulement les congesexceptionnels )
    if ($_SESSION['config']['gestion_conges_exceptionnels']) {
示例#20
0
defined( '_PHP_CONGES' ) or die( 'Restricted access' );



	//var pour resp_ajout_conges_all.php
	$ajout_conges            = getpost_variable('ajout_conges');
	$tab_champ_saisie        = getpost_variable('tab_champ_saisie');
	$tab_commentaire_saisie        = getpost_variable('tab_commentaire_saisie');
	//$tab_champ_saisie_rtt    = getpost_variable('tab_champ_saisie_rtt') ;
	$ajout_global            = getpost_variable('ajout_global');
	$ajout_groupe            = getpost_variable('ajout_groupe');
	$choix_groupe            = getpost_variable('choix_groupe');
	$tab_new_nb_conges_all   = getpost_variable('tab_new_nb_conges_all');
	$tab_calcul_proportionnel = getpost_variable('tab_calcul_proportionnel');
	$tab_new_comment_all     = getpost_variable('tab_new_comment_all');
	
	
	if( $DEBUG ) { echo "tab_new_nb_conges_all = <br>"; print_r($tab_new_nb_conges_all); echo "<br>\n" ;}
	if( $DEBUG ) { echo "tab_calcul_proportionnel = <br>"; print_r($tab_calcul_proportionnel); echo "<br>\n" ;}
	
	
	// titre
	echo "<H2>". _('resp_ajout_conges_titre') ."</H2>\n\n";
	//connexion mysql
	
	if($ajout_conges=="TRUE")
	{
		ajout_conges($tab_champ_saisie, $tab_commentaire_saisie, $DEBUG);
	}
	elseif($ajout_global=="TRUE")
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');
if ($_SESSION['config']['where_to_find_user_email'] == "ldap") {
    include CONFIG_PATH . 'config_ldap.php';
}
$tri_date = getpost_variable('tri_date', "ascendant");
$year_affichage = getpost_variable('year_affichage', date("Y"));
echo '<h1>' . _('user_historique_conges') . '</h1>';
//affiche le tableau de l'hitorique des conges
// affichage de l'année et des boutons de défilement
$year_affichage_prec = $year_affichage - 1;
$year_affichage_suiv = $year_affichage + 1;
echo "<b>";
echo "<a href=\"{$PHP_SELF}?session={$session}&onglet=historique_conges&year_affichage={$year_affichage_prec}\"><<</a>";
echo '&nbsp&nbsp&nbsp  ' . schars($year_affichage) . ' &nbsp&nbsp&nbsp';
echo '<a href="' . schars($PHP_SELF) . '?session=' . schars($session) . '&onglet=historique_conges&year_affichage=' . schars($year_affichage_suiv) . '">>></a>';
echo "</b><br><br>\n";
// Récupération des informations
// on ne recup QUE les periodes de type "conges"(cf table conges_type_absence) ET pas les demandes
$sql2 = "SELECT p_login, p_date_deb, p_demi_jour_deb, p_date_fin, p_demi_jour_fin, p_nb_jours, p_commentaire, p_type, p_etat, p_motif_refus, p_date_demande, p_date_traitement, ta_libelle\n\t\t\t FROM conges_periode as a, conges_type_absence as b\n\t\t\tWHERE a.p_login = '******'userlogin'] . "'\n\t\t\tAND (a.p_type=b.ta_id)\n\t\t\tAND ( (b.ta_type='conges') OR (b.ta_type='conges_exceptionnels') )\n\t\t\tAND (p_etat='ok' OR  p_etat='refus' OR  p_etat='annul')\n\t\t\tAND (p_date_deb LIKE '{$year_affichage}%' OR p_date_fin LIKE '{$year_affichage}%') ";
if ($tri_date == "descendant") {
    $sql2 = $sql2 . " ORDER BY p_date_deb DESC ";
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' );


if($_SESSION['config']['where_to_find_user_email']=="ldap"){ include CONFIG_PATH .'config_ldap.php';}


	$change_passwd = getpost_variable('change_passwd', 0);
	$new_passwd1 = getpost_variable('new_passwd1');
	$new_passwd2 = getpost_variable('new_passwd2');


	
	if($change_passwd==1) {
		change_passwd($new_passwd1, $new_passwd2, $DEBUG);
	}
	else {
		$PHP_SELF=$_SERVER['PHP_SELF'];
		$session=session_id();

	
	
		echo '<h1>'. _('user_change_password') .' :</h1>';

		echo '<form action="'.$PHP_SELF.'?session='.$session.'&onglet='.$onglet.'" method="POST">';
示例#23
0
    $tab_new_solde = getpost_variable('tab_new_solde');
    $tab_new_reliquat = getpost_variable('tab_new_reliquat');
    $tab_new_user['login'] = getpost_variable('new_login');
    $tab_new_user['nom'] = getpost_variable('new_nom');
    $tab_new_user['prenom'] = getpost_variable('new_prenom');
    $tab_new_user['quotite'] = getpost_variable('new_quotite');
    $tab_new_user['is_resp'] = getpost_variable('new_is_resp');
    $tab_new_user['resp_login'] = getpost_variable('new_resp_login');
    $tab_new_user['is_admin'] = getpost_variable('new_is_admin');
    $tab_new_user['is_hr'] = getpost_variable('new_is_hr');
    $tab_new_user['is_active'] = getpost_variable('new_is_active');
    $tab_new_user['see_all'] = getpost_variable('new_see_all');
    $tab_new_user['email'] = getpost_variable('new_email');
    $tab_new_user['jour'] = getpost_variable('new_jour');
    $tab_new_user['mois'] = getpost_variable('new_mois');
    $tab_new_user['year'] = getpost_variable('new_year');
    commit_update($u_login_to_update, $tab_new_user, $tab_new_jours_an, $tab_new_solde, $tab_new_reliquat, $tab_checkbox_sem_imp, $tab_checkbox_sem_p, $DEBUG);
    redirect(ROOT_PATH . 'admin/admin_index.php?session=' . $session . '&onglet=admin-users', false);
    exit;
} else {
    // renvoit sur la page principale .
    redirect(ROOT_PATH . 'admin/admin_index.php?session=' . $session . '&onglet=admin-users', false);
    exit;
}
/*************************************************************************************************/
/*   FONCTIONS    */
/*************************************************************************************************/
function modifier($u_login, $tab_checkbox_sem_imp, $tab_checkbox_sem_p, $onglet, $DEBUG = FALSE)
{
    $PHP_SELF = $_SERVER['PHP_SELF'];
    $session = session_id();
示例#24
0
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'] )
$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';
}
/*********************************/
示例#25
0
$content .= '<link href="' . TEMPLATE_PATH . 'style_calendar_edition.css" rel="stylesheet" media="screen, print" type="text/css"><style type="text/css" media="print">@media print{@page {size: landscape}}</style>\\n';
$content .= "</head>\n";
$content .= "<body>\n";
//<center>';
/*************************************/
// recup des parametres reçus :
// SERVER
$PHP_SELF = $_SERVER['PHP_SELF'];
// GET / POST
$selected = getpost_variable('selected');
$printable = getpost_variable('printable', 0);
$year = getpost_variable('year', date("Y"));
$mois = getpost_variable('mois', date("n"));
$first_jour = getpost_variable('first_jour', 1);
//	$first_load    = getpost_variable('first_load', "Y") ;
$select_groupe = getpost_variable('select_groupe', 0);
/*************************************/
// on initialise le tableau global des jours fériés s'il ne l'est pas déjà :
if (!isset($_SESSION["tab_j_feries"])) {
    init_tab_jours_feries();
    //print_r($_SESSION["tab_j_feries"]);   // verif DEBUG
}
// renvoit un tableau de tableau contenant les infos des types de conges et absences
$tab_type_absence = recup_tableau_tout_types_abs($DEBUG);
//	$content .= "<hr align=\"center\" size=\"2\" width=\"90%\"> \n";
$jour_today = date("j");
$mois_today = date("m");
$year_today = date("Y");
$timestamp_today = mktime(0, 0, 0, $mois_today, $jour_today, $year_today);
$mois_timestamp = mktime(0, 0, 0, $mois, 1, $year);
$nom_mois = date_fr("F", $mois_timestamp);
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' );


	$choix_groupe            = getpost_variable('choix_groupe');
	$cloture_users           = getpost_variable('cloture_users');
	$cloture_globale         = getpost_variable('cloture_globale');
	$cloture_groupe          = getpost_variable('cloture_groupe');
	$tab_cloture_users       = getpost_variable('tab_cloture_users');
	$tab_commentaire_saisie       = getpost_variable('tab_commentaire_saisie');
	/*************************************/
	
	header_popup( $_SESSION['config']['titre_resp_index'] );

	
	/*************************************/
	/***  suite de la page             ***/
	/*************************************/
	
	/** initialisation des tableaux des types de conges/absences  **/
	// recup du tableau des types de conges (conges et congesexceptionnels)
	// on concatene les 2 tableaux
	$tab_type_cong = ( recup_tableau_types_conges( $DEBUG) + recup_tableau_types_conges_exceptionnels( $DEBUG)  );

	// titre
示例#27
0
}
// on initialise le tableau des variables de config
include INCLUDE_PATH . 'session.php';
$session = isset($_GET['session']) ? $_GET['session'] : (isset($_POST['session']) ? $_POST['session'] : "");
//$DEBUG = TRUE ;
$DEBUG = FALSE;
// 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
$action = getpost_variable('action');
$tab_new_values = getpost_variable('tab_new_values');
/*************************************/
if ($DEBUG) {
    print_r($tab_new_values);
    echo "<br>\n";
    echo "{$action}<br>\n";
}
header_popup('CONGES : Configuration');
/*********************************/
/*********************************/
if ($action == "modif") {
    commit_modif($tab_new_values, $session, $DEBUG);
}
affichage($tab_new_values, $session, $DEBUG);
/*********************************/
/*********************************/
示例#28
0
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');
$group = getpost_variable('group');
$group_to_delete = getpost_variable('group_to_delete');
/*************************************/
// TITRE
echo "<H1>" . _('admin_suppr_groupe_titre') . "</H1>\n";
if ($group != "") {
    confirmer($group, $onglet, $DEBUG);
} elseif ($group_to_delete != "") {
    suppression_group($group_to_delete, $DEBUG);
} else {
    // renvoit sur la page principale .
    redirect(ROOT_PATH . 'admin/admin_index.php?session=' . $session . '&onglet=admin-group', false);
}
/**************************************************************************************/
/**********  FONCTIONS  ***************************************************************/
function confirmer($group, $onglet, $DEBUG = FALSE)
{
示例#29
0
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";
}
// 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";
}
// on initialise le tableau des variables de config
include INCLUDE_PATH . 'session.php';
//$DEBUG = TRUE ;
$DEBUG = FALSE;
// 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
$action = getpost_variable('action');
$tab_new_values = getpost_variable('tab_new_values');
$id_to_update = getpost_variable('id_to_update');
/*************************************/
if ($DEBUG) {
    print_r($tab_new_values);
    echo "<br>\n";
    echo "{$action}<br>\n";
    echo "{$id_to_update}<br>\n";
}
header_popup('CONGES : Configuration');
/*********************************/
/*********************************/
if ($action == "new") {
    commit_ajout($tab_new_values, $session, $DEBUG);
} elseif ($action == "modif") {
    modifier($tab_new_values, $session, $id_to_update, $DEBUG);
} elseif ($action == "commit_modif") {