Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 170 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 170 Rev 173
Line 1... Line 1...
1
<?php
1
<?php
2
class NOM_RECHERCHE extends macroElement {
2
class NOM_RECHERCHE extends macroElement {
3
    function getSQL()
3
    function getSQL()
4
    {
4
    {
5
        $contexte = array();
5
        $contexte = array();
6
        if (array_key_exists('radical', $this->contexteRef) and array_key_exists('rang', $this->contexteRef) ) {
6
        if (array_key_exists('radical', $this->contexteRef) AND array_key_exists('rang', $this->contexteRef) ) {
7
            $contexte['radical'] = $this->contexteRef['radical'];
7
            $contexte['radical'] = $this->contexteRef['radical'];
8
            $contexte['rang'] = $this->contexteRef['rang'];
8
            $contexte['rang'] = $this->contexteRef['rang'];
9
            if(!empty($contexte['radical']) and !empty($contexte['rang']) ) {
9
            if(!empty($contexte['radical']) AND !empty($contexte['rang']) ) {
10
                return 
10
                return 
11
                'SELECT 
11
                'SELECT 
12
                nom.en_id_nom,
12
                nom.en_id_nom,
13
                nom.en_nom_supra_generique,
13
                nom.en_nom_supra_generique,
14
                nom.en_nom_genre,
14
                nom.en_nom_genre,
Line 46... Line 46...
46
                AND nom.en_ce_intitule_cn = commentaire.enic_id_intitule_cn 
46
                AND nom.en_ce_intitule_cn = commentaire.enic_id_intitule_cn 
47
                AND nom.en_id_nom = commentaire.enic_id_intitule_cn 
47
                AND nom.en_id_nom = commentaire.enic_id_intitule_cn 
48
                AND nom.en_ce_rang = '.$contexte['rang'];
48
                AND nom.en_ce_rang = '.$contexte['rang'];
49
            }
49
            }
50
        }
50
        }
51
        if (array_key_exists('radical', $this->contexteRef) and array_key_exists('nvp', $this->contexteRef) ) {
51
        if (array_key_exists('radical', $this->contexteRef) AND array_key_exists('nvp', $this->contexteRef) ) {
52
            $contexte['radical'] = $this->contexteRef['radical'];
52
            $contexte['radical'] = $this->contexteRef['radical'];
53
            $contexte['nvp'] = $this->contexteRef['nvp'];
53
            $contexte['nvp'] = $this->contexteRef['nvp'];
54
            if(!empty($contexte['nvp']) ) {
54
            if(!empty($contexte['radical']) AND !empty($contexte['nvp']) ) {
55
                return 
55
                return 
56
                    'SELECT 
56
                    'SELECT 
57
                    nom.*, 
57
                    nom.*, 
58
                    intitule.eni_intitule_nom, 
58
                    intitule.eni_intitule_nom, 
59
                    selection.esn_ce_statut, 
59
                    selection.esn_ce_statut,