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.57.2.3 2007-02-01 16:11:05 alexandre_tb Exp $
|
22 |
// CVS : $Id: bazar.fonct.php,v 1.57.2.4 2007-02-01 16:19:30 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
*
|
24 |
*
|
25 |
* Fonctions du module bazar
|
25 |
* Fonctions du module bazar
|
26 |
*
|
26 |
*
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
31 |
*@author Florian Schmitt <florian@ecole-et-nature.org>
|
32 |
//Autres auteurs :
|
32 |
//Autres auteurs :
|
33 |
*@copyright Tela-Botanica 2000-2004
|
33 |
*@copyright Tela-Botanica 2000-2004
|
34 |
*@version $Revision: 1.57.2.3 $ $Date: 2007-02-01 16:11:05 $
|
34 |
*@version $Revision: 1.57.2.4 $ $Date: 2007-02-01 16:19:30 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
Line 765... |
Line 765... |
765 |
//requete d'insertion dans bazar_fiche
|
765 |
//requete d'insertion dans bazar_fiche
|
766 |
$GLOBALS['_BAZAR_']['id_fiche'] = baz_nextid('bazar_fiche', 'bf_id_fiche', $GLOBALS['_BAZAR_']['db']) ;
|
766 |
$GLOBALS['_BAZAR_']['id_fiche'] = baz_nextid('bazar_fiche', 'bf_id_fiche', $GLOBALS['_BAZAR_']['db']) ;
|
767 |
$requete = 'INSERT INTO bazar_fiche SET bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].','.
|
767 |
$requete = 'INSERT INTO bazar_fiche SET bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].','.
|
768 |
'bf_ce_utilisateur='.$GLOBALS['id_user'].', bf_ce_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'].','.
|
768 |
'bf_ce_utilisateur='.$GLOBALS['id_user'].', bf_ce_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'].','.
|
769 |
'bf_date_creation_fiche=NOW(),';
|
769 |
'bf_date_creation_fiche=NOW(),';
|
770 |
if ($GLOBALS['_BAZAR_']['appropriation']== 1 && !isset($_GET['bf_debut_validite_fiche'])) {
|
- |
|
771 |
$requete .= 'bf_date_debut_validite_fiche=now(), ' ;
|
- |
|
772 |
} else {
|
- |
|
773 |
if (!isset($_GET['bf_date_debut_validite_fiche'])) {
|
770 |
if (!isset($_REQUEST['bf_date_debut_validite_fiche'])) {
|
774 |
$requete .= 'bf_date_debut_validite_fiche=now(), ' ;
|
771 |
$requete .= 'bf_date_debut_validite_fiche=now(), bf_date_fin_validite_fiche="0000-00-00", ' ;
|
775 |
}
|
- |
|
776 |
}
|
772 |
}
|
777 |
$requete .=requete_bazar_fiche(&$valeur) ;
|
773 |
$requete .=requete_bazar_fiche(&$valeur) ;
|
778 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
774 |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ;
|
779 |
if (DB::isError($resultat)) {
|
775 |
if (DB::isError($resultat)) {
|
780 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
776 |
die ($resultat->getMessage().$resultat->getDebugInfo()) ;
|
Line 1257... |
Line 1253... |
1257 |
}
|
1253 |
}
|
Line 1258... |
Line 1254... |
1258 |
|
1254 |
|
1259 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1255 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
1260 |
*
|
1256 |
*
|
- |
|
1257 |
* $Log: not supported by cvs2svn $
|
- |
|
1258 |
* Revision 1.57.2.3 2007/02/01 16:11:05 alexandre_tb
|
- |
|
1259 |
* correction erreur de requete sur insertion bazar_fiche
|
1261 |
* $Log: not supported by cvs2svn $
|
1260 |
*
|
1262 |
* Revision 1.57.2.2 2007/01/22 16:05:39 alexandre_tb
|
1261 |
* Revision 1.57.2.2 2007/01/22 16:05:39 alexandre_tb
|
1263 |
* insertion de la date du jour dans bf_date_debut_validite_fiche quand il n'y a pas ce champs dans le formulaire (évite le 0000-00-00)
|
1262 |
* insertion de la date du jour dans bf_date_debut_validite_fiche quand il n'y a pas ce champs dans le formulaire (évite le 0000-00-00)
|
1264 |
*
|
1263 |
*
|
1265 |
* Revision 1.57.2.1 2006/12/13 13:23:03 alexandre_tb
|
1264 |
* Revision 1.57.2.1 2006/12/13 13:23:03 alexandre_tb
|