Subversion Repositories Applications.annuaire

Rev

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

Rev 247 Rev 294
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
class StatistiqueControleur extends AppControleur {
14
class StatistiqueControleur extends AppControleur {
Line 15... Line -...
15
 
-
 
16
	private $statistiques = null;
-
 
17
 
-
 
18
	private $champ_pays = '12';
-
 
19
	private $champ_rapport_activite_bota = '102';
15
 
Line 20... Line 16...
20
	private $champ_experience_bota = '4';
16
	private $statistiques = null;
21
 
17
 
22
	public function StatistiqueControleur() {
18
	public function StatistiqueControleur() {
Line 39... Line 35...
39
		 							'Moyen Orient (%1.2f%%)' => 'pays_moyen_orient');
35
		 							'Moyen Orient (%1.2f%%)' => 'pays_moyen_orient');
Line 40... Line 36...
40
		
36
				
41
	    // pour chacun des continents, on fait la somme des membres de sa zone
37
	    // pour chacun des continents, on fait la somme des membres de sa zone
42
    	foreach($continents as $id_continent => $continent) {
38
    	foreach($continents as $id_continent => $continent) {
-
 
39
    		$zones_continent_ids = $cartographe->chargerInformationsPaysDuContinentsCsv($continent);
43
    		$zones_continent_ids = $cartographe->chargerInformationsPaysDuContinentsCsv($continent);
40
    		$zones_continent_ids = array_map(array($this,'miniQuote'), array_keys($zones_continent_ids));    		
44
    		$nb_inscrits[$id_continent] = array_sum($annuaire_controleur->chargerNombreAnnuaireListeInscritsParPays($id_annuaire, array_keys($zones_continent_ids)));
41
    		$nb_inscrits[$id_continent] = array_sum($annuaire_controleur->chargerNombreAnnuaireListeInscritsParPays($id_annuaire, $zones_continent_ids));
Line 45... Line 42...
45
    	}
42
    	}
Line 46... Line 43...
46
    	
43
    	    	
Line 55... Line 52...
55
		$annuaire_controleur = new AnnuaireControleur();
52
		$annuaire_controleur = new AnnuaireControleur();
56
		$cartographe = new CartoControleur();
53
		$cartographe = new CartoControleur();
Line 57... Line 54...
57
		
54
		
Line 58... Line 55...
58
		$ids_zones_europe = $cartographe->chargerInformationsPaysDuContinentsCsv('pays_europe');
55
		$ids_zones_europe = $cartographe->chargerInformationsPaysDuContinentsCsv('pays_europe');
-
 
56
				
59
		
57
		$codes_zones_europe = array_map(array($this,'miniQuote'), array_keys($ids_zones_europe));    
60
		//Debug::printr()
58
 
Line 61... Line 59...
61
		$titre_zone = $this->convertirPourLegende($zone[2]);
59
		$titre_zone = $this->convertirPourLegende($zone[2]);
Line 62... Line 60...
62
    	$nb_inscrits_par_code = $annuaire_controleur->chargerNombreAnnuaireListeInscritsParPays($id_annuaire, array_keys($ids_zones_europe));
60
    	$nb_inscrits_par_code = $annuaire_controleur->chargerNombreAnnuaireListeInscritsParPays($id_annuaire, $codes_zones_europe);
Line 207... Line 205...
207
		$valeurs_a_stat_legende = array();
205
		$valeurs_a_stat_legende = array();
Line 208... Line 206...
208
			        
206
			        
Line 209... Line 207...
209
		$tab_mois = array("Jan","Fev","Mar","Avr","Mai","Juin","Juil","Aout","Sep","Oct","Nov","Dec");
207
		$tab_mois = array("Jan","Fev","Mar","Avr","Mai","Juin","Juil","Aout","Sep","Oct","Nov","Dec");
210
		
208
		
211
		$annee_debut = 2010;
209
		$annee_debut = 2010;
212
		$mois = 7;
210
		$mois = 1;
213
		$annee = 2010;
211
		$annee = 2010;
Line 214... Line 212...
214
		$tps_debut = mktime(0,0,0,$mois,1,$annee);
212
		$tps_debut = mktime(0,0,0,$mois,1,$annee);
Line 310... Line 308...
310
				'C', 'Y', 'N', 
308
				'C', 'Y', 'N', 
311
			),$texte);
309
			),$texte);
Line 312... Line 310...
312
		
310
		
313
		return $texte;	
311
		return $texte;	
-
 
312
	}
-
 
313
	
-
 
314
	private function miniQuote($chaine) {
-
 
315
		return "'".$chaine."'";
314
	}
316
	}
315
}
317
}