Subversion Repositories Applications.gtt

Rev

Rev 11 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 jpm 1
<?php
11 jpm 2
class GttCtrlActionUtilisateur extends aAction {
10 jpm 3
 
4
    public function __construct()
5
    {
6
    	print_r($this->getResultat());
7
    	$Resultats = $this->getResultat();
8
    	$Resultats->ajouterEspace('Utilisateur', 'utilisateur');
9
    	$Resultats->ajouterSquelette('utilisateur', 'utilisateur.tpl.html');
10
    }
46 jpm 11
 
10 jpm 12
    public function executer(Resultat $Resultat)
13
    {
14
    	$Resultat->setTitre('Ajouter un utilisateur');
15
    	$tab_preferences =& Projet::recupererTableauProjet();
16
    	$aso_preferences = array();
17
    	$Preference = new Preferences($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), 5000);
46 jpm 18
    	$aso_preferences['nbre_projets'] = count($tab_preferences);
10 jpm 19
		// Parcourt du tableau de projets
20
		for($i = 0; $i < $aso_preferences['nbre_projets']; $i++) {
21
			$ligne = $tab_preferences[$i];
22
			$coche = false;
23
			if ($Preference->isInPreferences($ligne[GEST_CHAMPS_ID_PROJET])) {
24
				$coche = true;
25
			}
26
			$aso_preferences['preferences'][$ligne[GEST_CHAMPS_LIBELLE_CATEGORIE]][] = array(
46 jpm 27
				'id' => 'pr['.$ligne[GEST_CHAMPS_ID_PROJET].']',
28
				'valeur' => $ligne[GEST_CHAMPS_ID_PROJET],
10 jpm 29
				'nom' => $ligne[GEST_CHAMPS_NOM_PROJET],
30
				'coche' => $coche);
31
		}
32
		$Resultat->ajouterDonnee('preferences', $aso_preferences);
33
    }
46 jpm 34
}
10 jpm 35
?>