8 |
alexandre_ |
1 |
<?php
|
|
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
|
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
4 |
// | PHP version 4.1 |
|
|
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
|
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
8 |
// | This library is free software; you can redistribute it and/or |
|
|
|
9 |
// | modify it under the terms of the GNU Lesser General Public |
|
|
|
10 |
// | License as published by the Free Software Foundation; either |
|
|
|
11 |
// | version 2.1 of the License, or (at your option) any later version. |
|
|
|
12 |
// | |
|
|
|
13 |
// | This library is distributed in the hope that it will be useful, |
|
|
|
14 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
|
|
15 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
|
|
16 |
// | Lesser General Public License for more details. |
|
|
|
17 |
// | |
|
|
|
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 |
|
|
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
|
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
121 |
florian |
22 |
// CVS : $Id: bazar.inscription.inc.php,v 1.3 2006-04-28 16:10:17 florian Exp $
|
8 |
alexandre_ |
23 |
/**
|
|
|
24 |
*
|
|
|
25 |
*@package bazar
|
|
|
26 |
//Auteur original :
|
|
|
27 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
|
|
|
28 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
|
|
29 |
//Autres auteurs :
|
|
|
30 |
*@copyright Tela-Botanica 2000-2005
|
121 |
florian |
31 |
*@version $Revision: 1.3 $
|
8 |
alexandre_ |
32 |
// +------------------------------------------------------------------------------------------------------+
|
|
|
33 |
*/
|
|
|
34 |
|
112 |
alexandre_ |
35 |
// RAPPEL : On se situe dans la fonction afficherContenuCorps() de inscription.php
|
8 |
alexandre_ |
36 |
|
112 |
alexandre_ |
37 |
// requete pour récupérer l'ensemble des type d'annonces
|
121 |
florian |
38 |
$requete = 'select bn_id_nature from bazar_nature where 1' ;
|
112 |
alexandre_ |
39 |
$resultat = $GLOBALS['ins_db']->query ($requete);
|
8 |
alexandre_ |
40 |
|
112 |
alexandre_ |
41 |
$SQL = '' ;
|
8 |
alexandre_ |
42 |
|
112 |
alexandre_ |
43 |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
|
|
|
44 |
$SQL .= '('.$id_utilisateur.', '.$ligne->bn_id_nature.', 1),' ;
|
|
|
45 |
}
|
|
|
46 |
|
|
|
47 |
$SQL = substr ($SQL, 0, strlen ($SQL) - 1) ;
|
|
|
48 |
|
|
|
49 |
$requete = 'INSERT INTO bazar_droits VALUES '.$SQL;
|
|
|
50 |
|
|
|
51 |
$resultat = $GLOBALS['ins_db']->query($requete);
|
|
|
52 |
if (DB::isError($resultat)) {
|
|
|
53 |
echo ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
|
|
54 |
}
|
|
|
55 |
unset($resultat) ;
|
|
|
56 |
|
8 |
alexandre_ |
57 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
|
|
58 |
*
|
|
|
59 |
* $Log: not supported by cvs2svn $
|
121 |
florian |
60 |
* Revision 1.2 2006/03/29 13:06:07 alexandre_tb
|
|
|
61 |
* Code initial
|
|
|
62 |
*
|
112 |
alexandre_ |
63 |
* Revision 1.1 2005/09/29 16:14:17 alexandre_tb
|
|
|
64 |
* version initiale
|
|
|
65 |
*
|
8 |
alexandre_ |
66 |
*
|
|
|
67 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
|
|
68 |
*/
|
|
|
69 |
?>
|