Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 990 Rev 1105
Line 9... Line 9...
9
 
9
 
10
	public function __construct(Url $urlBase = null, Url $urlBaseDossier = null, Url $urlPopUp = null, Url $urlMobile = null) {
10
	public function __construct(Url $urlBase = null, Url $urlBaseDossier = null, Url $urlPopUp = null, Url $urlMobile = null) {
11
		$this->urlBase = (is_null($urlBase)) ? Registre::get('eFlore.urlBase') : $urlBase;
11
		$this->urlBase = (is_null($urlBase)) ? Registre::get('eFlore.urlBase') : $urlBase;
12
		$this->urlBaseDossier = (is_null($urlBaseDossier)) ? Registre::get('eFlore.urlBaseDossier') : $urlBaseDossier;
12
		$this->urlBaseDossier = (is_null($urlBaseDossier)) ? Registre::get('eFlore.urlBaseDossier') : $urlBaseDossier;
13
		$this->urlPopUp = (is_null($urlPopUp)) ? Registre::get('eFlore.urlPopUp') : $urlPopUp;
13
		$this->urlPopUp = (is_null($urlPopUp)) ? Registre::get('eFlore.urlPopUp') : $urlPopUp;
14
		$this->urlMobile = (is_null($urlMobile)) ? Registre::get('eFlore.urlMobile') : $urlMobile;
14
		$this->urlMobileTpl = (is_null($urlMobile)) ? Registre::get('eFlore.urlMobileTpl') : $urlMobile;
Line 15... Line 15...
15
	}
15
	}
16
 
16
 
17
	public function obtenirUrlBase() {
17
	public function obtenirUrlBase() {
Line 58... Line 58...
58
		return $url;
58
		return $url;
59
	}
59
	}
Line 60... Line 60...
60
 
60
 
61
	public function getParametresUrlRecherche() {
61
	public function getParametresUrlRecherche() {
62
		$parametres = array(
62
		$parametres = array(
63
				'referentiel' => Registre::get('parametres.referentiel'),
63
			'referentiel' => Registre::get('parametres.referentiel'),
64
				'module' => 'recherche',
64
			'module' => 'recherche',
65
				'action' => 'rechercheSimple',
65
			'action' => 'rechercheSimple',
66
				'submit' => 'Rechercher'
66
			'submit' => 'Rechercher'
67
		);
67
		);
68
		return $parametres;
68
		return $parametres;
Line 69... Line 69...
69
	}
69
	}
Line 74... Line 74...
74
		$parametres['nom'] = $nom;
74
		$parametres['nom'] = $nom;
75
		$this->urlBase->setRequete($parametres);
75
		$this->urlBase->setRequete($parametres);
76
		$url = $this->urlBase->getURL();
76
		$url = $this->urlBase->getURL();
77
		return $url;
77
		return $url;
78
	}
78
	}
79
	
79
 
80
	public function getParametresUrlRechercheAvancee() {
80
	public function getParametresUrlRechercheAvancee() {
81
		$parametres = array(
81
		$parametres = array(
82
					'referentiel' => Registre::get('parametres.referentiel'),
82
			'referentiel' => Registre::get('parametres.referentiel'),
83
					'niveau' => Registre::get('parametres.niveau'),
83
			'niveau' => Registre::get('parametres.niveau'),
84
					'module' => 'recherche',
84
			'module' => 'recherche',
85
					'action' => 'rechercheAvancee',
85
			'action' => 'rechercheAvancee',
86
					'type_nom' => 'nom_scientifique'
86
			'type_nom' => 'nom_scientifique'
87
			);
87
		);
88
		return $parametres;
88
		return $parametres;
89
	}
89
	}
90
	
90
 
91
	public function obtenirUrlResultatAvanceOnglets($onglet, $params = array()) {
91
	public function obtenirUrlResultatAvanceOnglets($onglet, $params = array()) {
92
	$parametres = $this->getParametresUrlRechercheAvancee();
92
	$parametres = $this->getParametresUrlRechercheAvancee();
93
	$parametres['resultat'] = $onglet;
93
	$parametres['resultat'] = $onglet;
94
	$parametres = array_merge($parametres, $params);
94
	$parametres = array_merge($parametres, $params);
95
	$this->urlBase->setRequete($parametres);
95
	$this->urlBase->setRequete($parametres);
96
	$url = $this->urlBase->getURL();
96
	$url = $this->urlBase->getURL();
97
	return $url;
97
	return $url;
98
	}
98
	}
99
	
99
 
