Subversion Repositories Applications.projet

Rev

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

Rev 40 Rev 42
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.13 2005-10-17 13:41:34 ddelon Exp $
23
// CVS : $Id: projetControleur.class.php,v 1.14 2005-10-17 16:20:38 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.13 $
36
*@version       $Revision: 1.14 $
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
38
*/
38
*/
Line 39... Line 39...
39
 
39
 
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line 516... Line 516...
516
        // Maintenant la liste des projets où l'utilisateur ne participe pas.
516
        // Maintenant la liste des projets où l'utilisateur ne participe pas.
517
        // Et si pas loggué tous les projets
517
        // Et si pas loggué tous les projets
518
        if ($auth) {
518
        if ($auth) {
519
            $projetNonParticipantListe = $participant -> getProjetsNonParticipant($id_u) ;
519
            $projetNonParticipantListe = $participant -> getProjetsNonParticipant($id_u) ;
520
            // Si certain projet sont à exclure, on les exclu
520
            // Si certain projet sont à exclure, on les exclu
521
	         // Si certain projet sont à exclure, on les exclu
-
 
522
	        $projet_a_exclure = array() ;
521
	        $projet_a_exclure = array() ;
523
	        if (count($this->_projet_exclu)) {
522
	        if (count($this->_projet_exclu)) {
524
	        	arsort($this->_projet_exclu) ;
523
	        	arsort($this->_projet_exclu) ;
525
	            foreach ($this->_projet_exclu as $valeur) {
524
	            foreach ($this->_projet_exclu as $valeur) {
526
	            	for ($i = 0; $i < count($projetNonParticipantListe); $i++) {
525
	            	for ($i = 0; $i < count($projetNonParticipantListe); $i++) {
527
	            		if ($projetNonParticipantListe[$i]->getId() == $valeur)  array_push ($projet_a_exclure, $i);}
526
	            		if ($projetNonParticipantListe[$i]->getId() == $valeur)  array_push ($projet_a_exclure, $i);}
528
	            }
527
	            }
529
	        }
528
	        }
-
 
529
	        if (PROJET_UTILISE_TYPE && $this->_type != '') {
530
	        foreach ($projet_a_exclure as $valeur) unset ($projetNonParticipantListe[$valeur]) ;
530
	        	for ($i = 0; $i < count($projetNonParticipantListe); $i++) {
-
 
531
	        		if ($projetNonParticipantListe[$i]->getType() != $this->_type) array_push ($projet_a_exclure, $i) ;
-
 
532
	        	}
-
 
533
           	}
531
	        
534
           	
-
 
535
	        foreach ($projet_a_exclure as $valeur) {
-
 
536
	        	unset ($projetNonParticipantListe[$valeur]) ;
-
 
537
	        }
532
	     
538
	        	
533
            $HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
539
            $HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
534
            $entete_liste = array (PROJET_LISTE) ;
540
            $entete_liste = array (PROJET_LISTE) ;
535
            array_push ($entete_liste, PROJET_S_INSCRIRE) ;
541
            array_push ($entete_liste, PROJET_S_INSCRIRE) ;
Line 536... Line 542...
536
 
542
 
Line 546... Line 552...
546
                                        ) ;
552
                                        ) ;
547
                $this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE) ;
553
                $this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE) ;
548
                array_push ($ligne_projet, '<a href="'.$this->_url->getURL().'">'.PROJET_S_INSCRIRE.'</a>') ;
554
                array_push ($ligne_projet, '<a href="'.$this->_url->getURL().'">'.PROJET_S_INSCRIRE.'</a>') ;
Line 549... Line 555...
549
                
555
                
550
                $this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
-
 
551
                /*
-
 
552
                if ($participant->isAdministrateur($this->_auth->getAuthData(PROJET_CHAMPS_ID))) {
-
 
553
                    $this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_SUPPRESSION_PROJET) ;
-
 
554
                    array_push ($ligne_projet, '<a href="'.$this->_url->getURL().'" onclick="javascript:return confirm(\''.PROJET_DESTRUCTION_ALERTE.'\');">'.
-
 
555
                                    PROJET_FICHIER_SUPPRIMER.'</a>'."\n") ;
-
 
556
                }
-
 
557
                */
556
                $this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
558
                array_push ($liste_projet, $ligne_projet) ;
557
                array_push ($liste_projet, $ligne_projet) ;
559
            }
558
            }
560
            $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
559
            $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
561
            $HTML_projetNonParticipantListe->construitListe($liste_projet) ;
560
            $HTML_projetNonParticipantListe->construitListe($liste_projet) ;
Line 1210... Line 1209...
1210
                        $author->listdir = $liste->listdir ;
1209
                        $author->listdir = $liste->listdir ;
1211
                        $author->listname = $info_liste->getNom() ;
1210
                        $author->listname = $info_liste->getNom() ;
1212
                        $author->listdomain = $info_liste->getDomaine() ;
1211
                        $author->listdomain = $info_liste->getDomaine() ;
1213
                        $author->forcehref = $this->_url->getURL() ;
1212
                        $author->forcehref = $this->_url->getURL() ;
1214
                        $author->display($liste->actionargs[0]);
1213
                        $author->display($liste->actionargs[0]);
1215
                        break;
-
 
1216
                    break ;
1214
                    break ;
1217
                }
1215
                }
1218
                $sortie_liste = ob_get_contents() ;
1216
                $sortie_liste = ob_get_contents() ;
1219
                ob_end_clean() ;
1217
                ob_end_clean() ;
1220
            }
1218
            }