| Line 18... |
Line 18... |
| 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 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 22... |
Line 22... |
| 22 |
|
22 |
|
| Line 23... |
Line 23... |
| 23 |
// CVS : $Id: projetControleur.class.php,v 1.29.2.2 2007-02-13 10:38:14 alexandre_tb Exp $
|
23 |
// CVS : $Id: projetControleur.class.php,v 1.29.2.3 2007-04-11 12:28:44 alexandre_tb Exp $
|
| 24 |
|
24 |
|
| 25 |
/**
|
25 |
/**
|
| 26 |
* Application projet
|
26 |
* Application projet
|
| Line 31... |
Line 31... |
| 31 |
//Auteur original :
|
31 |
//Auteur original :
|
| 32 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
32 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
| 33 |
//Autres auteurs :
|
33 |
//Autres auteurs :
|
| 34 |
*@author Aucun
|
34 |
*@author Aucun
|
| 35 |
*@copyright Tela-Botanica 2000-2004
|
35 |
*@copyright Tela-Botanica 2000-2004
|
| 36 |
*@version $Revision: 1.29.2.2 $
|
36 |
*@version $Revision: 1.29.2.3 $
|
| 37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
| 38 |
*/
|
38 |
*/
|
| Line 39... |
Line 39... |
| 39 |
|
39 |
|
| 40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 46... |
Line 46... |
| 46 |
include_once 'client/projet/langues/pro_langue_'.$GLOBALS['lang'].'.inc.php' ;
|
46 |
include_once 'client/projet/langues/pro_langue_'.$GLOBALS['lang'].'.inc.php' ;
|
| 47 |
} else {
|
47 |
} else {
|
| 48 |
include_once 'client/projet/langues/pro_langue_'.PROJET_LANGUE_DEFAUT.'.inc.php' ;
|
48 |
include_once 'client/projet/langues/pro_langue_'.PROJET_LANGUE_DEFAUT.'.inc.php' ;
|
| 49 |
}
|
49 |
}
|
| Line 50... |
Line -... |
| 50 |
|
- |
|
| 51 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
- |
|
| 52 |
include_once PROJET_CHEMIN_CLASSES.'HTML_listeProjet.class.php' ;
|
- |
|
| 53 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
- |
|
| 54 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireProjet.class.php' ;
|
- |
|
| 55 |
include_once PROJET_CHEMIN_CLASSES.'statut.class.php' ;
|
- |
|
| 56 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireDocument.class.php' ;
|
- |
|
| 57 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireMail.class.php' ;
|
- |
|
| 58 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireListe.class.php' ;
|
- |
|
| 59 |
include_once PROJET_CHEMIN_CLASSES.'commande_serveur.class.php' ;
|
- |
|
| Line 60... |
Line 50... |
| 60 |
include_once PROJET_CHEMIN_CLASSES_LISTES.'ezmlm.php' ;
|
50 |
|
| 61 |
|
51 |
|
| 62 |
require_once GEN_CHEMIN_API.'html/HTML_TableFragmenteur.php' ;
|
52 |
require_once GEN_CHEMIN_API.'html/HTML_TableFragmenteur.php' ;
|
| 63 |
// +------------------------------------------------------------------------------------------------------+
|
53 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 368... |
Line 358... |
| 368 |
* @access public
|
358 |
* @access public
|
| 369 |
*/
|
359 |
*/
|
| 370 |
function mesProjets( )
|
360 |
function mesProjets( )
|
| 371 |
{
|
361 |
{
|
| 372 |
$res = '' ;
|
362 |
$res = '' ;
|
| 373 |
include_once PROJET_CHEMIN_CLASSES.'statut_liste.class.php' ;
|
363 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
| 374 |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
|
364 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 375 |
$participant = new participe ($this->_db) ;
|
365 |
$participant = new participe ($this->_db) ;
|
| Line 376... |
Line -... |
| 376 |
|
- |
|
| 377 |
if (PROJET_UTILISE_TYPE && $this->_type != '') {
|
- |
|
| 378 |
$projetListe = projet::getProjetDuType($this->_type, $this->_db) ;
|
- |
|
| 379 |
if ($this->_presentation == 'arbre')array_push ($projetListe, projet::getProjetRacine($this->_db)) ;
|
- |
|
| 380 |
} else {
|
- |
|
| 381 |
// Un tableau de tous les projets dans $projetListe
|
- |
|
| 382 |
$projetListe = projet::getTousLesProjets($this->_db) ;
|
- |
|
| 383 |
}
|
- |
|
| 384 |
// Si la liste est vide, on renvoie un texte
|
- |
|
| 385 |
if (count($projetListe) == 0) {
|
- |
|
| 386 |
// On inclue un fichier local
|
- |
|
| 387 |
if (file_exists(PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php'))
|
- |
|
| 388 |
include_once PROJET_CHEMIN_APPLI.'langues/pro_langue_'.$GLOBALS['lang'].'.local.inc.php' ;
|
- |
|
| 389 |
return $res .= PROJET_PAS_DE_PROJET;
|
- |
|
| 390 |
}
|
- |
|
| 391 |
// Si certain projet sont à exclure, on les exclu
|
- |
|
| 392 |
$projet_a_exclure = array() ;
|
- |
|
| 393 |
if (count($this->_projet_exclu)) {
|
- |
|
| 394 |
arsort($this->_projet_exclu) ;
|
- |
|
| 395 |
foreach ($this->_projet_exclu as $valeur) {
|
- |
|
| 396 |
for ($i = 0; $i < count($projetListe); $i++) {
|
- |
|
| 397 |
if ($projetListe[$i]->getId() == $valeur) array_push ($projet_a_exclure, $i);}
|
- |
|
| 398 |
}
|
- |
|
| 399 |
}
|
- |
|
| 400 |
foreach ($projet_a_exclure as $valeur) unset ($projetListe[$valeur]) ;
|
- |
|
| 401 |
|
366 |
|
| 402 |
// Les entêtes des tableaux
|
367 |
// Les entêtes des tableaux
|
| Line 403... |
Line 368... |
| 403 |
$tableau_label_statut_action = array (PROJET_GERER, PROJET_GERER, PROJET_GERER_FICHIER, PROJET_VOIR_FICHIER, "---") ;
|
368 |
$tableau_label_statut_action = array (PROJET_GERER, PROJET_GERER, PROJET_GERER_FICHIER, PROJET_VOIR_FICHIER, "---") ;
|
| 404 |
|
369 |
|
| Line 405... |
Line 370... |
| 405 |
$auth = $this->_auth->getAuth() ; // Pour raccourcir le code
|
370 |
$auth = $this->_auth->getAuth() ; // Pour raccourcir le code
|
| Line 406... |
Line 371... |
| 406 |
$id_u = $this->_auth->getAuthData(PROJET_CHAMPS_ID) ; // --------------
|
371 |
$id_u = $this->_auth->getAuthData(PROJET_CHAMPS_ID) ; // --------------
|
| Line 407... |
Line 372... |
| 407 |
|
372 |
|
| 408 |
return include_once PROJET_CHEMIN_APPLI.'presentation/'.$this->_presentation.'.php' ;
|
373 |
return include_once PROJET_CHEMIN_APPLI.'presentation/'.$this->_presentation.'.php' ;
|
| 409 |
|
374 |
|
| 410 |
|
375 |
|
| Line 421... |
Line 386... |
| 421 |
{
|
386 |
{
|
| 422 |
$res = '' ;
|
387 |
$res = '' ;
|
| 423 |
$auth = $this->_auth->getAuth() ;
|
388 |
$auth = $this->_auth->getAuth() ;
|
| 424 |
if (!$auth) return ;
|
389 |
if (!$auth) return ;
|
| 425 |
$res .= '<div class="menu_projet">'."\n";
|
390 |
$res .= '<div class="menu_projet">'."\n";
|
| - |
|
391 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
| 426 |
$participant = new participe($this->_db) ;
|
392 |
$participant = new participe($this->_db) ;
|
| 427 |
if ($participant->isAdministrateur($this->_auth->getAuthData(PROJET_CHAMPS_ID))) {
|
393 |
if ($participant->isAdministrateur($this->_auth->getAuthData(PROJET_CHAMPS_ID))) {
|
| 428 |
$isAdm = 1; $isCoord = 1 ; $isContri = 1 ;
|
394 |
$isAdm = 1; $isCoord = 1 ; $isContri = 1 ;
|
| 429 |
$label_statut = PROJET_ADMINISTRATEUR;
|
395 |
$label_statut = PROJET_ADMINISTRATEUR;
|
| 430 |
} else {
|
396 |
} else {
|
| Line 464... |
Line 430... |
| 464 |
} else {
|
430 |
} else {
|
| 465 |
if ($this->_id_projet != '') $res .= '<h2>'.$label_statut.'</h2>'."\n" ;
|
431 |
if ($this->_id_projet != '') $res .= '<h2>'.$label_statut.'</h2>'."\n" ;
|
| 466 |
}
|
432 |
}
|
| Line 467... |
Line 433... |
| 467 |
|
433 |
|
| - |
|
434 |
if ($this->_id_projet != '') {
|
| 468 |
if ($this->_id_projet != '') {
|
435 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 469 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
436 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 470 |
// Participant
|
437 |
// Participant
|
| 471 |
if (!$isEnAttente) {
|
438 |
if (!$isEnAttente) {
|
| 472 |
$res .= '<ul id ="projet_groupe_niv1"><li class="projet_niv1">'.PROJET_CONTRIBUTEUR ;
|
439 |
$res .= '<ul id ="projet_groupe_niv1"><li class="projet_niv1">'.PROJET_CONTRIBUTEUR ;
|
| Line 608... |
Line 575... |
| 608 |
return PROJET_TEXTE_NON_IDENTIFIE;
|
575 |
return PROJET_TEXTE_NON_IDENTIFIE;
|
| 609 |
}
|
576 |
}
|
| Line 610... |
Line 577... |
| 610 |
|
577 |
|
| 611 |
if (fileperms(PROJET_CHEMIN_FICHIER) & 0x0002) {
|
578 |
if (fileperms(PROJET_CHEMIN_FICHIER) & 0x0002) {
|
| - |
|
579 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action) ;
|
| 612 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action) ;
|
580 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireProjet.class.php' ;
|
| 613 |
$formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post',str_replace ("&", "&", $this->_url->getURL())) ;
|
581 |
$formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post',str_replace ("&", "&", $this->_url->getURL())) ;
|
| 614 |
$tableau_type = '' ;
|
582 |
$tableau_type = '' ;
|
| 615 |
if (PROJET_UTILISE_TYPE) {
|
583 |
if (PROJET_UTILISE_TYPE) {
|
| 616 |
include_once PROJET_CHEMIN_CLASSES.'projet_type.class.php' ;
|
584 |
include_once PROJET_CHEMIN_CLASSES.'projet_type.class.php' ;
|
| 617 |
$tableau_type = projet_type::getTousLesTypes($this->_db) ;
|
585 |
$tableau_type = projet_type::getTousLesTypes($this->_db) ;
|
| - |
|
586 |
}
|
| 618 |
}
|
587 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 619 |
$formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db), $tableau_type) ;
|
588 |
$formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db), $tableau_type) ;
|
| - |
|
589 |
if ($action == PROJET_MODIFIER_DESCRIPTION_V) {
|
| 620 |
if ($action == PROJET_MODIFIER_DESCRIPTION_V) {
|
590 |
|
| 621 |
$projet = new projet($this->_db, $this->_id_projet) ;
|
591 |
$projet = new projet($this->_db, $this->_id_projet) ;
|
| 622 |
$valeurs_par_defaut = array ( 'projet_titre' => $projet->getTitre(),
|
592 |
$valeurs_par_defaut = array ( 'projet_titre' => $projet->getTitre(),
|
| 623 |
'projet_description' => $projet->getDescription(),
|
593 |
'projet_description' => $projet->getDescription(),
|
| 624 |
'projet_asso' => $projet->getIdPere(),
|
594 |
'projet_asso' => $projet->getIdPere(),
|
| Line 646... |
Line 616... |
| 646 |
* @access public
|
616 |
* @access public
|
| 647 |
*/
|
617 |
*/
|
| 648 |
function nouveauProjetValidation( )
|
618 |
function nouveauProjetValidation( )
|
| 649 |
{
|
619 |
{
|
| 650 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_V) ;
|
620 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_V) ;
|
| - |
|
621 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireProjet.class.php' ;
|
| 651 |
$formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post', str_replace ('&', '&', $this->_url->getURL())) ;
|
622 |
$formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post', str_replace ('&', '&', $this->_url->getURL())) ;
|
| 652 |
$formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db)) ;
|
623 |
$formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db)) ;
|
| 653 |
if ($formulaire_projet->validate()) {
|
624 |
if ($formulaire_projet->validate()) {
|
| 654 |
|
- |
|
| - |
|
625 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 655 |
$projet = new projet ($this->_db) ;
|
626 |
$projet = new projet ($this->_db) ;
|
| 656 |
$projet->setCheminRepertoire (PROJET_CHEMIN_FICHIER) ;
|
627 |
$projet->setCheminRepertoire (PROJET_CHEMIN_FICHIER) ;
|
| 657 |
if (!$projet->enregistrerSQL($formulaire_projet->getSubmitValues())) {
|
628 |
if (!$projet->enregistrerSQL($formulaire_projet->getSubmitValues())) {
|
| 658 |
return 'erreur' ;
|
629 |
return 'erreur' ;
|
| 659 |
}
|
630 |
}
|
| 660 |
// On inscrit le déposant du projet en tant que coordinateur
|
631 |
// On inscrit le déposant du projet en tant que coordinateur
|
| 661 |
if (PROJET_UTILISATEURS_COORD) {
|
632 |
if (PROJET_UTILISATEURS_COORD) {
|
| 662 |
// Si le projet n'a pas de liste, on inscrit directement
|
633 |
// Si le projet n'a pas de liste, on inscrit directement
|
| - |
|
634 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
| 663 |
$participant = new participe($this->_db) ;
|
635 |
$participant = new participe($this->_db) ;
|
| 664 |
$participant->setStatut(1, $this->_auth->getAuthData (PROJET_CHAMPS_ID), $projet->getId()) ;
|
636 |
$participant->setStatut(1, $this->_auth->getAuthData (PROJET_CHAMPS_ID), $projet->getId()) ;
|
| 665 |
}
|
637 |
}
|
| 666 |
} else {
|
638 |
} else {
|
| 667 |
return $formulaire_projet->toHTML() ;
|
639 |
return $formulaire_projet->toHTML() ;
|
| Line 675... |
Line 647... |
| 675 |
* @access public
|
647 |
* @access public
|
| 676 |
*/
|
648 |
*/
|
| 677 |
function modifierProjet( )
|
649 |
function modifierProjet( )
|
| 678 |
{
|
650 |
{
|
| 679 |
// création de l'objet projet courant
|
651 |
// création de l'objet projet courant
|
| - |
|
652 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 680 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
653 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 681 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_MODIFIER_V) ;
|
654 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_MODIFIER_V) ;
|
| - |
|
655 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireProjet.class.php' ;
|
| 682 |
$formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post', str_replace ('&', '&', $this->_url->getURL())) ;
|
656 |
$formulaire_projet = new HTML_formulaireProjet('formulaire_projet', 'post', str_replace ('&', '&', $this->_url->getURL())) ;
|
| 683 |
$formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db)) ;
|
657 |
$formulaire_projet->construitFormulaire(projet::getTousLesProjets($this->_db)) ;
|
| 684 |
if ($formulaire_projet->validate()) {
|
658 |
if ($formulaire_projet->validate()) {
|
| 685 |
$projet->majSQL($formulaire_projet->getSubmitValues()) ;
|
659 |
$projet->majSQL($formulaire_projet->getSubmitValues()) ;
|
| 686 |
} else {
|
660 |
} else {
|
| 687 |
return $formulaire_projet->toHTML() ;
|
661 |
return $formulaire_projet->toHTML() ;
|
| 688 |
}
|
662 |
}
|
| 689 |
unset ($projet) ;
|
663 |
unset ($projet) ;
|
| 690 |
} // end of member function nouveauFichierValidation
|
664 |
}
|
| Line 691... |
Line 665... |
| 691 |
|
665 |
|
| 692 |
/**
|
666 |
/**
|
| 693 |
* Renvoie le formulaire d'upload d'un fichier.
|
667 |
* Renvoie le formulaire d'upload d'un fichier.
|
| 694 |
*
|
668 |
*
|
| Line 702... |
Line 676... |
| 702 |
unset ($_SESSION['formulaire_document']) ;
|
676 |
unset ($_SESSION['formulaire_document']) ;
|
| 703 |
}
|
677 |
}
|
| 704 |
$action_future = $action == PROJET_NOUVEAU_FICHIER ? PROJET_NOUVEAU_FICHIER_V : PROJET_ACTION_MODIFIER_V ;
|
678 |
$action_future = $action == PROJET_NOUVEAU_FICHIER ? PROJET_NOUVEAU_FICHIER_V : PROJET_ACTION_MODIFIER_V ;
|
| 705 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, $action_future) ;
|
679 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, $action_future) ;
|
| 706 |
if ($this->_id_repertoire != '') $this->_url->addQueryString (PROJET_VARIABLE_ID_REPERTOIRE, $this->_id_repertoire) ;
|
680 |
if ($this->_id_repertoire != '') $this->_url->addQueryString (PROJET_VARIABLE_ID_REPERTOIRE, $this->_id_repertoire) ;
|
| - |
|
681 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireDocument.class.php' ;
|
| 707 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
682 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 708 |
$formulaire_document->construitFormulaire($action) ;
|
683 |
$formulaire_document->construitFormulaire($action) ;
|
| 709 |
if ($action == PROJET_ACTION_MODIFIER) {
|
684 |
if ($action == PROJET_ACTION_MODIFIER) {
|
| Line 710... |
Line 685... |
| 710 |
|
685 |
|
| Line 759... |
Line 734... |
| 759 |
function suppressionFichier( )
|
734 |
function suppressionFichier( )
|
| 760 |
{
|
735 |
{
|
| 761 |
if ($this->_id_document == "") {
|
736 |
if ($this->_id_document == "") {
|
| 762 |
return $this->messageErreur(PROJETCONTROLEUR_PAS_DE_DOCUMENT_SELECTIONNE) ;
|
737 |
return $this->messageErreur(PROJETCONTROLEUR_PAS_DE_DOCUMENT_SELECTIONNE) ;
|
| 763 |
}
|
738 |
}
|
| - |
|
739 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 764 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
740 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 765 |
$document = new document($this->_id_document, $this->_db, PROJET_CHEMIN_FICHIER) ;
|
741 |
$document = new document($this->_id_document, $this->_db, PROJET_CHEMIN_FICHIER) ;
|
| 766 |
$document->suppression() ;
|
742 |
$document->suppression() ;
|
| 767 |
$document->suppressionSQL() ;
|
743 |
$document->suppressionSQL() ;
|
| - |
|
744 |
|
| - |
|
745 |
// On verifie s il reste des documents associes au projet et si non on met
|
| - |
|
746 |
// a jour projet.p_avoir_document
|
| - |
|
747 |
if (count ($projet->getListesDocuments(PROJET_CHEMIN_FICHIER)) == 0) $projet->setAvoirDocument(false);
|
| 768 |
return ;
|
748 |
return ;
|
| Line 769... |
Line 749... |
| 769 |
|
749 |
|
| Line 770... |
Line 750... |
| 770 |
} // end of member function nouveauFichier
|
750 |
} // end of member function nouveauFichier
|
| Line 777... |
Line 757... |
| 777 |
*/
|
757 |
*/
|
| 778 |
function nouveauRepertoire( )
|
758 |
function nouveauRepertoire( )
|
| 779 |
{
|
759 |
{
|
| 780 |
$res = '<h1>'.PROJET_REP_CREER.'</h1>'."\n" ;
|
760 |
$res = '<h1>'.PROJET_REP_CREER.'</h1>'."\n" ;
|
| 781 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_REPERTOIRE_V) ;
|
761 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_REPERTOIRE_V) ;
|
| - |
|
762 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireDocument.class.php' ;
|
| 782 |
$formulaire_repertoire = new HTML_formulaireDocument('formulaire_repertoire', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
763 |
$formulaire_repertoire = new HTML_formulaireDocument('formulaire_repertoire', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 783 |
$formulaire_repertoire->setType ('repertoire') ;
|
764 |
$formulaire_repertoire->setType ('repertoire') ;
|
| 784 |
$formulaire_repertoire->construitFormulaire() ;
|
765 |
$formulaire_repertoire->construitFormulaire() ;
|
| 785 |
$formulaire_repertoire->setDefaults (array ('document_visibilite'=> 'public')) ;
|
766 |
$formulaire_repertoire->setDefaults (array ('document_visibilite'=> 'public')) ;
|
| 786 |
return $res.$formulaire_repertoire->toHTML() ;
|
767 |
return $res.$formulaire_repertoire->toHTML() ;
|
| Line 787... |
Line 768... |
| 787 |
|
768 |
|
| Line 788... |
Line 769... |
| 788 |
} // end of member function nouveauFichier
|
769 |
}
|
| 789 |
|
770 |
|
| 790 |
/**
|
771 |
/**
|
| 791 |
* Valide le formulaire et appelle la fonction d'insertion.
|
772 |
* Valide le formulaire et appelle la fonction d'insertion.
|
| 792 |
*
|
773 |
*
|
| 793 |
* @return void
|
774 |
* @return void
|
| 794 |
* @access public
|
775 |
* @access public
|
| 795 |
*/
|
776 |
*/
|
| 796 |
function nouveauFichierValidation( )
|
777 |
function nouveauFichierValidation( )
|
| - |
|
778 |
{
|
| 797 |
{
|
779 |
// création de l'objet projet courant
|
| 798 |
// création de l'objet projet courant
|
780 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 799 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
781 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 800 |
if (isset($_SESSION['formulaire_document']) && $_SESSION['formulaire_document'] == 'valide') {
|
- |
|
| 801 |
include_once PROJET_CHEMIN_APPLI.'actions/documents.php' ;
|
782 |
if (isset($_SESSION['formulaire_document']) && $_SESSION['formulaire_document'] == 'valide') {
|
| 802 |
return $retour;
|
783 |
return include_once PROJET_CHEMIN_APPLI.'actions/documents.php' ;
|
| - |
|
784 |
}
|
| 803 |
}
|
785 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_FICHIER_V) ;
|
| 804 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_FICHIER_V) ;
|
786 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireDocument.class.php' ;
|
| 805 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
787 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 806 |
$formulaire_document->construitFormulaire() ;
|
788 |
$formulaire_document->construitFormulaire() ;
|
| 807 |
if ($formulaire_document->validate()) {
|
789 |
if ($formulaire_document->validate()) {
|
| Line 821... |
Line 803... |
| 821 |
trigger_error('echec d\'upload !', E_USER_ERROR) ;
|
803 |
trigger_error('echec d\'upload !', E_USER_ERROR) ;
|
| 822 |
}
|
804 |
}
|
| Line 823... |
Line 805... |
| 823 |
|
805 |
|
| - |
|
806 |
|
| - |
|
807 |
$document->enregistrerSQL($formulaire_document->getSubmitValues(), $projet->getNomRepertoire().'/'.$chemin_upload) ;
|
| - |
|
808 |
// On place a 1 la colonne p_avoir_document
|
| 824 |
|
809 |
if (!$projet->avoirDocument()) $projet->setAvoirDocument(true);
|
| 825 |
$document->enregistrerSQL($formulaire_document->getSubmitValues(), $projet->getNomRepertoire().'/'.$chemin_upload) ;
|
810 |
|
| 826 |
// On ajoute une information de session
|
811 |
// On ajoute une information de session
|
| 827 |
$_SESSION['formulaire_document'] = 'valide';
|
812 |
$_SESSION['formulaire_document'] = 'valide';
|
| 828 |
} else {
|
813 |
} else {
|
| Line 838... |
Line 823... |
| 838 |
* @access public
|
823 |
* @access public
|
| 839 |
*/
|
824 |
*/
|
| 840 |
function modifierFichier( )
|
825 |
function modifierFichier( )
|
| 841 |
{
|
826 |
{
|
| 842 |
// création de l'objet projet courant
|
827 |
// création de l'objet projet courant
|
| - |
|
828 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 843 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
829 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 844 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_MODIFIER_V) ;
|
830 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_MODIFIER_V) ;
|
| - |
|
831 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireDocument.class.php' ;
|
| 845 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
832 |
$formulaire_document = new HTML_formulaireDocument('formulaire_document', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 846 |
$formulaire_document->construitFormulaire(PROJET_ACTION_MODIFIER_V) ;
|
833 |
$formulaire_document->construitFormulaire(PROJET_ACTION_MODIFIER_V) ;
|
| 847 |
if ($formulaire_document->validate()) {
|
834 |
if ($formulaire_document->validate()) {
|
| 848 |
// Création d'un objet document vide
|
835 |
// Création d'un objet document vide
|
| 849 |
$document = new document ($this->_id_document, $this->_db) ;
|
836 |
$document = new document ($this->_id_document, $this->_db) ;
|
| Line 863... |
Line 850... |
| 863 |
* @access public
|
850 |
* @access public
|
| 864 |
*/
|
851 |
*/
|
| 865 |
function nouveauRepertoireValidation( )
|
852 |
function nouveauRepertoireValidation( )
|
| 866 |
{
|
853 |
{
|
| 867 |
// création de l'objet projet courant
|
854 |
// création de l'objet projet courant
|
| - |
|
855 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 868 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
856 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| Line 869... |
Line 857... |
| 869 |
|
857 |
|
| - |
|
858 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_FICHIER_V) ;
|
| 870 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_FICHIER_V) ;
|
859 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireDocument.class.php' ;
|
| 871 |
$formulaire_repertoire = new HTML_formulaireDocument('formulaire_repertoire', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
860 |
$formulaire_repertoire = new HTML_formulaireDocument('formulaire_repertoire', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 872 |
$formulaire_repertoire->setType ('repertoire') ;
|
861 |
$formulaire_repertoire->setType ('repertoire') ;
|
| 873 |
$formulaire_repertoire->construitFormulaire() ;
|
862 |
$formulaire_repertoire->construitFormulaire() ;
|
| 874 |
if ($formulaire_repertoire->validate()) {
|
863 |
if ($formulaire_repertoire->validate()) {
|
| Line 887... |
Line 876... |
| 887 |
if (!mkdir (PROJET_CHEMIN_FICHIER.$lien)) {
|
876 |
if (!mkdir (PROJET_CHEMIN_FICHIER.$lien)) {
|
| Line 888... |
Line 877... |
| 888 |
|
877 |
|
| 889 |
$document->suppressionSQL() ;
|
878 |
$document->suppressionSQL() ;
|
| 890 |
return $this->messageErreur(PROJETCONTROLEUR_ERREUR_CREATION_REPERTOIRE).'<br />'.PROJET_CHEMIN_FICHIER.$lien ;
|
879 |
return $this->messageErreur(PROJETCONTROLEUR_ERREUR_CREATION_REPERTOIRE).'<br />'.PROJET_CHEMIN_FICHIER.$lien ;
|
| - |
|
880 |
}
|
| - |
|
881 |
// On place a 1 la colonne p_avoir_document
|
| 891 |
}
|
882 |
if (!$projet->avoirDocument()) $projet->setAvoirDocument(true);
|
| 892 |
} else {
|
883 |
} else {
|
| 893 |
return $formulaire_repertoire->toHTML() ;
|
884 |
return $formulaire_repertoire->toHTML() ;
|
| 894 |
}
|
885 |
}
|
| Line 916... |
Line 907... |
| 916 |
*/
|
907 |
*/
|
| 917 |
function accueilProjet( )
|
908 |
function accueilProjet( )
|
| 918 |
{
|
909 |
{
|
| 919 |
$res = '' ;
|
910 |
$res = '' ;
|
| 920 |
// création de l'objet projet courant
|
911 |
// création de l'objet projet courant
|
| - |
|
912 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 921 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
913 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| Line 922... |
Line 914... |
| 922 |
|
914 |
|
| 923 |
// récupération de la liste des documents associés
|
915 |
// récupération de la liste des documents associés
|
| Line 938... |
Line 930... |
| 938 |
$vue_liste_document->setCheminNavigation ($tableau_navigation) ;
|
930 |
$vue_liste_document->setCheminNavigation ($tableau_navigation) ;
|
| 939 |
// vérification des droits de l'utilisateur
|
931 |
// vérification des droits de l'utilisateur
|
| 940 |
$entete_liste = array (PROJET_FICHIERS_NOM, PROJET_FICHIERS_TAILLE, PROJET_FICHIERS_CREE_LE) ;
|
932 |
$entete_liste = array (PROJET_FICHIERS_NOM, PROJET_FICHIERS_TAILLE, PROJET_FICHIERS_CREE_LE) ;
|
| Line 941... |
Line 933... |
| 941 |
|
933 |
|
| - |
|
934 |
if ($this->_auth->getAuth()) {
|
| 942 |
if ($this->_auth->getAuth()) {
|
935 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
| 943 |
$participant = new participe($this->_db) ;
|
936 |
$participant = new participe($this->_db) ;
|
| 944 |
$id_u = $this->_auth->getAuthData(PROJET_CHAMPS_ID) ;
|
937 |
$id_u = $this->_auth->getAuthData(PROJET_CHAMPS_ID) ;
|
| 945 |
$isCoord = $participant->isCoordinateur($id_u, $this->_id_projet, $this->_db) ;
|
938 |
$isCoord = $participant->isCoordinateur($id_u, $this->_id_projet, $this->_db) ;
|
| 946 |
if ($isCoord) $droits = PROJET_DROIT_COORDINATEUR ;
|
939 |
if ($isCoord) $droits = PROJET_DROIT_COORDINATEUR ;
|
| Line 991... |
Line 984... |
| 991 |
|
984 |
|
| 992 |
$projet->getListesAssociees();
|
985 |
$projet->getListesAssociees();
|
| Line 993... |
Line 986... |
| 993 |
$sortie_liste = '' ;
|
986 |
$sortie_liste = '' ;
|
| - |
|
987 |
|
| 994 |
|
988 |
if ($projet->avoirListe()) {
|
| Line 995... |
Line 989... |
| 995 |
if ($projet->avoirListe()) {
|
989 |
include_once PROJET_CHEMIN_CLASSES_LISTES.'ezmlm.php' ;
|
| 996 |
foreach ($projet->_listes_associes as $info_liste) {
|
990 |
foreach ($projet->_listes_associes as $info_liste) {
|
| Line 1127... |
Line 1121... |
| 1127 |
* @return void
|
1121 |
* @return void
|
| 1128 |
* @access public
|
1122 |
* @access public
|
| 1129 |
*/
|
1123 |
*/
|
| 1130 |
function suppressionProjet( )
|
1124 |
function suppressionProjet( )
|
| 1131 |
{
|
1125 |
{
|
| - |
|
1126 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1132 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
1127 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 1133 |
$projet->setCheminRepertoire (PROJET_CHEMIN_FICHIER) ;
|
1128 |
$projet->setCheminRepertoire (PROJET_CHEMIN_FICHIER) ;
|
| 1134 |
$projet->getListesAssociees() ;
|
1129 |
$projet->getListesAssociees() ;
|
| 1135 |
if ($projet->avoirListe()) $projet->supprimerListe($projet->_listes_associes[0]) ;
|
1130 |
if ($projet->avoirListe()) $projet->supprimerListe($projet->_listes_associes[0]) ;
|
| 1136 |
$msg = $projet->suppressionSQL() ;
|
1131 |
$msg = $projet->suppressionSQL() ;
|
| 1137 |
unset ($this->_id_projet) ; unset($_GET['id_projet']);
|
1132 |
unset ($this->_id_projet) ; unset($_GET['id_projet']);
|
| 1138 |
return $msg ;
|
1133 |
return $msg ;
|
| 1139 |
} // end of member function suppressionProjet
|
1134 |
}
|
| Line 1140... |
Line 1135... |
| 1140 |
|
1135 |
|
| 1141 |
/**
|
1136 |
/**
|
| 1142 |
* Permet d'indiquer au controleur sur quel document on travaille.
|
1137 |
* Permet d'indiquer au controleur sur quel document on travaille.
|
| 1143 |
*
|
1138 |
*
|
| Line 1146... |
Line 1141... |
| 1146 |
* @access public
|
1141 |
* @access public
|
| 1147 |
*/
|
1142 |
*/
|
| 1148 |
function setIdDocument( $id_document )
|
1143 |
function setIdDocument( $id_document )
|
| 1149 |
{
|
1144 |
{
|
| 1150 |
$this->_id_document = $id_document ;
|
1145 |
$this->_id_document = $id_document ;
|
| 1151 |
} // end of member function setIdDocument
|
1146 |
}
|
| Line 1152... |
Line 1147... |
| 1152 |
|
1147 |
|
| 1153 |
|
1148 |
|
| 1154 |
/**
|
1149 |
/**
|
| Line 1165... |
Line 1160... |
| 1165 |
if (isset($_SESSION['formulaire_mail'])) {
|
1160 |
if (isset($_SESSION['formulaire_mail'])) {
|
| 1166 |
unset ($_SESSION['formulaire_mail']) ;
|
1161 |
unset ($_SESSION['formulaire_mail']) ;
|
| 1167 |
}
|
1162 |
}
|
| 1168 |
$res = '<h1>'.PROJET_ECRIRE_LISTE.'</h1>'."\n" ;
|
1163 |
$res = '<h1>'.PROJET_ECRIRE_LISTE.'</h1>'."\n" ;
|
| 1169 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ENVOYER_UN_MAIL_V) ;
|
1164 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ENVOYER_UN_MAIL_V) ;
|
| - |
|
1165 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireMail.class.php' ;
|
| 1170 |
$formulaire_mail = new HTML_formulaireMail('formulaire_mail', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
1166 |
$formulaire_mail = new HTML_formulaireMail('formulaire_mail', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 1171 |
$formulaire_mail->construitFormulaire() ;
|
1167 |
$formulaire_mail->construitFormulaire() ;
|
| 1172 |
return $res.$formulaire_mail->toHTML() ;
|
1168 |
return $res.$formulaire_mail->toHTML() ;
|
| 1173 |
} // end of member function envoyerUnMailFormulaire
|
1169 |
}
|
| Line 1174... |
Line 1170... |
| 1174 |
|
1170 |
|
| 1175 |
/**
|
1171 |
/**
|
| 1176 |
* Envoie le mail
|
1172 |
* Envoie le mail
|
| 1177 |
*
|
1173 |
*
|
| Line 1180... |
Line 1176... |
| 1180 |
*/
|
1176 |
*/
|
| 1181 |
function envoyerUnMailValidation( )
|
1177 |
function envoyerUnMailValidation( )
|
| 1182 |
{
|
1178 |
{
|
| 1183 |
// Vérifications
|
1179 |
// Vérifications
|
| 1184 |
if (isset($_SESSION['formulaire_mail']) && $_SESSION['formulaire_mail'] == 'valide') {
|
1180 |
if (isset($_SESSION['formulaire_mail']) && $_SESSION['formulaire_mail'] == 'valide') {
|
| 1185 |
include_once PROJET_CHEMIN_APPLI.'actions/forums.php' ;
|
1181 |
return include_once PROJET_CHEMIN_APPLI.'actions/forums.php' ;
|
| 1186 |
return $retour;
|
- |
|
| 1187 |
}
|
1182 |
}
|
| 1188 |
|
1183 |
|
| 1189 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ENVOYER_UN_MAIL_V );
|
1184 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ENVOYER_UN_MAIL_V );
|
| - |
|
1185 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireMail.class.php' ;
|
| 1190 |
$formulaire_mail = new HTML_formulaireMail('formulaire_mail', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
1186 |
$formulaire_mail = new HTML_formulaireMail('formulaire_mail', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 1191 |
$formulaire_mail->construitFormulaire() ;
|
1187 |
$formulaire_mail->construitFormulaire() ;
|
| 1192 |
if ($formulaire_mail->validate()) {
|
1188 |
if ($formulaire_mail->validate()) {
|
| 1193 |
// création de l'objet projet courant
|
1189 |
// création de l'objet projet courant
|
| - |
|
1190 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1194 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
1191 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 1195 |
$info_liste = $projet->getListesAssociees() ;
|
1192 |
$info_liste = $projet->getListesAssociees() ;
|
| 1196 |
$valeurs_mail = $formulaire_mail->getSubmitValues() ;
|
1193 |
$valeurs_mail = $formulaire_mail->getSubmitValues() ;
|
| 1197 |
// Pour envoyer le mail on utilise la classe Mail de PEAR
|
1194 |
// Pour envoyer le mail on utilise la classe Mail de PEAR
|
| 1198 |
// on a besoin du mail de l'inscrit
|
1195 |
// on a besoin du mail de l'inscrit
|
| Line 1226... |
Line 1223... |
| 1226 |
*/
|
1223 |
*/
|
| 1227 |
function formulaireListe( $action )
|
1224 |
function formulaireListe( $action )
|
| 1228 |
{
|
1225 |
{
|
| 1229 |
$res = '<h1>'.PROJET_CREATION_LISTE.'</h1>'."\n" ;
|
1226 |
$res = '<h1>'.PROJET_CREATION_LISTE.'</h1>'."\n" ;
|
| 1230 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_NOUVELLE_LISTE_V) ;
|
1227 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_NOUVELLE_LISTE_V) ;
|
| - |
|
1228 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireListe.class.php' ;
|
| 1231 |
$formulaire_liste = new HTML_formulaireListe('formulaire_liste', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
1229 |
$formulaire_liste = new HTML_formulaireListe('formulaire_liste', 'post',preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 1232 |
$formulaire_liste->construitFormulaire() ;
|
1230 |
$formulaire_liste->construitFormulaire() ;
|
| 1233 |
$formulaire_liste->setDefaults(array('domaine_liste' => PROJET_DOMAINE_LISTE)) ;
|
1231 |
$formulaire_liste->setDefaults(array('domaine_liste' => PROJET_DOMAINE_LISTE)) ;
|
| 1234 |
$formulaire_liste->updateElementAttr('domaine_liste', array('readonly' => 'readonly')) ;
|
1232 |
$formulaire_liste->updateElementAttr('domaine_liste', array('readonly' => 'readonly')) ;
|
| 1235 |
return $res.$formulaire_liste->toHTML() ;
|
1233 |
return $res.$formulaire_liste->toHTML() ;
|
| Line 1243... |
Line 1241... |
| 1243 |
*/
|
1241 |
*/
|
| 1244 |
function nouvelleListeValidation( )
|
1242 |
function nouvelleListeValidation( )
|
| 1245 |
{
|
1243 |
{
|
| 1246 |
// Vérifications
|
1244 |
// Vérifications
|
| 1247 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_NOUVELLE_LISTE_V );
|
1245 |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_NOUVELLE_LISTE_V );
|
| - |
|
1246 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireListe.class.php' ;
|
| 1248 |
$formulaire_liste = new HTML_formulaireListe('formulaire_liste', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
1247 |
$formulaire_liste = new HTML_formulaireListe('formulaire_liste', 'post', preg_replace ("/&/", "&", $this->_url->getURL())) ;
|
| 1249 |
$formulaire_liste->construitFormulaire() ;
|
1248 |
$formulaire_liste->construitFormulaire() ;
|
| 1250 |
if ($formulaire_liste->validate()) {
|
1249 |
if ($formulaire_liste->validate()) {
|
| 1251 |
// création de l'objet liste_discussion
|
1250 |
// création de l'objet liste_discussion
|
| 1252 |
$liste = new liste_discussion('', $this->_db) ;
|
1251 |
$liste = new liste_discussion('', $this->_db) ;
|
| Line 1256... |
Line 1255... |
| 1256 |
$formulaire_liste->getSubmitValue('domaine_liste'), $this->_db)) {
|
1255 |
$formulaire_liste->getSubmitValue('domaine_liste'), $this->_db)) {
|
| 1257 |
// On rajoute la liste dans la base
|
1256 |
// On rajoute la liste dans la base
|
| 1258 |
$liste->enregistrerSQL($formulaire_liste->getSubmitValues()) ;
|
1257 |
$liste->enregistrerSQL($formulaire_liste->getSubmitValues()) ;
|
| Line 1259... |
Line 1258... |
| 1259 |
|
1258 |
|
| - |
|
1259 |
// On la relie au projet
|
| 1260 |
// On la relie au projet
|
1260 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1261 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
1261 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| Line 1262... |
Line 1262... |
| 1262 |
$projet->ajouterListe($liste) ;
|
1262 |
$projet->ajouterListe($liste) ;
|
| 1263 |
|
1263 |
|
| Line 1288... |
Line 1288... |
| 1288 |
* @return void
|
1288 |
* @return void
|
| 1289 |
* @access public
|
1289 |
* @access public
|
| 1290 |
*/
|
1290 |
*/
|
| 1291 |
function supprimerListe( )
|
1291 |
function supprimerListe( )
|
| 1292 |
{
|
1292 |
{
|
| - |
|
1293 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1293 |
$projet = new projet($this->_db, $this->_id_projet) ;
|
1294 |
$projet = new projet($this->_db, $this->_id_projet) ;
|
| 1294 |
$projet->getListesAssociees() ;
|
1295 |
$projet->getListesAssociees() ;
|
| Line 1295... |
Line -... |
| 1295 |
|
- |
|
| 1296 |
// ajouter un commande de suppression
|
- |
|
| 1297 |
|
- |
|
| 1298 |
$commande = new commande_serveur(PROJET_CHEMIN_APPLI.'script_cron/ezmlm.sh') ;
|
- |
|
| 1299 |
if (PEAR::isError($commande)) {
|
- |
|
| 1300 |
echo $commande->getMessage() ;
|
- |
|
| 1301 |
}
|
- |
|
| 1302 |
|
- |
|
| 1303 |
// Suppression des listes synchronisés
|
- |
|
| 1304 |
$commande_supression_3 = 'rm -rf '.PROJET_CHEMIN_LISTES.$projet->_listes_associes[0]->getDomaine().
|
- |
|
| 1305 |
'/'.$projet->_listes_associes[0]->getNom() ;
|
- |
|
| 1306 |
$commande->ajouterCommande($commande_supression_3) ;
|
- |
|
| 1307 |
|
1296 |
|
| 1308 |
$resultat_suppression = file_get_contents(PROJET_SERVEUR_VPOPMAIL.'/suppression_liste.php?domaine='.
|
1297 |
$resultat_suppression = file_get_contents(PROJET_SERVEUR_VPOPMAIL.'/suppression_liste.php?domaine='.
|
| 1309 |
$projet->_listes_associes[0]->getDomaine().'&liste='.$projet->_listes_associes[0]->getNom()) ;
|
1298 |
$projet->_listes_associes[0]->getDomaine().'&liste='.$projet->_listes_associes[0]->getNom()) ;
|
| 1310 |
$projet->supprimerListe($projet->_listes_associes[0]) ;
|
1299 |
$projet->supprimerListe($projet->_listes_associes[0]) ;
|
| 1311 |
return $resultat_suppression;
|
1300 |
return $resultat_suppression;
|
| Line 1344... |
Line 1333... |
| 1344 |
* @access public
|
1333 |
* @access public
|
| 1345 |
*/
|
1334 |
*/
|
| 1346 |
function voirParticipants( )
|
1335 |
function voirParticipants( )
|
| 1347 |
{
|
1336 |
{
|
| 1348 |
include_once PROJET_CHEMIN_CLASSES.'HTML_listeParticipants.class.php' ;
|
1337 |
include_once PROJET_CHEMIN_CLASSES.'HTML_listeParticipants.class.php' ;
|
| - |
|
1338 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1349 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
1339 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 1350 |
$titre = '<h1>'.$projet->getTitre().'</h1>'."\n" ;
|
1340 |
$titre = '<h1>'.$projet->getTitre().'</h1>'."\n" ;
|
| 1351 |
$titre .= '<h2>'.PROJET_LISTE_PARTICIPANT.'</h2>'."\n" ;
|
1341 |
$titre .= '<h2>'.PROJET_LISTE_PARTICIPANT.'</h2>'."\n" ;
|
| - |
|
1342 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
| 1352 |
$participants = new participe($this->_db) ;
|
1343 |
$participants = new participe($this->_db) ;
|
| Line 1353... |
Line 1344... |
| 1353 |
|
1344 |
|
| 1354 |
// On teste ici s'il y a une mise à jour de statut
|
1345 |
// On teste ici s'il y a une mise à jour de statut
|
| 1355 |
if (isset($_POST['statut'])) {
|
1346 |
if (isset($_POST['statut'])) {
|
| Line 1423... |
Line 1414... |
| 1423 |
* @access public
|
1414 |
* @access public
|
| 1424 |
*/
|
1415 |
*/
|
| 1425 |
function inscriptionProjet( )
|
1416 |
function inscriptionProjet( )
|
| 1426 |
{
|
1417 |
{
|
| 1427 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireInscriptionProjet.class.php' ;
|
1418 |
include_once PROJET_CHEMIN_CLASSES.'HTML_formulaireInscriptionProjet.class.php' ;
|
| 1428 |
|
- |
|
| - |
|
1419 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1429 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
1420 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| Line 1430... |
Line 1421... |
| 1430 |
|
1421 |
|
| 1431 |
// Si le projet n'a pas de liste, on inscrit directement
|
1422 |
// Si le projet n'a pas de liste, on inscrit directement
|
| - |
|
1423 |
if (isset ($this->_id_projet)) {
|
| 1432 |
if (isset ($this->_id_projet)) {
|
1424 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
| Line 1433... |
Line 1425... |
| 1433 |
$participant = new participe($this->_db) ;
|
1425 |
$participant = new participe($this->_db) ;
|
| 1434 |
|
1426 |
|
| 1435 |
if (!$projet->avoirListe()) {
|
1427 |
if (!$projet->avoirListe()) {
|
| Line 1492... |
Line 1484... |
| 1492 |
$objet_mail->send($entetes['To'], $entetes, $tpl->get());
|
1484 |
$objet_mail->send($entetes['To'], $entetes, $tpl->get());
|
| 1493 |
}
|
1485 |
}
|
| 1494 |
}
|
1486 |
}
|
| Line 1495... |
Line 1487... |
| 1495 |
|
1487 |
|
| 1496 |
if ($this->_presentation != 'arbre') {
|
1488 |
if ($this->_presentation != 'arbre') {
|
| 1497 |
include_once PROJET_CHEMIN_APPLI.'actions/resume.php' ;
|
- |
|
| 1498 |
return $retour ;
|
1489 |
return include_once PROJET_CHEMIN_APPLI.'actions/resume.php' ;
|
| 1499 |
} else {
|
1490 |
} else {
|
| 1500 |
$this->_action = PROJET_ACTION_VOIR_RESUME;
|
1491 |
$this->_action = PROJET_ACTION_VOIR_RESUME;
|
| 1501 |
}
|
1492 |
}
|
| 1502 |
return ;
|
1493 |
return ;
|
| Line 1517... |
Line 1508... |
| 1517 |
* @return void
|
1508 |
* @return void
|
| 1518 |
* @access public
|
1509 |
* @access public
|
| 1519 |
*/
|
1510 |
*/
|
| 1520 |
function inscriptionListe( )
|
1511 |
function inscriptionListe( )
|
| 1521 |
{
|
1512 |
{
|
| - |
|
1513 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1522 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
1514 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 1523 |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;
|
1515 |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;
|
| 1524 |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
|
1516 |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
|
| 1525 |
$projet->getListesAssociees() ;
|
1517 |
$projet->getListesAssociees() ;
|
| 1526 |
$utilisateur = new annuaire($this->_db, array('identifiant' => PROJET_CHAMPS_ID, 'mail' => PROJET_CHAMPS_MAIL, 'table' => PROJET_ANNUAIRE)) ;
|
1518 |
$utilisateur = new annuaire($this->_db, array('identifiant' => PROJET_CHAMPS_ID, 'mail' => PROJET_CHAMPS_MAIL, 'table' => PROJET_ANNUAIRE)) ;
|
| Line 1536... |
Line 1528... |
| 1536 |
* @access public
|
1528 |
* @access public
|
| 1537 |
*/
|
1529 |
*/
|
| 1538 |
function desinscriptionListe( )
|
1530 |
function desinscriptionListe( )
|
| 1539 |
{
|
1531 |
{
|
| 1540 |
if (isset($_GET['inscription_liste']) || $this->_action = PROJET_ACTION_DESINSCRIPTION_LISTE) {
|
1532 |
if (isset($_GET['inscription_liste']) || $this->_action = PROJET_ACTION_DESINSCRIPTION_LISTE) {
|
| - |
|
1533 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1541 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
1534 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 1542 |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;
|
1535 |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;
|
| 1543 |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
|
1536 |
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;
|
| 1544 |
$projet->getListesAssociees() ;
|
1537 |
$projet->getListesAssociees() ;
|
| 1545 |
$utilisateur = new annuaire($this->_db, array('identifiant' => PROJET_CHAMPS_ID,
|
1538 |
$utilisateur = new annuaire($this->_db, array('identifiant' => PROJET_CHAMPS_ID,
|
| Line 1561... |
Line 1554... |
| 1561 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
1554 |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;
|
| 1562 |
$participant = new participe($this->_db) ;
|
1555 |
$participant = new participe($this->_db) ;
|
| Line 1563... |
Line 1556... |
| 1563 |
|
1556 |
|
| 1564 |
// Le statut 4 désinscrit l'utilisateur, dans la méthode setStatut
|
1557 |
// Le statut 4 désinscrit l'utilisateur, dans la méthode setStatut
|
| - |
|
1558 |
$participant->setStatut(4, $this->_auth->getAuthData (PROJET_CHAMPS_ID), $this->_id_projet) ;
|
| 1565 |
$participant->setStatut(4, $this->_auth->getAuthData (PROJET_CHAMPS_ID), $this->_id_projet) ;
|
1559 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
|
| 1566 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
1560 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
| 1567 |
$projet->getListesAssociees() ;
|
1561 |
$projet->getListesAssociees() ;
|
| 1568 |
if ($projet->avoirListe()) {
|
1562 |
if ($projet->avoirListe()) {
|
| 1569 |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;
|
1563 |
include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;
|