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