21,7 → 21,7 |
// | along with Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: eflore_fiche.inc.php,v 1.3 2005-06-30 15:24:26 jpm Exp $ |
// CVS : $Id: eflore_fiche.inc.php,v 1.4 2005-07-01 19:04:12 jp_milcent Exp $ |
/** |
* Affichage des fiches d'eFlore. |
* |
33,7 → 33,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ $Date: 2005-06-30 15:24:26 $ |
*@version $Revision: 1.4 $ $Date: 2005-07-01 19:04:12 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
92,35 → 92,60 |
$retour = ''; |
$nt = $arguments[0]; |
$nvp = $arguments[1]; |
$nr = 1000; |
while ($nr != 0) { |
while ($nt != 0) { |
$aso_taxon = array(); |
$contenu = file_get_contents(sprintf(EFLORE_URL_TAXON_SUP, rawurlencode($nt), rawurlencode($nvp))); |
preg_match('/<en_ce_r>(\d+)</en_ce_r>/', $contenu, $info); |
$contenu = file_get_contents(sprintf(EFLORE_URL_INFO_TAXON_SUP, rawurlencode($nt), rawurlencode($nvp))); |
preg_match("/<en_ce_r>(\d+)<\/en_ce_r>/", $contenu, $info); |
if (isset($info[1])) { |
$aso_taxon['nr'] = $info[1]; |
$retour .= 'ici'.$aso_taxon['nr']; |
$nr = $info[1]; |
preg_match('/<etr_id_t2>(\d+)</etr_id_t2>/', $contenu, $info); |
} |
preg_match('/<etr_id_t2>(\d+)<\/etr_id_t2>/', $contenu, $info); |
if (isset($info[1])) { |
$aso_taxon['nt'] = $info[1]; |
$nt = $info[1]; |
preg_match('/<etr_id_vpt2>(\d+)</etr_id_vpt2>/', $contenu, $info); |
} else { |
$nt = 0; |
} |
preg_match('/<etr_id_vpt2>(\d+)<\/etr_id_vpt2>/', $contenu, $info); |
if (isset($info[1])) { |
$aso_taxon['nvp'] = $info[1]; |
$nvp = $info[1]; |
preg_match('/<en_id_n>(\d+)</en_id_n>/', $contenu, $info); |
} |
preg_match('/<en_id_n>(\d+)<\/en_id_n>/', $contenu, $info); |
if (isset($info[1])) { |
$aso_taxon['nn'] = $info[1]; |
} |
if ($nt != 0) { |
array_push($tab_nom_sup, $aso_taxon); |
} |
$retour .= '<ul>'; |
} |
// Nous avons des taxons supérieurs |
if (count($tab_nom_sup) > 0) { |
$retour .= '<ul>'."\n"; |
$j = 0; |
for($i = count($tab_nom_sup); $i > 0; $i--) { |
$retour .= '<li>'.str_repeat(' ', $j++).$tab_nom_sup[$i]['nn'].'</li>'; |
for($i = (count($tab_nom_sup)-1); $i >= 0; $i--) { |
$contenu = file_get_contents(sprintf(EFLORE_URL_INFO_NOM_LATIN, rawurlencode($tab_nom_sup[$i]['nn']))); |
preg_match("/<eni_in>(.+?)<\/eni_in>/", $contenu, $info); |
if (isset($info[1])) { |
$retour .= '<li>'.str_repeat(' ', ($j++ * 3)).$info[1].'</li>'; |
} else { |
$retour .= '<li>'.str_repeat(' ', ($j++ * 3)).'???'.'</li>'; |
} |
$retour .= '</ul>'; |
|
} |
$retour .= '</ul>'."\n"; |
} else { |
$retour .= 'Aucun taxon supérieur.'; |
} |
return $retour; |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/06/30 15:24:26 jpm |
* Début des modifications pour ajout de l'arborescence de la classif. |
* |
* Revision 1.2 2005/06/24 09:46:43 jpm |
* Test pour mathilde |
* |