Subversion Repositories Applications.gtt

Rev

Rev 82 | Rev 95 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 82 Rev 89
1
<?php
1
<?php
2
class GttCtrlActionGestion extends aControlleurAction {
2
class GttCtrlActionGestion extends aControlleurAction {
3
 
3
 
4
	public function __construct(Registre $Registre)
4
	public function __construct(Registre $Registre)
5
    {
5
    {
6
    	$Registre->ajouterEspace('Gestion', 'gestion');
6
    	$Registre->ajouterEspace('Gestion', 'gestion');
7
    	$Registre->ajouterSquelette('gestion', 'gestion.tpl.html');
7
    	$Registre->ajouterSquelette('gestion', 'gestion.tpl.html');
8
    	$Registre->ajouterEspace('ZoneCalendrier', 'zone_calendrier');
8
    	$Registre->ajouterEspace('ZoneCalendrier', 'zone_calendrier');
9
    	$Registre->ajouterSquelette('zone_calendrier', 'calendrier_mini.tpl.html');
9
    	$Registre->ajouterSquelette('zone_calendrier', 'calendrier_mini.tpl.html');
10
    }
10
    }
11
 
11
 
12
    public function executer()
12
    public function executer()
13
    {
13
    {
14
    	$aso_gestion = array();
14
    	$aso_gestion = array();
15
    	$this->getRegistre()->setTitre('Gérer son temps');
15
    	$this->getRegistre()->setTitre('Gérer son temps');
16
 
16
 
17
    	//+-------------------------------------------------------------------------------------------------+
17
    	//+-------------------------------------------------------------------------------------------------+
18
		// GESTION DES CALENDRIERS
18
		// GESTION DES CALENDRIERS
19
		//+-------------------------------------------------------------------------------------------------+
19
		//+-------------------------------------------------------------------------------------------------+
20
		// Initialisation des variables pour le calendrier
20
		// Initialisation des variables pour le calendrier
21
		if (!isset($_GET['annee'])) {
21
		if (!isset($_GET['annee'])) {
22
			$_GET['annee'] = date('Y');
22
			$_GET['annee'] = date('Y');
23
		}
23
		}
24
		if (!isset($_GET['mois'])) {
24
		if (!isset($_GET['mois'])) {
25
			$_GET['mois'] = date('m');
25
			$_GET['mois'] = date('m');
26
		}
26
		}
27
		if (!isset($_GET['semaine'])) {
27
		if (!isset($_GET['semaine'])) {
28
			$_GET['semaine'] = date('W');
28
			$_GET['semaine'] = date('W');
29
		}
29
		}
30
		if (!isset($_GET['jour'])) {
30
		if (!isset($_GET['jour'])) {
31
			$_GET['jour'] = date('d');
31
			$_GET['jour'] = date('d');
32
		}
32
		}
33
		// Instanciation de la classe Calendrier France
33
		// Instanciation de la classe Calendrier France
34
		$Calendrier = new Calendrier($_GET['jour'], $_GET['semaine'], $_GET['mois'], $_GET['annee']);
34
		$Calendrier = new Calendrier($_GET['jour'], $_GET['semaine'], $_GET['mois'], $_GET['annee']);
35
		$tab_jours_feries = $Calendrier->getListeFeries();
35
		$tab_jours_feries = $Calendrier->getListeFeries();
36
 
36
 
37
		// Create an array of days which are "selected"
37
		// Create an array of days which are "selected"
38
		// Used for Week::build() below
38
		// Used for Week::build() below
39
		$CalendrierJourCourrant = new Calendar_Week(date('Y'), date('m'), date('d'));
39
		$CalendrierJourCourrant = new Calendar_Week(date('Y'), date('m'), date('d'));
40
		$aso_gestion['jc']['jour'] = $CalendrierJourCourrant->thisDay();
40
		$aso_gestion['jc']['jour'] = $CalendrierJourCourrant->thisDay();
41
		$aso_gestion['jc']['semaine'] = $CalendrierJourCourrant->thisWeek('n_in_year');
41
		$aso_gestion['jc']['semaine'] = $CalendrierJourCourrant->thisWeek('n_in_year');
42
		$aso_gestion['jc']['mois'] = $CalendrierJourCourrant->thisMonth();
42
		$aso_gestion['jc']['mois'] = $CalendrierJourCourrant->thisMonth();
43
		$aso_gestion['jc']['mois_nom'] = $Calendrier->getNomMois($CalendrierJourCourrant->thisMonth());
43
		$aso_gestion['jc']['mois_nom'] = $Calendrier->getNomMois($CalendrierJourCourrant->thisMonth());
44
		$aso_gestion['jc']['annee'] = $CalendrierJourCourrant->thisYear();
44
		$aso_gestion['jc']['annee'] = $CalendrierJourCourrant->thisYear();
45
		$aso_gestion['jc_url'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$aso_gestion['jc']['annee'].'&amp;mois='.$aso_gestion['jc']['mois'].'&amp;semaine='.$aso_gestion['jc']['semaine'].'&amp;jour='.$aso_gestion['jc']['jour'];
45
		$aso_gestion['jc_url'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$aso_gestion['jc']['annee'].'&amp;mois='.$aso_gestion['jc']['mois'].'&amp;semaine='.$aso_gestion['jc']['semaine'].'&amp;jour='.$aso_gestion['jc']['jour'];
46
 
46
 
47
		$CalendrierJourCourrant->build();
47
		$CalendrierJourCourrant->build();
48
		$CalendrierSemaineCourrante = $CalendrierJourCourrant->thisWeek('object');
48
		$CalendrierSemaineCourrante = $CalendrierJourCourrant->thisWeek('object');
49
		$CalendrierSemaineCourrante->build();
49
		$CalendrierSemaineCourrante->build();
50
		$tab_jours = $CalendrierSemaineCourrante->fetchAll();
50
		$tab_jours = $CalendrierSemaineCourrante->fetchAll();
51
		$aso_gestion['sjc_1']['jour'] = $tab_jours[1]->thisDay();
51
		$aso_gestion['sjc_1']['jour'] = $tab_jours[1]->thisDay();
52
		$aso_gestion['sjc_1']['mois'] = $Calendrier->getNomMois($tab_jours[1]->thisMonth());
52
		$aso_gestion['sjc_1']['mois'] = $Calendrier->getNomMois($tab_jours[1]->thisMonth());
53
		$aso_gestion['sjc_1']['annee'] = $tab_jours[1]->thisYear();
53
		$aso_gestion['sjc_1']['annee'] = $tab_jours[1]->thisYear();
54
		$aso_gestion['sjc_7']['jour'] = $tab_jours[7]->thisDay();
54
		$aso_gestion['sjc_7']['jour'] = $tab_jours[7]->thisDay();
55
		$aso_gestion['sjc_7']['mois'] = $Calendrier->getNomMois($tab_jours[7]->thisMonth());
55
		$aso_gestion['sjc_7']['mois'] = $Calendrier->getNomMois($tab_jours[7]->thisMonth());
56
		$aso_gestion['sjc_7']['annee'] = $tab_jours[7]->thisYear();
56
		$aso_gestion['sjc_7']['annee'] = $tab_jours[7]->thisYear();
57
 
57
 
58
		$aso_gestion['selectedDays'] = array ($CalendrierJourCourrant);
58
		$aso_gestion['selectedDays'] = array ($CalendrierJourCourrant);
59
 
59
 
60
		// Instruct month to build Week objects
60
		// Instruct month to build Week objects
61
		// Construction de l'objet mois
61
		// Construction de l'objet mois
62
		$Month = new Calendar_Month_Weeks($_GET['annee'], $_GET['mois']);
62
		$Month = new Calendar_Month_Weeks($_GET['annee'], $_GET['mois']);
63
		$Month->build();
63
		$Month->build();
64
 
64
 
65
		while ($Week = $Month->fetch()) {
65
		while ($Week = $Month->fetch()) {
66
			$Week->build($aso_gestion['selectedDays']);
66
			$Week->build($aso_gestion['selectedDays']);
67
			//echo '<pre>'.print_r($Month, true).'</pre>';
67
			//echo '<pre>'.print_r($Month, true).'</pre>';
68
			$tab_semaine_jours = $Week->fetchAll();
68
			$tab_semaine_jours = $Week->fetchAll();
69
			foreach ($tab_semaine_jours as $num => $Day) {
69
			foreach ($tab_semaine_jours as $num => $Day) {
70
				$element = array();
70
				$element = array();
71
				$element['annee'] = $Day->thisYear();
71
				$element['annee'] = $Day->thisYear();
72
				$element['mois'] = $Day->thisMonth();
72
				$element['mois'] = $Day->thisMonth();
73
				$element['jour'] = $Day->thisDay();
73
				$element['jour'] = $Day->thisDay();
74
				$element['jour_nom'] = $Calendrier->getNomJours($num);
74
				$element['jour_nom'] = $Calendrier->getNomJours($num);
75
				$element['url'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$Day->thisYear().'&amp;mois='.$Day->thisMonth().'&amp;jour='.$Day->thisDay();
75
				$element['url'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$Day->thisYear().'&amp;mois='.$Day->thisMonth().'&amp;jour='.$Day->thisDay();
76
				// Check to see if day is selected
76
				// Check to see if day is selected
77
				if ($Day->isSelected()) {
77
				if ($Day->isSelected()) {
78
					$element['class'] = 'jour_courrant';
78
					$element['class'] = 'jour_courrant';
79
				} else if ($Day->isEmpty()) {
79
				} else if ($Day->isEmpty()) {
80
					$element['class'] = 'jour_vide';
80
					$element['class'] = 'jour_vide';
81
				} else {
81
				} else {
82
					$element['class'] = 'jour';
82
					$element['class'] = 'jour';
83
				}
83
				}
84
				foreach ($tab_jours_feries as $jour_ferie) {
84
				foreach ($tab_jours_feries as $jour_ferie) {
85
					if ($Day->thisDay(true) ==  $jour_ferie) {
85
					if ($Day->thisDay(true) ==  $jour_ferie) {
86
						$element['class'] = 'jour_ferie';
86
						$element['class'] = 'jour_ferie';
87
					}
87
					}
88
				}
88
				}
89
				$aso_gestion['elements'][$Week->thisWeek('n_in_year')][$num] = $element;
89
				$aso_gestion['elements'][$Week->thisWeek('n_in_year')][$num] = $element;
90
			}
90
			}
91
		}
91
		}
92
 
92
 
93
		// Construction de l'url pour les mois précédent/suivant
93
		// Construction de l'url pour les mois précédent/suivant
94
		$PMonth = $Month->prevMonth('object');
94
		$PMonth = $Month->prevMonth('object');
95
		$aso_gestion['url_mois_precedent'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$PMonth->thisYear().'&amp;mois='.$PMonth->thisMonth().'&amp;jour='.$PMonth->thisDay();
95
		$aso_gestion['url_mois_precedent'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$PMonth->thisYear().'&amp;mois='.$PMonth->thisMonth().'&amp;jour='.$PMonth->thisDay();
96
		$NMonth = $Month->nextMonth('object');
96
		$NMonth = $Month->nextMonth('object');
97
		$aso_gestion['url_mois_suivant'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$NMonth->thisYear().'&amp;mois='.$NMonth->thisMonth().'&amp;jour='.$NMonth->thisDay();
97
		$aso_gestion['url_mois_suivant'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$NMonth->thisYear().'&amp;mois='.$NMonth->thisMonth().'&amp;jour='.$NMonth->thisDay();
98
		$aso_gestion['mois']['mois'] = $Calendrier->getNomMois($Month->thisMonth());
98
		$aso_gestion['mois']['mois'] = $Calendrier->getNomMois($Month->thisMonth());
99
		$aso_gestion['mois']['annee'] = $Month->thisYear();
99
		$aso_gestion['mois']['annee'] = $Month->thisYear();
100
 
100
 
101
		// Construction de l'url pour les semaines précédente/suivante
101
		// Construction de l'url pour les semaines précédente/suivante
102
		$Week = new Calendar_Week($_GET['annee'], $_GET['mois'], $_GET['jour']);
102
		$Week = new Calendar_Week($_GET['annee'], $_GET['mois'], $_GET['jour']);
103
		$aso_gestion['s'] = $Week->thisWeek('n_in_year');
103
		$aso_gestion['s'] = $Week->thisWeek('n_in_year');
104
 
104
 
105
		$PWeek = $Week->prevWeek('object');
105
		$PWeek = $Week->prevWeek('object');
106
		$aso_gestion['url_semaine_precedente'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$PWeek->thisYear().'&amp;mois='.$PWeek->thisMonth().'&amp;jour='.$PWeek->thisDay();
106
		$aso_gestion['url_semaine_precedente'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$PWeek->thisYear().'&amp;mois='.$PWeek->thisMonth().'&amp;jour='.$PWeek->thisDay();
107
 
107
 
108
		$url_sc_param_date = '&amp;annee='.$Week->thisYear().'&amp;mois='.$Week->thisMonth().'&amp;jour='.$Week->thisDay();
108
		$url_sc_param_date = '&amp;annee='.$Week->thisYear().'&amp;mois='.$Week->thisMonth().'&amp;jour='.$Week->thisDay();
109
		$aso_gestion['url_semaine_courante'] = 'index.php?action='.GTT_ACTION_GESTION.$url_sc_param_date;
109
		$aso_gestion['url_semaine_courante'] = 'index.php?action='.GTT_ACTION_GESTION.$url_sc_param_date;
110
 
110
 
111
		$NWeek = $Week->nextWeek('object');
111
		$NWeek = $Week->nextWeek('object');
112
		$aso_gestion['url_semaine_suivante'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$NWeek->thisYear().'&amp;mois='.$NWeek->thisMonth().'&amp;jour='.$NWeek->thisDay();
112
		$aso_gestion['url_semaine_suivante'] = 'index.php?action='.GTT_ACTION_GESTION.'&amp;annee='.$NWeek->thisYear().'&amp;mois='.$NWeek->thisMonth().'&amp;jour='.$NWeek->thisDay();
113
 
113
 
114
		$Week->build();
114
		$Week->build();
115
		$aso_jours = array();
115
		$aso_jours = array();
116
		foreach($Week->fetchAll() as $num => $j) {
116
		foreach($Week->fetchAll() as $num => $j) {
117
			$aso_gestion['sj_'.$num]['jour'] = $j->thisDay();
117
			$aso_gestion['sj_'.$num]['jour'] = $j->thisDay();
118
			$aso_gestion['sj_'.$num]['mois'] = $Calendrier->getNomMois($j->thisMonth());
118
			$aso_gestion['sj_'.$num]['mois'] = $Calendrier->getNomMois($j->thisMonth());
119
			$aso_gestion['sj_'.$num]['annee'] = $j->thisYear();
119
			$aso_gestion['sj_'.$num]['annee'] = $j->thisYear();
120
			$aso_gestion['sj_'.$num]['mysql'] = $aso_gestion['sj_'.$num]['annee'].'-'.sprintf("%02s", $j->thisMonth()).'-'.sprintf("%02s", $aso_gestion['sj_'.$num]['jour']);
120
			$aso_gestion['sj_'.$num]['mysql'] = $aso_gestion['sj_'.$num]['annee'].'-'.sprintf("%02s", $j->thisMonth()).'-'.sprintf("%02s", $aso_gestion['sj_'.$num]['jour']);
121
			$aso_jours[$aso_gestion['sj_'.$num]['mysql']] = $num;
121
			$aso_jours[$aso_gestion['sj_'.$num]['mysql']] = $num;
122
			$aso_tps_w_vide[$num] = '';
122
			$aso_tps_w_vide[$num] = '';
123
		}
123
		}
124
 
124
 
125
		//+-------------------------------------------------------------------------------------------------+
125
		//+-------------------------------------------------------------------------------------------------+
126
		// GESTION DES PROJETS
126
		// GESTION DES PROJETS
127
		//+-------------------------------------------------------------------------------------------------+
127
		//+-------------------------------------------------------------------------------------------------+
128
    	// Récupération des projets sur lesquels l'utilisateur travaille
128
    	// Récupération des projets sur lesquels l'utilisateur travaille
129
		$UtilsateurAProjet = new UtilisateurAProjet();
129
		$UtilsateurAProjet = new UtilisateurAProjet();
130
    	$tab_uap = $UtilsateurAProjet->consulter(UtilisateurAProjet::GUAP_UTILISATEUR, $GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
130
    	$tab_uap = $UtilsateurAProjet->consulter(UtilisateurAProjet::GUAP_UTILISATEUR, $GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
131
		// Si nous avons des données...
131
		// Si nous avons des données...
132
		$aso_gestion['bool_projets'] = false;
132
		$aso_gestion['bool_projets'] = false;
133
    	if ($tab_uap && count($tab_uap) >= 1) {
133
    	if ($tab_uap && count($tab_uap) >= 1) {
134
	    	$aso_gestion['bool_projets'] = true;
134
	    	$aso_gestion['bool_projets'] = true;
135
	    	$tab_projet_id = array();
135
	    	$tab_projet_id = array();
136
	    	foreach ($tab_uap as $uap) {
136
	    	foreach ($tab_uap as $uap) {
137
	    		$tab_projet_id[] = $uap->getIdProjet();
137
	    		$tab_projet_id[] = $uap->getIdProjet();
138
	    	}
138
	    	}
139
 
139
 
140
	    	// Récupération du temps de travail pour un utilisateur à une date donnée
140
	    	// Récupération du temps de travail pour un utilisateur à une date donnée
141
	    	$TravailProjet = new TravailProjet();
141
	    	$TravailProjet = new TravailProjet();
142
			$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
142
			$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
143
			$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_gestion['sj_1']['mysql'], $aso_gestion['sj_7']['mysql']);
143
			$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_gestion['sj_1']['mysql'], $aso_gestion['sj_7']['mysql']);
144
			$tab_tp = $TravailProjet->consulter($cmd, $param);
144
			$tab_tp = $TravailProjet->consulter($cmd, $param);
145
			if ($tab_tp && count($tab_tp) == 1) {
145
			if ($tab_tp && count($tab_tp) == 1) {
146
				$tab_tp = array($tab_tp);
146
				$tab_tp = array($tab_tp);
147
			}
147
			}
148
 
148
 
149
			// Récupération des infos sur les projets de l'utilisateur
149
			// Récupération des infos sur les projets de l'utilisateur
150
	    	$aso_gestion['totaux'] = $aso_tps_w_vide;
150
	    	$aso_gestion['totaux'] = $aso_tps_w_vide;
151
	    	$Projet = new Projet();
151
	    	$Projet = new Projet();
152
	    	$tab_p = $Projet->consulter(Projet::GP_ID_LIST, array(implode(',', $tab_projet_id)));
152
	    	$tab_p = $Projet->consulter(Projet::GP_ID_LIST, array(implode(',', $tab_projet_id)));
153
			foreach ($tab_p as $Projet) {
153
			foreach ($tab_p as $Projet) {
154
	
154
	
155
				// Récupération de la catégorie du projet
155
				// Récupération de la catégorie du projet
156
				$ProjetCategorie = new ProjetCategorie();
156
				$ProjetCategorie = new ProjetCategorie();
157
				$cmd = ProjetCategorie::GPC_ID;
157
				$cmd = ProjetCategorie::GPC_ID;
158
				$param = $Projet->getCeCategorie();
158
				$param = $Projet->getCeCategorie();
159
				$Categorie = $ProjetCategorie->consulter($cmd, $param);
159
				$Categorie = $ProjetCategorie->consulter($cmd, $param);
160
	
160
	
161
				// Nous vérifions le temps de travail pour ce projet pour la semaine courrante
161
				// Nous vérifions le temps de travail pour ce projet pour la semaine courrante
162
				$aso_tps_w = $aso_tps_w_vide;
162
				$aso_tps_w = $aso_tps_w_vide;
163
				if (!isset($aso_gestion['categorie_totaux'][$Categorie->getLibelle()])) {
163
				if (!isset($aso_gestion['categorie_totaux'][$Categorie->getLibelle()])) {
164
					$aso_gestion['categorie_totaux'][$Categorie->getLibelle()] = $aso_tps_w_vide;
164
					$aso_gestion['categorie_totaux'][$Categorie->getLibelle()] = $aso_tps_w_vide;
165
				}
165
				}
166
				if ($tab_tp) {
166
				if ($tab_tp) {
167
					foreach ($tab_tp as $TP) {
167
					foreach ($tab_tp as $TP) {
168
						if ($TP->getIdProjet() == $Projet->getIdProjet()) {
168
						if ($TP->getIdProjet() == $Projet->getIdProjet()) {
169
							$num = $aso_jours[$TP->getIdDateTravail()];
169
							$num = $aso_jours[$TP->getIdDateTravail()];
170
							$aso_tps_w[$num] = $TP->getDuree();
170
							$aso_tps_w[$num] = $TP->getDuree();
171
							$aso_gestion['categorie_totaux'][$Categorie->getLibelle()][$num] += $TP->getDuree();
171
							$aso_gestion['categorie_totaux'][$Categorie->getLibelle()][$num] += $TP->getDuree();
172
							$aso_gestion['totaux'][$num] += $TP->getDuree();
172
							$aso_gestion['totaux'][$num] += $TP->getDuree();
173
						}
173
						}
174
					}
174
					}
175
				}
175
				}
176
	
176
	
177
				// Stockage des infos nécessaire pour l'affichage
177
				// Stockage des infos nécessaire pour l'affichage
178
				$aso_gestion['preferences'][$Categorie->getLibelle()][] = array(
178
				$aso_gestion['preferences'][$Categorie->getLibelle()][] = array(
179
					'id' => $Projet->getIdProjet(),
179
					'id' => $Projet->getIdProjet(),
180
					'valeur' => $Projet->getIdProjet(),
180
					'valeur' => $Projet->getIdProjet(),
181
					'nom' => $Projet->getNom(),
181
					'nom' => $Projet->getNom(),
182
					'date' => $aso_tps_w);
182
					'date' => $aso_tps_w);
183
	
183
	
184
	
184
	
185
			}
185
			}
186
		}
186
		}
187
		//+-------------------------------------------------------------------------------------------------+
187
		//+-------------------------------------------------------------------------------------------------+
188
		// GESTION DES ABSENCES
188
		// GESTION DES ABSENCES
189
		//+-------------------------------------------------------------------------------------------------+
189
		//+-------------------------------------------------------------------------------------------------+
190
		// Récupération des motifs d'absence
190
		// Récupération des motifs d'absence
191
		$AbsenceMotif = new AbsenceMotif();
191
		$AbsenceMotif = new AbsenceMotif();
192
		$cmd = AbsenceMotif::GAM_TOUS;
192
		$cmd = AbsenceMotif::GAM_TOUS;
193
		$tab_am = $AbsenceMotif->consulter($cmd);
193
		$tab_am = $AbsenceMotif->consulter($cmd);
194
		if ($tab_am && count($tab_am) == 1) {
194
		if ($tab_am && count($tab_am) == 1) {
195
			$tab_am = array($tab_am);
195
			$tab_am = array($tab_am);
196
		}
196
		}
197
 
197
 
198
		// Récupération des absences pour un utilisateur à une date donnée
198
		// Récupération des absences pour un utilisateur à une date donnée
199
    	$Absence = new Absence();
199
    	$Absence = new Absence();
200
		$cmd = Absence::GA_ID_UTILISATEUR_DATE_DEB_FIN;
200
		$cmd = Absence::GA_ID_UTILISATEUR_DATE_DEB_FIN;
201
		$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_gestion['sj_1']['mysql'], $aso_gestion['sj_7']['mysql']);
201
		$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_gestion['sj_1']['mysql'], $aso_gestion['sj_7']['mysql']);
202
		$tab_a = $Absence->consulter($cmd, $param);
202
		$tab_a = $Absence->consulter($cmd, $param);
203
		// Si nous avons des absences...
203
		// Si nous avons des absences...
204
		if ($tab_a && count($tab_a) == 1) {
204
		if ($tab_a && count($tab_a) == 1) {
205
			$tab_a = array($tab_a);
205
			$tab_a = array($tab_a);
206
		}
206
		}
207
		$aso_gestion['ab_total'] = $aso_tps_w_vide;
207
		$aso_gestion['ab_total'] = $aso_tps_w_vide;
208
		if ($tab_am) {
208
		if ($tab_am) {
209
			foreach ($tab_am as $AM) {
209
			foreach ($tab_am as $AM) {
210
				$aso_gestion['ab_libelle'][$AM->getIdAbsenceMotif()] = $AM->getLibelle();
210
				$aso_gestion['ab_libelle'][$AM->getIdAbsenceMotif()] = $AM->getLibelle();
211
				$aso_gestion['ab'][$AM->getIdAbsenceMotif()] = $aso_tps_w_vide;
211
				$aso_gestion['ab'][$AM->getIdAbsenceMotif()] = $aso_tps_w_vide;
212
				if ($tab_a) {
212
				if ($tab_a) {
213
					foreach ($tab_a as $A) {
213
					foreach ($tab_a as $A) {
214
						if ($A->getIdAbsenceMotif() == $AM->getIdAbsenceMotif()) {
214
						if ($A->getIdAbsenceMotif() == $AM->getIdAbsenceMotif()) {
215
							$num = $aso_jours[$A->getIdDateAbsence()];
215
							$num = $aso_jours[$A->getIdDateAbsence()];
216
							$aso_gestion['ab'][$AM->getIdAbsenceMotif()][$num] = $A->getDuree();
216
							$aso_gestion['ab'][$AM->getIdAbsenceMotif()][$num] = $A->getDuree();
217
							$aso_gestion['ab_total'][$num] += $A->getDuree();
217
							$aso_gestion['ab_total'][$num] += $A->getDuree();
218
							$aso_gestion['totaux'][$num] += $A->getDuree();
218
							$aso_gestion['totaux'][$num] += $A->getDuree();
219
						}
219
						}
220
					}
220
					}
221
				}
221
				}
222
			}
222
			}
223
		}
223
		}
224
		
224
		
225
		// Création de l'url de réponse du formulaire
225
		// Création de l'url de réponse du formulaire
226
		$aso_gestion['url_gestion_valider'] = 'index.php?action='.GTT_ACTION_GESTION_VALIDER.$url_sc_param_date;
226
		$aso_gestion['url_gestion_valider'] = 'index.php?action='.GTT_ACTION_GESTION_VALIDER.$url_sc_param_date;
227
 
227
 
228
    	//echo '<pre>ici '.print_r($aso_gestion['ab'], true).'la</pre>';
228
    	//echo '<pre>ici '.print_r($aso_gestion['ab'], true).'la</pre>';
229
		$this->getRegistre()->ajouterDonnee('gestion', $aso_gestion);
229
		$this->getRegistre()->ajouterDonnee('gestion', $aso_gestion);
230
		$this->getRegistre()->ajouterDonnee('zone_calendrier', $aso_gestion);
230
		$this->getRegistre()->ajouterDonnee('zone_calendrier', $aso_gestion);
231
    }
231
    }
232
 
232
 
233
    public function verifierValider()
233
    public function verifierValider()
234
    {
234
    {
235
 
235
 
236
    }
236
    }
237
 
237
 
238
	public function executerValider()
238
	public function executerValider()
239
    {
239
    {
240
    	//echo '<pre>'.print_r($_POST, true).'</pre>';
240
    	//echo '<pre>'.print_r($_POST, true).'</pre>';
241
 
241
 
242
    	// Récupération des info sur la semaine courrante
242
    	// Récupération des info sur la semaine courrante
243
		$Week = new Calendar_Week($_GET['annee'], $_GET['mois'], $_GET['jour']);
243
		$Week = new Calendar_Week($_GET['annee'], $_GET['mois'], $_GET['jour']);
244
		$Week->build();
244
		$Week->build();
245
		$aso_jours = array();
245
		$aso_jours = array();
246
		$aso_semaine = array();
246
		$aso_semaine = array();
247
		foreach($Week->fetchAll() as $num => $j) {
247
		foreach($Week->fetchAll() as $num => $j) {
248
			$aso_semaine[$num]['mysql'] = $j->thisYear().'-'.sprintf("%02s", $j->thisMonth()).'-'.sprintf("%02s", $j->thisDay());
248
			$aso_semaine[$num]['mysql'] = $j->thisYear().'-'.sprintf("%02s", $j->thisMonth()).'-'.sprintf("%02s", $j->thisDay());
249
			$aso_jours[$aso_semaine[$num]['mysql']] = $num;
249
			$aso_jours[$aso_semaine[$num]['mysql']] = $num;
250
		}
250
		}
251
 
251
 
252
		// Récupération du temps de travail pour un utilisateur à une date donnée
252
		// Récupération du temps de travail pour un utilisateur à une date donnée
253
    	$TravailProjet = new TravailProjet();
253
    	$TravailProjet = new TravailProjet();
254
		$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
254
		$cmd = TravailProjet::GTP_ID_UTILISATEUR_DATE_DEB_FIN;
255
		$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_semaine[1]['mysql'], $aso_semaine[7]['mysql']);
255
		$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_semaine[1]['mysql'], $aso_semaine[7]['mysql']);
256
		$tab_tp = $TravailProjet->consulter($cmd, $param);
256
		$tab_tp = $TravailProjet->consulter($cmd, $param);
257
		if ($tab_tp && count($tab_tp) == 1) {
257
		if ($tab_tp && count($tab_tp) == 1) {
258
			$tab_tp = array($tab_tp);
258
			$tab_tp = array($tab_tp);
259
		}
259
		}
260
 
260
 
261
		// Récupération des infos sur l'utilisateur courrant
261
		// Récupération des infos sur l'utilisateur courrant
262
		$tps_w_jour = $GLOBALS['_GTT_']['Utilisateur']->getTempsDeTravailJour();
262
		$tps_w_jour = $GLOBALS['_GTT_']['Utilisateur']->getTempsDeTravailJour();
263
		// Création d'un utilisateur pour les mises à jour des CP et RTT
263
		// Création d'un utilisateur pour les mises à jour des CP et RTT
264
		$Utilisateur = new Utilisateur();
264
		$Utilisateur = new Utilisateur();
265
		$Utilisateur->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
265
		$Utilisateur->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
-
 
266
		$Utilisateur->setQuotaHeuresSupp($GLOBALS['_GTT_']['Utilisateur']->getQuotaHeuresSupp());
266
		$Utilisateur->setCongesPayes(null);
267
		$Utilisateur->setCongesPayes($GLOBALS['_GTT_']['Utilisateur']->getCongesPayes());
267
		$Utilisateur->setTempsDeTravailJour(null);
268
		$Utilisateur->setTempsDeTravailJour(null);
268
		$Utilisateur->setTempsDeTravailMois(null);
269
		$Utilisateur->setTempsDeTravailMois(null);
269
		$Utilisateur->setMarkAdmin(null);
270
		$Utilisateur->setMarkAdmin(null);
270
		$Utilisateur->setMarkRecapitulatif(null);
271
		$Utilisateur->setMarkRecapitulatif(null);
-
 
272
 
-
 
273
		// Initialisation de la variable pour la gestion des heures sup
-
 
274
		$jours_w_semaine = array_flip(explode(',', GTT_SEMAINE_JOUR_W_NBRE));
-
 
275
		foreach ($jours_w_semaine as $c => $v) {
-
 
276
			$jours_w_semaine[$c] = array('act' => 0, 'pre' => 0);
-
 
277
		}
271
 
278
 
272
		// Ajout ou Mise à jour des durées de travail
279
		// Ajout ou Mise à jour des durées de travail
273
		if (isset($_POST['pr'])) {
-
 
274
			$total_heure_act = 0;
-
 
275
			$total_heure_pre = 0;
-
 
276
			$total_jours = 0;
-
 
277
			$jours_w_semaine = array_flip(explode(',', GTT_SEMAINE_JOUR_W_NBRE));
-
 
278
			foreach ($jours_w_semaine as $c => $v) {
-
 
279
				$jours_w_semaine[$c] = array('act' => 0, 'pre' => 0);
-
 
280
			}
280
		if (isset($_POST['pr'])) {
281
			foreach($_POST['pr'] as $projet_id => $jours) {
281
			foreach($_POST['pr'] as $projet_id => $jours) {
282
				//echo '<pre>'.print_r($jours, true).'</pre>';
282
				//echo '<pre>'.print_r($jours, true).'</pre>';
283
				foreach($jours as $jour_num => $nbr_heure) {
283
				foreach($jours as $jour_num => $nbr_heure) {
284
					if (isset($jours_w_semaine[$jour_num])) {
284
					if (isset($jours_w_semaine[$jour_num])) {
285
						$jours_w_semaine[$jour_num]['act'] += $nbr_heure;
285
						$jours_w_semaine[$jour_num]['act'] += $nbr_heure;
286
					}
286
					}
287
					$bool_ajouter = true;
287
					$bool_ajouter = true;
288
					if (!empty($tab_tp)) {
288
					if (!empty($tab_tp)) {
289
						foreach ($tab_tp as $TP) {
289
						foreach ($tab_tp as $TP) {
290
							if ($TP->getIdDateTravail() == $aso_semaine[$jour_num]['mysql']) {
290
							if ($TP->getIdDateTravail() == $aso_semaine[$jour_num]['mysql']) {
291
								if ($TP->getIdProjet() == $projet_id) {
291
								if ($TP->getIdProjet() == $projet_id) {
292
									$bool_ajouter = false;
292
									$bool_ajouter = false;
293
									if (isset($jours_w_semaine[$jour_num])) {
293
									if (isset($jours_w_semaine[$jour_num])) {
294
										$jours_w_semaine[$jour_num]['pre'] += $TP->getDuree();
294
										$jours_w_semaine[$jour_num]['pre'] += $TP->getDuree();
295
									}
295
									}
296
									if ($TP->getDuree() != $nbr_heure) {
296
									if ($TP->getDuree() != $nbr_heure) {
297
										if (empty($nbr_heure)) {
297
										if (empty($nbr_heure)) {
298
											$TP->supprimer();
298
											$TP->supprimer();
299
										} else {
299
										} else {
300
											$TP->setDuree($nbr_heure);
300
											$TP->setDuree($nbr_heure);
301
											$TP->modifier();
301
											$TP->modifier();
302
										}
302
										}
303
									}
303
									}
304
								}
304
								}
305
							}
305
							}
306
						}
306
						}
307
					}
307
					}
308
					if ($bool_ajouter && !empty($nbr_heure)) {
308
					if ($bool_ajouter && !empty($nbr_heure)) {
309
						$TP = new TravailProjet();
309
						$TP = new TravailProjet();
310
						$TP->setDuree((float)$nbr_heure);
310
						$TP->setDuree((float)$nbr_heure);
311
						$TP->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
311
						$TP->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
312
						$TP->setIdProjet($projet_id);
312
						$TP->setIdProjet($projet_id);
313
						$TP->setIdDateTravail((string)$aso_semaine[$jour_num]['mysql']);
313
						$TP->setIdDateTravail((string)$aso_semaine[$jour_num]['mysql']);
314
						$TP->ajouter();
314
						$TP->ajouter();
315
					}
315
					}
316
				}
316
				}
317
			}
317
			}
318
			// Gestion de la mise à jour des heures sup
-
 
319
			$Utilisateur->setQuotaHeuresSupp($GLOBALS['_GTT_']['Utilisateur']->getQuotaHeuresSupp());
-
 
320
			foreach ($jours_w_semaine as $c => $j) {
-
 
321
				if (($j['pre'] - $j['act']) != 0) {// Modification sur le temps travaillé pour le jour courant
-
 
322
					$heure_sup_pre = $j['pre'] - $tps_w_jour;// -7 = 0 - 7
-
 
323
					$heure_sup_act = $j['act'] - $tps_w_jour;// -5 = 2 - 7
-
 
324
					$heure_sup_dif = $heure_sup_act - $heure_sup_pre;// 2 = -5 - -7  
-
 
325
					if (abs($heure_sup_pre) == $tps_w_jour) {// Premiere modifier du temps travaillé pour le jour courrant
-
 
326
						if ($heure_sup_act < 0) {
-
 
327
							$Utilisateur->diminuerQuotaHeuresSup(abs($heure_sup_act));
-
 
328
						}
-
 
329
						if ($heure_sup_act > 0) {
-
 
330
							$Utilisateur->augmenterQuotaHeuresSup($heure_sup_act);
-
 
331
						}
-
 
332
					} else {
-
 
333
						if ($heure_sup_dif < 0) {
-
 
334
							$Utilisateur->diminuerQuotaHeuresSup(abs($heure_sup_dif));
-
 
335
						}
-
 
336
						if ($heure_sup_dif > 0) {
-
 
337
							$Utilisateur->augmenterQuotaHeuresSup($heure_sup_dif);
-
 
338
						}
-
 
339
					}
-
 
340
				}
-
 
341
			}
-
 
342
			
-
 
343
			
-
 
344
			trigger_error(print_r($jours_w_semaine, true), E_USER_NOTICE);//$heure_sup_pre.'/'.$heure_sup_act.'-'.$total_jours
-
 
345
			$Utilisateur->modifier();
-
 
346
		}
318
		}
347
 
319
 
348
		// Récupération des absences pour un utilisateur à une date donnée
320
		// Récupération des absences pour un utilisateur à une date donnée
349
    	$Absence = new Absence();
321
    	$Absence = new Absence();
350
		$cmd = Absence::GA_ID_UTILISATEUR_DATE_DEB_FIN;
322
		$cmd = Absence::GA_ID_UTILISATEUR_DATE_DEB_FIN;
351
		$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_semaine[1]['mysql'], $aso_semaine[7]['mysql']);
323
		$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $aso_semaine[1]['mysql'], $aso_semaine[7]['mysql']);
352
		$tab_a = $Absence->consulter($cmd, $param);
324
		$tab_a = $Absence->consulter($cmd, $param);
353
		if ($tab_a && count($tab_a) == 1) {
325
		if ($tab_a && count($tab_a) == 1) {
354
			$tab_a = array($tab_a);
326
			$tab_a = array($tab_a);
355
		}
327
		}
356
 
328
 
357
		// Ajout ou Mise à jour des durées d'absences pour congés payés
329
		// Ajout ou Mise à jour des durées d'absences pour congés payés
358
		$cp_h_modif = 0;
330
		$cp_h_modif = 0;
-
 
331
		$hs_h_modif = 0;
359
		if (isset($_POST['ab'])) {
332
		if (isset($_POST['ab'])) {
360
			//echo '<pre>'.print_r($_POST['ab'], true).'</pre>';
333
			//echo '<pre>'.print_r($_POST['ab'], true).'</pre>';
361
			foreach($_POST['ab'] as $ab_id => $tab_num_j) {
334
			foreach($_POST['ab'] as $ab_id => $tab_num_j) {
-
 
335
				// Création du motif d'absence pour voir si on doit diminuer les congés payés
-
 
336
				$AbsenceMotif = new AbsenceMotif();
-
 
337
				$AbsenceMotif->consulter(AbsenceMotif::GAM_ID, $ab_id, true);
-
 
338
 
362
				foreach($tab_num_j as $num_j => $ab_duree) {
339
				foreach($tab_num_j as $num_j => $ab_duree) {
-
 
340
					if (isset($jours_w_semaine[$num_j])) {
-
 
341
						$jours_w_semaine[$num_j]['act'] += $ab_duree;
-
 
342
					}
363
					$bool_ajouter = true;
343
					$bool_ajouter = true;
364
					if (!empty($tab_a)) {
344
					if (!empty($tab_a)) {
365
						foreach ($tab_a as $A) {
345
						foreach ($tab_a as $A) {
366
							if ($A->getIdDateAbsence() == $aso_semaine[$num_j]['mysql']) {
346
							if ($A->getIdDateAbsence() == $aso_semaine[$num_j]['mysql']) {
367
 
347
 
368
								if ($A->getIdAbsenceMotif() == $ab_id) {
348
								if ($A->getIdAbsenceMotif() == $ab_id) {
369
									$bool_ajouter = false;
349
									$bool_ajouter = false;
-
 
350
									if (isset($jours_w_semaine[$num_j])) {
-
 
351
										$jours_w_semaine[$num_j]['pre'] += $A->getDuree();
370
 
352
									}
371
									if ($A->getDuree() != $ab_duree) {
353
									if ($A->getDuree() != $ab_duree) {
372
										if (empty($ab_duree)) {
354
										if (empty($ab_duree)) {
373
											$A->supprimer();
355
											$A->supprimer();
374
											if ($ab_id == GTT_ABSCENCE_ID_CP) {
356
											if ($AbsenceMotif->getMarkCpDiminuer()) {
375
												$cp_h_modif -= $A->getDuree();
357
												$cp_h_modif -= $A->getDuree();
376
											}
358
											}
-
 
359
											if ($AbsenceMotif->getMarkHsDiminuer()) {
-
 
360
												$hs_h_modif -= $A->getDuree();
-
 
361
											}
377
										} else {
362
										} else {
378
											$ab_duree_tmp = $A->getDuree();
363
											$ab_duree_tmp = $A->getDuree();
379
											$A->setDuree($ab_duree);
364
											$A->setDuree($ab_duree);
380
											$A->modifier();
365
											$A->modifier();
381
											if ($ab_id == GTT_ABSCENCE_ID_CP) {
366
											if ($AbsenceMotif->getMarkCpDiminuer()) {
382
												trigger_error('ici'.($ab_duree_tmp - $ab_duree), E_USER_NOTICE);
-
 
383
												$cp_h_modif -= $ab_duree_tmp - $ab_duree;
367
												$cp_h_modif -= $ab_duree_tmp - $ab_duree;
384
											}
368
											}
-
 
369
											if ($AbsenceMotif->getMarkHsDiminuer()) {
-
 
370
												$hs_h_modif -= $ab_duree_tmp - $ab_duree;
-
 
371
											}
385
										}
372
										}
386
									}
373
									}
387
								}
374
								}
388
							}
375
							}
389
						}
376
						}
390
					}
377
					}
391
					if ($bool_ajouter && !empty($ab_duree)) {
378
					if ($bool_ajouter && !empty($ab_duree)) {
392
						$A = new Absence();
379
						$A = new Absence();
393
						$A->setDuree((float)$ab_duree);
380
						$A->setDuree((float)$ab_duree);
394
						$A->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
381
						$A->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur());
395
						$A->setIdAbsenceMotif($ab_id);
382
						$A->setIdAbsenceMotif($ab_id);
396
						$A->setIdDateAbsence((string)$aso_semaine[$num_j]['mysql']);
383
						$A->setIdDateAbsence((string)$aso_semaine[$num_j]['mysql']);
397
						$A->ajouter();
384
						$A->ajouter();
398
						if ($ab_id == GTT_ABSCENCE_ID_CP) {
385
						if ($AbsenceMotif->getMarkCpDiminuer()) {
399
							$cp_h_modif += $ab_duree;
386
							$cp_h_modif += $ab_duree;
400
						}
387
						}
-
 
388
						if ($AbsenceMotif->getMarkHsDiminuer()) {
-
 
389
							$hs_h_modif += $ab_duree;
-
 
390
						}
401
					}
391
					}
402
				}
392
				}
403
			}
393
			}
-
 
394
			
404
			// Gestion de la mise à jour des heures sup
395
			// Gestion de la mise à jour des congés payés
405
			$Utilisateur->setQuotaHeuresSupp(null);
-
 
406
			$Utilisateur->setCongesPayes($GLOBALS['_GTT_']['Utilisateur']->getCongesPayes());
-
 
407
			trigger_error($cp_h_modif, E_USER_NOTICE);
-
 
408
			if ($cp_h_modif > 0) {
396
			if ($cp_h_modif > 0) {
409
				$Utilisateur->diminuerCongesPayes($cp_h_modif);
397
				$Utilisateur->diminuerCongesPayes($cp_h_modif);
410
			}
398
			}
411
			if ($cp_h_modif < 0) {
399
			if ($cp_h_modif < 0) {
412
				$Utilisateur->augmenterCongesPayes(abs($cp_h_modif));
400
				$Utilisateur->augmenterCongesPayes(abs($cp_h_modif));
413
			}
401
			}
-
 
402
			if ($hs_h_modif > 0) {
-
 
403
				$Utilisateur->diminuerQuotaHeuresSup($hs_h_modif);
-
 
404
			}
-
 
405
			if ($hs_h_modif < 0) {
-
 
406
				$Utilisateur->augmenterQuotaHeuresSup(abs($hs_h_modif));
414
			
407
			}
415
			$Utilisateur->modifier();
408
			$Utilisateur->modifier();
416
		}
409
		}
-
 
410
 
-
 
411
		// Gestion de la mise à jour des heures sup
-
 
412
		foreach ($jours_w_semaine as $c => $j) {
-
 
413
			if (($j['pre'] - $j['act']) != 0) {// Modification sur le temps travaillé pour le jour courant
-
 
414
				$heure_sup_pre = $j['pre'] - $tps_w_jour;// -7 = 0 - 7
-
 
415
				$heure_sup_act = $j['act'] - $tps_w_jour;// -5 = 2 - 7
-
 
416
				$heure_sup_dif = $heure_sup_act - $heure_sup_pre;// 2 = -5 - -7  
-
 
417
				if (abs($heure_sup_pre) == $tps_w_jour) {// Premiere modifier du temps travaillé pour le jour courrant
-
 
418
					if ($heure_sup_act < 0) {
-
 
419
						$Utilisateur->diminuerQuotaHeuresSup(abs($heure_sup_act));
-
 
420
					}
-
 
421
					if ($heure_sup_act > 0) {
-
 
422
						$Utilisateur->augmenterQuotaHeuresSup($heure_sup_act);
-
 
423
					}
-
 
424
				} else {
-
 
425
					if ($heure_sup_dif < 0) {
-
 
426
						$Utilisateur->diminuerQuotaHeuresSup(abs($heure_sup_dif));
-
 
427
					}
-
 
428
					if ($heure_sup_dif > 0) {
-
 
429
						$Utilisateur->augmenterQuotaHeuresSup($heure_sup_dif);
-
 
430
					}
-
 
431
				}
-
 
432
			}
-
 
433
		}
-
 
434
		
-
 
435
		trigger_error(print_r($jours_w_semaine, true), E_USER_NOTICE);//$heure_sup_pre.'/'.$heure_sup_act.'-'.$total_jours
-
 
436
		$Utilisateur->modifier();
417
 
437
 
418
		// Mise à jour de la vue Identité pour les congés payés et RTT
438
		// Mise à jour de la vue Identité pour les congés payés et RTT
419
		$GttCtrlActionIdentification = new GttCtrlActionIdentification($this->getRegistre());
439
		$GttCtrlActionIdentification = new GttCtrlActionIdentification($this->getRegistre());
420
		$GttCtrlActionIdentification->setSuivant('__defaut__');
440
		$GttCtrlActionIdentification->setSuivant('__defaut__');
421
		$this->setSuivant($GttCtrlActionIdentification);
441
		$this->setSuivant($GttCtrlActionIdentification);
422
 
442
 
423
    	// Action suivante
443
    	// Action suivante
424
    	$this->setSuivant('__defaut__');
444
    	$this->setSuivant('__defaut__');
425
    }
445
    }
426
}
446
}
427
?>
447
?>