Subversion Repositories Applications.projet

Rev

Rev 73 | Rev 93 | Go to most recent revision | 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
// +------------------------------------------------------------------------------------------------------+
84 jp_milcent 22
// CVS : $Id: tela.php,v 1.3 2005-12-07 11:02:35 jp_milcent Exp $
66 alexandre_ 23
/**
24
* Application projet
25
*
26
* Fichier de présentation de la liste des projets pour Tela Botanica
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
84 jp_milcent 34
*@version       $Revision: 1.3 $
66 alexandre_ 35
// +------------------------------------------------------------------------------------------------------+
36
*/
37
 
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
41
 
42
define ('PROJET_LISTE_RESUME', false) ;
43
 
44
$res = '<h1>Liste des projets et forums de Tela Botanica</h1>'."\n" ;
45
$res .= '<div class="notes">
46
<h4>Créez votre projet...</h4>
47
<p class="last"> Toute personne inscrite au réseau Tela Botanica peut demander à créer un forum de discussion ou monter projet collaboratif. <br /><a href="http://www.tela-botanica.org/papyrus.php?menu=340">Voir la démarche en détail</a></p>
48
</div>';
49
// On inclue un fichier local
50
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
51
	include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
52
// On vérifie si l'utilisateur participe à des projets
53
 
54
$projetNonParticipantListe = & $projetListe ;
55
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
56
$entete_liste = array ('Titre des projets et des forums', 'Forums', 'Wikini', 'Documents', 'Participants') ;
57
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
58
 
59
$liste_projet = array() ;
60
// La liste
61
foreach ($projetNonParticipantListe as $projet) {
62
    $this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
63
 
64
    // Recherche du forum
65
    if ($projet->avoirListe()) {
66
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
84 jp_milcent 67
    	$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica"/></a>';
66 alexandre_ 68
    } else {
69
 
70
		include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
71
		$listes_ext = new liste_externe ($this->_db) ;
72
		$tableau_liste = $listes_ext->getListesAssociees($projet->getId()) ;
73
		if (count($tableau_liste)) {
74
			$info_liste = $listes_ext->getInfoListe($tableau_liste[0]) ;
75
 
76
			$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
84 jp_milcent 77
					'"><img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/></a>';
66 alexandre_ 78
		} else {
79
			$forum = '-';
80
		}
81
    }
82
 
83
    if ($projet->getWikini()) {
84
		$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
85
		$link=$this->_url->getURL();
86
	    $wiki_res = '<a href="'.$link.'">voir</a>' ;
87
	    $this->_url->removeQueryString ('act');
88
	} else {
89
	    $wiki_res = '-' ;
90
	}
91
    $titre= '<a href="'.$this->_url->getURL().'">'.$projet->getTitre().'</a>';
92
 
93
    if (count ($projet->getListesDocuments(PROJET_CHEMIN_FICHIERS))) {
94
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
95
    	$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;
96
    } else {
97
    	$document = '-' ;
98
    }
99
    $this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
100
    $participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
101
    $ligne_projet = array ( '', $titre, $forum,  // le nom du projet
102
                        $wiki_res, $document, $participant) ;
103
 
104
    $this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
105
    array_push ($liste_projet, $ligne_projet) ;
106
}
107
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
108
$HTML_projetNonParticipantListe->construitListe($liste_projet) ;
109
if ($HTML_projetNonParticipantListe->getRowCount() > 1) {
110
	///$res .= '<p>'.PROJET_TOUS_LES_PROJETS.'</p>' ;
111
	$res .= $HTML_projetNonParticipantListe->toHTML() ;
112
}
113
 
73 alexandre_ 114
// Nettoyage de l'url
115
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
66 alexandre_ 116
return $res ;
117
 
118
/* +--Fin du code ----------------------------------------------------------------------------------------+
119
*
120
* $Log: not supported by cvs2svn $
84 jp_milcent 121
* Revision 1.2  2005/11/28 11:15:22  alexandre_tb
122
* nettoyage URL en sortie de programme
123
*
73 alexandre_ 124
* Revision 1.1  2005/11/25 14:47:51  alexandre_tb
125
* version initiale
126
*
66 alexandre_ 127
 
128
*
129
*
130
* +-- Fin du code ----------------------------------------------------------------------------------------+
131
*/
132
 
133
 
134
?>