Subversion Repositories Applications.projet

Rev

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

Rev 396 Rev 431
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU General Public                                            |
18
// | You should have received a copy of the GNU General Public                                            |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: tela_ergo.php,v 1.4 2008-10-27 16:54:59 aperonnet Exp $
22
// CVS : $Id: tela_ergo.php,v 1.2 2008-09-01 14:37:15 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* Fichier de presentation de la liste des projets pour Tela Botanica nouvelle version
26
* Fichier de presentation de la liste des projets pour Tela Botanica nouvelle version
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aucun
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.4 $
34
*@version       $Revision: 1.2 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 184... Line 184...
184
}
184
}
185
$select = '';
185
$select = '';
186
$from_recherche = '';
186
$from_recherche = '';
187
if (isset($_GET[PROJET_VARIABLE_THEME])) {
187
if (isset($_GET[PROJET_VARIABLE_THEME])) {
188
	$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
	$from_recherche = ' left join projet_avoir_theme on pat_id_projet=p_id left join projet_theme on pat_id_theme=pt_id_theme';
189
	$where_recherche = ' where pat_id_theme='.$this->_db->escapeSimple(intval($_GET[PROJET_VARIABLE_THEME]));
189
	$where_recherche = ' where pat_id_theme='.intval($_GET[PROJET_VARIABLE_THEME]);
190
	$theme_selectionne = $_GET[PROJET_VARIABLE_THEME];
190
	$theme_selectionne = $_GET[PROJET_VARIABLE_THEME];
191
} else {
191
} else {
192
	$theme_selectionne = 0;
192
	$theme_selectionne = 0;
193
}
193
}
Line 194... Line 194...
194
 
194
 
195
if ($this->_auth->getAuth()) {
195
if ($this->_auth->getAuth()) {
Line 196... Line 196...
196
	/** on recherche egalement le statut si l utilisateur est loggue */
196
	/** on recherche egalement le statut si l utilisateur est loggue */
197
 
-
 
198
	$from_recherche .= ' left join projet_statut_utilisateurs on psu_id_projet=p_id and psu_id_utilisateur='.
197
	
199
						$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID)).
198
	$from_recherche .= ' left join projet_statut_utilisateurs on psu_id_projet=p_id and psu_id_utilisateur='.$this->_db->escapeSimple($this->_auth->getAuthData(PROJET_CHAMPS_ID)).
200
						' left join projet_statut on psu_id_statut=ps_id_statut';
199
						' left join projet_statut on psu_id_statut=ps_id_statut';
-
 
200
	$select = 'psu_id_statut, ps_statut_nom,';
-
 
201
}
201
	$select = 'psu_id_statut, ps_statut_nom,';
202
 
202
}
203
if ($ordre_tri == '') $ordre_tri = 'desc';
203
$requete = 'select '.$select.'p_id, p_titre, p_resume, pl_id_liste, plle_id_liste, p_avoir_document, ps_nombre_inscrit, ps_pourcent,'.
204
$requete = 'select '.$select.'p_id, p_titre, p_resume, pl_id_liste, plle_id_liste, p_avoir_document, ps_nombre_inscrit, ps_pourcent,'.
204
				' p_wikini, ps_doc_derniere_semaine, p_avoir_document, ps_nombre_inscrit_derniere_semaine, '.
205
				' p_wikini, ps_doc_derniere_semaine, p_avoir_document, ps_nombre_inscrit_derniere_semaine, '.
205
				'  ps_nombre_membre_yahoo, ps_msg_derniere_semaine, ps_modifwiki_derniere_semaine, p_en_dormance from'.
206
				'  ps_nombre_membre_yahoo, ps_msg_derniere_semaine, ps_modifwiki_derniere_semaine, p_en_dormance from'.
206
				' projet left join projet_lien_liste on p_id=pl_id_projet'.
207
				' projet left join projet_lien_liste on p_id=pl_id_projet'.
207
				' left join projet_lien_liste_externe on p_id=plle_id_projet'.
208
				' left join projet_lien_liste_externe on p_id=plle_id_projet'.
208
				' left join projet_statistiques on p_id=ps_ce_projet and ps_dernier=1'.
209
				' left join projet_statistiques on p_id=ps_ce_projet and ps_dernier=1'.
209
				$from_recherche.
210
				$from_recherche.
Line 210... Line -...
210
				$where_recherche.
-
 
211
				' group by p_id order by '.$tri.' '.$ordre_tri ;
-
 
212
 
211
				$where_recherche.
-
 
212
				' group by p_id order by '.$tri.' '.$ordre_tri ;
