//Autres auteurs : *@author Aucun *@copyright Tela-Botanica 2000-2005 *@version $Revision: 1.12 $ // +------------------------------------------------------------------------------------------------------+ */ // +------------------------------------------------------------------------------------------------------+ // | ENTETE du PROGRAMME | // +------------------------------------------------------------------------------------------------------+ // RAPPEL IMPORTANT // On se situe dans la méthode run() de la classe projetControleur // $retour = ''; // création de l'objet projet courant include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ; $projet = new projet ($this->_db, $this->_id_projet) ; // récupération de la liste des documents associés $liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES, $this->_id_projet) ; // création de la vue liste de document, on nettoie l'url //$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ; include_once PROJET_CHEMIN_CLASSES.'HTML_listeDocuments.class.php' ; include_once (PROJET_CHEMIN_CLASSES.'ezmlmAccessObject.class.php') ; $vue_liste_document = new HTML_listeDocuments($this->_url, false, '', $this->_auth) ; // réglage de paramètres de la vue $vue_liste_document->setAction (array ("couper" => PROJET_ACTION_COUPER, "modifier" => PROJET_ACTION_MODIFIER, "supprimer" => PROJET_SUPPRESSION_FICHIER)) ; $vue_liste_document->setCheminIcones(PROJET_CHEMIN_ICONES) ; // vérification des droits de l'utilisateur $entete_liste = array (PROJET_FICHIERS_NOM, PROJET_FICHIERS_TAILLE, PROJET_FICHIERS_PAR, PROJET_FICHIERS_CREE_LE) ; if ($this->_auth->getAuth()) { $droits = PROJET_DROIT_AUCUN; $participant = new participe($this->_db) ; $id_u = $this->_auth->getAuthData(PROJET_CHAMPS_ID) ; $isCoord = $participant->isCoordinateur($id_u, $this->_id_projet, $this->_db) ; $isParticipant = $participant->isContributeur($id_u, $this->_id_projet, $this->_db) ; if ($isParticipant) $droits = PROJET_DROIT_CONTRIBUTEUR; if ($isCoord) $droits = PROJET_DROIT_COORDINATEUR ; $isAdm = participe::isAdministrateur($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_db) ; if ($isAdm) $droits = PROJET_DROIT_ADMINISTRATEUR ; if ($isAdm) $isCoord = true ; $statut = participe::getStatutSurProjetCourant ($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_id_projet, $this->_db) ; // si participant, on ajoute le champs visibilite if ($statut !='' || $isAdm) { array_push ($entete_liste, PROJET_FICHIERS_VISIBILITE) ; $visible = true ; } else { $visible = false ; } // récupération de la liste des documents associés $liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES, $this->_id_projet, $visible) ; // si chef de projet ou si propriétaire d'au moins 1 document $proprietaire_un_document = false ; foreach ($liste_documents as $document) { if ($this->_auth->getAuthData(PROJET_CHAMPS_ID) == $document->_id_proprietaire) { $proprietaire_un_document = true ; $droits = PROJET_DROIT_PROPRIETAIRE ; } } if ($droits <= PROJET_DROIT_COORDINATEUR || $proprietaire_un_document) { array_push ($entete_liste, PROJET_ACTION) ; } } else { $droits = PROJET_DROIT_AUCUN ; // récupération de la liste des documents associés $liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES, $this->_id_projet, false) ; } if (!isset($droits)) $droits = PROJET_DROIT_AUCUN ; $vue_liste_document->construitEntete($entete_liste) ; $vue_liste_document->construitListe ($liste_documents, $droits, 'ignore_repertoire', $this->_db) ; $wiki_res = '' ; // Les wikinis associés au projet if ($projet->getWikini()) { $url = $GLOBALS['_GEN_commun']['url'] ; $this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI); $link=$this->_url->getURL(); $wiki_res .= '
'.$info_liste->AGO_A_RESUMLG.'
'."\n" ; $liste_ext_res .= ''."\n" ; //$liste_ext_res .= '