19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: tela.php,v 1.5 2006-10-30 11:26:11 jp_milcent Exp $ |
// CVS : $Id: tela.php,v 1.6 2007-04-19 15:34:35 neiluj Exp $ |
/** |
* Application projet |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.5 $ |
*@version $Revision: 1.6 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
41,10 → 41,29 |
|
define ('PROJET_LISTE_RESUME', false) ; |
|
if (PROJET_UTILISE_TYPE && $this->_type != '') { |
$projetListe = projet::getProjetDuType($this->_type, $this->_db) ; |
if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ; |
} else { |
// Un tableau de tous les projets dans $projetListe |
//$projetListe = projet::getTousLesProjets($this->_db, $this->_projet_exclu) ; |
} |
|
|
// requete pour recuperer la liste des projets |
$requete = 'select p_id, p_titre, p_wikini, pl_id_liste, plle_id_liste, p_avoir_document from'. |
' projet left join projet_lien_liste on p_id=pl_id_projet'. |
' left join projet_lien_liste_externe on p_id=plle_id_projet'. |
' group by p_id order by p_titre' ; |
$resultat = $this->_db->query($requete) ; |
if (DB::isError($resultat)) { |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
|
$res = '<h1>Liste des projets et forums de Tela Botanica</h1>'."\n" ; |
// Ajout du cartouche résumant la création d'un projet. |
$res .= '<div class="notes"> |
<h4>Créez votre projet...</h4> |
<h4>Cràez votre projet...</h4> |
<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 /> |
<a href="http://www.tela-botanica.org/page:creez_votre_projet">Voir la démarche en détail</a></p> |
</div>'; |
54,6 → 73,7 |
// On vérifie si l'utilisateur participe à des projets |
|
$projetNonParticipantListe = & $projetListe ; |
include_once PROJET_CHEMIN_CLASSES.'HTML_listeProjet.class.php' ; |
$HTML_projetNonParticipantListe = new HTML_listeProjet(true) ; |
$entete_liste = array ('Titre des projets et des forums', 'Forums', 'Wiki','RSS', 'Documents', 'Participants',) ; |
$HTML_projetNonParticipantListe->construitEntete($entete_liste) ; |
60,11 → 80,11 |
|
$liste_projet = array() ; |
// La liste |
foreach ($projetNonParticipantListe as $projet) { |
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $projet->getId()) ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $ligne->p_id) ; |
|
// Recherche du forum |
if ($projet->avoirListe()) { |
if ($ligne->pl_id_liste != null) { |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM); |
$forum = '<a href="'.$this->_url->getURL().'"><img src="sites/commun/generique/images/favicones/tela_botanica.png" alt="Tela Botanica"/></a>'; |
} else { |
71,9 → 91,8 |
|
include_once PROJET_CHEMIN_CLASSES.'liste_externe.class.php' ; |
$listes_ext = new liste_externe ($this->_db) ; |
$tableau_liste = $listes_ext->getListesAssociees($projet->getId()) ; |
if (count($tableau_liste)) { |
$info_liste = $listes_ext->getInfoListe($tableau_liste[0]) ; |
if ($ligne->plle_id_liste != null) { |
$info_liste = $listes_ext->getInfoListe($ligne->plle_id_liste) ; |
|
$forum = '<a href="'.$info_liste->AGO_A_URLGRP. |
'"><img src="sites/commun/generique/images/favicones/yahoo.png" alt="Yahoo"/></a>'; |
82,7 → 101,7 |
} |
} |
|
if ($projet->getWikini()) { |
if ($ligne->p_wikini) { |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI); |
$link=$this->_url->getURL(); |
$wiki_res = '<a href="'.$link.'">voir</a>' ; |
90,9 → 109,9 |
} else { |
$wiki_res = '-' ; |
} |
$titre= '<a href="'.$this->_url->getURL().'">'.$projet->getTitre().'</a>'; |
$titre= '<a href="'.$this->_url->getURL().'">'.$ligne->p_titre.'</a>'; |
|
if (count ($projet->getListesDocuments(PROJET_CHEMIN_FICHIERS))) { |
if ($ligne->p_avoir_document != 0) { |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_DOCUMENT) ; |
$document = '<a href="'.$this->_url->getURL().'">voir</a>' ; |
} else { |
100,7 → 119,7 |
} |
|
|
if ($projet->getWikini()) { |
if ($ligne->p_wikini) { |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI); |
$link=$this->_url->getURL(); |
$wiki_rss = '<a href="'.$link.'&wiki=DerniersChangementsRSS/xml'.'"><img src="sites/commun/generique/images/rss.gif" alt="rss"/></a>' ; |
132,6 → 151,12 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.5.2.1 2007/04/11 14:24:39 alexandre_tb |
* amélioration des performances par l'appel d'une requete directe |
* |
* Revision 1.5 2006/10/30 11:26:11 jp_milcent |
* Modification du cartouche concernant la création d'un projet sur Tela. |
* |
* Revision 1.4 2006/01/09 21:55:19 ddelon |
* flux rss dans liste des projets |
* |