19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bazar.fonct.php,v 1.7 2005-09-30 13:15:58 ddelon Exp $ |
// CVS : $Id: bazar.fonct.php,v 1.8 2005-09-30 13:50:07 alexandre_tb Exp $ |
/** |
* |
* Fonctions du module bazar |
30,7 → 30,7 |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.7 $ $Date: 2005-09-30 13:15:58 $ |
*@version $Revision: 1.8 $ $Date: 2005-09-30 13:50:07 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
766,12 → 766,23 |
* @return void |
*/ |
function baz_insertion($valeur) { |
|
// Récupération de bn_appropriation |
|
$requete_app = 'select bn_appropriation from bazar_nature where bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'] ; |
$resultat_app = $GLOBALS['_BAZAR_']['db']->query($requete_app) ; |
$ligne = $resultat_app ->fetchRow(DB_FETCHMODE_ASSOC) ; |
|
// =========== Insertion d'une nouvelle fiche =================== |
|
//requete d'insertion dans bazar_fiche |
$requete = 'INSERT INTO bazar_fiche SET bf_id_fiche='.baz_nextid('bazar_fiche', 'bf_id_fiche', $GLOBALS['_BAZAR_']['db']).','. |
'bf_ce_utilisateur='.$GLOBALS['id_user'].', bf_ce_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'].','. |
'bf_date_creation_fiche=NOW(),'.requete_bazar_fiche(&$valeur, $GLOBALS['_BAZAR_']['id_typeannonce']) ; |
'bf_date_creation_fiche=NOW(),'; |
if ($ligne['bn_appropriation'] == 1) { |
$requete .= 'bf_date_debut_validite_fiche=now(), ' ; |
} |
$requete .=requete_bazar_fiche(&$valeur, $GLOBALS['_BAZAR_']['id_typeannonce']) ; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
1332,6 → 1343,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.7 2005/09/30 13:15:58 ddelon |
* compatibilité php5 |
* |
* Revision 1.6 2005/09/30 13:00:05 ddelon |
* Fiche bazar generique |
* |