70 lines
1.1 KiB
PHP
70 lines
1.1 KiB
PHP
<?php
|
|
|
|
define('MAPPY_URL', 'http://pro.mappy.com/BtoB/scoresdecisions/');
|
|
|
|
function contentSrc($town, $way, $num, $postal_code){
|
|
global $firephp;
|
|
|
|
$way = htmlspecialchars_decode($way, ENT_QUOTES);
|
|
$firephp->log($way, 'way');
|
|
|
|
$town = urlencode(utf8_decode($town));
|
|
$way = urlencode(utf8_decode($way));
|
|
|
|
return MAPPY_URL.
|
|
'photo?photo.town='.$town.
|
|
';photo.way='.$way.
|
|
';photo.num='.$num.
|
|
';photo.postal_code='.$postal_code;
|
|
}
|
|
|
|
function formatVille($nomVille)
|
|
{
|
|
//Suppression des accents, ponctuation
|
|
$nomVille = str_replace(
|
|
array('é', 'è', '-'),
|
|
array('e', 'e', ' '),
|
|
$nomVille
|
|
);
|
|
return strtoupper($nomVille);
|
|
}
|
|
|
|
$tabVilleMappy = array(
|
|
'Bordeaux',
|
|
'Caen' ,
|
|
'Cannes',
|
|
'Grenoble',
|
|
'La Baule',
|
|
'Lille',
|
|
'Lyon',
|
|
'Marseille',
|
|
'Montpellier',
|
|
'Nancy',
|
|
'Nantes',
|
|
'Nice',
|
|
'Rennes',
|
|
'Strasbourg',
|
|
'Toulouse',
|
|
'Asnières-sur-Seine',
|
|
'Boulogne-Billancourt',
|
|
'Courbevoie',
|
|
'Issy-les-Moulineaux',
|
|
'Levallois-Perret',
|
|
'Montrouge',
|
|
'Nanterre',
|
|
'Neuilly-sur-Seine',
|
|
'Rueil-Malmaison',
|
|
'Sèvres',
|
|
'Versailles',
|
|
'Paris',
|
|
);
|
|
|
|
$tabVilleMappy = array_map('formatVille', $tabVilleMappy);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|