287,9 → 287,9 |
function info_annuaire($valeur) { |
|
// Petit code pour recupere le num de dpt a partir du cp |
if (preg_match ('/([0-9][0-9])[0-9][0-9][0-9]/', $valeur['cp'], $match)) { |
if (preg_match ('/(\d{2})\d{3}/', $valeur['cp'], $match)) { |
$valeur['dpt'] = $match[1]; |
if (preg_match ('/(97[0-9])[0-9][0-9]/', $valeur['cp'], $match2)) { |
if (preg_match ('/(97\d)\d{2}/', $valeur['cp'], $match2)) { |
$valeur['dpt'] = $match2[1]; |
} |
} |
299,6 → 299,7 |
INS_CHAMPS_PRENOM => addslashes($valeur['prenom']), |
INS_CHAMPS_PAYS => $valeur['pays'], |
INS_CHAMPS_CODE_POSTAL => $valeur['cp'], |
INS_CHAMPS_DPT => $valeur['dpt'], |
INS_CHAMPS_VILLE => addslashes($valeur['ville']), |
INS_CHAMPS_ADRESSE_1 => addslashes($valeur['adresse_1']), |
INS_CHAMPS_ADRESSE_2 => addslashes($valeur['adresse_2']), |