Subversion Repositories Applications.projet

Rev

Rev 208 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
66 alexandre_ 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU General Public                                                  |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | General Public License for more details.                                                             |
17
// |                                                                                                      |
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                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
431 mathias 22
// CVS : $Id:$
66 alexandre_ 23
/**
24
* Application projet
25
*
431 mathias 26
* Fichier de pr�sentation de la liste des projets par arbre
66 alexandre_ 27
*
28
*@package projet
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
431 mathias 34
*@version       $Revision:$
66 alexandre_ 35
// +------------------------------------------------------------------------------------------------------+
36
*/
37
 
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
41
 
431 mathias 42
// ON est dans la m�thode mesProjets() de la classe projetControleur
66 alexandre_ 43
 
44
$titre = '<h1>Arbre des Projets</h1>'."\n" ;
208 neiluj 45
 
431 mathias 46
/*if (PROJET_UTILISE_TYPE && $this->_type != '') {
208 neiluj 47
    $projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
48
    if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ;
49
} else {
50
    // Un tableau de tous les projets dans $projetListe
51
    $projetListe = projet::getTousLesProjets($this->_db, $this->_projet_exclu) ;
431 mathias 52
}*/
208 neiluj 53
 
66 alexandre_ 54
include_once PROJET_CHEMIN_API_ARBRE.'arbre.class.php' ;
55
// initialisation de variables
56
$intensite_feuille = '' ; $longueur_branche = '' ;
57
$arbre = new arbre() ;
58
// recherche du projet principal
59
 
60
$cime='';
61
 
62
foreach ($projetListe as $projet) {
63
    $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
64
    $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ;
65
    $lien_feuille = $this->_url->getURL() ;
66
    $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
67
 
68
    if ($projet->isRacine()) {
69
        $cime = $arbre->cime($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), $lien_feuille, '') ;
70
    } else {
71
 
72
        $arbre->addBranche($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(),
73
                            $lien_feuille, $lien_feuille, $intensite_feuille, $longueur_branche) ;
74
    }
75
}
431 mathias 76
return $titre.'<table>'.$cime.$arbre->affBranche().$arbre->affRacine().'</table>';
66 alexandre_ 77
 
78
/* +--Fin du code ----------------------------------------------------------------------------------------+
79
*
431 mathias 80
* $Log:$
66 alexandre_ 81
 
82
*
83
*
84
* +-- Fin du code ----------------------------------------------------------------------------------------+
85
*/
86
 
87
 
88
?>