Subversion Repositories Applications.papyrus

Rev

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

Rev 1087 Rev 1308
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.5.2.1 2007-04-11 14:24:39 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
*
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.5.2.1 $
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.
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'))
53
	include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
72
	include_once PROJET_CHEMIN_APPLI.'langues/pro_langues_fr.local.inc.php' ;
54
// On vérifie si l'utilisateur participe à des projets
73
// On vérifie si l'utilisateur participe à des projets
Line 55... Line 74...
55
 
74
 
-
 
75
$projetNonParticipantListe = & $projetListe ;
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',) ;
Line 59... Line 79...
59
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
79
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ;
60
 
80
 
61
$liste_projet = array() ;
81
$liste_projet = array() ;
62
// La liste
82
// La liste
Line 63... Line 83...
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) ;
65
    
85
    
66
    // Recherche du forum
86
    // Recherche du forum
67
    if ($projet->avoirListe()) {
87
    if ($ligne->pl_id_liste != null) {
Line 68... Line 88...
68
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
88
    	$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM);
69
    	$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica"/></a>';
89
    	$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica"/></a>';
70
    } else {
-
 
71
    
90
    } else {
72
		include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ;
91
    
Line 73... Line 92...
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) {
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.
Line 79... Line 98...
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
    
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();
Line 88... Line 107...
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 {
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>';
Line 94... Line 113...
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) ;
97
    	$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;	
116
    	$document = '<a href="'.$this->_url->getURL().'">voir</a>' ;	
98
    } else {
117
    } else {
99
    	$document = '-' ;
118
    	$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  2006/10/30 11:26:11  jp_milcent
-
 
155
* Modification du cartouche concernant la création d'un projet sur Tela.
134
* $Log: not supported by cvs2svn $
156
*
135
* Revision 1.4  2006/01/09 21:55:19  ddelon
157
* Revision 1.4  2006/01/09 21:55:19  ddelon
136
* flux rss dans liste des projets
158
* flux rss dans liste des projets
137
*
159
*
138
* Revision 1.3  2005/12/07 11:02:35  jp_milcent
160
* Revision 1.3  2005/12/07 11:02:35  jp_milcent