Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 142 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
142 jpm 1
<?php
147 jpm 2
class fichesynthese extends groupeMacroElement {
142 jpm 3
    function __construct($une_connexion)
4
    {
5
        parent::__construct($une_connexion);
6
    }
7
 
8
    function construire()
9
    {
10
        $this->dblock = new blockdedonnees('FICHE_SYNTHESE');
11
 
12
        if (array_key_exists('nn', $_REQUEST)) {
13
            $this->dblock->ajouterDonnee('nn', $_REQUEST['nn']);
14
        }
15
 
16
        if (array_key_exists('nvp', $_REQUEST)) {
17
            $this->dblock->ajouterDonnee('nvp', $_REQUEST['nvp']);
18
        }
19
 
20
        $this->construireContexte();
21
        $this->ajouterMacroElement();
22
    }
23
 
24
    function construireContexte()
25
    {
26
 
27
    }
28
 
29
    function ajouterMacroElement()
30
    {
31
        $un_macro_element = $this->macroElementFactory('NOM_LATIN', $this->dblock);
32
        $un_macro_element->construire();
33
        $un_macro_element = $this->macroElementFactory('NOM_SELECTION_PROJETS', $this->dblock);
34
        $un_macro_element->construire();
35
        if (!isset($_REQUEST['nvp'])) {
36
            // La valeur par défaut 3 qui correspond à la BDNFF.
37
            $this->dblock->attribuerContexteValeur('FICHE_SYNTHESE', 'nvp', 3);
38
        }
39
        $un_macro_element = $this->macroElementFactory('NOM_SELECTION', $this->dblock);
40
        $un_macro_element->construire();
41
        if (!isset($_REQUEST['nt'])) {
42
            $this->dblock->attribuerContexteSql('FICHE_SYNTHESE>NOM_SELECTION', 'nt', 'et_id_taxon');
43
        }
44
        $un_macro_element = $this->macroElementFactory('PROJET_VERSION', $this->dblock);
45
        $un_macro_element->construire();
46
        $un_macro_element = $this->macroElementFactory('TAXON_NOMS', $this->dblock);
47
        $un_macro_element->construire();
48
        $un_macro_element = $this->macroElementFactory('FICHE_SYNTHESE>TAXON_NOMS>NOM_LATIN', $this->dblock);
49
        $un_macro_element->construire();
50
        $un_macro_element = $this->macroElementFactory('VERNACULAIRE_NOMS', $this->dblock);
51
        $un_macro_element->construire();
52
        //echo '<pre>'.print_r($this->dblock, true).'</pre>';
53
        //$this->dblock->afficher();
54
    }
55
 
56
}
57
?>