config=$config; } function getElement($uid){ // Num nomenclatural : recherche nt $DB=$this->connectDB($this->config); $query = "SELECT DISTINCT b.esn_id_taxon FROM eflore_nom, eflore_nom_rang," . " eflore_selection_nom a, eflore_selection_nom b". " WHERE a.esn_id_nom= ".$uid[0]. " AND a.esn_id_version_projet_taxon = 25 ". " AND a.esn_id_taxon=b.esn_id_taxon ". " AND b.esn_ce_statut=3 ". " AND a.esn_id_version_projet_taxon=b.esn_id_version_projet_taxon" . " AND en_ce_rang = enrg_id_rang" . " AND en_id_nom = b.esn_id_nom" . " AND a.esn_id_version_projet_taxon=en_id_version_projet_nom "; $res =& $DB->query($query); if (DB::isError($res)) { die($res->getMessage()); } while ($row =& $res->fetchrow(DB_FETCHMODE_ASSOC)) { $nt=$row['esn_id_taxon']; } // si le taxon cherché n'existe pas if(!$nt) { $output = json_encode(array('')); print($output); exit(); } $file = EF_URL_CARTO."france_BDNFF_4.02_nt".$nt.".png"; $file_headers = @get_headers($file); if($file_headers[0] == 'HTTP/1.1 404 Not Found') { } else { $service=EF_URL_CHORO.$uid[0].'/chorologie'; @get_headers($service); } $output = json_encode(array($file)); print($output); } } /* +--Fin du code ---------------------------------------------------------------------------------------+ * $Log$ * Revision 1.1 2008-01-30 08:57:28 ddelon * fin mise en place mygwt * * Revision 1.1 2007-06-06 13:31:16 ddelon * v0.09 * * * * */ ?>