Subversion Repositories eFlore/Archives.herbiers

Compare Revisions

Ignore whitespace Rev 1 → Rev 2

/trunk/applications/hb_consultation/langues/hbc_langue_fr.inc.php
New file
0,0 → 1,64
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hbc_langue_fr.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Fichier de traduction en français de l'application Herbier - Consultation.
*
* Traduction en langue française.
*
*@package Herbier-Consultation
*@subpackage Traduction
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/08 13:49:17 jpm
* Ajout de l'application de consultation sous forme de moteur de recherche.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_consultation/hbc_info_collection.inc.php
New file
0,0 → 1,306
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hbc_info_collection.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Application fournissant des informations sur les collections
*
* Fournit des informations sur une collection enregistrée dans la base de données.
*
*@package Herbier-Consultation
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Stockage du fichier javascript nécessaire pour ouvri-fermer les infos.
GEN_stockerFichierScript('herbiers', HB_CHEMIN_SCRIPTS.'hb_ouvrir_fermer.js');
 
// Initialisation des variables:
global $id_org;
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Si le visiteur est connecté et qu'il a des droits sur l'édition d'un herbier, on met $estEditeur à true
if ($GLOBALS['_GEN_commun']['pear_auth']->getAuth()) {
// Si le visiteur est connecté, on regarde si l'herbier visité lui appartient
// auquel on ajoutera des menus d'éditions rapide
$query_auth = 'SELECT EDP_ID_DROIT '.
'FROM EFLORE_DROIT_POSSEDER '.
'WHERE ( EDP_ID_PROJET = 1 '.
'AND EDP_ID_UTILISATEUR = '.$GLOBALS['_HERBIER_']['auth']->getAuthData(HB_BDD_TAB_ANNUAIRE_CHP_ID).' '.
'AND EDP_ID_DROIT = 1)';
$result_auth = mysql_query($query_auth) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_auth));
if (mysql_num_rows($result_auth) != 0) {
$estEditeur = true;
} else {
$req_administrer = 'SELECT HA_ID_ANNUAIRE '.
'FROM HERBIERS_ADMINISTRER '.
'WHERE HA_ID_ANNUAIRE = '.$GLOBALS['_HERBIER_']['auth']->getAuthData(HB_BDD_TAB_ANNUAIRE_CHP_ID);
$res_administrer = mysql_query($req_administrer) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $req_administrer));
if (mysql_num_rows($res_administrer) != 0) {
$estEditeur = true;
} else {
$estEditeur = false;
}
}
mysql_free_result($result_auth);
} else {
$estEditeur = false;
}
 
// Création d'un objet H_organisation et récupération des informations afférentes
$herb = new H_organisation();
$herb->getFromSQL($id_org);
 
// Entête
$sortie .= '<h1>'.$herb->INSTITUTION_NAME.'</h1>'."\n";
// On affiche la source des données cad soit IH soit le nom de la personne qui a saisi.
$sortie .= '<p class="hb_source_donnee">'.'Source des données : ';
if ($herb->SOURCE_DES_DONNEES != '') {
$sortie .= $herb->SOURCE_DES_DONNEES;
} else {
$sortie .= $herb->U_NAME.' '.$herb->U_SURNAME;
}
$sortie .= '</p>'."\n";
 
// 1. les renseignements administratifs
$sortie .= '<p class="hb_menu">'.'</p>'."\n";//lien_retour('herbiers')
 
// 2. les collections
if (is_array($herb->collections) && count($herb->collections) != 0) {
$sortie .= '<h2>'.'Les collections'.'</h2>'."\n";
// Une boucle sur l'ensemble des collections
for ($i = 0; $i < count($herb->collections); $i++) {
$sortie .= '<div id="el'.$i.'Parent" class="parent">'."\n".
'<a href="#" onclick="expandBase(\'el'.$i.'\', true); return false;">'."\n".
'<img name="imEx" id="el'.$i.'Img" class="'.HB_CLASS_IMG_ICONE.'" src="'.HB_IMG_OUVRIR.'" alt="+" />'."\n".
'</a>'."\n".
'<h3 class="hb_titre_en_ligne">'.$herb->collections[$i]->NOM_COLLECTION;
if ($estEditeur) {
$sortie .= ' <a class="hb_edition_rapide" href="'.
sprintf(HB_URL_COURANTE_ADMIN_ACTION_ORG_COLL, MOD_DESC, $id_org, $herb->collections[$i]->ID).
'">'.
'(Édition rapide)'.
'</a></h3>'."\n";
} else {
$sortie .= '</h3>'."\n";
}
$sortie .= '</div>'."\n";
$sortie .= '<div id="el'.$i.'Child" class="child">'."\n";
$sortie .= '<dl class="hb_affichage_tabulaire">'."\n";
if ($herb->collections[$i]->COLLECTION_CODE) {
$sortie .= '<dt>'.'Code de la collection : '.'</dt>'.
'<dd>'.$herb->collections[$i]->COLLECTION_CODE.'</dd>'."\n";
}
if ($herb->collections[$i]->DESCRIPTION) {
$sortie .= '<dt>'.'Description : '.'</dt>'.
'<dd>'.preg_replace("/\n/", '<br />', $herb->collections[$i]->DESCRIPTION).'</dd>'."\n";
}
if ($herb->collections[$i]->LABEL) {
$sortie .= '<dt>'.'Statut de la collection : '.'</dt>'.
'<dd>'.$herb->collections[$i]->LABEL.'</dd>'."\n";
}
if ($herb->collections[$i]->DATE_DEBUT&& $herb->collections[$i]->DATE_DEBUT != '0000-00-00') {
$sortie .= '<dt>'.'Début de récolte : '.'</dt>'.
'<dd>'.$herb->collections[$i]->LABEL_DATE_DEBUT_CARAC.' '.
$herb->collections[$i]->DATE_DEBUT.'</dd>'."\n";
}
if ($herb->collections[$i]->DATE_FIN && $herb->collections[$i]->DATE_FIN != "0000-00-00") {
$sortie .= '<dt>'.'Fin de récolte : '.'</dt>'.
'<dd>'.$herb->collections[$i]->LABEL_DATE_FIN_CARAC.' '.
$herb->collections[$i]->DATE_FIN.'</dd>'."\n";
}
if ($herb->collections[$i]->included_type) {
$sortie .= '<dt>'.'Échantillons-types : '.'</dt>'.
'<dd>'.$herb->collections[$i]->included_type.'</dd>'."\n";
}
if (count($herb->collections[$i]->preservation_method) != 0) {
$sortie .= '<dt>'.'Méthode de préservation : '.'</dt>'."\n";
$sortie .= '<dd><ul>';
for ($j = 0; $j < count($herb->collections[$i]->preservation_method); $j++) {
$sortie .= '<li>'.$herb->collections[$i]->preservation_method[$j].'</li>'."\n";
}
$sortie .= '</ul></dd>'."\n";
}
if ($herb->collections[$i]->NUM_SPECIMENS) {
$sortie .= '<dt>'.'Nombre de spécimens : '.'</dt>'.
'<dd>'.$herb->collections[$i]->NUM_SPECIMENS ;
if ($herb->collections[$i]->PREC_SPECIMENS == 'ESTI') {
$sortie .= ' <span class="hb_estimation">'.'(estimation)'.'</span>';
}
$sortie .= '</dd>'."\n";
}
if ($herb->collections[$i]->NUM_SPECIES) {
$sortie .= '<dt>'.'Nombre d\'espèces : '.'</dt>'.
'<dd>'.$herb->collections[$i]->NUM_SPECIES;
if ($herb->collections[$i]->PREC_SPECIES == 'ESTI') {
$sortie .= ' <span class="hb_estimation">'.'(estimation)'.'</span>';
}
$sortie .= '</dd>'."\n";
}
if ($herb->collections[$i]->URL != '') {
$sortie .= '<dt>'.'Site : '.'</dt>'.
'<dd><a href="'.$herb->collections[$i]->URL.'">'.$herb->collections[$i]->URL.'</a></dd>'."\n";
}
// Les différents états de la collection
if ($herb->collections[$i]->ETAT_SPECIMENS) {
$sortie .= '<dt>'.'État des spécimens : '.'</dt>'.
'<dd>'.$herb->collections[$i]->ETAT_SPECIMENS.'</dd>'."\n";
}
if ($herb->collections[$i]->ETAT_CLASSEMENT) {
$sortie .= '<dt>'.'État du classement : '.'</dt>'.
'<dd>'.$herb->collections[$i]->ETAT_CLASSEMENT.'</dd>'."\n";
}
if ($herb->collections[$i]->ETAT_PRESENTATION) {
$sortie .= '<dt>'.'État de la présentation : '.'</dt>'.
'<dd>'.$herb->collections[$i]->ETAT_PRESENTATION.'</dd>'."\n";
}
if ($herb->collections[$i]->MODE_CLASSEMENT != '') {
$sortie .= '<dt>'.'Méthode de classement : '.'</dt>'.
'<dd>'.preg_replace("/\n/", '<br />', $herb->collections[$i]->MODE_CLASSEMENT).'</dd>'."\n";
}
if ($herb->collections[$i]->DOC_STATE != '') {
$sortie .= '<dt>'.'État de la documentation : '.'</dt>'.
'<dd>'.preg_replace("/\n/", '<br />', $herb->collections[$i]->DOC_STATE).'</dd>'."\n";
}
$sortie .= '</dl>'."\n";
// Les collecteurs
if (isset($herb->collections[$i]->COLLECTEURS) && $herb->collections[$i]->COLLECTEURS != '') {
$tableau_collecteur = preg_split("/\r\n/", $herb->collections[$i]->COLLECTEURS, -1, PREG_SPLIT_NO_EMPTY);
$sortie .= '<div id="elcollecteur'.$i.'Parent" class="parent">'."\n".
'<a href="#" onclick="expandBase(\'elcollecteur'.$i.'\', true); return false;">'."\n".
'<img name="imEx" id="elcollecteur'.$i.'Img" class="'.HB_CLASS_IMG_ICONE.'" src="'.HB_IMG_OUVRIR.'" alt="+" />'."\n".
'</a>'."\n".
'<h3 class="hb_titre_en_ligne">'.'Les collecteurs - '.count($tableau_collecteur).'</h3>'."\n".
'</div>'."\n";
$sortie .= '<div id="elcollecteur'.$i.'Child" class="child">'."\n";
$sortie .= '<table border="1" cellspacing="0" width="100%">'."\n";
$compteur_auteur = 0;
for ($ligne = 1; $ligne <= ceil(count($tableau_collecteur) / 3); $ligne++) {
$sortie .= '<tr>';
for ($col = 1 ; $col < 4 ; $col++) {
if (isset($tableau_collecteur[$compteur_auteur]) && $tableau_collecteur[$compteur_auteur] != '') {
$sortie .= '<td>'.$tableau_collecteur[$compteur_auteur].'</td>';
$compteur_auteur++;
}
}
$sortie .= '</tr>'."\n";
}
$sortie .= '</table>'."\n";
$sortie .= '</div>'."\n";
}
// Les indications supplémentaires
if (is_array($herb->collections[$i]->indic) && count($herb->collections[$i]->indic) != 0) {
$sortie .= '<div id="elindic'.$i.'Parent" class="parent">'.
'<a href="#" onclick="expandBase(\'elindic'.$i.'\', true); return false;">'.
'<img name="imEx" id="elindic'.$i.'Img" class="'.HB_CLASS_IMG_ICONE.'" src="'.HB_IMG_OUVRIR.'" alt="+" />'.
'</a>'.
'<h3 class="hb_titre_en_ligne">'.'Compléments d\'information'.'</h3>'.
'</div>'."\n";
$sortie .= '<div id="elindic'.$i.'Child" class="child">'."\n";
$sortie .= '<dl>'."\n";
//$sortie .= '<dt>Débogage</dt><dd><pre>'.print_r($herb->collections[$i], true).'</pre></dd>'."\n";
for ($k = 0; $k < count($herb->collections[$i]->indic); $k++) {
if (isset($herb->collections[$i]->indic[$k]->type_indic) && count($herb->collections[$i]->indic[$k]->type_indic) != 0) {
$sortie .= '<dt>';
for ($l = 0; $l < count($herb->collections[$i]->indic[$k]->type_indic); $l++) {
$sortie .= $herb->collections[$i]->indic[$k]->type_indic[$l]->LABEL_TYPE;
if ($l < count($herb->collections[$i]->indic[$k]->type_indic) - 1) {
$sortie .= ' - ';
}
}
if ($estEditeur) {
$sortie .= ' <a class="hb_edition_rapide" href="'.
sprintf(HB_URL_COURANTE_ADMIN_ACTION_ORG_NOTE, MOD_NOTE, $id_org, $herb->collections[$i]->indic[$k]->ID_INDIC).
'">'.
'(Édition rapide)'.
'</a>'."\n";
}
$sortie .= '</dt>'."\n";
}
if ($herb->collections[$i]->indic[$k]->TXT_INDIC) {
$sortie .= '<dd>'.preg_replace("/\n/", '<br />', $herb->collections[$i]->indic[$k]->TXT_INDIC).'</dd>'."\n";
}
if ($herb->collections[$i]->indic[$k]->REM_INDIC) {
$sortie .= '<dd><i>'.preg_replace("/\n/", '<br />', $herb->collections[$i]->indic[$k]->REM_INDIC).'</i></dd>'."\n";
}
// Affichage de l'historique des modifications des notes
if (isset($herb->collections[$i]->indic[$k]->indic_hist) && (count($herb->collections[$i]->indic[$k]->indic_hist) != 0)) {
for ($l = 0; $l < count($herb->collections[$i]->indic[$k]->indic_hist); $l++) {
if ($herb->collections[$i]->indic[$k]->indic_hist[$l]->DATE_INDIC != '') {
$sortie .= '<dd>';
if ($l) {
$sortie .= 'Modifié le '.'<i>';
} else {
$sortie .= 'Dernière modification le '.'<i>';
}
$sortie .= $herb->collections[$i]->indic[$k]->indic_hist[$l]->DATE_INDIC.', par '
.$herb->collections[$i]->indic[$k]->indic_hist[$l]->ID_INDICATEUR.'</i></dd>'."\n";
}
}
}
}
$sortie .= '</dl>'."\n";
$sortie .= '</div>'."\n";
}
// une ligne vide entre chaque collection
$sortie .= '<hr class="hb_ligne" />'."\n";
$sortie .= '</div>'."\n";
}
}
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/03/30 09:48:58 jpm
* Début gestion des raccourcis vers l'administration.
*
* Revision 1.2 2005/03/09 15:55:02 jpm
* Correction bogue d'affichage quand donnée vide.
*
* Revision 1.1 2005/03/08 13:49:17 jpm
* Ajout de l'application de consultation sous forme de moteur de recherche.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_consultation/hb_consultation.php
New file
0,0 → 1,233
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hb_consultation.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Application fournissant un moteur de recherche sur les herbiers
*
* Fournit la liste des herbiers enregistrés dans la base de données.
*
*@package Herbier-Consultation
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de l'application Herbier - Consultation. */
require_once HB_CHEMIN_APPLI.'hb_consultation'.GEN_SEP.'configuration'.GEN_SEP.'hbc_config.inc.php';
/** Inclusion du fichier de configuration de l'application Herbier - Administration. */
require_once HB_CHEMIN_APPLI.'hb_admin'.GEN_SEP.'configuration'.GEN_SEP.'hba_config.inc.php';
 
/** Inclusion de l'API Fragmenteur */
require_once HB_CHEMIN_API_FRAGMENTEUR.'FRAG_fragmenteur.fonct.php';
/** Inclusion de l'API Formulaire - classe : Form */
require_once HB_CHEMIN_API_FORM.'FORM_formulaire.class.php';
/** Inclusion de l'API Formulaire - classe : formFromTable */
require_once HB_CHEMIN_API_FORM.'FORM_formulaire_table.class.php';
 
/** Inclusion de la classe principale d'Herbier : herbier */
require_once HB_CHEMIN_BIBLIO.'hb_herbier.class.php';
/** Inclusion de la classe Herbier : collection */
require_once HB_CHEMIN_BIBLIO.'hb_collection.class.php';
/** Inclusion de la classe Herbier : indic */
require_once HB_CHEMIN_BIBLIO.'hb_indic.class.php';
/** Inclusion de la classe Herbier : indic_hist */
require_once HB_CHEMIN_BIBLIO.'hb_indic_hist.class.php';
/** Inclusion de la classe Herbier : organisation */
require_once HB_CHEMIN_BIBLIO.'hb_organisation.class.php';
/** Inclusion de la classe Herbier : type */
require_once HB_CHEMIN_BIBLIO.'hb_type.class.php';
/** Inclusion de la classe Herbier : equipe */
require_once HB_CHEMIN_BIBLIO.'hb_equipe.class.php';
 
