Subversion Repositories Applications.gtt

Compare Revisions

Ignore whitespace Rev 66 → Rev 67

/trunk/actions/GttCtrlActionAdminUtilisateur.class.php
126,7 → 126,7
$aso_admin_utilisateur['messages'][] = 'Les mots de passe saisies ne sont pas identique !';
$bool = false;
}
if ($_POST['ut_temps_de_travail'] > 24) {
if ($_POST['ut_temps_de_travail_jour'] > 24) {
$aso_admin_utilisateur['messages'][] = 'Il est impossible que le temps de travail soit supérieur à 24h !';
$bool = false;
}
186,7 → 186,8
$Utilisateur->setPassword($_POST['ut_mot_de_passe']);
//$Utilisateur->setCeStatut($_POST['ut_statut']);
$Utilisateur->setCongesPayes($_POST['ut_conges_payes']);
$Utilisateur->setTempsDeTravail($_POST['ut_temps_de_travail']);
$Utilisateur->setTempsDeTravailJour($_POST['ut_temps_de_travail_jour']);
$Utilisateur->setTempsDeTravailMois($_POST['ut_temps_de_travail_mois']);
$Utilisateur->setQuotaHeuresSupp($_POST['ut_quota_heures_supp']);
$Utilisateur->setMarkAdmin($_POST['ut_mark_admin']);
$Utilisateur->setMarkRecapitulatif($_POST['ut_mark_recapitulatif']);
210,7 → 211,8
$Utilisateur->setPassword($_POST['ut_mot_de_passe']);
//$Utilisateur->setCeStatut($_POST['ut_statut']);
$Utilisateur->setCongesPayes($_POST['ut_conges_payes']);
$Utilisateur->setTempsDeTravail($_POST['ut_temps_de_travail']);
$Utilisateur->setTempsDeTravailJour($_POST['ut_temps_de_travail_jour']);
$Utilisateur->setTempsDeTravailMois($_POST['ut_temps_de_travail_mois']);
$Utilisateur->setQuotaHeuresSupp($_POST['ut_quota_heures_supp']);
$Utilisateur->setMarkAdmin($_POST['ut_mark_admin']);
$Utilisateur->setMarkRecapitulatif($_POST['ut_mark_recapitulatif']);
/trunk/actions/GttCtrlActionGestion.class.php
115,7 → 115,7
$aso_gestion['sj_'.$num]['jour'] = $j->thisDay();
$aso_gestion['sj_'.$num]['mois'] = $Calendrier->getNomMois($j->thisMonth());
$aso_gestion['sj_'.$num]['annee'] = $j->thisYear();
$aso_gestion['sj_'.$num]['mysql'] = $aso_gestion['sj_'.$num]['annee'].'-'.sprintf("%02s", $j->thisMonth()).'-'.$aso_gestion['sj_'.$num]['jour'];
$aso_gestion['sj_'.$num]['mysql'] = $aso_gestion['sj_'.$num]['annee'].'-'.sprintf("%02s", $j->thisMonth()).'-'.sprintf("%02s", $aso_gestion['sj_'.$num]['jour']);
$aso_jours[$aso_gestion['sj_'.$num]['mysql']] = $num;
$aso_tps_w_vide[$num] = '';
}
126,61 → 126,66
// Récupération des infos sur l'utilisateur
$aso_gestion['conges_payes'] = $GLOBALS['_GTT_']['Utilisateur']->getCongesPayes();
$aso_gestion['rtt'] = $GLOBALS['_GTT_']['Utilisateur']->getQuotaHeuresSupp();
$aso_gestion['tps_w'] = $GLOBALS['_GTT_']['Utilisateur']->getTempsDeTravail();
$aso_gestion['tps_w'] = $GLOBALS['_GTT_']['Utilisateur']->getTempsDeTravailJour();
 
