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: recherche_nom_vernaculaire_xhtml.php,v 1.3 2005-06-09 18:09:52 jpm Exp $ |
// CVS : $Id: recherche_nom_vernaculaire_xhtml.php,v 1.4 2005-06-30 15:25:07 jpm Exp $ |
/** |
* Vue affichant la liste des noms vernaculaire correspondant à un radical recherché. |
* |
35,7 → 35,7 |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ $Date: 2005-06-09 18:09:52 $ |
*@version $Revision: 1.4 $ $Date: 2005-06-30 15:25:07 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
42,8 → 42,16 |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* Inclusion du fichier permettant de gérer l'encodage des noms vernaculaires*/ |
require_once EFSE_CHEMIN_FONCTION.'eribo_encodage.fonct.php'; |
$GLOBALS['num_nom_verna'] = 1; |
/* Variable stockant le nombre de nom verna actuellement affiché*/ |
$GLOBALS['_NOM_VERNA_']['num'] = 0; |
/* Variable stockant le n° du message à afficher*/ |
$GLOBALS['_NOM_VERNA_']['message'] = 1; |
/* Variable permettant de savoir si on a déjà afficher l'entête du tableau des noms verna*/ |
$GLOBALS['_NOM_VERNA_']['tete'] = true; |
/* Variable permettant de savoir si on a déjà afficher le pied du tableau des noms verna*/ |
$GLOBALS['_NOM_VERNA_']['pied'] = true; |
|
// +------------------------------------------------------------------------------------------------------+ |
// | CLASSE de la VUE | |
59,8 → 67,8 |
|
function serialiser() |
{ |
$retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n"; |
$retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n"; |
/*$retour = '<?xml version="1.0" encoding="iso-8859-15" ?>'."\n";*/ |
$retour = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n"; |
$retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n"; |
|
$retour .= '<head>'."\n"; |
69,7 → 77,7 |
$retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n"; |
$retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n"; |
$retour .= '<meta http-equiv="Content-language" content="fr" />'."\n"; |
$retour .= '<title>Liste de noms latins</title>'."\n"; |
$retour .= '<title>'.'Liste de noms vernaculaires'.'</title>'."\n"; |
$retour .= '<!-- END entete -->'."\n"; |
$retour .= '</head>'."\n"; |
|
76,18 → 84,15 |
$retour .= '<body>'."\n"; |
$retour .= '<!-- BEGIN corps -->'."\n"; |
$retour .= '<h1>'.'Liste des noms vernaculaires'.'</h1>'."\n"; |
$retour .= '<table id="eflore_table_resultat_nv">'."\n"; |
$retour .= '<caption>'; |
$retour .= 'Liste des noms vernaculaires correspondant au radical "'; |
$retour .= '<h2>'.'Résumé de la recherche :'.'</h2>'."\n"; |
$retour .= '<dl>'."\n"; |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA','afficherRadical'); |
$retour .= '"</caption>'."\n"; |
$retour .= '<thead>'."\n"; |
$retour .= '<tr><th>'.'N°'.'</th><th>'.'Langue'.'</th><th>'.'Pays'.'</th><th>'.'Nom vernaculaire'.'</th><th>'.'Nom latin correspondant'.'</th></tr>'."\n"; |
$retour .= '</thead>'."\n"; |
$retour .= '<tbody>'."\n"; |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>PROJET_VERSION','afficherResumerRecherche'); |
$retour .= '</dl>'."\n"; |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>VERNACULAIRE_RECHERCHE','afficherTableEntete'); |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>VERNACULAIRE_RECHERCHE','afficherNomVerna'); |
$retour .= '</tbody>'."\n"; |
$retour .= '</table>'."\n"; |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS_VERNA>VERNACULAIRE_RECHERCHE','afficherTablePied'); |
$retour .= afficherMessage(); |
$retour .= '<!-- END corps -->'."\n"; |
$retour .= '</body>'."\n"; |
$retour .= '</html>'."\n"; |
102,27 → 107,77 |
// +------------------------------------------------------------------------------------------------------+ |
function afficherRadical($donnees) |
{ |
return $donnees['radical']; |
//$retour = '<pre>'.print_r($donnees, true).'</pre>'; |
$retour = '<dt>'.'Radical : '.'</dt>'."\n"; |
$retour .= '<dd>'.$donnees['radical'].'</dd>'."\n"; |
return $retour; |
} |
|
function afficherResumerRecherche($donnees) |
{ |
//$retour .= '<pre>'.print_r($donnees, true).'</pre>'; |
$retour = ''; |
if (!empty($donnees['epr_intitule_projet'])) { |
$retour .= '<dt>'.'Référentiel : '.'</dt>'."\n"; |
$retour .= '<dd>'.$donnees['epr_intitule_projet'].' - Version : '.$donnees['eprv_code_version'].'</dd>'."\n"; |
} |
return $retour; |
} |
function afficherTableEntete($donnees) |
{ |
$retour = ''; |
if (isset($donnees['ev_id_nom_vernaculaire']) AND $GLOBALS['_NOM_VERNA_']['tete'] == true) { |
$GLOBALS['_NOM_VERNA_']['tete'] = false; |
$retour .= '<table id="eflore_table_resultat_nv">'."\n"; |
$retour .= '<caption>'.'Liste des noms vernaculaires correspondant au radical recherché'.'</caption>'."\n"; |
$retour .= '<thead>'."\n"; |
$retour .= '<tr><th>'.'N°'.'</th><th>'.'Langue'.'</th><th>'.'Pays'.'</th><th>'.'Nom vernaculaire'.'</th><th>'.'Nom latin correspondant'.'</th></tr>'."\n"; |
$retour .= '</thead>'."\n"; |
$retour .= '<tbody>'."\n"; |
} |
return $retour; |
} |
function afficherNomVerna($donnees) |
{ |
$retour = ''; |
//$retour .= '<pre>'.print_r($donnees, true).'</pre>'; |
if (isset($donnees['ev_id_nom_vernaculaire'])) { |
$GLOBALS['_NOM_VERNA_']['message'] = 0; |
$retour .= '<tr>'."\n"; |
$retour .= '<td>'.$GLOBALS['num_nom_verna']++.'</td>'."\n"; |
$retour .= '<td>'.++$GLOBALS['_NOM_VERNA_']['num'].'</td>'."\n"; |
$retour .= '<td><abbr title="'.$donnees['ezg_intitule_principal_zg'].'">'.$donnees['ezg_code_zg'].'</abbr></td>'."\n"; |
$retour .= '<td><abbr title="'.$donnees['el_nom_langue_principal'].'">'.$donnees['el_code_langue'].'</abbr></td>'."\n"; |
$retour .= '<td>'.$donnees['ev_intitule_nom_vernaculaire'].'</td>'."\n"; |
if (isset($donnees['esn_ce_statut'])) { |
if ($donnees['esn_ce_statut'] == 3) {//Nom retenu |
$retour .= '<td><strong><a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['et_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></strong></td>'; |
$retour .= '<td><strong><a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['esn_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></strong></td>'; |
} else { |
$retour .= '<td><a href="func_UrlFicheNom('.$donnees['en_id_nom'].', '.$donnees['esn_id_version_projet_taxon'].')">'.$donnees['eni_intitule_nom'].'</a></td>'; |
} |
} |
$retour .= '</tr>'."\n"; |
} |
return $retour; |
} |
|
function afficherTablePied($donnees) |
{ |
$retour = ''; |
if (isset($donnees['ev_id_nom_vernaculaire']) AND $GLOBALS['_NOM_VERNA_']['pied'] == true) { |
$GLOBALS['_NOM_VERNA_']['pied'] = false; |
$retour .= '</tbody>'."\n"; |
$retour .= '</table>'."\n"; |
} |
return $retour; |
} |
function afficherMessage($donnees = array()) |
{ |
$retour = ''; |
if ($GLOBALS['_NOM_VERNA_']['message'] == 1 AND $GLOBALS['_NOM_VERNA_']['num'] == 0) { |
$retour .= '<p class="information">'.'Les noms vernaculaires de ce référentiel n\'ont pas encore été renseignés!'.'</p>'."\n"; |
} elseif ($GLOBALS['_NOM_VERNA_']['num'] == 0) { |
$retour .= '<p class="information">'.'Aucun nom vernaculaire ne correspond à ce radical!'.'</p>'."\n"; |
} |
return $retour; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
131,6 → 186,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/06/09 18:09:52 jpm |
* Début gestion des référenciels dans la recherche nomenclaturale. |
* |
* Revision 1.2 2005/01/28 19:47:09 jpm |
* Amélioration du rendu par ajout d'entité à la place des caractères posant pb et changement de l'encodage. |
* |