Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 104 | Rev 193 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 104 Rev 171
Line 55... Line 55...
55
    	
55
    	
Line 56... Line 56...
56
    	$commune = $_GET['commune'];
56
    	$commune = $_GET['commune'];
Line 57... Line 57...
57
    	
57
    	
Line 58... Line 58...
58
    	$commune = $this->remplacerNomCommunePourRecherche($commune);
58
    	$commune = $this->remplacerNomCommunePourRecherche($commune);
Line 59... Line 59...
59
    	
59
    	
Line 102... Line 102...
102
		
102
		
Line 103... Line 103...
103
		$infos_formatees = array();
103
		$infos_formatees = array();
Line -... Line 104...
-
 
104
		
-
 
105
		foreach($infos_communes as $commune) {
-
 
106
			
-
 
107
			$cp = $commune['oc_code_insee'];
-
 
108
			$limite = 2;
-
 
109
			if(strlen($cp) == 4) {
-
 
110
				$limite = 1;
-
 
111
			}
-
 
112
			
-
 
113
			$dpt = substr($cp,0,$limite);
-
 
114
			
-
 
115
			if($limite == 1) {
104
		
116
				$dpt = '0'.$dpt;
105
		foreach($infos_communes as $commune) {
117
			}
-
 
118
			
106
			
119
			$infos_formatees[] = array(
107
			$infos_formatees[] = array(
120
    			'commune' => $commune['oc_nom'],
108
    			'commune' => $commune['COMMUNE_NOM'],
121
    			'dpt' => $dpt,
109
    			'dpt' => $commune['COMMUNE_CODEPOSTAL'],
122
			    'code_insee' => $commune['oc_code_insee'],
110
    			'lat' => $commune['COMMUNE_LATITUDE'],
123
    			'lat' => $commune['oc_latitude'],
111
				'lon' => $commune['COMMUNE_LONGITUDE']
124
				'lon' => $commune['oc_longitude']
112
    		);
125
    		);
113
		}
126
		}