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.2 2005-06-24 09:46:43 jpm Exp $ |
// CVS : $Id: eflore_fiche.inc.php,v 1.3 2005-06-30 15:24:26 jpm Exp $ |
/** |
* Affichage des fiches d'eFlore. |
* |
33,7 → 33,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.2 $ $Date: 2005-06-24 09:46:43 $ |
*@version $Revision: 1.3 $ $Date: 2005-06-30 15:24:26 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
56,10 → 56,14 |
} |
|
//Analyse du squelette |
require_once 'HTML/Template/IT.php'; |
$squelette = new HTML_Template_IT(); |
require_once 'HTML/Template/ITX.php'; |
$squelette = new HTML_Template_ITX(); |
$squelette->setTemplate($contenu, FALSE, FALSE); |
|
// Gestion des niveaux taxonomiques supérieurs |
$squelette->setCallbackFunction('selectionnerEfloreRef', 'selectionnerEfloreRef'); |
$squelette->performCallback(); |
|
// Indique l'url pour obtenir fiche d'un nom |
$squelette->setCurrentBlock('corps'); |
|
70,6 → 74,9 |
$squelette->setVariable('FormUrlProjetChangement', $GLOBALS['_EFLORE_']['url']->getURL()); |
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NVP, ''); |
$squelette->setVariable('LienUrlProjetChangement', $GLOBALS['_EFLORE_']['url']->getURL()); |
// Référentiel sélectionné par défaut |
$squelette->setCallbackFunction('NiveauTaxo', 'afficherNiveauTaxoSuperieur'); |
$squelette->performCallback(); |
$squelette->parseCurrentBlock('corps'); |
|
// Récupère le bloc "corps" |
76,9 → 83,47 |
$sortie .= $squelette->get('corps'); |
} |
|
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE des FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
|
function afficherNiveauTaxoSuperieur($arguments) { |
$tab_nom_sup = array(); |
$retour = ''; |
$nt = $arguments[0]; |
$nvp = $arguments[1]; |
$nr = 1000; |
while ($nr != 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); |
$aso_taxon['nr'] = $info[1]; |
$retour .= 'ici'.$aso_taxon['nr']; |
$nr = $info[1]; |
preg_match('/<etr_id_t2>(\d+)</etr_id_t2>/', $contenu, $info); |
$aso_taxon['nt'] = $info[1]; |
$nt = $info[1]; |
preg_match('/<etr_id_vpt2>(\d+)</etr_id_vpt2>/', $contenu, $info); |
$aso_taxon['nvp'] = $info[1]; |
$nvp = $info[1]; |
preg_match('/<en_id_n>(\d+)</en_id_n>/', $contenu, $info); |
$aso_taxon['nn'] = $info[1]; |
array_push($tab_nom_sup, $aso_taxon); |
} |
$retour .= '<ul>'; |
$j = 0; |
for($i = count($tab_nom_sup); $i > 0; $i--) { |
$retour .= '<li>'.str_repeat(' ', $j++).$tab_nom_sup[$i]['nn'].'</li>'; |
} |
$retour .= '</ul>'; |
return $retour; |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/06/24 09:46:43 jpm |
* Test pour mathilde |
* |
* Revision 1.1 2005/01/28 19:48:11 jpm |
* Ajout d'une fiche de synthèse. |
* |