Subversion Repositories Sites.obs-saisons.fr

Rev

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

Rev 207 Rev 210
Line 98... Line 98...
98
	}
98
	}
Line 99... Line 99...
99
	
99
	
100
	public static function getUrlBaseComplete() {
100
	public static function getUrlBaseComplete() {
101
		return 'http://'.$_SERVER['SERVER_NAME'].str_replace(realpath($_SERVER['DOCUMENT_ROOT']),'',realpath(Application::getChemin())).'/';
101
		return 'http://'.$_SERVER['SERVER_NAME'].str_replace(realpath($_SERVER['DOCUMENT_ROOT']),'',realpath(Application::getChemin())).'/';
-
 
102
	}
-
 
103
	
-
 
104
    public static function getUrlDefaut() {  	
-
 
105
    	
-
 
106
    	$params = array();
-
 
107
    	return self::construireUrl($params);	
Line 102... Line 108...
102
	}
108
    }
Line 103... Line 109...
103
    
109
    
104
    public static function getUrlConsultationFicheStation($id_station) {  	
110
    public static function getUrlConsultationFicheStation($id_station) {  	
Line 145... Line 151...
145
    		'id_station' => $id_station
151
    		'id_station' => $id_station
146
    	);
152
    	);
147
    	return self::construireUrl($params);
153
    	return self::construireUrl($params);
148
    }
154
    }
Line -... Line 155...
-
 
155
    
-
 
156
    public static function getUrlFormulaireSuppressionStation() {
-
 
157
    	
-
 
158
		$params = array(
-
 
159
    		'module' => 'Station',
-
 
160
    		'action' => 'supprimerStation'
-
 
161
    	);
-
 
162
    	return self::construireUrl($params);
-
 
163
    }
149
    
164
    
Line 150... Line 165...
150
	public static function getUrlFormulaireAjoutEspece($id_station) {  
165
	public static function getUrlFormulaireAjoutEspece($id_station) {  
151
 
166
 
152
		$params = array(
167
		$params = array(
Line 203... Line 218...
203
    		'id_station' => $id_station,
218
    		'id_station' => $id_station,
204
    		'id_espece' => $id_espece
219
    		'id_espece' => $id_espece
205
    	);
220
    	);
206
    	return self::construireUrl($params); 
221
    	return self::construireUrl($params); 
207
    }
222
    }
-
 
223
    
-
 
224
	public static function getUrlFormulaireModificationIndividu($id_station, $id_espece, $id_individu) {  	
-
 
225
		
-
 
226
		$params = array(
-
 
227
    		'module' => 'Individu',
-
 
228
    		'action' => 'afficherFormulaireModificationIndividu',
-
 
229
    		'id_station' => $id_station,
-
 
230
    		'id_espece' => $id_espece,
-
 
231
			'id_individu' => $id_individu
-
 
232
    	);
-
 
233
    	return self::construireUrl($params); 	
-
 
234
    }
-
 
235
    
-
 
236
	public static function getUrlValidationFormulaireModificationIndividu($id_station, $id_espece, $id_individu) { 
-
 
237
 
-
 
238
		$params = array(
-
 
239
    		'module' => 'Individu',
-
 
240
    		'action' => 'validerFormulaireModificationIndividu',
-
 
241
    		'id_station' => $id_station,
-
 
242
    		'id_espece' => $id_espece,
-
 
243
			'id_individu' => $id_individu
-
 
244
    	);
-
 
245
    	return self::construireUrl($params); 
-
 
246
    }
-
 
247
    
-
 
248
	public static function getUrlSuppressionIndividu($id_station, $id_espece, $id_individu) { 
-
 
249
 
-
 
250
		$params = array(
-
 
251
    		'module' => 'Individu',
-
 
252
    		'action' => 'supprimerIndividu',
-
 
253
    		'id_station' => $id_station
-
 
254
    	);
-
 
255
    	return self::construireUrl($params); 
-
 
256
    }
Line 208... Line 257...
208
  
257
  
Line 209... Line 258...
209
    public static function getUrlConsultationEspeceStation($id_station, $id_espece, $annee = null) { 
258
    public static function getUrlConsultationEspeceStation($id_station, $id_espece, $annee = null) { 
210
    	
259
    	
Line 220... Line 269...
220
    		'annee' => $annee
269
    		'annee' => $annee
221
    	); 	
270
    	); 	
Line 222... Line 271...
222
    	
271
    	
223
    	return self::construireUrl($params); 
272
    	return self::construireUrl($params); 
224
    }
273
    }
225
    
274
        
Line 226... Line 275...
226
    public static function getUrlFormulaireModificationObservation($id_station,$id_espece, $id_individu, $annee = null) {
275
    public static function getUrlFormulaireModificationObservation($id_station,$id_espece, $id_individu, $annee = null) {
227
    	
276
    	
228
        if($annee == null) {
277
        if($annee == null) {
Line 257... Line 306...
257
    	); 
306
    	); 
Line 258... Line 307...
258
    	
307
    	
259
		return self::construireUrl($params); 
308
		return self::construireUrl($params); 
Line -... Line 309...
-
 
309
    }
-
 
310
    
-
 
311
	public static function getUrlExportDonneesObservations() {
-
 
312
		
-
 
313
		return Config::get('url_jrest').'OdsExport/FichierExportObservationCSV/'; 
-
 
314
    }
-
 
315
    
-
 
316
	public static function getUrlExportDonneesObservationsPourUtilisateur() {
-
 
317
		
-
 
318
		$params = array(
-
 
319
    		'module' => 'Export',
-
 
320
    		'action' => 'envoyerFichierCSVExportObservation'
-
 
321
    	); 
-
 
322
    	
-
 
323
		return self::construireUrl($params); 
260
    }
324
    }
Line 261... Line 325...
261
    
325
    
262
    public static function renvoyerStylesInclus() {
326
    public static function renvoyerStylesInclus() {
263
    	
327
    	
Line 270... Line 334...
270
    	
334
    	
Line 271... Line 335...
271
    }
335
    }
Line -... Line 336...
-
 
336
    
-
 
337
	public static function renvoyerScriptsInclus() {
272
    
338
		
273
	public static function renvoyerScriptsInclus() {
339
    	$scripts = '<script type="text/javascript" language="javascript">'.
274
		
340
    					' var urlBaseJrest = "'.Config::get('url_jrest').'"; '.
275
    	$scripts = '';
341
    				'</script>';
276
    	$scripts .= '<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>';
342
    	$scripts .= '<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>';
-
 
343
    	$scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery-1.4.4.min.js"></script>';
-
 
344
    	$scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery_ui/jquery-ui-1.8.6.custom.min.js"></script>';
-
 
345
		$scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'saisie.js"></script>';
-
 
346
		
-
 
347
		if(AppControleur::getUtilisateur()->estAdmin()) {
277
    	$scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery-1.4.4.min.js"></script>';
348
			$scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'saisie_admin.js"></script>';
278
    	$scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery_ui/jquery-ui-1.8.6.custom.min.js"></script>';
349
		}
Line 279... Line 350...
279
		$scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'saisie.js"></script>';
350