// Appel du fichier de traduction des textes de l'application Consultation de Herbier
if (file_exists(HBC_CHEMIN_LANGUES.'hbc_langue_'.HB_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Consultation de Herbier. */
include_once HBC_CHEMIN_LANGUES.'hbc_langue_'.HB_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once HBC_CHEMIN_LANGUES.'hbc_langue_fr.inc.php';
}
 
// Initialisation de la variable à retourner
$sortie .= '<!-- Herbier - Consultation : DEBUT -->'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
global $project;
global $TransTab;
global $RECHERCHE, $INSTITUTION, $T_REPONSE, $TYPE_R;
if (!isset($_GET['consultation'])) {
// ici on écrase les valeurs des variables globales précédentes au cas où
// on vient de cliquez sur un chiffre du fragmenteur
if (empty($T_REPONSE)) {
$T_REPONSE = 20;
}
if ($TransTab) {
$values = FRAG_decoupageChaine($TransTab);
}
if (!empty($values)) {
foreach ($values as $key => $val) {
if ($val != '') {
$GLOBALS[$key] = $val ;
}
}
}
$sortie .= '<h1>'.'Rechercher un herbier :'.'</h1>'."\n";
$form_1 = new form($GLOBALS['_HERBIER_']['bdd']);
$sortie .= '<form action="'.$GLOBALS['_HERBIER_']['url']->getURL().'" method="post">'."\n";
$sortie .= '<p>'."\n";
$sortie .= '<label for="RECHERCHE">'.'Recherche : '.'</label>'."\n";
$sortie .= '<input id="RECHERCHE" type="text" name="RECHERCHE" class="insInputForm"';
if (!empty($RECHERCHE)) {
$sortie .= ' value="'.$RECHERCHE.'"';
}
$sortie .= '/>'."\n";
$sortie .= '<label for="">'.'Grouper les résultats : '.'</label>'."\n";
$sortie .= $form_1->selectFromTableau('T_REPONSE',array(10, 'par 10', 20, 'par 20', 50, 'par 50'), $T_REPONSE);
$sortie .= $form_1->submit('rechercher')."\n";
$sortie .= '</p>'."\n";
$sortie .= '</form>'."\n";
$sortie .= '<p>'.'Le moteur recherche dans tous les champs de la de la base :'.'</p>'."\n";
'<ul>'."\n".
'<li>'.'Nom d\'institution, adresse, ville, région'.'</li>'."\n".
'<li>'.'Index herbariorum'.'</li>'."\n".
'<li>'.'Nom de collection, description, collecteurs, notes'.'</li>'."\n".
'<li>'.'Indications taxonomiques, historiques, géographiques'.'</li>'."\n".
'</ul>'."\n";
$sortie .= '<p>'.'Vous pouvez utiliser le caractère % pour remplacer n\'importe quelle chaine.'.'</p>'."\n";
if (!empty($T_REPONSE) ) {//&& !empty($RECHERCHE)
$query_data = 'SELECT DISTINCT(ID_ORG) '.
'FROM HERBIERS_INDIC LEFT JOIN HERBIERS_COLLECTION ON HERBIERS_INDIC.ID = HERBIERS_COLLECTION.ID, HERBIERS_ORGANISATION '.
'WHERE (HERBIERS_COLLECTION.PARENT_ID = HERBIERS_ORGANISATION.ID_ORG '.
'AND (HERBIERS_INDIC.REM_INDIC LIKE "%'.$RECHERCHE.'%" '.
'OR HERBIERS_INDIC.TXT_INDIC LIKE "%'.$RECHERCHE.'%")) '.
'OR (HERBIERS_ORGANISATION.ID_ORG = HERBIERS_COLLECTION.PARENT_ID '.
'AND (HERBIERS_COLLECTION.DESCRIPTION LIKE "%'.$RECHERCHE.'%" '.
'OR HERBIERS_COLLECTION.NOTES LIKE "%'.$RECHERCHE.'%" '.
'OR HERBIERS_COLLECTION.COLLECTION_FOCUS LIKE "%'.$RECHERCHE.'%" '.
'OR HERBIERS_COLLECTION.PURPOSE LIKE "%'.$RECHERCHE.'%" '.
'OR HERBIERS_COLLECTION.COLLECTEURS LIKE "%'.$RECHERCHE.'%" '.
'OR HERBIERS_COLLECTION.STRENGTH LIKE "%'.$RECHERCHE.'%" '.
'OR HERBIERS_COLLECTION.NOM_COLLECTION LIKE "%'.$RECHERCHE.'%" '.
'OR HERBIERS_COLLECTION.COLLECTION_CODE LIKE "%'.$RECHERCHE.'%")) '.
'OR HERBIERS_ORGANISATION.INSTITUTION_NAME LIKE "%'.$RECHERCHE.'%" '.
'OR ADRESS_TEXT LIKE "%'.$RECHERCHE.'%" '.
'OR TOWN LIKE "%'.$RECHERCHE.'%" '.
'OR REGION LIKE "%'.$RECHERCHE.'%" '.
'OR INDEX_HERB LIKE "%'.$RECHERCHE.'%" '.
'ORDER BY TOWN';
if (empty($values['pstart'])) {
$values['pstart'] = 0 ;
}
// Autre requete pour obtenir le nombre total de réponse
// car la clause limit x,y limite le nombre de résultat
$query_nombre = $query_data;
// Ajout de la clause limit pour les données à afficher
$query_data .= ' LIMIT '.$values['pstart'].','.$T_REPONSE;
$result_data = mysql_query($query_data) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_data));
$result_nombre = mysql_query($query_nombre) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_nombre));
$nombre = mysql_num_rows($result_nombre);
mysql_free_result($result_nombre);
// Utilisation du fragmentateur
$mon_frag = new fragmenteur();
$tableau = array();
$tableau['pstart'] = $values['pstart'];
$tableau['step'] = $T_REPONSE;
$tableau['pend'] = $nombre;
// Construction de la variable TransTab
$tableau['TYPE_R'] = $TYPE_R;
$tableau['T_REPONSE'] = $T_REPONSE;
$sortie .= '<p id="frag_nbre_resultat">'.FRAG_afficherTxtNbreResultat('', $tableau, mysql_num_rows($result_data), $nombre).'</p>'."\n";
if ((mysql_num_rows($result_data) > 0) && ($tableau['step'] < $nombre)) {
$sortie .= '<p id="frag_navigation">';
$sortie .= $mon_frag->fragmente($tableau, $nombre);
$sortie .= '</p>'."\n";
}
$sortie .= '<ul>'."\n";
while ($row1 = mysql_fetch_object($result_data)) {
$resultat = new H_organisation() ;
$resultat->getFromSQL($row1->ID_ORG);
$sortie .= '<li>'.$resultat->TOWN.' - ';
$sortie .= '<a href="'.HB_URL_COURANTE_CONSULTATION_FICHE_HERBIER.'&amp;id_org='.$row1->ID_ORG.'">'.
$resultat->INSTITUTION_NAME.
'</a>';
$sortie .= '</li>'."\n";
}
$sortie .= '</ul>'."\n";
if ((mysql_num_rows($result_data) > 0) && ($tableau['step'] < $nombre)) {
$sortie .= '<p>'.$mon_frag->fragmente($tableau, $nombre).'</p>'."\n";
}
}
} elseif (isset($_GET['consultation']) && $_GET['consultation'] == 'herbier') {
include_once 'hbc_info_herbier.inc.php';
} elseif (isset($_GET['consultation']) && $_GET['consultation'] == 'collection') {
include_once 'hbc_info_collection.inc.php';
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$sortie .= '<!-- Herbier - Consultation : FIN -->'."\n";
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.3 2005/03/30 09:48:58 jpm
* Début gestion des raccourcis vers l'administration.
*
* Revision 1.2 2005/03/09 15:55:17 jpm
* Changement du nom de l'appli.
*
* Revision 1.1 2005/03/08 13:49:17 jpm
* Ajout de l'application de consultation sous forme de moteur de recherche.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_consultation/hbc_info_herbier.inc.php
New file
0,0 → 1,259
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hbc_info_herbier.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Application fournissant des informations sur les herbiers
*
* Fournit des informations sur un herbier enregistré dans la base de données.
*
*@package Herbier-Consultation
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Stockage du fichier javascript nécessaire pour ouvri-fermer les infos.
GEN_stockerFichierScript('herbiers', HB_CHEMIN_SCRIPTS.'hb_ouvrir_fermer.js');
 
// Initialisation des variables:
global $id_org;
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Si le visiteur est connecté et qu'il a des droits sur l'édition d'un herbier, on met $estEditeur à true
if ($GLOBALS['_HERBIER_']['auth']->getAuth()) {
// Le visiteur est connecté : on regarde si l'herbier visité lui appartient pour ajouter des menus d'éditions rapide
$query_auth = 'SELECT EDP_ID_DROIT '.
'FROM EFLORE_DROIT_POSSEDER '.
'WHERE (EDP_ID_PROJET = 1 '.
'AND EDP_ID_UTILISATEUR = '.$GLOBALS['_HERBIER_']['auth']->getAuthData(HB_BDD_TAB_ANNUAIRE_CHP_ID).' '.
'AND EDP_ID_DROIT = 1)';
$result_auth = mysql_query($query_auth) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_auth));
if (mysql_num_rows($result_auth) != 0) {
$estEditeur = true;
} else {
$req_administrer = 'SELECT HA_ID_ANNUAIRE '.
'FROM HERBIERS_ADMINISTRER '.
'WHERE HA_ID_ANNUAIRE = '.$GLOBALS['_HERBIER_']['auth']->getAuthData(HB_BDD_TAB_ANNUAIRE_CHP_ID);
$res_administrer = mysql_query($req_administrer) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $query_auth));
if (mysql_num_rows($res_administrer) != 0) {
$estEditeur = true;
} else {
$estEditeur = false;
}
}
mysql_free_result($result_auth);
} else {
$estEditeur = false;
}
 
 
// Création d'un objet H_organisation et récupération des informations afférentes
$herb = new H_organisation($id_org);
$herb->getFromSQL($id_org);
 
// Entete
$sortie .= '<h1>'.$herb->INSTITUTION_NAME.'</h1>'."\n";
 
// Affichage de la source des données cad soit IH soit le nom de la personne qui a saisi.
$sortie .= '<p class="hb_source_donnee">'.'Source des données : ';
if ($herb->SOURCE_DES_DONNEES != '') {
$sortie .= $herb->SOURCE_DES_DONNEES ;
} else {
$sortie .= $herb->U_NAME.' '.$herb->U_SURNAME;
}
$sortie .= '</p>'."\n";
 
// 1. les renseignements administratifs
$sortie .= '<p class="hb_menu">'.'</p>'."\n";
$sortie .= '<h2>'.'Renseignements Administratifs';
if ($estEditeur) {
$sortie .= ' <a class="hb_edition_rapide" href="'.sprintf(HB_URL_COURANTE_ADMIN_ACTION_ORGANISATION, MOD_ADM, $id_org).'">'.
'(Édition rapide)'.
'</a></h2>'."\n";
} else {
$sortie .= '</h2>'."\n";
}
 
$sortie .= '<dl class="hb_affichage_tabulaire">'."\n".
'<dt>'.'Nom : '.'</dt>'.
'<dd>'.$herb->INSTITUTION_NAME.'</dd>'."\n";
$sortie .= '<dt>'.'Index herbariorum : '.'</dt>'."\n";
if ($herb->EMAIL) {
$sortie .= '<dd>'.$herb->INDEX_HERB.'</dd>'."\n";
} else {
$sortie .= '<dd>&nbsp;</dd>'."\n";
}
$sortie .= '<dt>'.'Adresse : '.'</dt>'."\n".
'<dd>'.$herb->ADRESS_LINE.'</dd>'."\n".
'<dt>'.'Code postal : '.'</dt>'."\n".
'<dd>'.$herb->ZIP.'</dd>'."\n".
'<dt>'.'Ville : '.'</dt>'."\n".
'<dd>'.$herb->TOWN.'</dd>'."\n".
'<dt>'.'Pays : '.'</dt>'."\n".
'<dd>'.$herb->pays.'</dd>'."\n";
if ($herb->EMAIL) {
$sortie .= '<dt>'.'E-mail : '.'</dt>'.
'<dd>'.'<a href="mailto:'.$herb->EMAIL.'">'.$herb->EMAIL.'</a></dd>'."\n";
}
$sortie .= '<dt>'.'Téléphone : '.'</dt>'.
'<dd>'.$herb->TEL.'</dd>'."\n".
'<dt>'.'Fax : '.'</dt>'.
'<dd>'.$herb->FAX.'</dd>'."\n";
$sortie .= '</dl>'."\n";
$sortie .= '<div class="espace">&nbsp;</div>'."\n";
 
// 3. Le contact de l'institution
if (is_array($herb->equipe_liste)) {
$sortie .= '<h2>'.'Contacter l\'herbier'.'</h2>'."\n";
$sortie .= '<p>'.'Personne(s) à contacter :'.'</p>'."\n";
for ($i = 0 ; $i < count($herb->equipe_liste) ; $i++) {
if ($herb->equipe_liste[$i]->CONTACT == 'oui') {
$sortie .= '<div id="elcontact'.$i.'Parent" class="parent">'."\n".
'<a href="#" onclick="expandBase(\'elcontact'.$i.'\', true); return false;">'."\n".
'<img name="imEx" id="elcontact'.$i.'Img" class="'.HB_CLASS_IMG_ICONE.'" src="'.HB_IMG_OUVRIR.'" alt="+"/>'."\n".
'</a>'."\n".
'<h3 class="hb_titre_en_ligne">'.$herb->equipe_liste[$i]->NOM.' '.$herb->equipe_liste[$i]->PRENOM;
if ($estEditeur) {
$sortie .= ' <a class="hb_edition_rapide" href="'.
sprintf(HB_URL_COURANTE_ADMIN_ACTION_ORG_EQUIPE, MOD_STAFF, $id_org, $herb->equipe_liste[$i]->ID_STAFF).
'">'.
'(Édition rapide)'.
'</a></h3>'."\n";
} else {
$sortie .= '</h3>'."\n";
}
$sortie .= '</div>'."\n";
$sortie .= '<div id="elcontact'.$i.'Child" class="child">'."\n";
$sortie .= '<dl class="hb_affichage_tabulaire">'."\n";
if ($herb->equipe_liste[$i]->MAIL) {
$sortie .= '<dt>'.'Mail : '.'</dt>'."\n".
'<dd><a href="mailto:'.$herb->equipe_liste[$i]->MAIL.'">'.$herb->equipe_liste[$i]->MAIL.'</a></dd>'."\n";
}
if ($herb->equipe_liste[$i]->TEL) {
$sortie .= '<dt>'.'Téléphone : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->TEL.'</dd>'."\n";
}
if ($herb->equipe_liste[$i]->FAX) {
$sortie .= '<dt>'.'Fax : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->FAX.'</dd>'."\n";
}
if ($herb->equipe_liste[$i]->FONCTION) {
$sortie .= '<dt>'.'Fonction : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->FONCTION.'</dd>'."\n";
}
$sortie .= '</dl>'."\n";
$sortie .= '</div>'."\n";
}
}
}
 
