Subversion Repositories eFlore/Applications.cel

Rev

Rev 1376 | Rev 1379 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1376 Rev 1378
Line 53... Line 53...
53
	private $parametres_autorises = array(
53
	private $parametres_autorises = array(
54
		'utilisateur' => 'courriel_utilisateur',
54
		'utilisateur' => 'courriel_utilisateur',
55
		'commune' => 'zone_geo',
55
		'commune' => 'zone_geo',
56
		'dept' => 'departement',
56
		'dept' => 'departement',
57
		'projet' => 'mots_cles',
57
		'projet' => 'mots_cles',
58
		'num_tax' => 'nt'
58
		'num_tax' => 'nt',
-
 
59
		'date_debut' => 'date_debut',
-
 
60
		'date_fin' => 'date_fin'
59
	);
61
	);
Line 60... Line 62...
60
		
62
		
61
	/**
63
	/**
62
	 * Méthode appelée avec une requête de type GET.
64
	 * Méthode appelée avec une requête de type GET.
Line 67... Line 69...
67
		// Seulement les observation publiques
69
		// Seulement les observation publiques
68
		$criteres['transmission'] = 1;
70
		$criteres['transmission'] = 1;
69
		$chercheur_observations = new RechercheObservation($this->config);
71
		$chercheur_observations = new RechercheObservation($this->config);
Line 70... Line 72...
70
		
72
		
71
		$numero_page = isset($criteres['debut']) ? $criteres['debut'] : 1;
73
		$numero_page = isset($criteres['debut']) ? $criteres['debut'] : 1;
Line 72... Line 74...
72
		$limite = isset($criteres['limite']) ? $criteres['limite'] : 50;
74
		$limite = isset($criteres['limite']) ? $criteres['limite'] : 10000;
73
		
75
		
Line 74... Line 76...
74
		unset($criteres['limite']);
76
		unset($criteres['limite']);
Line 100... Line 102...
100
	{
102
	{
101
		$chemin_temp = "php://temp";
103
		$chemin_temp = "php://temp";
102
		$outstream = fopen($chemin_temp, 'r+');
104
		$outstream = fopen($chemin_temp, 'r+');
103
		$intitule_champs = array();
105
		$intitule_champs = array();
104
		foreach($data as $ligne) {
106
		foreach($data as $ligne) {
-
 
107
			//echo '<pre>'.print_r($ligne,true).'</pre>';
105
			$ligne = array_diff_key($ligne, $this->champs_a_exclure);
108
			$ligne = array_diff_key($ligne, $this->champs_a_exclure);
-
 
109
			//echo '<pre>'.print_r($ligne,true).'</pre>';
106
			if(empty($intitule_champs)) {
110
			if(empty($intitule_champs)) {
107
				$intitule_champs = $this->creerEntetesChamps($ligne);
111
				$intitule_champs = $this->creerEntetesChamps($ligne);
108
				fputcsv($outstream, $intitule_champs, ',', '"');			
112
				fputcsv($outstream, $intitule_champs, ',', '"');			
109
			}
113
			}
110
			fputcsv($outstream, $ligne, ',', '"');
114
			fputcsv($outstream, $ligne, ',', '"');