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.7 2007-11-19 14:27:46 alexandre_tb Exp $
|
22 |
// CVS : $Id: tela.php,v 1.7 2007-11-19 14:27:46 alexandre_tb 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.7 $
|
34 |
*@version $Revision: 1.7 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
39 |
// | ENTETE du PROGRAMME |
|
39 |
// | ENTETE du PROGRAMME |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
41 |
|
41 |
|
42 |
// La constante suivante est dans le fichier de conf
|
42 |
// La constante suivante est dans le fichier de conf
|
43 |
//define ('PROJET_LISTE_RESUME', false) ;
|
43 |
//define ('PROJET_LISTE_RESUME', false) ;
|
44 |
|
44 |
|
45 |
if (PROJET_UTILISE_TYPE && $this->_type != '') {
|
45 |
if (PROJET_UTILISE_TYPE && $this->_type != '') {
|
46 |
$projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
|
46 |
$projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
|
47 |
if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ;
|
47 |
if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ;
|
48 |
} else {
|
48 |
} else {
|
49 |
// Un tableau de tous les projets dans $projetListe
|
49 |
// Un tableau de tous les projets dans $projetListe
|
50 |
//$projetListe = projet::getTousLesProjets($this->_db, $this->_projet_exclu) ;
|
50 |
//$projetListe = projet::getTousLesProjets($this->_db, $this->_projet_exclu) ;
|
51 |
}
|
51 |
}
|
52 |
|
52 |
|
53 |
|
53 |
|
54 |
// requete pour recuperer la liste des projets
|
54 |
// requete pour recuperer la liste des projets
|
55 |
$requete = 'select p_id, p_titre, p_wikini, pl_id_liste, plle_id_liste, p_avoir_document from'.
|
55 |
$requete = 'select p_id, p_titre, p_wikini, pl_id_liste, plle_id_liste, p_avoir_document from'.
|
56 |
' projet left join projet_lien_liste on p_id=pl_id_projet'.
|
56 |
' projet left join projet_lien_liste on p_id=pl_id_projet'.
|
57 |
' left join projet_lien_liste_externe on p_id=plle_id_projet'.
|
57 |
' left join projet_lien_liste_externe on p_id=plle_id_projet'.
|
58 |
' group by p_id order by p_titre' ;
|
58 |
' group by p_id order by p_titre' ;
|
59 |
$resultat = $this->_db->query($requete) ;
|
59 |
$resultat = $this->_db->query($requete) ;
|
60 |
if (DB::isError($resultat)) {
|
60 |
if (DB::isError($resultat)) {
|
61 |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
61 |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
|
62 |
}
|
62 |
}
|
63 |
|
63 |
|
64 |
$res = '<h1>Liste des projets et forums de Tela Botanica</h1>'."\n" ;
|
64 |
$res = '<h1>Liste des projets et forums de Tela Botanica</h1>'."\n" ;
|
65 |
// Ajout du cartouche resumant la creation d'un projet.
|
65 |
// Ajout du cartouche resumant la creation d'un projet.
|
66 |
$res .= '<div class="notes">
|
66 |
$res .= '<div class="notes">
|
67 |
<h4>Créez votre projet...</h4>
|
67 |
<h4>Créez votre projet...</h4>
|
68 |
<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 />
|
68 |
<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 />
|
69 |
<a href="http://www.tela-botanica.org/page:creez_votre_projet">Voir la démarche en détail</a></p>
|
69 |
<a href="http://www.tela-botanica.org/page:creez_votre_projet">Voir la démarche en détail</a></p>
|
70 |
</div>';
|
70 |
</div>';
|
71 |
// On inclue un fichier local
|
71 |
// On inclue un fichier local
|
72 |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
|
72 |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
|
73 |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
|
73 |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
|
74 |
// On v�rifie si l'utilisateur participe � des projets
|
74 |
// On v�rifie si l'utilisateur participe � des projets
|
75 |
|
75 |
|
76 |
$projetNonParticipantListe = & $projetListe ;
|
76 |
$projetNonParticipantListe = & $projetListe ;
|
77 |
include_once PROJET_CHEMIN_CLASSES.'HTML_listeProjet.class.php' ;
|
77 |
include_once PROJET_CHEMIN_CLASSES.'HTML_listeProjet.class.php' ;
|
78 |
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
|
78 |
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
|
79 |
$entete_liste = array ('Titre des projets et des forums', 'Forums', 'Wiki','RSS', 'Documents', 'Participants',) ;
|
79 |
$entete_liste = array ('Titre des projets et des forums', 'Forums', 'Wiki','RSS', 'Documents', 'Participants',) ;
|
80 |
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
|
80 |
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
|
81 |
|
81 |
|
82 |
$liste_projet = array() ;
|
82 |
$liste_projet = array() ;
|
83 |
// La liste
|
83 |
// La liste
|
84 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
|
84 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
|
85 |
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ;
|
85 |
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ;
|
86 |
|
86 |
|
87 |
// Recherche du forum
|
87 |
// Recherche du forum
|
88 |
if ($ligne->pl_id_liste != null) {
|
88 |
if ($ligne->pl_id_liste != null) {
|
89 |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
|
89 |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
|
90 |
$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica"/></a>';
|
90 |
$forum = '<a href="'.$this->_url->getURL().'"><img src="http://resources.tela-botanica.org/tb/img/16x16/favicon.png" alt="Tela Botanica"/></a>';
|
91 |
} else {
|
91 |
} else {
|
92 |
|
92 |
|
93 |
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
|
93 |
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
|
94 |
$listes_ext = new liste_externe ($this->_db) ;
|
94 |
$listes_ext = new liste_externe ($this->_db) ;
|
95 |
if ($ligne->plle_id_liste != null) {
|
95 |
if ($ligne->plle_id_liste != null) {
|
96 |
$info_liste = $listes_ext->getInfoListe($ligne->plle_id_liste) ;
|
96 |
$info_liste = $listes_ext->getInfoListe($ligne->plle_id_liste) ;
|
97 |
|
97 |
|
98 |
$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
|
98 |
$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
|
99 |
'"><img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/></a>';
|
99 |
'"><img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/></a>';
|
100 |
} else {
|
100 |
} else {
|
101 |
$forum = '-';
|
101 |
$forum = '-';
|
102 |
}
|
102 |
}
|
103 |
}
|
103 |
}
|
104 |
|
104 |
|
105 |
if ($ligne->p_wikini) {
|
105 |
if ($ligne->p_wikini) {
|
106 |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
|
106 |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
|
107 |
$link=$this->_url->getURL();
|
107 |
$link=$this->_url->getURL();
|
108 |
$wiki_res = '<a href="'.$link.'">voir</a>' ;
|
108 |
$wiki_res = '<a href="'.$link.'">voir</a>' ;
|
109 |
$this->_url->removeQueryString ('act');
|
109 |
$this->_url->removeQueryString ('act');
|
110 |
} else {
|
110 |
} else {
|
111 |
$wiki_res = '-' ;
|
111 |
$wiki_res = '-' ;
|
112 |
}
|
112 |
}
|
113 |
$titre= '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>';
|
113 |
$titre= '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>';
|
114 |
|
114 |
|
115 |
if ($ligne->p_avoir_document != 0) {
|
115 |
if ($ligne->p_avoir_document != 0) {
|
116 |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
|
116 |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
|
117 |
$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;
|
117 |
$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;
|
118 |
} else {
|
118 |
} else {
|
119 |
$document = '-' ;
|
119 |
$document = '-' ;
|
120 |
}
|
120 |
}
|
121 |
|
121 |
|
122 |
|
122 |
|
123 |
if ($ligne->p_wikini) {
|
123 |
if ($ligne->p_wikini) {
|
124 |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
|
124 |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
|
125 |
$link=$this->_url->getURL();
|
125 |
$link=$this->_url->getURL();
|
126 |
$wiki_rss = '<a href="'.$link.'&wiki=DerniersChangementsRSS/xml'.'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ;
|
126 |
$wiki_rss = '<a href="'.$link.'&wiki=DerniersChangementsRSS/xml'.'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ;
|
127 |
$this->_url->removeQueryString ('act');
|
127 |
$this->_url->removeQueryString ('act');
|
128 |
} else {
|
128 |
} else {
|
129 |
$wiki_rss = '-' ;
|
129 |
$wiki_rss = '-' ;
|
130 |
}
|
130 |
}
|
131 |
|
131 |
|
132 |
|
132 |
|
133 |
$this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
|
133 |
$this->_url->addQueryString ('act', PROJET_ACTION_VOIR_PARTICIPANT);
|
134 |
$participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
|
134 |
$participant = '<a href="'.$this->_url->getURL().'">voir</a>' ;
|
135 |
$ligne_projet = array ( '', $titre, $forum, // le nom du projet
|
135 |
$ligne_projet = array ( '', $titre, $forum, // le nom du projet
|
136 |
$wiki_res, $wiki_rss,$document, $participant) ;
|
136 |
$wiki_res, $wiki_rss,$document, $participant) ;
|
137 |
|
137 |
|
138 |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
|
138 |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION);
|
139 |
array_push ($liste_projet, $ligne_projet) ;
|
139 |
array_push ($liste_projet, $ligne_projet) ;
|
140 |
}
|
140 |
}
|
141 |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
|
141 |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
|
142 |
$HTML_projetNonParticipantListe->construitListe($liste_projet) ;
|
142 |
$HTML_projetNonParticipantListe->construitListe($liste_projet) ;
|
143 |
if ($HTML_projetNonParticipantListe->getRowCount() > 1) {
|
143 |
if ($HTML_projetNonParticipantListe->getRowCount() > 1) {
|
144 |
///$res .= '<p>'.PROJET_TOUS_LES_PROJETS.'</p>' ;
|
144 |
///$res .= '<p>'.PROJET_TOUS_LES_PROJETS.'</p>' ;
|
145 |
$res .= $HTML_projetNonParticipantListe->toHTML() ;
|
145 |
$res .= $HTML_projetNonParticipantListe->toHTML() ;
|
146 |
}
|
146 |
}
|
147 |
|
147 |
|
148 |
// Nettoyage de l'url
|
148 |
// Nettoyage de l'url
|
149 |
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
|
149 |
$this->_url->removeQueryString (PROJET_VARIABLE_ID_PROJET);
|
150 |
return $res ;
|
150 |
return $res ;
|
151 |
|
151 |
|
152 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
152 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
153 |
*
|
153 |
*
|
154 |
* $Log: not supported by cvs2svn $
|
154 |
* $Log: not supported by cvs2svn $
|
155 |
* Revision 1.6 2007-04-19 15:34:35 neiluj
|
155 |
* Revision 1.6 2007-04-19 15:34:35 neiluj
|
156 |
* pr�parration release (livraison) "Narmer" - v0.25
|
156 |
* pr�parration release (livraison) "Narmer" - v0.25
|
157 |
*
|
157 |
*
|
158 |
* Revision 1.5.2.1 2007/04/11 14:24:39 alexandre_tb
|
158 |
* Revision 1.5.2.1 2007/04/11 14:24:39 alexandre_tb
|
159 |
* am�lioration des performances par l'appel d'une requete directe
|
159 |
* am�lioration des performances par l'appel d'une requete directe
|
160 |
*
|
160 |
*
|
161 |
* Revision 1.5 2006/10/30 11:26:11 jp_milcent
|
161 |
* Revision 1.5 2006/10/30 11:26:11 jp_milcent
|
162 |
* Modification du cartouche concernant la cr�ation d'un projet sur Tela.
|
162 |
* Modification du cartouche concernant la cr�ation d'un projet sur Tela.
|
163 |
*
|
163 |
*
|
164 |
* Revision 1.4 2006/01/09 21:55:19 ddelon
|
164 |
* Revision 1.4 2006/01/09 21:55:19 ddelon
|
165 |
* flux rss dans liste des projets
|
165 |
* flux rss dans liste des projets
|
166 |
*
|
166 |
*
|
167 |
* Revision 1.3 2005/12/07 11:02:35 jp_milcent
|
167 |
* Revision 1.3 2005/12/07 11:02:35 jp_milcent
|
168 |
* Ajout d'attribut alt aux images.
|
168 |
* Ajout d'attribut alt aux images.
|
169 |
*
|
169 |
*
|
170 |
* Revision 1.2 2005/11/28 11:15:22 alexandre_tb
|
170 |
* Revision 1.2 2005/11/28 11:15:22 alexandre_tb
|
171 |
* nettoyage URL en sortie de programme
|
171 |
* nettoyage URL en sortie de programme
|
172 |
*
|
172 |
*
|
173 |
* Revision 1.1 2005/11/25 14:47:51 alexandre_tb
|
173 |
* Revision 1.1 2005/11/25 14:47:51 alexandre_tb
|
174 |
* version initiale
|
174 |
* version initiale
|
175 |
*
|
175 |
*
|
176 |
|
176 |
|
177 |
*
|
177 |
*
|
178 |
*
|
178 |
*
|
179 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
179 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
180 |
*/
|
180 |
*/
|
181 |
|
181 |
|
182 |
|
182 |
|
183 |
?>
|
183 |
?>
|