Subversion Repositories eFlore/Applications.cel

Rev

Rev 488 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 488 Rev 489
Line 11... Line 11...
11
 * @copyright © 2010, Jean-Pascal MILCENT
11
 * @copyright © 2010, Jean-Pascal MILCENT
12
 */
12
 */
13
abstract class Cel {
13
abstract class Cel {
Line 14... Line 14...
14
 
14
 
-
 
15
	public $config;
15
	public $config;
16
	public $parametres;
16
	protected $bdd;
17
	protected $bdd;
17
	protected $messages = array();
18
	protected $messages = array();
Line 18... Line 19...
18
	protected $debug = array();
19
	protected $debug = array();
Line 144... Line 145...
144
 
145
 
145
	protected function envoyerJson($variable, $donnees = null, $encodage = 'utf-8') {
146
	protected function envoyerJson($variable, $donnees = null, $encodage = 'utf-8') {
146
		$contenu = "var $variable = ".json_encode($donnees);
147
		$contenu = "var $variable = ".json_encode($donnees);
147
		$this->envoyer($contenu, 'text/html', $encodage);
148
		$this->envoyer($contenu, 'text/html', $encodage);
-
 
149
	}
-
 
150
	
-
 
151
	protected function envoyerJsonp($variable, $donnees = null, $encodage = 'utf-8') {
-
 
152
		$contenu = $_GET['callback'].'('.json_encode($donnees).');';
-
 
153
		$this->envoyer($contenu, 'text/html', $encodage);
Line 148... Line 154...
148
	}
154
	}
149
 
155
 
150
	protected function envoyer($donnees = null, $mime = 'text/html', $encodage = 'utf-8', $json = false) {
156
	protected function envoyer($donnees = null, $mime = 'text/html', $encodage = 'utf-8', $json = false) {
151
		// Traitements des messages d'erreurs et données
157
		// Traitements des messages d'erreurs et données