Rev 110 | Blame | 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 Lesser 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 |// | Lesser General Public License for more details. |// | |// | You should have received a copy of the GNU Lesser 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: projet.desinscription.inc.php,v 1.2 2006-04-19 13:52:54 alexandre_tb Exp $/*** Inscription** Le fichier de désinscription de projet, appelé par l'inscription* en cas de désinscription d'un utilisateur**@package projet//Auteur original :*@author Alexandre GRANIER <alexandre@tela-botanica.org>*@copyright Tela-Botanica 2000-2006*@version $Revision: 1.2 $// +------------------------------------------------------------------------------------------------------+*/// +------------------------------------------------------------------------------------------------------+// | ENTETE du PROGRAMME |// +------------------------------------------------------------------------------------------------------+// On récupère id_utilisateur, l'identifiant de la personne qui se désinscrit// On se trouve dans la fonction afficherContenuCorps de inscription.phpinclude_once 'client/projet/configuration/projet.config.inc.php' ;include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ;$participant = new participe($GLOBALS['ins_db']) ;$tableau_projet = projet::getTousLesProjets($GLOBALS['ins_db']) ;// On boucle sur chaque projet et on désinscrit l'utilisateurforeach ($tableau_projet as $projet) {// Le statut 4 désinscrit l'utilisateur, dans la méthode setStatut$participant->setStatut(4, $id_utilisateur, $projet->getId()) ;$projet->getListesAssociees() ;if ($projet->avoirListe()) {include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;$annuaire = new annuaire($this->_db, array('identifiant' => PROJET_CHAMPS_ID, 'mail' => PROJET_CHAMPS_MAIL, 'table' => PROJET_ANNUAIRE)) ;$annuaire->setId($id_utilisateur) ;include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php' ;$desinscription= new inscription_liste($GLOBALS['ins_db']) ;$desinscription->desinscrireUtilisateur($annuaire, $projet->_listes_associes[0]) ;}}?>