Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 126 → Rev 127

/trunk/eflore_recherche_nomenclature.inc.php
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_recherche_nomenclature.inc.php,v 1.2 2005-01-03 19:44:40 jpm Exp $
// CVS : $Id: eflore_recherche_nomenclature.inc.php,v 1.3 2005-01-28 19:47:55 jpm Exp $
/**
* Affichage du moteur de recherche nomenclatural et de ses résultats.
*
33,7 → 33,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2005-01-03 19:44:40 $
*@version $Revision: 1.3 $ $Date: 2005-01-28 19:47:55 $
// +------------------------------------------------------------------------------------------------------+
*/
 
41,6 → 41,13
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
function remplacerUrlFicheNom($arguments) {
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_FICHE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, $arguments[0]);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NVP, $arguments[1]);
return $GLOBALS['_EFLORE_']['url']->getURL();
}
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
60,7 → 67,7
$squelette->setElementTemplate( '<li>'."\n".
'{label}'."\n".
'{element}'."\n".
'<!-- BEGIN required --><span class="symbole_obligatoire">'.MORE_LG_FORM_SYMBOLE_OBLIGATOIRE.'</span><!-- END required -->'."\n".
'<!-- BEGIN required --><span class="symbole_obligatoire">'.EFLORE_LG_FORM_SYMBOLE_OBLIGATOIRE.'</span><!-- END required -->'."\n".
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n".
'</li>'."\n");
//$squelette->setRequiredNoteTemplate("\n".'<p><span class="symbole_obligatoire">'.MORE_LG_FORM_SYMBOLE_OBLIGATOIRE.'</span> {requiredNote}</p>'."\n");
77,7 → 84,7
$form->addElement('text', $id, $label, $aso_attributs);
 
$liste_type_nom_debut = '<ul>'."\n";
$form->addElement('html', $$liste_type_nom_debut);
$form->addElement('html', $liste_type_nom_debut);
 
$id = 'eflore_type_nom';
$valeur = 'nom_scientifique';
102,9 → 109,9
}
 
$liste_type_nom_fin = '</ul>'."\n";
$form->addElement('html', $$liste_type_nom_fin);
$form->addElement('html', $liste_type_nom_fin);
 
$id = 'eflore_valider';
$id = 'eflore_valider_nom';
$aso_attributs = array('id'=> $id, 'class' => 'champ', 'tabindex' => $tab_index++);
$form->addElement('submit', $id, EFLORE_LG_RECH_NOM_FORM_VALIDER, $aso_attributs);
 
112,23 → 119,25
$form->addElement('html', $partie_entete_fin);
 
// Instanciation avec les valeur par défaut
$form->setDefaults($_SESSION['_MOTEUR_RECHERCHE_']['rechercher']);
$form->setDefaults($_SESSION['_EFLORE_']['rechercher']);
 
// Transformation en XHTML du formulaire
$sortie .= $form->toHTML()."\n";
$sortie .= '</ul>';
$sortie .= '</ul>'."\n";
 
