| /trunk/applications/jrest/services/OdsExport.php |
|---|
| 99,6 → 99,14 |
| return $condition; |
| } |
| public function getExportObservationPlat() { |
| $donnees = $this->getExportObservation(); |
| $donnees_formatees = $this->formaterPourExportCSV($donnees); |
| return $donnees_formatees ; |
| } |
| public function getExportObservationJson() { |
| $donnees = $this->getExportObservation(); |
| 156,20 → 164,13 |
| return $resultats_formates; |
| } |
| public function getExportObservationCsv() { |
| $utilisateur = new Utilisateur(); |
| $est_admin = $utilisateur->estAdmin(); |
| if($est_admin) { |
| $donnees = $this->getExportObservation(); |
| $donnees_formatees = $this->formaterPourExportCSV($donnees); |
| $chaine_csv = $this->convertirTableauAssocVersCSV($donnees_formatees); |
| public function getFichierExportObservationCsv() { |
| $donnees = $this->getExportObservation(); |
| $donnees_formatees = $this->formaterPourExportCSV($donnees); |
| $chaine_csv = $this->convertirTableauAssocVersCSV($donnees_formatees); |
| $this->envoyerFichier($chaine_csv); |
| } else { |
| echo "echo non non non non non, vous êtes pas admin !!!!"; |
| } |
| $this->envoyerFichier($chaine_csv); |
| } |
| public function formaterPourExportCSV($tableau_observations_infos) { |
| 180,6 → 181,8 |
| $especes = $gestionnaire_especes->getToutesEspeces(); |
| $evenements = $this->obtenirValeursListeParAbreviation(self::ABBR_LISTE_EVENEMENTS); |
| $codes_insee_communes = array(); |
| $resultats_formates = array(); |
| foreach($tableau_observations_infos as $observations_infos) { |
| 204,7 → 207,7 |
| 'nom_scientifique' => $nom_espece, |
| 'station' => $observations_infos['os_nom'], |
| 'code_commune' => $observations_infos['os_ce_commune'], |
| 'nom_commune' => $gestionnaire_communes->obtenirNomCommuneParCodeInsee($observations_infos['os_ce_commune']), |
| 'nom_commune' => '', |
| 'latitude' => $observations_infos['os_latitude'], |
| 'longitude' => $observations_infos['os_longitude'], |
| 'altitude' => $observations_infos['os_altitude'], |
| 213,8 → 216,22 |
| ); |
| $resultats_formates[] = $infos_formatees; |
| if(is_numeric($observations_infos['os_ce_commune'])) { |
| $codes_insee_communes[] = $observations_infos['os_ce_commune']; |
| } |
| } |
| $correspondance_codes_insee_noms = $gestionnaire_communes->obtenirTableauNomsCommunesParTableauCodesInsee($codes_insee_communes); |
| foreach($resultats_formates as &$resultat) { |
| if(isset($correspondance_codes_insee_noms[$resultat['code_commune']]) && trim($correspondance_codes_insee_noms[$resultat['code_commune']]) != '') { |
| $resultat['nom_commune'] = $correspondance_codes_insee_noms[$resultat['code_commune']]; |
| } |
| } |
| return $resultats_formates; |
| } |
| /trunk/applications/jrest/services/OdsStation.php |
|---|
| 149,27 → 149,23 |
| * Méthode appelée pour supprimer un élément |
| */ |
| public function deleteElement($uid) { |
| // Pour le moment, pas de suppression des stations |
| return ; |
| if(!isset($uid[0])) { |
| if(isset($uid[0])) { |
| $id_participant = $uid[0]; |
| } else { |
| return; |
| } |
| if(!isset($uid[1])) { |
| if(isset($uid[1])) { |
| $id_station = $uid[1]; |
| } else { |
| return; |
| } |
| $requete_suppression_station = 'DELETE FROM ods_stations '. |
| 'WHERE os_ce_particant = '.$this->proteger($id_participant).' '. |
| 'WHERE os_ce_participant = '.$this->proteger($id_participant).' '. |
| 'AND os_id_station = '.$this->proteger($id_station); |
| // TODO : supprimer également tout ce qui est associé à la station (observations, etc...) |
| $suppression_station = $this->executerRequeteSimple($requete_suppression_station); |
| if(!$suppression_station) { |
| 180,9 → 176,6 |
| } |
| // +---------------------------------------------------------------------------------------------------------------+ |
| // METHODES D'ACCES A LA BASE DE DONNEES |
| private function obtenirListeStationPourParticipant($id_participant) { |
| $requete_liste_station = 'SELECT * FROM ods_stations WHERE os_ce_participant = '.$this->proteger($id_participant); |
| /trunk/applications/jrest/services/OdsObservation.php |
|---|
| 54,7 → 54,7 |
| $requete_liste_observation_individu = 'SELECT * FROM ods_observations '. |
| 'WHERE oo_ce_individu ='.$this->proteger($id_individu).' '. |
| 'ORDER BY oo_date'; |
| 'ORDER BY YEAR(oo_date) DESC, MONTH(oo_date) ASC, DAY(oo_date) ASC '; |
| $liste_observation_individu = $this->executerRequete($requete_liste_observation_individu); |
| /trunk/applications/jrest/services/OdsSyndicationObservation.php |
|---|
| 30,6 → 30,8 |
| private $squelette_dossier = null; |
| private $flux = array(); |
| private $mode = 'normal'; |
| /** |
| * Méthode appelée avec une requête de type GET. |
| */ |
| 199,6 → 201,29 |
| return $contenu; |
| } |
| private function getServiceModificationObservations() { |
| $this->mode = 'admin'; |
| // Construction de la requête |
| $requete = 'SELECT * '. |
| 'FROM ods_observations '. |
| 'LEFT JOIN ods_individus '. |
| 'ON ods_observations.oo_ce_individu = ods_individus.oi_id_individu '. |
| 'LEFT JOIN ods_stations '. |
| 'ON ods_individus.oi_ce_station = ods_stations.os_id_station '. |
| 'WHERE oo_ce_participant != '.$this->config['appli']['id_participant_demo'].' '. |
| 'AND oo_date_saisie != oo_date_modification '. |
| 'ORDER BY oo_date_modification DESC '. |
| "LIMIT $this->start,$this->limit "; |
| $elements = $this->executerRequete($requete); |
| // Création du contenu |
| $contenu = $this->executerService($elements); |
| return $contenu; |
| } |
| private function executerService($elements) { |
| $contenu = ''; |
| if (is_array($elements)) { |
| 245,7 → 270,7 |
| $item['date_creation_simple'] = strftime('%A %d %B %Y à %H:%M', strtotime($observation['oo_date_saisie'])); |
| $item['titre'] = $this->creerTitre($observation); |
| $item['guid'] = $this->creerGuidItem($observation); |
| $item['lien'] = $this->creerLienItem($observation); |
| $item['lien'] = $this->creerUrlService(); |
| $item['categorie'] = $this->creerCategorie($item); |
| $item['description'] = $this->creerDescription($this->protegerCaracteresHtmlDansChamps($observation), $item); |
| $item['description_encodee'] = htmlspecialchars($this->creerDescription($observation, $item)); |
| 292,7 → 317,7 |
| private function creerAuteur($element) { |
| //TODO externaliser les champs dans le fichier de config |
| $requete_selection_auteur = 'SELECT name FROM drupal_users '. |
| $requete_selection_auteur = 'SELECT name FROM ods_redesign.drupal_users '. |
| 'WHERE uid = '.$this->proteger($element); |
| $resultat_auteur = $this->executerRequete($requete_selection_auteur); |
| 321,8 → 346,18 |
| $lieu = $commune; |
| } |
| $description = "Observé à $lieu"; |
| $description = "Observé à $lieu".'<br />'; |
| if($this->mode == 'admin') { |
| $description .= ' Individu : '.$obs['oi_nom'].'<br />'; |
| $description .= 'Station : '.$obs['os_nom'].'<br />'; |
| $description .= 'Saisi le : '.$item['date_creation_simple'].'<br />'; |
| $description .= 'Modifié le : '.$item['date_maj_simple'].'<br />'; |
| } |
| $description = $this->nettoyerTexte($description); |
| return $description; |
| } |
| /trunk/applications/jrest/services/OdsCommune.php |
|---|
| 196,6 → 196,23 |
| return $infos_commune[0]['oc_nom']; |
| } |
| public function obtenirTableauNomsCommunesParTableauCodesInsee($tableau_codes_insee_communes) { |
| $chaine_codes_insee = implode($tableau_codes_insee_communes,','); |
| $requete_infos_communes = 'SELECT * FROM ods_communes WHERE oc_code_insee IN ('.$chaine_codes_insee.')'; |
| $infos_commune = $this->executerRequete($requete_infos_communes); |
| $noms_communes = array(); |
| foreach($infos_commune as $commune) { |
| $code_insee = $commune['oc_code_insee']; |
| $noms_communes[$code_insee] = $commune['oc_nom']; |
| } |
| return $noms_communes; |
| } |
| private function obtenirCodeInseeCommune($commune, $cp) { |
| $commune = $this->remplacerNomCommunePourRecherche($commune); |
| /trunk/applications/jrest/services/OdsEspece.php |
|---|
| 123,7 → 123,7 |
| 'SELECT oi_ce_espece FROM ods_individus '. |
| 'WHERE oi_ce_station = '.$this->proteger($id_station). |
| ') '. |
| 'ORDER BY oe_ce_type'; |
| 'ORDER BY oe_ce_type, oe_nom_vernaculaire'; |
| $especes_pour_station = $this->executerRequete($requete_especes_pour_station); |
| 138,7 → 138,7 |
| private function getEspecesParType() { |
| $requete_toute_espece = 'SELECT * FROM ods_especes ORDER BY oe_ce_type'; |
| $requete_toute_espece = 'SELECT * FROM ods_especes ORDER BY oe_ce_type, oe_nom_vernaculaire'; |
| $liste_espece = $this->executerRequete($requete_toute_espece); |
| $liste_type_espece = $this->obtenirValeursListeParAbreviation(self::ABBR_LISTE_TYPE_ESPECE); |
| 167,7 → 167,7 |
| public function getToutesEspeces() { |
| $requete_toute_espece = 'SELECT * FROM ods_especes'; |
| $requete_toute_espece = 'SELECT * FROM ods_especes ORDER BY oe_nom_vernaculaire'; |
| $liste_espece = $this->executerRequete($requete_toute_espece); |
| $liste_type_espece = $this->obtenirValeursListeParAbreviation(self::ABBR_LISTE_TYPE_ESPECE); |
| /trunk/applications/jrest/services/OdsUtilisateur.php |
|---|
| 8,10 → 8,37 |
| */ |
| function getElement($param = array()) { |
| $chaine_utilisateur = $param[0]; |
| // Envoi sur la sortie standard |
| $this->envoyer($info); |
| $chaine_utilisateur = $param[0]; |
| $liste_utilisateurs = $this->getListeUtilisateur($chaine_utilisateur); |
| $liste_utilisateurs_formatee = $this->formaterListeUtilisateursPourEnvoi($liste_utilisateurs); |
| $this->envoyer($liste_utilisateurs_formatee); |
| } |
| function getListeUtilisateur($pseudo) { |
| $requete_selection_liste = 'SELECT * '. |
| 'FROM drupal_users '. |
| 'WHERE name LIKE "'.$pseudo.'%" '. |
| 'ORDER BY name '. |
| 'LIMIT 0, 20'; |
| $liste_utilisateurs = $this->executerRequete($requete_selection_liste); |
| return $liste_utilisateurs; |
| } |
| function formaterListeUtilisateursPourEnvoi($liste_utilisateurs) { |
| $liste_utilisateurs_formatee = array(); |
| foreach($liste_utilisateurs as $utilisateur) { |
| $liste_utilisateurs_formatee[] = array('nom' => $utilisateur['name'], 'id' => $utilisateur['uid']); |
| } |
| return $liste_utilisateurs_formatee; |
| } |
| } |
| /trunk/applications/jrest/services/OdsIndividu.php |
|---|
| 69,19 → 69,19 |
| * Méthode appelée pour mettre à jour un élément |
| */ |
| public function updateElement($uid, $params) { |
| //Mise à jour de la personne |
| // Identification de l'utilisateur |
| list($id_utilisateur, $id_session) = $this->getIdentification($params); |
| if(isset($uid[0])) { |
| $id_individu = $uid[0]; |
| } else { |
| return; |
| } |
| $requete_modification_individu = 'UPDATE ods_individus '. |
| 'SET oi_nom = '.$this->proteger($params['individu_nom']).' '. |
| 'WHERE oi_id_individu = '.$this->proteger($id_individu); |
| $modification_individu = $this->executerRequeteSimple($requete_modification_individu); |
| // Contrôle du non détournement de l'utilisateur |
| if ($this->etreAutorise($id_utilisateur)) { |
| try { |
| } catch (PDOException $e) { |
| $messages[] = sprintf($this->getTxt('sql_erreur'), $e->getFile(), $e->getLine(), $e->getMessage(), $requete); |
| } |
| } |
| $this->envoyer(); |
| } |
| 89,28 → 89,31 |
| * Méthode appelée pour supprimer un élément |
| */ |
| public function deleteElement($uid) { |
| // Vérification de la présence des id passés par l'url |
| if (!isset($uid[0]) || !isset($uid[1])) { |
| $this->messages[] = "Identifiant d'utilisateur ou de personne manquant. Vous ne devriez pas avoir accès à ce service."; |
| } else { |
| list($id_utilisateur, $id_session) = $this->getIdentification($uid[0]); |
| // Contrôle du non détournement de l'utilisateur |
| if ($this->etreAutorise($id_utilisateur)) { |
| // Récupération des id passés par l'url |
| $identifiants = explode(',', rtrim($uid[1], ',')); |
| if (count($identifiants) == 0) { |
| $this->messages[] = "Aucun enregistrement n'a été supprimé."; |
| } else { |
| foreach ($identifiants as $id_personne) { |
| try { |
| } catch (PDOException $e) { |
| $this->messages[] = sprintf($this->getTxt('sql_erreur'), $e->getFile(), $e->getLine(), $e->getMessage(), $requete); |
| } |
| } |
| } |
| } |
| } |
| if(isset($uid[0])) { |
| $id_participant = $uid[0]; |
| } else { |
| return; |
| } |
| if(isset($uid[1])) { |
| $id_individu = $uid[1]; |
| } else { |
| return; |
| } |
| $requete_suppression_individu = 'DELETE FROM ods_individus '. |
| 'WHERE oi_id_individu = '.$this->proteger($id_individu).' '. |
| 'AND oi_ce_station IN '. |
| '(SELECT os_id_station FROM ods_stations '. |
| 'WHERE os_ce_participant = '.$this->proteger($id_participant).' '. |
| ')'; |
| $suppression_individu = $this->executerRequeteSimple($requete_suppression_individu); |
| if(!$suppression_individu) { |
| // TODO: comment gère t'on les erreurs ? |
| } |
| // Envoie sur la sortie standard |
| $this->envoyer(); |
| /trunk/applications/rendu/controleurs/Liens.php |
|---|
| 127,6 → 127,7 |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery-1.4.4.min.js"></script>'; |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery_ui/jquery-ui-1.8.9.custom.min.js"></script>'; |
| $scripts .= '<script> var urlBaseJrest = "'.Config::get('url_jrest').'";</script>'; |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'iconmaker.js"></script>'; |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'rendu.js"></script>'; |
| return $scripts; |
| /trunk/applications/rendu/.directory |
|---|
| New file |
| 0,0 → 1,5 |
| [Dolphin] |
| Timestamp=2011,2,17,11,45,18 |
| [Settings] |
| ShowDotFiles=true |
| /trunk/applications/rendu/configurations/.directory |
|---|
| New file |
| 0,0 → 1,5 |
| [Dolphin] |
| Timestamp=2011,2,17,11,48,5 |
| [Settings] |
| ShowDotFiles=true |
| /trunk/applications/rendu/bibliotheque/.directory |
|---|
| New file |
| 0,0 → 1,5 |
| [Dolphin] |
| Timestamp=2011,2,17,11,45,24 |
| [Settings] |
| ShowDotFiles=true |
| /trunk/applications/rendu/squelettes/images/marqueur_fructification.png |
|---|
| Cannot display: file marked as a binary type. |
| svn:mime-type = image/png |
| /trunk/applications/rendu/squelettes/images/marqueur_fructification.png |
|---|
| New file |
| Property changes: |
| Added: svn:mime-type |
| +image/png |
| \ No newline at end of property |
| /trunk/applications/rendu/squelettes/images/marqueur_feuillaison.png |
|---|
| Cannot display: file marked as a binary type. |
| svn:mime-type = image/png |
| /trunk/applications/rendu/squelettes/images/marqueur_feuillaison.png |
|---|
| New file |
| Property changes: |
| Added: svn:mime-type |
| +image/png |
| \ No newline at end of property |
| /trunk/applications/rendu/squelettes/images/marqueur_senescence.png |
|---|
| Cannot display: file marked as a binary type. |
| svn:mime-type = image/png |
| /trunk/applications/rendu/squelettes/images/marqueur_senescence.png |
|---|
| New file |
| Property changes: |
| Added: svn:mime-type |
| +image/png |
| \ No newline at end of property |
| /trunk/applications/rendu/squelettes/images/marqueur_floraison.png |
|---|
| Cannot display: file marked as a binary type. |
| svn:mime-type = image/png |
| /trunk/applications/rendu/squelettes/images/marqueur_floraison.png |
|---|
| New file |
| Property changes: |
| Added: svn:mime-type |
| +image/png |
| \ No newline at end of property |
| /trunk/applications/rendu/squelettes/images/marqueur.png |
|---|
| Cannot display: file marked as a binary type. |
| svn:mime-type = image/png |
| /trunk/applications/rendu/squelettes/images/marqueur.png |
|---|
| New file |
| Property changes: |
| Added: svn:mime-type |
| +image/png |
| \ No newline at end of property |
| /trunk/applications/rendu/squelettes/images/marqueur_1ere_apparition.png |
|---|
| Cannot display: file marked as a binary type. |
| svn:mime-type = image/png |
| /trunk/applications/rendu/squelettes/images/marqueur_1ere_apparition.png |
|---|
| New file |
| Property changes: |
| Added: svn:mime-type |
| +image/png |
| \ No newline at end of property |
| /trunk/applications/rendu/squelettes/css/rendu.css |
|---|
| 44,3 → 44,25 |
| display: table-cell; |
| text-align:center; |
| } |
| /* =========================== Styles des différents stades ============================ */ |
| .stade_feuillaison { |
| background-color: #ACC700; |
| } |
| .stade_floraison { |
| background-color: #B549B9; |
| } |
| .stade_fructification { |
| background-color: #FF7F00; |
| } |
| .stade_senescence { |
| background-color: #BF3600; |
| } |
| .stade_1ere_apparition { |
| background-color: #B549B9; |
| } |
| /trunk/applications/rendu/squelettes/js/iconmaker.js |
|---|
| New file |
| 0,0 → 1,228 |
| /** |
| * @name MapIconMaker |
| * @version 1.1 |
| * @author Pamela Fox |
| * @copyright (c) 2008 Pamela Fox |
| * @fileoverview This gives you static functions for creating dynamically |
| * sized and colored marker icons using the Charts API marker output. |
| */ |
| /* |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| /** |
| * @name MarkerIconOptions |
| * @class This class represents optional arguments to {@link createMarkerIcon}, |
| * {@link createFlatIcon}, or {@link createLabeledMarkerIcon}. Each of the |
| * functions use a subset of these arguments. See the function descriptions |
| * for the list of supported options. |
| * @property {Number} [width=32] Specifies, in pixels, the width of the icon. |
| * The width may include some blank space on the side, depending on the |
| * height of the icon, as the icon will scale its shape proportionately. |
| * @property {Number} [height=32] Specifies, in pixels, the height of the icon. |
| * @property {String} [primaryColor="#ff0000"] Specifies, as a hexadecimal |
| * string, the color used for the majority of the icon body. |
| * @property {String} [cornerColor="#ffffff"] Specifies, as a hexadecimal |
| * string, the color used for the top corner of the icon. If you'd like the |
| * icon to have a consistent color, make the this the same as the |
| * {@link primaryColor}. |
| * @property {String} [strokeColor="#000000"] Specifies, as a hexadecimal |
| * string, the color used for the outside line (stroke) of the icon. |
| * @property {String} [shadowColor="#000000"] Specifies, as a hexadecimal |
| * string, the color used for the shadow of the icon. |
| * @property {String} [label=""] Specifies a character or string to display |
| * inside the body of the icon. Generally, one or two characters looks best. |
| * @property {String} [labelColor="#000000"] Specifies, as a hexadecimal |
| * string, the color used for the label text. |
| * @property {Number} [labelSize=0] Specifies, in pixels, the size of the label |
| * text. If set to 0, the text auto-sizes to fit the icon body. |
| * @property {String} [shape="circle"] Specifies shape of the icon. Current |
| * options are "circle" for a circle or "roundrect" for a rounded rectangle. |
| * @property {Boolean} [addStar = false] Specifies whether to add a star to the |
| * edge of the icon. |
| * @property {String} [starPrimaryColor="#FFFF00"] Specifies, as a hexadecimal |
| * string, the color used for the star body. |
| * @property {String} [starStrokeColor="#0000FF"] Specifies, as a hexadecimal |
| * string, the color used for the outside line (stroke) of the star. |
| */ |
| /** |
| * This namespace contains functions that you can use to easily create |
| * dynamically sized, colored, and labeled icons. |
| * @namespace |
| */ |
| var MapIconMaker = {}; |
| /** |
| * Creates an icon based on the specified options in the |
| * {@link MarkerIconOptions} argument. |
| * Supported options are: width, height, primaryColor, |
| * strokeColor, and cornerColor. |
| * @param {MarkerIconOptions} [opts] |
| * @return {GIcon} |
| */ |
| MapIconMaker.createMarkerIcon = function (opts) { |
| var width = opts.width || 32; |
| var height = opts.height || 32; |
| var primaryColor = opts.primaryColor || "#ff0000"; |
| var strokeColor = opts.strokeColor || "#000000"; |
| var cornerColor = opts.cornerColor || "#ffffff"; |
| var baseUrl = "http://chart.apis.google.com/chart?cht=mm"; |
| var iconUrl = baseUrl + "&chs=" + width + "x" + height + |
| "&chco=" + cornerColor.replace("#", "") + "," + |
| primaryColor.replace("#", "") + "," + |
| strokeColor.replace("#", "") + "&ext=.png"; |
| var icon = new GIcon(G_DEFAULT_ICON); |
| icon.image = iconUrl; |
| icon.iconSize = new GSize(width, height); |
| icon.shadowSize = new GSize(Math.floor(width * 1.6), height); |
| icon.iconAnchor = new GPoint(width / 2, height); |
| icon.infoWindowAnchor = new GPoint(width / 2, Math.floor(height / 12)); |
| icon.printImage = iconUrl + "&chof=gif"; |
| icon.mozPrintImage = iconUrl + "&chf=bg,s,ECECD8" + "&chof=gif"; |
| iconUrl = baseUrl + "&chs=" + width + "x" + height + |
| "&chco=" + cornerColor.replace("#", "") + "," + |
| primaryColor.replace("#", "") + "," + |
| strokeColor.replace("#", ""); |
| icon.transparent = iconUrl + "&chf=a,s,ffffff11&ext=.png"; |
| icon.imageMap = [ |
| width / 2, height, |
| (7 / 16) * width, (5 / 8) * height, |
| (5 / 16) * width, (7 / 16) * height, |
| (7 / 32) * width, (5 / 16) * height, |
| (5 / 16) * width, (1 / 8) * height, |
| (1 / 2) * width, 0, |
| (11 / 16) * width, (1 / 8) * height, |
| (25 / 32) * width, (5 / 16) * height, |
| (11 / 16) * width, (7 / 16) * height, |
| (9 / 16) * width, (5 / 8) * height |
| ]; |
| for (var i = 0; i < icon.imageMap.length; i++) { |
| icon.imageMap[i] = parseInt(icon.imageMap[i]); |
| } |
| return icon; |
| }; |
| /** |
| * Creates a flat icon based on the specified options in the |
| * {@link MarkerIconOptions} argument. |
| * Supported options are: width, height, primaryColor, |
| * shadowColor, label, labelColor, labelSize, and shape.. |
| * @param {MarkerIconOptions} [opts] |
| * @return {GIcon} |
| */ |
| MapIconMaker.createFlatIcon = function (opts) { |
| var width = opts.width || 32; |
| var height = opts.height || 32; |
| var primaryColor = opts.primaryColor || "#ff0000"; |
| var shadowColor = opts.shadowColor || "#000000"; |
| var label = MapIconMaker.escapeUserText_(opts.label) || ""; |
| var labelColor = opts.labelColor || "#000000"; |
| var labelSize = opts.labelSize || 0; |
| var shape = opts.shape || "circle"; |
| var shapeCode = (shape === "circle") ? "it" : "itr"; |
| var baseUrl = "http://chart.apis.google.com/chart?cht=" + shapeCode; |
| var iconUrl = baseUrl + "&chs=" + width + "x" + height + |
| "&chco=" + primaryColor.replace("#", "") + "," + |
| shadowColor.replace("#", "") + "ff,ffffff01" + |
| "&chl=" + label + "&chx=" + labelColor.replace("#", "") + |
| "," + labelSize; |
| var icon = new GIcon(G_DEFAULT_ICON); |
| icon.image = iconUrl + "&chf=bg,s,00000000" + "&ext=.png"; |
| icon.iconSize = new GSize(width, height); |
| icon.shadowSize = new GSize(0, 0); |
| icon.iconAnchor = new GPoint(width / 2, height / 2); |
| icon.infoWindowAnchor = new GPoint(width / 2, height / 2); |
| icon.printImage = iconUrl + "&chof=gif"; |
| icon.mozPrintImage = iconUrl + "&chf=bg,s,ECECD8" + "&chof=gif"; |
| icon.transparent = iconUrl + "&chf=a,s,ffffff01&ext=.png"; |
| icon.imageMap = []; |
| if (shapeCode === "itr") { |
| icon.imageMap = [0, 0, width, 0, width, height, 0, height]; |
| } else { |
| var polyNumSides = 8; |
| var polySideLength = 360 / polyNumSides; |
| var polyRadius = Math.min(width, height) / 2; |
| for (var a = 0; a < (polyNumSides + 1); a++) { |
| var aRad = polySideLength * a * (Math.PI / 180); |
| var pixelX = polyRadius + polyRadius * Math.cos(aRad); |
| var pixelY = polyRadius + polyRadius * Math.sin(aRad); |
| icon.imageMap.push(parseInt(pixelX), parseInt(pixelY)); |
| } |
| } |
| return icon; |
| }; |
| /** |
| * Creates a labeled marker icon based on the specified options in the |
| * {@link MarkerIconOptions} argument. |
| * Supported options are: primaryColor, strokeColor, |
| * starPrimaryColor, starStrokeColor, label, labelColor, and addStar. |
| * @param {MarkerIconOptions} [opts] |
| * @return {GIcon} |
| */ |
| MapIconMaker.createLabeledMarkerIcon = function (opts) { |
| var primaryColor = opts.primaryColor || "#DA7187"; |
| var strokeColor = opts.strokeColor || "#000000"; |
| var starPrimaryColor = opts.starPrimaryColor || "#FFFF00"; |
| var starStrokeColor = opts.starStrokeColor || "#0000FF"; |
| var label = MapIconMaker.escapeUserText_(opts.label) || ""; |
| var labelColor = opts.labelColor || "#000000"; |
| var addStar = opts.addStar || false; |
| var pinProgram = (addStar) ? "pin_star" : "pin"; |
| var baseUrl = "http://chart.apis.google.com/chart?cht=d&chdp=mapsapi&chl="; |
| var iconUrl = baseUrl + pinProgram + "'i\\" + "'[" + label + |
| "'-2'f\\" + "hv'a\\]" + "h\\]o\\" + |
| primaryColor.replace("#", "") + "'fC\\" + |
| labelColor.replace("#", "") + "'tC\\" + |
| strokeColor.replace("#", "") + "'eC\\"; |
| if (addStar) { |
| iconUrl += starPrimaryColor.replace("#", "") + "'1C\\" + |
| starStrokeColor.replace("#", "") + "'0C\\"; |
| } |
| iconUrl += "Lauto'f\\"; |
| var icon = new GIcon(G_DEFAULT_ICON); |
| icon.image = iconUrl + "&ext=.png"; |
| icon.iconSize = (addStar) ? new GSize(23, 39) : new GSize(21, 34); |
| return icon; |
| }; |
| /** |
| * Utility function for doing special chart API escaping first, |
| * and then typical URL escaping. Must be applied to user-supplied text. |
| * @private |
| */ |
| MapIconMaker.escapeUserText_ = function (text) { |
| if (text === undefined) { |
| return null; |
| } |
| text = text.replace(/@/, "@@"); |
| text = text.replace(/\\/, "@\\"); |
| text = text.replace(/'/, "@'"); |
| text = text.replace(/\[/, "@["); |
| text = text.replace(/\]/, "@]"); |
| return encodeURIComponent(text); |
| }; |
| /trunk/applications/rendu/squelettes/js/rendu.js |
|---|
| 329,6 → 329,13 |
| tableau_marqueurs = new Array(); |
| } |
| function obtenirMarqueurPourStade(stade) { |
| iconeStade = '../images/marqueur_'+stade+'.png'; |
| return iconeStade; |
| } |
| function formaterContenuFenetre(infos_obs) { |
| contenu_fenetre = ''; |
| /trunk/applications/saisie/controleurs/Liens.php |
|---|
| 100,6 → 100,12 |
| public static function getUrlBaseComplete() { |
| return 'http://'.$_SERVER['SERVER_NAME'].str_replace(realpath($_SERVER['DOCUMENT_ROOT']),'',realpath(Application::getChemin())).'/'; |
| } |
| public static function getUrlDefaut() { |
| $params = array(); |
| return self::construireUrl($params); |
| } |
| public static function getUrlConsultationFicheStation($id_station) { |
| 147,6 → 153,15 |
| return self::construireUrl($params); |
| } |
| public static function getUrlFormulaireSuppressionStation() { |
| $params = array( |
| 'module' => 'Station', |
| 'action' => 'supprimerStation' |
| ); |
| return self::construireUrl($params); |
| } |
| public static function getUrlFormulaireAjoutEspece($id_station) { |
| $params = array( |
| 205,6 → 220,40 |
| ); |
| return self::construireUrl($params); |
| } |
| public static function getUrlFormulaireModificationIndividu($id_station, $id_espece, $id_individu) { |
| $params = array( |
| 'module' => 'Individu', |
| 'action' => 'afficherFormulaireModificationIndividu', |
| 'id_station' => $id_station, |
| 'id_espece' => $id_espece, |
| 'id_individu' => $id_individu |
| ); |
| return self::construireUrl($params); |
| } |
| public static function getUrlValidationFormulaireModificationIndividu($id_station, $id_espece, $id_individu) { |
| $params = array( |
| 'module' => 'Individu', |
| 'action' => 'validerFormulaireModificationIndividu', |
| 'id_station' => $id_station, |
| 'id_espece' => $id_espece, |
| 'id_individu' => $id_individu |
| ); |
| return self::construireUrl($params); |
| } |
| public static function getUrlSuppressionIndividu($id_station, $id_espece, $id_individu) { |
| $params = array( |
| 'module' => 'Individu', |
| 'action' => 'supprimerIndividu', |
| 'id_station' => $id_station |
| ); |
| return self::construireUrl($params); |
| } |
| public static function getUrlConsultationEspeceStation($id_station, $id_espece, $annee = null) { |
| 222,7 → 271,7 |
| return self::construireUrl($params); |
| } |
| public static function getUrlFormulaireModificationObservation($id_station,$id_espece, $id_individu, $annee = null) { |
| if($annee == null) { |
| 259,6 → 308,21 |
| return self::construireUrl($params); |
| } |
| public static function getUrlExportDonneesObservations() { |
| return Config::get('url_jrest').'OdsExport/FichierExportObservationCSV/'; |
| } |
| public static function getUrlExportDonneesObservationsPourUtilisateur() { |
| $params = array( |
| 'module' => 'Export', |
| 'action' => 'envoyerFichierCSVExportObservation' |
| ); |
| return self::construireUrl($params); |
| } |
| public static function renvoyerStylesInclus() { |
| $styles = ''; |
| 272,11 → 336,18 |
| public static function renvoyerScriptsInclus() { |
| $scripts = ''; |
| $scripts = '<script type="text/javascript" language="javascript">'. |
| ' var urlBaseJrest = "'.Config::get('url_jrest').'"; '. |
| '</script>'; |
| $scripts .= '<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>'; |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery-1.4.4.min.js"></script>'; |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery_ui/jquery-ui-1.8.6.custom.min.js"></script>'; |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'saisie.js"></script>'; |
| if(AppControleur::getUtilisateur()->estAdmin()) { |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'saisie_admin.js"></script>'; |
| } |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery_ui/jquery.ui.datepicker.js"></script>'; |
| $scripts .= '<script type="text/javascript" src="'.self::getUrlScript().'jquery_ui/jquery.ui.datepicker-fr.js"></script>'; |
| /trunk/applications/saisie/controleurs/Utilisateur.php |
|---|
| 2,7 → 2,14 |
| abstract class Utilisateur extends aControleur { |
| public function setIdentite($identite) { |
| $_SESSION['ods_saisie']['identite'] = $identite; |
| $id_identite = $this->getIdUtilisateurPourNom($identite); |
| if($id_identite) { |
| $_SESSION['ods_saisie']['identite'] = $id_identite; |
| } else { |
| $_SESSION['ods_saisie']['identite'] = $this->getIdentifiantNumerique(); |
| } |
| } |
| public function getIdentite() { |
| 16,6 → 23,25 |
| } |
| } |
| public function getIdentiteNom() { |
| if($this->estAdmin()) { |
| if(!isset($_SESSION['ods_saisie']['identite']) || $_SESSION['ods_saisie']['identite'] == '') { |
| return $this->getNom(); |
| } |
| return $this->getNomUtilisateurPourId($_SESSION['ods_saisie']['identite']); |
| } else { |
| return $this->getNom(); |
| } |
| } |
| public function getNomUtilisateurPourId($id) { |
| return ''; |
| } |
| public function getIdUtilisateurPourNom($nom) { |
| return 0; |
| } |
| public function getIdentifiantNumerique() { |
| return 0; |
| } |
| /trunk/applications/saisie/controleurs/Individu.php |
|---|
| 41,6 → 41,10 |
| public function getFormulaireSaisieIndividu($donnees = array()) { |
| if($donnees == array()) { |
| $donnees['individu_nom'] = ''; |
| } |
| $donnees['id_station'] = $_GET['id_station']; |
| if(!isset($donnees['id_espece'])) { |
| 52,9 → 56,22 |
| $donnees['informations_espece'] = $espece_dao->getInformationsEspece($donnees['id_espece']); |
| return $this->getVue('formulaires/individu_saisie',$donnees); |
| } |
| // +---------------------------------------------------------------------------------------------------------------+ |
| // METHODES GENERIQUES |
| public function afficherFormulaireModificationIndividu($donnees = array()) { |
| $individu_dao = new IndividuDao(); |
| $id_individu = $_GET['id_individu']; |
| $donnees['infos_individu'] = $individu_dao->getInformationsIndividu($id_individu); |
| $donnees['id_station'] = $_GET['id_station']; |
| $donnees['id_espece'] = $_GET['id_espece']; |
| $espece_dao = new EspeceDao(); |
| $donnees['informations_espece'] = $espece_dao->getInformationsEspece($donnees['id_espece']); |
| $this->setSortie(self::RENDU_CORPS,$this->getVue('formulaires/individu_modification',$donnees)); |
| } |
| public function afficherListeIndividu() { |
| $this->setSortie(self::RENDU_CORPS, $this->getListeIndividu()); |
| 82,6 → 99,10 |
| $observation = new Observation(); |
| if(trim($individu['nom']) == '') { |
| $individu['nom'] = 'Individu sans nom'; |
| } |
| $individu['observations'] = $observation->getListeObservationsPourIndividu($individu['id_individu']); |
| $individu['url'] = Liens::getUrlConsultationFicheIndividu($id_station, $id_espece, $individu['id_individu']); |
| } |
| 94,7 → 115,7 |
| return $this->getVue('listes/evenement_liste', $donnees); |
| } |
| public function afficherInformationsIndividu() { |
| public function afficherInformationsIndividu($donnees = array()) { |
| $id_individu = $_GET['id_individu']; |
| $id_espece = $_GET['id_espece']; |
| 113,8 → 134,21 |
| // METHODES DE VALIDATION DE FORMULAIRE |
| public function validerFormulaireSaisieIndividu() { |
| $valeurs_verifiees = $this->collecterValeursFormulaireSaisieIndividu(); |
| $valeurs_collectees = $this->collecterValeursFormulaireSaisieIndividu(); |
| $verification_ou_erreurs = $this->verifierValeursIndividu($valeurs_collectees); |
| if($verification_ou_erreurs !== true) { |
| $donnees = $valeurs_collectees; |
| $donnees['erreurs'] = $verification_ou_erreurs; |
| $this->afficherFormulaireSaisieIndividu($donnees); |
| return; |
| } |
| $valeurs_verifiees = $valeurs_collectees; |
| $individu_dao = new IndividuDao(); |
| $retour_ajout_individu = $individu_dao->ajouterIndividu($valeurs_verifiees); |
| 122,7 → 156,7 |
| $this->afficherListeIndividu(); |
| $this->setNavigation(); |
| } else { |
| $this->afficherFormulaireSaisieIndividu(); |
| $this->afficherFormulaireSaisieIndividu($donnees); |
| } |
| } |
| 140,13 → 174,90 |
| $valeurs_verifiees['id_station'] = $_POST['station']; |
| $valeurs_verifiees['id_espece'] = $_POST['espece']; |
| $valeurs_verifiees['individu_nom'] = $_POST['individu_nom']; |
| //TODO: verifier valeurs plus complètement |
| return $valeurs_verifiees; |
| } |
| private function collecterValeursFormulaireModificationIndividu() { |
| $valeurs_verifiees['id_station'] = $_POST['id_station']; |
| $valeurs_verifiees['id_espece'] = $_POST['id_espece']; |
| $valeurs_verifiees['individu_nom'] = $_POST['individu_nom']; |
| $valeurs_verifiees['id_individu'] = $_POST['id_individu']; |
| return $valeurs_verifiees; |
| } |
| private function verifierValeursIndividu($valeurs_a_verifier) { |
| $erreurs = array(); |
| foreach($valeurs_a_verifier as $champ => $valeur) { |
| if(trim($valeur) == '') { |
| $erreurs[$champ] .= ' Ce champ ne peut pas être vide'; |
| } |
| } |
| if(!empty($erreurs)) { |
| return $erreurs; |
| } |
| return true; |
| } |
| public function validerFormulaireModificationIndividu() { |
| $valeurs_collectees = $this->collecterValeursFormulaireModificationIndividu(); |
| $verification_ou_erreurs = $this->verifierValeursIndividu($valeurs_collectees); |
| if($verification_ou_erreurs !== true) { |
| $donnees = $valeurs_collectees; |
| $donnees['erreurs'] = $verification_ou_erreurs; |
| $this->afficherFormulaireModificationIndividu($donnees); |
| return; |
| } |
| $valeurs_verifiees = $valeurs_collectees; |
| $id_individu = $valeurs_collectees['id_individu']; |
| $individu_dao = new IndividuDao(); |
| $retour_modification_individu = $individu_dao->modifierIndividu($id_individu, $valeurs_verifiees); |
| $this->afficherInformationsIndividu(); |
| } |
| public function supprimerIndividu() { |
| $id_individu_a_supprimer = $_POST['id_individu_a_supprimer']; |
| $observations_individu = $this->getObservationsPourIndividu($id_individu_a_supprimer); |
| if(count($observations_individu) > 0) { |
| $donnees = array(); |
| $donnees['erreurs'] = 'Impossible de supprimer un individu pour lequel on a saisi des données'; |
| $this->id_individu_en_cours = $id_individu_a_supprimer; |
| $this->afficherInformationsIndividu($donnees); |
| } else { |
| $individu_dao = new IndividuDao(); |
| $individu_dao->supprimerIndividu($id_individu_a_supprimer); |
| $gestion_station = new Station(); |
| $_GET['id_station'] = $_POST['id_station']; |
| $this->setSortie(self::RENDU_CORPS, $gestion_station->getFicheInformationsStation()); |
| } |
| } |
| // +---------------------------------------------------------------------------------------------------------------+ |
| // METHODES POUR FABRIQUER LE MENU |
| public function setNavigation() { |
| /trunk/applications/saisie/controleurs/AppControleur.php |
|---|
| 105,6 → 105,11 |
| self::$utilisateur = new $classe_utilisateur(); |
| if(self::$utilisateur->estAdmin()) { |
| if($nouvelle_identite = self::changementIdentiteDemande()) { |
| self::getUtilisateur()->setIdentite($nouvelle_identite); |
| } |
| self::afficherBarreAdmin(); |
| } |
| } |
| 124,6 → 129,15 |
| return self::getUtilisateur()->estIdentifie(); |
| } |
| public static function changementIdentiteDemande() { |
| if(self::getUtilisateur()->estAdmin() && isset($_POST['identite_utilisateur'])) { |
| return $_POST['identite_utilisateur']; |
| } |
| return false; |
| } |
| private static function afficherFormulaireIdentification() { |
| $donnees['formulaire_identification'] = self::getUtilisateur()->getFormulaireidentification(); |
| /trunk/applications/saisie/controleurs/Export.php |
|---|
| New file |
| 0,0 → 1,88 |
| <?php |
| // declare(encoding='UTF-8'); |
| /** |
| * Classe de gestion des epeces. |
| * |
| * @package Collection |
| * @category Php 5.2 |
| * @author Aurélien PERONNET <aurelien@tela-botanica.org> |
| * @copyright 2010 Tela-Botanica |
| * @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 SVN: $Id: Espece.php 152 2010-09-06 16:19:12Z jpm $ |
| */ |
| class Export extends aControleur { |
| public function __construct() { |
| parent::__construct(); |
| $this->initialiser(); |
| } |
| public function executerActionParDefaut() { |
| return $this->envoyerFichierCSVExportObservation(); |
| } |
| public function initialiser() { |
| } |
| // +---------------------------------------------------------------------------------------------------------------+ |
| // METHODES D'AFFICHAGE DE FORMULAIRE |
| public function envoyerFichierCSVExportObservation() { |
| $donnees = array(); |
| $export_dao = new ExportDao(); |
| $export = $export_dao->getExportObservations(); |
| $csv = $this->convertirTableauAssocVersCSV($export); |
| $this->envoyerFichier($csv); |
| } |
| public function convertirTableauAssocVersCSV($tableau) { |
| $csv = ''; |
| $colonnes = array_keys($tableau[0]); |
| $csv .= implode(';',$colonnes).";\n"; |
| foreach($tableau as $elements) { |
| $csv .= implode(';',$elements).";\n"; |
| } |
| return $csv; |
| } |
| public function envoyerFichier($contenu) { |
| $nom_fichier = "observations_export.csv"; |
| $chemin_fichier = Config::get('chemin_fichiers_temp').'/'.$nom_fichier; |
| file_put_contents($chemin_fichier, $contenu); |
| $contenu = file_get_contents($chemin_fichier); |
| $taille_fichier = filesize($chemin_fichier); |
| unlink($chemin_fichier); |
| ini_set('zlib.output_compression','Off'); |
| header('Pragma: public'); |
| header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
| header('Cache-Control: must-revalidate, pre-check=0, post-check=0, max-age=0'); |
| header('Content-Tranfer-Encoding: none'); |
| header('Content-Type: application/octetstream; name="'.$nom_fichier.'"'); |
| header('Content-Disposition: attachement; filename="'.$nom_fichier.'"'); |
| header('Content-Length: '.$taille_fichier); |
| echo $contenu; |
| exit(); |
| } |
| } |
| ?> |
| /trunk/applications/saisie/controleurs/Station.php |
|---|
| 161,6 → 161,28 |
| } |
| } |
| public function supprimerStation() { |
| $id_station_a_supprimer = $_POST['id_station_a_supprimer']; |
| $individus_station = $this->getIndividusStation($id_station_a_supprimer); |
| if(count($individus_station) > 0) { |
| $donnees = array(); |
| $donnees['erreurs'] = 'Impossible de supprimer une station qui contient des données'; |
| $this->id_station_en_cours = $id_station_a_supprimer; |
| $this->afficherInformationsStation($donnees); |
| } else { |
| $station_dao = new StationDao(); |
| $retour_suppression = $station_dao->supprimerStation($id_station_a_supprimer); |
| $this->setNavigation(); |
| $this->executerActionParDefaut(); |
| } |
| } |
| // +---------------------------------------------------------------------------------------------------------------+ |
| // METHODES D'AFFICHAGES D'INFORMATION |
| 172,17 → 194,26 |
| $this->setSortie(self::RENDU_CORPS, $this->getVue('listes/station_liste', $donnees)); |
| } |
| public function afficherInformationsStation() { |
| public function getFicheInformationsStation($donnees = array()) { |
| $id_station = $this->id_station_en_cours; |
| $donnees['id_station'] = $id_station; |
| $donnees['infos_station'] = $this->getInformationsStation($id_station); |
| $donnees['milieux'] = $this->getListeMilieux(); |
| $this->setSortie(self::RENDU_CORPS, $this->getVue('fiches/station_fiche', $donnees)); |
| return $this->getVue('fiches/station_fiche', $donnees); |
| } |
| public function afficherInformationsStation($donnees = array()) { |
| $infos_station = $this->getFicheInformationsStation($donnees); |
| $this->setSortie(self::RENDU_CORPS, $infos_station); |
| } |
| // +---------------------------------------------------------------------------------------------------------------+ |
| // METHODES POUR FABRIQUER LE MENU |
| /trunk/applications/saisie/controleurs/DrupalUtilisateur.php |
|---|
| 1,10 → 1,16 |
| <?php |
| class DrupalUtilisateur extends Utilisateur { |
| public function getNomUtilisateurPourId($id) { |
| return db_result(db_query("SELECT name FROM {users} WHERE uid = %d", $id)); |
| } |
| public function getIdUtilisateurPourNom($nom) { |
| return db_result(db_query("SELECT uid FROM {users} WHERE name = '%s'", $nom)); |
| } |
| public function getIdentifiantNumerique() { |
| return $GLOBALS['user']->uid; |
| } |
| public function getEmail() { |
| 20,7 → 26,7 |
| } |
| public function estAdmin() { |
| return in_array('3',array_keys($GLOBALS['user']->roles)); |
| return in_array('3',array_keys($GLOBALS['user']->roles)) || in_array('3',array_keys($GLOBALS['user']->roles)) ; |
| } |
| public function estIdentifie() { |
| /trunk/applications/saisie/configurations/config.ini |
|---|
| 54,3 → 54,5 |
| ; Emplacement du dossier de base des images pour illustrer les espèces |
| dossier_images_especes = "/home/aurelien/web/obs_saisons/documents/images_especes/" |
| url_images_especes = "http://162.38.234.9/obs_saisons/documents/images_especes/" |
| ;Emplacement du dossier des fichiers temporaires |
| chemin_fichiers_temp = /home/aurelien/web/file_tmp |
| /trunk/applications/saisie/bibliotheque/dao/ExportDao.php |
|---|
| New file |
| 0,0 → 1,33 |
| <?php |
| // declare(encoding='UTF-8'); |
| /** |
| * Modèle d'accès à la base de données pour l'export |
| * |
| * @package ODS_saisie |
| * @category php 5.2 |
| * @author Aurélien Peronnet <aurelien@tela-botanica.org> |
| * @copyright 2010 Tela-Botanica |
| * @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 SVN: $Id: StationDao.php 154 2010-09-13 12:15:11Z aurelien $ |
| * |
| */ |
| class ExportDao extends Dao { |
| const SERVICE_EXPORT = 'OdsExport'; |
| const METHODE_EXPORT_EVENEMENTS = 'ExportObservationPlat'; |
| /** |
| * Retourne l'ensemble des especes. |
| * |
| * @return array un tableau contenant les informations sur les evenement d'une espece. |
| */ |
| public function getExportObservations($id_espece) { |
| $url = $this->url_jrest.self::SERVICE_EXPORT.'/'.self::METHODE_EXPORT_EVENEMENTS.'/?utilisateur='.AppControleur::getIdUtilisateur(); |
| $json = $this->envoyerRequeteConsultation($url); |
| $donnees = json_decode($json, true); |
| return $donnees; |
| } |
| } |
| /trunk/applications/saisie/bibliotheque/dao/StationDao.php |
|---|
| 71,5 → 71,25 |
| return false; |
| } |
| public function supprimerStation($id_station) { |
| $donnees['id_station'] = $id_station; |
| $donnees['id_participant'] = AppControleur::getIdUtilisateur(); |
| if (is_numeric($id_station)) { |
| $url = $this->url_jrest.self::SERVICE_STATION."/".AppControleur::getIdUtilisateur()."/".$id_station; |
| $json = $this->envoyerRequeteSuppression($url, $donnees); |
| $donnees_retour = json_decode($json, true); |
| if($donnees_retour['reponse'] == 'OK') { |
| return true; |
| } |
| } |
| return false; |
| } |
| } |
| ?> |
| /trunk/applications/saisie/bibliotheque/dao/IndividuDao.php |
|---|
| 70,14 → 70,36 |
| if (is_numeric($id_individu)) { |
| $url = $this->url_jrest.self::SERVICE_INDIVIDU."/$id_individu"; |
| $json = $this->envoyerRequeteModif($url, $donnees); |
| $donnees = json_decode($json, true); |
| if (true) { |
| //TODO: verifier modification |
| } |
| if($donnees_retour['reponse'] == 'OK') { |
| return true; |
| } |
| } |
| return true; |
| return false; |
| } |
| public function supprimerIndividu($id_individu) { |
| $donnees = $valeurs_individu_verifiees; |
| if (is_numeric($id_individu)) { |
| $url = $this->url_jrest.self::SERVICE_INDIVIDU."/".AppControleur::getIdUtilisateur()."/".$id_individu; |
| $json = $this->envoyerRequeteSuppression($url, $donnees); |
| $donnees = json_decode($json, true); |
| $donnees_retour = json_decode($json, true); |
| if($donnees_retour['reponse'] == 'OK') { |
| return true; |
| } |
| } |
| return false; |
| } |
| } |
| ?> |
| /trunk/applications/saisie/squelettes/js/saisie_admin.js |
|---|
| New file |
| 0,0 → 1,155 |
| var urlBaseJrest = 'http://162.38.234.9/obs_saisons/applications/jrest/'; |
| /** |
| ************************************************************************************************ |
| ************************************************************************************************ |
| Fonctions pour l'administration |
| ************************************************************************************************ |
| ************************************************************************************************ |
| **/ |
| var liste_utilisateurs_en_cours; |
| var indice_utilisateur_en_cours; |
| var timerRequeteAutocompletion; |
| var timerAffichageAutocompletion; |
| function ajouterAutoCompletionUtilisateurs() { |
| $('input#identite_utilisateur').after('<div class="conteneur_suggestions_utilisateur"></div>'); |
| $('input#identite_utilisateur').parent().addClass('autocompletion'); |
| $('input#identite_utilisateur').attr('autocomplete','off'); |
| $('.conteneur_suggestions_utilisateur').hide(); |
| rendreListeAutoCompletionUtilisateursInteractive('input#identite_utilisateur'); |
| } |
| function obtenirInformationsUtilisateur(nom_utilisateur) { |
| if(jQuery.trim(nom_utilisateur) == '') { |
| $('.conteneur_suggestions_utilisateur').hide(); |
| return; |
| } |
| $.get(urlBaseJrest+'OdsUtilisateur/'+nom_utilisateur, function(data) { |
| infos_utilisateurs = jQuery.parseJSON(data); |
| afficherListeAutoCompletionUtilisateur(infos_utilisateurs); |
| }); |
| } |
| function afficherListeAutoCompletionUtilisateur(tableau_utilisateur) { |
| liste_utilisateurs_en_cours = tableau_utilisateur; |
| html_liste_utilisateurs = '<ul class="liste_suggestions">'; |
| for(i = 0; i < tableau_utilisateur.length; i++) { |
| html_liste_utilisateurs += '<li id="utilisateur_'+i+'" class="element_auto_completion_utilisateur">'+tableau_utilisateur[i]['nom']+'</li>'; |
| } |
| html_liste_utilisateurs += '</ul>'; |
| $('.conteneur_suggestions_utilisateur').html(html_liste_utilisateurs); |
| $('.element_auto_completion_utilisateur').hover(function() { |
| indice = $(this).attr('id').split('_')[1]; |
| mettreEnSurbrillanceUtilisateur(indice); |
| }); |
| $('.element_auto_completion_utilisateur').click(function() { |
| $('#identite_utilisateur').val($(this).val()); |
| $('#form_changement_identite').submit(); |
| }); |
| if(tableau_utilisateur.length > 0) { |
| $('.conteneur_suggestions_utilisateur').show(); |
| mettreEnSurbrillanceUtilisateur(0); |
| } |
| } |
| function mettreEnSurbrillanceUtilisateur(indice) { |
| if(indice_utilisateur_en_cours != null) { |
| $('#utilisateur_'+indice_utilisateur_en_cours).removeClass('element_selectionne'); |
| } |
| $('#utilisateur_'+indice).addClass('element_selectionne'); |
| indice_utilisateur_en_cours = indice; |
| reprogrammerTimerPourCacherListeAutoCompletion(); |
| } |
| function rendreListeAutoCompletionUtilisateursInteractive(selecteur) { |
| $(selecteur).keyup(function(event) { |
| if(event.which == 8 || (event.which >= 48 && event.which <= 90)) { |
| reprogrammerTimerPourCacherListeAutoCompletion(); |
| reprogrammerTimerPourLancerRequeteUtilisateur(); |
| } |
| }); |
| $(selecteur).keydown(function(event) { |
| reprogrammerTimerPourCacherListeAutoCompletion(); |
| // entree |
| if(event.which==13){ |
| selectionnerUtilisateur(indice_utilisateur_en_cours); |
| } |
| // haut |
| if(event.which == 38){ |
| if(indice_utilisateur_en_cours > 0) { |
| mettreEnSurbrillanceUtilisateur(indice_utilisateur_en_cours - 1); |
| } |
| } |
| // bas |
| if(event.which == 40){ |
| if(indice_utilisateur_en_cours < liste_utilisateurs_en_cours.length - 1) { |
| mettreEnSurbrillanceUtilisateur(indice_utilisateur_en_cours + 1); |
| } |
| } |
| }); |
| $('.conteneur_suggestions_utilisateur').blur(function() { |
| $('.conteneur_suggestions_utilisateur').hide(); |
| }); |
| } |
| function reprogrammerTimerPourCacherListeAutoCompletion() { |
| if(timerAffichageAutocompletion != null) { |
| window.clearTimeout(timerAffichageAutocompletion); |
| } |
| timerAffichageAutocompletion = window.setTimeout(function() { |
| $('.conteneur_suggestions_utilisateur').hide(); |
| }, 2000); |
| } |
| function reprogrammerTimerPourLancerRequeteUtilisateur() { |
| if(timerRequeteAutocompletion != null) { |
| window.clearTimeout(timerRequeteAutocompletion); |
| } |
| timerRequeteAutocompletion = window.setTimeout(function() { |
| obtenirInformationsUtilisateur($('input#identite_utilisateur').val()); |
| }, 350); |
| } |
| function selectionnerUtilisateur(indice) { |
| infos_utilisateur = liste_utilisateurs_en_cours[indice]; |
| $('input#identite_utilisateur').val(infos_utilisateur['nom']); |
| $('.conteneur_suggestions_utilisateur').hide(); |
| } |
| $('#identite_utilisateur').ready(function() { |
| ajouterAutoCompletionUtilisateurs(); |
| }); |
| /trunk/applications/saisie/squelettes/js/saisie.js |
|---|
| 1,5 → 1,3 |
| var urlBaseJrest = 'http://162.38.234.9/obs_saisons/applications/jrest/'; |
| function getUrlBaseJrest() { |
| url_page_courante = document.URL; |
| 183,6 → 181,9 |
| $('#'+id_element).val(dateText); |
| donnees_obs = collecterDonneesMiniFormulaire(id_formulaire); |
| envoyerRequeteAjaxValidationMiniFormulaire(donnees_obs, id_formulaire); |
| }, |
| onClose: function(dateText, inst) { |
| gererFermetureMiniCalendrier(dateText,id_formulaire); |
| } |
| }); |
| 198,6 → 199,19 |
| });*/ |
| } |
| function gererFermetureMiniCalendrier(dateText, id_formulaire) { |
| ancienne_valeur_date = htmlEnCours; |
| window.alert(ancienne_valeur_date); |
| if(dateText == '' && ancienne_valeur_date != dateText) { |
| if(window.confirm("Voulez vous supprimer cette observation ?")) { |
| remplacerMiniFormulaireParElementDate(id_formulaire); |
| } |
| } |
| } |
| function remplacerElementDateParFormulaireAjax(id_element, conteneur_selectionne) { |
| if(elementEnCours != null) { |
| 222,10 → 236,6 |
| valeur_date_pour_stade = $('#'+id_element).val(); |
| /*if(!estUneDateValide(valeur_date_pour_stade)) { |
| valeur_date_pour_stade = htmlEnCours; |
| }*/ |
| elementEnCours.html('<span id="'+id_element+'">'+valeur_date_pour_stade+' </span>'); |
| elementEnCours.removeClass('element_clique'); |
| elementEnCours = null; |
| 583,7 → 593,28 |
| initialiserCarte(); |
| }); |
| /** |
| ************************************************************************************************ |
| ************************************************************************************************ |
| Fonctions généralistes s'appliquant automatiquement à certaines classes css |
| ************************************************************************************************ |
| ************************************************************************************************ |
| **/ |
| function initialiserLiensSuppression() { |
| $('.lien_suppression').click(function() { |
| return window.confirm('Êtes vous sur de vouloir supprimer ?'); |
| }); |
| } |
| $(document).ready(function() { |
| initialiserLiensSuppression(); |
| }); |
| /** |
| ************************************************************************************************ |
| ************************************************************************************************ |
| /trunk/applications/saisie/squelettes/navigation/barre_admin.tpl.html |
|---|
| 1,7 → 1,10 |
| <!-- ODS_SAISIE - DEBUT BARRE ADMIN --> |
| <div id="barre_admin"> |
| Vous regardez les données de : <input type="text" name="identite_utilisateur" value="<?= AppControleur::getNomUtilisateur(); ?>" id="identite_utilisateur"> |
| <form action="<?= Liens::getUrlDefaut(); ?>" id="form_changement_identite" method="post"> |
| Vous regardez les données de : <input type="text" id="identite_utilisateur" size="10" name="identite_utilisateur" value="<?= AppControleur::getUtilisateur()->getIdentiteNom(); ?>" /> |
| </form> |
| <span class="export_observation droite"> |
| <a href="<?= Liens::getUrlExportDonneesObservations() ?>" id="lien_export_observation"> Exporter les observations des membres </a> |
| </span> |
| </div> |
| <!-- ODS_SAISIE - FIN MENU NAVIGATION --> |
| /trunk/applications/saisie/squelettes/navigation/menu.tpl.html |
|---|
| 8,7 → 8,7 |
| </div> |
| <div id="saisie_menu"> |
| <ul class=menu"> |
| <ul class="ods_menu"> |
| <?php if (isset($stations)) : ?> |
| <?php foreach ($stations as $station) : ?> |
| 21,7 → 21,7 |
| <a href="<?= $espece['url'] ?>"><?= $espece['nom_vernaculaire']?></a></li> |
| <?php endforeach; ?> |
| <li class="item_menu_espece espece_ajout <?= ($id_espece_en_cours == 'saisie') ? 'espece_en_cours"' : '' ?>"> |
| <a href="<?= Liens::getUrlFormulaireAjoutEspece($station['id']) ?>"> Nouvelle espece </a> |
| <a href="<?= Liens::getUrlFormulaireAjoutEspece($station['id']) ?>"> Nouvelle espèce </a> |
| </li> |
| </ul> |
| <?php endif; ?> |
| 31,6 → 31,13 |
| <li class="item_menu_station station_ajout <?= ($id_station_en_cours == 'saisie') ? 'station_en_cours' : '' ?>"> |
| <a href="<?= Liens::getUrlFormulaireSaisieStation() ?>"> Nouvelle station </a> |
| </li> |
| <li> |
| <div class="export_observation"> |
| <a href="<?= Liens::getUrlExportDonneesObservationsPourUtilisateur(); ?>" > Exporter mes observations </a> |
| </div> |
| </li> |
| </ul> |
| </div> |
| <!-- ODS_SAISIE - FIN MENU NAVIGATION --> |
| /trunk/applications/saisie/squelettes/fiches/station_fiche.tpl.html |
|---|
| 31,8 → 31,25 |
| <div id="map_canvas" style="width:100%; height:100%"></div> |
| </div> |
| <form class="form_afficher_modification" method="post" action="<?= Liens::getUrlFormulaireModificationStation($id_station); ?>" id="form_afficher_modification"> |
| <input class="droite gros_bouton_validation" type="submit" value="Modifier" /> |
| </form> |
| <form class="formulaire_en_ligne" method="post" action="<?= Liens::getUrlFormulaireAjoutEspece($id_station); ?>" id="form_afficher_saisie_espece"> |
| <input class="gauche gros_bouton_validation" type="submit" value="Nouvelle espèce" /> |
| </form> |
| <form class="formulaire_en_ligne" method="post" action="<?= Liens::getUrlFormulaireModificationStation($id_station); ?>" id="form_afficher_modification"> |
| <input class=" droite gros_bouton_validation" type="submit" value="Modifier la station" /> |
| </form> |
| <hr class="separation_invisible" /> |
| <!-- <?php if(count($infos_station['individus']) == 0) { ?> --> |
| <form class="formulaire_suppression_station droite" method="post" action="<?= Liens::getUrlFormulaireSuppressionStation(); ?>" id="form_supprimer_station"> |
| <input type="hidden" id="id_station_a_supprimer" name="id_station_a_supprimer" value="<?= $infos_station['id']; ?>" /> |
| <input class="gauche gros_bouton_validation lien_suppression" type="submit" value="Supprimer" /> |
| </form> |
| <!--<?php } ?> --> |
| <?php if(isset($donnees['erreurs'])) { ?> |
| <p class="attention"> <?= $donnees['erreurs']; ?> </p> |
| <?php } ?> |
| </div> |
| <!-- ODS_SAISIE - FIN FICHE STATION --> |
| /trunk/applications/saisie/squelettes/fiches/individu_fiche.tpl.html |
|---|
| 5,7 → 5,7 |
| <h3 class="titre_section_fiche"> Espèce </h3> |
| <div class="informations_espece"> |
| <img title="<?= Liens::getCreditImageEspece($espece['nom_scientifique']) ?>" alt="image de l'espece" class="droite" height="120px" src="<?= Liens::getUrlImageEspece($infos_espece['nom_scientifique'],'M') ?>" /> |
| <img title="<?= Liens::getCreditImageEspece($espece['nom_scientifique']) ?>" alt="image de l'espece" class="droite" height="120" src="<?= Liens::getUrlImageEspece($infos_espece['nom_scientifique'],'M') ?>" /> |
| <span class="intitule_fiche"> <?= $infos_espece['nom_vernaculaire'] ?> </span> |
| <span class="valeur_fiche"> (<?= $infos_espece['nom_scientifique'] ?>) </span> |
| </div> |
| 41,6 → 41,24 |
| <?php if(empty($annees_observations)) { ?> |
| <div class="informations"> Aucune observation enregistrée pour cet individu</div> |
| <?php } ?> |
| <hr class="separation_section" /> |
| <form class="bouton_formulaire_modification" method="post" action="<?= Liens::getUrlFormulaireModificationIndividu($infos_individu['id_station'], $infos_individu['id_espece'], $infos_individu['id_individu']); ?>" id="form_afficher_modification"> |
| <input class=" droite gros_bouton_validation" type="submit" value="Modifier" /> |
| </form> |
| <hr class="separation_invisible" /> |
| <?php if(empty($annees_observations)) { ?> |
| <form class="bouton_formulaire_suppression formulaire_suppression_individu droite" method="post" action="<?= Liens::getUrlSuppressionIndividu($infos_individu['id_station'], $infos_individu['id_espece'], $infos_individu['id_individu']); ?>" id="form_supprimer_individu"> |
| <input type="hidden" id="id_individu_a_supprimer" name="id_individu_a_supprimer" value="<?= $infos_individu['id_individu']; ?>" /> |
| <input class="gauche gros_bouton_validation lien_suppression" type="submit" value="Supprimer" /> |
| </form> |
| <?php } ?> |
| <?php if(isset($donnees['erreurs'])) { ?> |
| <p class="attention"> <?= $donnees['erreurs']; ?> </p> |
| <?php } ?> |
| </div> |
| <!-- ODS_SAISIE - FIN FICHE INDIVIDU --> |
| /trunk/applications/saisie/squelettes/listes/evenement_liste.tpl.html |
|---|
| 5,13 → 5,13 |
| <p class="cadre_information">Pour ajouter ou modifier une observation, cliquez sur la case correspondante et sélectionnez une date dans le calendrier</p> |
| <ul class="liste_annees_observations"> |
| <?php for($annees_avant_celle_ci = date('Y') - 5 ; $annees_avant_celle_ci <= date('Y') ; $annees_avant_celle_ci++) : ?> |
| <?php for($annees_avant_celle_ci = date('Y') ; $annees_avant_celle_ci >= date('Y') - 5 ; $annees_avant_celle_ci--) : ?> |
| <?php if ($annees_avant_celle_ci == $annee) { ?> |
| <li id="annee_en_cours"><?= $annees_avant_celle_ci ?></li> |
| <?php } else { ?> |
| <li><a href="<?= Liens::getUrlConsultationEspeceStation($id_station, $id_espece,$annees_avant_celle_ci);?>"> <?= $annees_avant_celle_ci ?> </a></li> |
| <?php } ?> |
| <?php if ($annees_avant_celle_ci != date('Y')) { ?> |
| <?php if ($annees_avant_celle_ci != date('Y') - 5) { ?> |
| <li> | </li> |
| <?php } ?> |
| <?php endfor; ?> |
| /trunk/applications/saisie/squelettes/images/csv.png |
|---|
| Cannot display: file marked as a binary type. |
| svn:mime-type = image/png |
| /trunk/applications/saisie/squelettes/images/csv.png |
|---|
| New file |
| Property changes: |
| Added: svn:mime-type |
| +image/png |
| \ No newline at end of property |
| /trunk/applications/saisie/squelettes/css/saisie.css |
|---|
| 2,7 → 2,7 |
| /* =========================== Style général ============================ */ |
| /* =========================== Style général ============================ */ |
| #wrapper #container { |
| max-width:1650px; |
| 202,7 → 202,7 |
| width: 200px; |
| font-size: 20px; |
| margin-top: 10x; |
| margin-right:10px; |
| margin-right: 0px; |
| } |
| #localiser_lat_lon { |
| 223,6 → 223,10 |
| width: 30px; |
| } |
| .formulaire_en_ligne { |
| display: inline; |
| } |
| .valider_formulaire { |
| cursor: pointer; |
| background-color: transparent; |
| 265,7 → 269,20 |
| margin-top:-5px; |
| } |
| #form_afficher_modification { |
| margin-top: 10px; |
| } |
| .formulaire_suppression_station { |
| margin-top: 10px; |
| margin-left: 2px; |
| } |
| .formulaire_suppression_individu { |
| margin-left: 2px; |
| margin-top: 10px; |
| } |
| /* =========================== Fiches ============================== */ |
| .element_fiche { |
| 346,7 → 363,7 |
| } |
| /* =========================== Tableaux d'évenements ============================ */ |
| /* =========================== Tableaux d'évenements ============================ */ |
| #saisie_liste_evenements, #saisie_modif_evenements { |
| text-align: center; |
| 377,7 → 394,7 |
| } |
| /* =========================== Styles des différents stades ============================ */ |
| /* =========================== Styles des différents stades ============================ */ |
| .stade_feuillaison { |
| background-color: #ACC700; |
| 399,9 → 416,29 |
| background-color: #B549B9; |
| } |
| /* ============ Style pour l'administration ============================== */ |
| /* ============ Styles crées par des effets javascripts automatiques ===== */ |
| #barre_admin { |
| -moz-border-radius: 10px 10px 10px 10px; |
| background-color: #F4F2EB; |
| border: 1px solid #D1C6A8; |
| height: 22px; |
| margin-bottom: 10px; |
| padding: 5px; |
| } |
| #form_changement_identite { |
| width: 330px; |
| display: inline; |
| } |
| .export_observation { |
| background: url("../images/csv.png") no-repeat scroll 0 0 transparent; |
| padding-left: 20px; |
| }; |
| /* ============ Styles créés par des effets javascripts automatiques ===== */ |
| .chargement { |
| background: url("../images/chargement.gif") no-repeat center center #DCDCDC; |
| } |
| 514,7 → 551,7 |
| position:relative; |
| } |
| .conteneur_suggestions { |
| .conteneur_suggestions, .conteneur_suggestions_utilisateur { |
| position: absolute; |
| left: 107px; |
| width: 180px; |
| 526,6 → 563,10 |
| -webkit-border-radius: 7px; |
| border-radius: 7px; |
| } |
| .conteneur_suggestions_utilisateur { |
| left: 188px; |
| } |
| .liste_suggestions { |
| margin: 0px; |
| 538,7 → 579,7 |
| cursor: pointer; |
| } |
| #form_saisie_station .liste_suggestions li { |
| .liste_suggestions li { |
| list-style-type: none; |
| margin-left: 5px; |
| margin-right: 5px; |
| 549,7 → 590,7 |
| background-color: #659CD8; |
| } |
| /* ============ Styles crées spécifiquement pour compenser les faiblesses de certains navigateurs ===== */ |
| /* ============ Styles crées spécifiquement pour compenser les faiblesses de certains navigateurs ===== */ |
| .clearer { |
| clear:both; |
| /trunk/applications/saisie/squelettes/formulaires/individu_modification.tpl.html |
|---|
| New file |
| 0,0 → 1,28 |
| <!-- ODS_SAISIE - DEBUT MODIFICATION INDIVIDU --> |
| <div id="modification_individu"> |
| <h2 class="etape"> Modification de l'individu <?= $infos_individu['nom']; ?> </h2> |
| <br/> |
| <br/> |
| <form method="post" action="<?= Liens::getUrlValidationFormulaireModificationIndividu($id_station, $id_espece, $infos_individu['id_individu']) ?>" id="form_modification_individu"> |
| <span class="element_formulaire"> |
| <label for="individu_nom">Nom de l'individu :</label> |
| <input <?= isset($erreurs['individu_nom']) ? 'class="erreur"' : '' ?> type="text" name="individu_nom" id="individu_nom" value="<?= $infos_individu['nom']; ?>" /> |
| </span> |
| <br /> |
| <?= isset($erreurs['individu_nom']) ? '<span class="erreur"> '.$erreurs['individu_nom'].' </span>' : '' ?> |
| <br /> |
| <h3 class="titre_section_fiche"> Espèce </h3> |
| <div class="informations_espece"> |
| <img title="<?= Liens::getCreditImageEspece($espece['nom_scientifique']) ?>" alt="image de l'espece" class="droite" height="120" src="<?= Liens::getUrlImageEspece($informations_espece['nom_scientifique'],'M') ?>" /> |
| <span class="intitule_fiche"> <?= $informations_espece['nom_vernaculaire'] ?> </span> |
| <span class="valeur_fiche"> (<?= $informations_espece['nom_scientifique'] ?>) </span> |
| </div> |
| <p class="intitule_fiche description_espece" > <?= $informations_espece['description'] ?></p> |
| <input type="hidden" id="id_espece" name="id_espece" value="<?= $id_espece; ?>" /> |
| <input type="hidden" id="id_station" name="id_station" value="<?= $id_station; ?>" /> |
| <input type="hidden" id="id_individu" name="id_individu" value="<?= $infos_individu['id_individu']; ?>" /> |
| <input class="droite gros_bouton_validation" type="submit" value="Valider" /> |
| </form> |
| </div> |
| <!-- ODS_SAISIE - FIN MODIFICATION INDIVIDU --> |
| /trunk/applications/saisie/squelettes/formulaires/individu_saisie.tpl.html |
|---|
| 6,9 → 6,10 |
| <form method="post" action="<?= Liens::getUrlValidationFormulaireSaisieIndividu($id_station,$id_espece) ?>" id="form_saisie_individu"> |
| <span class="element_formulaire"> |
| <label for="individu_nom">Nom de l'individu :</label> |
| <input type="text" name="individu_nom" id="individu_nom" /> |
| <input <?= isset($erreurs['individu_nom']) ? 'class="erreur"' : '' ?> type="text" name="individu_nom" id="individu_nom" /> |
| </span> |
| <br /> |
| <?= isset($erreurs['individu_nom']) ? '<span class="erreur"> '.$erreurs['individu_nom'].' </span>' : '' ?> |
| <br /> |
| <h3 class="titre_section_fiche"> Espèce </h3> |