// Récupération des projets sur lesquels l'utilisateur travaille
$UtilsateurAProjet = new UtilisateurAProjet();
$tab_uap = $UtilsateurAProjet->consulter(UtilisateurAProjet::GUAP_UTILISATEUR, $GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
$tab_projet_id = array();
foreach ($tab_uap as $uap) {
$tab_projet_id[] = $uap->getIdProjet();
}
// Si nous avons des données...
$aso_gestion['bool_projets'] = false;
if ($tab_uap && count($tab_uap) >= 1) {
$aso_gestion['bool_projets'] = true;
$tab_projet_id = array();
foreach ($tab_uap as $uap) {
$tab_projet_id[] = $uap->getIdProjet();
}
 
// Récupération du temps de travail pour un utilisateur à une date donnée
$TravailProjet = new TravailProjet();
$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_gestion['sj_1']['mysql'], $aso_gestion['sj_7']['mysql']);
$tab_tp = $TravailProjet->consulter($cmd, $param);
if ($tab_tp && count($tab_tp) == 1) {
$tab_tp = array($tab_tp);
}
// Récupération du temps de travail pour un utilisateur à une date donnée
$TravailProjet = new TravailProjet();
$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_gestion['sj_1']['mysql'], $aso_gestion['sj_7']['mysql']);
$tab_tp = $TravailProjet->consulter($cmd, $param);
if ($tab_tp && count($tab_tp) == 1) {
$tab_tp = array($tab_tp);
}
 