// --------------------------------------------------------------------------------------------------------
// Lancement de la recherche
if (isset($_REQUEST['eflore_nom']) && $_REQUEST['eflore_nom'] != '') {
if (isset($_REQUEST['eflore_nom']) && $_REQUEST['eflore_nom'] != '' && !eregi("^%{1,}$", $_REQUEST['eflore_nom']) ) {
// Formatage de la chaine à rechercher
$_REQUEST['eflore_nom'] = '%'.str_replace(' ', '%', $_REQUEST['eflore_nom']).'%';
if ($_REQUEST['eflore_type_nom'] == 'nom_scientifique') {
// Recherche sur les noms scientifiques
$contenu = file_get_contents(sprintf(EFLORE_URL_LISTE_NOM_LATIN, $_REQUEST['eflore_nom']));
$contenu = file_get_contents(sprintf(EFLORE_URL_LISTE_NOM_LATIN, rawurlencode($_REQUEST['eflore_nom'])));
//Analyse du squelette
require_once 'HTML/Template/IT.php';
$squelette = new HTML_Template_IT();
$squelette->setTemplate($contenu, true, true);
$squelette->setTemplate($contenu, FALSE, FALSE);
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
140,10 → 149,25
$squelette->parseCurrentBlock('corps');
// Récupère le bloc "corps"
$sortie .= $squelette->get();
$sortie .= $squelette->get('corps');
} else if ($_REQUEST['eflore_type_nom'] == 'nom_vernaculaire') {
// Recherche sur les noms vernaculaires
$contenu = file_get_contents(sprintf(EFLORE_URL_LISTE_NOM_VERNA, rawurlencode($_REQUEST['eflore_nom'])));
//Analyse du squelette
require_once 'HTML/Template/ITX.php';
$squelette = new HTML_Template_ITX();
$squelette->setTemplate($contenu, FALSE, FALSE);
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
$squelette->setCallbackFunction('UrlFicheNom', 'remplacerUrlFicheNom');
$squelette->performCallback();
$squelette->parseCurrentBlock('corps');
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
}
}
 
150,6 → 174,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/01/03 19:44:40 jpm
* Ajout de la gestion de l'action "fiche".
*
* Revision 1.1 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
/trunk/eflore.php
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.php,v 1.6 2005-01-03 19:44:40 jpm Exp $
// CVS : $Id: eflore.php,v 1.7 2005-01-28 19:47:55 jpm Exp $
/**
* Application de consultation des données d'eFlore.
*
38,7 → 38,7
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.6 $ $Date: 2005-01-03 19:44:40 $
*@version $Revision: 1.7 $ $Date: 2005-01-28 19:47:55 $
// +------------------------------------------------------------------------------------------------------+
*/
 
60,6 → 60,11
// Ajout d'une feuille de style propre à eFlore.
GEN_stockerStyleExterne('eflore', EFLORE_CHEMIN_STYLE.'eflore.css');
 
// Attribution à la variable de session des recherches effectuées
if (isset($_POST['eflore_form_nomenclature']) || isset($_POST['eflore_form_taxonomie'])) {
$_SESSION['_EFLORE_']['rechercher'] = $_POST;
}
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
107,7 → 112,7
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
break;
case EFLORE_LG_URL_ACTION_RECH_TAX :
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomique.inc.php';
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomie.inc.php';
break;
case EFLORE_LG_URL_ACTION_FICHE :
include_once EFLORE_CHEMIN_APPLI.'eflore_fiche.inc.php';
118,6 → 123,9
} else {
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche.inc.php';
}
// +--------------------------------------------------------------------------------------------------+
// Gestion des statistiques
// A faire...
// +--------------------------------------------------------------------------------------------------+
// Gestion des onglets à transférer dans le fichier fiche!
157,6 → 165,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.6 2005/01/03 19:44:40 jpm
* Ajout de la gestion de l'action "fiche".
*
* Revision 1.5 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
/trunk/eflore_recherche.inc.php
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_recherche.inc.php,v 1.2 2005-01-03 19:44:40 jpm Exp $
// CVS : $Id: eflore_recherche.inc.php,v 1.3 2005-01-28 19:47:55 jpm Exp $
/**
* Affichage des moteurs de recherches d'eFlore.
*
34,7 → 34,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $ $Date: 2005-01-03 19:44:40 $
*@version $Revision: 1.3 $ $Date: 2005-01-28 19:47:55 $
// +------------------------------------------------------------------------------------------------------+
*/
 
49,36 → 49,47
// +------------------------------------------------------------------------------------------------------+
 
// Recherche nomenclaturale ou taxonomique
$sortie .= '<h1>'.EFLORE_LG_RECH_TITRE.'</h1>';
$sortie .= '<h1>'.EFLORE_LG_RECH_TITRE.'</h1>'."\n";
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_nomenclature.inc.php';
include_once EFLORE_CHEMIN_APPLI.'eflore_recherche_taxonomie.inc.php';
 
