Subversion Repositories Applications.projet

Rev

Rev 93 | Rev 208 | 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
// +------------------------------------------------------------------------------------------------------+
145 jp_milcent 22
// CVS : $Id: tela.php,v 1.5 2006-10-30 11:26:11 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
145 jp_milcent 34
*@version       $Revision: 1.5 $
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" ;
145 jp_milcent 45
// Ajout du cartouche résumant la création d'un projet.
66 alexandre_ 46
$res .= '<div class="notes">
47
<h4>Créez votre projet...</h4>
145 jp_milcent 48
<p class="last"> Toute personne inscrite au réseau Tela Botanica peut demander à créer un forum de discussion ou monter un projet collaboratif. <br />
49
<a href="http://www.tela-botanica.org/page:creez_votre_projet">Voir la démarche en détail</a></p>
66 alexandre_ 50
</div>';
51
// On inclue un fichier local
52
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
53
	include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
54
// On vérifie si l'utilisateur participe à des projets
55
 
56
$projetNonParticipantListe = & $projetListe ;
57
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
93 ddelon 58
$entete_liste = array ('Titre des projets et des forums', 'Forums', 'Wiki','RSS', 'Documents', 'Participants',) ;
66 alexandre_ 59
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
60
 
61
$liste_projet = array() ;
62
// La liste
63
foreach ($projetNonParticipantListe as $projet) {
64
    $this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
65
 
66
    // Recherche du forum
67
    if ($projet->avoirListe()) {
68
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
84 jp_milcent 69
    	$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica"/></a>';
66 alexandre_ 70
    } else {
71
 
72
		include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
73
		$listes_ext = new liste_externe ($this->_db) ;
74
		$tableau_liste = $listes_ext->getListesAssociees($projet->getId()) ;
75
		if (count($tableau_liste)) {
76
			$info_liste = $listes_ext->getInfoListe($tableau_liste[0]) ;
77
 
78
			$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
84 jp_milcent 79
					'"><img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/></a>';
66 alexandre_ 80
		} else {
81
			$forum = '-';
82
		}
83
    }
84
 
85
    if ($projet->getWikini()) {
86
		$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
87
		$link=$this->_url->getURL();
88
	    $wiki_res = '<a href="'.$link.'">voir</a>' ;
89
	    $this->_url->removeQueryString ('act');
90
	} else {
91
	    $wiki_res = '-' ;
92
	}
93
    $titre= '<a href="'.$this->_url->getURL().'">'.$projet->getTitre().'</a>';
94
 
95
    if (count ($projet->getListesDocuments(PROJET_CHEMIN_FICHIERS))) {
96
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
97
    	$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;
98
    } else {
99
    	$document = '-' ;
100
    }
93 ddelon 101
 
102
 
103
   if ($projet->getWikini()) {
104
		$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
105
		$link=$this->_url->getURL();
106
	    $wiki_rss = '<a href="'.$link.'&wiki=DerniersChangementsRSS/xml'.'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ;
107
	    $this->_url->removeQueryString ('act');
108
	} else {
109
	    $wiki_rss = '-' ;
110
	}
111
 
112
 
66 alexandre_ 113
    $this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
114
    $participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
115
    $ligne_projet = array ( '', $titre, $forum,  // le nom du projet
93 ddelon 116
                        $wiki_res, $wiki_rss,$document, $participant) ;
66 alexandre_ 117
 
118
    $this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
119
    array_push ($liste_projet, $ligne_projet) ;
120
}
121
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
122
$HTML_projetNonParticipantListe->construitListe($liste_projet) ;
123
if ($HTML_projetNonParticipantListe->getRowCount() > 1) {
124
	///$res .= '<p>'.PROJET_TOUS_LES_PROJETS.'</p>' ;
125
	$res .= $HTML_projetNonParticipantListe->toHTML() ;
126
}
127
 
73 alexandre_ 128
// Nettoyage de l'url
129
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
66 alexandre_ 130
return $res ;
131
 
132
/* +--Fin du code ----------------------------------------------------------------------------------------+
133
*
134
* $Log: not supported by cvs2svn $
145 jp_milcent 135
* Revision 1.4  2006/01/09 21:55:19  ddelon
136
* flux rss dans liste des projets
137
*
93 ddelon 138
* Revision 1.3  2005/12/07 11:02:35  jp_milcent
139
* Ajout d'attribut alt aux images.
140
*
84 jp_milcent 141
* Revision 1.2  2005/11/28 11:15:22  alexandre_tb
142
* nettoyage URL en sortie de programme
143
*
73 alexandre_ 144
* Revision 1.1  2005/11/25 14:47:51  alexandre_tb
145
* version initiale
146
*
66 alexandre_ 147
 
148
*
149
*
150
* +-- Fin du code ----------------------------------------------------------------------------------------+
151
*/
152
 
153
 
154
?>