$agf->adresse = GETPOST('adresse', 'alpha'); $agf->fk_departement = GETPOST('zipcode', 'alpha'); $agf->town = GETPOST('town', 'alpha'); $agf->fk_pays = GETPOST('country_id', 'int'); $agf->fk_mandat = GETPOST('mandat', 'int'); // $agf->dol_htmlcleanlastbr(GETPOST('descriptif')); $agf->descriptif = GETPOST('descriptif', 'alpha'); $agf->nb_piece = GETPOST('nb_piece', 'alpha'); $agf->superficie = GETPOST('superficie', 'alpha'); $agf->dpe = GETPOST('dpe', 'alpha'); $agf->loyer = GETPOST('loyer', 'alpha'); $agf->charges = GETPOST('charges', 'alpha'); $agf->caution = GETPOST('caution', 'alpha'); $agf->Honoraire = GETPOST('Honoraire', 'alpha'); $agf->Assurance = GETPOST('Assurance', 'alpha'); $result = $agf->update($user); if ($result > 0) { Header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $id); exit; } else { dol_syslog("agefodd::site::card error=" . $agf->error, LOG_ERR); $mesg = '<div class="error">' . $agf->error . '</div>'; $action = 'edit'; } } else { dol_syslog("gestimmo::site::card error=" . $agf->error, LOG_ERR); $mesg = '<div class="error">' . $agf->error . '</div>'; } } elseif (!$_POST["cancel"] && $_POST["importadress"]) { $agf = new Agefodd_place($db); $result = $agf->fetch($id);