| Line 17... | Line 17... | 
          
            | 17 | // |                                                                                                      |
 | 17 | // |                                                                                                      |
 | 
          
            | 18 | // | You should have received a copy of the GNU Lesser General Public                                     |
 | 18 | // | You should have received a copy of the GNU Lesser 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 | // CVS : $Id: bazar.inscription.inc.php,v 1.7 2007-06-01 13:51:09 alexandre_tb Exp $
 | 22 | // CVS : $Id: bazar.inscription.inc.php,v 1.8 2007-07-04 10:06:21 alexandre_tb Exp $
 | 
          
            | 23 | /**
 | 23 | /**
 | 
          
            | 24 | * 
 | 24 | * 
 | 
          
            | 25 | *@package bazar
 | 25 | *@package bazar
 | 
          
            | 26 | //Auteur original :
 | 26 | //Auteur original :
 | 
          
            | 27 | *@author        Alexandre GRANIER <alexandre@tela-botanica.org>
 | 27 | *@author        Alexandre GRANIER <alexandre@tela-botanica.org>
 | 
          
            | 28 | *@author        Florian Schmitt <florian@ecole-et-nature.org>
 | 28 | *@author        Florian Schmitt <florian@ecole-et-nature.org>
 | 
          
            | 29 | //Autres auteurs :
 | 29 | //Autres auteurs :
 | 
          
            | 30 | *@copyright     Tela-Botanica 2000-2005
 | 30 | *@copyright     Tela-Botanica 2000-2005
 | 
          
            | 31 | *@version       $Revision: 1.7 $
 | 31 | *@version       $Revision: 1.8 $
 | 
          
            | 32 | // +------------------------------------------------------------------------------------------------------+
 | 32 | // +------------------------------------------------------------------------------------------------------+
 | 
          
            | 33 | */
 | 33 | */
 | 
          
            | Line 34... | Line 34... | 
          
            | 34 |  
 | 34 |  
 | 
          
            | Line 35... | Line 35... | 
          
            | 35 | // RAPPEL : On se situe dans la fonction afficherContenuCorps() de inscription.php 
 | 35 | // RAPPEL : On se situe dans la fonction afficherContenuCorps() de inscription.php 
 | 
          
            | - |   | 36 |  
 | 
          
            | 36 |  
 | 37 | // requete pour récupérer l'ensemble des type d'annonces
 | 
          
            | 37 | // requete pour récupérer l'ensemble des type d'annonces
 | 38 | if (!file_exists (INS_CHEMIN_APPLI.'../bazar/bazar.inscription.local.php')) {
 | 
          
            | 38 | $requete = 'SELECT bn_id_nature FROM bazar_nature WHERE 1' ;
 | 39 | 	$requete = 'SELECT bn_id_nature FROM bazar_nature WHERE 1' ;
 | 
          
            | 39 | $resultat = $GLOBALS['ins_db']->query ($requete);
 | 40 | 	$resultat = $GLOBALS['ins_db']->query ($requete);
 | 
          
            | 40 | $SQL = '' ;
 | 41 | 	$SQL = '' ;
 | 
          
            | - |   | 42 | 	while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
 | 
          
            | - |   | 43 | 		$SQL .= '('.$id_utilisateur.', '.$ligne->bn_id_nature.', 1),' ;	
 | 
          
            | - |   | 44 | 	}
 | 
          
            | - |   | 45 | 	
 | 
          
            | - |   | 46 | 	$SQL = substr ($SQL, 0, strlen ($SQL) - 1) ;
 | 
          
            | - |   | 47 | 	
 | 
          
            | - |   | 48 | 	$requete = 'INSERT INTO bazar_droits VALUES '.$SQL;
 | 
          
            | - |   | 49 | 	
 | 
          
            | - |   | 50 | 	$resultat = $GLOBALS['ins_db']->query($requete);
 | 
          
            | - |   | 51 | 	if (DB::isError($resultat)) {
 | 
          
            | - |   | 52 | 		$msg = $resultat->getMessage().$resultat->getDebugInfo() ;
 | 
          
            | - |   | 53 | 	}
 | 
          
            | - |   | 54 | 	unset($resultat) ;
 | 
          
            | 41 | while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
 | 55 | } else {
 | 
          
            | 42 | 	$SQL .= '('.$id_utilisateur.', '.$ligne->bn_id_nature.', 1),' ;	
 | - |   | 
          
            | 43 | }
 | - |   | 
          
            | 44 |  
 | - |   | 
          
            | 45 | $SQL = substr ($SQL, 0, strlen ($SQL) - 1) ;
 | - |   | 
          
            | 46 |  
 | - |   | 
          
            | 47 | $requete = 'INSERT INTO bazar_droits VALUES '.$SQL;
 | - |   | 
          
            | 48 |  
 | - |   | 
          
            | 49 | $resultat = $GLOBALS['ins_db']->query($requete);
 | - |   | 
          
            | 50 | if (DB::isError($resultat)) {
 | - |   | 
          
            | 51 | 	$msg = $resultat->getMessage().$resultat->getDebugInfo() ;
 | - |   | 
          
            | 52 | }
 | - |   | 
          
            | 53 | unset($resultat) ;
 | 56 | 	include_once INS_CHEMIN_APPLI.'../bazar/bazar.inscription.local.php';
 | 
          
            | 54 |  
 | 57 | }
 | 
          
            | 55 | /* +--Fin du code ----------------------------------------------------------------------------------------+
 | 58 | /* +--Fin du code ----------------------------------------------------------------------------------------+
 | 
          
            | - |   | 59 | *
 | 
          
            | - |   | 60 | * $Log: not supported by cvs2svn $
 | 
          
            | - |   | 61 | * Revision 1.7  2007-06-01 13:51:09  alexandre_tb
 | 
          
            | - |   | 62 | * suppression de l echo en cas d erreur
 | 
          
            | 56 | *
 | 63 | * mise en place de $msg pour recuperer les erreurs
 | 
          
            | 57 | * $Log: not supported by cvs2svn $
 | 64 | *
 | 
          
            | 58 | * Revision 1.6  2007/04/11 08:30:12  neiluj
 | 65 | * Revision 1.6  2007/04/11 08:30:12  neiluj
 | 
          
            | 59 | * remise en état du CVS...
 | 66 | * remise en état du CVS...
 | 
          
            | 60 | *
 | 67 | *
 |