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