Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

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

Rev 27 Rev 28
Line 1... Line -...
1
<?
-
 
2
	  
-
 
3
		
-
 
4
		
-
 
5
	
-
 
6
		
-
 
7
		class NOM_SELECTION extends macroElement {
-
 
8
		
-
 
9
			
-
 
10
			function getSQL()
-
 
11
			{
-
 
12
				$contexte = array();
-
 
13
				
-
 
14
	  			if (array_key_exists('radical',$this->contexteRef) and array_key_exists('rang',$this->contexteRef) ) 
-
 
15
	  			{	
-
 
16
	  				
-
 
17
					$contexte['radical']= $this->contexteRef['radical'];
-
 
18
	
-
 
19
					$contexte['rang']= $this->contexteRef['rang'];
-
 
20
	
-
 
21
	  				if(!empty($contexte['radical']) and !empty($contexte['rang']) )
-
 
22
	  				{	return "SELECT nom.*, intitule.eni_intitule_nom 
-
 
23
				 FROM eflore_nom_intitule as intitule,
-
 
24
				 	  eflore_nom as nom 
-
 
25
				 WHERE intitule.eni_intitule_nom like '%${contexte['radical']}%'
-
 
26
				 and nom.en_id_nom = intitule.eni_id_nom
-
 
27
				 and nom.en_ce_rang = ${contexte['rang']}
-
 
28
			";  }
-
 
29
	  			}
-
 
30
	
-
 
31
	  			if (array_key_exists('radical',$this->contexteRef) ) 
-
 
32
	  			{	
-
 
33
	  				
-
 
34
					$contexte['radical']= $this->contexteRef['radical'];
-
 
35
	
-
 
36
	  				if(!empty($contexte['radical']) )
-
 
37
	  				{	return "SELECT nom.*, intitule.eni_intitule_nom 
-
 
38
				 FROM eflore_nom_intitule as intitule,
-
 
39
				 	  eflore_nom as nom 
-
 
40
				 WHERE intitule.eni_intitule_nom like '%${contexte['radical']}%'
-
 
41
				 and nom.en_id_nom = intitule.eni_id_nom
-
 
42
			";  }
-
 
43
	  			}
-
 
44
	
-
 
45
				return;
-
 
46
			}
-
 
47
		
-
 
48
			
-
 
49
		
-
 
50
		}
-
 
51
		
-
 
52
		
-
 
53
?>
-
 
54
	
-
 
55
1
<?php
-
 
2
class NOM_SELECTION extends macroElement {
-
 
3
    function getSQL()
-
 
4
    {
-
 
5
        $contexte = array();
-
 
6
        if (array_key_exists('radical',$this->contexteRef) and array_key_exists('rang',$this->contexteRef) ) {
-
 
7
            $contexte['radical']= $this->contexteRef['radical'];
-
 
8
            $contexte['rang']= $this->contexteRef['rang'];
-
 
9
            if(!empty($contexte['radical']) and !empty($contexte['rang']) ) {
-
 
10
                return 
-
 
11
                    'SELECT nom.*, intitule.eni_intitule_nom 
-
 
12
                    FROM eflore_nom_intitule as intitule, eflore_nom as nom 
-
 
13
                    WHERE intitule.eni_intitule_nom like "%'.$contexte['radical'].'%"
-
 
14
                    AND nom.en_id_nom = intitule.eni_id_nom
-
 
15
                    AND nom.en_ce_rang = '.$contexte['rang'];
-
 
16
            }
-
 
17
        }
-
 
18
        if (array_key_exists('radical',$this->contexteRef) ) {
-
 
19
            $contexte['radical']= $this->contexteRef['radical'];
-
 
20
            if(!empty($contexte['radical']) ) {
-
 
21
                return 
-
 
22
                    'SELECT nom.*, intitule.eni_intitule_nom 
-
 
23
                    FROM eflore_nom_intitule as intitule, eflore_nom as nom 
-
 
24
                    WHERE intitule.eni_intitule_nom like "%'.$contexte['radical'].'%"
-
 
25
                    AND nom.en_id_nom = intitule.eni_id_nom';
-
 
26
            }
-
 
27
        }
-
 
28
        return null;
-
 
29
    }
-
 
30
}
-
 
31
?>
-
 
32
56
33