Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 528 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
// declare(encoding='UTF-8');
/**
 * Affiche un formulaire de contact d'utilisateur.
 *
 * @category    php 5.2
 * @package             eFlore-consultation
 * @author              Jean-Pascal MILCENT <jpm@tela-botanica.org>
 * @copyright   Copyright (c) 2012, Tela Botanica (accueil@tela-botanica.org)
 * @license             http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
 * @license             http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
 * @version             $Id$
 */

class PopupContact extends aControleur {
        private $conteneur = null;
        private $imagesApi = null;
        private $id_destinataire = '';
        private $id_image = '';


        public function initialiser() {
                $this->capturerParametres();
                $this->setSortie(self::RENDU_SCRIPT, $this->getVue('contact_scripts'));
                $style = '<link href="modules/popup_contact/presentations/styles/contact.css" rel="stylesheet" type="text/css" />';
                $this->setSortie(self::RENDU_STYLE, $style);
                $this->conteneur = new Conteneur();
                $this->imagesApi = $this->conteneur->getApiImages();
        }

        private function capturerParametres() {
                if (isset($_GET['id_destinataire'])) {
                        $this->id_destinataire = $_GET['id_destinataire'];
                }
                if (isset($_GET['id_img'])) {
                        $this->id_image = $_GET['id_img'];
                }
        }

        public function executerActionParDefaut() {
                $this->executerForm();
        }

        public function executerForm(){
                $infos = array();
                $infos['idDestinataire'] = $this->id_destinataire;
                $infos['idImage'] = $this->id_image;

                $this->imagesApi->setProjet('cel');
                $imageInfos = $this->imagesApi->getInfosImageParIdImage($this->id_image);
                Debug::printr($imageInfos);
                //$infos['sujet'] = "Observation #"+idObs+" de "+nomSci;
                //$infos['message'] = "\n\n\n\n\n\n\n\n--\nConcerne l'observation de \""+nomSci+'" du "'+date+'" au lieu "'+lieu+'".';

                $this->setSortie(self::RENDU_CORPS, $this->getVue('popup_contact', $infos));
        }

}
?>