Subversion Repositories Applications.papyrus

Rev

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

Rev 472 Rev 474
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
 
22
// CVS : $Id: projetControleur.class.php,v 1.4 2005-09-27 15:52:26 ddelon Exp $
23
// CVS : $Id: projetControleur.class.php,v 1.5 2005-09-27 16:34:44 alexandre_tb Exp $
-
 
24
 
23
/**
25
/**
24
* Application projet
26
* Application projet
25
*
27
*
26
* La classe controleur projet
28
* La classe controleur projet
27
*
29
*
Line 29... Line 31...
29
//Auteur original :
31
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
32
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
33
//Autres auteurs :
32
*@author        Aucun
34
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
35
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.4 $
36
*@version       $Revision: 1.5 $
-
 
37
=======
-
 
38
*@version       $Revision: 1.5 $
35
// +------------------------------------------------------------------------------------------------------+
39
// +------------------------------------------------------------------------------------------------------+
36
*/
40
*/
Line 37... Line 41...
37
 
41
 
38
// +------------------------------------------------------------------------------------------------------+
42
// +------------------------------------------------------------------------------------------------------+
Line 172... Line 176...
172
     * Valeurs possibles: arbre
176
     * Valeurs possibles: arbre
173
     * @access private
177
     * @access private
174
     */
178
     */
175
    var $_presentation;
179
    var $_presentation;
Line -... Line 180...
-
 
180
 
-
 
181
   /**
-
 
182
     * Le type du projets, par défaut 0, signifie en pas de type particumier.
-
 
183
     * Valeurs possibles: 0, 1, 2, 3 ...
-
 
184
     * @access private
-
 
185
     */
Line -... Line 186...
-
 
186
    var $_projet_exclu = array();
-
 
187
 
-
 
188
   /**
-
 
189
     * Le tableau des projets à ne pas affiché, ni dans l'arbre, ni dans les listes
-
 
190
     * @access private
176
 
191
     */
177
 
192
 
