Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 783 Rev 802
Line 2... Line 2...
2
/**
2
/**
3
 * Cette classe est le contrôleur pour l'affichage de listes dans des fancy box.(fenêtres)
3
 * Cette classe est le contrôleur pour l'affichage de listes dans des fancy box.(fenêtres)
4
 */
4
 */
Line 5... Line 5...
5
 
5
 
Line 6... Line 6...
6
 
6
 
7
class ListeFancyBox extends aControleur {
7
class ListeFancyBoxPhytosocio extends aControleur {
8
	
8
	
9
	private $type = '';
9
	private $type = '';
Line 16... Line 16...
16
	
16
	
17
	public function __construct() {
17
	public function __construct() {
18
		$this->capturerParametres();
18
		$this->capturerParametres();
19
		$this->conteneur = new Conteneur($this->parametres);
19
		$this->conteneur = new Conteneur($this->parametres);
-
 
20
		$this->informations = $this->conteneur->getApiInformations();
20
		$this->informations = $this->conteneur->getApiInformations();
21
		$this->syntaxons = $this->conteneur->getApiSyntaxons();
21
		$this->appUrls = $this->conteneur->getAppUrls();
22
		$this->appUrls = $this->conteneur->getAppUrls();
Line 22... Line 23...
22
	}
23
	}
Line 30... Line 31...
30
			$this->referentiel = $_GET['referentiel'];
31
			$this->referentiel = $_GET['referentiel'];
31
		}
32
		}
32
		if (isset($_GET['num_nom'])) {
33
		if (isset($_GET['num_nom'])) {
33
			$this->num_nom = $_GET['num_nom'];
34
			$this->num_nom = $_GET['num_nom'];
34
		}
35
		}
-
 
36
		if (isset($_GET['catminat'])) {
-
 
37
			$this->catminat= trim(urldecode($_GET['catminat']));
-
 
38
		}
35
	}
39
	}
Line 36... Line 40...
36
	
40
	
37
	public function executerActionParDefaut() {
41
	public function executerActionParDefaut() {
38
		$this->executerLister();
42
		$this->executerLister();
Line 46... Line 50...
46
	}
50
	}
Line 47... Line 51...
47
	
51
	
48
	public function chargerListeHtml() {
52
	public function chargerListeHtml() {
49
		$donnees['liste'] = '';
53
		$donnees['liste'] = '';
-
 
54
		$html = '';
50
		$html = '';
55
		$squelette = dirname(__FILE__).'/squelettes/liste-fancy-box';
51
		if ($this->type == 'catminat') {
56
		if ($this->type == 'catminat_taxons') {
52
			$donnees = $this->getListeCatminat('0','*');
57
			$donnees = $this->getListeCatminatTaxons(); 
53
			$donnees['urls'] = $this->appUrls;
58
			$squelette .= '-taxons';
-
 
59
 
-
 
60
		} elseif ($this->type == 'catminat_synonymes') {
-
 
61
			$donnees = $this->getListeCatminatSynonymes();
-
 
62
			$squelette .= '-synonymes';
-
 
63
		} elseif ($this->type == 'catminat_ref') {
-
 
64
			$donnees = $this->getListeCatminatRef();
54
			
65
			$squelette .= '-ref';
55
		}
66
		}
-
 
67
		if ($donnees['liste'] !== '') {
56
		if ($donnees != '') {
68
			$donnees['urls'] = $this->appUrls;
57
			$html = $this->getVue(dirname(__FILE__).'/squelettes/liste-fancy-box', $donnees);
69
			$html = $this->getVue($squelette, $donnees);
58
		}
70
		}
59
		return $html;
71
		return $html;
Line 60... Line 72...
60
	}
72
	}
61
	
73
	
62
	
74
	
63
	public function getListeCatminat($depart, $limite) {
75
	public function getListeCatminatTaxons() {
64
		$Catminat = array();
76
		$Catminat = array();
65
		$this->informations ->setProjet('baseflor');
77
		$this->informations ->setProjet('baseflor');
66
		$this->informations ->setBdnt($this->referentiel);
78
		$this->informations ->setBdnt($this->referentiel);
67
		$this->informations ->setNum_nom($this->num_nom);
79
		$this->informations ->setNum_nom($this->num_nom);
68
		$this->informations ->setDepart($depart);
80
		$this->informations ->setDepart(0);
69
		$this->informations ->setLimite($limite);
81
		$this->informations ->setLimite('*');
70
		$informations = $this->informations->getInformationsRelationCatminat();
82
		$informations = $this->informations->getInformationsRelationCatminat();
71
		if($informations != ""){
83
		if($informations != ""){
72
			$Catminat['listecatminat'] = $informations['resultat'];
84
			$Catminat['liste'] = $informations['resultat'];
73
			$Catminat['catminat'] = $informations['resultat'][0]['catminat_code'];
85
			$Catminat['catminat'] = $informations['resultat'][0]['catminat_code'];
Line -... Line 86...
-
 
86
		}
-
 
87
		return $Catminat;
-
 
88
	}
-
 
89
	
-
 
90
	public function getListeCatminatSynonymes() {
-
 
91
		$Catminat = array();
-
 
92
		$this->syntaxons->setProjet('baseveg');
-
 
93
		$this->syntaxons->setCatminat($this->catminat);
-
 
94
		$syntaxons = $this->syntaxons->getSyntaxonsSynonymes();
-
 
95
		if (is_array($syntaxons)) {
-
 
96
			$Catminat['liste'] = $syntaxons['resultat'];
-
 
97
			$Catminat['catminat'] =  $syntaxons['resultat'][0]['code_catminat'];
-
 
98
		}
-
 
99
		return $Catminat;
-
 
100
	}
-
 
101
	
-
 
102
	public function getListeCatminatRef() {
-
 
103
		$ref = array();
-
 
104
		$this->syntaxons->setProjet('baseveg');
-
 
105
		$this->syntaxons->setCatminat($this->catminat);
-
 
106
		$syntaxons = $this->syntaxons->getSyntaxonsCatminat();
-
 
107
		
-
 
108
		if (is_array($syntaxons)) {
-
 
109
			$ref['liste'] = $syntaxons['resultat'][0]['ref_der_biblio'];
74
		}
110
		}
75
		return $Catminat;
111
		return $ref;
76
	}
112
	}