$sortie .= '<div id="eflore_exemples">'."\n";
$sortie .= '<h2>'.EFLORE_LG_EXPLE_TITRE.'</h2>'."\n";
 
$sortie .= '<div id="eflore_exemple_nomenc">'."\n";
$sortie .= '<h3>'.EFLORE_LG_EXPLE_TITRE_NOMENC.'</h3>'."\n";
$sortie .= '<p>'.EFLORE_LG_EXPLE_NOMENC.'</p>'."\n";
$sortie .= '<p>'.EFLORE_LG_EXPLE_ASTUCE.'</p>'."\n";
$sortie .= '<ul>'."\n";
$sortie .= ' <li>'.sprintf(EFLORE_LG_EXPLE_ASTUCE_DEMO_01, '<tt>', '</tt>', '<tt>', '</tt>').'</li>';
$sortie .= ' <li>'.sprintf(EFLORE_LG_EXPLE_ASTUCE_DEMO_02, '<tt>', '</tt>').'</li>';
$sortie .= '<ul id="eflore_liste_astuces">'."\n";
$sortie .= ' <li>'.sprintf(EFLORE_LG_EXPLE_ASTUCE_DEMO_01, '<tt>', '</tt>', '<tt>', '</tt>').'</li>'."\n";
$sortie .= ' <li>'.sprintf(EFLORE_LG_EXPLE_ASTUCE_DEMO_02, '<tt>', '</tt>').'</li>'."\n";
$sortie .= '</ul>'."\n";
$sortie .= '<p>'.EFLORE_LG_EXPLE_LANGUE.'</p>'."\n";
$sortie .= '<ul>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_FR.'</li>';
$sortie .= ' <li>'.EFLORE_LG_EXPLE_ES.'</li>';
$sortie .= ' <li>'.EFLORE_LG_EXPLE_CA.'</li>';
$sortie .= ' <li>'.EFLORE_LG_EXPLE_DE.'</li>';
$sortie .= ' <li>'.EFLORE_LG_EXPLE_EN.'</li>';
$sortie .= ' <li>'.EFLORE_LG_EXPLE_NL.'</li>';
$sortie .= ' <li>'.EFLORE_LG_EXPLE_IT.'</li>';
$sortie .= ' <li>'.EFLORE_LG_EXPLE_ETC.'</li>';
$sortie .= '<ul id="eflore_liste_langues">'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_FR.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_ES.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_CA.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_DE.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_EN.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_NL.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_IT.'</li>'."\n";
$sortie .= ' <li>'.EFLORE_LG_EXPLE_ETC.'</li>'."\n";
$sortie .= '</ul>'."\n";
$sortie .= '</div>'."\n";
 
$sortie .= '<div id="eflore_exemple_taxo">'."\n";
$sortie .= '<h3>'.EFLORE_LG_EXPLE_TITRE_TAXO.'</h3>'."\n";
$sortie .= '<p>'.EFLORE_LG_EXPLE_TAXO.'</p>'."\n";
$sortie .= '</div>'."\n";
 
$sortie .= '</div>'."\n";
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/01/03 19:44:40 jpm
* Ajout de la gestion de l'action "fiche".
*
* Revision 1.1 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
/trunk/eflore_recherche_taxonomie.inc.php
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_recherche_taxonomie.inc.php,v 1.1 2004-12-23 20:05:17 jpm Exp $
// CVS : $Id: eflore_recherche_taxonomie.inc.php,v 1.2 2005-01-28 19:47:55 jpm Exp $
/**
* Affichage du moteur de recherche taxonomique et de ses résultats.
*
34,7 → 34,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $ $Date: 2004-12-23 20:05:17 $
*@version $Revision: 1.2 $ $Date: 2005-01-28 19:47:55 $
// +------------------------------------------------------------------------------------------------------+
*/
 