213
if ($ordre_tri == '') $ordre_tri = 'desc';
213
 
214
 
214
$resultat = $this->_db->query($requete) ;
215
$resultat = $this->_db->query($requete) ;
215
 
Line 216... Line 216...
216
if (DB::isError($resultat)) {
216
if (DB::isError($resultat)) {
Line 234... Line 234...
234
 
234
 
Line 235... Line 235...
235
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
235
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
236
 
236
	
237
	// Si le projet est en dormance, on ne l affiche pas dans le mode normal
237
	// Si le projet est en dormance, on ne l affiche pas dans le mode normal
Line 238... Line 238...
238
	// Sauf si le theme choisit est "en dormance"
238
	// Sauf si le theme choisit est "en dormance"
239
	if ($_SESSION['_PROJET_']['projet_affichage'] != 'expert' && $ligne->p_en_dormance == 1  && $theme_selectionne != 9) {
239
	/*if ($_SESSION['_PROJET_']['projet_affichage'] != 'expert' && $ligne->p_en_dormance == 1  && $theme_selectionne != 9) {	
240
 
240
					
Line 241... Line 241...
241
	} else {
241
	} else {*/
Line 242... Line 242...
242
		$donnees[] = $ligne;
242
		$donnees[] = $ligne;
243
	}
243
	//}
Line 361... Line 361...
361
    } else {
361
    } else {
362
    	$document = '-' ;
362
    	$document = '-' ;
363
    }
363
    }
364
    $tableau_donnees[$ligne->p_id]['document'] = $document;
364
    $tableau_donnees[$ligne->p_id]['document'] = $document;
Line -... Line 365...
-
 
365
                            
-
 
366
   /*if ($ligne->p_wikini) {
-
 
367
		$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
-
 
368
		$link=$this->_url->getURL();
-
 
369
		$this->_url->addQueryString('wiki', 'DerniersChangementsRSS/xml');
-
 
370
	    $wiki_rss = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ;
-
 
371
	    $this->_url->removeQueryString ('act');
-
 
372
	    $this->_url->removeQueryString ('wiki');
-
 
373
	} else {
-
 
374
	    $wiki_rss = '-' ;
365
 
375
	}*/
366
   if ($ligne->p_wikini) {
376
	if ($ligne->p_wikini) {
367
		$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
377
		$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
368
		$link=$this->_url->getURL();
378
		$link=$this->_url->getURL();
369
		$url_rss = PROJET_URL_WIKINI.$ligne->p_wikini.'/wakka.php?wiki=DerniersChangementsRss/xml';
379
		$url_rss = PROJET_URL_WIKINI.$ligne->p_wikini.'/wakka.php?wiki=DerniersChangementsRss/xml';
Line 372... Line 382...
372
	    //$this->_url->removeQueryString ('act');
382
	    //$this->_url->removeQueryString ('act');
373
	    //$this->_url->removeQueryString ('wiki');
383
	    //$this->_url->removeQueryString ('wiki');
374
	} else {
384
	} else {
375
	    $wiki_rss = '-' ;
385
	    $wiki_rss = '-' ;
376
	}
386
	}
-
 
387
	
377
    $tableau_donnees[$ligne->p_id]['wikini_rss'] = $wiki_rss;
388
    $tableau_donnees[$ligne->p_id]['wikini_rss'] = $wiki_rss;
Line 378... Line 389...
378
 
389
    
379
    $this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
390
    $this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
380
    $participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
391
    $participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
Line 469... Line 480...
469
$this->_url->removeQueryString (PROJET_VARIABLE_TRI);
480
$this->_url->removeQueryString (PROJET_VARIABLE_TRI);
470
return $res ;
481
return $res ;
Line 471... Line 482...
471
 
482
 
472
/* +--Fin du code ----------------------------------------------------------------------------------------+
483
/* +--Fin du code ----------------------------------------------------------------------------------------+
473
*
484
*
474
* $Log: not supported by cvs2svn $
-
 
475
* Revision 1.3  2008-09-16 14:07:40  alexandre_tb
-
 
476
* suppression du bug intermittent sur le moteur de recherche
-
 
477
*
485
* $Log: tela_ergo.php,v $
478
* Revision 1.2  2008-09-01 14:37:15  alexandre_tb
486
* Revision 1.2  2008-09-01 14:37:15  alexandre_tb
479
* modification du tri par defaut
487
* modification du tri par defaut
480
*
488
*
481
* Revision 1.1  2008-08-25 15:00:28  alexandre_tb
489
* Revision 1.1  2008-08-25 15:00:28  alexandre_tb