New file |
0,0 → 1,97 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU General Public | |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: arbre.php,v 1.3 2007-04-19 15:34:35 neiluj Exp $ |
/** |
* Application projet |
* |
* Fichier de présentation de la liste des projets par arbre |
* |
*@package projet |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
// ON est dans la méthode mesProjets() de la classe projetControleur |
|
$titre = '<h1>Arbre des Projets</h1>'."\n" ; |
|
if (PROJET_UTILISE_TYPE && $this->_type != '') { |
$projetListe = projet::getProjetDuType($this->_type, $this->_db) ; |
if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ; |
} else { |
// Un tableau de tous les projets dans $projetListe |
$projetListe = projet::getTousLesProjets($this->_db, $this->_projet_exclu) ; |
} |
|
include_once PROJET_CHEMIN_API_ARBRE.'arbre.class.php' ; |
// initialisation de variables |
$intensite_feuille = '' ; $longueur_branche = '' ; |
$arbre = new arbre() ; |
// recherche du projet principal |
|
$cime=''; |
|
foreach ($projetListe as $projet) { |
$this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ; |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ; |
$lien_feuille = $this->_url->getURL() ; |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ; |
|
if ($projet->isRacine()) { |
$cime = $arbre->cime($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), $lien_feuille, '') ; |
} else { |
|
$arbre->addBranche($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), |
$lien_feuille, $lien_feuille, $intensite_feuille, $longueur_branche) ; |
} |
} |
return $titre.'<table id="arbre">'.$cime.$arbre->affBranche().$arbre->affRacine().'</table>'; |
|
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2.2.1 2007/04/11 14:26:00 alexandre_tb |
* ajout d'un include de projet.class.php et participe.class.php pour limiter le nombre de fichier inclu par projetControleur.class.php |
* |
* Revision 1.2 2006/03/02 16:07:17 alexandre_tb |
* ajout d'un id pour l'arbre |
* |
* Revision 1.1 2005/11/25 14:47:51 alexandre_tb |
* version initiale |
* |
|
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
|
|
?> |