// Récupération des infos sur les projets de l'utilisateur
$aso_gestion['totaux'] = $aso_tps_w_vide;
$Projet = new Projet();
$tab_p = $Projet->consulter(Projet::GP_ID_LIST, array(implode(',', $tab_projet_id)));
foreach ($tab_p as $Projet) {
 
// Récupération de la catégorie du projet
$ProjetCategorie = new ProjetCategorie();
$cmd = ProjetCategorie::GPC_ID;
$param = $Projet->getCeCategorie();
$Categorie = $ProjetCategorie->consulter($cmd, $param);
 
// Nous vérifions le temps de travail pour ce projet pour la semaine courrante
$aso_tps_w = $aso_tps_w_vide;
if (!isset($aso_gestion['categorie_totaux'][$Categorie->getLibelle()])) {
$aso_gestion['categorie_totaux'][$Categorie->getLibelle()] = $aso_tps_w_vide;
}
if ($tab_tp) {
foreach ($tab_tp as $TP) {
if ($TP->getIdProjet() == $Projet->getIdProjet()) {
$num = $aso_jours[$TP->getIdDateTravail()];
$aso_tps_w[$num] = $TP->getDuree();
$aso_gestion['categorie_totaux'][$Categorie->getLibelle()][$num] += $TP->getDuree();
$aso_gestion['totaux'][$num] += $TP->getDuree();
// Récupération des infos sur les projets de l'utilisateur
$aso_gestion['totaux'] = $aso_tps_w_vide;
$Projet = new Projet();
$tab_p = $Projet->consulter(Projet::GP_ID_LIST, array(implode(',', $tab_projet_id)));
foreach ($tab_p as $Projet) {
// Récupération de la catégorie du projet
$ProjetCategorie = new ProjetCategorie();
$cmd = ProjetCategorie::GPC_ID;
$param = $Projet->getCeCategorie();
$Categorie = $ProjetCategorie->consulter($cmd, $param);
// Nous vérifions le temps de travail pour ce projet pour la semaine courrante
$aso_tps_w = $aso_tps_w_vide;
if (!isset($aso_gestion['categorie_totaux'][$Categorie->getLibelle()])) {
$aso_gestion['categorie_totaux'][$Categorie->getLibelle()] = $aso_tps_w_vide;
}
if ($tab_tp) {
foreach ($tab_tp as $TP) {
if ($TP->getIdProjet() == $Projet->getIdProjet()) {
$num = $aso_jours[$TP->getIdDateTravail()];
$aso_tps_w[$num] = $TP->getDuree();
$aso_gestion['categorie_totaux'][$Categorie->getLibelle()][$num] += $TP->getDuree();
$aso_gestion['totaux'][$num] += $TP->getDuree();
}
}
}
// Stockage des infos nécessaire pour l'affichage
$aso_gestion['preferences'][$Categorie->getLibelle()][] = array(
'id' => $Projet->getIdProjet(),
'valeur' => $Projet->getIdProjet(),
'nom' => $Projet->getNomProjet(),
'date' => $aso_tps_w);
}
 
// Stockage des infos nécessaire pour l'affichage
$aso_gestion['preferences'][$Categorie->getLibelle()][] = array(
'id' => $Projet->getIdProjet(),
'valeur' => $Projet->getIdProjet(),
'nom' => $Projet->getNomProjet(),
'date' => $aso_tps_w);
 
 
}
//+-------------------------------------------------------------------------------------------------+
// GESTION DES ABSENCES
198,10 → 203,10
$cmd = Absence::GA_ID_UTILISATEUR_DATE_DEB_FIN;
$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_gestion['sj_1']['mysql'], $aso_gestion['sj_7']['mysql']);
$tab_a = $Absence->consulter($cmd, $param);
// Si nous avons des absences...
if ($tab_a && count($tab_a) == 1) {
$tab_a = array($tab_a);
}
 
$aso_gestion['ab_total'] = $aso_tps_w_vide;
if ($tab_am) {
foreach ($tab_am as $AM) {
219,7 → 224,7
}
}
}
 
// Création de l'url de réponse du formulaire
$aso_gestion['url_gestion_valider'] = 'index.php?action='.GTT_ACTION_GESTION_VALIDER.$url_sc_param_date;
 
242,7 → 247,7
$aso_jours = array();
$aso_semaine = array();
foreach($Week->fetchAll() as $num => $j) {
$aso_semaine[$num]['mysql'] = $j->thisYear().'-'.sprintf("%02s", $j->thisMonth()).'-'.$j->thisDay();
$aso_semaine[$num]['mysql'] = $j->thisYear().'-'.sprintf("%02s", $j->thisMonth()).'-'.sprintf("%02s", $j->thisDay());
$aso_jours[$aso_semaine[$num]['mysql']] = $num;
}
 
/trunk/actions/GttCtrlActionStatTableauGlobal.class.php
New file
0,0 → 1,160
<?php
class GttCtrlActionStatTableauGlobal extends aControlleurAction {
 
public function __construct(Registre $Registre)
{
$Registre->ajouterEspace('StatTableauGlobal', 'stat_tableau_global');
$Registre->ajouterSquelette('stat_tableau_global', 'stat_tableau_global.tpl.html');
}
 
public function executer()
{
$aso_stat = array();
$this->getRegistre()->setTitre('Tableau récapitulatif');
 
//+-------------------------------------------------------------------------------------------------+
// GESTION DES CALENDRIERS
//+-------------------------------------------------------------------------------------------------+
// Initialisation des variables pour le calendrier
if (!isset($_GET['annee'])) {
$_GET['annee'] = date('Y');
}
if (!isset($_GET['mois'])) {
$_GET['mois'] = date('m');
}
 
// Construction de l'objet mois
$Month = new Calendar_Month_Weeks($_GET['annee'], $_GET['mois']);
$Month->build();
 
// Construction du Calendrier
$Calendrier = new Calendrier();
// Construction de l'url pour les mois précédent/suivant
$PMonth = $Month->prevMonth('object');
$aso_stat['url_mois_precedent'] = 'index.php?action='.GTT_ACTION_STAT_TAB_GLOB.'&amp;annee='.$PMonth->thisYear().'&amp;mois='.$PMonth->thisMonth();
$NMonth = $Month->nextMonth('object');
$aso_stat['url_mois_suivant'] = 'index.php?action='.GTT_ACTION_STAT_TAB_GLOB.'&amp;annee='.$NMonth->thisYear().'&amp;mois='.$NMonth->thisMonth();
$aso_stat['mois']['mois'] = $Calendrier->getNomMois($Month->thisMonth());
$aso_stat['mois']['annee'] = $Month->thisYear();
$mois_courant_j1 = $Month->thisYear().'-'.sprintf("%02s", $Month->thisMonth()).'-'.sprintf("%02s", $Month->thisDay()).' 00:00:00';
$mois_courant_j36 = date('Y-m-d H:i:s', mktime(0, 0, 0, $NMonth->thisMonth(), 0, $NMonth->thisYear()));
$DaoUtilsateur = new Utilisateur();
$utilisateurs = $DaoUtilsateur->consulter(Utilisateur::GU_TOUS_AFFICHABLE);
if (is_object($utilisateurs)) {
$utilisateurs[0] = $utilisateurs;
}
foreach ($utilisateurs as $Utilisateur) {
$aso_gestion = array();
//+-------------------------------------------------------------------------------------------------+
// GESTION DES PROJETS
//+-------------------------------------------------------------------------------------------------+
// Récupération des infos sur l'utilisateur
$aso_gestion['prenom_nom'] = $Utilisateur->getPrenom().' '.$Utilisateur->getNom();
$aso_gestion['conges_payes'] = $Utilisateur->getCongesPayes();
$aso_gestion['rtt'] = $Utilisateur->getQuotaHeuresSupp();
$aso_gestion['tps_w'] = $Utilisateur->getTempsDeTravailJour();
// Récupération des projets sur lesquels l'utilisateur travaille
$UtilsateurAProjet = new UtilisateurAProjet();
$tab_uap = $UtilsateurAProjet->consulter(UtilisateurAProjet::GUAP_UTILISATEUR, $Utilisateur->getIdUtilisateur());
if (is_array($tab_uap) && count($tab_uap) > 0) {
//echo '<pre>la'.print_r($tab_uap, true).'</pre>';
$tab_projet_id = array();
foreach ($tab_uap as $uap) {
$tab_projet_id[] = $uap->getIdProjet();
}
// Récupération du temps de travail pour un utilisateur à une date donnée
$TravailProjet = new TravailProjet();
$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
$param = array($Utilisateur->getIdUtilisateur(), $mois_courant_j1, $mois_courant_j36);
$tab_tp = $TravailProjet->consulter($cmd, $param);
if ($tab_tp && count($tab_tp) == 1) {
$tab_tp = array($tab_tp);
}
// Récupération des infos sur les projets de l'utilisateur
$aso_gestion['totaux'] = 0;
$Projet = new Projet();
$tab_p = $Projet->consulter(Projet::GP_ID_LIST, array(implode(',', $tab_projet_id)));
foreach ($tab_p as $Projet) {
// Récupération de la catégorie du projet
$ProjetCategorie = new ProjetCategorie();
$cmd = ProjetCategorie::GPC_ID;
$param = $Projet->getCeCategorie();
$Categorie = $ProjetCategorie->consulter($cmd, $param);
// Nous vérifions le temps de travail pour ce projet pour la semaine courrante
$aso_tps_w = 0;
if (!isset($aso_gestion['categorie_totaux'][$Categorie->getLibelle()])) {
$aso_gestion['categorie_totaux'][$Categorie->getLibelle()] = 0;
}
if ($tab_tp) {
foreach ($tab_tp as $TP) {
if ($TP->getIdProjet() == $Projet->getIdProjet()) {
$aso_gestion['categorie_totaux'][$Categorie->getLibelle()] += $TP->getDuree();
$aso_gestion['totaux'] += $TP->getDuree();
// Stockage des infos nécessaire pour l'affichage
if (!isset($aso_gestion['projets'][$Categorie->getLibelle()][$Projet->getIdProjet()])) {
$aso_gestion['projets'][$Categorie->getLibelle()][$Projet->getIdProjet()] = array(
'id' => $Projet->getIdProjet(),
'nom' => $Projet->getNomProjet(),
'duree' => 0);
}
$aso_gestion['projets'][$Categorie->getLibelle()][$Projet->getIdProjet()]['duree'] += $TP->getDuree();
}
}
}
$aso_stat['projets'][$Categorie->getLibelle()][$Projet->getIdProjet()] = $Projet->getNomProjet();
}
}
//+-------------------------------------------------------------------------------------------------+
// GESTION DES ABSENCES
//+-------------------------------------------------------------------------------------------------+
// Récupération des motifs d'absence
$AbsenceMotif = new AbsenceMotif();
$cmd = AbsenceMotif::GAM_TOUS;
$tab_am = $AbsenceMotif->consulter($cmd);
if ($tab_am && count($tab_am) == 1) {
$tab_am = array($tab_am);
}
// Récupération des absences pour un utilisateur à une date donnée
$Absence = new Absence();
$cmd = Absence::GA_ID_UTILISATEUR_DATE_DEB_FIN;
$param = array($Utilisateur->getIdUtilisateur(), $mois_courant_j1, $mois_courant_j36);
$tab_a = $Absence->consulter($cmd, $param);
if ($tab_a && count($tab_a) == 1) {
$tab_a = array($tab_a);
}
$aso_gestion['ab_total'] = '';
if ($tab_am) {
foreach ($tab_am as $AM) {
$aso_stat['absences'][$AM->getIdAbsenceMotif()] = $AM->getLibelle();
//$aso_gestion['ab'][$AM->getIdAbsenceMotif()] = 0;
if ($tab_a) {
foreach ($tab_a as $A) {
if ($A->getIdAbsenceMotif() == $AM->getIdAbsenceMotif() && $A->getDuree() != 0) {
$aso_gestion['ab'][$AM->getIdAbsenceMotif()] = $A->getDuree();
$aso_gestion['ab_total'] += $A->getDuree();
$aso_gestion['totaux'] += $A->getDuree();
}
}
}
}
}
$aso_stat['utilisateurs'][] = $aso_gestion;
}
 
//trigger_error('<pre>'.print_r($aso_stat, true).'</pre>', E_USER_NOTICE);
$this->getRegistre()->ajouterDonnee('stat_tableau_global', $aso_stat);
}
}
?>
/trunk/gtt_config.inc.php
27,6 → 27,7
define ('GTT_ACTION_GESTION', 'gestion');
define ('GTT_ACTION_GESTION_VALIDER', 'gestion_valider');
define ('GTT_ACTION_UTILISATEUR', 'utilisateur');
define ('GTT_ACTION_STAT_TAB_GLOB', 'stat-tableau-global');
 
// +------------------------------------------------------------------------------------------------------+
// Les chemins d'accès
/trunk/documentation/gtt_v4.sql
188,6 → 188,7
CREATE TABLE `gestion_projet_categorie` (
`gpc_id_categorie` int(11) unsigned NOT NULL,
`gpc_libelle` varchar(255) collate utf8_unicode_ci NOT NULL,
`gpc_abreviation` varchar(25) collate utf8_unicode_ci default NULL,
PRIMARY KEY (`gpc_id_categorie`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 
195,12 → 196,12
-- Contenu de la table `gestion_projet_categorie`
--
 
INSERT INTO `gestion_projet_categorie` VALUES (2, 'Fonctionnement interne');
INSERT INTO `gestion_projet_categorie` VALUES (3, 'Site internet et outils coopératif');
INSERT INTO `gestion_projet_categorie` VALUES (4, 'Animation');
INSERT INTO `gestion_projet_categorie` VALUES (5, 'Projets inclus convention MEDT');
INSERT INTO `gestion_projet_categorie` VALUES (6, 'Projet hors convention');
INSERT INTO `gestion_projet_categorie` VALUES (7, 'Services pour des tiers');
INSERT INTO `gestion_projet_categorie` VALUES (2, 'Fonctionnement interne', NULL);
INSERT INTO `gestion_projet_categorie` VALUES (3, 'Site internet et outils coopératif', NULL);
INSERT INTO `gestion_projet_categorie` VALUES (4, 'Animation', NULL);
INSERT INTO `gestion_projet_categorie` VALUES (5, 'Projets inclus convention MEDT', NULL);
INSERT INTO `gestion_projet_categorie` VALUES (6, 'Projet hors convention', NULL);
INSERT INTO `gestion_projet_categorie` VALUES (7, 'Services pour des tiers', NULL);
 
-- --------------------------------------------------------
 
297,13 → 298,14
`gu_prenom` varchar(100) collate utf8_unicode_ci NOT NULL,
`gu_password` varchar(32) collate utf8_unicode_ci NOT NULL,
`gu_email` varchar(255) collate utf8_unicode_ci NOT NULL,
`gu_telephone` varchar(20) collate utf8_unicode_ci NULL,
`gu_telephone` varchar(25) collate utf8_unicode_ci default NULL,
`gu_adresse` varchar(255) collate utf8_unicode_ci default NULL,
`gu_code_postal` varchar(6) collate utf8_unicode_ci NULL,
`gu_code_postal` varchar(6) collate utf8_unicode_ci default NULL,
`gu_ville` varchar(50) collate utf8_unicode_ci default NULL,
`gu_quota_heures_supp` float default NULL,
`gu_conges_payes` float default NULL,
`gu_temps_de_travail` float default NULL,
`gu_temps_de_travail_jour` float default NULL,
`gu_temps_de_travail_mois` float default NULL,
`gu_mark_admin` tinyint(1) default NULL,
`gu_mark_recapitulatif` tinyint(1) default NULL,
`gu_notes` text collate utf8_unicode_ci,
/trunk/presentation/principal.tpl.html
1,5 → 1,6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr">
<head>
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="presentation/gtt.css" media="screen" title="Vert" />
/trunk/presentation/admin_utilisateur.tpl.html
56,9 → 56,13
</li>
<li>
Temps journalier de travail:
<input size="3" name="ut_temps_de_travail" type="text" value="<?=$Utilisateur->getTempsDeTravail();?>"/>
<input size="3" name="ut_temps_de_travail_jour" type="text" value="<?=$Utilisateur->getTempsDeTravailJour();?>"/>
</li>
<li>
Temps de travail mensuel fixe :
<input size="3" name="ut_temps_de_travail_mois" type="text" value="<?=$Utilisateur->getTempsDeTravailMois();?>"/>
</li>
<li>
Heures supplémentaires initiales:
<input size="3" name="ut_quota_heures_supp" type="text" value="<?=$Utilisateur->getQuotaHeuresSupp();?>"/>
</li>
/trunk/presentation/menu.tpl.html
2,14 → 2,19
<ul>
<li><a href="index.php?action=gestion">Gestion de mon temps de travail</a></li>
<li><a href="index.php?action=preferences">Gestion de mes projets</a></li>
<li>Statistiques
<ul>
<li><a href="index.php?action=stat-tableau-global">Tableau général</a></li>
</ul>
</li>
<li><a href="index.php?action=identification_deconnexion">Déconnexion</a></li>
<?php if ($bool_admin) : ?>
<li>Administration
<ul>
<li><a href="index.php?action=admin-categorie">Categories des projets</a></li>
<li><a href="index.php?action=admin-absence-motif">Motifs des absences</a></li>
<li><a href="index.php?action=admin-utilisateur-statut">Statuts des utilisateurs</a></li>
<li><a href="index.php?action=admin-utilisateur">Utilisateurs</a></li>
<li><a href="index.php?action=admin-categorie">Categories des projets</a></li>
<li><a href="index.php?action=admin-absence-motif">Motifs des absences</a></li>
<li><a href="index.php?action=admin-utilisateur-statut">Statuts des utilisateurs</a></li>
<li><a href="index.php?action=admin-utilisateur">Utilisateurs</a></li>
</ul>
</li>
<?php endif; ?>
/trunk/presentation/gestion.tpl.html
35,7 → 35,7
<?php endforeach; ?>
</tbody>
</table>
 
<?php if ($bool_projets) : ?>
<form id="gestion" name="gestion" action="<?=$url_gestion_valider;?>" method="post">
<table>
<caption>
58,6 → 58,7
</tr>
</thead>
<tbody>
<?php if ($bool_projets) : ?>
<?foreach ($preferences as $categorie => $projets):?>
<tr><td colspan="8" class="categorie"><?=$categorie;?></td></tr>
<?foreach ($projets as $projet):?>
74,6 → 75,7
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
<? endif;?>
<tr><td colspan="8" class="categorie">Absences</td></tr>
<?php foreach ($ab as $ab_id => $tab_ab_jours) : ?>
<tr><td class="absence_titre"><?=$ab_libelle[$ab_id];?></td>
96,4 → 98,7
</table>
<input id="btn_valider" name="btn_valider" value="<?=$i18n_general_valider;?>" type="submit" />
</form>
<?php else : ?>
<p>Veuillez sélectionner des projets via le menu "Gestion de mes projets".</p>
<? endif;?>
</div>
/trunk/presentation/stat_tableau_global.tpl.html
New file
0,0 → 1,60
<table summary="Tableau du temps de travail mensuel par salarié.">
<caption>
<a href="<?=$url_mois_precedent;?>">&lt;&lt;</a> <?=$mois['mois'];?><?=$mois['annee'];?> <a href="<?=$url_mois_suivant;?>">&gt;&gt;</a>
</caption>
<thead>
<tr>
<th>Projets</th>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<th>
<?=$utilisateur['prenom_nom']?>
</th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?foreach ($projets as $categorie => $pr):?>
<tr><td colspan="<?=count($utilisateurs)+1;?>" class="categorie"><?=$categorie;?></td></tr>
<?foreach ($pr as $id => $nom):?>
<tr>
<td id="pr:<?=$id;?>" class="projet"><?=$nom;?></td>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<?php if (isset($utilisateur['projets'][$categorie][$id])) : ?>
<td class="projet"><?=$utilisateur['projets'][$categorie][$id]['duree'];?></td>
<?php else : ?>
<td class="projet">&nbsp;</td>
<?php endif; ?>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
<tr><td class="total_titre">Totaux</td>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<?php if (isset($utilisateur['categorie_totaux'][$categorie])) : ?>
<td class="categorie_total"><?=$utilisateur['categorie_totaux'][$categorie];?></td>
<?php else : ?>
<td class="categorie_total">&nbsp;</td>
<?php endif; ?>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
<tr><td colspan="<?=count($utilisateurs)+1;?>" class="categorie">Absences</td></tr>
<?php foreach ($absences as $ab_id => $ab_libelle) : ?>
<tr>
<td class="absence_titre"><?=$ab_libelle;?></td>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<?php if (isset($utilisateur['ab'][$ab_id])) : ?>
<td class="ab"><?=$utilisateur['ab'][$ab_id];?></td>
<?php else : ?>
<td class="ab">&nbsp;</td>
<?php endif; ?>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
<tr>
<td class="total_titre">Totaux</td>
<?php foreach ($utilisateurs as $utilisateur) : ?>
<td class="categorie_total"><?=$utilisateur['ab_total'];?></td>
<?php endforeach; ?>
</tr>
</tbody>
</table>
/trunk/bibliotheque/metier/ProjetCategorie.class.php
63,7 → 63,8
$this->dao_table_nom = 'gestion_projet_categorie';
$this->dao_correspondance = array(
'gpc_id_categorie' => 'id_categorie',
'gpc_libelle' => 'libelle');
'gpc_libelle' => 'libelle',
'gpc_abreviation' => 'abreviation');
 
// Si l'on veut remplir l'objet à la création on lance la requete correspondante
if (!is_null($cmd)) {
/trunk/bibliotheque/metier/TravailProjet.class.php
157,7 → 157,8
trigger_error($e, E_USER_ERROR);
}
 
$resultat = $GLOBALS['db']->query($requete);
$resultat = $GLOBALS['db']->query($requete);
//echo '<pre>'.print_r($resultat, true).'</pre>';
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ;
$tab_resultat = array();
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
/trunk/bibliotheque/metier/UtilisateurAProjet.class.php
128,7 → 128,8
trigger_error($e, E_USER_ERROR);
}
$resultat = $GLOBALS['db']->query($requete);
$resultat = $GLOBALS['db']->query($requete);
//echo '<pre>'.print_r($resultat, true).'</pre>';
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ;
$tab_resultat = array();
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
/trunk/bibliotheque/metier/Utilisateur.class.php
50,7 → 50,8
const GU_ID = 'UTILISATEUR_ID';
const GU_ID_MAX = 'UTILISATEUR_ID_MAX';
const GU_CE_STATUT = 'UTILISATEUR_CE_STATUT';
const GU_MAIL = 'UTILISATEUR_MAIL';
const GU_MAIL = 'UTILISATEUR_MAIL';
const GU_TOUS_AFFICHABLE = 'UTILISATEUR_TOUS_AFFICHABLE';
 
/*** Attributs : */
private $id_utilisateur;
65,7 → 66,8
private $ville;
private $quota_heures_supp = 0;
private $conges_payes = 0;
private $temps_de_travail = 7;
private $temps_de_travail_jour = 7;
private $temps_de_travail_mois = 0;
private $mark_admin = 0;
private $mark_recapitulatif = 1;
private $notes;
89,7 → 91,8
'gu_ville' => 'ville',
'gu_quota_heures_supp' => 'quota_heures_supp',
'gu_conges_payes' => 'conges_payes',
'gu_temps_de_travail' => 'temps_de_travail',
'gu_temps_de_travail_jour' => 'temps_de_travail_jour',
'gu_temps_de_travail_mois' => 'temps_de_travail_mois',
'gu_mark_admin' => 'mark_admin',
'gu_mark_recapitulatif' => 'mark_recapitulatif',
'gu_notes' => 'notes');
221,16 → 224,26
$this->conges_payes = $cp;
}
 
// Temps De Travail
public function getTempsDeTravail()
// Temps De Travail Jour
public function getTempsDeTravailJour()
{
return $this->temps_de_travail;
return $this->temps_de_travail_jour;
}
public function setTempsDeTravail( $tdt )
public function setTempsDeTravailJour( $tdt )
{
$this->temps_de_travail = $tdt;
$this->temps_de_travail_jour = $tdt;
}
 
// Temps De Travail Mois
public function getTempsDeTravailMois()
{
return $this->temps_de_travail_mois;
}
public function setTempsDeTravailMois( $tdt )
{
$this->temps_de_travail_mois = $tdt;
}
 
// Mark Admin
public function getMarkAdmin()
{
296,6 → 309,12
$requete = 'SELECT * '.
'FROM gestion_utilisateur '.
'WHERE gu_email = "'.$parametres[0].'" ';
break;
case Utilisateur::GU_TOUS_AFFICHABLE:
$requete = 'SELECT * '.
'FROM gestion_utilisateur '.
'WHERE gu_mark_recapitulatif = 0 '.
'ORDER BY gu_prenom, gu_nom ASC';
break;
default :
$message = 'Commande '.$cmd.'inconnue!';