Subversion Repositories Applications.gtt

Rev

Rev 5 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 7
Line 64... Line 64...
64
	*@param identifiant utilisateur.
64
	*@param identifiant utilisateur.
65
	*/
65
	*/
66
	function  recupererTableauPreferences()
66
	function  recupererTableauPreferences()
67
	{
67
	{
68
		$table = array();
68
		$table = array();
69
		$requete =	"SELECT P.".GEST_CHAMPS_ID_PROJET.", P.".GEST_CHAMPS_NOM_PROJET." ,C.".GEST_CHAMPS_ID_CATEGORIE.",C.".GEST_CHAMPS_LIBELLE_CATEGORIE.
69
		$requete =	'SELECT P.gp_id_projet, P.gp_nom_projet , C.gc_id_categorie, C.gc_libelle_categorie '.
70
					" FROM ".GEST_PREFERENCES." F, ".GEST_PROJET." P,".GEST_CATEGORIE." C".
70
					'FROM gestion_preferences F, gestion_projet P, gestion_categorie C '.
71
					" WHERE ".GEST_CHAMPS_ID_UTILISATEUR. " = $this->_utilisateur".
71
					'WHERE gp_id_utilisateur = '.$this->_utilisateur.' '.
72
					" AND  F.".GEST_CHAMPS_ID_PROJET." = P.".GEST_CHAMPS_ID_PROJET.
72
					'AND  F.gp_id_projet = P.gp_id_projet '.
73
					" AND P.".GEST_CHAMPS_ID_CATEGORIE." = C.".GEST_CHAMPS_ID_CATEGORIE.
73
					'AND P.gc_id_categorie = C.gc_id_categorie '.
74
					" ORDER BY ".GEST_CHAMPS_LIBELLE_CATEGORIE;
74
					'ORDER BY gc_libelle_categorie ';
75
		$resultat = $GLOBALS['db']->query($requete);
75
		$resultat = $GLOBALS['db']->query($requete);
Line 76... Line 76...
76
		
76
		
Line 77... Line 77...
77
		(DB::isError($resultat)) ? die (BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ;
77
		(DB::isError($resultat)) ? die (BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ;
Line 81... Line 81...
81
			array_push($table, $case);
81
			array_push($table, $case);
82
		}
82
		}
83
		return $table;
83
		return $table;
84
	}
84
	}
Line 85... Line 85...
85
      
85
      
86
      /**
86
	/**
87
      *supprimer liste de preferences
87
	*supprimer liste de preferences
88
      *pour un utilisateur donne
88
	*pour un utilisateur donne
89
      *@param identifiant d'un utilisateur
89
	*@param identifiant d'un utilisateur
90
      */
-
 
91
      
90
	*/  
92
	function supprimerPreferences($id)
91
	function supprimerPreferences($id)
93
	{
92
	{
94
		$requete =	'DELETE FROM '.GEST_PREFERENCES.' '.
93
		$requete =	'DELETE FROM '.GEST_PREFERENCES.' '.
95
					'WHERE '.GEST_CHAMPS_ID_UTILISATEUR.' = '.$id;
94
					'WHERE '.GEST_CHAMPS_ID_UTILISATEUR.' = '.$id;