Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 314 Rev 315
Line 1... Line 1...
1
<?php
1
<?php
2
class GeneralFormateur {	
2
class GeneralFormateur implements Formateur {
3
	public $dest_map = array();
3
	public $dest_map = array();
4
	public $img = array();
4
	public $img = array();
5
	public function __construct($parametres, $info) {
5
	public function __construct($info) {
6
		$this->param = $parametres;
-
 
7
		$this->info = $info;
6
		$this->info = $info;
8
	}
7
	}
9
	public function img() {
8
	public function img() {
10
		$qualite = 90;
9
		$qualite = 90;
11
		imagejpeg($this->img['general'], Config::get('cache.stockageChemin').$this->dest_map['general'], $qualite);
10
		imagejpeg($this->img['general'], Config::get('cache.stockageChemin').$this->dest_map['general'], $qualite);
Line 127... Line 126...
127
		}
126
		}
128
		return $usemap;
127
		return $usemap;
129
	}
128
	}
Line 130... Line 129...
130
	
129
	
131
	public function formaterCartes($usemap) {
-
 
132
		$retour =  "<img src=\"".(Config::get('Cartes.cel_dst').$this->dest_map['general'])."\" style=\"border:none; cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n";
-
 
133
		$retour .=  "<map name=\"themap\" id=\"themap\">";
-
 
134
		$retour .=  $usemap['general'];
-
 
135
		$retour .=  "</map>";
-
 
136
		return $retour;
-
 
137
	}
-
 
138
	
-
 
139
	public function formaterCarteMiniature($retour, $usemap) {
130
	public function formaterCartes($usemap) {
140
		$retour['image'] = Config::get('Cartes.cel_dst').$this->dest_map['general'];
-
 
141
		$retour['map'] = $usemap['general'];
-
 
142
	
131
		$retour = Config::get('Cartes.cel_dst').$this->dest_map['general'];
143
		if (isset($this->param['retour']) && $this->param['retour'] == 'htm') {
132
		if ($this->info['retour'] == self::MIME_MAP) {
144
			$retour['image'] =  "<img src=\"".$retour['image']."\" style=\"border:none; cursor:crosshair\""
133
			$retour =  "<img src=\"".$retour."\" style=\"border:none; ".
145
			."alt=\"\" usemap=\"#themap\"></img><br />\n";
134
				"cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n".
146
			$retour['map'] = "<map name=\"themap\" id=\"themap\">".$retour['map']."</map>";
135
				"<map name=\"themap\" id=\"themap\">".utf8_encode($usemap['general'])."</map>";
147
		}
136
		}
148
		return $retour;
137
		return $retour;
Line 149... Line 138...
149
	}
138
	}