Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1527 Rev 1571
Line 71... Line 71...
71
            
71
            
72
            $numero_page = isset($criteres['numero_page']) ? $criteres['numero_page'] : 0;
72
            $numero_page = isset($criteres['numero_page']) ? $criteres['numero_page'] : 0;
Line 73... Line 73...
73
            $limite = isset($criteres['limite']) ? $criteres['limite'] : 0;
73
            $limite = isset($criteres['limite']) ? $criteres['limite'] : 0;
-
 
74
 
-
 
75
			$observations = $chercheur_observations->rechercherObservations($uid[0], $criteres, $numero_page, $limite);
Line 74... Line 76...
74
 
76
			$ids_obs = array();
75
			$observations = $chercheur_observations->rechercherObservations($uid[0], $criteres, $numero_page, $limite);
77
			$indices_lignes_obs = array();
Line 76... Line 78...
76
 
78
			
-
 
79
			$i=1;
-
 
80
			foreach ($observations as &$obs) {
Line 77... Line 81...
77
			$i=1;
81
 
78
			foreach ($observations as $obs) {
82
				$obs = $this->denullifierTableauValeurCel(&$obs);
79
 
83
				$ids_obs[] = $obs['id_observation'];
80
				$obs = $this->denullifierTableauValeurCel(&$obs);
84
				$indices_lignes_obs[$obs['id_observation']] = $i;
Line 106... Line 110...
106
                $worksheet->write($i,17,$obs['ordre']);
110
                $worksheet->write($i,17,$obs['ordre']);
107
                $worksheet->write($i,18,$obs['id_observation']);
111
                $worksheet->write($i,18,$obs['id_observation']);
108
                $i++;
112
                $i++;
109
    	    }
113
    	    }
Line -... Line 114...
-
 
114
    	    
-
 
115
    	    $indice_dernier_champ_supp = 19;
-
 
116
    	    $indices_champs_supp = array();
-
 
117
    	    $gestion_champs_etendus = new GestionChampsEtendus($this->config, 'obs');
-
 
118
    	    $champs_supp_par_obs = $gestion_champs_etendus->consulterParLots($ids_obs);
-
 
119
    	    
-
 
120
    	    foreach($champs_supp_par_obs as $id_obs => &$champs_supp) {
110
 
121
	    	    foreach($champs_supp as  &$champ_etendu) {
-
 
122
	    	    	$cle = $champ_etendu->cle;
-
 
123
	    	    	$label = $champ_etendu->label;
-
 
124
	    	    	$valeur = $champ_etendu->valeur;
-
 
125
	    	    	if(!isset($indices_champs_supp[$cle])) {
-
 
126
	    	    		$indices_champs_supp[$cle] = $indice_dernier_champ_supp;
-
 
127
	    	    		$worksheet->write(0, $indice_dernier_champ_supp, utf8_decode($label));
-
 
128
	    	    		$indice_dernier_champ_supp++;
-
 
129
	    	    	}
-
 
130
	    	    	$num_ligne_obs = $indices_lignes_obs[$id_obs];
-
 
131
	    	    	$worksheet->write($num_ligne_obs,$indices_champs_supp[$cle],utf8_decode($valeur));
-
 
132
	    	    }
Line -... Line 133...
-
 
133
    	    }
111
			$workbook->close();
134
    	    
112
 
135
			$workbook->close();
113
			exit();
136
			exit();
114
	}
137
	}
115
}
138
}