Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 528 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
507 jpm 1
<?php
2
// declare(encoding='UTF-8');
3
/**
4
 * Affiche un formulaire de contact d'utilisateur.
5
 *
6
 * @category	php 5.2
7
 * @package		eFlore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @copyright	Copyright (c) 2012, Tela Botanica (accueil@tela-botanica.org)
10
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
 * @version		$Id$
13
 */
14
 
15
class PopupContact extends aControleur {
16
	private $conteneur = null;
17
	private $imagesApi = null;
18
	private $id_destinataire = '';
19
	private $id_image = '';
20
 
21
 
22
	public function initialiser() {
23
		$this->capturerParametres();
24
		$this->setSortie(self::RENDU_SCRIPT, $this->getVue('contact_scripts'));
25
		$style = '<link href="modules/popup_contact/presentations/styles/contact.css" rel="stylesheet" type="text/css" />';
26
		$this->setSortie(self::RENDU_STYLE, $style);
27
		$this->conteneur = new Conteneur();
28
		$this->imagesApi = $this->conteneur->getApiImages();
29
	}
30
 
31
	private function capturerParametres() {
32
		if (isset($_GET['id_destinataire'])) {
33
			$this->id_destinataire = $_GET['id_destinataire'];
34
		}
35
		if (isset($_GET['id_img'])) {
36
			$this->id_image = $_GET['id_img'];
37
		}
38
	}
39
 
40
	public function executerActionParDefaut() {
41
		$this->executerForm();
42
	}
43
 
44
	public function executerForm(){
45
		$infos = array();
46
		$infos['idDestinataire'] = $this->id_destinataire;
47
		$infos['idImage'] = $this->id_image;
48
 
49
		$this->imagesApi->setProjet('cel');
50
		$imageInfos = $this->imagesApi->getInfosImageParIdImage($this->id_image);
51
		Debug::printr($imageInfos);
52
		//$infos['sujet'] = "Observation #"+idObs+" de "+nomSci;
53
		//$infos['message'] = "\n\n\n\n\n\n\n\n--\nConcerne l'observation de \""+nomSci+'" du "'+date+'" au lieu "'+lieu+'".';
54
 
55
		$this->setSortie(self::RENDU_CORPS, $this->getVue('popup_contact', $infos));
56
	}
57
 
58
}
59
?>