Subversion Repositories Sites.tela-botanica.org

Compare Revisions

Ignore whitespace Rev 461 → Rev 462

/trunk/client/inscription/bibliotheque/inscription.fonct.php
286,11 → 286,13
*/
function info_annuaire($valeur) {
// Petit code pour recupere le num de dpt a partir du cp
if (preg_match ('/(\d{2})\d{3}/', $valeur['cp'], $match)) {
$valeur['dpt'] = $match[1];
if (preg_match ('/(97\d)\d{2}/', $valeur['cp'], $match2)) {
$valeur['dpt'] = $match2[1];
// Petit code pour recupere le num de dpt a partir du cp pour les français
if (preg_match('/^(?:fr|mc)$/', $valeur['pays'])) {
if (preg_match('/(\d{2})\d{3}/', $valeur['cp'], $match)) {
$valeur['dpt'] = $match[1];
if (preg_match('/((?:97|98)\d)\d{2}/', $valeur['cp'], $match2)) {
$valeur['dpt'] = $match2[1];
}
}
}
$tableau = array (