100
	public function obtenirUrlRechercheAvancee($params = array()) {
100
	public function obtenirUrlRechercheAvancee($params = array()) {
101
		$parametres = $this->getParametresUrlRechercheAvancee();
101
		$parametres = $this->getParametresUrlRechercheAvancee();
102
		$parametres = array_merge($parametres,$params);
102
		$parametres = array_merge($parametres,$params);
103
		$this->urlBase->setRequete($parametres);
103
		$this->urlBase->setRequete($parametres);
104
		$url = $this->urlBase->getURL();
104
		$url = $this->urlBase->getURL();
105
		return $url;
105
		return $url;
106
	}
106
	}
Line 107... Line 107...
107
 
107
 
108
	public function getParametresUrlResultat() {
108
	public function getParametresUrlResultat() {
109
		$parametres = array(
109
		$parametres = array(
110
				'referentiel' => Registre::get('parametres.referentiel'),
110
			'referentiel' => Registre::get('parametres.referentiel'),
111
				'module' => 'recherche',
111
			'module' => 'recherche',
112
				'niveau' => Registre::get('parametres.niveau'),
112
			'niveau' => Registre::get('parametres.niveau'),
113
				'action' => Registre::get('parametres.action'),
113
			'action' => Registre::get('parametres.action'),
114
				'submit' => 'Rechercher',
114
			'submit' => 'Rechercher',
115
				'type_nom' => isset($_GET['type_nom']) ? $_GET['type_nom'] : 'nom_scientifique',
115
			'type_nom' => isset($_GET['type_nom']) ? $_GET['type_nom'] : 'nom_scientifique',
116
				'nom' => isset($_GET['nom']) ? $_GET['nom'] : ''
116
			'nom' => isset($_GET['nom']) ? $_GET['nom'] : ''
117
		);
117
		);
118
		return $parametres;
118
		return $parametres;
Line 119... Line 119...
119
	}
119
	}
Line 131... Line 131...
131
		$parametres['resultat'] = 'alphab';
131
		$parametres['resultat'] = 'alphab';
132
		$this->urlBase->setRequete($parametres);
132
		$this->urlBase->setRequete($parametres);
133
		$url = $this->urlBase->getURL();
133
		$url = $this->urlBase->getURL();
134
		return $url;
134
		return $url;
135
	}
135
	}
136
	
136
 
137
	public function obtenirUrlResultatRetenu() {
137
	public function obtenirUrlResultatRetenu() {
138
		$parametres = $this->getParametresUrlResultat();
138
		$parametres = $this->getParametresUrlResultat();
139
		$parametres['resultat'] = 'retenu';
139
		$parametres['resultat'] = 'retenu';
140
		$this->urlBase->setRequete($parametres);
140
		$this->urlBase->setRequete($parametres);
141
		$url = $this->urlBase->getURL();
141
		$url = $this->urlBase->getURL();
Line 167... Line 167...
167
		$parametres['nom'] = $nom;
167
		$parametres['nom'] = $nom;
168
		$this->urlBase->setRequete($parametres);
168
		$this->urlBase->setRequete($parametres);
169
		$url = $this->urlBase->getURL();
169
		$url = $this->urlBase->getURL();
170
		return $url;
170
		return $url;
171
	}
171
	}
172
	
172
 
173
	public function getParametresUrlMobile() {
173
	public function obtenirUrlMobile($numNom) {
174
		$parametres = array(
174
		$parametres = array(
175
			'referentiel' => Registre::get('parametres.referentiel'),
175
			'referentiel' => Registre::get('parametres.referentiel'),
176
			'niveau' => 1,
-
 
177
			'module' => 'mobile',
-
 
178
			'action' => 'fiche'
176
			'num_nom' => $numNom
179
		);
177
		);
180
		return $parametres;
-
 
181
	}
-
 
182
	
-
 
183
	public function obtenirUrlMobile($numNom, $type_nom = 'nom_vernaculaire', $nom = '') {
-
 
184
		$parametres = $this->getParametresUrlMobile();
178
		$urlMobile = $this->urlMobileTpl;
185
		$parametres['num_nom'] = $numNom;
-
 
186
		$parametres['type_nom'] = $type_nom;
-
 
187
		$parametres['nom'] = $nom;
179
		foreach ($parametres as $cle => $val) {
188
		$this->urlMobile->setRequete($parametres);
180
			$urlMobile = str_replace('{'.$cle.'}', rawurlencode($val), $urlMobile);
189
		$url = $this->urlMobile->getURL();
181
		}
190
		return $url;
182
		return $urlMobile;
191
	}
183
	}
Line 192... Line 184...
192
 
184
 
