Subversion Repositories Applications.bazar

Rev

Rev 273 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 273 Rev 468
1
<?php
1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
3
// +------------------------------------------------------------------------------------------------------+
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
16
// | Lesser General Public License for more details.                                                      |
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.8 2007-07-04 10:06:21 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.8 $
31
*@version       $Revision: 1.8 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
34
 
34
 
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
if (!file_exists (INS_CHEMIN_APPLI.'../bazar/bazar.inscription.local.php')) {
39
	$requete = 'SELECT bn_id_nature FROM bazar_nature WHERE 1' ;
39
	$requete = 'SELECT bn_id_nature FROM bazar_nature WHERE 1' ;
40
	$resultat = $GLOBALS['ins_db']->query ($requete);
40
	$resultat = $GLOBALS['ins_db']->query ($requete);
41
	$SQL = '' ;
41
	$SQL = '' ;
42
	while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
42
	while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) {
43
		$SQL .= '('.$id_utilisateur.', '.$ligne->bn_id_nature.', 1),' ;	
43
		$SQL .= '('.$id_utilisateur.', '.$ligne->bn_id_nature.', 1),' ;	
44
	}
44
	}
45
	
45
	
46
	$SQL = substr ($SQL, 0, strlen ($SQL) - 1) ;
46
	$SQL = substr ($SQL, 0, strlen ($SQL) - 1) ;
47
	
47
	
48
	$requete = 'INSERT INTO bazar_droits VALUES '.$SQL;
48
	$requete = 'INSERT INTO bazar_droits VALUES '.$SQL;
49
	
49
	
50
	$resultat = $GLOBALS['ins_db']->query($requete);
50
	$resultat = $GLOBALS['ins_db']->query($requete);
51
	if (DB::isError($resultat)) {
51
	if (DB::isError($resultat)) {
52
		$msg = $resultat->getMessage().$resultat->getDebugInfo() ;
52
		$msg = $resultat->getMessage().$resultat->getDebugInfo() ;
53
	}
53
	}
54
	unset($resultat) ;
54
	unset($resultat) ;
55
} else {
55
} else {
56
	include_once INS_CHEMIN_APPLI.'../bazar/bazar.inscription.local.php';
56
	include_once INS_CHEMIN_APPLI.'../bazar/bazar.inscription.local.php';
57
}
57
}
58
/* +--Fin du code ----------------------------------------------------------------------------------------+
58
/* +--Fin du code ----------------------------------------------------------------------------------------+
59
*
59
*
60
* $Log: not supported by cvs2svn $
60
* $Log: bazar.inscription.inc.php,v $
-
 
61
* Revision 1.8  2007-07-04 10:06:21  alexandre_tb
-
 
62
* ajout d un appel a bazar.inscription.local.php s il existe, pour personnaliser les actions lors d une inscription.
-
 
63
*
61
* Revision 1.7  2007-06-01 13:51:09  alexandre_tb
64
* Revision 1.7  2007-06-01 13:51:09  alexandre_tb
62
* suppression de l echo en cas d erreur
65
* suppression de l echo en cas d erreur
63
* mise en place de $msg pour recuperer les erreurs
66
* mise en place de $msg pour recuperer les erreurs
64
*
67
*
65
* Revision 1.6  2007/04/11 08:30:12  neiluj
68
* Revision 1.6  2007/04/11 08:30:12  neiluj
66
* remise en état du CVS...
69
* remise en état du CVS...
67
*
70
*
68
* Revision 1.4.2.1  2007/03/07 16:50:42  jp_milcent
71
* Revision 1.4.2.1  2007/03/07 16:50:42  jp_milcent
69
* Mise en majuscule des mots réservés par SQL
72
* Mise en majuscule des mots réservés par SQL
70
*
73
*
71
* Revision 1.4  2006/12/01 13:23:17  florian
74
* Revision 1.4  2006/12/01 13:23:17  florian
72
* integration annuaire backoffice
75
* integration annuaire backoffice
73
*
76
*
74
* Revision 1.3  2006/04/28 16:10:17  florian
77
* Revision 1.3  2006/04/28 16:10:17  florian
75
* inscrit d'office tous les utilisateurs en rédacteur de fiches
78
* inscrit d'office tous les utilisateurs en rédacteur de fiches
76
*
79
*
77
* Revision 1.2  2006/03/29 13:06:07  alexandre_tb
80
* Revision 1.2  2006/03/29 13:06:07  alexandre_tb
78
* Code initial
81
* Code initial
79
*
82
*
80
* Revision 1.1  2005/09/29 16:14:17  alexandre_tb
83
* Revision 1.1  2005/09/29 16:14:17  alexandre_tb
81
* version initiale
84
* version initiale
82
*
85
*
83
*
86
*
84
* +-- Fin du code ----------------------------------------------------------------------------------------+
87
* +-- Fin du code ----------------------------------------------------------------------------------------+
85
*/
88
*/
86
?>
89
?>