New file |
0,0 → 1,38 |
<?php |
|
require_once GTT_CHEMIN_METIER.'Utilisateur.class.php'; |
|
class GttCtrlActionUtilisateur extends aAction { |
|
public function __construct() |
{ |
print_r($this->getResultat()); |
$Resultats = $this->getResultat(); |
$Resultats->ajouterEspace('Utilisateur', 'utilisateur'); |
$Resultats->ajouterSquelette('utilisateur', 'utilisateur.tpl.html'); |
} |
|
public function executer(Resultat $Resultat) |
{ |
$Resultat->setTitre('Ajouter un utilisateur'); |
$tab_preferences =& Projet::recupererTableauProjet(); |
$aso_preferences = array(); |
$Preference = new Preferences($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), 5000); |
$aso_preferences['nbre_projets'] = count($tab_preferences); |
// Parcourt du tableau de projets |
for($i = 0; $i < $aso_preferences['nbre_projets']; $i++) { |
$ligne = $tab_preferences[$i]; |
$coche = false; |
if ($Preference->isInPreferences($ligne[GEST_CHAMPS_ID_PROJET])) { |
$coche = true; |
} |
$aso_preferences['preferences'][$ligne[GEST_CHAMPS_LIBELLE_CATEGORIE]][] = array( |
'id' => 'pr['.$ligne[GEST_CHAMPS_ID_PROJET].']', |
'valeur' => $ligne[GEST_CHAMPS_ID_PROJET], |
'nom' => $ligne[GEST_CHAMPS_NOM_PROJET], |
'coche' => $coche); |
} |
$Resultat->ajouterDonnee('preferences', $aso_preferences); |
} |
} |
?> |