// 4. l'équipe
if (is_array($herb->equipe_liste) && count($herb->equipe_liste) != 0) {
$sortie .= '<h2>'.'L\'équipe'.'</h2>'."\n";
for ($i = 0 ; $i < count($herb->equipe_liste) ; $i++) {
$sortie .= '<div id="el1'.$i.'Parent" class="parent">'."\n".
'<a href="#" onclick="expandBase(\'el1'.$i.'\', true); return false;">'."\n".
'<img name="imEx" id="el1'.$i.'Img" class="'.HB_CLASS_IMG_ICONE.'" src="'.HB_IMG_OUVRIR.'" alt="+"/>'."\n".
'</a>'."\n".
'<h3 class="hb_titre_en_ligne">'.$herb->equipe_liste[$i]->NOM.' '.$herb->equipe_liste[$i]->PRENOM;
if ($estEditeur) {
$sortie .= ' <a class="hb_edition_rapide" href="'.
sprintf(HB_URL_COURANTE_ADMIN_ACTION_ORG_EQUIPE, MOD_STAFF, $id_org, $herb->equipe_liste[$i]->ID_STAFF).
'">'.
'(Édition rapide)'.
'</a></h3>'."\n";
} else {
$sortie .= '</h3>'."\n";
}
$sortie .= '</div>'."\n";
$sortie .= '<div id="el1'.$i.'Child" class="child">'."\n";
$sortie .= '<dl class="hb_affichage_tabulaire">'."\n";
if ($herb->equipe_liste[$i]->ADRESSE1 != '' && $herb->equipe_liste[$i]->ADRESSE2 != '') {
$sortie .= '<dt>'.'Adresse : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->ADRESSE1.'<br />'.
$herb->equipe_liste[$i]->ADRESSE2.'</dd>'."\n";
} elseif ($herb->equipe_liste[$i]->ADRESSE1 != '' && $herb->equipe_liste[$i]->ADRESSE2 == '') {
$sortie .= '<dt>'.'Adresse : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->ADRESSE1.'</dd>'."\n";
} elseif ($herb->equipe_liste[$i]->ADRESSE1 == '' && $herb->equipe_liste[$i]->ADRESSE2 != '') {
$sortie .= '<dt>'.'Adresse : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->ADRESSE2.'</dd>'."\n";
}
if ($herb->equipe_liste[$i]->CP != '') {
$sortie .= '<dt>'.'Code Postal : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->CP.'</dd>'."\n";
}
if ($herb->equipe_liste[$i]->VILLE != '') {
$sortie .= '<dt>'.'Ville : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->VILLE.'</dd>'."\n";
}
if ($herb->equipe_liste[$i]->MAIL != '') {
$sortie .= '<dt>'.'Mail : '.'</dt>'.
'<dd><a href="mailto:'.$herb->equipe_liste[$i]->MAIL.'">'.$herb->equipe_liste[$i]->MAIL.'</a></dd>'."\n";
}
if ($herb->equipe_liste[$i]->FONCTION != '') {
$sortie .= '<dt>'.'Fonction : '.'</dt>'.
'<dd>'.$herb->equipe_liste[$i]->FONCTION.'</dd>'."\n";
}
$sortie .= '</dl>'."\n";
$sortie .= '</div>'."\n";
}
}
$sortie .= '<div class="hb_espace">&nbsp;</div>'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.4 2005/04/06 13:29:41 jpm
* Correction du nom d'un attribut de la classe organisation.
*
* Revision 1.3 2005/03/30 09:48:58 jpm
* Début gestion des raccourcis vers l'administration.
*
* Revision 1.2 2005/03/09 15:55:02 jpm
* Correction bogue d'affichage quand donnée vide.
*
* Revision 1.1 2005/03/08 13:49:17 jpm
* Ajout de l'application de consultation sous forme de moteur de recherche.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_consultation/configuration/hbc_config.inc.php
New file
0,0 → 1,70
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Consultation. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hbc_config.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Configuration de l'application Herbier - Consultation
*
* Fichier de configuration de l'application Herbier - Consultation.
*
*@package Herbier-Consultation
*@subpackage Configuration
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Constante stockant le chemin du dossier contenant l'application Herbier - Consultation.*/
define('HBC_CHEMIN_RACINE', HB_CHEMIN_APPLI.'hb_consultation/');
/** Constante stockant le chemin du dossier contenant les traductions.*/
define('HBC_CHEMIN_LANGUES', HBC_CHEMIN_RACINE.'langues/');
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/03/09 15:54:39 jpm
* Changement du nom de l'appli dans les constantes.
*
* Revision 1.1 2005/03/08 13:49:17 jpm
* Ajout de l'application de consultation sous forme de moteur de recherche.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_admin/langues/hba_langue_fr.inc.php
New file
0,0 → 1,65
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Administration. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hba_langue_fr.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Traduction Herbier - Administration : fr
*
* Traduction de l'interface d'administration des herbiers en français.
*
*@package Herbier-Administration
*@subpackage Traduction
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/04/06 13:30:43 jpm
* Ajout du fichier de traduction de l'appli.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_admin/presentations/scripts/hb_admin.js
New file
0,0 → 1,61
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | Javascript version 1.5 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) Tela Botanica (accueil@tela-botanica.org), 2005. |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbiers. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hb_admin.js,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Javascript de Herbier-Administration
*
* Cntient les fonctions Javascript nécessaire pour les interfaces d'administration.
*
*
*@package Herbier-Administration
*@subpackage Javascript
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
function validateAndSubmitAdd(HERBIERS_ORGANISATION)
{
if (HERBIERS_ORGANISATION.INSTITUTION_NAME.value == "") {
alert ("Vous devez saisir un nom pour l'institution");
return false;
}
if (HERBIERS_ORGANISATION.ZIP.value == "") {
alert ("Vous devez saisir un code postal valide, ex 75000");
return false;
}
}
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/04/06 13:30:13 jpm
* Ajout du script vérifiant les formulaires.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
/trunk/applications/hb_admin/presentations/styles/hb_admin.css
New file
0,0 → 1,164
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/* ========================================================================================================
| Copyright (C) 1999-2005 Tela Botanica (accueil@tela-botanica.org) |
+---------------------------------------------------------------------------------------------------------+
| This file is part of Herbier - Administration. |
| |
| Foobar is free software; you can redistribute it and/or modify it under the terms of the GNU General |
| Public License as published by the Free Software Foundation; either version 2 of the License, or |
| (at your option) any later version. |
| |
| Foobar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the |
| implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| License for more details. |
| |
| You should have received a copy of the GNU General Public License along with Foobar; if not, write to |
| the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+---------------------------------------------------------------------------------------------------------+
CVS : $Id: hb_admin.css,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
===========================================================================================================
DESCRIPTION : Fichier des styles CSS de Herbier - Administration.
===========================================================================================================
Auteur original : Jean-Pascal MILCENT
Autres auteurs : Aucun
===========================================================================================================
AUTEUR : $Author: jp_milcent $
VERSION : $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
======================================================================================================= */
 
/* +----------------------------------------------------------------------------------------------------+
| STRUCTURE |
+----------------------------------------------------------------------------------------------------+*/
#hba_info {
text-align:left;
width: 20em;
height: 100%;
margin: 0.2em;
border: 0.5em groove #EF5D31;
font-size: 0.8em;
background-color: white;
}
#hba_info dl, #hba_info ul {
width: 19em;
margin: 0.1em;
padding: 0;
}
#hba_info ul {
margin-left: 1.2em;
list-style-type: disc;
}
 
#hba_info dl dt {
width: 7em;
float: left;
margin: .1em;
padding: .1em;
}
/* hack de commentaire avec un antislash pour ie5 mac \*/
#hba_info dt { clear: both; }
/* end hack */
#hba_info dl dd {
float: left;
width: 11em;
margin: 0;
padding: .1em;
}
#hba_info h1 {
clear: both;
width:100%;
text-align: center;
margin: 0;
padding: 0;
}
 
/* Mise en ligne des boutons de formulaire */
#texte form .liste_bouton li {
display: inline;
}
 
/* Alignement des champs de formulaire */
#texte form ul li {
text-align: left;
padding: 1em 0 0 0;
margin: 0;
}
 
#texte form label {
float: left;
width: 15em;
text-align: left;
}
li.hba_commentaire {
clear:both;
margin-top: 1em;
}
table.hba_formulaire, ul.hba_formulaire {
clear:both;
width:100%;
margin:0;
padding:0;
}
textarea.hba_formulaire, input.hba_formulaire {
width:30em;
}
.hba_liste_organisation table, .hba_liste_correspondant table, .hba_liste_redacteur table,
.hba_liste_inscrit table, .hba_liste_collection table, .hba_liste_equipe table {
width:100%;
min-height:0;
}
/*
.hba_liste_organisation tbody, .hba_liste_correspondant tbody, .hba_liste_redacteur table,
.hba_liste_inscrit tbody, .hba_liste_collection tbody, .hba_liste_equipe tbody {
height:15em;
width:100%;
overflow:auto;
vertical-align:top;
}
*/
.hba_aide:first-letter, .hba_information:first-letter {
font-size:1.5em;
font-weight:bold;
}
.hba_information {
margin:0;
padding: 5px;
border : 1px dotted green;
background-color: #ffffcc;
}
.hba_attention {
padding: 5px;
border : 1px dotted red;
color: red;
font-weight: bold;
background-color: #ffffcc;
}
/* +----------------------------------------------------------------------------------------------------+
| DESIGN |
+----------------------------------------------------------------------------------------------------+*/
#texte input, #texte textarea, #texte select {
background-color:#F7B4A0;
}
#texte form ul {
list-style-type: none;
}
.hba_liste_note table {
padding:0;
margin:0;
border-width:0;
}
/* +--Fin des CSS ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/05/18 07:30:13 jpm
* Correction des bogues et derniers réglages avant mise en ligne du site v4.
*
* Revision 1.1 2005/04/06 13:30:29 jpm
* Ajout des styles css propres à l'application admin.
*
* Revision 1.1 2005/03/08 14:14:59 jpm
* Ajout du fichier css de Herbier.
*
*
* +-- Fin des CSS ----------------------------------------------------------------------------------------+
*/
 