178
    /**
193
    /**
179
     * Méthode principale de la classe. Elle permet d'appeler les méthodes du modules
194
     * Méthode principale de la classe. Elle permet d'appeler les méthodes du modules
180
     * projet en fonction de l'action.
195
     * projet en fonction de l'action.
Line 187... Line 202...
187
    {
202
    {
188
        if ($this->_action == '') {
203
        if ($this->_action == '') {
189
            return $this->messageErreur(PROJETCONTROLEUR_ACTION_INVALIDE) ;
204
            return $this->messageErreur(PROJETCONTROLEUR_ACTION_INVALIDE) ;
190
        }
205
        }
Line 191... Line -...
191
        
-
 
192
        
206
        
193
        // Si il n'y a pas d'action mais un projet, on transmet par défaut l'action PROJET_VOIR
207
        // Si il n'y a pas d'action mais un projet, on transmet par défaut l'action PROJET_VOIR
194
        if ($this->_id_projet != "" && $this->_action == PROJET_DEFAUT) {
208
        if ($this->_id_projet != "" && $this->_action == PROJET_DEFAUT) {
195
            $this->_action = PROJET_ACTION_VOIR_RESUME ;
209
            $this->_action = PROJET_ACTION_VOIR_RESUME ;
196
            $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $this->_id_projet) ;
210
            $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $this->_id_projet) ;
197
        }
-
 
198
        
211
        }
199
        if ($this->_id_document != "") {
212
        if ($this->_id_document != "") {
200
            $this->_url->addQueryString (PROJET_VARIABLE_ID_DOCUMENT, $this->_id_document) ;
213
            $this->_url->addQueryString (PROJET_VARIABLE_ID_DOCUMENT, $this->_id_document) ;
-
 
214
        }
-
 
215
        if ($this->_id_repertoire != '') {
-
 
216
            $this->_url->addQueryString (PROJET_VARIABLE_ID_REPERTOIRE, $this->_id_repertoire) ;
201
        }
217
        }
202
        $retour = '' ;
218
        $retour = '' ;
Line 203... Line -...
203
        if (!defined('PROJET_MENU_AFFICHER_CONTENU_CORPS')) $retour = $this->menuGeneral() ;
-
 
204
        
219
        if (!defined('PROJET_MENU_AFFICHER_CONTENU_CORPS')) $retour = $this->menuGeneral() ;
205
        
220
        
206
        switch ($this->_action) {
221
        switch ($this->_action) {
207
            case PROJET_DEFAUT :
222
            case PROJET_DEFAUT :
208
                $retour .= $this->mesProjets() ;
223
                $retour .= $this->mesProjets() ;
Line 239... Line 254...
239
            break ;
254
            break ;
240
            case PROJET_NOUVEAU_REPERTOIRE :
255
            case PROJET_NOUVEAU_REPERTOIRE :
241
                $retour .= $this->nouveauRepertoire() ;
256
                $retour .= $this->nouveauRepertoire() ;
242
            break ;
257
            break ;
243
            case PROJET_NOUVEAU_REPERTOIRE_V :
258
            case PROJET_NOUVEAU_REPERTOIRE_V :
244
                $retour .= $this->nouveauRepertoireValidation().$this->accueilProjet() ;
259
                $retour .= $this->nouveauRepertoireValidation() ;
-
 
260
                $this->_action = PROJET_ACTION_VOIR_DOCUMENT ;
245
            break ;
261
            break ;
246
            case PROJET_SUPPRESSION_FICHIER :
262
            case PROJET_SUPPRESSION_FICHIER :
247
                $retour .=$this->suppressionFichier() ;
263
                $retour .=$this->suppressionFichier() ;
248
                $this->_action = PROJET_ACTION_VOIR_DOCUMENT ;
264
                $this->_action = PROJET_ACTION_VOIR_DOCUMENT ;
249
            break ;
265
            break ;
Line 272... Line 288...
272
            break ;
288
            break ;
273
            case PROJET_ACTION_DESINSCRIPTION_PROJET : $retour .= $this->desinscriptionProjet() ;
289
            case PROJET_ACTION_DESINSCRIPTION_PROJET : $retour .= $this->desinscriptionProjet() ;
274
            break ;
290
            break ;
275
            case PROJET_ACTION_CREER_WIKI : $retour .= $this->formulaireWiki() ;
291
            case PROJET_ACTION_CREER_WIKI : $retour .= $this->formulaireWiki() ;
276
            break ;
292
            break ;
277
            case PROJET_ACTION_CREER_WIKI_V : $retour .= $this->creationWiki().$this->accueilProjet() ;
293
            case PROJET_ACTION_CREER_WIKI_V : $retour .= $this->creationWiki() ;
-
 
294
                $this->_action = PROJET_ACTION_VOIR_RESUME ;
278
            break ;
295
            break ;
279
            case PROJET_ACTION_SUPPRIMER_WIKI : $retour .= $this->supprimerWiki().$this->accueilProjet() ;
296
            case PROJET_ACTION_SUPPRIMER_WIKI : $retour .= $this->supprimerWiki();
-
 
297
                $this->_action = PROJET_ACTION_VOIR_RESUME ;
280
            break ;
298
            break ;
281
            case PROJET_ACTION_INSCRIPTION_LISTE : $retour .= $this->inscriptionListe() ;
299
            case PROJET_ACTION_INSCRIPTION_LISTE : $retour .= $this->inscriptionListe() ;
282
                $this->_action = PROJET_ACTION_VOIR_RESUME ;
300
                $this->_action = PROJET_ACTION_VOIR_RESUME ;
283
            break ;
301
            break ;
284
            case PROJET_ACTION_DESINSCRIPTION_LISTE : $retour .= $this->desinscriptionListe() ;
302
            case PROJET_ACTION_DESINSCRIPTION_LISTE : $retour .= $this->desinscriptionListe() ;
285
                $this->_action = PROJET_ACTION_VOIR_RESUME ;
303
                $this->_action = PROJET_ACTION_VOIR_RESUME ;
286
            break ;
304
            break ;
287
            case PROJET_ACTION_REFERENCER_LISTE : $retour .= $this->referencerListeExterne() ;
305
            case PROJET_ACTION_REFERENCER_LISTE : $retour .= $this->referencerListeExterne() ;
288
            break ;
306
            break ;
289
            case PROJET_ACTION_REFERENCER_LISTE_V : $retour .= $this->referencerListeExterneValidation().$this->accueilProjet() ;
307
            case PROJET_ACTION_REFERENCER_LISTE_V : $retour .= $this->referencerListeExterneValidation() ;
-
 
308
                $this->_action = PROJET_ACTION_VOIR_RESUME ;
290
            break ;
309
            break ;
Line 291... Line 310...
291
            
310
            
292
        }
311
        }
293
        if (!is_int($this->_action)) {
312
        if (!is_int($this->_action)) {
Line 320... Line 339...
320
    function projetControleur(&$dbObjet, &$authObjet, $urlObjet = "")
339
    function projetControleur(&$dbObjet, &$authObjet, $urlObjet = "")
321
    {
340
    {
322
        $this->_db = $dbObjet ;
341
        $this->_db = $dbObjet ;
323
        $this->_auth = $authObjet ;
342
        $this->_auth = $authObjet ;
324
        $this->_id_repertoire = 0 ;
343
        $this->_id_repertoire = 0 ;
-
 
344
        $this->_type = '' ;
325
        if (is_object ($urlObjet)) {
345
        if (is_object ($urlObjet)) {
326
            $this->_url = $urlObjet ;
346
            $this->_url = $urlObjet ;
327
        }
347
        }
328
    } // end of member function projetControleur
348
    } // end of member function projetControleur
Line 337... Line 357...
337
    function mesProjets( )
357
    function mesProjets( )
338
    {
358
    {
339
        include_once PROJET_CHEMIN_CLASSES.'statut_liste.class.php' ;
359
        include_once PROJET_CHEMIN_CLASSES.'statut_liste.class.php' ;
340
        include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
360
        include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
341
        $participant = new participe ($this->_db) ;
361
        $participant = new participe ($this->_db) ;
342
        // Un tableau de tous les projets dans $projetListe
-
 
343
        $projetListe = projet::getTousLesProjets($this->_db) ;
-
 
Line -... Line 362...
-
 
362
        
-
 
363
        if (PROJET_UTILISE_TYPE && $this->_type != '') {
-
 
364
            $projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
-
 
365
            array_push ($projetListe, projet::getProjetRacine($this->_db)) ;
-
 
366
        } else {
-
 
367
            // Un tableau de tous les projets dans $projetListe
-
 
368
            $projetListe = projet::getTousLesProjets($this->_db) ;
-
 
369
        }
-
 
370
        // Si certain projet sont à exclure, on les exclu
-
 
371
        if (count($this->_projet_exclu)) {
-
 
372
            foreach ($this->_projet_exclu as $valeur) {
-
 
373
                for ($i = 0; $i < count ($projetListe); $i++) {
-
 
374
                    if ($projetListe[$i]->getId() == $valeur) unset ($projetListe[$i]) ;
-
 
375
                }
-
 
376
            }
344
        
377
        }
Line 345... Line 378...
345
        $tableau_label_statut_action = array (PROJET_GERER, PROJET_GERER, PROJET_GERER_FICHIER, PROJET_VOIR_FICHIER, "---") ;
378
        $tableau_label_statut_action = array (PROJET_GERER, PROJET_GERER, PROJET_GERER_FICHIER, PROJET_VOIR_FICHIER, "---") ;
346
        
379
        
347
        $auth = $this->_auth->getAuth() ;                       // Pour raccourcir le code
380
        $auth = $this->_auth->getAuth() ;                       // Pour raccourcir le code
Line 355... Line 388...
355
            // initialisation de variables
388
            // initialisation de variables
356
            $intensite_feuille = '' ; $longueur_branche = '' ;
389
            $intensite_feuille = '' ; $longueur_branche = '' ;
357
            $arbre = new arbre() ;
390
            $arbre = new arbre() ;
358
            // recherche du projet principal
391
            // recherche du projet principal
Line 359... Line -...
359
            
-
 
360
            $cime='';
-
 
361
            
392
            
362
            foreach ($projetListe as $projet) {
393
            foreach ($projetListe as $projet) {
363
                $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
394
                $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
364
                $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ;
395
                $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_VOIR_PARTICIPANT) ;
365
                $lien_feuille = $this->_url->getURL() ;
396
                $lien_feuille = $this->_url->getURL() ;
Line 366... Line 397...
366
                $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
397
                $this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
367
                
398
                
368
                if ($projet->isRacine()) {
399
                if ($projet->isRacine()) {
Line 369... Line 400...
369
                    $cime = $arbre->cime($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), $lien_feuille, '') ;
400
                    $cime = $arbre->cime($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), $lien_feuille, '') ;
-
 
401
                } else {
370
                } else {
402
                    
371
                    
403
                    $arbre->addBranche($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), 
372
                    $arbre->addBranche($projet->getTitre(), $this->_url->getURL(), $projet->getNombreInscrits(), $lien_feuille, $lien_feuille, $intensite_feuille, $longueur_branche) ;
404
                                        $lien_feuille, $lien_feuille, $intensite_feuille, $longueur_branche) ;
373
                }
405
                }
374
            }
406
            }
Line 411... Line 443...
411
                foreach ($projetListe as $projet) {
443
                foreach ($projetListe as $projet) {
412
                    if (participe::getStatutSurProjetCourant($id_u, $projet->getId(), $this->_db) == 4) continue ;
444
                    if (participe::getStatutSurProjetCourant($id_u, $projet->getId(), $this->_db) == 4) continue ;
413
                    if ($auth) {
445
                    if ($auth) {
414
                        if ($projet->avoirListe()) {
446
                        if ($projet->avoirListe()) {
415
                            $projet->getListesAssociees() ;
447
                            $projet->getListesAssociees() ;
416
                            $statut = $utilisateur_liste->getStatutInscrit($projet->_listes_associes[0]->getId(), $id_u) ;
448
                            $statut = $utilisateur_liste->getStatutInscrit($projet->_listes_associes[0]->getId(), $this->_auth) ;
417
                            if ($statut == '') $statut = 0 ;
449
                            //if ($statut == '') $statut = 0 ;
418
                        }
450
                        }
419
                    }
451
                    }
Line 420... Line 452...
420
                    
452
                    
421
                    $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
453
                    $this->_url->addQueryString (PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
422
                    $ligne_tableau = array ($projet->getId(), $statut, '<a href="'.$this->_url->getURL().'">'.$projet->getTitre().'</a>') ; 
454
                    $ligne_tableau = array ($projet->getId(), '<a href="'.PROJET_CHEMIN_ATELIERS.$projet->getId().'">'.$projet->getTitre().'</a>') ; 
423
                    if ($auth) {
455
                    if ($auth) {
424
                        $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_DESINSCRIPTION_PROJET) ;
456
                        $this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_DESINSCRIPTION_PROJET) ;
425
                        array_push ($ligne_tableau, '<a href="'.$this->_url->getURL().'" onclick="javascript:return confirm(\''.
457
                        array_push ($ligne_tableau, '<a href="'.$this->_url->getURL().'" onclick="javascript:return confirm(\''.
426
                                                PROJET_SE_DESINSCRIRE_CONFIRMATION.'\');">'.PROJET_SE_DESINSCRIRE.'</a>') ;
458
                                                PROJET_SE_DESINSCRIRE_CONFIRMATION.'\');">'.PROJET_SE_DESINSCRIRE.'</a>') ;
427
                        if ($projet->avoirListe()) {
459
                        if ($projet->avoirListe()) {
428
                            array_push ($ligne_tableau, $statut) ;
460
                            array_push ($ligne_tableau, $statut) ;
429
                        } else {
461
                        } else {
430
                            array_push($ligne_tableau, PROJET_PAS_DE_LISTE) ;
462
                            array_push($ligne_tableau, '') ;
431
                        }
463
                        }
432
                        array_push ($tableau_resultat, $ligne_tableau) ;
464
                        array_push ($tableau_resultat, $ligne_tableau) ;
433
                        $this->_url->removeQueryString (PROJET_VARIABLE_ACTION) ;
465
                        $this->_url->removeQueryString (PROJET_VARIABLE_ACTION) ;
434
                    }
466
                    }
Line 463... Line 495...
463
            // La liste
495
            // La liste
Line 464... Line 496...
464
            
496
            
465
            foreach ($projetNonParticipantListe as $projet) {
497
            foreach ($projetNonParticipantListe as $projet) {
466
                $this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
498
                $this->_url->addQueryString(PROJET_VARIABLE_ID_PROJET, $projet->getId()) ;
467
                $ligne_projet = array (
499
                $ligne_projet = array (
468
                                    '<a href="'.$this->_url->getURL().'">'.$projet->getTitre().'</a>'      // le nom du projet
500
                                    '<a href="'.PROJET_CHEMIN_ATELIERS.$projet->getId().'">'.$projet->getTitre().'</a>'      // le nom du projet
469
                                        ) ;
501
                                        ) ;
470
                $this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE) ;
502
                $this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE) ;
Line 471... Line 503...
471
                if ($auth) array_push ($ligne_projet, '<a href="'.$this->_url->getURL().'">'.PROJET_S_INSCRIRE.'</a>') ;
503
                if ($auth) array_push ($ligne_projet, '<a href="'.$this->_url->getURL().'">'.PROJET_S_INSCRIRE.'</a>') ;
Line 632... Line 664...
632
                    
664
                    
633
                    include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php';
665
                    include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php';
Line 634... Line 666...
634
                    foreach ($projet->_listes_associes as $info_liste) {
666
                    foreach ($projet->_listes_associes as $info_liste) {
635
                        
667
                        
636
                        $inscription_liste = new inscription_liste($this->_db) ;
668
                        $inscription_liste = new inscription_liste($this->_db) ;
637
                        if ($inscription_liste->getStatutInscrit($info_liste->getId(),  $this->_auth->getAuthData(PROJET_CHAMPS_ID)) == 0) {
669
                        if ($inscription_liste->getStatutInscrit($info_liste->getId(),  $this->_auth) == 0) {
638
                            $action_inscription = PROJET_ACTION_INSCRIPTION_LISTE ;
670
                            $action_inscription = PROJET_ACTION_INSCRIPTION_LISTE ;
639
                            $label_inscription = PROJET_RECEVOIR_MESSAGES ;
671
                            $label_inscription = PROJET_RECEVOIR_MESSAGES ;
640
                        } else {
672
                        } else {
Line 670... Line 702...
670
     */
