Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1379 Rev 1387
Line 55... Line 55...
55
		'commune' => 'zone_geo',
55
		'commune' => 'zone_geo',
56
		'dept' => 'departement',
56
		'dept' => 'departement',
57
		'projet' => 'mots_cles',
57
		'projet' => 'mots_cles',
58
		'num_taxon' => 'nt',
58
		'num_taxon' => 'nt',
59
		'date_debut' => 'date_debut',
59
		'date_debut' => 'date_debut',
60
		'date_fin' => 'date_fin'
60
		'date_fin' => 'date_fin',
-
 
61
		'taxon' => 'taxon'
61
	);
62
	);
Line 62... Line 63...
62
		
63
		
63
	/**
64
	/**
64
	 * Méthode appelée avec une requête de type GET.
65
	 * Méthode appelée avec une requête de type GET.
Line 102... Line 103...
102
	{
103
	{
103
		$chemin_temp = "php://temp";
104
		$chemin_temp = "php://temp";
104
		$outstream = fopen($chemin_temp, 'r+');
105
		$outstream = fopen($chemin_temp, 'r+');
105
		$intitule_champs = array();
106
		$intitule_champs = array();
106
		foreach($data as $ligne) {
107
		foreach($data as $ligne) {
107
			//echo '<pre>'.print_r($ligne,true).'</pre>';
-
 
108
			$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>';
-
 
110
			if(empty($intitule_champs)) {
109
			if(empty($intitule_champs)) {
111
				$intitule_champs = $this->creerEntetesChamps($ligne);
110
				$intitule_champs = $this->creerEntetesChamps($ligne);
112
				fputcsv($outstream, $intitule_champs, ',', '"');			
111
				fputcsv($outstream, $intitule_champs, ',', '"');			
113
			}
112
			}
114
			fputcsv($outstream, $ligne, ',', '"');
113
			fputcsv($outstream, $ligne, ',', '"');