/trunk/applications/hb_admin/configuration/hba_config.inc.php
New file
0,0 → 1,146
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Administration. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hba_config.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Configuration Herbier - Administration
*
* Configuration de l'interface d'administration des herbiers.
*
*@package Herbier-Administration
*@subpackage Configuration
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Modification de la gestion des guillemets magiques.
set_magic_quotes_runtime(0);
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Constante stockant le chemin du dossier contenant l'application Herbier - Administration.*/
define('HBA_CHEMIN_RACINE', HB_CHEMIN_APPLI.'hb_admin'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les traductions.*/
define('HBA_CHEMIN_LANGUES', HBA_CHEMIN_RACINE.'langues'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant la bibliothèque de code.*/
define('HBA_CHEMIN_BIBLIO', HBA_CHEMIN_RACINE.'bibliotheque'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les fichiers de présentations (css, javascript,...).*/
define('HBA_CHEMIN_PRESENTATION', HBA_CHEMIN_RACINE.'presentations'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les fichiers Javascripts.*/
define('HBA_CHEMIN_SCRIPT', HBA_CHEMIN_PRESENTATION.'scripts'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les fichiers CSS.*/
define('HBA_CHEMIN_STYLE', HBA_CHEMIN_PRESENTATION.'styles'.GEN_SEP);
 
// +------------------------------------------------------------------------------------------------------+
// Identification
/** Constante stockant si oui ou non, l'identification est nécessaire pour l'administration.*/
define('HBA_ARGUMENT_AUTH', TRUE);
 
// +------------------------------------------------------------------------------------------------------+
// Exemple
/** Constante stockant la valeur de l'identifiant de l'exemple d'herbier.*/
define('HBA_EXEMPLE_ID', 35);
 
// +------------------------------------------------------------------------------------------------------+
// Apparence
/** Constante stockant la valeur de la longueur maxi du nom de l'organisation affichable dans le cartouche.*/
define('HBA_LONGUEUR_ORG_NOM', 17);
/** Constante stockant la valeur de la longueur maxi du texte des notes.*/
define('HBA_LONGUEUR_NOTE_TXT', 35);
 
// +------------------------------------------------------------------------------------------------------+
// Actions d'administration
// Gestion d'une organisation
/** Constante stockant la valeur pour l'action annuler.*/
define('HBA_ACTION_ANNULER', 0);
/** Constante stockant la valeur pour l'action ouvrant le formulaire d'ajout d'une institution (Herbier).*/
define('HBA_ACTION_HERBIER_AJOUT', 1);//NOUVEAU_HERB1
/** Constante stockant la valeur pour l'action vérifiant le formulaire d'ajout d'une institution (Herbier).*/
define('HBA_ACTION_HERBIER_VERIF', 2);//NOUVEAU_HERB2
/** Constante stockant la valeur pour l'action déroulant les infos d'une institution (Herbier).*/
define('HBA_ACTION_COLL_DEROULER', 5);
define("NOUVEAU_HERB4",3) ;
define('MOD_HERB' , 20) ;
define('MOD_ADM' , 22) ;
define("MOD_ADM_V", 26) ;
define("MOD_CONT" ,23) ;
define("MOD_CONT_V", 28) ;
define("SUPPR_HERB", 35) ;
// Gestion des collections
define("NOUV_COLL", 4) ;
define("MOD_DESC" ,21) ;
define("MOD_DESC_V", 27) ;
define("SUPPR_COLL", 29) ;
// Gestion de l'équipe
define("MOD_TEAM" , 24) ;
define("NOUV_TEAM", 30) ;
define("NOUV_TEAM_V", 31) ;
define("MOD_STAFF", 32) ;
define("MOD_STAFF_V", 33) ;
define("SUPPR_STAFF" ,34) ;
// Gestion des notes
define("MOD_INDIC" ,25) ;
define("NOUV_INDIC", 40) ;
define("NOUV_INDIC_V" ,41) ;
define("MOD_NOTE", 42) ;
define("SUPPR_NOTE", 43) ;
define("MOD_NOTE_V", 44) ;
// Gestion des correspondants
/** Constante stockant la valeur pour l'action déroulant les infos d'une institution (Herbier).*/
define('HBA_ACTION_COR_DEROULER', 14);
define("NOUVEAU_CORR", 10) ;
define("NOUVEAU_CORR_V", 11) ;
define("SUPPR_CORR", 12) ;
define("SUPPR_CORR_V", 13) ;
// Gestion des rédacteurs
define('HBA_ACTION_RED_DEROULER', 54);
define("NOUV_RED", 50) ;
define("NOUV_RED_V", 51) ;
define("SUPPR_RED", 52) ;
define("SUPPR_RED_V", 53) ;
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/04/06 13:30:52 jpm
* Ajout du fichier de config de l'appli.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_admin/hb_admin.php
New file
0,0 → 1,238
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Administration. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hb_admin.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Herbier Administration
*
* Interface d'administration des herbiers.
*
*@package Herbier-Administration
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de l'application Herbier - Administration. */
require_once HB_CHEMIN_APPLI.'hb_admin'.GEN_SEP.'configuration'.GEN_SEP.'hba_config.inc.php';
 
// Stockage des styles de l'application Administration
GEN_stockerStyleExterne('hb_admin', HBA_CHEMIN_STYLE.'hb_admin.css');
 
// Appel du fichier de traduction des textes de l'application Administration de Herbier
if (file_exists(HBA_CHEMIN_LANGUES.'hba_langue_'.HB_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Administration de Herbier. */
include_once HBA_CHEMIN_LANGUES.'hba_langue_'.HB_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once HBA_CHEMIN_LANGUES.'hba_langue_fr.inc.php';
}
 
/** Inclusion de la classe "form" de l'API Formulaire. */
require_once HB_CHEMIN_API_FORMULAIRE.'FORM_formulaire.class.php';
/** Inclusion de la classe "form" de l'API Formulaire. */
require_once HB_CHEMIN_API_FORMULAIRE.'FORM_formulaire_table.class.php';
 
/** Inclusion du fichier de fonctions permettant d'ajouter, modifier ou supprimer des
* informations dans la base de données Herbier. */
require_once HBA_CHEMIN_BIBLIO.'hba_manipulation.fonct.php';
 
/** Inclusion de la classe principale d'Herbier : herbier */
require_once HB_CHEMIN_BIBLIO.'hb_herbier.class.php';
/** Inclusion de la classe Herbier : collection */
require_once HB_CHEMIN_BIBLIO.'hb_collection.class.php';
/** Inclusion de la classe Herbier : indic */
require_once HB_CHEMIN_BIBLIO.'hb_indic.class.php';
/** Inclusion de la classe Herbier : indic_hist */
require_once HB_CHEMIN_BIBLIO.'hb_indic_hist.class.php';
/** Inclusion de la classe Herbier : organisation */
require_once HB_CHEMIN_BIBLIO.'hb_organisation.class.php';
/** Inclusion de la classe Herbier : type */
require_once HB_CHEMIN_BIBLIO.'hb_type.class.php';
/** Inclusion de la classe Herbier : equipe */
require_once HB_CHEMIN_BIBLIO.'hb_equipe.class.php';
/** Inclusion de la classe Herbier : utilisateur */
require_once HB_CHEMIN_BIBLIO.'hb_utilisateur.class.php';
 
// Initialisation de variables
$sortie .= '<!-- Herbier - Administration : DEBUT -->'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
if (!defined('HBA_ARGUMENT_AUTH') || HBA_ARGUMENT_AUTH == FALSE || (HBA_ARGUMENT_AUTH == TRUE && $GLOBALS['_HERBIER_']['auth']->getAuth())) {
// Initialisation de variables
if (!isset($_REQUEST['action']) || empty($_REQUEST['action'])) {
$_REQUEST['action'] = HBA_ACTION_ANNULER;
}
// Création de l'objet "façade" H_Herbier().
$un_herbier = new H_Herbier($GLOBALS['_HERBIER_']['auth']->getAuthData(HB_BDD_TAB_ANNUAIRE_CHP_ID));
// Test sur les droits de la personne.
if ($un_herbier->utilisateur->getDroit()) {
switch ($_REQUEST['action']) {
// Gestion des organisations
case HBA_ACTION_HERBIER_AJOUT :
GEN_stockerFichierScript('hb_admin', HBA_CHEMIN_SCRIPT.'hb_admin.js');
$sortie .= nouveau($un_herbier);
break;
case HBA_ACTION_HERBIER_VERIF :
GEN_stockerFichierScript('hb_admin', HBA_CHEMIN_SCRIPT.'hb_admin.js');
$retour = nouveau_v(&$un_herbier);
if (is_bool($retour) && $retour == TRUE) {
$sortie .= menu($un_herbier);
} else {
$sortie .= $retour;
}
break;
case HBA_ACTION_COLL_DEROULER :
case MOD_HERB :
$sortie .= mod_herb($un_herbier);
break;
case MOD_ADM :
$sortie .= mod_adm($un_herbier);
break;
case MOD_ADM_V :
$sortie .= mod_adm_v($un_herbier).mod_herb($un_herbier);
break;
case SUPPR_HERB :
$sortie .= suppr_herb($un_herbier).menu($un_herbier);
break;
case NOUVEAU_HERB4 :
$sortie .= nouveau_herb4($un_herbier).mod_herb($un_herbier);
break;
// Gestion des collections
case NOUV_COLL :
$sortie .= nouv_coll($un_herbier);
break;
case MOD_DESC :
$sortie .= mod_desc($un_herbier);
break;
case MOD_DESC_V :
$sortie .= mod_desc_v($un_herbier).mod_herb($un_herbier);
break;
case SUPPR_COLL :
$sortie .= suppr_coll($un_herbier).mod_herb($un_herbier);
break;
// Gestion de l'équipe
case NOUV_TEAM :
$sortie .= nouv_team($un_herbier);
break;
case NOUV_TEAM_V :
$sortie .= nouv_team_v($un_herbier).mod_herb($un_herbier);
break;
case MOD_STAFF :
$sortie .= mod_staff($un_herbier);
break;
case MOD_STAFF_V :
$sortie .= mod_staff_v($un_herbier).mod_herb($un_herbier);
break;
case SUPPR_STAFF :
$sortie .= suppr_staff($un_herbier).mod_herb($un_herbier);
break;
// Gestion des notes
case NOUV_INDIC :
$sortie .= nouv_indic($un_herbier);
break;
case NOUV_INDIC_V :
$sortie .= nouv_indic_v($un_herbier).mod_herb($un_herbier);
break;
case MOD_NOTE :
$sortie .= mod_note($un_herbier);
break;
case MOD_NOTE_V :
$sortie .= mod_note_v($un_herbier).mod_herb($un_herbier);
break;
case SUPPR_NOTE :
$sortie .= suppr_note($un_herbier).mod_herb($un_herbier);
break;
// Gestion des correspondants
case NOUVEAU_CORR :
$sortie .= parcourrirAnnu($un_herbier, NOUVEAU_CORR_V);
break;
case NOUVEAU_CORR_V :
$sortie .= nouveau_corr_v($un_herbier).menu($un_herbier);
break;
case SUPPR_CORR:
$sortie .= suppr_corr($un_herbier).menu($un_herbier);
break;
// Gestion des rédacteurs
case NOUV_RED :
$sortie .= parcourrirAnnu($un_herbier, NOUV_RED_V);
break;
case NOUV_RED_V :
$sortie .= nouveau_red_v($un_herbier).menu($un_herbier);
break;
case SUPPR_RED :
$sortie .= suppr_red($un_herbier).menu($un_herbier);
break;
// Affichage par défaut
default :
$sortie .= menu($un_herbier);
break;
}
} else {
$sortie .= fournirAideInscription();
}
} elseif (HBA_ARGUMENT_AUTH == 1) {
$sortie .= GEN_afficherInfoIdentification($GLOBALS['_HERBIER_']['url']->getURL());
} else {
$sortie .= '<p class="pap_erreur">'.
'ERREUR : problème!'.'<br />'.'LIGNE : '. __LINE__ .'<br />'.'FICHIER : '. __FILE__ .
'</p>';
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$sortie .= '<!-- Herbier - Administration : FIN -->'."\n";
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/05/18 07:30:13 jpm
* Correction des bogues et derniers réglages avant mise en ligne du site v4.
*
* Revision 1.1 2005/04/06 13:34:00 jpm
* Ajout du fichier principal de l'application Administration.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_admin/hb_admin.menu.php
New file
0,0 → 1,118
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Administration. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hb_admin.menu.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Herbier Administration : menu
*
* Ce fichier fournit le menu de l'application herbier.
*
*@package Herbier-Administration
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de l'application Herbier - Administration. */
require_once HB_CHEMIN_APPLI.'hb_admin'.GEN_SEP.'configuration'.GEN_SEP.'hba_config.inc.php';
 
// Appel du fichier de traduction des textes de l'application Administration de Herbier
if (file_exists(HBA_CHEMIN_LANGUES.'hba_langue_'.HB_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Administration de Herbier. */
include_once HBA_CHEMIN_LANGUES.'hba_langue_'.HB_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once HBA_CHEMIN_LANGUES.'hba_langue_fr.inc.php';
}
 
/** Inclusion du fichier de fonctions permettant d'ajouter, modifier ou supprimer des
* informations dans la base de données Herbier. */
require_once HBA_CHEMIN_BIBLIO.'hba_manipulation.fonct.php';
 
/** Inclusion de la classe principale d'Herbier : herbier */
require_once HB_CHEMIN_BIBLIO.'hb_herbier.class.php';
/** Inclusion de la classe Herbier : collection */
require_once HB_CHEMIN_BIBLIO.'hb_collection.class.php';
/** Inclusion de la classe Herbier : indic */
require_once HB_CHEMIN_BIBLIO.'hb_indic.class.php';
/** Inclusion de la classe Herbier : indic_hist */
require_once HB_CHEMIN_BIBLIO.'hb_indic_hist.class.php';
/** Inclusion de la classe Herbier : organisation */
require_once HB_CHEMIN_BIBLIO.'hb_organisation.class.php';
/** Inclusion de la classe Herbier : type */
require_once HB_CHEMIN_BIBLIO.'hb_type.class.php';
/** Inclusion de la classe Herbier : equipe */
require_once HB_CHEMIN_BIBLIO.'hb_equipe.class.php';
/** Inclusion de la classe Herbier : utilisateur */
require_once HB_CHEMIN_BIBLIO.'hb_utilisateur.class.php';
 
// Initialisation de variables
$sortie .= '<!-- Herbier - Administration menu : DEBUT -->'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
if (!defined('HBA_ARGUMENT_AUTH') || HBA_ARGUMENT_AUTH == FALSE || (HBA_ARGUMENT_AUTH == TRUE && $GLOBALS['_HERBIER_']['auth']->getAuth())) {
// Initialisation de variables
if (!isset($_REQUEST['action']) || empty($_REQUEST['action'])) {
$_REQUEST['action'] = HBA_ACTION_ANNULER;
}
// Création de l'objet "façade" H_Herbier().
$un_herbier = new H_Herbier($GLOBALS['_HERBIER_']['auth']->getAuthData(HB_BDD_TAB_ANNUAIRE_CHP_ID));
// Affichage du menu de l'application si l'utilisateur à des droits pour l'appli
if ($un_herbier->utilisateur->getDroit()) {
$sortie .= entete($un_herbier);
}
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$sortie .= '<!-- Herbier - Administration menu : FIN -->'."\n";
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2005/05/19 13:22:04 jpm
* Vérification des droits de l'utilisateur avant d'afficher le menu.
*
* Revision 1.1 2005/05/18 07:31:01 jpm
* Ajout du fichier gérant les menus de l'application admin.
*
* Revision 1.1 2005/04/06 13:34:00 jpm
* Ajout du fichier principal de l'application Administration.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_admin/bibliotheque/hba_manipulation.fonct.php
New file
0,0 → 1,1414
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Administration. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hba_manipulation.fonct.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Fonctions de manipulation de la base de données Herbier.
*
* Fonctions permettant d'ajouter, modifier ou supprimer des informations dans la base de données Herbier.
*
*@package Herbier-Administration
*@subpackage Fonctions
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// GESTION du MENU
 
function entete(&$un_herbier)
{
$retour = '<div id="hba_info">'."\n";
// Gestion des infos
$retour .= '<h1>'.'Vous êtes'.'</h1>'."\n";
// Affichage des droits
if ($un_herbier->utilisateur->getAdminBool()) {
$retour .= '<p>'.'Administrateur de ce projet'.'</p>'."\n";
} elseif ($un_herbier->utilisateur->getCoordBool()) {
$retour .= '<p>'.'Coordinateur de ce projet'.'</p>'."\n";
} elseif ($un_herbier->utilisateur->getRedacBool()) {
$retour .= '<p>'.'Rédacteur de ce projet'.'</p>'."\n";
}
// Affichage du noms de l'institution
/*
if (is_object($une_organisation = $un_herbier->getOrganisation())) {
$retour .= '<dt>'.'Institution :'.'</dt>'."\n".'<dd>';
if ($txt_court = raccourcirTexte($une_organisation->getNom(), HBA_LONGUEUR_ORG_NOM)) {
$retour .= '<abbr title="'.$une_organisation->getNom().'">'.$txt_court.'</abbr>';
} else {
$retour .= $une_organisation->getNom();
}
$retour .= '</dd>'."\n";
}
*/
// Gestion des menus
if ($un_herbier->utilisateur->getDroit()) {
$retour .= '<ul>'."\n";
$retour .= '<li><a href="'.sprintf($un_herbier->getUrlAction(), HBA_ACTION_ANNULER).'">'.
'Accueil'.
'</a></li>'."\n";
$retour .= '<li><a href="'.sprintf($un_herbier->getUrlAction(), HBA_ACTION_HERBIER_AJOUT).'">'.
'Ajouter une institution (herbier)'.
'</a></li>'."\n";
if ($un_herbier->utilisateur->getAdminBool()) {
$retour .= '<li><a href="'.sprintf($un_herbier->getUrlAction(), NOUVEAU_CORR).'">'.
'Inscrire un correspondant'.
'</a></li>'."\n";
} elseif ($un_herbier->utilisateur->getCoordBool()) {
$retour .= '<li><a href="'.sprintf($un_herbier->getUrlAction(), NOUV_RED).'">'.
'Inscrire un rédacteur'.
'</a></li>'."\n";
}
$retour .= '</ul>'."\n";
// Gestion du menu contextuel
$menu_contextuel = '';
switch ($un_herbier->getAction()) {
case NOUV_COLL : // 4
case MOD_DESC : // 21
case MOD_ADM : // 22
case NOUV_TEAM : // 30
case MOD_STAFF : // 32
case NOUV_INDIC : // 40
case MOD_NOTE : // 42
$id_org = $un_herbier->organisation->getId();
$menu_contextuel .= '<li><a href="'.
sprintf($un_herbier->getUrlActionOrg(), MOD_HERB, $id_org).'">'.
'Retour à l\'institution'.
'</a></li>'."\n";
break;
case MOD_HERB : // 20
case MOD_ADM_V : // 26
case MOD_DESC_V : // 27
case SUPPR_COLL : // 29
case NOUV_TEAM_V : // 31
case MOD_STAFF_V : // 33
case SUPPR_STAFF : // 34
case NOUV_INDIC_V : // 41
case SUPPR_NOTE : // 43
case MOD_NOTE_V : // 44
case HBA_ACTION_COLL_DEROULER : // 5
$id_org = $un_herbier->organisation->getId();
$menu_contextuel .= '<li><a href="'.
sprintf($un_herbier->getUrlActionOrg(), MOD_ADM, $id_org).'">'.
'Modifier l\'institution'.
'</a></li>'."\n".
'<li><a href="'.
sprintf($un_herbier->getUrlActionOrg(), NOUV_TEAM, $id_org).'">'.
'Ajouter un membre à l\'équipe'.
'</a></li>'."\n".
'<li><a href="'.
sprintf($un_herbier->getUrlActionOrg(), NOUV_COLL, $id_org).'">'.
'Ajouter une collection'.
'</a></li>'."\n";
break;
}
if (!empty($menu_contextuel)) {
$retour .= '<hr class="clear"/>'."\n";
$retour .= '<ul>'."\n";
$retour .= $menu_contextuel;
$retour .= '</ul>'."\n";
}
}
$retour .= '</div>'."\n";
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// GESTION de l'ACCUEIL
 
// Affichage de l'accueil
function menu(&$un_herbier)
{
$retour = '';
// Message d'accueil et aide
if (!$un_herbier->utilisateur->recupererOrganisationListe($un_herbier->utilisateur)) {
$retour .= '<h1>'.'Bienvenue sur la console d\'administration du projet Herbiers.'.'</h1>'."\n";
$retour .= fournirAideAccueil();
$retour .= '<h1 class="hba_titre">'.'Liste de vos herbiers'.'</h1>'."\n";
} else {
$retour .= '<h1 class="hba_titre">'.'Liste de vos herbiers'.'</h1>'."\n";
$retour .= fournirAideAccueilOrganisation();
}
// Les herbiers de l'utilisateur courant
$retour .= mesherbiers($un_herbier);
// Les herbiers des correspondants
if ($un_herbier->utilisateur->getAdminBool()) {
$retour .= liste_corr($un_herbier);
}
// Les herbiers des rédacteurs
if ($un_herbier->utilisateur->getCoordBool()) {
$retour .= liste_red($un_herbier);
}
return $retour;
}
 
// Affichage des herbiers d'un utilisateur
function mesherbiers(&$un_herbier)
{
$retour = '';
if (!$un_herbier->utilisateur->recupererOrganisationListe($un_herbier->utilisateur)) {
$retour .= '<p class="hba_attention">'.'Aucun herbier encore saisi !'.'</p>'."\n";
} else {
// Si l'utilisateur à saisi des herbiers : nous les affichons...
$retour .= '<div class="hba_liste_organisation">'."\n".
'<table>'."\n".
'<thead>'."\n".
'<tr>'."\n".'<th>'.'Ville'.'</th><th>'.'Institution'.'</th><th colspan="2">'.'Actions'.'</th>'."\n".'</tr>'."\n".
'</thead>'."\n";
$retour .= '<tbody>'."\n";
foreach ($un_herbier->utilisateur->getOrganisationListe() as $valeur) {
$retour .= '<tr class="'.color_alterne(&$flag).'">'."\n";
$retour .= '<td>'.$valeur->TOWN.'</td><td>'.$valeur->INSTITUTION_NAME.'</td>';
// Gestion des actions
$retour .= '<td><a href="'.sprintf($un_herbier->url_action_org, MOD_HERB, $valeur->ID_ORG).'">'.'modifier'.'</a></td>';
// Protection de l'institution exemple
if ($valeur->ID_ORG != HBA_EXEMPLE_ID) {
$retour .= '<td><a href="'.sprintf($un_herbier->url_action_org, SUPPR_HERB, $valeur->ID_ORG).'"';
$retour .= ' onclick="javascript:return confirm(\''.'Êtes-vous sûr de vouloir supprimer cette institution ?'.'\');"';
$retour .= '>'.'supprimer'.'</a></td>'."\n";
}
$retour .= '</tr>';
}
$retour .= '</tbody>'."\n".'</table>'."\n".'</div>'."\n";
}
// Si l'utilisateur est un coordinateur nous affichons les herbiers saisis par ses rédacteurs
if ($un_herbier->utilisateur->getCoordBool()) {
$retour .= leursherbiers($un_herbier);
}
return $retour;
}
 
// Renvoie les herbiers des rédacteurs dépendant d'un coordinateur
function leursherbiers(&$un_herbier)
{
// Initialisation de variables
$retour = '';
// Recheche de la liste des rédacteurs
$requete = 'SELECT U_NAME, U_SURNAME, U_ID '.
'FROM '.HB_BDD_NOM_ANNUAIRE.'.annuaire_tela, '.HB_BDD_NOM.'.HERBIERS_COORDONNE '.
'WHERE HC_ID_COORDINATEUR = '.$un_herbier->utilisateur->getId().' '.
'AND HC_ID_REDACTEUR = U_ID';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$id_utilisateur_courant_tmp = $un_herbier->utilisateur->getId();
while ($ligne = mysql_fetch_object($resultat)) {
$retour .= '<h2>'.'Herbiers de '.$ligne->U_NAME.' '.$ligne->U_SURNAME.'</h2>'."\n";
$un_herbier->utilisateur->setId($ligne->U_ID);
$retour .= mesherbiers($un_herbier)."\n";
}
$un_herbier->utilisateur->setId($id_utilisateur_courant_tmp);
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// GESTION de l'ORGANISATION (Institution)
 
function mod_herb(&$un_herbier)
{
// Initialisation de variables
$organisation_nom = $un_herbier->organisation->getNom();
$retour = '<h1>'.'Édition d\'une institution'.' - '.$organisation_nom.'</h1>';
$retour .= fournirAideOrganisation();
$liste_equipe = team_liste($un_herbier);
if ($liste_equipe != '') {
$retour .= '<h1>'.'L\'équipe de l\'institution'.'</h1>';
$retour .= fournirAideEquipe();
$retour .= $liste_equipe;
}
$liste_coll = liste_coll($un_herbier);
if ($liste_coll != '') {
$retour .= '<h1>'.'Liste des collections de l\'institution'.'</h1>'."\n";
$retour .= fournirAideCollection();
$retour .= $liste_coll;
}
return $retour;
}
 
function nouveau(&$un_herbier)
{
$retour = '<h1>'.'Saisie des renseignements administratifs d\'une institution'.'</h1>'."\n";
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_ORGANISATION');
form_administratif(&$form, $un_herbier);
$javascript = 'onsubmit="javascript:return validateAndSubmitAdd(this);"';
$retour .= $form->printForm(sprintf($un_herbier->url_action, HBA_ACTION_HERBIER_VERIF), $javascript, 'liste');
$retour .= '<div class="nettoyage">&nbsp;</div>'."\n";
$form->finalise('un_form');
return $retour;
}
 
// insertion des donnees administrative dans la base
// et des informations sur le correspondant
function nouveau_v(&$un_herbier)
{
$retour = '';
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], '');
$form = $form->acquerir('HERBIERS_ORGANISATION');
$id = $form->insertMySQL();
if ($_POST['INSTITUTION_NAME'] == '') {
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_ORGANISATION', 'MOD', $id, 'ID_ORG');
form_administratif(&$form, $un_herbier);
$retour .= '<h1>'.'Vous devez saisir un nom d\'institution'.'</h1>'."\n";
$retour .= $form->printForm(sprintf($un_herbier->url_action, HBA_ACTION_HERBIER_VERIF), 'onsubmit="javascript:return validateAndSubmitAdd(this);"');
return $retour;
}
$une_organisation = new H_organisation();
$une_organisation->setId($id);
if (!$un_herbier->utilisateur->getAdminBool()) {
$un_herbier->utilisateur->insererOrganisationListe($une_organisation);
}
return TRUE;
}
 
function form_administratif(&$form, &$un_herbier)
{
// Définition des styles
$form->style_general = 'hba_formulaire';
$form->style_label = 'hba_label';
$form->style_button = 'hba_bouton';
$form->style_commentaire = 'hba_commentaire';
$form->style_radiocheckbox = 'hba_radio';
// Choix des champs
$form->addChamps('INSTITUTION_NAME', 'Nom de l\'institution <span class="symbole_obligatoire">*</span> : ');
$form->addCommentaire('Dans le champs "Nom de l\'institution", ne saisissez que le nom de l\'institution, ne saisissez pas l\'adresse ou l\'index herbariorum.');
$form->addChamps('ADRESS_LINE', 'Adresse : ');
$form->addChamps('INDEX_HERB', 'Index Herbariorum : ');
$form->addCommentaire('<br />'.'Ne saisir que des chiffres, sans espace ( 54789 oui, F-54789 non )');
$form->addChamps('ZIP', 'Code postal <span class="symbole_obligatoire">*</span> : ');
$form->addChamps('TOWN', 'Ville : ');
$form->addChamps('REGION', 'Région : ');
$form->selectFromTable('COUNTRY_CODE par gen_COUNTRY', 'fr', 'GC_ID', 'GC_NAME', 'Pays : ');
$form->addChamps('TEL', 'Téléphone : ');
$form->addChamps('FAX', 'fax : ') ;
$form->addCommentaire('Saisir l\'e-mail de l\'organisation (ex: accueil@organisation.org), pas de mail individuel.');
$form->addChamps('EMAIL', 'E-mail : ');
$form->addCommentaire('<br />'.'Un lien internet vers l\'institution, de la forme <b>http://www.mon_institution.org</b>.');
$form->addChamps('HO_URL', 'URL : ');
$form->addChamps('LOGO', 'Logo (URL vers un fichier graphique) : ');
$form->addCommentaire('Indiquez ci-dessous tous les détails concernant l\'accès aux collections de l\'institution, comme les horaires d\'ouverture, les droits à acquitter...');
$form->addChamps('ACCESS_RESTRICTION', 'Conditions d\'accès : ');
$form->addCommentaire('<br />'.'Pensez à supprimer le contenu du champs ci-dessous si les informations que vous saisissez ne viennent pas de l\'Index Herbariorum, remplacez par votre nom.');
$form->addChamps('SOURCE_DES_DONNEES', 'Source des informations');
$form->addCommentaire('<strong><span class="symbole_obligatoire">'.'*'.'</span>'.' : '.'</strong>'.'champ obligatoire.');
if ($form->id != HBA_EXEMPLE_ID) {
$form->submit('Valider', 'herbier_pere');
}
$form->annuler('Annuler', sprintf($un_herbier->url_action, HBA_ACTION_ANNULER));
}
 
function mod_adm($un_herbier)
{
$retour = '<h1>'.'Modification d\'une institution'.' - '.$un_herbier->organisation->getNom().'</h1>';
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_ORGANISATION', 'MOD', $un_herbier->organisation->getId(), 'ID_ORG');
form_administratif(&$form, $un_herbier);
$retour .= $form->printForm(sprintf($un_herbier->url_action_org, MOD_ADM_V, $un_herbier->organisation->getId()));
$form->finalise('un_form');
return $retour;
}
 
function mod_adm_v(&$un_herbier)
{
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_ORGANISATION');
$form = $form->acquerir('HERBIERS_ORGANISATION');
if (($_POST['gen_COUNTRY'] == 'fr') and (!checkZip($_POST['ZIP']))) {
$retour .= checkvalue('Le code postal n\'a pas la forme adéquate', '');
return $retour;
}
$form->updateMySQL('ID_ORG', $un_herbier->organisation->getId());
}
 
function suppr_herb(&$un_herbier)
{
// Initialisation des variables
$id_org = $un_herbier->organisation->getId();
// Supression des collections (et par cascades des notes, indic...) des collections de l'organisation
$requete = 'SELECT ID '.
'FROM HERBIERS_COLLECTION '.
'WHERE PARENT_ID = '.$id_org;
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
while ($ligne = mysql_fetch_object($resultat)) {
suppr_coll($un_herbier, $ligne->ID);
}
// Suppression de l'organisation
$requete = 'DELETE FROM HERBIERS_ORGANISATION WHERE ID_ORG = '.$id_org;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
// Supression de chaque membre de l'équipe (ou contact) de l'organisation
$requete_01 = 'SELECT ID_STAFF '.
'FROM HERBIERS_ont_un_staff '.
'WHERE ID_ORG = '.$id_org;
$resultat_01 = mysql_query($requete_01) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_01));
while ($ligne_01 = mysql_fetch_object($resultat_01)) {
$requete_02 = 'DELETE FROM HERBIERS_STAFF '.
'WHERE ID_STAFF = '.$ligne_01->ID_STAFF;
mysql_query($requete_02) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_02));
}
// Suppression de la liste des équipiers (et/ou contacts) de l'organisation
$requete = 'DELETE FROM HERBIERS_ont_un_staff '.
'WHERE ID_ORG = '.$id_org;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
// Suppression de l'organisation dans la liste des organisations (= herbiers) de l'utilisateur (HERBIERS_ADMINISTRER)
$requete = 'DELETE FROM HERBIERS_ADMINISTRER '.
'WHERE HA_ID_ORG = '.$id_org;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
}
 
// +------------------------------------------------------------------------------------------------------+
// GESTION de l'ÉQUIPE, d'un ÉQUIPIER et d'un CONTACT
 
function team_liste(&$un_herbier)
{
$retour = '';
$requete = 'SELECT HERBIERS_STAFF.* '.
'from HERBIERS_STAFF, HERBIERS_ont_un_staff, HERBIERS_ORGANISATION '.
'WHERE HERBIERS_ORGANISATION.ID_ORG = '.$un_herbier->organisation->getId().' '.
'AND HERBIERS_ont_un_staff.ID_ORG = HERBIERS_ORGANISATION.ID_ORG '.
'AND HERBIERS_STAFF.ID_STAFF = HERBIERS_ont_un_staff.ID_STAFF';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) == 0) {
$retour .= '<p class="hba_attention">'.'Aucune équipe renseignée !'.'</p>'."\n";
return $retour;
}
$retour .= '<div class="hba_liste_equipe">'."\n";
$retour .= '<table>'."\n";
$retour .= '<thead><tr><th>'.'Nom'.'</th><th>'.'Prénom'.'</th><th colspan="2">'.'Actions'.'</th></tr></thead>'."\n";
$retour .= '<tbody>'."\n";
while ($ligne = mysql_fetch_object($resultat)) {
$retour .= '<tr class="'.color_alterne(&$flag).'"><td>'.$ligne->NOM.'</td><td>'.$ligne->PRENOM.'</td>'."\n";
$retour .= '<td><a href="'.sprintf($un_herbier->url_action_org_equipe, MOD_STAFF, $un_herbier->organisation->getId(), $ligne->ID_STAFF).'">'.
'modifier'.'</a></td>'."\n";
if ($un_herbier->organisation->getId() != HBA_EXEMPLE_ID) {
$retour .= '<td><a href="'.sprintf($un_herbier->url_action_org_equipe, SUPPR_STAFF, $un_herbier->organisation->getId(), $ligne->ID_STAFF).'" '.
' onclick="javascript:return confirm(\''.'Êtes-vous sûr de vouloir supprimer : '.$ligne->NOM.' '.$ligne->PRENOM.' ?'.'\');">'.
'supprimer'.'</a></td>'."\n";
}
$retour .= '</tr>'."\n";
}
$retour .= '</tbody>'."\n".'</table>'."\n".'</div>'."\n";
return $retour;
}
 
function nouv_team(&$un_herbier)
{
$retour = '<h1>'.'Ajout d\'un membre'.'</h1>'."\n";
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_STAFF');
form_team($form, $un_herbier);
$retour .= $form->printForm(sprintf($un_herbier->url_action_org, NOUV_TEAM_V, $un_herbier->organisation->getId()))."\n";
$form->finalise('form_team');
return $retour;
}
 
function nouv_team_v(&$un_herbier)
{
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_STAFF');
$form = $form->acquerir('HERBIERS_STAFF');
$un_herbier->organisation->insererMembreEquipe($form->insertMySQL());
}
 
function form_team(&$form , &$un_herbier)
{
// Définition des styles
$form->style_general = 'hba_formulaire';
$form->style_label = 'hba_label';
$form->style_button = 'hba_bouton';
$form->style_commentaire = 'hba_commentaire';
$form->style_radiocheckbox = 'hba_radio';
// Propose par defaut l'adresse de l'organisation
$requete = 'SELECT ADRESS_LINE, TOWN, ZIP '.
'FROM HERBIERS_ORGANISATION '.
'WHERE ID_ORG = '.$un_herbier->organisation->getId();
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$ligne = mysql_fetch_object($resultat);
$form->addChamps('NOM', 'Nom : ');
$form->addChamps('PRENOM', 'Prénom : ');
$form->addChamps('ADRESSE1', 'Adresse : ', $ligne->ADRESS_LINE);
$form->addChamps('ADRESSE2', 'Adresse : ');
$form->addChamps('CP', 'Code postal : ', $ligne->ZIP);
$form->addChamps('VILLE', 'Ville : ', $ligne->TOWN);
$form->addChamps('MAIL', 'email : ');
$form->addChamps('TEL', 'Tél : ');
$form->addChamps('FAX', 'Fax : ');
$form->addChamps('FONCTION', 'Fonction : ');
$form->radioEnum('CONTACT', 'La personne est-elle contact ? : ','non');
if ($un_herbier->organisation->getId() != HBA_EXEMPLE_ID) {
$form->submit('Valider');
}
$form->annuler('Annuler', sprintf($un_herbier->url_action_org, MOD_HERB, $un_herbier->organisation->getId()));
}
 
function suppr_staff(&$un_herbier)
{
$requete = 'DELETE FROM HERBIERS_ont_un_staff '.
'WHERE ID_STAFF = '.$un_herbier->equipe->getId().' '.
'AND ID_ORG = '.$un_herbier->organisation->getId();
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
// Verification que la fiche de herbiers_staff ai encore une utilite
$requete = 'SELECT ID_STAFF FROM HERBIERS_ont_un_staff WHERE ID_STAFF = '.$un_herbier->equipe->getId();
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
// le membre n'est plus dans aucun herbier, on le supprime
if (mysql_num_rows($resultat) == 0) {
$requete = 'DELETE FROM HERBIERS_STAFF WHERE ID_STAFF = '.$un_herbier->equipe->getId();
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
}
}
 
function mod_staff(&$un_herbier)
{
// Initialisation de variables
$id_equipe = $un_herbier->equipe->getId();
$id_org = $un_herbier->organisation->getId();
// Création du formulaire de modification
$retour = '<h1>'.'Modification d\'un membre de l\'équipe'.'</h1>'."\n";
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_STAFF', 'MOD', $id_equipe, 'ID_STAFF');
form_team($form, $un_herbier);
$url = sprintf($un_herbier->getUrlActionOrgEquipe(), MOD_STAFF_V, $id_org, $id_equipe);
$retour .= $form->printForm($url);
$form->finalise('form_staff');
return $retour;
}
 
function mod_staff_v(&$un_herbier)
{
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_STAFF');
$form = $form->acquerir('HERBIERS_STAFF');
$form->updateMySQL('ID_STAFF', $un_herbier->equipe->getId());
}
 
// +------------------------------------------------------------------------------------------------------+
// GESTION des COLLECTIONS
 
function liste_coll(&$un_herbier)
{
// Initialisation de variables
$retour = '';
$id_action = $un_herbier->getAction();
$id_org = $un_herbier->organisation->getId();
$id_coll = null;
if (is_object($un_herbier->getCollection())) {
$id_coll = $un_herbier->collection->getId();
}
$requete = 'SELECT NOM_COLLECTION,ID '.
'FROM HERBIERS_COLLECTION '.
'WHERE PARENT_ID = '.$id_org;
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) == 0) {
$retour .= '<p class="hba_attention">'.'Aucune collection renseignée !'.'</p>'."\n";
return $retour;
}
$retour .= '<div class="hba_liste_collection">'."\n".
'<table>'."\n".
'<thead><tr><th colspan="2">'.'Nom'.'</th><th colspan="3">'.'Actions'.'</th></tr></thead>'."\n".
'<tbody>'."\n";
while ($ligne = mysql_fetch_object($resultat)) {
$retour .= '<tr class="'.color_alterne(&$flag).'"><td class="hb_plier_deplier">';
$requete_indic = 'SELECT ID_INDIC '.
'FROM HERBIERS_INDIC '.
'WHERE ID = '.$ligne->ID;
$resultat_indic = mysql_query($requete_indic) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_indic));
if (mysql_num_rows($resultat_indic) > 0) {
$xhtml_fermer = '<a href="'.sprintf($un_herbier->getUrlActionOrgColl(), MOD_HERB, $id_org, $ligne->ID).'">'."\n".
'<img class="'.HB_CLASS_IMG_FERMER.'" src="'.HB_IMG_FERMER.'" alt="fermer" />'."\n".
'</a>'."\n";
$xhtml_ouvrir = '<a href="'.sprintf($un_herbier->getUrlActionOrgColl(), HBA_ACTION_COLL_DEROULER, $id_org, $ligne->ID).'">'."\n".
'<img class="'.HB_CLASS_IMG_ICONE.'" src="'.HB_IMG_OUVRIR.'" alt="dérouler" />'."\n".
'</a>'."\n";
if ($id_coll == $ligne->ID) {
switch ($id_action) {
case HBA_ACTION_COLL_DEROULER :
case SUPPR_NOTE :
case MOD_NOTE :
case MOD_NOTE_V :
$retour .= $xhtml_fermer;
break;
default :
$retour .= $xhtml_ouvrir;
}
} else {
$retour .= $xhtml_ouvrir;
}
}
$retour .= '</td><td>';
$retour .= $ligne->NOM_COLLECTION.'</td>';
$retour .= '<td><a href="'.
sprintf($un_herbier->getUrlActionOrgColl(), MOD_DESC, $id_org, $ligne->ID).
'">'.'modifier'.'</a></td>'."\n";
if ($id_org != HBA_EXEMPLE_ID) {
$retour .= '<td><a href="'.
sprintf($un_herbier->getUrlActionOrgColl(), SUPPR_COLL, $id_org, $ligne->ID).
'" onclick="javascript:return confirm(\''.'Étes vous sûr de vouloir supprimer cette collection ?'.'\');">'.
'supprimer'.'</a>&nbsp;</td>'."\n";
}
$retour .= '<td><a href="'.
sprintf($un_herbier->getUrlActionOrgColl(), NOUV_INDIC, $id_org, $ligne->ID).
'">'.'ajouter note'.'</a></td>'."\n";
$retour .= '</tr>';
switch ($id_action) {
case HBA_ACTION_COLL_DEROULER :
case SUPPR_NOTE :
case MOD_NOTE :
case MOD_NOTE_V :
if ($id_coll == $ligne->ID) {
$retour .= '<tr class="hba_liste_note"><td colspan="5">'.liste_indic($un_herbier).'</td></tr>'."\n";
}
break;
}
}
$retour .= '</tbody>'."\n".'</table>'."\n".'</div>';
return $retour;
}
 
