1 |
<?php
|
1 |
<?php
|
- |
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
- |
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
4 |
// | PHP version 5.0.3 |
|
- |
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
6 |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
|
- |
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
8 |
// | This file is part of eRibo. |
|
- |
|
9 |
// | |
|
- |
|
10 |
// | Foobar is free software; you can redistribute it and/or modify |
|
- |
|
11 |
// | it under the terms of the GNU General Public License as published by |
|
- |
|
12 |
// | the Free Software Foundation; either version 2 of the License, or |
|
- |
|
13 |
// | (at your option) any later version. |
|
- |
|
14 |
// | |
|
- |
|
15 |
// | Foobar is distributed in the hope that it will be useful, |
|
- |
|
16 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
- |
|
17 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
- |
|
18 |
// | GNU General Public License for more details. |
|
- |
|
19 |
// | |
|
- |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
- |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
- |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
- |
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
24 |
// CVS : $Id: recherche_nom_latin_xhtml.php,v 1.3 2005-01-26 10:45:13 jpm Exp $
|
- |
|
25 |
/**
|
- |
|
26 |
* Vue affichant la liste des noms latins correspondant à un radical recherché.
|
- |
|
27 |
*
|
- |
|
28 |
* Permet de retourner le html correspondant à la liste des noms latins correspondant à un radical recherché.
|
- |
|
29 |
*
|
- |
|
30 |
*@package eFlore
|
2 |
global $gBlock;
|
31 |
*@subpackage Vues
|
- |
|
32 |
//Auteur original :
|
- |
|
33 |
*@author Frédéric LEGENS <flegens@free.fr>
|
- |
|
34 |
//Autres auteurs :
|
- |
|
35 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
- |
|
36 |
*@copyright Tela-Botanica 2000-2004
|
- |
|
37 |
*@version $Revision: 1.3 $ $Date: 2005-01-26 10:45:13 $
|
- |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
39 |
*/
|
3 |
|
- |
|
4 |
function pattern1($donnees)
|
- |
|
5 |
{
|
40 |
|
6 |
$retour .= '<h2>'.'Résumer de la recherche :'.'</h2>'."\n";
|
- |
|
7 |
$retour .= '<p>'."\n";
|
- |
|
8 |
$retour .= 'Radical : '.$donnees['radical']."\n";
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
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 |
{
|
42 |
// | ENTETE du PROGRAMME |
|
18 |
$retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n";
|
- |
|
19 |
return $retour;
|
- |
|
- |
|
43 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
44 |
|
- |
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
20 |
}
|
46 |
// | CLASSE de la VUE |
|
21 |
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
class recherche_nom_latin_xhtml implements iVue {
|
48 |
class recherche_nom_latin_xhtml implements iVue {
|
23 |
|
49 |
|
24 |
protected $leBlock;
|
50 |
protected $leBlock;
|
25 |
|
51 |
|
26 |
function __construct($unBlock)
|
52 |
function __construct($unBlock)
|
27 |
{
|
53 |
{
|
28 |
$this->leBlock = $unBlock;
|
54 |
$this->leBlock = $unBlock;
|
29 |
}
|
55 |
}
|
30 |
|
56 |
|
31 |
function serialiser()
|
57 |
function serialiser()
|
32 |
{
|
58 |
{
|
33 |
$retour = '<?xml version="1.0" encoding="utf-8" ?>'."\n";
|
59 |
$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";
|
60 |
$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";
|
61 |
$retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
|
36 |
|
62 |
|
37 |
$retour .= '<head>'."\n";
|
63 |
$retour .= '<head>'."\n";
|
38 |
$retour .= '<!-- BEGIN entete -->'."\n";
|
64 |
$retour .= '<!-- BEGIN entete -->'."\n";
|
39 |
$retour .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
|
65 |
$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";
|
66 |
$retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
|
41 |
$retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
|
67 |
$retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
|
42 |
$retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
|
68 |
$retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
|
43 |
$retour .= '<title>Liste de noms latins</title>'."\n";
|
69 |
$retour .= '<title>Liste de noms latins</title>'."\n";
|
44 |
$retour .= '<!-- END entete -->'."\n";
|
70 |
$retour .= '<!-- END entete -->'."\n";
|
45 |
$retour .= '</head>'."\n";
|
71 |
$retour .= '</head>'."\n";
|
46 |
|
72 |
|
47 |
$retour .= '<body>'."\n";
|
73 |
$retour .= '<body>'."\n";
|
48 |
$retour .= '<!-- BEGIN corps -->'."\n";
|
74 |
$retour .= '<!-- BEGIN corps -->'."\n";
|
49 |
$retour .= '<h1>'.'Liste des noms'.'</h1>'."\n";
|
75 |
$retour .= '<h1>'.'Liste des noms'.'</h1>'."\n";
|
50 |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','pattern1');
|
76 |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS','afficherResumerRecherche');
|
51 |
$retour .= '<ol>'."\n";
|
77 |
$retour .= '<ol>'."\n";
|
52 |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','pattern2');
|
78 |
$retour .= $this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_RECHERCHE','afficherNom');
|
53 |
$retour .= '</ol>'."\n";
|
79 |
$retour .= '</ol>'."\n";
|
54 |
$retour .= '<!-- END corps -->'."\n";
|
80 |
$retour .= '<!-- END corps -->'."\n";
|
55 |
$retour .= '</body>'."\n";
|
81 |
$retour .= '</body>'."\n";
|
56 |
$retour .= '</html>'."\n";
|
82 |
$retour .= '</html>'."\n";
|
57 |
echo $retour;
|
83 |
echo $retour;
|
58 |
}
|
84 |
}
|
59 |
|
85 |
}
|
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 |
|
86 |
|
72 |
$block_fils = $this->leBlock->recupererCollectionBlockFils();
|
87 |
// +------------------------------------------------------------------------------------------------------+
|
73 |
for($i = 0; $i < count($block_fils); $i++) {
|
88 |
// | LISTE des FONCTIONS |
|
74 |
$collection = $block_fils[$i];
|
- |
|
75 |
$blocks = $collection->recupererBlocksDeDonnees();
|
89 |
// +------------------------------------------------------------------------------------------------------+
|
76 |
foreach ($blocks as $cle => $valeur) {
|
90 |
function afficherResumerRecherche($donnees)
|
- |
|
91 |
{
|
77 |
$donnees = $valeur->recupererDonnees();
|
92 |
$retour .= '<h2>'.'Résumer de la recherche :'.'</h2>'."\n";
|
78 |
$retour .= '<ol>';
|
93 |
$retour .= '<p>'."\n";
|
79 |
foreach ($donnees as $cle1 => $valeur1) {
|
94 |
$retour .= 'Radical : '.$donnees['radical']."\n";
|
80 |
$retour .= '<li>'.$cle1.' : '.$valeur1;
|
95 |
if ($donnees['rang'] != '' || $donnees['rang'] != 0) {
|
81 |
}
|
- |
|
82 |
$retour .= '</ol>';
|
96 |
$retour .= ' - Rang : '.$donnees['rang']."\n";
|
83 |
}
|
- |
|
84 |
}
|
- |
|
85 |
|
- |
|
86 |
echo $retour;
|
- |
|
87 |
}
|
97 |
}
|
- |
|
98 |
$retour .= '</p>'."\n";
|
- |
|
99 |
return $retour;
|
88 |
}
|
100 |
}
|
- |
|
101 |
|
- |
|
102 |
function afficherNom($donnees)
|
- |
|
103 |
{
|
- |
|
104 |
$retour .= '<li><a href="{UrlFicheNom}'.$donnees['en_id_nom'].'">'.$donnees['eni_intitule_nom'].'</a></li>'."\n";
|
- |
|
105 |
return $retour;
|
- |
|
106 |
}
|
- |
|
107 |
|
- |
|
108 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
109 |
// | PIED du PROGRAMME |
|
- |
|
110 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
111 |
|
- |
|
112 |
|
- |
|
113 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
114 |
*
|
- |
|
115 |
* $Log: not supported by cvs2svn $
|
- |
|
116 |
*
|
- |
|
117 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
118 |
*/
|
89 |
?>
|
119 |
?>
|
90 |
|
120 |
|