Line 18... |
Line 18... |
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 |
// +------------------------------------------------------------------------------------------------------+
|
Line 22... |
Line 22... |
22 |
|
22 |
|
Line 23... |
Line 23... |
23 |
// CVS : $Id: projetControleur.class.php,v 1.9 2005-10-04 10:09:23 alexandre_tb Exp $
|
23 |
// CVS : $Id: projetControleur.class.php,v 1.10 2005-10-06 14:51:55 alexandre_tb Exp $
|
24 |
|
24 |
|
25 |
/**
|
25 |
/**
|
26 |
* Application projet
|
26 |
* Application projet
|
Line 31... |
Line 31... |
31 |
//Auteur original :
|
31 |
//Auteur original :
|
32 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
32 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
33 |
//Autres auteurs :
|
33 |
//Autres auteurs :
|
34 |
*@author Aucun
|
34 |
*@author Aucun
|
35 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@copyright Tela-Botanica 2000-2004
|
36 |
*@version $Revision: 1.9 $
|
36 |
*@version $Revision: 1.10 $
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
*/
|
38 |
*/
|
Line 39... |
Line 39... |
39 |
|
39 |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
Line 364... |
Line 364... |
364 |
include_once PROJET_CHEMIN_CLASSES.'statut_liste.class.php' ;
|
364 |
include_once PROJET_CHEMIN_CLASSES.'statut_liste.class.php' ;
|
365 |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
|
365 |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
|
366 |
$participant = new participe ($this->_db) ;
|
366 |
$participant = new participe ($this->_db) ;
|
Line 367... |
Line 367... |
367 |
|
367 |
|
- |
|
368 |
if (PROJET_UTILISE_TYPE && $this->_type != '') {
|
368 |
if (PROJET_UTILISE_TYPE && $this->_type != '') {
|
369 |
|
369 |
$projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
|
370 |
$projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
|
370 |
array_push ($projetListe, projet::getProjetRacine($this->_db)) ;
|
371 |
if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ;
|
371 |
} else {
|
372 |
} else {
|
372 |
// Un tableau de tous les projets dans $projetListe
|
373 |
// Un tableau de tous les projets dans $projetListe
|
373 |
$projetListe = projet::getTousLesProjets($this->_db) ;
|
374 |
$projetListe = projet::getTousLesProjets($this->_db) ;
|
- |
|
375 |
}
|
- |
|
376 |
// Si la liste est vide, on renvoie un texte
|
- |
|
377 |
if (count($projetListe) == 0) {
|
- |
|
378 |
return PROJET_PAS_DE_LISTE;
|
374 |
}
|
379 |
}
|
375 |
// Si certain projet sont à exclure, on les exclu
|
380 |
// Si certain projet sont à exclure, on les exclu
|
376 |
if (count($this->_projet_exclu)) {
|
381 |
if (count($this->_projet_exclu)) {
|
377 |
foreach ($this->_projet_exclu as $valeur) {
|
382 |
foreach ($this->_projet_exclu as $valeur) {
|
378 |
for ($i = 0; $i < count ($projetListe); $i++) {
|
383 |
for ($i = 0; $i < count ($projetListe); $i++) {
|
Line 490... |
Line 495... |
490 |
|
495 |
|
491 |
// Maintenant la liste des projets où l'utilisateur ne participe pas.
|
496 |
// Maintenant la liste des projets où l'utilisateur ne participe pas.
|
492 |
// Et si pas loggué tous les projets
|
497 |
// Et si pas loggué tous les projets
|
493 |
if ($auth) {
|
498 |
if ($auth) {
|
- |
|
499 |
$projetNonParticipantListe = $participant -> getProjetsNonParticipant($id_u) ;
|
- |
|
500 |
// Si certain projet sont à exclure, on les exclu
|
- |
|
501 |
if (count($this->_projet_exclu)) {
|
- |
|
502 |
foreach ($this->_projet_exclu as $valeur) {
|
- |
|
503 |
for ($i = 0; $i < count ($projetNonParticipantListe); $i++) {
|
- |
|
504 |
if ($projetNonParticipantListe[$i]->getId() == $valeur) unset ($projetNonParticipantListe[$i]) ;
|
- |
|
505 |
}
|
- |
|
506 |
}
|
494 |
$projetNonParticipantListe = $participant -> getProjetsNonParticipant($id_u) ;
|
507 |
}
|
495 |
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
|
508 |
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
|
496 |
$entete_liste = array (PROJET_LISTE) ;
|
509 |
$entete_liste = array (PROJET_LISTE) ;
|
Line 497... |
Line 510... |
497 |
if ($auth) array_push ($entete_liste, PROJET_S_INSCRIRE) ;
|
510 |
if ($auth) array_push ($entete_liste, PROJET_S_INSCRIRE) ;
|