function nouv_coll(&$un_herbier)
{
$retour = '<h1>'.'Ajout d\'une collection'.'</h1>'."\n";
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_COLLECTION');
$form->style_general = 'insInputForm';
form_herb_2($form, $un_herbier);
$retour .= $form->printForm(sprintf($un_herbier->url_action_org, NOUVEAU_HERB4, $un_herbier->organisation->getId()))."\n";//, null, 'liste'
$form->finalise('form_2');
return $retour;
}
 
function form_herb_2(&$form, &$un_herbier)
{
// Définition des styles
$form->style_general = 'hba_formulaire';
$form->style_label = 'hba_label';
$form->style_button = 'hba_bouton';
$form->style_commentaire = 'hba_commentaire';
$form->style_radiocheckbox = 'hba_radio';
// Choix des champs
$form->addChamps('NOM_COLLECTION', 'Nom de la collection : ');
$form->addChamps('COLLECTION_CODE', 'Sigle d\'usage de la collection : ');
$form->addChamps('DESCRIPTION', 'Description générale : ');
$form->radioFromTable('STATUT par HERBIERS_COLL_STATUT', 1, 'Statut de la collection : ');
$form->addCommentaire('Les collecteurs doivent être séparés par un retour à la ligne (entrée)');
$form->addChamps('COLLECTEURS', 'Collecteurs : ');
$form->addCommentaire('<b>Dates extrêmes de récolte des spécimens</b>');
$form->addCommentaire('Les dates doivent être saisies selon le format jj-mm-année, par ex: 05-06-1956');
$form->addCommentaire('Laisser en blanc la date de fin si la collection est encore alimentée');
// Les dates de début et fin de récolte
$form->addChamps('DATE_DEBUT', 'Date extrême de récolte des spécimens (début) : ', '', 'text', MEME_LIGNE);
$form->addChamps('DATE_FIN', '(fin) : ');
$form->radioFromTable('DATE_DEBUT_CARAC par HERBIERS_DATE_DEBUT_CARAC', '', 'Caractériser les dates : ', MEME_LIGNE);
$form->radioFromTable('DATE_FIN_CARAC par HERBIERS_DATE_FIN_CARAC', '', 'Caractériser les dates : ');
// L'url de la collection
$form->addChamps('URL', 'URL vers le site de la collection (optionnel) : ');
// Types, spécimens et dénombrement
$radio = array('0', 'indéterminé', '1', 'non', '2', 'oui');
$form->radio('INCLUDED_TYPE', $radio, 'Y-a-t\'il des échantillons-types : ');
$form->addCommentaire('<b>Mode de conservation des spécimens :</b>');
$form->checkboxFromTable('HERBIERS_COLLECTION par HERBIERS_ont_pres et HERBIERS_PRES', 'Cocher les cases : ', '','LIGNE', 'ID', 'ID_PRES', 'ID_PRES');
$form->addChamps('NUM_SPECIMENS', 'Nombre de spécimens : ');
$form->radioFromTable('PREC_SPECIMENS par HERBIERS_DENOMBREMENT_CARAC_SP', '', 'Caractériser le dénombrement');
$form->addChamps('NUM_SPECIES', 'Nombre d\'espèces : ');
$form->radioFromTable('PREC_SPECIES par HERBIERS_DENOMBREMENT_CARAC_SC', '', 'Caractériser le dénombrement');
// État de la collection
$form->addCommentaire('État de la collection : de 1 (= inconnu) à 4 (= excellent, parfait)');
$form->radioEnum('ETAT_SPECIMENS', 'État des spécimens : ');
$form->radioEnum('ETAT_CLASSEMENT', 'État du classement : ');
$form->radioEnum('ETAT_PRESENTATION', 'État de la présentation : ');
$form->addCommentaire('<br />');
// Classement
$form->addChamps('MODE_CLASSEMENT', 'Méthode de classement : ');
// Documentation
$form->addCommentaire( '<h2>'.'Informations sur la documentation disponible :'.'</h2>'.
'<ul>'."\n".
'<li>'.'documents associés à la collection (publications directement liées comme Flores, '.
'documents in&eacute;dits tels que dessins, aquarelles, carnets de notes de terrain...)'.'</li>'.
'<li>'.'documents sur la collection ou les collecteurs (publications relatant '.
'l\'acquisition, notices nécrologiques et/ou biographiques...)'.'</li>'.
'</ul>'."\n"
);
$form->addChamps('DOC_STATE', 'État de la documentation : ');
$form->addChamps('PERCENT_DATABASED', '% de la documentation en base de données : ');
if ($un_herbier->organisation->getId() != HBA_EXEMPLE_ID) {
$form->submit('Valider');
}
$form->annuler('Annuler', sprintf($un_herbier->url_action_org, MOD_HERB, $un_herbier->organisation->getId()));
}
 