702
     */
671
    function formulaireProjet($action)
703
    function formulaireProjet($action)
672
    {
704
    {
673
        $this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action) ;
705
        $this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action) ;
674
        $formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post',str_replace ("&amp;", "&", $this->_url->getURL())) ;
706
        $formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post',str_replace ("&amp;", "&", $this->_url->getURL())) ;
-
 
707
        $tableau_type = '' ;
-
 
708
        if (PROJET_UTILISE_TYPE) {
-
 
709
            include_once PROJET_CHEMIN_CLASSES.'projet_type.class.php' ;
-
 
710
            $tableau_type = projet_type::getTousLesTypes($this->_db) ;
-
 
711
        }
675
        $formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db)) ;
712
        $formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db), $tableau_type) ;
676
        if ($action == PROJET_MODIFIER_DESCRIPTION_V) {
713
        if ($action == PROJET_MODIFIER_DESCRIPTION_V) {
677
            $projet = new projet($this->_db, $this->_id_projet) ;
714
            $projet = new projet($this->_db, $this->_id_projet) ;
678
            $valeurs_par_defaut = array (   'projet_titre' => $projet->getTitre(),
715
            $valeurs_par_defaut = array (   'projet_titre' => $projet->getTitre(),
679
                                            'projet_description' => $projet->getDescription(),
716
                                            'projet_description' => $projet->getDescription(),
680
                                            'projet_asso' => $projet->getIdPere(),
717
                                            'projet_asso' => $projet->getIdPere(),
681
                                            'projet_wikini' => $projet->getWikini(),
718
                                            'projet_wikini' => $projet->getWikini(),
682
                                            'projet_resume' => $projet->getResume(),
719
                                            'projet_resume' => $projet->getResume(),
683
                                            'projet_espace_internet' => $projet->getEspaceInternet() 
720
                                            'projet_espace_internet' => $projet->getEspaceInternet(),
-
 
721
                                            'projet_type'=> $projet->getType()
684
                                        ) ;
722
                                        ) ;
685
            $formulaire_projet->setDefaults($valeurs_par_defaut) ;
723
            $formulaire_projet->setDefaults($valeurs_par_defaut) ;
686
        }
724
        }
