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 SophyFormateur implements Formateur {
2
class SophyFormateur 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['sophy'], Config::get('cache.stockageChemin').$this->dest_map['sophy'], $qualite);
10
		imagejpeg($this->img['sophy'], Config::get('cache.stockageChemin').$this->dest_map['sophy'], $qualite);
Line 72... Line 71...
72
		}
71
		}
73
		return $usemap;
72
		return $usemap;
74
	}
73
	}
Line 75... Line 74...
75
	
74
	
76
	public function formaterCartes($usemap) {
75
	public function formaterCartes($usemap) {
-
 
76
		$retour = Config::get('Cartes.cel_dst').$this->dest_map['sophy'];
77
		$retour=  "<img src=\"".(Config::get('Cartes.cel_dst').$this->dest_map['sophy'])."\" style=\"border:none; cursor:crosshair\" alt=\"\" usemap=\"#themapsophy\"></img><br />\n";
77
		if ($this->info['retour'] == self::MIME_MAP) {
78
		$retour.=  "<map name=\"themapsophy\" id=\"themapsophy\">";
78
			$retour =  "<img src=\"".$retour."\" style=\"border:none; ".
79
		$retour.=  $usemap['sophy'];
79
					"cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n".
-
 
80
					"<map name=\"themap\" id=\"themap\">".utf8_encode($usemap['sophy'])."</map>";
80
		$retour.=  "</map>";
81
		}
81
		return $retour;
82
		return $retour;
Line 114... Line 115...
114
		return $utm;
115
		return $utm;
115
	}
116
	}
Line 116... Line 117...
116
 
117
 
117
	public function formerCommentaire($utm, $inventory) {
118
	public function formerCommentaire($utm, $inventory) {
118
		$comment = '';
-
 
119
			
119
		$comment = '';
120
		if ($inventory['date_observation'] != '0000-00-00 00:00:00') {
120
		if ($inventory['date_observation'] != '0000-00-00 00:00:00') {
121
			$comment .= $this->formerDate($inventory);
121
			$comment .= $this->formerDate($inventory);
122
		}
-
 
123
			
122
		}
124
		$comment .= " par ".utf8_decode($inventory['identifiant']);
123
		$comment .= " par ".utf8_decode($inventory['identifiant']);
125
		return $comment;
124
		return $comment;
Line 126... Line 125...
126
	}
125
	}
Line 149... Line 148...
149
			$text[$x.'|'.$y][$origine] = $text[$x.'|'.$y][$origine].'<br>'.$name.$comment;
148
			$text[$x.'|'.$y][$origine] = $text[$x.'|'.$y][$origine].'<br>'.$name.$comment;
150
		} else { // Nouveau commentaire
149
		} else { // Nouveau commentaire
151
			$text[$x.'|'.$y][$origine] = $name.$comment;
150
			$text[$x.'|'.$y][$origine] = $name.$comment;
152
		}
151
		}
Line 153... Line -...
153
		
-
 
154
		
152
		
155
			if ((isset ($text[$x.'|'.$y]['cel']) && ($text[$x.'|'.$y]['cel'])) || (isset ($text[$x.'|'.$y]['flore']) && ($text[$x.'|'.$y]['flore'])|| 
153
		if ((isset ($text[$x.'|'.$y]['cel']) && ($text[$x.'|'.$y]['cel'])) || (isset ($text[$x.'|'.$y]['flore']) && ($text[$x.'|'.$y]['flore'])|| 
156
				(isset ($text[$x.'|'.$y]['FLORE - VAR']) && ($text[$x.'|'.$y]['FLORE - VAR'])))) {
154
			(isset ($text[$x.'|'.$y]['FLORE - VAR']) && ($text[$x.'|'.$y]['FLORE - VAR'])))) {
157
				$merge[$x.'|'.$y]=true;
155
				$merge[$x.'|'.$y] = true;
158
			}
-
 
159
		
156
		}
160
		return array($text, $merge);
157
		return array($text, $merge);