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