function nouveau_herb4(&$un_herbier)
{
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], '');
$form = $form->acquerir('HERBIERS_COLLECTION');
$form->insertMySQL('PARENT_ID = '.$un_herbier->organisation->getId());
}
 
function mod_desc(&$un_herbier)
{
// Intitialisation de variables
$id_coll = $un_herbier->collection->getId();
$id_org = $un_herbier->organisation->getId();
// Création du formulaire de modification
$retour = '<h1>'.'Modification d\'une collection'.'</h1>'."\n";
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_COLLECTION', 'MOD', $id_coll, 'ID');
form_herb_2($form, $un_herbier);
$retour .= $form->printForm(sprintf($un_herbier->getUrlActionOrgColl(), MOD_DESC_V, $id_org, $id_coll));
$form->finalise('un_form');
return $retour;
}
 
function mod_desc_v(&$un_herbier)
{
// Intitialisation de variables
$id_coll = $un_herbier->collection->getId();
// Insertion des infos après vérification
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_COLLECTION');
$form = $form->acquerir('HERBIERS_COLLECTION');
$form->updateMySQL('ID', $id_coll);
}
 
function suppr_coll(&$un_herbier, $id_coll_param = null)
{
// Initialisation de variables
// Si l'identifiant de la collection est passé comme argument de la fonction
if (!is_null($id_coll_param)) {
$id_coll = $id_coll_param;
} else {
$id_coll = $un_herbier->collection->getId();
}
$requete = 'DELETE FROM HERBIERS_COLLECTION '.
'WHERE ID = '.$id_coll;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$requete = 'SELECT ID_INDIC '.
'FROM HERBIERS_INDIC '.
'WHERE ID = '.$id_coll;
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
while ($ligne = mysql_fetch_object($resultat)) {
suppr_note($un_herbier, $ligne->ID_INDIC);
}
}
 
// +------------------------------------------------------------------------------------------------------+
// GESTION des NOTES
 
function liste_indic(&$un_herbier)
{
// Initialisation des variables
$id_org = $un_herbier->organisation->getId();
$id_coll = $un_herbier->collection->getId();
$requete = 'SELECT ID_INDIC, TXT_INDIC '.
'FROM HERBIERS_INDIC WHERE ID = '.$id_coll;
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$retour = '<div class="hba_liste_note">'."\n".
'<table>'."\n";
$num_row = mysql_num_rows($resultat);
$compteur = 0;
while ($row = mysql_fetch_object($resultat)) {
$compteur++;
$retour .= '<tr class="hb_arborescence"><td>';
if ($compteur == $num_row) {
$retour .= '<img src="'.HB_IMG_ARBO_FIN.'" alt="|_" />';
} else {
$retour .= '<img src="'.HB_IMG_ARBO.'" alt="|-" />';
}
$retour .= '</td><td>';
if ($txt_court = raccourcirTexte($row->TXT_INDIC, HBA_LONGUEUR_NOTE_TXT)) {
$retour .= '<abbr title="'.$row->TXT_INDIC.'">'.$txt_court.'</abbr>';
} else {
$retour .= $row->TXT_INDIC;
}
$retour .= '</td>'."\n";
$retour .= '<td><a href="'.
sprintf($un_herbier->getUrlActionOrgCollNote(), MOD_NOTE, $id_org, $id_coll, $row->ID_INDIC).
'">'.'modifier'.'</a></td>'."\n";
if ($id_org != HBA_EXEMPLE_ID) {
$retour .= '<td><a href="'.
sprintf($un_herbier->getUrlActionOrgCollNote(), SUPPR_NOTE, $id_org, $id_coll, $row->ID_INDIC).'" '.
'onclick="javascript:return confirm(\''.'Êtes-vous sûr de vouloir supprimer cette note ?'.'\');"'.
'>'.'supprimer'.'</a></td></tr>'."\n";
}
}
$retour .= '</table>'."\n".'</div>'."\n";
return $retour;
}
 
function nouv_indic(&$un_herbier)
{
// Initialisation des variables
$id_org = $un_herbier->organisation->getId();
$id_coll = $un_herbier->collection->getId();
$retour = '<h1>'.'Ajout d\'une note'.'</h1>'."\n";
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_INDIC');
form_indic($form, $un_herbier);
$retour .= $form->printForm(sprintf($un_herbier->getUrlActionOrgColl(), NOUV_INDIC_V, $id_org, $id_coll));
$form->finalise('form_indic');
return $retour;
}
 
function form_indic(&$form, &$un_herbier)
{
// Initialisation des variables
$id_org = $un_herbier->organisation->getId();
$id_coll = $un_herbier->collection->getId();
// Définition des styles
$form->style_general = 'hba_formulaire';
$form->style_label = 'hba_label';
$form->style_button = 'hba_bouton';
$form->style_commentaire = 'hba_commentaire';
$form->style_radiocheckbox = 'hba_radio';
$form->addChamps('TXT_INDIC', 'Texte de la note : ');
$form->addChamps('REM_INDIC', 'Remarque : ');
$form->checkboxFromTable( 'HERBIERS_INDIC par HERBIERS_A_UN_TYPE et HERBIERS_TYPE',
'Cocher les cases : ', '', 'LIGNE', 'ID_INDIC', 'ID_TYPE', 'ID_TYPE');
$form->submit('Valider');
$form->annuler('Annuler', sprintf($un_herbier->getUrlActionOrgColl(), HBA_ACTION_COLL_DEROULER, $id_org, $id_coll));
}
 
function nouv_indic_v(&$un_herbier)
{
// Initialisation des variables
$id_coll = $un_herbier->collection->getId();
$id_utilisateur = $un_herbier->utilisateur->getId();
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_INDIC');
$form = $form->acquerir('HERBIERS_INDIC');
$id_note = $form->insertMySQL('ID = '.$id_coll.', MAJ_INDIC = UNIX_TIMESTAMP()');
// Insertion dans la table des historiques des indications
$requete = 'INSERT INTO HERBIERS_INDIC_HISTORIQUE VALUES ("", '.$id_note.', UNIX_TIMESTAMP(), '.$id_utilisateur.' )';
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
}
 
function mod_note(&$un_herbier)
{
// Initialisation des variables
$id_org = $un_herbier->organisation->getId();
$id_coll = $un_herbier->collection->getId();
$id_note = $un_herbier->note->getId();
$retour = '<h1>'.'Modification d\'une note'.'</h1>'."\n";
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_INDIC', 'MOD', $id_note, 'ID_INDIC') ;
form_indic($form, $un_herbier);
$retour .= $form->printForm(sprintf($un_herbier->getUrlActionOrgCollNote(), MOD_NOTE_V, $id_org, $id_coll, $id_note));
$form->finalise('form_indic');
return $retour;
}
 
function mod_note_v(&$un_herbier)
{
// Initialisation des variables
$id_note = $un_herbier->note->getId();
$id_utilisateur = $un_herbier->utilisateur->getId();
$form = new formFromTable($GLOBALS['_HERBIER_']['bdd'], 'HERBIERS_INDIC');
$form = $form->acquerir('HERBIERS_INDIC');
$form->updateMySQL('ID_INDIC', $id_note, 'MAJ_INDIC = UNIX_TIMESTAMP()');
// Insertion dans la table des historiques des indications
$requete = 'INSERT INTO HERBIERS_INDIC_HISTORIQUE VALUES("", '.$id_note.', UNIX_TIMESTAMP(), '.$id_utilisateur.')';
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
}
 
function suppr_note(&$un_herbier, $id_note_param = null)
{
// Initialisation de variables
// Si l'identifiant de la note est passé comme argument de la fonction
if (!is_null($id_note_param)) {
$id_note = $id_note_param;
} else {
$id_note = $un_herbier->note->getId();
}
$requete = 'DELETE FROM HERBIERS_INDIC '.
'WHERE ID_INDIC = '.$id_note;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$requete = 'DELETE FROM HERBIERS_A_UN_TYPE '.
'WHERE ID_INDIC = '.$id_note;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
}
 
// +------------------------------------------------------------------------------------------------------+
// GESTION des CORRESPONDANTS
// renvoie le code html d'une liste de correspondant
function liste_corr(&$un_herbier)
{
// Initialisation de variables
$retour = '';
$id_action = $un_herbier->getAction();
$id_cor = null;
if (is_object($un_herbier->getCorrespondant())) {
$id_cor = $un_herbier->correspondant->getId();
}
$retour .= '<h1 class="hba_titre">'.'Liste des correspondants régionaux'.'</h1>'."\n";
$requete = 'SELECT '.HB_BDD_TAB_ANNUAIRE_CHP_ID.', '.HB_BDD_TAB_ANNUAIRE_CHP_NOM.', '.HB_BDD_TAB_ANNUAIRE_CHP_PRENOM.' '.
'FROM '.HB_BDD_TAB_ANNUAIRE.', '.HB_BDD_NOM.'.EFLORE_DROIT_POSSEDER '.
'WHERE '.HB_BDD_TAB_ANNUAIRE_CHP_ID.' = EDP_ID_UTILISATEUR '.
'ORDER BY '.HB_BDD_TAB_ANNUAIRE_CHP_NOM.' ASC';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) == 0) {
$retour .= '<p class="hba_attention">'.'Aucun correspondant inscrit !'.'</p>'."\n";
return $retour;
}
$liste_inst = '';
$retour .= '<div class="hba_liste_correspondant">'."\n".
'<table>'."\n".
'<thead><tr><th colspan="2">'.'Nom'.'</th><th>'.'Prénom'.'</th><th colspan="2">'.'Actions'.'</th></tr></thead>'."\n".
'<tbody>'."\n";
while ($ligne = mysql_fetch_object($resultat)) {
// Recherche des institutions dont ils ont la responsabilité
$requete_inst = 'SELECT INSTITUTION_NAME '.
'FROM '.HB_BDD_NOM.'.HERBIERS_ORGANISATION, '.HB_BDD_NOM.'.HERBIERS_ADMINISTRER '.
'WHERE HA_ID_ANNUAIRE = '.$ligne->U_ID.' '.
'AND HA_ID_ORG = ID_ORG '.
'ORDER BY INSTITUTION_NAME ASC';
$resultat_inst = mysql_query($requete_inst) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_inst));
$retour .= '<tr class="'.color_alterne(&$flag).'"><td id="hba_correspondant_'.$ligne->U_ID.'" class="hb_plier_deplier">';
if (mysql_num_rows($resultat_inst) > 0) {
$nbre_ligne = mysql_num_rows($resultat_inst);
$compteur = 0;
$liste_inst = '<table>'."\n";
while ($ligne_inst = mysql_fetch_object($resultat_inst)) {
$compteur++;
$liste_inst .= '<tr class="hb_arborescence"><td>';
if ($compteur == $nbre_ligne) {
$liste_inst .= '<img src="'.HB_IMG_ARBO_FIN.'" alt="|_" />';
} else {
$liste_inst .= '<img src="'.HB_IMG_ARBO.'" alt="|-" />';
}
$liste_inst .= '</td><td>'.$ligne_inst->INSTITUTION_NAME.'</td></tr>'."\n";
}
$liste_inst .= '</table>'."\n";
$xhtml_fermer = '<a href="'.sprintf($un_herbier->getUrlActionCor(), HBA_ACTION_ANNULER, $ligne->U_ID, $ligne->U_ID).'">'."\n".
'<img class="'.HB_CLASS_IMG_FERMER.'" src="'.HB_IMG_FERMER.'" alt="fermer" />'."\n".
'</a>'."\n";
$xhtml_ouvrir = '<a href="'.sprintf($un_herbier->getUrlActionCor(), HBA_ACTION_COR_DEROULER, $ligne->U_ID, $ligne->U_ID).'">'."\n".
'<img class="'.HB_CLASS_IMG_ICONE.'" src="'.HB_IMG_OUVRIR.'" alt="dérouler" />'."\n".
'</a>'."\n";
if ($id_cor == $ligne->U_ID) {
switch ($id_action) {
case HBA_ACTION_COR_DEROULER :
$retour .= $xhtml_fermer;
break;
default :
$retour .= $xhtml_ouvrir;
}
} else {
$retour .= $xhtml_ouvrir;
}
} else {
$retour .= '&nbsp;';
}
$retour .= '</td>';
$retour .= '<td>'.$ligne->U_NAME.'</td>';
$retour .= '<td>'.$ligne->U_SURNAME.'</td>';
$retour .= '<td><a href="'.sprintf($un_herbier->getUrlActionCor(), SUPPR_CORR, $ligne->U_ID, $ligne->U_ID).'" '.
'onclick="javascript:return confirm(\''.'Êtes-vous sûr de vouloir supprimer ce correspondant ?'.'\');"'.
'>'.'supprimer'.'</a></td></tr>'."\n";
switch ($id_action) {
case HBA_ACTION_COR_DEROULER :
if ($id_cor == $ligne->U_ID) {
$retour .= '<tr class="hba_liste_organisation"><td colspan="4">'.$liste_inst.'</td></tr>'."\n";
}
break;
}
}
$retour .= '</tbody>'."\n".'</table>'."\n".'</div>'."\n";
return $retour;
}
 
