Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 63 → Rev 64

/trunk/serveur/eflore_mv/vues/fiche_synthese_xhtml.php
New file
0,0 → 1,104
<?php
global $gBlock;
 
function pattern1($donnees)
{
$retour .= 'Numéro nomenclatural : '.$donnees['nn']."\n";
return $retour;
}
 
function pattern2($donnees)
{
var_dump($donnees);
// Constitution du nom:
$nom = '';
$auteur_basio = '';
$auteur_modif = '';
if (!empty($donnees['en_nom_supra_generique'])) {
$nom .= $donnees['en_nom_supra_generique'];
} else if (!empty($donnees['en_epithete_infra_generique'])){
$nom .= $donnees['en_epithete_infra_generique'];
} else {
if (!empty($donnees['en_nom_genre'])) {
$nom .= $donnees['en_nom_genre'];
}
if (!empty($donnees['en_epithete_espece'])) {
$nom .= ' '.$donnees['en_epithete_espece'];
}
if (!empty($donnees['en_epithete_infra_specifique'])) {
if (!empty($donnees['enrg_abreviation_rang'])) {
$nom .= ' '.$donnees['enrg_abreviation_rang'];
}
$nom .= ' '.$donnees['en_epithete_infra_specifique'];
}
}
if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['intitule_abrege_auteur_basio_ex'] != '-') {
$auteur_basio .= $donnees['intitule_abrege_auteur_basio_ex'];
if (!empty($donnees['intitule_abrege_auteur_basio'])) {
$auteur_basio .= ' ex '.$donnees['intitule_abrege_auteur_basio'];
}
} else if (!empty($donnees['intitule_abrege_auteur_basio'])) {
$auteur_basio .= $donnees['intitule_abrege_auteur_basio'];
}
if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['intitule_abrege_auteur_modif_ex'] != '-') {
$auteur_modif .= $donnees['intitule_abrege_auteur_modif_ex'];
if (!empty($donnees['intitule_abrege_auteur_modif'])) {
$auteur_modif .= ' ex '.$donnees['intitule_abrege_auteur_modif'];
}
} else if (!empty($donnees['intitule_abrege_auteur_modif'])) {
$auteur_modif .= $donnees['intitule_abrege_auteur_modif'];
}
if (!empty($auteur_modif)) {
$nom .= ' ('.$auteur_basio.') ex '.$auteur_modif;
} else {
$nom .= ' '.$auteur_basio;
}
$retour .= '<p>Numéro nomenclatural : '.$donnees['en_id_nom'].'<br />'."\n";
$retour .= 'Nom sélectionné précédemment:'.$nom.'<br />'."\n";
$retour .= '</p>'."\n";
return $retour;
}
 
class fiche_synthese_xhtml implements iVue {
protected $leBlock;
function __construct($unBlock)
{
$this->leBlock = $unBlock;
}
function serialiser()
{
$retour = '<?xml version="1.0" encoding="utf-8" ?>'."\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";
$retour .= '<!-- BEGIN entete -->'."\n";
$retour .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
$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>Synthèse d\'un nom latin</title>'."\n";
$retour .= '<!-- END entete -->'."\n";
$retour .= '</head>'."\n";
$retour .= '<body>'."\n";
$retour .= '<!-- BEGIN corps -->'."\n";
$retour .= '<h1>'.'Synthèse d\'un nom latin'.'</h1>'."\n";
$retour .= '<h2>'.'Résumer de la recherche :'.'</h2>'."\n";
$retour .= '<p>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE','pattern1');
$retour .= '</p>'."\n";
$retour .= '<h2>'.'Informations sur le nom :'.'</h2>'."\n";
$retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SYNTHESE','pattern2');
$retour .= '<!-- END corps -->'."\n";
$retour .= '</body>'."\n";
$retour .= '</html>'."\n";
echo $retour;
}
}
?>