687
        return $formulaire_projet->toHTML() ;
725
        return $formulaire_projet->toHTML() ;
688
    } // end of member function nouveauProjet
726
    } // end of member function nouveauProjet
Line 697... Line 735...
697
    {
735
    {
698
        $this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_V) ;
736
        $this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_V) ;
699
        $formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post', str_replace ('&amp;', '&', $this->_url->getURL())) ;
737
        $formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post', str_replace ('&amp;', '&', $this->_url->getURL())) ;
700
        $formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db)) ;
738
        $formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db)) ;
701
        if ($formulaire_projet->validate()) {
739
        if ($formulaire_projet->validate()) {
-
 
740
            
702
            $projet = new projet ($this->_db) ;
741
            $projet = new projet ($this->_db) ;
703
            $projet->setCheminRepertoire (PROJET_CHEMIN_FICHIER) ;
742
            $projet->setCheminRepertoire (PROJET_CHEMIN_FICHIER) ;
704
            if (!$projet->enregistrerSQL($formulaire_projet->getSubmitValues())) {
743
            if (!$projet->enregistrerSQL($formulaire_projet->getSubmitValues())) {
705
                return 'erreur' ;
744
                return 'erreur' ;
706
            }
745
            }
Line 1058... Line 1097...
1058
                print '<span class="heading">Liste <strong>' . $info_liste->getAdresseEnvoi() ;
1097
                print '<span class="heading">Liste <strong>' . $info_liste->getAdresseEnvoi() ;
1059
                print "</strong></span><br />\n";
1098
                print "</strong></span><br />\n";
1060
                if ($this->_auth->getAuth()) {
1099
                if ($this->_auth->getAuth()) {
1061
                    include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php';
1100
                    include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php';
1062
                    $inscription_liste = new inscription_liste($this->_db) ;
1101
                    $inscription_liste = new inscription_liste($this->_db) ;
1063
                    if ($inscription_liste->getStatutInscrit( $info_liste->getId(),  $this->_auth->getAuthData(PROJET_CHAMPS_ID)) == '') {
1102
                    if ($inscription_liste->getStatutInscrit( $info_liste->getId(),  $this->_auth) == '') {
1064
                        $action_inscription = PROJET_ACTION_INSCRIPTION_LISTE ;
1103
                        $action_inscription = PROJET_ACTION_INSCRIPTION_LISTE ;
1065
                        $label_inscription = PROJET_S_INSCRIRE ;
1104
                        $label_inscription = PROJET_S_INSCRIRE ;
1066
                    } else {
1105
                    } else {
1067
                        $action_inscription = PROJET_ACTION_DESINSCRIPTION_LISTE ;
1106
                        $action_inscription = PROJET_ACTION_DESINSCRIPTION_LISTE ;
1068
                        $label_inscription = PROJET_SE_DESINSCRIRE ;
1107
                        $label_inscription = PROJET_SE_DESINSCRIRE ;
Line 1351... Line 1390...
1351
    function setPresentation( $presentation )
1390
    function setPresentation( $presentation )
1352
    {
1391
    {
1353
        $this->_presentation = $presentation ;
1392
        $this->_presentation = $presentation ;
1354
    } // end of member function setPresentation
1393
    } // end of member function setPresentation
Line -... Line 1394...
-
 
1394
 
-
 
1395
    /**
-
 
1396
     * 
-
 
1397
     *
-
 
1398
     * @param string type Pour affecter un type au projet
-
 
1399
     * @return void
-
 
1400
     * @access public
-
 
1401
     */
-
 
1402
    function setType( $type)
-
 
1403
    {
-
 
1404
        $this->_type = $type ;
-
 
1405
    } // end of member function setPresentation
Line 1355... Line 1406...
1355
 
1406
 
1356
 
1407
 
1357
    /**
1408
    /**
1358
     * Fonction affichant les particpants à un projet
1409
     * Fonction affichant les particpants à un projet
Line 1654... Line 1705...
1654
        $HTML_formulaireListeExterne->construitFormulaire($liste_externe->getListeNom()) ;
1705
        $HTML_formulaireListeExterne->construitFormulaire($liste_externe->getListeNom()) ;
Line 1655... Line 1706...
1655
        
1706
        
1656
        $liste_externe->enregistrerSQL($HTML_formulaireListeExterne->getSubmitValues(), $this->_id_projet) ;
1707
        $liste_externe->enregistrerSQL($HTML_formulaireListeExterne->getSubmitValues(), $this->_id_projet) ;
Line -... Line 1708...
-
 
1708
    } // end of member function referencerListeExterneValidation
-
 
1709
 
-
 
1710
    /**
-
 
1711
     * permet d'exclure un projet de l'affichage
-
 
1712
     *
-
 
1713
     * @return void
-
 
1714
     * @access public
-
 
1715
     */
-
 
1716
    function exclure($id_projet)
-
 
1717
    {
-
 
1718
       array_push ($this->_projet_exclu, $id_projet) ;
Line 1657... Line 1719...
1657
    } // end of member function referencerListeExterneValidation
1719
    } // end of member function exclure
1658
 
1720
 
1659
 
1721