Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 77 → Rev 78

/trunk/serveur/eflore_mv/vues/fiche_synthese_xhtml.php
1,16 → 1,9
<?php
global $gBlock;
 
function pattern1($donnees)
function construireNomLatin($donnees)
{
$retour .= 'Numéro nomenclatural : '.$donnees['nn']."\n";
return $retour;
}
 
function pattern2($donnees)
{
var_dump($donnees);
// Constitution du nom:
// Constitution du nom:
$nom = '';
$auteur_basio = '';
$auteur_modif = '';
33,20 → 26,21
}
}
if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['intitule_abrege_auteur_basio_ex'] != '-') {
if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['en_ce_auteur_basio_ex'] != 0) {
$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'])) {
} else if (!empty($donnees['intitule_abrege_auteur_basio']) && $donnees['en_ce_auteur_basio'] != 0) {
$auteur_basio .= $donnees['intitule_abrege_auteur_basio'];
}
if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['intitule_abrege_auteur_modif_ex'] != '-') {
if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['en_ce_auteur_modif_ex'] != 0) {
$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'])) {
} else if (!empty($donnees['intitule_abrege_auteur_modif']) && $donnees['en_ce_auteur_modif'] != 0) {
$auteur_modif .= $donnees['intitule_abrege_auteur_modif'];
}
if (!empty($auteur_modif)) {
55,12 → 49,39
$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 $nom;
}
 
function pattern1($donnees)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
//$retour .= '<br>';
$retour .= 'Numéro nomenclatural absolu : '.$donnees['en_id_nom']."\n";
$retour .= '<br />';
$retour .= 'Nom sélectionné précédemment : '.construireNomLatin($donnees).'<br />'."\n";
return $retour;
}
 
function pattern2($donnees)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
//$retour .= '<br>';
$retour .= '<option value="'.$donnees['eprv_id_version'].'">'.$donnees['eprv_nom'].' '.$donnees['epr_intitule_projet'].'</option>';
return $retour;
}
 
function pattern3($donnees)
{
$retour = '';
//$retour .= '<pre>'.print_r($donnees, true).'</pre>';
//$retour .= '<br>';
$retour .= '<li>'.$donnees['en_id_nom'].'</li>'."\n";
return $retour;
}
 
 
class fiche_synthese_xhtml implements iVue {
protected $leBlock;
72,32 → 93,55
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";
// La page xhtml :
$html_tete = '<?xml version="1.0" encoding="utf-8" ?>'."\n";
$html_tete .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
$html_tete .= '<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";
$entete = '<head>'."\n";
$entete .= '<!-- BEGIN entete -->'."\n";
$entete .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
$entete .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
$entete .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
$entete .= '<meta http-equiv="Content-language" content="fr" />'."\n";
$entete .= '<title>Synthèse d\'un nom latin</title>'."\n";
$entete .= '<!-- END entete -->'."\n";
$entete .= '</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";
$tab_corps[1] = '<body>'."\n";
$tab_corps[1] .= '<!-- BEGIN corps -->'."\n";
$tab_corps[1] .= '<h1>'.'Synthèse d\'un nom latin'.'</h1>'."\n";
$tab_corps[1] .= '<h2>'.'Informations sur le nom :'.'</h2>'."\n";
$tab_corps[1] .= '<p>'."\n";
$tab_block[1] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','pattern1');
$tab_corps[2] = '</p>'."\n";
$tab_corps[2] .= '<h2>'.'Présent dans : '.'</h2>'."\n";
$tab_corps[2] .= '<form id="eflore_form_projet" action="{UrlProjetChangement}" method="post">'."\n";
$tab_corps[2] .= '<select id="eflore_projet_version">';
$tab_block[2] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION','pattern2');
$tab_corps[3] .= '</select>';
$tab_corps[3] .= '<input type="submit" value="ok" />';
$tab_corps[3] .= '</form>'."\n";
$tab_corps[3] .= '<h2>'.'Synonymie : '.'</h2>'."\n";
$tab_corps[3] .= '<ol>'."\n";
$tab_block[3] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','pattern3');
$tab_corps[4] .= '</ol>'."\n";
$tab_corps[4] .= '<!-- END corps -->'."\n";
$tab_corps[4] .= '</body>'."\n";
$html_pied = '</html>'."\n";
// Passage en utf8 du code xhtml
$retour = utf8_encode($html_tete);
$retour .= utf8_encode($entete);
foreach ($tab_corps as $cle => $val) {
$retour .= utf8_encode($val);
if (isset($tab_block[$cle])) {
$retour .= utf8_encode($tab_block[$cle]);
}
}
$retour .= utf8_encode($html_pied);
// Envoi au navigateur
echo $retour;
}
}