Subversion Repositories Applications.gtt

Rev

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

Rev 2 Rev 9
Line 279... Line 279...
279
			case 1: return 1;
279
			case 1: return 1;
280
			default: return -1;
280
			default: return -1;
281
		}
281
		}
Line 282... Line 282...
282
		
282
		
283
  }
283
  }
284
  /**fonction recuperant la liste de projets 
-
 
285
  */
-
 
286
  
284
	/** Méthode recuperant la liste de projets */
287
  function recupererTableauProjet()
285
	function recupererTableauProjet()
288
  {
286
	{
289
      $requete="SELECT ".GEST_CHAMPS_ID_PROJET." , ".GEST_CHAMPS_NOM_PROJET.",C.".GEST_CHAMPS_ID_CATEGORIE.",C.".GEST_CHAMPS_LIBELLE_CATEGORIE.
287
		$requete = 'SELECT '.GEST_CHAMPS_ID_PROJET." , ".GEST_CHAMPS_NOM_PROJET.",C.".GEST_CHAMPS_ID_CATEGORIE.",C.".GEST_CHAMPS_LIBELLE_CATEGORIE.
290
               " FROM ".GEST_PROJET." P  ,".GEST_CATEGORIE." C ".
288
					" FROM ".GEST_PROJET." P  ,".GEST_CATEGORIE." C ".
291
	       " WHERE P.".GEST_CHAMPS_ID_CATEGORIE." = C.".GEST_CHAMPS_ID_CATEGORIE.
289
					" WHERE P.".GEST_CHAMPS_ID_CATEGORIE." = C.".GEST_CHAMPS_ID_CATEGORIE.
292
	       " ORDER BY C.".GEST_CHAMPS_ID_CATEGORIE;
290
					" ORDER BY C.".GEST_CHAMPS_ID_CATEGORIE;
293
      $tab= array();
291
		$tab = array();
-
 
292
		$resultat = $GLOBALS['db']->query($requete);
294
      $resultat=$GLOBALS['db']->query($requete);
293
		(DB::isError($resultat)) ? die (BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ;
295
      
-
 
296
      (DB::isError($resultat)) ?
-
 
297
          die (BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ;
294
 
298
      $j=$resultat->numRows();
295
		$j = $resultat->numRows();
299
      if ($j!=0)
-
 
300
      {
296
		if ($j != 0) {
301
	  while($ligne=$resultat->fetchRow(DB_FETCHMODE_ASSOC))
-
 
302
	  {
297
			while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
303
	    $case=array(GEST_CHAMPS_ID_PROJET =>$ligne[GEST_CHAMPS_ID_PROJET],
298
				$case = array(	GEST_CHAMPS_ID_PROJET => $ligne[GEST_CHAMPS_ID_PROJET],
304
	                  GEST_CHAMPS_NOM_PROJET =>$ligne[GEST_CHAMPS_NOM_PROJET],
299
								GEST_CHAMPS_NOM_PROJET => $ligne[GEST_CHAMPS_NOM_PROJET],
305
			  GEST_CHAMPS_LIBELLE_CATEGORIE =>$ligne[GEST_CHAMPS_LIBELLE_CATEGORIE]);
-
 
306
			  
300
								GEST_CHAMPS_LIBELLE_CATEGORIE => $ligne[GEST_CHAMPS_LIBELLE_CATEGORIE]);
307
	      array_push($tab,$case);
301
				array_push($tab, $case);
308
	  }
302
			}
309
      }
303
		}
310
      return $tab;
304
		return $tab;
-
 
305
	}
311
  }
306
 
312
 /**
307
 /**
313
*fonction recuperant la tache par defaut d'un projet
308
*fonction recuperant la tache par defaut d'un projet
314
*tache par defaut : tache s'appelant general
309
*tache par defaut : tache s'appelant general
315
*@id : identifiant du projet
310
*@id : identifiant du projet