Subversion Repositories Applications.projet

Rev

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

Rev 389 Rev 396
Line 168... Line 168...
168
    
168
    
169
    // $chaine_id_projet contient une liste d identifiant separer par une virgule
169
    // $chaine_id_projet contient une liste d identifiant separer par une virgule
170
    if (!empty($resultats)) {
170
    if (!empty($resultats)) {
171
	    $chaine_id_projet = '';
171
	    $chaine_id_projet = '';
172
	    foreach ($resultats as $projet) {
172
	    foreach ($resultats as $projet) {
173
	    	$chaine_id_projet .= $projet['id'].',';
173
	    	$chaine_id_projet .= $this->_db->escapeSimple($projet['id']).',';
174
	    }
174
	    }
175
	    $chaine_id_projet = substr($chaine_id_projet, 0, -1);
175
	    $chaine_id_projet = substr($chaine_id_projet, 0, -1);
Line 176... Line 176...
176
		$where_recherche = ' where p_id in ('.$chaine_id_projet.')';
176
		$where_recherche = ' where p_id in ('.$chaine_id_projet.')';
Line 183... Line 183...
183
}
183
}
184
$select = '';
184
$select = '';
185
$from_recherche = '';
185
$from_recherche = '';
186
if (isset($_GET[PROJET_VARIABLE_THEME])) {
186
if (isset($_GET[PROJET_VARIABLE_THEME])) {
187
	$from_recherche = ' left join projet_avoir_theme on pat_id_projet=p_id left join projet_theme on pat_id_theme=pt_id_theme';
187
	$from_recherche = ' left join projet_avoir_theme on pat_id_projet=p_id left join projet_theme on pat_id_theme=pt_id_theme';
188
	$where_recherche = ' where pat_id_theme='.$_GET[PROJET_VARIABLE_THEME];
188
	$where_recherche = ' where pat_id_theme='.$this->_db->escapeSimple($_GET[PROJET_VARIABLE_THEME]);
189
	$theme_selectionne = $_GET[PROJET_VARIABLE_THEME];
189
	$theme_selectionne = $_GET[PROJET_VARIABLE_THEME];
190
} else {
190
} else {
191
	$theme_selectionne = 0;
191
	$theme_selectionne = 0;
192
}
192
}
Line 197... Line 197...
197
	include_once PROJET_CHEMIN_CLASSES.'participe.class.php';
197
	include_once PROJET_CHEMIN_CLASSES.'participe.class.php';
198
	$participant = new participe ($this->_db);
198
	$participant = new participe ($this->_db);
199
	$tableau_projet = $participant->getInformationsUtilisateurs($this->_auth->getAuthData(PROJET_CHAMPS_ID));
199
	$tableau_projet = $participant->getInformationsUtilisateurs($this->_auth->getAuthData(PROJET_CHAMPS_ID));
200
	$chaine_id_projet = '';
200
	$chaine_id_projet = '';
201
	if (count ($tableau_projet) == 0) return '<p class="information">Vous n\'&ecirc;tes inscrit &agrave; aucun projet</p>'; 
201
	if (count ($tableau_projet) == 0) return '<p class="information">Vous n\'&ecirc;tes inscrit &agrave; aucun projet</p>'; 
202
	foreach ($tableau_projet as $projet) $chaine_id_projet .= $projet[3].',';
202
	foreach ($tableau_projet as $projet) $chaine_id_projet .= $this->_db->escapeSimple($projet[3]).',';
203
	$chaine_id_projet = substr($chaine_id_projet, 0, -1);
203
	$chaine_id_projet = substr($chaine_id_projet, 0, -1);
204
	$where_recherche .= ' where p_id in ('.$chaine_id_projet.')';
204
	$where_recherche .= ' where p_id in ('.$chaine_id_projet.')';
Line 205... Line 205...
205
	
205
	
206
	$from_recherche .= ' left join projet_statut_utilisateurs on psu_id_projet=p_id and psu_id_utilisateur='.$this->_auth->getAuthData(PROJET_CHAMPS_ID).
206
	$from_recherche .= ' left join projet_statut_utilisateurs on psu_id_projet=p_id and psu_id_utilisateur='.$this->_auth->getAuthData(PROJET_CHAMPS_ID).
Line 227... Line 227...
227
$nombre_resultat = $resultat->numRows();
227
$nombre_resultat = $resultat->numRows();
Line 228... Line 228...
228
 
228
 
229
/* Si  l utilisateur est loggue, on recherche son statut par rapport aux projets */
229
/* Si  l utilisateur est loggue, on recherche son statut par rapport aux projets */
230
if ($this->_auth->getAuth()) {
230
if ($this->_auth->getAuth()) {
231
	$requete_statut = 'select psu_id_projet, psu_id_statut, ps_statut_nom from projet_statut_utilisateurs, projet_statut'.
231
	$requete_statut = 'select psu_id_projet, psu_id_statut, ps_statut_nom from projet_statut_utilisateurs, projet_statut'.
232
						' where ps_id_statut=psu_id_statut and psu_id_utilisateur='.$this->_auth->getAuthData(PROJET_CHAMPS_ID);
232
						' where ps_id_statut=psu_id_statut and psu_id_utilisateur='.$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID));
233
	$resultat_statut = $GLOBALS['projet_db']->query($requete_statut);
233
	$resultat_statut = $GLOBALS['projet_db']->query($requete_statut);
234
	while ($ligne_statut = $resultat_statut->fetchRow(DB_FETCHMODE_OBJECT)) {
234
	while ($ligne_statut = $resultat_statut->fetchRow(DB_FETCHMODE_OBJECT)) {
235
		$tableau_statut[$ligne_statut->psu_id_projet]['id_statut'] = $ligne_statut->psu_id_statut;
235
		$tableau_statut[$ligne_statut->psu_id_projet]['id_statut'] = $ligne_statut->psu_id_statut;
236
		$tableau_statut[$ligne_statut->psu_id_projet]['nom_statut'] = $ligne_statut->ps_statut_nom;
236
		$tableau_statut[$ligne_statut->psu_id_projet]['nom_statut'] = $ligne_statut->ps_statut_nom;
Line 485... Line 485...
485
* Revision 1.1  2008-08-25 15:00:28  alexandre_tb
485
* Revision 1.1  2008-08-25 15:00:28  alexandre_tb
486
* version initiale
486
* version initiale
487
*
487
*
488
* +-- Fin du code ----------------------------------------------------------------------------------------+
488
* +-- Fin du code ----------------------------------------------------------------------------------------+
489
*/
489
*/
490
 
-
 
491
 
-
 
492
?>
490
?>
493
491