function nouveau_corr_v(&$un_herbier)
{
$id_cor = $un_herbier->correspondant->getId();
$requete = 'SELECT EDP_ID_DROIT '.
'FROM EFLORE_DROIT_POSSEDER '.
'WHERE EDP_ID_UTILISATEUR = '.$id_cor.' '.
'AND EDP_ID_PROJET = 1 '.
'AND EDP_ID_DROIT < 3';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) == 0) {
$requete = 'INSERT INTO EFLORE_DROIT_POSSEDER '.
'SET EDP_ID_DROIT = 2, EDP_ID_PROJET = 1, EDP_ID_UTILISATEUR = '.$id_cor;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$retour = '<p class="hba_information">'.'Le correspondant a été ajouté'.'</p>'."\n";
} else {
$retour = '<p class="hba_attention">'.'L\'utilisateur est déjà inscrit comme correspondant régional'.'</p>'."\n";
}
return $retour;
}
 
function suppr_corr(&$un_herbier)
{
// Initialisation des variables
$id_cor = $un_herbier->correspondant->getId();
$requete = 'SELECT EDP_ID_UTILISATEUR '.
'FROM EFLORE_DROIT_POSSEDER '.
'WHERE EDP_ID_PROJET = 1 '.
'AND EDP_ID_UTILISATEUR = '.$id_cor;
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) != 0) {
$requete = 'DELETE FROM EFLORE_DROIT_POSSEDER '.
'WHERE EDP_ID_UTILISATEUR = '.$id_cor.' '.
'AND EDP_ID_PROJET = 1';
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$retour = '<p class="hba_information">'.'Le correspondant a été supprimé de la base'.'</p>'."\n";
} else {
$retour = '<p class="hba_attention">'.'L\'utilisateur n\'était pas un correspondant régional'.'</p>'."\n";
}
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// GESTION des RÉDACTEURS
 
// renvoie le code html d'une liste de rédacteur
function liste_red(&$un_herbier)
{
$retour = '';
$retour .= '<h1 class="hba_titre">'.'Liste de vos rédacteurs'.'</h1>'."\n";
$requete = 'SELECT '.HB_BDD_TAB_ANNUAIRE_CHP_ID.', '.HB_BDD_TAB_ANNUAIRE_CHP_NOM.', '.HB_BDD_TAB_ANNUAIRE_CHP_PRENOM.' '.
'FROM '.HB_BDD_TAB_ANNUAIRE.', '.HB_BDD_NOM.'.HERBIERS_COORDONNE '.
'WHERE '.HB_BDD_TAB_ANNUAIRE_CHP_ID.' = HC_ID_REDACTEUR '.
'AND HC_ID_COORDINATEUR = '.$un_herbier->utilisateur->getId();
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) == 0) {
$retour .= '<p class="hba_attention">'.'Aucun rédacteur inscrit !'.'</p>'."\n";
return $retour;
}
$retour .= '<div class="hba_liste_redacteur">'."\n".
'<table>';
while ($ligne = mysql_fetch_object($resultat)) {
$retour .= '<tr class="'.color_alterne(&$flag).'"><td class="hb_plier_deplier">';
/*
if (mysql_num_rows($resultat_indic) > 0) {
$xhtml_fermer = '<a href="'.sprintf($un_herbier->getUrlActionOrgColl(), MOD_HERB, $id_org, $ligne->ID).'">'."\n".
'<img class="'.HB_CLASS_IMG_FERMER.'" src="'.HB_IMG_FERMER.'" alt="fermer" />'."\n".
'</a>'."\n";
$xhtml_ouvrir = '<a href="'.sprintf($un_herbier->getUrlActionOrgColl(), HBA_ACTION_RED_DEROULER, $id_org, $ligne->ID).'">'."\n".
'<img class="'.HB_CLASS_IMG_ICONE.'" src="'.HB_IMG_OUVRIR.'" alt="dérouler" />'."\n".
'</a>'."\n";
if ($id_coll == $ligne->ID) {
switch ($id_action) {
case HBA_ACTION_RED_DEROULER :
$retour .= $xhtml_fermer;
break;
default :
$retour .= $xhtml_ouvrir;
}
} else {
$retour .= $xhtml_ouvrir;
}
}
*/
$retour .= '</td><td>'.$ligne->U_NAME.'</td>'.
'<td>'.$ligne->U_SURNAME.'</td>'."\n".
'<td><a href="'.sprintf($un_herbier->getUrlActionRed(), SUPPR_RED, $ligne->U_ID).'" '.
'onclick="javascript:return confirm(\''.'Êtes-vous sûr de vouloir supprimer ce rédacteur ?'.'\');">'.
'supprimer'.
'</a></td>'.
'</tr>'."\n";
}
$retour .= '</table>'."\n".'</div>'."\n";
return $retour;
}
 
function nouveau_red_v(&$un_herbier)
{
$id_red = $un_herbier->redacteur->getId();
$id_utilisateur = $un_herbier->utilisateur->getId();
$requete = 'SELECT HERBIERS_COORDONNE.HC_ID_REDACTEUR '.
'FROM HERBIERS_COORDONNE, EFLORE_DROIT_POSSEDER '.
'WHERE HC_ID_REDACTEUR = '.$id_red.' '.
'AND HC_ID_COORDINATEUR = EDP_ID_UTILISATEUR '.
'AND EFLORE_DROIT_POSSEDER.EDP_ID_UTILISATEUR = '.$id_utilisateur.' '.
'AND EFLORE_DROIT_POSSEDER.EDP_ID_DROIT < 3 '.
'AND EFLORE_DROIT_POSSEDER.EDP_ID_PROJET = 1';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) == 0) {
$requete = 'INSERT INTO HERBIERS_COORDONNE '.
'SET HC_ID_REDACTEUR = '.$id_red.', HC_ID_COORDINATEUR = '.$id_utilisateur;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
// Insertion du rédacteur dans EFLORE_DROIT_POSSEDER, s'il n'y est pas déjà
$requete = 'SELECT * '.
'FROM EFLORE_DROIT_POSSEDER '.
'WHERE EDP_ID_PROJET = 1 '.
'AND EDP_ID_UTILISATEUR = '.$id_red;
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
// Si le rédacteur n'existe pas on l'insere avec le droit 3 (modération ou ici rédacteur)
if (mysql_num_rows($resultat) == 0) {
$requete = 'INSERT INTO EFLORE_DROIT_POSSEDER '.
'SET EDP_ID_DROIT = 3, EDP_ID_PROJET = 1, EDP_ID_UTILISATEUR = '.$id_red;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
}
$retour = '<p class="hba_information">'.'Le correspondant a été ajouté'.'</p>'."\n";
} else {
$retour = '<p class="hba_attention">'.'L\'utilisateur est déjà inscrit comme rédacteur'.'</p>'."\n";
}
return $retour;
}
 
