Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 64 | Rev 86 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 64 Rev 78
Line 1... Line 1...
1
<?php
1
<?php
2
global $gBlock;
2
global $gBlock;
Line 3... Line 3...
3
 
3
 
4
function pattern1($donnees)
4
function construireNomLatin($donnees)
5
{
-
 
6
    $retour .= 'Numéro nomenclatural : '.$donnees['nn']."\n";
-
 
7
    return $retour;
-
 
8
}
-
 
9
 
-
 
10
function pattern2($donnees)
-
 
11
{
-
 
12
    var_dump($donnees);
5
{
13
    // Constitution du nom:
6
// Constitution du nom:
14
    $nom = '';
7
    $nom = '';
15
    $auteur_basio = '';
8
    $auteur_basio = '';
16
    $auteur_modif = '';
9
    $auteur_modif = '';
17
    if (!empty($donnees['en_nom_supra_generique'])) {
10
    if (!empty($donnees['en_nom_supra_generique'])) {
Line 31... Line 24...
31
            }
24
            }
32
            $nom .= ' '.$donnees['en_epithete_infra_specifique'];
25
            $nom .= ' '.$donnees['en_epithete_infra_specifique'];
33
        }
26
        }
34
    }
27
    }
Line 35... Line 28...
35
    
28
    
36
    if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['intitule_abrege_auteur_basio_ex'] != '-') {
29
    if (!empty($donnees['intitule_abrege_auteur_basio_ex']) && $donnees['en_ce_auteur_basio_ex'] != 0) {
37
        $auteur_basio .= $donnees['intitule_abrege_auteur_basio_ex'];
30
        $auteur_basio .= $donnees['intitule_abrege_auteur_basio_ex'];
38
        if (!empty($donnees['intitule_abrege_auteur_basio'])) {
31
        if (!empty($donnees['intitule_abrege_auteur_basio'])) {
39
            $auteur_basio .= ' ex '.$donnees['intitule_abrege_auteur_basio'];
32
            $auteur_basio .= ' ex '.$donnees['intitule_abrege_auteur_basio'];
40
        }
33
        }
-
 
34
    } else if (!empty($donnees['intitule_abrege_auteur_basio']) && $donnees['en_ce_auteur_basio'] != 0) {
41
    } else if (!empty($donnees['intitule_abrege_auteur_basio'])) {
35
        
42
        $auteur_basio .= $donnees['intitule_abrege_auteur_basio'];
36
        $auteur_basio .= $donnees['intitule_abrege_auteur_basio'];
43
    }
37
    }
44
    if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['intitule_abrege_auteur_modif_ex'] != '-') {
38
    if (!empty($donnees['intitule_abrege_auteur_modif_ex']) && $donnees['en_ce_auteur_modif_ex'] != 0) {
45
        $auteur_modif .= $donnees['intitule_abrege_auteur_modif_ex'];
39
        $auteur_modif .= $donnees['intitule_abrege_auteur_modif_ex'];
46
        if (!empty($donnees['intitule_abrege_auteur_modif'])) {
40
        if (!empty($donnees['intitule_abrege_auteur_modif'])) {
47
            $auteur_modif .= ' ex '.$donnees['intitule_abrege_auteur_modif'];
41
            $auteur_modif .= ' ex '.$donnees['intitule_abrege_auteur_modif'];
48
        }
42
        }
49
    } else if (!empty($donnees['intitule_abrege_auteur_modif'])) {
43
    } else if (!empty($donnees['intitule_abrege_auteur_modif']) && $donnees['en_ce_auteur_modif'] != 0) {
50
        $auteur_modif .= $donnees['intitule_abrege_auteur_modif'];
44
        $auteur_modif .= $donnees['intitule_abrege_auteur_modif'];
51
    }
45
    }
52
    if (!empty($auteur_modif)) {
46
    if (!empty($auteur_modif)) {
53
        $nom .= ' ('.$auteur_basio.') ex '.$auteur_modif;
47
        $nom .= ' ('.$auteur_basio.') ex '.$auteur_modif;
54
    } else {
48
    } else {
55
        $nom .= ' '.$auteur_basio;
49
        $nom .= ' '.$auteur_basio;
Line -... Line 50...
-
 
50
    }
-
 
51
    
-
 
52
    return $nom;
-
 
53
}
-
 
54
 
-
 
55
function pattern1($donnees)
56
    }
56
{
-
 
57
    $retour = '';
57
    
58
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
58
    $retour .= '<p>Numéro nomenclatural : '.$donnees['en_id_nom'].'<br />'."\n";
59
    //$retour .= '<br>';
-
 
60
    $retour .= 'Numéro nomenclatural absolu : '.$donnees['en_id_nom']."\n";
59
    $retour .= 'Nom sélectionné précédemment:'.$nom.'<br />'."\n";
61
    $retour .= '<br />';
60
    $retour .= '</p>'."\n";
62
    $retour .= 'Nom sélectionné précédemment : '.construireNomLatin($donnees).'<br />'."\n";
Line -... Line 63...
-
 
63
    return $retour;
-
 
64
}
-
 
65
 
-
 
66
function pattern2($donnees)
-
 
67
{
-
 
68
    $retour = '';
-
 
69
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
-
 
70
    //$retour .= '<br>';
-
 
71
    $retour .= '<option value="'.$donnees['eprv_id_version'].'">'.$donnees['eprv_nom'].' '.$donnees['epr_intitule_projet'].'</option>';
-
 
72
    return $retour;
-
 
73
}
-
 
74
 
-
 
75
function pattern3($donnees)
-
 
