New file |
0,0 → 1,89 |
<?php |
global $gBlock; |
|
function pattern1($donnees) |
{ |
$retour .= '<h2>'.'RĂ©sumer de la recherche :'.'</h2>'."\n"; |
$retour .= '<p>'."\n"; |
$retour .= 'Radical : '.$donnees['radical']."\n"; |
if ($donnees['rang'] != '' || $donnees['rang'] != 0) { |
$retour .= ' - Rang : '.$donnees['rang']."\n"; |
} |
$retour .= '</p>'."\n"; |
return $retour; |
} |
|
function pattern2($donnees) |
{ |
$retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n"; |
return $retour; |
} |
|
class liste_nom_latin_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>Liste de noms latins</title>'."\n"; |
$retour .= '<!-- END entete -->'."\n"; |
$retour .= '</head>'."\n"; |
|
$retour .= '<body>'."\n"; |
$retour .= '<!-- BEGIN corps -->'."\n"; |
$retour .= '<h1>'.'Liste des noms'.'</h1>'."\n"; |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','pattern1'); |
$retour .= '<ol>'."\n"; |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','pattern2'); |
$retour .= '</ol>'."\n"; |
$retour .= '<!-- END corps -->'."\n"; |
$retour .= '</body>'."\n"; |
$retour .= '</html>'."\n"; |
echo $retour; |
} |
|
function serialiser2() |
{ |
$gBlock = $this->leBlock; |
$retour = ''; |
$retour .= '<h3>'.'Test'.'</h3>'; |
$retour .= '<ol>'; |
$donnees = $this->leBlock->recupererDonnees(); |
foreach ($donnees as $cle => $valeur) { |
$retour .= '<li>'.$cle.' : '.$valeur; |
} |
$retour .= '</ol>'; |
|
$block_fils = $this->leBlock->recupererCollectionBlockFils(); |
for($i = 0; $i < count($block_fils); $i++) { |
$collection = $block_fils[$i]; |
$blocks = $collection->recupererBlocksDeDonnees(); |
foreach ($blocks as $cle => $valeur) { |
$donnees = $valeur->recupererDonnees(); |
$retour .= '<ol>'; |
foreach ($donnees as $cle1 => $valeur1) { |
$retour .= '<li>'.$cle1.' : '.$valeur1; |
} |
$retour .= '</ol>'; |
} |
} |
|
echo $retour; |
} |
} |
?> |