Subversion Repositories Sites.obs-saisons.fr

Rev

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

Rev 44 Rev 62
Line 71... Line 71...
71
            $type != self::RENDU_NAVIGATION &&
71
            $type != self::RENDU_NAVIGATION &&
72
            $type != self::RENDU_CORPS &&
72
            $type != self::RENDU_CORPS &&
73
            $type != self::RENDU_PIED &&
73
            $type != self::RENDU_PIED &&
74
            $type != self::META_TITRE &&
74
            $type != self::META_TITRE &&
75
            $type != self::META_DESCRIPTION &&
75
            $type != self::META_DESCRIPTION &&
76
            $type != self::META_TAGS) {
76
            $type != self::META_TAGS &&
-
 
77
            $type != self::STYLES &&
-
 
78
            $type != self::SCRIPTS
-
 
79
            ) {
77
            trigger_error("Le type de sortie '$type' n'est pas une valeur prédéfinie.", E_USER_WARNING);
80
            trigger_error("Le type de sortie '$type' n'est pas une valeur prédéfinie.", E_USER_WARNING);
78
            $existe = false;
81
            $existe = false;
79
        }
82
        }
80
        return $existe;
83
        return $existe;
81
    }
84
    }
Line 214... Line 217...
214
   
217
   
215
    private function remplacerEsperluette($txt) {
218
    private function remplacerEsperluette($txt) {
216
        $txt = preg_replace('/&(?!([a-z]+|#[0-9]+|#x[0-9a-f]+);)/i', '&', $txt, -1);
219
        $txt = preg_replace('/&(?!([a-z]+|#[0-9]+|#x[0-9a-f]+);)/i', '&', $txt, -1);
217
        return $txt;
220
        return $txt;
-
 
221
    }
-
 
222
    
-
 
223
    public static function formaterChaineVersClasseCss($chaine) {
-
 
224
    	return trim(str_replace(' ','_',$chaine));
Line 218... Line 225...
218
    }
225
    }
219
   
226
   
