Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 314 → Rev 315

/trunk/services/modules/0.1/eflore/cartes/Formateur.php
1,6 → 1,8
<?php
interface Formateur {
public function __construct($parametres, $info);
const MIME_MAP = 'text/html';
const MIME_JPG = 'image/jpeg';
public function __construct($info);
public function initialiserImage();
public function chargerDonnees();
public function dessinerPoint($text, $merge, $couleurs);
/trunk/services/modules/0.1/eflore/cartes/SophyFormateur.php
2,8 → 2,7
class SophyFormateur implements Formateur {
public $dest_map = array();
public $img = array();
public function __construct($parametres, $info) {
$this->param = $parametres;
public function __construct($info) {
$this->info = $info;
}
public function img() {
74,10 → 73,12
}
public function formaterCartes($usemap) {
$retour= "<img src=\"".(Config::get('Cartes.cel_dst').$this->dest_map['sophy'])."\" style=\"border:none; cursor:crosshair\" alt=\"\" usemap=\"#themapsophy\"></img><br />\n";
$retour.= "<map name=\"themapsophy\" id=\"themapsophy\">";
$retour.= $usemap['sophy'];
$retour.= "</map>";
$retour = Config::get('Cartes.cel_dst').$this->dest_map['sophy'];
if ($this->info['retour'] == self::MIME_MAP) {
$retour = "<img src=\"".$retour."\" style=\"border:none; ".
"cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n".
"<map name=\"themap\" id=\"themap\">".utf8_encode($usemap['sophy'])."</map>";
}
return $retour;
}
116,11 → 117,9
 
public function formerCommentaire($utm, $inventory) {
$comment = '';
if ($inventory['date_observation'] != '0000-00-00 00:00:00') {
$comment .= $this->formerDate($inventory);
}
$comment .= " par ".utf8_decode($inventory['identifiant']);
return $comment;
}
151,12 → 150,10
$text[$x.'|'.$y][$origine] = $name.$comment;
}
if ((isset ($text[$x.'|'.$y]['cel']) && ($text[$x.'|'.$y]['cel'])) || (isset ($text[$x.'|'.$y]['flore']) && ($text[$x.'|'.$y]['flore'])||
(isset ($text[$x.'|'.$y]['FLORE - VAR']) && ($text[$x.'|'.$y]['FLORE - VAR'])))) {
$merge[$x.'|'.$y]=true;
}
if ((isset ($text[$x.'|'.$y]['cel']) && ($text[$x.'|'.$y]['cel'])) || (isset ($text[$x.'|'.$y]['flore']) && ($text[$x.'|'.$y]['flore'])||
(isset ($text[$x.'|'.$y]['FLORE - VAR']) && ($text[$x.'|'.$y]['FLORE - VAR'])))) {
$merge[$x.'|'.$y] = true;
}
return array($text, $merge);
}
/trunk/services/modules/0.1/eflore/cartes/CelFormateur.php
2,8 → 2,7
class CelFormateur implements Formateur {
public $dest_map = array();
public $img = array();
public function __construct($parametres, $info) {
$this->param = $parametres;
public function __construct($info) {
$this->info = $info;
}
public function img() {
78,12 → 77,13
return $usemap;
}
public function formaterCartes($usemap) {
$retour= "<img src=\"".(Config::get('Cartes.cel_dst').$this->dest_map['cel'])."\" style=\"border:none; cursor:crosshair\" alt=\"\" usemap=\"#themapcel\"></img><br />\n";
$retour.= "<map name=\"themapcel\" id=\"themapcel\">";
$retour.= $usemap['cel'];
$retour.= "</map>";
public function formaterCartes($usemap) {
$retour = Config::get('Cartes.cel_dst').$this->dest_map['cel'];
if ($this->info['retour'] == self::MIME_MAP) {
$retour = "<img src=\"".$retour."\" style=\"border:none; ".
"cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n".
"<map name=\"themap\" id=\"themap\">".utf8_encode($usemap['cel'])."</map>";
}
return $retour;
}
/trunk/services/modules/0.1/eflore/cartes/CenlrFormateur.php
2,8 → 2,7
class CenlrFormateur implements Formateur {
public $dest_map = array();
public $img = array();
public function __construct($parametres, $info) {
$this->param = $parametres;
public function __construct($info) {
$this->info = $info;
}
public function img() {
80,11 → 79,12
}
public function formaterCartes($usemap) {
$retour = "<img src=\"".(Config::get('Cartes.cel_dst').$this->dest_map['cenlr'])."\" style=\"border:none; cursor:crosshair\" alt=\"\" usemap=\"#themapcenlr\"></img><br />\n";
$retour .= "<map name=\"themapcenlr\" id=\"themapcenlr\">";
$retour .= $usemap['cenlr'];
$retour .= "</map>";
 
$retour = Config::get('Cartes.cel_dst').$this->dest_map['cenlr'];
if ($this->info['retour'] == self::MIME_MAP) {
$retour = "<img src=\"".$retour."\" style=\"border:none; ".
"cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n".
"<map name=\"themap\" id=\"themap\">".utf8_encode($usemap['cenlr'])."</map>";
}
return $retour;
}
/trunk/services/modules/0.1/eflore/cartes/CbnmedFormateur.php
2,8 → 2,7
class CbnmedFormateur implements Formateur {
public $dest_map = array();
public $img = array();
public function __construct($parametres, $info) {
$this->param = $parametres;
public function __construct($info) {
$this->info = $info;
}
public function img() {
82,11 → 81,12
}
public function formaterCartes($usemap) {
$retour= "<img src=\"".(Config::get('Cartes.cel_dst').$this->dest_map['cbnmed'])."\" style=\"border:none; cursor:crosshair\" alt=\"\" usemap=\"#themapcbnmed\"></img><br />\n";
$retour.= "<map name=\"themapcbnmed\" id=\"themapcbnmed\">";
$retour.= $usemap['cbnmed'];
$retour.= "</map>";
 
$retour = Config::get('Cartes.cel_dst').$this->dest_map['cbnmed'];
if ($this->info['retour'] == self::MIME_MAP) {
$retour = "<img src=\"".$retour."\" style=\"border:none; ".
"cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n".
"<map name=\"themap\" id=\"themap\">".utf8_encode($usemap['cbnmed'])."</map>";
}
return $retour;
}
/trunk/services/modules/0.1/eflore/cartes/GeneralFormateur.php
1,9 → 1,8
<?php
class GeneralFormateur {
class GeneralFormateur implements Formateur {
public $dest_map = array();
public $img = array();
public function __construct($parametres, $info) {
$this->param = $parametres;
public function __construct($info) {
$this->info = $info;
}
public function img() {
129,21 → 128,11
}
public function formaterCartes($usemap) {
$retour = "<img src=\"".(Config::get('Cartes.cel_dst').$this->dest_map['general'])."\" style=\"border:none; cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n";
$retour .= "<map name=\"themap\" id=\"themap\">";
$retour .= $usemap['general'];
$retour .= "</map>";
return $retour;
}
public function formaterCarteMiniature($retour, $usemap) {
$retour['image'] = Config::get('Cartes.cel_dst').$this->dest_map['general'];
$retour['map'] = $usemap['general'];
if (isset($this->param['retour']) && $this->param['retour'] == 'htm') {
$retour['image'] = "<img src=\"".$retour['image']."\" style=\"border:none; cursor:crosshair\""
."alt=\"\" usemap=\"#themap\"></img><br />\n";
$retour['map'] = "<map name=\"themap\" id=\"themap\">".$retour['map']."</map>";
$retour = Config::get('Cartes.cel_dst').$this->dest_map['general'];
if ($this->info['retour'] == self::MIME_MAP) {
$retour = "<img src=\"".$retour."\" style=\"border:none; ".
"cursor:crosshair\" alt=\"\" usemap=\"#themap\" /><br />\n".
"<map name=\"themap\" id=\"themap\">".utf8_encode($usemap['general'])."</map>";
}
return $retour;
}