Subversion Repositories Applications.projet

Rev

Rev 145 | Rev 269 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 145 Rev 208
Line 17... Line 17...
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.5 2006-10-30 11:26:11 jp_milcent Exp $
22
// CVS : $Id: tela.php,v 1.6 2007-04-19 15:34:35 neiluj 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
*
Line 29... Line 29...
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.5 $
34
*@version       $Revision: 1.6 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
Line 40... Line 40...
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line -... Line 41...
-
 
41
 
-
 
42
define ('PROJET_LISTE_RESUME', false) ;
-
 
43
 
-
 
44
if (PROJET_UTILISE_TYPE && $this->_type != '') {
-
 
45
    $projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
-
 
46
    if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ;
-
 
47
} else {
-
 
48
    // Un tableau de tous les projets dans $projetListe
-
 
49
    //$projetListe = projet::getTousLesProjets($this->_db, $this->_projet_exclu) ;
-
 
50
}
-
 
51
 
-
 
52
 
-
 
53
// requete pour recuperer la liste des projets
-
 
54
$requete = 'select p_id, p_titre, p_wikini, pl_id_liste, plle_id_liste, p_avoir_document from'.
-
 
55
			' projet left join projet_lien_liste on p_id=pl_id_projet'.
-
 
56
			' left join projet_lien_liste_externe on p_id=plle_id_projet'.
-
 
57
			' group by p_id order by p_titre' ;
-
 
58
$resultat = $this->_db->query($requete) ;
-
 
59
if (DB::isError($resultat)) {
41
 
60
	return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ;
42
define ('PROJET_LISTE_RESUME', false) ;
61
}
43
 
62
        
44
$res = '<h1>Liste des projets et forums de Tela Botanica</h1>'."\n" ;
63
$res = '<h1>Liste des projets et forums de Tela Botanica</h1>'."\n" ;
45
// Ajout du cartouche résumant la création d'un projet.
64
// Ajout du cartouche résumant la création d'un projet.
46
$res .= '<div class="notes">
65
$res .= '<div class="notes">
47
<h4>Créez votre projet...</h4>
66
<h4>Cràez votre projet...</h4>
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 />
67
<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>
68
<a href="http://www.tela-botanica.org/page:creez_votre_projet">Voir la démarche en détail</a></p>
50
</div>';
69
</div>';
51
// On inclue un fichier local
70
// On inclue un fichier local
Line 52... Line 71...
52
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
71
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php'))
-
 
72
	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' ;
73
// On vérifie si l'utilisateur participe à des projets
54
// On vérifie si l'utilisateur participe à des projets
74
 
55
 
75
$projetNonParticipantListe = & $projetListe ;
Line 56... Line 76...
56
$projetNonParticipantListe = & $projetListe ;
76
include_once PROJET_CHEMIN_CLASSES.'HTML_listeProjet.class.php' ;
57
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
77
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ;
58
$entete_liste = array ('Titre des projets et des forums', 'Forums', 'Wiki','RSS', 'Documents', 'Participants',) ;
78
$entete_liste = array ('Titre des projets et des forums', 'Forums', 'Wiki','RSS', 'Documents', 'Participants',) ;
59
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
79
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
Line 60... Line 80...
60
 
80
 
61
$liste_projet = array() ;
81
$liste_projet = array() ;
62
// La liste
82
// La liste
63
foreach ($projetNonParticipantListe as $projet) {
83
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
64
    $this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
84
    $this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ;
Line 65... Line 85...
65
    
85
    
66
    // Recherche du forum
86
    // Recherche du forum
67
    if ($projet->avoirListe()) {
-
 
68
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
87
    if ($ligne->pl_id_liste != null) {
69
    	$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica"/></a>';
88
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
Line 70... Line 89...
70
    } else {
89
    	$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica"/></a>';
71
    
90
    } else {
72
		include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
91
    
73
		$listes_ext = new liste_externe ($this->_db) ;
92
		include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
74
		$tableau_liste = $listes_ext->getListesAssociees($projet->getId()) ;
93
		$listes_ext = new liste_externe ($this->_db) ;
75
		if (count($tableau_liste)) {
94
		if ($ligne->plle_id_liste != null) {
Line 76... Line 95...
76
			$info_liste = $listes_ext->getInfoListe($tableau_liste[0]) ;
95
			$info_liste = $listes_ext->getInfoListe($ligne->plle_id_liste) ;
77
			
96
			
78
			$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
97
			$forum = '<a href="'.$info_liste->AGO_A_URLGRP.
79
					'"><img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/></a>';
98
					'"><img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/></a>';
80
		} else {
99
		} else {
81
			$forum = '-';	
100
			$forum = '-';	
82
		}
101
		}
83
    }
102
    }
84
    
103
    
Line 85... Line 104...
85
    if ($projet->getWikini()) {
104
    if ($ligne->p_wikini) {
86
		$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
105
		$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI);
87
		$link=$this->_url->getURL();
106
		$link=$this->_url->getURL();
88
	    $wiki_res = '<a href="'.$link.'">voir</a>' ;
107
	    $wiki_res = '<a href="'.$link.'">voir</a>' ;
89
	    $this->_url->removeQueryString ('act');
108
	    $this->_url->removeQueryString ('act');
90
	} else {
109
	} else {
Line 91... Line 110...
91
	    $wiki_res = '-' ;
110
	    $wiki_res = '-' ;
92
	}
111
	}
93
    $titre= '<a href="'.$this->_url->getURL().'">'.$projet->getTitre().'</a>';
112
    $titre= '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>';
94
    
113
    
95
    if (count ($projet->getListesDocuments(PROJET_CHEMIN_FICHIERS))) {
114
    if ($ligne->p_avoir_document != 0) {
96
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
115
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ;
Line 130... Line 149...
130
return $res ;
149
return $res ;
Line 131... Line 150...
131
 
150
 
132
/* +--Fin du code ----------------------------------------------------------------------------------------+
151
/* +--Fin du code ----------------------------------------------------------------------------------------+
133
*
152
*
-
 
153
* $Log: not supported by cvs2svn $
-
 
154
* Revision 1.5.2.1  2007/04/11 14:24:39  alexandre_tb
-
 
155
* amélioration des performances par l'appel d'une requete directe
-
 
156
*
-
 
157
* Revision 1.5  2006/10/30 11:26:11  jp_milcent
-
 
158
* Modification du cartouche concernant la création d'un projet sur Tela.
134
* $Log: not supported by cvs2svn $
159
*
135
* Revision 1.4  2006/01/09 21:55:19  ddelon
160
* Revision 1.4  2006/01/09 21:55:19  ddelon
136
* flux rss dans liste des projets
161
* flux rss dans liste des projets
137
*
162
*
138
* Revision 1.3  2005/12/07 11:02:35  jp_milcent
163
* Revision 1.3  2005/12/07 11:02:35  jp_milcent