Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1                                                                                      |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or                                        |
// | modify it under the terms of the GNU General Public                                                  |
// | License as published by the Free Software Foundation; either                                         |
// | version 2.1 of the License, or (at your option) any later version.                                   |
// |                                                                                                      |
// | This library is distributed in the hope that it will be useful,                                      |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
// | General Public License for more details.                                                             |
// |                                                                                                      |
// | You should have received a copy of the GNU General Public                                            |
// | 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: wikini.php,v 1.17 2007-06-25 12:15:06 alexandre_tb Exp $
/**
* Application projet
*
* Action participants
*
*@package projet
//Auteur original :
*@author        Alexandre Granier <alexandre@tela-botanica.org>
//Autres auteurs :
*@author        Aucun
*@copyright     Tela-Botanica 2000-2005
*@version       $Revision: 1.17 $
// +------------------------------------------------------------------------------------------------------+
*/

// +------------------------------------------------------------------------------------------------------+
// |                                            ENTETE du PROGRAMME                                       |
// +------------------------------------------------------------------------------------------------------+

// RAPPEL IMPORTANT
// On se situe dans la méthode run() de la classe projetControleur
//



$res = '' ;
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
$projet = new projet ($this->_db, $this->_id_projet) ;

$wiki_res = '' ;
$wiki_res.= '<h2>'.PROJET_PROJET.' : '.$projet->getTitre()."</h2>" ;
// Les wikinis associés au projet
if ($wiki=$projet->getWikini()) {
        if ($projet->isModere()) {
        if ($this->_auth->getAuth()) {
                include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
                $participant = new participe($this->_db) ;
                if ($participant->getStatutSurProjetCourant($this->_auth->getAuthData(PROJET_CHAMPS_ID), $projet->getId(), $this->_db) < 3) {
                        $wiki_res .= '<a href="http://'.$GLOBALS['_GEN_commun']['url']->host.'/'.
                                PROJET_CHEMIN_WIKINI.$projet->getWikini().'" target="_blank">'.PROJET_WIKINI_ALLER.'</a>';
                                $GLOBALS['_GEN_commun']['info_application']->wikini = $wiki;
                                $GLOBALS['_GEN_commun']['url']->addQueryString(PROJET_VARIABLE_ACTION,'wikini');
                            $GLOBALS['_GEN_commun']['url']->addQueryString(PROJET_VARIABLE_ID_PROJET,$this->_id_projet);
                                require_once 'client/integrateur_wikini/bibliotheque/iw_integrateur.fonct.php';
                                $wiki_res.= afficherPageWikini();
                                $GLOBALS['_PAPYRUS_']['rendu']['CONTENU_MENU'] =afficherPageMenuWikini();
                                $retour .= $wiki_res ;
                } else {
                        $retour .= PROJET_VOUS_N_ETES_PAS_INSCRIT;
                }
        } else {
                $retour .= PROJET_TEXTE_NON_IDENTIFIE;
        }
    } else {
                $wiki_res .= '<a href="http://'.$GLOBALS['_GEN_commun']['url']->host.'/'.
                                        PROJET_CHEMIN_WIKINI.$projet->getWikini().'" target="_blank" id="aller_sur_wikini">'.
                                        PROJET_WIKINI_ALLER.'</a>';
                $GLOBALS['_GEN_commun']['info_application']->wikini = $wiki;
                $GLOBALS['_GEN_commun']['url']->addQueryString(PROJET_VARIABLE_ACTION,'wikini');
            $GLOBALS['_GEN_commun']['url']->addQueryString(PROJET_VARIABLE_ID_PROJET,$this->_id_projet);
                require_once 'client/integrateur_wikini/bibliotheque/iw_integrateur.fonct.php';
                $wiki_res.= afficherPageWikini();
                $GLOBALS['_PAPYRUS_']['rendu']['CONTENU_MENU'] =afficherPageMenuWikini();
                $retour .= $wiki_res ;
        }
} else {
    $wiki_res .= '<div>'.PROJET_WIKINI_PAS.'</div>'."\n" ;
    $retour .= $wiki_res ;
}


?>