71 |
jpm |
1 |
<?php
|
|
|
2 |
global $gBlock;
|
|
|
3 |
|
|
|
4 |
function pattern1($donnees)
|
|
|
5 |
{
|
|
|
6 |
$retour .= '<h2>'.'RĂ©sumer de la recherche :'.'</h2>'."\n";
|
|
|
7 |
$retour .= '<p>'."\n";
|
|
|
8 |
$retour .= 'Radical : '.$donnees['radical']."\n";
|
|
|
9 |
if ($donnees['rang'] != '' || $donnees['rang'] != 0) {
|
|
|
10 |
$retour .= ' - Rang : '.$donnees['rang']."\n";
|
|
|
11 |
}
|
|
|
12 |
$retour .= '</p>'."\n";
|
|
|
13 |
return $retour;
|
|
|
14 |
}
|
|
|
15 |
|
|
|
16 |
function pattern2($donnees)
|
|
|
17 |
{
|
|
|
18 |
$retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n";
|
|
|
19 |
return $retour;
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
class liste_nom_latin_xhtml implements iVue {
|
|
|
23 |
|
|
|
24 |
protected $leBlock;
|
|
|
25 |
|
|
|
26 |
function __construct($unBlock)
|
|
|
27 |
{
|
|
|
28 |
$this->leBlock = $unBlock;
|
|
|
29 |
}
|
|
|
30 |
|
|
|
31 |
function serialiser()
|
|
|
32 |
{
|
|
|
33 |
$retour = '<?xml version="1.0" encoding="utf-8" ?>'."\n";
|
|
|
34 |
$retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
|
|
|
35 |
$retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
|
|
|
36 |
|
|
|
37 |
$retour .= '<head>'."\n";
|
|
|
38 |
$retour .= '<!-- BEGIN entete -->'."\n";
|
|
|
39 |
$retour .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
|
|
|
40 |
$retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
|
|
|
41 |
$retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
|
|
|
42 |
$retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
|
|
|
43 |
$retour .= '<title>Liste de noms latins</title>'."\n";
|
|
|
44 |
$retour .= '<!-- END entete -->'."\n";
|
|
|
45 |
$retour .= '</head>'."\n";
|
|
|
46 |
|
|
|
47 |
$retour .= '<body>'."\n";
|
|
|
48 |
$retour .= '<!-- BEGIN corps -->'."\n";
|
|
|
49 |
$retour .= '<h1>'.'Liste des noms'.'</h1>'."\n";
|
|
|
50 |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','pattern1');
|
|
|
51 |
$retour .= '<ol>'."\n";
|
|
|
52 |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','pattern2');
|
|
|
53 |
$retour .= '</ol>'."\n";
|
|
|
54 |
$retour .= '<!-- END corps -->'."\n";
|
|
|
55 |
$retour .= '</body>'."\n";
|
|
|
56 |
$retour .= '</html>'."\n";
|
|
|
57 |
echo $retour;
|
|
|
58 |
}
|
|
|
59 |
|
|
|
60 |
function serialiser2()
|
|
|
61 |
{
|
|
|
62 |
$gBlock = $this->leBlock;
|
|
|
63 |
$retour = '';
|
|
|
64 |
$retour .= '<h3>'.'Test'.'</h3>';
|
|
|
65 |
$retour .= '<ol>';
|
|
|
66 |
$donnees = $this->leBlock->recupererDonnees();
|
|
|
67 |
foreach ($donnees as $cle => $valeur) {
|
|
|
68 |
$retour .= '<li>'.$cle.' : '.$valeur;
|
|
|
69 |
}
|
|
|
70 |
$retour .= '</ol>';
|
|
|
71 |
|
|
|
72 |
$block_fils = $this->leBlock->recupererCollectionBlockFils();
|
|
|
73 |
for($i = 0; $i < count($block_fils); $i++) {
|
|
|
74 |
$collection = $block_fils[$i];
|
|
|
75 |
$blocks = $collection->recupererBlocksDeDonnees();
|
|
|
76 |
foreach ($blocks as $cle => $valeur) {
|
|
|
77 |
$donnees = $valeur->recupererDonnees();
|
|
|
78 |
$retour .= '<ol>';
|
|
|
79 |
foreach ($donnees as $cle1 => $valeur1) {
|
|
|
80 |
$retour .= '<li>'.$cle1.' : '.$valeur1;
|
|
|
81 |
}
|
|
|
82 |
$retour .= '</ol>';
|
|
|
83 |
}
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
echo $retour;
|
|
|
87 |
}
|
|
|
88 |
}
|
|
|
89 |
?>
|