Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 694 Rev 701
Line 13... Line 13...
13
abstract class Cel {
13
abstract class Cel {
14
	const TYPE_OBS = 'observation';
14
	const TYPE_OBS = 'observation';
15
	const TYPE_IMG = 'image';
15
	const TYPE_IMG = 'image';
Line 16... Line 16...
16
	
16
	
-
 
17
	public $config;
17
	public $config;
18
	private $ressources;
18
	private $parametres;
19
	private $parametres;
19
	protected $bdd;
20
	protected $bdd;
20
	protected $messages = array();
21
	protected $messages = array();
Line 112... Line 113...
112
	private function recupererParametresUrl() {
113
	private function recupererParametresUrl() {
113
		if (isset($_GET)) {
114
		if (isset($_GET)) {
114
			$get_params = array('orderby', 'distinct', 'start', 'limit', 'formatRetour');
115
			$get_params = array('orderby', 'distinct', 'start', 'limit', 'formatRetour');
115
			foreach ($get_params as $get) {
116
			foreach ($get_params as $get) {
116
				if (isset($_GET[$get])) {
117
				if (isset($_GET[$get])) {
117
					$verifier = array('NULL', "\n", "\r", "\\", "'", '"', "\x00", "\x1a", ';');
-
 
118
					$_GET[$get] = strip_tags(str_replace($verifier, '', $_GET[$get]));
118
					$_GET[$get] = $this->verifierSecuriteParametreUrl($_GET[$get]);
119
					if ($_GET[$get] != '') {
119
					if ($_GET[$get] != '') {
120
						if (!isset($this->$get)) {
120
						if (!isset($this->$get)) {
121
							$this->$get = $_GET[$get];
121
							$this->$get = $_GET[$get];
122
						} else {
122
						} else {
123
							$e = "Impossible d'ajouter l'attribut $get à la classe du service car elle possède déjà un attribut nommé : $get";
123
							$e = "Impossible d'ajouter l'attribut $get à la classe du service car elle possède déjà un attribut nommé : $get";
Line 129... Line 129...
129
				}
129
				}
130
			}
130
			}
131
		}
131
		}
132
	}
132
	}
Line -... Line 133...
-
 
133
	
-
 
134
	protected function verifierSecuriteParametreUrl($param) {
-
 
135
		$verifier = array('NULL', "\n", "\r", "\\", "'", '"', "\x00", "\x1a", ';');
-
 
136
		$param = strip_tags(str_replace($verifier, '', $param));
-
 
137
		return $param;
-
 
138
	}
133
	
139
	
134
	private function definirParametresUrlParDefaut() {
140
	private function definirParametresUrlParDefaut() {
135
		if (!isset($this->start)) {
141
		if (!isset($this->start)) {
136
			$this->start = 0;
142
			$this->start = 0;
137
		}
143
		}