220
    protected function chargerPiedDePage() {
227
    protected function chargerPiedDePage() {
221
        $donnees['appli'] = Application::getInfo();
228
        $donnees['appli'] = Application::getInfo();
222
        $this->setSortie(self::RENDU_PIED, $this->getVue('pied', $donnees));
-
 
223
    }
-
 
224
    
-
 
225
    public static function getUrlSquelette() {
-
 
226
    	    	
-
 
227
    	$url_base = self::getUrlBaseComplete();    	
-
 
228
    	$url_base_squelette = $url_base.Config::get('dossier_squelettes').DS;
-
 
229
    	
-
 
230
    	return $url_base_squelette;
-
 
231
    }
-
 
232
    
-
 
233
    public static function getUrlStyle() {
-
 
234
    	$url_base_style = self::getUrlSquelette().'css'.DS;
-
 
235
    	
-
 
236
    	return $url_base_style;
-
 
237
    }
-
 
238
    
-
 
239
    public static function getUrlScript() {
-
 
240
    	$url_base_script = self::getUrlSquelette().'js'.DS;
-
 
241
    	
-
 
242
    	return $url_base_script;
-
 
243
    }
-
 
244
    
-
 
245
    public static function getUrlImage() {
-
 
246
    	$url_base_image = self::getUrlSquelette().'images'.DS;
-
 
247
    	
-
 
248
    	return $url_base_image;
-
 
249
    }
-
 
250
    
-
 
251
	public static function getUrlBase() {
-
 
252
		
-
 
253
		$base_vrai_chemin = str_replace(realpath($_SERVER['DOCUMENT_ROOT']),'',realpath(Application::getChemin()));
-
 
254
		$base_vrai_chemin .= '/';
-
 
255
		
-
 
256
		return $base_vrai_chemin;
-
 
257
	}
-
 
258
	
-
 
259
	public static function getUrlBaseComplete() {
-
 
260
		return 'http://'.$_SERVER['SERVER_NAME'].str_replace(realpath($_SERVER['DOCUMENT_ROOT']),'',realpath(Application::getChemin())).'/';
-
 
261
	}
-
 
262
    
-
 
263
    public static function getUrlConsultationFicheStation($id_station) {  	
-
 
264
    	// TODO: gérer les urls comme dans l'annuaire
-
 
265
    	return '?module=Station&action=afficherInformationsStation&id_station='.$id_station; 	
-
 
266
    }
-
 
267
    
-
 
268
    public static function getUrlFormulaireSaisieStation() {
-
 
269
    	// TODO: gérer les urls comme dans l'annuaire
-
 
270
    	return '?module=Station&action=afficherFormulaireSaisieStation&id_station=saisie';
-
 
271
    }
-
 
272
    
-
 
273
    public static function getUrlValidationFormulaireSaisieStation() {
-
 
274
    	// TODO: gérer les urls comme dans l'annuaire
-
 
275
    	return '?module=Station&action=validerFormulaireSaisieStation';
-
 
276
    }
-
 
277
    
-
 
278
    public static function getUrlFormulaireModificationStation($id_station) {
-
 
279
    	// TODO: gérer les urls comme dans l'annuaire
-
 
280
    	return '?module=Station&action=afficherFormulaireModificationStation&id_station='.$id_station;
-
 
281
    }
-
 
282
    
-
 
283
    public static function getUrlConsultationFicheIndividu($id_station, $id_espece, $id_individu) {  	
-
 
284
    	// TODO: gérer les urls comme dans l'annuaire
-
 
285
    	return '?module=Individu&action=afficherInformationsIndividu&id_station='.$id_station.'&id_espece='.$id_espece.'&id_individu='.$id_individu;
-
 
286
    	
-
 
287
    }
-
 
288
    
-
 
289
	public static function getUrlFormulaireSaisieIndividu($id_station, $id_espece) {  	
-
 
290
    	// TODO: gérer les urls comme dans l'annuaire
-
 
291
    	return '?module=Individu&action=afficherFormulaireSaisieIndividu&id_station='.$id_station.'&id_espece='.$id_espece; 	
-
 
292
    }
-
 
293
    
-
 
294
	public static function getUrlValidationFormulaireSaisieIndividu($id_station, $id_espece) {  	
-
 
295
    	// TODO: gérer les urls comme dans l'annuaire
-
 
296
    	return '?module=Individu&action=validerFormulaireSaisieIndividu&id_station='.$id_station.'&id_espece='.$id_espece; 	
-
 
297
    }
-
 
298
  
-
 
299
    public static function getUrlConsultationEspeceStation($id_station, $id_espece, $annee = null) { 
-
 
300
        if($annee == null) {
-
 
301
    		$annee = date('Y');
-
 
302
    	} 	
-
 
303
    	// TODO: gérer les urls comme dans l'annuaire
-
 
304
    	return '?module=Individu&action=afficherListeIndividu&id_station='.$id_station.'&id_espece='.$id_espece.'&annee='.$annee;
-
 
305
    	
-
 
306
    }
-
 
307
 
-
 
308
	public static function getUrlFormulaireAjoutEspece($id_station) {  	
-
 
309
    	// TODO: gérer les urls comme dans l'annuaire
-
 
310
    	return '?module=Espece&action=afficherFormulaireSaisieEspece&id_station='.$id_station.'&id_espece=saisie';	
-
 
311
    
-
 
312
	}
-
 
313
	
-
 
314
	public static function getUrlValidationFormulaireSaisieEspece($id_station) {  	
-
 
315
    	// TODO: gérer les urls comme dans l'annuaire
-
 
316
    	return '?module=Espece&action=validerFormulaireSaisieEspece&id_station='.$id_station.'&id_espece=saisie';	
-
 
317
	}
-
 
318
    
-
 
319
    public static function getUrlFormulaireModificationObservation($id_station,$id_espece, $id_individu, $annee = null) {
-
 
320
        if($annee == null) {
-
 
321
    		$annee = date('Y');
-
 
322
    	}
-
 
323
    	// TODO: gérer les urls comme dans l'annuaire
-
 
324
    	return '?module=Observation&action=afficherFormulaireModificationObservation&id_station='.$id_station.'&id_espece='.$id_espece.'&id_individu='.$id_individu.'&annee='.$annee;	
-
 
325
    }
-
 
326
    
-
 
327
	public static function getUrlValidationFormulaireModificationObservation($id_station,$id_espece, $id_individu, $annee = null) {
-
 
328
    	// TODO: gérer les urls comme dans l'annuaire
-
 
329
    	if($annee == null) {
-
 
330
    		$annee = date('Y');
-
 
331
    	}
-
 
332
    	return '?module=Observation&action=validerFormulaireModificationObservation&id_station='.$id_station.'&id_espece='.$id_espece.'&id_individu='.$id_individu.'&annee='.$annee;	
229
        $this->setSortie(self::RENDU_PIED, $this->getVue('pied', $donnees));
333
    }
230
    }