193
	public function getParametresUrlMetaDonnees() {
185
	public function getParametresUrlMetaDonnees() {
194
		$parametres = array(
186
		$parametres = array(
Line 203... Line 195...
203
		$parametres['projet'] = $projet;
195
		$parametres['projet'] = $projet;
204
		$this->urlBase->setRequete($parametres);
196
		$this->urlBase->setRequete($parametres);
205
		$url = $this->urlBase->getURL();
197
		$url = $this->urlBase->getURL();
206
		return $url;
198
		return $url;
207
	}
199
	}
208
	
200
 
209
	
201
 
210
	public function getParametresUrlListeFancyBoxPhytosocio() {
202
	public function getParametresUrlListeFancyBoxPhytosocio() {
211
		$parametres = array(
203
		$parametres = array(
212
				'module' => 'liste-fancy-box-phytosocio',
204
			'module' => 'liste-fancy-box-phytosocio',
213
				'action' => 'lister'
205
			'action' => 'lister'
214
		);
206
		);
215
		return $parametres;
207
		return $parametres;
216
	}
208
	}
217
	
209
 
218
	public function obtenirUrlListeFancyBoxPhytosocio($liste,$referentiel,$num_nom, $catminat) {
210
	public function obtenirUrlListeFancyBoxPhytosocio($liste,$referentiel,$num_nom, $catminat) {
219
		$parametres = $this->getParametresUrlListeFancyBoxPhytosocio();
211
		$parametres = $this->getParametresUrlListeFancyBoxPhytosocio();
220
		$parametres['type'] = $liste;
212
		$parametres['type'] = $liste;
221
		$parametres['referentiel'] = $referentiel;
213
		$parametres['referentiel'] = $referentiel;
222
		$parametres['num_nom'] = $num_nom;
214
		$parametres['num_nom'] = $num_nom;
Line 226... Line 218...
226
		return $url;
218
		return $url;
227
	}
219
	}
Line 228... Line 220...
228
 
220
 
229
	public function getParametresUrlPopUpIllustrations() {
221
	public function getParametresUrlPopUpIllustrations() {
230
		$parametres = array(
222
		$parametres = array(
231
				'module' => 'popup-illustrations',
223
			'module' => 'popup-illustrations',
232
				'action' => 'fiche',
224
			'action' => 'fiche',
233
				'referentiel' => Registre::get('parametres.referentiel')
225
			'referentiel' => Registre::get('parametres.referentiel')
234
		);
226
		);
235
		return $parametres;
227
		return $parametres;
Line 236... Line 228...
236
	}
228
	}
Line 240... Line 232...
240
		$parametres['id'] = $idImg;
232
		$parametres['id'] = $idImg;
241
		$this->urlPopUp->setRequete($parametres);
233
		$this->urlPopUp->setRequete($parametres);
242
		$url = $this->urlPopUp->getURL();
234
		$url = $this->urlPopUp->getURL();
243
		return $url;
235
		return $url;
244
	}
236
	}
245
	
237
 
246
	public function getParametresPdfExport() {
238
	public function getParametresPdfExport() {
247
		$parametres = array(
239
		$parametres = array(
248
					'referentiel' => Registre::get('parametres.referentiel'),
240
			'referentiel' => Registre::get('parametres.referentiel'),
249
					'niveau' => Registre::get('parametres.niveau'),
241
			'niveau' => Registre::get('parametres.niveau'),
250
					'module' => 'pdf-export',
242
			'module' => 'pdf-export',
251
					'action' => 'pdf-export'
243
			'action' => 'pdf-export'
252
		);
244
		);
253
		return $parametres;
245
		return $parametres;
254
	}
246
	}
255
	
247
 
256
	
248
 
257
	public function obtenirUrlPdfExport($numNom) {
249
	public function obtenirUrlPdfExport($numNom) {
258
		$parametres = $this->getParametresPdfExport();
250
		$parametres = $this->getParametresPdfExport();
259
		$parametres['num_nom'] = $numNom;
251
		$parametres['num_nom'] = $numNom;
260
		$this->urlBase->setRequete($parametres);
252
		$this->urlBase->setRequete($parametres);
261
		$url = $this->urlBase->getURL();
253
		$url = $this->urlBase->getURL();
Line 263... Line 255...
263
	}
255
	}
Line 264... Line 256...
264
 
256
 
265
	public function getParametresUrlPopUpContact($action) {
257
	public function getParametresUrlPopUpContact($action) {
266
		$action = is_null($action) ? 'form' : $action;
258
		$action = is_null($action) ? 'form' : $action;
267
		$parametres = array(
259
		$parametres = array(
268
				'module' => 'popup-contact',
260
			'module' => 'popup-contact',
269
				'action' => $action,
261
			'action' => $action,
270
				'referentiel' => Registre::get('parametres.referentiel')
262
			'referentiel' => Registre::get('parametres.referentiel')
271
		);
263
		);
272
		return $parametres;
264
		return $parametres;
Line 273... Line 265...
273
	}
265
	}