46,52 → 46,71
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/*
<h2> Rechercher par projet </h2>
// Recherche sur les noms scientifiques
if (isset($_REQUEST['eflore_projet']) AND isset($_REQUEST['eflore_rang']) AND isset($_REQUEST['eflore_ordre'])) {
if (!isset($_REQUEST['eflore_lettre'])) {
$_REQUEST['eflore_lettre'] = 'A';
}
$url = sprintf(EFLORE_URL_FORM_TAXON_ALPHABET, rawurlencode($_REQUEST['eflore_projet']), rawurlencode($_REQUEST['eflore_rang']), rawurlencode($_REQUEST['eflore_ordre']), rawurlencode($_REQUEST['eflore_lettre']));
} else {
$url = EFLORE_URL_FORM_TAXON;
}
$contenu = file_get_contents($url);
 
<form method="post" action="/" name="eflore_form_taxonomie">
<fieldset>
<legend>Rechercher par projet</legend>
<ul>
<li>
<select name="Projets">
<option>BDNFF</option>
<option>Flore de la R&eacute;union</option>
<option>Flore de Guadeloupe et Martinique</option>
<option>Curcubitaceae du monde</option>
</select>
<select name="Rang d&eacute;part">
<option>R&eacute;gne</option>
<option>Famille</option>
<option>Genre</option>
</select>
</li>
<li>
<p>
<a href="/a">A</a> |
<a href="/b">B</a> |
<a href="/c">C</a> |
<a href="/d">D</a> |
<a href="/e">E</a> |
<a href="/f">F</a> |
<a href="g">G</a> |
<a href="/h">H</a> |
<a href="/i">I</a> |
<a href="/j">J</a> |
K |
L |
<a href="/m">M</a> |
N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Tous
</p>
</li>
</ul>
</fieldset>
</form>
*/
//Analyse du squelette
require_once 'HTML/Template/IT.php';
$squelette = new HTML_Template_IT();
$squelette->setTemplate($contenu, FALSE, FALSE);
 
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
// Ajout du paramêtre action à l'url courante.
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_RECH_TAX);
$squelette->setVariable('UrlProjetTaxon', $GLOBALS['_EFLORE_']['url']->getURL());
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_ACTION);
$squelette->parseCurrentBlock('corps');
 
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
 
// --------------------------------------------------------------------------------------------------------
// Lancement de la recherche
if (isset($_REQUEST['eflore_lettre'])) {
// Recherche sur les noms scientifiques
$url = sprintf(EFLORE_URL_LISTE_TAXON, rawurlencode($_REQUEST['eflore_projet']), rawurlencode($_REQUEST['eflore_rang']), rawurlencode($_REQUEST['eflore_ordre']), rawurlencode($_REQUEST['eflore_lettre']));
$contenu = file_get_contents($url);
//Analyse du squelette
require_once 'HTML/Template/IT.php';
$squelette = new HTML_Template_IT();
$squelette->setTemplate($contenu, FALSE, FALSE);
// Indique l'url pour obtenir fiche d'un nom
$squelette->setCurrentBlock('corps');
// Ajout du paramêtre action à l'url courante.
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ACTION, EFLORE_LG_URL_ACTION_FICHE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_ONGLET, EFLORE_LG_URL_ONGLET_SYNTHESE);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NN, '');
$squelette->setVariable('UrlFicheNom', $GLOBALS['_EFLORE_']['url']->getURL());
$GLOBALS['_EFLORE_']['url']->removeQueryString(EFLORE_LG_URL_NN);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_NVP, $_REQUEST['eflore_projet']);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_RG, $_REQUEST['eflore_rang']);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_OD, $_REQUEST['eflore_ordre']);
$GLOBALS['_EFLORE_']['url']->addQueryString(EFLORE_LG_URL_LE, '');
$squelette->setVariable('UrlRechercheTaxonAlphabet', $GLOBALS['_EFLORE_']['url']->getURL());
$squelette->parseCurrentBlock('corps');
// Récupère le bloc "corps"
$sortie .= $squelette->get('corps');
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2004/12/23 20:05:17 jpm
* Début prise en maine eflore-consultation.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>