76
{
-
 
77
    $retour = '';
-
 
78
    //$retour .= '<pre>'.print_r($donnees, true).'</pre>';
-
 
79
    //$retour .= '<br>';
-
 
80
    $retour .= '<li>'.$donnees['en_id_nom'].'</li>'."\n";
-
 
81
    return $retour;
61
    return $retour;
82
}
Line 62... Line 83...
62
}
83
 
Line 63... Line 84...
63
 
84
 
Line 70... Line 91...
70
        $this->leBlock = $unBlock;
91
        $this->leBlock = $unBlock;
71
    }
92
    }
Line 72... Line 93...
72
    
93
    
73
    function serialiser()
94
    function serialiser()
-
 
95
    {
74
    {
96
        // La page xhtml :
75
        $retour = '<?xml version="1.0" encoding="utf-8" ?>'."\n";
97
        $html_tete = '<?xml version="1.0" encoding="utf-8" ?>'."\n";
76
        $retour .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
98
        $html_tete .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "../../../commun/generique/dtd/xhtml1-strict.dtd">'."\n";
-
 
99
        $html_tete .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
-
 
100
        
-
 
101
        $entete = '<head>'."\n";
-
 
102
        $entete .= '<!-- BEGIN entete -->'."\n";
-
 
103
        $entete .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
-
 
104
        $entete .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
-
 
105
        $entete .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
-
 
106
        $entete .= '<meta http-equiv="Content-language" content="fr" />'."\n";
-
 
107
        $entete .= '<title>Synthèse d\'un nom latin</title>'."\n";
-
 
108
        $entete .= '<!-- END entete -->'."\n";
Line 77... Line 109...
77
        $retour .= '<html xmlns="http://w ww.w3.org/1999/xhtml" lang="fr" >'."\n";
109
        $entete .= '</head>'."\n";
78
        
110
        
79
        $retour .= '<head>'."\n";
111
        $tab_corps[1] = '<body>'."\n";
80
        $retour .= '<!-- BEGIN entete -->'."\n";
112
        $tab_corps[1] .= '<!-- BEGIN corps -->'."\n";
-
 
113
        $tab_corps[1] .= '<h1>'.'Synthèse d\'un nom latin'.'</h1>'."\n";
-
 
114
        $tab_corps[1] .= '<h2>'.'Informations sur le nom :'.'</h2>'."\n";
-
 
115
        $tab_corps[1] .= '<p>'."\n";
-
 
116
        $tab_block[1] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_LATIN','pattern1');
81
        $retour .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\n";
117
        $tab_corps[2] = '</p>'."\n";
-
 
118
        $tab_corps[2] .= '<h2>'.'Présent dans : '.'</h2>'."\n";
-
 
119
        $tab_corps[2] .= '<form id="eflore_form_projet" action="{UrlProjetChangement}" method="post">'."\n";
-
 
120
        $tab_corps[2] .= '<select id="eflore_projet_version">';
82
        $retour .= '<meta http-equiv="Content-style-type" content="text/css" />'."\n";
121
        $tab_block[2] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SELECTION','pattern2');
-
 
122
        $tab_corps[3] .= '</select>';
83
        $retour .= '<meta http-equiv="Content-script-type" content="text/javascript />'."\n";
123
        $tab_corps[3] .= '<input type="submit" value="ok" />';
-
 
124
        $tab_corps[3] .= '</form>'."\n";
-
 
125
        $tab_corps[3] .= '<h2>'.'Synonymie : '.'</h2>'."\n";
-
 
126
        $tab_corps[3] .= '<ol>'."\n";
84
        $retour .= '<meta http-equiv="Content-language" content="fr" />'."\n";
127
        $tab_block[3] = $this->leBlock->afficherPattern('FICHE_SYNTHESE>TAXON_NOMS','pattern3');
-
 
128
        $tab_corps[4] .= '</ol>'."\n";
85
        $retour .= '<title>Synthèse d\'un nom latin</title>'."\n";
129
        $tab_corps[4] .= '<!-- END corps -->'."\n";
-
 
130
        $tab_corps[4] .= '</body>'."\n";
-
 
131
        $html_pied = '</html>'."\n";
-
 
132
        
-
 
133
        // Passage en utf8 du code xhtml
-
 
134
        $retour = utf8_encode($html_tete);
-
 
135
        $retour .= utf8_encode($entete);
-
 
136
        foreach ($tab_corps as $cle => $val) {
-
 
137
            $retour .= utf8_encode($val);
-
 
138
            if (isset($tab_block[$cle])) {
-
 
139
                $retour .= utf8_encode($tab_block[$cle]);
-
 
140
            }
Line 86... Line -...
86
        $retour .= '<!-- END entete -->'."\n";
-
 
87
        $retour .= '</head>'."\n";
-
 
88
        
-
 
89
        $retour .= '<body>'."\n";
-
 
90
        $retour .= '<!-- BEGIN corps -->'."\n";
141
        }
91
        $retour .= '<h1>'.'Synthèse d\'un nom latin'.'</h1>'."\n";
-
 
92
        $retour .= '<h2>'.'Résumer de la recherche :'.'</h2>'."\n";
-
 
93
        $retour .= '<p>'."\n";
-
 
94
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE','pattern1');
-
 
95
        $retour .= '</p>'."\n";
-
 
96
        $retour .= '<h2>'.'Informations sur le nom :'.'</h2>'."\n";
-
 
97
        $retour .= $this->leBlock->afficherPattern('FICHE_SYNTHESE>NOM_SYNTHESE','pattern2');
-
 
98
        $retour .= '<!-- END corps -->'."\n";
142
        $retour .= utf8_encode($html_pied);
99
        $retour .= '</body>'."\n";
143
        
100
        $retour .= '</html>'."\n";
144
        // Envoi au navigateur
101
        echo $retour;
145
        echo $retour;
102
    }
146
    }