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.fonct.php,v 1.7 2005-09-30 13:15:58 ddelon Exp $
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.8 2005-09-30 13:50:07 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
* Fonctions du module bazar
|
25 |
* Fonctions du module bazar
|
26 |
*
|
26 |
*
|
27 |
*@package bazar
|
27 |
*@package bazar
|
28 |
//Auteur original :
|
28 |
//Auteur original :
|
29 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
29 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
30 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
31 |
//Autres auteurs :
|
31 |
//Autres auteurs :
|
32 |
*@copyright Tela-Botanica 2000-2004
|
32 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@version $Revision: 1.7 $ $Date: 2005-09-30 13:15:58 $
|
33 |
*@version $Revision: 1.8 $ $Date: 2005-09-30 13:50:07 $
|
34 |
// +------------------------------------------------------------------------------------------------------+
|
34 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
*/
|
35 |
*/
|
Line 36... |
Line 36... |
36 |
|
36 |
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
Line 764... |
Line 764... |
764 |
* @array Le tableau des valeurs à insérer
|
764 |
* @array Le tableau des valeurs à insérer
|
765 |
* @integer Valeur de l'identifiant de la fiche
|
765 |
* @integer Valeur de l'identifiant de la fiche
|
766 |
* @return void
|
766 |
* @return void
|
767 |
*/
|
767 |
*/
|
768 |
function baz_insertion($valeur) {
|
768 |
function baz_insertion($valeur) {
|
- |
|
769 |
|
- |
|
770 |
// Récupération de bn_appropriation
|
- |
|
771 |
|
- |
|
772 |
$requete_app = 'select bn_appropriation from bazar_nature where bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'] ;
|
- |
|
773 |
$resultat_app = $GLOBALS['_BAZAR_']['db']->query($requete_app) ;
|
- |
|
774 |
$ligne = $resultat_app ->fetchRow(DB_FETCHMODE_ASSOC) ;
|
- |
|
775 |
|
769 |
// =========== Insertion d'une nouvelle fiche ===================
|
776 |
// =========== Insertion d'une nouvelle fiche ===================
|
Line 770... |
Line 777... |
770 |
|
777 |
|
771 |
//requete d'insertion dans bazar_fiche
|
778 |
//requete d'insertion dans bazar_fiche
|
772 |
$requete = 'INSERT INTO bazar_fiche SET bf_id_fiche='.baz_nextid('bazar_fiche', 'bf_id_fiche', $GLOBALS['_BAZAR_']['db']).','.
|
779 |
$requete = 'INSERT INTO bazar_fiche SET bf_id_fiche='.baz_nextid('bazar_fiche', 'bf_id_fiche', $GLOBALS['_BAZAR_']['db']).','.
|
- |
|
780 |
'bf_ce_utilisateur='.$GLOBALS['id_user'].', bf_ce_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'].','.
|
- |
|
781 |
'bf_date_creation_fiche=NOW(),';
|
- |
|
782 |
if ($ligne['bn_appropriation'] == 1) {
|
- |
|
783 |
$requete .= 'bf_date_debut_validite_fiche=now(), ' ;
|
773 |
'bf_ce_utilisateur='.$GLOBALS['id_user'].', bf_ce_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'].','.
|
784 |
}
|
774 |
'bf_date_creation_fiche=NOW(),'.requete_bazar_fiche(&$valeur, $GLOBALS['_BAZAR_']['id_typeannonce']) ;
|
785 |
$requete .=requete_bazar_fiche(&$valeur, $GLOBALS['_BAZAR_']['id_typeannonce']) ;
|
775 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
786 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
776 |
if (DB::isError($resultat)) {
|
787 |
if (DB::isError($resultat)) {
|
777 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
788 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
778 |
}
|
789 |
}
|
Line 1330... |
Line 1341... |
1330 |
}
|
1341 |
}
|
Line 1331... |
Line 1342... |
1331 |
|
1342 |
|
1332 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1343 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1333 |
*
|
1344 |
*
|
- |
|
1345 |
* $Log: not supported by cvs2svn $
|
- |
|
1346 |
* Revision 1.7 2005/09/30 13:15:58 ddelon
|
- |
|
1347 |
* compatibilité php5
|
1334 |
* $Log: not supported by cvs2svn $
|
1348 |
*
|
1335 |
* Revision 1.6 2005/09/30 13:00:05 ddelon
|
1349 |
* Revision 1.6 2005/09/30 13:00:05 ddelon
|
1336 |
* Fiche bazar generique
|
1350 |
* Fiche bazar generique
|
1337 |
*
|
1351 |
*
|
1338 |
* Revision 1.5 2005/09/30 12:22:54 florian
|
1352 |
* Revision 1.5 2005/09/30 12:22:54 florian
|