Subversion Repositories Applications.projet

Rev

Rev 66 | Rev 208 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 66 Rev 103
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU General Public                                                  |
9
// | modify it under the terms of the GNU General Public                                                  |
10
// | License as published by the Free Software Foundation; either                                         |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | General Public License for more details.                                                             |
16
// | General Public License for more details.                                                             |
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: arbre.php,v 1.1 2005-11-25 14:47:51 alexandre_tb Exp $
22
// CVS : $Id: arbre.php,v 1.2 2006-03-02 16:07:17 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* Fichier de présentation de la liste des projets par arbre
26
* Fichier de présentation de la liste des projets par arbre
27
*
27
*
28
*@package projet
28
*@package projet
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.1 $
34
*@version       $Revision: 1.2 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
41
 
41
 
42
// ON est dans la méthode mesProjets() de la classe projetControleur
42
// ON est dans la méthode mesProjets() de la classe projetControleur
43
 
43
 
44
$titre = '<h1>Arbre des Projets</h1>'."\n" ;
44
$titre = '<h1>Arbre des Projets</h1>'."\n" ;
45
include_once PROJET_CHEMIN_API_ARBRE.'arbre.class.php' ;
45
include_once PROJET_CHEMIN_API_ARBRE.'arbre.class.php' ;
46
// initialisation de variables
46
// initialisation de variables
47
$intensite_feuille = '' ; $longueur_branche = '' ;
47
$intensite_feuille = '' ; $longueur_branche = '' ;
48
$arbre = new arbre() ;
48
$arbre = new arbre() ;
49
// recherche du projet principal
49
// recherche du projet principal
50
 
50
 
51
$cime='';
51
$cime='';
52
 
52
 
53
foreach ($projetListe as $projet) {
53
foreach ($projetListe as $projet) {
54
    $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
54
    $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
55
    $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ;
55
    $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ;
56
    $lien_feuille = $this->_url->getURL() ;
56
    $lien_feuille = $this->_url->getURL() ;
57
    $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
57
    $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
58
 
58
 
59
    if ($projet->isRacine()) {
59
    if ($projet->isRacine()) {
60
        $cime = $arbre->cime($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), $lien_feuille, '') ;
60
        $cime = $arbre->cime($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), $lien_feuille, '') ;
61
    } else {
61
    } else {
62
 
62
 
63
        $arbre->addBranche($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(),
63
        $arbre->addBranche($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(),
64
                            $lien_feuille, $lien_feuille, $intensite_feuille, $longueur_branche) ;
64
                            $lien_feuille, $lien_feuille, $intensite_feuille, $longueur_branche) ;
65
    }
65
    }
66
}
66
}
67
return $titre.'<table>'.$cime.$arbre->affBranche().$arbre->affRacine().'</table>';
67
return $titre.'<table id="arbre">'.$cime.$arbre->affBranche().$arbre->affRacine().'</table>';
68
 
68
 
69
/* +--Fin du code ----------------------------------------------------------------------------------------+
69
/* +--Fin du code ----------------------------------------------------------------------------------------+
70
*
70
*
71
* $Log: not supported by cvs2svn $
71
* $Log: not supported by cvs2svn $
-
 
72
* Revision 1.1  2005/11/25 14:47:51  alexandre_tb
-
 
73
* version initiale
-
 
74
*
72
 
75
 
73
*
76
*
74
*
77
*
75
* +-- Fin du code ----------------------------------------------------------------------------------------+
78
* +-- Fin du code ----------------------------------------------------------------------------------------+
76
*/
79
*/
77
 
80
 
78
 
81
 
79
?>
82
?>