function suppr_red(&$un_herbier)
{
// Initialisation des variables
$id_red = $un_herbier->redacteur->getId();
$id_utilisateur = $un_herbier->utilisateur->getId();
$requete = 'SELECT EDP_ID_UTILISATEUR '.
'FROM EFLORE_DROIT_POSSEDER '.
'WHERE EDP_ID_PROJET = 1 '.
'AND EDP_ID_UTILISATEUR = '.$id_red.' '.
'AND EDP_ID_DROIT = 3';
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
if (mysql_num_rows($resultat) != 0) {
$requete = 'DELETE FROM EFLORE_DROIT_POSSEDER '.
'WHERE EDP_ID_UTILISATEUR = '.$id_red.' '.
'AND EDP_ID_PROJET = 1';
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$requete = 'DELETE FROM HERBIERS_COORDONNE '.
'WHERE HC_ID_REDACTEUR = '.$id_red;
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$retour = '<p class="hba_information">'.'Le rédacteur a été supprimé de la base'.'</p>'."\n";
} else {
$retour = '<p class="hba_attention">'.'L\'utilisateur n\'était pas un rédacteur'.'</p>'."\n";
}
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// GESTION des AIDES
 
function fournirAideInscription()
{
$retour = '<h1>'.'Interface d\'administration de la base de données des herbiers de France'.'</h1>'."\n".
'<p class="hba_aide">'.
'Vous n\'êtes pas inscrit comme '.'<strong>'.'correspondant régional'.'</strong>'.' ou '.
'<strong>'.'rédacteur'.'</strong>'.'. '.'<br />'.
'Si vous souhaitez participer activement au projet d\'inventaire des herbiers de France, vous '.
'pouvez envoyer un courriel à :'.
'</p>'."\n".
'<ul class="hba_aide">'."\n".
'<li><a href="mailto:mathezf@wanadoo.fr">'.'Joël MATHEZ'.'</a>'.' ou à '.
'<a href="mailto:pasch@isem.univ-montp2.fr">'.'P.A. Schäfer'.'</a>'.
' : pour des questions sur le contenu'.'</li>'."\n".
'<li><a href="mailto:jpm@tela-botanica.org">'.'Jean-Pascal MILCENT'.'</a>'.
' : pour obtenir un droit d\'accès'.'</li>'."\n".
'</ul>'."\n";
return $retour;
}
 
function fournirAideAccueil()
{
$retour = '<p class="hba_aide">'.
'Vous devriez voir, ci-contre, un "cartouche" contenant des '.'<emphasis>'.'informations'.'</emphasis>'.
' sur votre compte utilisateur (nom, droit d\'accès...)'.
'ainsi qu\'un '.'<emphasis>'.'menu'.'</emphasis>'.' qui vous permet d\'accèder aux différents '.
'formulaires de saisi composant l\'interface d\'admnistration des herbiers.'.
'</p>'."\n".
'<p class="hba_aide">'.
'La saisie d\'une nouvelle collection commence par la saisie d\'une structure accueillant '.
'la ou les collections.'.'<br />'.
'Pour ce faire, il vous faut cliquez sur le lien "Ajouter une institution (herbier)" présent '.
'dans le cartouche.'.
'</p>'."\n";
return $retour;
}
 
function fournirAideAccueilOrganisation()
{
$retour = '<p class="hba_aide">'.
'Pour <b>créer</b> une institution, il vous faut cliquez sur le lien "Ajouter une institution (herbier)" présent '.
'dans le cartouche ci-contre.'.'<br />'.
'Pour <b>éditer</b> une institution existante, son équipe et ses collections, cliquez sur le lien '.
'<b>modifier</b> situé sur la même ligne que l\'institution que vous avez choisie.'.'<br />'.
'Vous pouvez également la supprimer en cliquant sur le lien <b>supprimer</b>.'.
'</p>'."\n";
return $retour;
}
 
function fournirAideOrganisation()
{
$retour = '<p class="hba_aide">'.
'Le "cartouche" contenant le menu vous propose maintenant de :'.
'</p>'."\n".
'<ul class="hba_aide">'."\n".
'<li><strong>'.'Modifier'.'</strong>'.' les renseignements concernant l\'institution '.'<strong>'.
'->'.'Modifier l\'institution'.'</strong></li>'."\n".
'<li><strong>'.'Ajouter'.'</strong>'.' des informations sur les membres travaillant dans l\'institution '.
'ou dans le cas de petites structures pour indiquer qui est le contact.'.'<strong>'.
'->'.'Ajouter un membre à l\'équipe</strong></li>'."\n".
'<li><strong>'.'Ajouter'.'</strong>'.' des informations sur les collections possédées par l\'institution'.'<strong>'.
'->'.'Ajouter une collection'.'</strong></li>'."\n".
'</ul>'."\n";
return $retour;
}
 
function fournirAideEquipe()
{
$retour = '<p class="hba_aide">'.
'Pour une institution donnée, on peut ajouter autant de <b>membres d\'équipe (et/ou contacts)</b> '.
'que nécessaire.'.'<br />'.
'Cliquez sur le lien <b>modifier</b> situé sur la même ligne que le membre de l\'équipe que vous avez '.
'choisie, pour mettre à jour ses informations.'.'<br />'.
'Vous pouvez également le supprimer en cliquant sur le lien <b>supprimer</b>.'.
'</p>'."\n";
return $retour;
}
 
 
function fournirAideCollection()
{
$retour = '<p class="hba_aide">'.
'Pour une collection donnée, on peut ajouter autant de <b>notes (compléments '.
'd\'information)</b> que nécessaire. Lorsqu\'une collection contient des compléments '.
'd\'information, un <b>+</b> apparait à gauche de son nom, on peut les éditer en '.
'cliquant dessus.'.
'</p>'."\n";
return $retour;
}
 
function fournirAideParcourirAnnuaire()
{
$retour = '<p class="hba_aide">'.
'Cliquez sur une lettre pour afficher la liste des inscrits au site Tela Botanica dont le nom '.
'débute par cette lettre.'.
'</p>'."\n";
return $retour;
}
 
// +------------------------------------------------------------------------------------------------------+
// FONCTIONS COMMUNES
 
// verifie une valeur et affiche du texte en cons&eacute;quence
function checkvalue($prose, $value = '')
{
if ($value == '') {
$retour = '<h1>'.$prose.'</h1>'."\n";
$retour .= '<input type="submit" value="'.'Recommencer'.'" onclick="javascript:history.go(-1);" />'."\n";
return $retour;
}
return false ;
}
 
function color_alterne(&$flag)
{
if ($flag) {
$flag = FALSE;
return 'pair';
} else {
$flag = TRUE;
return 'impair';
}
}
 
/** Fonction checkZip() - Teste un code postal français.
*
* L'expression régulière ^[0-9]{5}$ est utilisée pour vérifier
* que nous avons à faire à un code postal français.
*
* @param string Le code postal à tester.
* @return boolean retourne vrai si code postal est valide.
*/
function checkZip($code)
{
if (ereg('^[0-9]{5}$', $code, $match)){
return TRUE;
} else {
return FALSE;
}
}
 
/** Fonction raccourcirTexte() - Raccourci un texte.
*
* Renvoie le $texte coupe a la $taille indique avec 3 point de suspension.
* Si le texte est plus court que $taille, il n'est pas modifie
*
* @param string le texte à raccourcir.
* @param integer le nombre de caractère maximum du texte raccourci.
* @param boolean mettre FALSE pour ne pas afficher de points de suspenssion.
* @return mixed retourne le texte abrégé ou FALSE.
*/
function raccourcirTexte($texte, $taille = null, $bool_suspenssion = TRUE) {
if (!is_null($taille) && strlen($texte) > $taille) {
if ($bool_suspenssion) {
return substr($texte, 0, $taille - 3).'...';
} else {
return substr($texte, 0, $taille);
}
}
return FALSE;
}
 
function parcourrirAnnu(&$un_herbier, $id_action)
{
// Initialisation de variables
$db =& $GLOBALS['_HERBIER_']['bdd'];
$retour = '';
if (NOUVEAU_CORR) {
$retour .= '<h1>'.'Inscription d\'un correspondant'.'</h1>'."\n";
} elseif (NOUVEAU_RED) {
$retour .= '<h1>'.'Inscription d\'un rédacteur'.'</h1>'."\n";
}
$retour .= fournirAideParcourirAnnuaire();
$retour .= '<p class="hba_alphabet">';
// Ecrire toutes les lettres avec un lien
for ($i = 65 ; $i < 91 ; $i++) {
$retour .= '<a href="'.sprintf(HB_URL_COURANTE_ADMIN_ACTION_LETTRE, $un_herbier->getAction(), chr($i));
$retour .= '">'.chr($i).'</a>'."\n";
}
$retour .= '</p>';
// si une lettre est selectionne
if (!empty($_REQUEST['lettre'])) {
$requete = 'SELECT '.HB_BDD_TAB_ANNUAIRE_CHP_NOM.', '.HB_BDD_TAB_ANNUAIRE_CHP_PRENOM.', '.
HB_BDD_TAB_ANNUAIRE_CHP_ID.', '.HB_BDD_TAB_ANNUAIRE_CHP_MAIL.' '.
'FROM '.HB_BDD_TAB_ANNUAIRE.' '.
'WHERE ';
if ($_REQUEST['lettre'] != 'tous') {
$requete .= HB_BDD_TAB_ANNUAIRE_CHP_NOM.' LIKE "'.$_REQUEST['lettre'].'%" ';
}
$requete .= 'ORDER BY '.HB_BDD_TAB_ANNUAIRE_CHP_NOM;
$resultat = $db->query($requete);
if (DB::isError($resultat)) {
die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete, $resultat->getDebugInfo()));
}
if ($resultat->numRows() != 0) {
// Pour chaque nom, inscription des infos
$retour .= '<h1>'.' Inscrits dont le nom débute par : '.$_REQUEST['lettre'].'</h1>'."\n";
$retour .= '<div class="hba_liste_inscrit">'."\n";
$retour .= '<table id="hba_table_annuaire">'."\n";
$retour .= '<colgroup><col width="30%" /><col width="30%" /><col width="30%" /><col width="10%" /></colgroup>'."\n";
$retour .= '<thead><tr><th>'.'Nom'.'</th><th>'.'Prénom'.'</th><th>'.'Courriel'.'</th><th>'.'Action'.'</th></tr></thead>'."\n";
$retour .= '<tbody>'."\n";
$pair = true;
while ($row = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$retour .= '<tr ';
if ($pair) {
$retour .= 'class="impair"';
$pair = false ;
} else {
$retour .= 'class="pair"';
$pair = true;
}
$retour .= '>';
$retour .= '<td>'.$row[HB_BDD_TAB_ANNUAIRE_CHP_NOM].'</td>'.
'<td>'.$row[HB_BDD_TAB_ANNUAIRE_CHP_PRENOM].'</td>'.
'<td>'.$row[HB_BDD_TAB_ANNUAIRE_CHP_MAIL].'</td>'."\n";
if ($un_herbier->getAction() == NOUVEAU_CORR) {
$retour .= '<td><a href="'.
sprintf($un_herbier->getUrlActionCor(), $id_action, $row[HB_BDD_TAB_ANNUAIRE_CHP_ID], $row[HB_BDD_TAB_ANNUAIRE_CHP_ID]).
'">'.'inscrire'.'</a></td>'."\n";
} elseif ($un_herbier->getAction() == NOUV_RED) {
$retour .= '<td><a href="'.
sprintf($un_herbier->getUrlActionRed(), $id_action, $row[HB_BDD_TAB_ANNUAIRE_CHP_ID]).
'">'.'inscrire'.'</a></td>'."\n";
}
$retour .= '</tr>'."\n";
}
$retour .= '</tbody>'."\n".'</table>'."\n".'</div>'."\n";
} else {
$retour .= '<p class="hba_attention">'.'Aucun inscrit!'.'</p>'."\n";
}
}
return $retour;
}
// +------------------------------------------------------------------------------------------------------+
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.5 2005/06/09 17:31:42 jpm
* Affichage en permanence dans le menu du lien vers l'accueil.
*
* Revision 1.4 2005/06/07 15:30:44 jpm
* Modid esthetique.
*
* Revision 1.3 2005/06/02 17:53:37 jpm
* Modification de l'affichage du menu.
*
* Revision 1.2 2005/05/18 07:30:13 jpm
* Correction des bogues et derniers réglages avant mise en ligne du site v4.
*
* Revision 1.1 2005/04/06 13:33:40 jpm
* Ajout du fichier contenant les fonctions réalisant la mise en page et la gestion des données.
* Cela devrait normalement être divisé en un modèle et une vue...
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_carto/configuration/hbca_config.inc.php
New file
0,0 → 1,69
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hbca_config.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Configuration de l'application Herbier - Cartographie
*
* Fichier de configuration de l'application Herbier - Cartographie.
*
*@package Herbier-Cartographie
*@subpackage Configuration
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Constante stockant le chemin du dossier contenant l'application Herbier - Cartographie.*/
define('HBCA_CHEMIN_RACINE', HB_CHEMIN_APPLI.'hb_carto'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les traductions.*/
define('HBCA_CHEMIN_LANGUES', HBCA_CHEMIN_RACINE.'langues'.GEN_SEP);
/** Constante stockant le chemin du dossier contenant les traductions.*/
define('HBCA_CHEMIN_BIBLIO', HBCA_CHEMIN_RACINE.'bibliotheque'.GEN_SEP);
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/09 15:55:44 jpm
* Ajout de l'application Cartographie des Herbiers.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_carto/hb_carto.php
New file
0,0 → 1,191
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hb_carto.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Application fournissant une cartographie des herbiers
*
* Fournit la carte des herbiers enregistrés dans la base de données.
*
*@package Herbier-Cartographie
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
/** Inclusion du fichier de configuration de l'application Herbier - Cartographie. */
require_once HB_CHEMIN_APPLI.'hb_carto'.GEN_SEP.'configuration'.GEN_SEP.'hbca_config.inc.php';
 
/** Inclusion de la classe principale d'Herbier : herbier */
//require_once HB_CHEMIN_BIBLIO.'hb_herbier.class.php';
/** Inclusion de la classe Herbier : collection */
//require_once HB_CHEMIN_BIBLIO.'hb_collection.class.php';
/** Inclusion de la classe Herbier : indic */
//require_once HB_CHEMIN_BIBLIO.'hb_indic.class.php';
/** Inclusion de la classe Herbier : indic_hist */
//require_once HB_CHEMIN_BIBLIO.'hb_indic_hist.class.php';
/** Inclusion de la classe Herbier : organisation */
//require_once HB_CHEMIN_BIBLIO.'hb_organisation.class.php';
/** Inclusion de la classe Herbier : type */
//require_once HB_CHEMIN_BIBLIO.'hb_type.class.php';
/** Inclusion de la classe Herbier : equipe */
//require_once HB_CHEMIN_BIBLIO.'hb_equipe.class.php';
 
// Appel du fichier de traduction des textes de l'application Cartographie de Herbier
if (file_exists(HBCA_CHEMIN_LANGUES.'hbca_langue_'.HB_I18N.'.inc.php')) {
/** Inclusion du fichier de traduction de l'application Lien Favoris. */
include_once HBCA_CHEMIN_LANGUES.'hbca_langue_'.HB_I18N.'.inc.php';
} else {
/** Inclusion du fichier de traduction fr par défaut. */
include_once HBCA_CHEMIN_LANGUES.'hbca_langue_fr.inc.php';
}
/** Inclusion du fichier fournissant des informations pour la cartographie. */
require_once HBCA_CHEMIN_BIBLIO.'hbca_information.fonct.php';
 
/** Inclusion de la bibliothèque Cartographie. */
require_once HB_CHEMIN_BIBLIO_CARTO.'carto_carte.class.php';
 
// Initialisation de la variable à retourner
$sortie .= '<!-- Herbier - Cartographie : DEBUT -->'."\n";
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
global $NOM_FICHIER;
global $image_x;
global $image_y;
global $historique_cartes;
global $liste_zone_carte;
 
$requete = 'SELECT *, COUNT(CD_ID_Departement) AS nbr '.
'FROM '.HB_BDD_NOM.'.HERBIERS_ORGANISATION, '.HB_BDD_NOM_CARTO.'.carto_DEPARTEMENT '.
'WHERE COUNTRY_CODE = "fr" '.
'AND CD_ID_Departement = if (substring(ZIP,1,2)<>"97", if (substring(ZIP,1,2)<>"98", substring(ZIP, 1,2),substring(ZIP,1,3)), substring(ZIP,1,3)) '.
'GROUP BY CD_ID_Departement';
 
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$tableau_organisation = array();
while ($ligne = mysql_fetch_object($resultat)) {
$tableau_organisation[$ligne->CD_ID_Departement] = $ligne->nbr;
}
 
$info_dpt_france['nom_table_zone'] = HB_BDD_NOM_CARTO.'.carto_DEPARTEMENT';
$info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement';
$info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement';
$info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R';
$info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V';
$info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B';
$info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays';
$info_dpt_france['tableau_valeurs_zone'] = $tableau_organisation;
 
// Instanciation du tableau contenant les champs de la table action
$info_table_action['nom_table_action'] = HB_BDD_NOM_CARTO.'.carto_ACTION';
$info_table_action['nom_chp_id_carte'] = 'CA_ID_Carte';
$info_table_action['nom_chp_id_zg_action'] = 'CA_ID_Zone_geo';
$info_table_action['nom_chp_type_zg'] = 'CA_Type_zone';
$info_table_action['nom_chp_action'] = 'CA_Action';
$info_table_action['nom_chp_id_carte_destination'] = 'CA_ID_Carte_destination';
 
// On cree tout d'abords l'arborescence
$france = new Carto_Carte( 'france',
'fr',
'France',
CAR_FICHIER_CARTE_FR_DPT_MASQUE,
CAR_FICHIER_CARTE_FR_DPT,
HB_CHEMIN_CARTE,
$info_dpt_france,
$info_table_action);
 
$france->historique_cartes = $historique_cartes;
$france->image_x = $image_x;
$france->image_y = $image_y;
$france->liste_zone_carte = $liste_zone_carte;
$france->url = HB_URL_COURANTE;
 
// Une fois l'arborescence creee on lance la methode donnerFormulaireImage() pour recuperer la carte
// (dans $carte_france). S'il n'y a pas de carte a afficher donnerFormulaireImage() renvoi false. On peut alors recuperer
// le niveau ou on en est grace a $france->historique (du type france*34).
$img_carte_france = $france->donnerFormulaireImage();
 
// On teste $donc carte_france
if (!$img_carte_france) {
include 'hbca_herbier_liste.inc.php';
} else {
// Construction du titre de la carte et de l'historique de navigation dans les cartes
$historique_carte = new Carto_Historique($france, '&gt;', 'lien_non_souligne');
$tab = explode('*', $france->historique);
$id_carte = $tab[(count($tab) - 1)];
$requete_historique = 'SELECT CDC_Titre_carte, CDC_Type_zone_carte, CDC_ID_Zone_geo_carte '.
'FROM '.HB_BDD_NOM_CARTO.'.carto_DESCRIPTION_CARTE '.
'WHERE CDC_ID_Carte = "'.$id_carte.'"';
$resultat_historique = mysql_query($requete_historique) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_historique));
$ligne_historique = mysql_fetch_object($resultat_historique);
$structure_nbre = hbca_consulterNbreStructure($id_carte, $ligne_historique->CDC_Type_zone_carte, $ligne_historique->CDC_ID_Zone_geo_carte);
$titre = '';
if ($structure_nbre == 0) {
$titre .= $ligne_historique->CDC_Titre_carte.' : aucun organisme répertorié';
} else if ($structure_nbre == 1) {
$titre .= $ligne_historique->CDC_Titre_carte.' : '.$structure_nbre.' organisme répertorié';
} else {
$titre .= $ligne_historique->CDC_Titre_carte.' : '.$structure_nbre.' organismes répertoriés';
}
// Sortie XHTML
$sortie .= '<h1>'.$titre.'</h1>'."\n";
$sortie .= '<p><strong>'.$historique_carte->afficherHistoriqueCarte().'</strong></p>'."\n";
$sortie .= '<h2>Cliquez sur une zone de la carte pour zoomer.</h2>'."\n";
$sortie .= '<p>La couleur est proportionnelle au nombre d\'organisations.'."\n";
$sortie .= $img_carte_france;
$sortie .= '<h2>'.'Avertissement et déni de responsabilité : '.'</h2>'."\n";
$sortie .= '<p>'.'La représentation et l\'utilisation des frontières, des noms géographiques et autres données employés '."\n".
'sur les cartes et utilisés dans les listes, les tableaux, les documents et les bases de données de ce site '."\n".
'ne sont pas garanties sans erreurs, de même qu\'elles n\'engagent pas la responsabilité de l\'association '."\n".
'ni n\'impliquent de reconnaissance officielle de sa part.'.'</p>'."\n";
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$sortie .= '<!-- Herbier - Cartographie : FIN -->'."\n";
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/09 15:55:44 jpm
* Ajout de l'application Cartographie des Herbiers.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_carto/hbca_herbier_liste.inc.php
New file
0,0 → 1,93
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hbca_herbier_liste.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Liste des herbiers d'une zone géographique.
*
* Fichier fournissant la liste des herbiers présents dans une zone géographique donnée.
*
*@package Herbier-Cartographie
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
$tab = explode ('*',$france->historique);
$numero_departement = $tab[1];
 
$requete_dpt = 'SELECT GFD_NAME '.
'FROM '.HB_BDD_NOM_CARTO.'.gen_FRENCH_DPT '.
'WHERE GFD_ID = '.$numero_departement;
$resultat_dpt = mysql_query($requete_dpt) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_dpt));
$ligne_dpt = mysql_fetch_object($resultat_dpt);
$sortie .= '<h1>'.'Herbiers du département : '.$ligne_dpt->GFD_NAME.'</h1>'."\n";
 
$requete_info = 'SELECT gen_FRENCH_DPT.GFD_NAME, HERBIERS_ORGANISATION.INSTITUTION_NAME, '.
'HERBIERS_ORGANISATION.ID_ORG, HERBIERS_ORGANISATION.TOWN '.
'FROM '.HB_BDD_NOM_CARTO.'.gen_FRENCH_DPT, '.HB_BDD_NOM.'.HERBIERS_ORGANISATION '.
'WHERE gen_FRENCH_DPT.GFD_ID = '.$numero_departement.' '.
'AND gen_FRENCH_DPT.GFD_ID = '.
'if (substring(ZIP,1,2) <> "97", '.
'if (substring(ZIP,1,2) <> "98", substring(ZIP, 1,2),substring(ZIP,1,3)) , substring(ZIP,1,3))';
$resultat_info = mysql_query($requete_info) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_info));
if (mysql_num_rows($resultat_info) != 0) {
$sortie .= '<ul>'."\n";
// Une boucle sur chaque résultat, on affiche la ville et le nom de l'institution
while ($ligne_info = mysql_fetch_object($resultat_info)) {
$sortie .= '<li><a href="'.sprintf(HB_URL_COURANTE_CONSULTATION_FICHE_HERBIER_ID, $ligne_info->ID_ORG).'">'.
$ligne_info->TOWN.' - '.$ligne_info->INSTITUTION_NAME.'</a></li>'."\n";
}
$sortie .= '</ul>'."\n";
} else {
$sortie .= '<p>'.'Il n\'y a aucun herbier dans ce département... '."\n".
'<a href="'.HB_URL_COURANTE.'" hreflang="fr">'.'Retour à la cartographie'.'</a>'."\n".
'</p>'."\n";
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/09 15:55:44 jpm
* Ajout de l'application Cartographie des Herbiers.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_carto/bibliotheque/hbca_information.fonct.php
New file
0,0 → 1,90
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hbca_information.fonct.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Fonctions de l'application Herbier - Cartographie.
*
* Fichier de fonctions fournissant des informations de l'application Herbier - Cartographie.
*
*@package Herbier-Cartographie
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
/**
* Fonction hbca_consulterNbreStructure() - Donne le nombre de structure.
*
* Cette fonction renvoit le nombre de structure dans la carte passée en argument.
*
* @param int l'identifiant de la carte.
* @param int l'identifiant du type de zones contenues dans la carte.
* @param int l'identifiant de la zone géo de la carte.
* @return string une chaine XHTML donnant le nombre de structure.
*/
function hbca_consulterNbreStructure($id_carte, $type_zone_carte, $id_zone_geo_carte)
{
switch ($type_zone_carte){
case '2' :
$requete =
'SELECT count(ID_ORG) as nbr '.
'FROM '.HB_BDD_NOM.'.HERBIERS_ORGANISATION '.
'WHERE COUNTRY_CODE = "fr"';
break;
}
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete));
$ligne = mysql_fetch_object($resultat);
return $ligne->nbr;
}
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/09 15:55:44 jpm
* Ajout de l'application Cartographie des Herbiers.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/applications/hb_carto/langues/hbca_langue_fr.inc.php
New file
0,0 → 1,64
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of Herbier - Cartographie. |
// | |
// | Foobar is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | Foobar is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: hbca_langue_fr.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $
/**
* Fichier de traduction en français de l'application Herbier - Cartographie.
*
* Traduction en langue française.
*
*@package Herbier-Cartographie
*@subpackage Traduction
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@clapas.org>
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
// +------------------------------------------------------------------------------------------------------+
// | PIED du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/03/09 15:55:44 jpm
* Ajout de l'application Cartographie des Herbiers.
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>