/trunk/.htaccess |
---|
New file |
0,0 → 1,0 |
AddHandler application/x-httpd-php5 .php |
/trunk/bibliotheque/hb_equipe.class.php |
---|
New file |
0,0 → 1,134 |
<?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. | |
// | | |
// | 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_equipe.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe H_equipe |
* |
* Classe permettant de récupérer les données concernant les equipes de la base de données. |
* |
*@package Herbier |
*@subpackage Classes |
//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 | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe H_equipe() |
* |
* Contient la structure nécessaire pour |
* représenter une table HERBIERS_STAFF dont voici |
* la structure. |
* @package herbiers |
*/ |
class H_equipe { |
/** @var integer l'identifiant de l'équipier.*/ |
var $id; |
/** |
* Constructeur de H_equipe |
* |
* @param aucun |
* @return void |
* @access public |
*/ |
function H_equipe($id_equipier = null) |
{ |
if (!is_null($id_equipier)) { |
$this->setId($id_equipier); |
} |
} |
/** Accesseur getId() - Retourner l'id de l'équipier. |
* |
* @return integer l'identifiant de l'équipier. |
* @access public |
*/ |
function getId() |
{ |
return $this->id; |
} |
/** Accesseur setId() - Attribuer un id à l'équipier. |
* |
* @param integer l'identifiant de l'équipier. |
* @return void l'identifiant est ajouté à l'objet. |
* @access public |
*/ |
function setId($id) |
{ |
$this->id = $id; |
} |
/** Méthode getFromSQL() - Renvoie un objet de type H_equipe |
* |
* Renvoie un objet de type H_equipe dont |
* l'identificateur est spécifié en paramètre. |
* L'objet correspond à un membre d'une equipe décrite |
* par la table HERBIERS_STAFF |
* |
* @param integer $id l'identifiant de la table HERBIERS_STAFF |
* @return H_equipe un objet de la classe H_equipe |
* @access public |
*/ |
function getFromSQL($id) |
{ |
$requete = 'SELECT * '. |
'FROM HERBIERS_STAFF '. |
'WHERE ID_STAFF = '.$id; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat) ; |
foreach (get_object_vars($ligne) as $cle => $valeur) { |
$this->$cle = $valeur; |
} |
return H_Herbier::remplacerEsperluette($ligne); |
} |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.1 2005/03/08 14:13:21 jpm |
* Ajout des classes d'accès à la base de données. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/hb_utilisateur.class.php |
---|
New file |
0,0 → 1,403 |
<?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. | |
// | | |
// | 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_utilisateur.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe H_Utilisateur |
* |
* Classe permettant de récupérer les données concernant un utilisateur des Herbiers. |
* |
*@package Herbier |
*@subpackage Classes |
//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 | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe H_Utilisateur() |
* |
* Contient des requêtes sur la table servant d'annuaire. |
* |
* @package herbiers |
*/ |
class H_Utilisateur { |
/** @var integer identifiant de la personne actuellement connectée à l'administration des Herbiers.*/ |
var $id; |
/** @var object un objet directement sortie de la base de données via PearD Bcontenant toutes les information sur l'utilisateur.*/ |
var $info; |
/** @var bool contient TRUE si la personne à le droit d'accès sinon FALSE.*/ |
var $droit_bool; |
/** @var bool contient TRUE si la personne est administratrice sinon FALSE.*/ |
var $admin_bool; |
/** @var bool contient TRUE si la personne est coordinatrice sinon FALSE.*/ |
var $coord_bool; |
/** @var bool contient TRUE si la personne est rédacteur sinon FALSE.*/ |
var $redac_bool; |
/** @var array contient un tableau d'objet organisation appartenant à l'utilisateur.*/ |
var $organisation_liste; |
/** |
* Constructeur de H_Utilisateur |
* |
* @return void |
* @access public |
*/ |
function H_Utilisateur($id_utilisateur) |
{ |
$this->id = $id_utilisateur; |
$this->info = $this->renseignement($this->id); |
$this->droit_bool = $this->avoirDroit(); |
$this->admin_bool = $this->etreAdministrateur(); |
$this->coord_bool = $this->etreCoordinateur(); |
$this->redac_bool = $this->etreRedacteur(); |
} |
/** Méthode getId() - Retourne l'identifiant d'un utilisateur. |
* |
* @return integer l'identifiant d'un utilisateur. |
* @access public |
*/ |
function getId() |
{ |
return $this->id; |
} |
/** Méthode setId() - Remplace l'identifiant de l'utilisateur. |
* |
* @param integer l'identifiant de l'utilisateur. |
* @return void. |
* @access public |
*/ |
function setId($id) |
{ |
$this->id = $id; |
} |
/** Méthode getInfo() - Retourne les info sur un utilisateur. |
* |
* @return object les infos provenant de la table annuaire. |
* @access public |
*/ |
function getInfo() |
{ |
return $this->info; |
} |
/** Méthode getDroit() - Retourne la valeur de l'attribut droit_bool |
* |
* @return bool vrai si la personne à le droit sinon faux. |
* @access public |
*/ |
function getDroit() |
{ |
return $this->droit_bool; |
} |
/** Méthode getAdminBool() - Retourne la valeur de l'attribut admin_bool |
* |
* @return bool vrai si la personne est administrateur sinon faux. |
* @access public |
*/ |
function getAdminBool() |
{ |
return $this->admin_bool; |
} |
/** Méthode getCoordBool() - Retourne la valeur de l'attribut coord_bool |
* |
* @return bool vrai si la personne est coordinatrice sinon faux. |
* @access public |
*/ |
function getCoordBool() |
{ |
return $this->coord_bool; |
} |
/** Méthode getRedacBool() - Retourne la valeur de l'attribut redac_bool |
* |
* @return bool vrai si la personne est rédacteur sinon faux. |
* @access public |
*/ |
function getRedacBool() |
{ |
return $this->redac_bool; |
} |
/** Méthode getOrganisationListe() - Retourne le tableau des organisation de l'utilisateur. |
* |
* @return array le tableau des organisation de l'utilisateur. |
* @access public |
*/ |
function getOrganisationListe() |
{ |
if (is_array($this->organisation_liste)) { |
return $this->organisation_liste; |
} else { |
return array(); |
} |
} |
/** Méthode renseignement() - Renvoie un objet de type H_Utilisateur |
* |
* Renvoie un objet de type H_Administrateur dont l'identificateur est spécifié en paramètre. |
* L'objet correspond à un administrateur décrit dans la table servant d'annuaire. |
* |
* @param integer l'identifiant de la table servant d'annuaire. |
* @return object un objet de la classe H_Utilisateur |
* @access public |
*/ |
function renseignement($id_utilisateur = null) |
{ |
if (is_null($id_utilisateur)) { |
$id_utilisateur = $this->getId(); |
} |
$requete = 'SELECT * '. |
'FROM '.HB_BDD_TAB_ANNUAIRE.' '. |
'WHERE '.HB_BDD_TAB_ANNUAIRE_CHP_ID.' = '.$id_utilisateur; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat); |
return $ligne; |
} |
/** Méthode etreDansAnnuaire() - Retourne vrai si l'utilisateur est dans l'annuaire |
* |
* Renvoie vrai si la personne est présente dans l'annuaire utilisé pour les Herbiers |
* sinon la méthode renvoie faux. |
* |
* @param string la valeur à rechercher dans une colonne de la table d'annuaire. |
* @param string la nom de la colonne de la table d'annuaire où chercher la valeur. |
* @return bool vrai si la valeur est trouvée dans la colonne de la table d'annuaire sinon faux. |
* @access public |
*/ |
function etreDansAnnuaire($valeur, $champs) |
{ |
$requete = 'SELECT U_ID '. |
'FROM '.HB_BDD_TAB_ANNUAIRE.' '. |
'WHERE '.$champs.' = "'.$valeur.'"'; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
if (mysql_num_rows($resultat) != 0) { |
return TRUE; |
} else { |
return FALSE; |
} |
} |
/** Méthode avoirDroit() - Retourne un booléen en fonction des droits de la personne |
* |
* Renvoie vrai si la personne à le droit de se connecter à l'administration des Herbiers |
* sinon la méthode renvoie faux. |
* |
* @param integer l'identifiant de la personne dans la table servant d'annuaire. |
* @return bool vrai si la personne à le droit sinon faux. |
* @access public |
*/ |
function avoirDroit($id_utilisateur = null) |
{ |
if (is_null($id_utilisateur)) { |
$id_utilisateur = $this->getId(); |
} |
$requete = 'SELECT EDP_ID_DROIT '. |
'FROM '.HB_BDD_NOM.'.EFLORE_DROIT_POSSEDER '. |
'WHERE EDP_ID_UTILISATEUR = '.$id_utilisateur.' '. |
'AND EDP_ID_PROJET = 1'; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
if (mysql_num_rows($resultat) != 0) { |
return TRUE; |
} else { |
return FALSE; |
} |
} |
/** Méthode etreAdministrateur() - Retourne vrai si l'utilisateur est administrateur |
* |
* Renvoie vrai si la personne à les droits d'administrateur des Herbiers |
* sinon la méthode renvoie faux. |
* |
* @param integer l'identifiant de la personne dans la table servant d'annuaire. |
* @return bool vrai si la personne est administrateur sinon faux. |
* @access public |
*/ |
function etreAdministrateur($id_utilisateur = null) |
{ |
if (is_null($id_utilisateur)) { |
$id_utilisateur = $this->getId(); |
} |
$requete = 'SELECT EDP_ID_DROIT '. |
'FROM '.HB_BDD_NOM.'.EFLORE_DROIT_POSSEDER '. |
'WHERE EDP_ID_UTILISATEUR = '.$id_utilisateur.' '. |
'AND EDP_ID_PROJET = 1 '. |
'AND EDP_ID_DROIT = 1'; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
if (mysql_num_rows($resultat) != 0) { |
return TRUE; |
} else { |
return FALSE; |
} |
} |
/** Méthode etreCoordinateur() - Retourne vrai si l'utilisateur est coordinateur |
* |
* Renvoie vrai si la personne à les droits de coordinateur des Herbiers |
* sinon la méthode renvoie faux. |
* |
* @param integer l'identifiant de la personne dans la table servant d'annuaire. |
* @return bool vrai si la personne est coordinateur sinon faux. |
* @access public |
*/ |
function etreCoordinateur($id_utilisateur = null) |
{ |
if (is_null($id_utilisateur)) { |
$id_utilisateur = $this->getId(); |
} |
$requete = 'SELECT EDP_ID_DROIT '. |
'FROM '.HB_BDD_NOM.'.EFLORE_DROIT_POSSEDER '. |
'WHERE EDP_ID_UTILISATEUR = '.$id_utilisateur.' '. |
'AND EDP_ID_PROJET = 1 '. |
'AND EDP_ID_DROIT = 2'; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
if (mysql_num_rows($resultat) != 0) { |
return TRUE; |
} else { |
return FALSE; |
} |
} |
/** Méthode etreRedacteur() - Retourne vrai si l'utilisateur est rédacteur. |
* |
* Renvoie vrai si la personne à les droits de rédacteur des Herbiers |
* sinon la méthode renvoie faux. |
* |
* @param integer l'identifiant de la personne dans la table servant d'annuaire. |
* @return bool vrai si la personne est rédacteur sinon faux. |
* @access public |
*/ |
function etreRedacteur($id_utilisateur = null) |
{ |
if (is_null($id_utilisateur)) { |
$id_utilisateur = $this->getId(); |
} |
$requete = 'SELECT EDP_ID_DROIT '. |
'FROM '.HB_BDD_NOM.'.EFLORE_DROIT_POSSEDER '. |
'WHERE EDP_ID_UTILISATEUR = '.$id_utilisateur.' '. |
'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) { |
return TRUE; |
} else { |
return FALSE; |
} |
} |
/** Méthode donnerTableauUtilisateurs() - Retourne le tableau des utilisateurs avec droit. |
* |
* Renvoie un tableau contenant les id de chaque utilisateur de l'administration des Herbiers. |
* |
* @return array le tableau contenant les id de chaque utilisateur. |
* @access public |
*/ |
function donnerTableauUtilisateurs() |
{ |
$tab_utilisateurs = array(); |
$requete = 'SELECT U_ID '. |
'FROM '.HB_BDD_NOM_ANNUAIRE.'.annuaire_tela, '.HB_BDD_NOM.'.EFLORE_DROIT_POSSEDER '. |
'WHERE U_ID = EDP_ID_UTILISATEUR'; |
$resultat = mysql_query($requete) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
while ($ligne = mysql_fetch_assoc($resultat)) { |
array_push($tab_utilisateurs, $ligne['U_ID']); |
} |
return $tab_utilisateurs; |
} |
/** |
* Méthode recupererOrganisationListe() - Remplir le tableau des organisations de l'utilisateur. |
* |
* Initialise l'attribut organisation_utilisateur. |
* |
* @param H_Utilisateur l'objet représentant l'utilisateur actuel des Herbiers. |
* @return bool retourne TRUE si la talbeau a été rempli, FALSE si il est vide. |
* @access public |
*/ |
function recupererOrganisationListe(&$un_utilisateur) |
{ |
$requete = 'SELECT HERBIERS_ORGANISATION.ID_ORG, HERBIERS_ORGANISATION.INSTITUTION_NAME, HERBIERS_ORGANISATION.TOWN '. |
'FROM HERBIERS_ORGANISATION '; |
if (!$un_utilisateur->getAdminBool()) { |
$requete .= ', HERBIERS_ADMINISTRER '. |
'WHERE HERBIERS_ADMINISTRER.HA_ID_ANNUAIRE = '.$un_utilisateur->getId().' '. |
'AND HERBIERS_ADMINISTRER.HA_ID_ORG = HERBIERS_ORGANISATION.ID_ORG '; |
} |
$requete .= 'ORDER BY HERBIERS_ORGANISATION.TOWN'; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
if (mysql_num_rows($resultat) == 0) { |
return FALSE; |
} else { |
$this->organisation_liste = array(); |
while ($ligne = mysql_fetch_object($resultat)) { |
array_push($this->organisation_liste, $ligne); |
} |
return TRUE; |
} |
} |
/** |
* Méthode insererOrganisationListe() - Attribuer à un utilisateur une organisation. |
* |
* Permet d'insérer dans la base de données une ligne faisant correspondre une organisation à |
* un utilisateur. |
* |
* @param H_organisation l'objet représentant l'organisation de l'utilisateur. |
* return void |
* @access public |
*/ |
function insererOrganisationListe(&$une_organisation) |
{ |
$requete = 'INSERT INTO HERBIERS_ADMINISTRER '. |
'SET HA_ID_ANNUAIRE = '.$this->getId().', '. |
'HA_ID_ORG = '.$une_organisation->getId(); |
mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
} |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.1 2005/03/08 14:13:21 jpm |
* Ajout des classes d'accès à la base de données. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/hb_collection.class.php |
---|
New file |
0,0 → 1,187 |
<?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. | |
// | | |
// | 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_collection.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe H_collection |
* |
* Classe permettant de récupérer les données concernant les collections de la base de données. |
* |
*@package Herbier |
*@subpackage Classes |
//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 | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* class H_organisation contient la structure nécessaire pour |
* représenter une table HERBIERS_COLLECTION dont voici |
* la structure |
* @package herbiers |
*/ |
class H_collection { |
var $indic; |
var $included_type; |
var $preservation_method; |
/** |
* Constructeur de H_collection |
* |
* @param aucun |
* @return void |
* @access public |
*/ |
function H_collection($id_collection = null) { |
if (!is_null($id_collection)) { |
$this->setId($id_collection); |
} |
$indic = array(); |
$preservation_method = array(); |
} |
/** Accesseur getId() - Retourner l'id de la collection. |
* |
* @return integer l'identifiant de la collection. |
* @access public |
*/ |
function getId() |
{ |
return $this->id; |
} |
/** Accesseur setId() - Attribuer un id à la collection. |
* |
* @param integer l'identifiant de la collection. |
* @return void l'identifiant est ajouté à l'objet. |
* @access public |
*/ |
function setId($id) |
{ |
$this->id = $id; |
} |
/** Renvoie un objet de type H_collection |
* |
* Renvoie un objet de type H_collection dont |
* l'identificateur est spécifié en paramètre. |
* L'objet correspond à une collection décrite |
* par la table HERBIERS_COLLECTION |
* |
* @param integer $id l'identifiant de la table HERBIERS_COLLECTION |
* @return H_collection un objet de la classe H_collection |
* @access public |
*/ |
function getFromSQL($id) { |
$requete = 'SELECT HERBIERS_COLLECTION.*, HERBIERS_COLL_STATUT.LABEL, '. |
'HERBIERS_DATE_DEBUT_CARAC.LABEL_DATE_DEBUT_CARAC, HERBIERS_DATE_FIN_CARAC.LABEL_DATE_FIN_CARAC, '. |
'HERBIERS_DENOMBREMENT_CARAC_SP.HDC_LABEL AS SPECIES_LABEL, '. |
'HERBIERS_DENOMBREMENT_CARAC_SC.HDC_LABEL AS SPECIMENS_LABEL '. |
'FROM HERBIERS_COLLECTION, HERBIERS_COLL_STATUT, HERBIERS_DATE_DEBUT_CARAC, HERBIERS_DATE_FIN_CARAC, '. |
'HERBIERS_DENOMBREMENT_CARAC_SC, HERBIERS_DENOMBREMENT_CARAC_SP '. |
'WHERE ID = '.$id.' '. |
'AND HERBIERS_COLLECTION.STATUT = HERBIERS_COLL_STATUT.ID_COLL_STATUT '. |
'AND HERBIERS_COLLECTION.DATE_DEBUT_CARAC = HERBIERS_DATE_DEBUT_CARAC.ID_DATE_CARAC '. |
'AND HERBIERS_COLLECTION.DATE_FIN_CARAC = HERBIERS_DATE_FIN_CARAC.ID_DATE_CARAC '. |
'AND HERBIERS_COLLECTION.PREC_SPECIES = HERBIERS_DENOMBREMENT_CARAC_SC.HDC_ID '. |
'AND HERBIERS_COLLECTION.PREC_SPECIMENS = HERBIERS_DENOMBREMENT_CARAC_SP.HDC_ID'; |
$resultat = mysql_query($requete) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat); |
foreach (get_object_vars($ligne) as $cle => $valeur) { |
$this->$cle = $valeur; |
} |
mysql_free_result($resultat); |
$requete_02 = 'SELECT ID_INDIC '. |
'FROM HERBIERS_INDIC '. |
'WHERE ID = '.$id; |
$resultat_02 = mysql_query($requete_02) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_02)); |
while ($ligne_02 = mysql_fetch_object($resultat_02)){ |
$temp_indic = new H_indic(); |
$this->indic[] = $temp_indic->getFromSQL($ligne_02->ID_INDIC); |
} |
switch ($this->INCLUDED_TYPE) { |
case 1 : |
$this->included_type = 'non'; |
break; |
case 2 : |
$this->included_type = 'oui'; |
break; |
case 0 : |
$this->included_type = 'indéterminé'; |
break; |
} |
unset($this->INCLUDED_TYPE); |
// Récupération de la méthode de préservation |
$this->preservation_method = getPreservationMethod($ligne->ID); |
// Transformation des chiffres des champs ETAT en label |
$label_etat = array('1' => 'Inconnu', '2' => 'mauvais', '3' => 'moyen', '4' => 'très bon'); |
if (!isset($label_etat[$this->ETAT_SPECIMENS])) { |
$label_etat[$this->ETAT_SPECIMENS] = ''; |
} |
if (!isset($label_etat[$this->ETAT_PRESENTATION])) { |
$label_etat[$this->ETAT_PRESENTATION] = ''; |
} |
if (!isset($label_etat[$this->ETAT_CLASSEMENT])) { |
$label_etat[$this->ETAT_CLASSEMENT] = ''; |
} |
$this->ETAT_SPECIMENS = $label_etat[$this->ETAT_SPECIMENS]; |
$this->ETAT_PRESENTATION = $label_etat[$this->ETAT_PRESENTATION]; |
$this->ETAT_CLASSEMENT = $label_etat[$this->ETAT_CLASSEMENT]; |
return H_Herbier::remplacerEsperluette($this); |
} |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.2 2005/03/09 15:57:33 jpm |
* Modification de la forme. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/hb_indic_hist.class.php |
---|
New file |
0,0 → 1,124 |
<?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. | |
// | | |
// | 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_indic_hist.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe H_indic_hist |
* |
* Classe permettant de récupérer les données concernant les "indic hist" de la base de données. |
* |
*@package Herbier |
*@subpackage Classes |
//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 | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe H_indic_hist() |
* |
* Contient la structure nécessaire pour |
* représenter une table HERBIERS_INDIC_HISTORIQUE. |
*/ |
class H_indic_hist { |
/** |
* Constructeur de H_indic_hist |
* |
* @param aucun |
* @return void |
* @access public |
*/ |
function H_indic_hist() |
{ |
} |
/** |
* Méthode getFromSQL() - Initialise objet H_indic_hist |
* |
* Initialise un objet H_indic_hist dont les propriétés |
* contiennent l'information rataché à une indication_historique |
* caractérisé par son $id (un entier positif) qui correspond |
* à la clé primaire ID_INDIC de la table HERBIERS_INDIC_HISTORIQUE |
* |
* @param int la clé primaire de la table HERBIERS_INDIC_HISTORIQUE |
* @return void |
* @access public |
*/ |
function getFromSQL($id) |
{ |
$requete = 'SELECT ID_INDICATEUR, DATE_INDIC '. |
'FROM '.HB_BDD_NOM.'.HERBIERS_INDIC_HISTORIQUE '. |
'WHERE ID_INDIC = '.$id.' '. |
'ORDER BY DATE_INDIC DESC '. |
'LIMIT 0,1'; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat); |
if (mysql_num_rows($resultat) != 0) { |
// Récupération du nom de l'auteur de la note dans annu_USERS |
$requete_auteur = 'SELECT U_NAME, U_SURNAME '. |
'FROM '.HB_BDD_NOM_ANNUAIRE.'.annuaire_tela '. |
'WHERE U_ID = '.$ligne->ID_INDICATEUR; |
$resultat_auteur = mysql_query($requete_auteur) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_auteur)); |
$ligne_auteur = mysql_fetch_object($resultat_auteur); |
$ligne->ID_INDICATEUR = $ligne_auteur->U_NAME.' '.$ligne_auteur->U_SURNAME; |
// Récupération de la date |
$ligne->DATE_INDIC = date('d-m-Y', $ligne->DATE_INDIC); |
} |
return H_Herbier::remplacerEsperluette($ligne); |
} |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.1 2005/03/08 14:13:21 jpm |
* Ajout des classes d'accès à la base de données. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/hb_organisation.class.php |
---|
New file |
0,0 → 1,250 |
<?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. | |
// | | |
// | 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_organisation.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe H_organisation |
* |
* Classe permettant de récupérer les données concernant les organisations de la base de données. |
* |
*@package Herbier |
*@subpackage Classes |
//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 | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* class H_organisation() |
* |
* class H_organisation contient la structure nécessaire pour |
* représenter une table HERBIERS_ORGANISATION dont voici |
* la structure |
* @package herbiers |
*/ |
class H_organisation { |
/** @var integer l'identifiant de l'organisation.*/ |
var $id; |
/** @var string contient le nom de l'organisation.*/ |
var $nom; |
/** @var string contient l'adrese de l'organisation.*/ |
var $adresse; |
/** @var string contient l'adrese 01 de l'organisation.*/ |
var $adresse_02; |
/** @var H_collection un objet de type H_collection{@link H_collection}.*/ |
var $collections; |
/** @var string contiendra l'intitulé du pays.*/ |
var $pays; |
/** @var array contient un tableau d'objet equipe appartenant à l'organisation.*/ |
var $equipe_liste; |
/** |
* Constructeur de H_organisation |
* |
* @param aucun |
* @return void |
* @access public |
*/ |
function H_organisation($id_organisation = null) |
{ |
if (!is_null($id_organisation)) { |
$this->setId($id_organisation); |
$this->setNom($this->recupererNomOrganisation($id_organisation)); |
} |
$collections = array(); |
$equipe_liste = array(); |
$organisation_utilisateur = array(); |
} |
/** Accesseur getId() - Retourner l'id de l'organisation. |
* |
* @return integer l'identifiant de l'organisation. |
* @access public |
*/ |
function getId() |
{ |
return $this->id; |
} |
/** Accesseur setId() - Attribuer un id à l'organisation. |
* |
* @param integer l'identifiant de l'organisation. |
* @return void l'identifiant est ajouté à l'objet. |
* @access public |
*/ |
function setId($id) |
{ |
$this->id = $id; |
} |
/** Accesseur setNom() - Attribuer un nom à l'organisation. |
* |
* @param string le nom de l'organisation. |
* @return void le nom est ajouté à l'objet. |
* @access public |
*/ |
function setNom($nom) |
{ |
$this->nom = $nom; |
} |
/** Accesseur getNom() - Retourner le nom de l'organisation. |
* |
* @return string le nom de l'organisation. |
* @access public |
*/ |
function getNom() |
{ |
return $this->nom; |
} |
/** |
* Méthode getFromSQL() - Initialise objet H_organisation |
* |
* Initialise un objet H_organisation dont les propriétés |
* contiennent l'information rataché à une organisation |
* caractérisé par son $id (un entier positif) qui correspond |
* à la clé primaire ID_ORG de la table HERBIERS_ORGANISATION |
* |
* @param int la clé primaire de la table HERBIERS_ORGANISATION |
* @return void |
* @access public |
*/ |
function getFromSQL($id) |
{ |
$requete = 'SELECT * '. |
'FROM '.HB_BDD_NOM.'.HERBIERS_ORGANISATION '. |
'WHERE ID_ORG='.$id.' '. |
'ORDER BY TOWN'; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat); |
foreach (get_object_vars($ligne) as $cle => $valeur) { |
$this->$cle = $valeur; |
} |
// Récupération des collections |
$requete_02 = 'SELECT ID '. |
'FROM '.HB_BDD_NOM.'.HERBIERS_COLLECTION '. |
'WHERE PARENT_ID = '.$id; |
$resultat_02 = mysql_query($requete_02) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_02)); |
while ($ligne_02 = mysql_fetch_object($resultat_02)) { |
$temp_coll = new H_collection() ; |
$this->collections[] = $temp_coll->getFromSQL($ligne_02->ID); |
unset($temp_coll); |
} |
$this->pays = getCountryName($this->COUNTRY_CODE); |
unset($this->COUNTRY_CODE); |
// Récupération de l'équipe |
$requete_03 = 'SELECT * '. |
'FROM '.HB_BDD_NOM.'.HERBIERS_ont_un_staff '. |
'WHERE ID_ORG = '.$id; |
$resultat_03 = mysql_query($requete_03) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_03)); |
while ($ligne_03 = mysql_fetch_object($resultat_03)) { |
$temp_equipe = new H_equipe(); |
$this->equipe_liste[] = $temp_equipe->getFromSQL($ligne_03->ID_STAFF); |
unset($temp_equipe); |
} |
// Recherche de l'auteur de la saisie |
$requete_saisie = 'SELECT U_NAME, U_SURNAME '. |
'FROM '.HB_BDD_NOM_ANNUAIRE.'.annuaire_tela, '.HB_BDD_NOM.'.HERBIERS_ADMINISTRER, '.HB_BDD_NOM.'.HERBIERS_ORGANISATION '. |
'WHERE HERBIERS_ADMINISTRER.HA_ID_ORG = '.$id.' '. |
'AND HERBIERS_ADMINISTRER.HA_ID_ANNUAIRE = annuaire_tela.U_ID'; |
$resultat_saisie = mysql_query($requete_saisie) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_saisie)); |
$ligne_saisie = mysql_fetch_object($resultat_saisie); |
$this->U_NAME = $ligne_saisie->U_NAME; |
$this->U_SURNAME = $ligne_saisie->U_SURNAME; |
//$this = H_Herbier::remplacerEsperluette($this); |
foreach (get_object_vars(H_Herbier::remplacerEsperluette($this)) as $key => $value) { |
$this->$key = $value; |
} |
} |
/** |
* Méthode recupererNomOrganisation() - Retourne le nom d'une organisation. |
* |
* Permet de récupérer dans la base de données le nom d'une organisation dont on passe l'identifiant |
* en paramêtre. |
* |
* @param integer l'identifiant d'une organisation. |
* @return string le nom de l'institution. |
* @access public |
*/ |
function recupererNomOrganisation($id_organisation) |
{ |
$requete = 'SELECT INSTITUTION_NAME '. |
'FROM HERBIERS_ORGANISATION '. |
'WHERE ID_ORG = "'.$id_organisation.'"'; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat); |
$organisation_nom = $ligne->INSTITUTION_NAME; |
mysql_free_result($resultat); |
return $organisation_nom; |
} |
/** |
* Méthode insererMembreEquipe() - Insère un nouveau membre dans l'organisation. |
* |
* Permet d'insérer dans la base de données un lien entre une organisation et un membre d'équipe. |
* |
* @param integer l'identifiant d'un membre d'une équipe. |
* @return void |
* @access public |
*/ |
function insererMembreEquipe($id_equipe) |
{ |
$requete = 'INSERT INTO HERBIERS_ont_un_staff '. |
'SET ID_ORG = '.$this->getId().', ID_STAFF = '.$id_equipe; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
} |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.2 2005/03/09 15:57:33 jpm |
* Modification de la forme. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/hb_herbier.class.php |
---|
New file |
0,0 → 1,554 |
<?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. | |
// | | |
// | 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_herbier.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe H_Herbier |
* |
* Classe permettant de récupérer les données concernant les organisations de la base de données. |
* |
*@package Herbier |
*@subpackage Classes |
//Auteur original : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
//Autres auteurs : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* class H_Herbier() |
* |
* class H_Herbier contient les méthodes communes aux différentes classes de l'application Herbier. |
* @package herbiers |
*/ |
class H_Herbier { |
// +--------------------------------------------------------------------------------------------------+ |
// ATTRIBUTS |
/** @var integer le nombre représentant l'action courante de l'application.*/ |
var $action; |
/** @var string url de base de l'application d'administration d'Herbier.*/ |
var $url_base; |
/** @var string url avec l'action configurable via sprintf.*/ |
var $url_action; |
/** @var string url avec l'action et l'id organisation configurable via sprintf.*/ |
var $url_action_org; |
/** @var string url avec l'action, l'id organisation et l'id equipe configurable via sprintf.*/ |
var $url_action_org_equipe; |
/** @var string url avec l'action, l'id organisation et l'id collection configurable via sprintf.*/ |
var $url_action_org_coll; |
/** @var string url avec l'action, l'id organisation et l'id note configurable via sprintf.*/ |
var $url_action_org_note; |
/** @var string url avec l'action, l'id organisation, l'id collection et l'id note configurable via sprintf.*/ |
var $url_action_org_coll_note; |
/** @var string url avec l'action et l'id correspondant configurable via sprintf.*/ |
var $url_action_cor; |
/** @var string url avec l'action et l'id rédacteur configurable via sprintf.*/ |
var $url_action_red; |
/** @var string url avec l'action et l'id utilisateur configurable via sprintf.*/ |
var $url_action_utilisateur; |
/** @var array le tableau contenant une liste d'objet utilisateur ayant des droits dans l'administration de Herbier.*/ |
var $utilisateur_liste; |
/** @var H_Utilisateur l'objet H_Utilisateur correspondant à l'utilisateur actuel de Herbier.*/ |
var $utilisateur; |
/** @var H_Utilisateur un objet H_Utilisateur de type correspondant actuel de Herbier.*/ |
var $correspondant; |
/** @var H_Utilisateur un objet H_Utilisateur de type rédacteur actuel de Herbier.*/ |
var $redacteur; |
/** @var H_Organisation un objet H_Organisation correspondant à l'organisation courante de l'utilisateur actuel.*/ |
var $organisation; |
/** @var H_equipe l'objet de type H_equipe courant appartenant à l'organisation courante.*/ |
var $equipe; |
/** @var H_collection l'objet de type H_collection courant appartenant à l'organisation courante.*/ |
var $collection; |
/** @var H_indic l'objet de type H_indic courant appartenant à la collection courante.*/ |
var $note; |
// +--------------------------------------------------------------------------------------------------+ |
// CONSTRUCTEUR |
/** |
* Constructeur de H_Herbier |
* |
* @param integer l'identifiant de l'utilisateur courant des herbiers. |
* @return void |
* @access public |
*/ |
function H_Herbier($id_utilisateur = null) |
{ |
// Ajout de l'action courante |
if (isset($_REQUEST['action'])) { |
$this->setAction($_REQUEST['action']); |
} |
$this->utilisateur_liste = array(); |
// Ajout des urls courantes |
if (defined('HB_URL_COURANTE_ADMIN')) { |
$this->setUrlBase(HB_URL_COURANTE_ADMIN); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION')) { |
$this->setUrlAction(HB_URL_COURANTE_ADMIN_ACTION); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION_UTILISATEUR')) { |
$this->setUrlActionUtilisateur(HB_URL_COURANTE_ADMIN_ACTION_UTILISATEUR); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION_ORGANISATION')) { |
$this->setUrlActionOrg(HB_URL_COURANTE_ADMIN_ACTION_ORGANISATION); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION_ORG_EQUIPE')) { |
$this->setUrlActionOrgEquipe(HB_URL_COURANTE_ADMIN_ACTION_ORG_EQUIPE); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION_ORG_COLL')) { |
$this->setUrlActionOrgColl(HB_URL_COURANTE_ADMIN_ACTION_ORG_COLL); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION_ORG_NOTE')) { |
$this->setUrlActionOrgNote(HB_URL_COURANTE_ADMIN_ACTION_ORG_NOTE); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION_ORG_COLL_NOTE')) { |
$this->setUrlActionOrgCollNote(HB_URL_COURANTE_ADMIN_ACTION_ORG_COLL_NOTE); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION_COR')) { |
$this->setUrlActionCor(HB_URL_COURANTE_ADMIN_ACTION_COR); |
} |
if (defined('HB_URL_COURANTE_ADMIN_ACTION_RED')) { |
$this->setUrlActionRed(HB_URL_COURANTE_ADMIN_ACTION_RED); |
} |
// Ajout de l'utilisateur courant |
if (!is_null($id_utilisateur)) { |
$un_utilisateur = new H_Utilisateur($id_utilisateur); |
$this->setUtilisateur($un_utilisateur); |
} |
// Ajout de l'organisation courante |
if (isset($_REQUEST['id_org'])) { |
$une_organisation = new H_organisation($_REQUEST['id_org']); |
$this->setOrganisation($une_organisation); |
} |
// Ajout du membre de l'équipe courant |
if (isset($_REQUEST['id_equipe'])) { |
$une_equipe = new H_equipe($_REQUEST['id_equipe']); |
$this->setEquipe($une_equipe); |
} |
// Ajout de la collection courante |
if (isset($_REQUEST['id_coll'])) { |
$une_collection = new H_collection($_REQUEST['id_coll']); |
$this->setCollection($une_collection); |
} |
// Ajout de la collection courante |
if (isset($_REQUEST['id_note'])) { |
$une_note = new H_indic($_REQUEST['id_note']); |
$this->setNote($une_note); |
} |
// Ajout du correspondant |
if (isset($_REQUEST['id_cor'])) { |
$un_correspondant = new H_Utilisateur($_REQUEST['id_cor']); |
$this->setCorrespondant($un_correspondant); |
} |
// Ajout du rédacteur |
if (isset($_REQUEST['id_red'])) { |
$un_redacteur = new H_Utilisateur($_REQUEST['id_red']); |
$this->setRedacteur($un_redacteur); |
} |
} |
// +--------------------------------------------------------------------------------------------------+ |
// ACCESSEURS |
/** Accesseur setAction() - Ajoute l'action courante. |
* |
* @param integer le nombre représentant l'action courante de l'application. |
* @return void |
* @access public |
*/ |
function setAction($id_action) |
{ |
$this->action = $id_action; |
} |
/** Accesseur getAction() - Retourne l'action courante. |
* |
* @return integer le numéro de l'action courante de l'application. |
* @access public |
*/ |
function getAction() |
{ |
return $this->action; |
} |
/** Accesseur setUrlBase() - Ajoute l'url de base courante. |
* |
* @param string l'url de base courante de l'application. |
* @return void |
* @access public |
*/ |
function setUrlBase($url) |
{ |
$this->url_base = $url; |
} |
/** Accesseur getUrlBase() - Retourne l'url de base courante. |
* |
* @return string l'url de base courante de l'application. |
* @access public |
*/ |
function getUrlBase() |
{ |
return $this->url_base; |
} |
/** Accesseur setUrlAction() - Ajoute l'url avec l'action configurable. |
* |
* @param string l'url avec l'action configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlAction($url) |
{ |
$this->url_action = $url; |
} |
/** Accesseur getUrlAction() - Retourne l'url avec l'action configurable. |
* |
* @return string l'url avec l'action configurable via sprintf. |
* @access public |
*/ |
function getUrlAction() |
{ |
return $this->url_action; |
} |
/** Accesseur setUrlActionCor() - Ajoute l'url avec l'action et l'id correspondant configurable. |
* |
* @param string l'url avec l'action et l'id correspondant configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlActionCor($url) |
{ |
$this->url_action_cor = $url; |
} |
/** Accesseur getUrlActionCor() - Retourne l'url avec l'action et l'id correspondant configurable. |
* |
* @return string l'url avec l'action et l'id correspondant configurable via sprintf. |
* @access public |
*/ |
function getUrlActionCor() |
{ |
return $this->url_action_cor; |
} |
/** Accesseur setUrlActionRed() - Ajoute l'url avec l'action et l'id rédacteur configurable. |
* |
* @param string l'url avec l'action et l'id rédacteur configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlActionRed($url) |
{ |
$this->url_action_red = $url; |
} |
/** Accesseur getUrlActionRed() - Retourne l'url avec l'action et l'id rédacteur configurable. |
* |
* @return string l'url avec l'action et l'id rédacteur configurable via sprintf. |
* @access public |
*/ |
function getUrlActionRed() |
{ |
return $this->url_action_red; |
} |
/** Accesseur setUrlActionOrg() - Ajoute l'url avec l'action et l'id organisation configurable. |
* |
* @param string l'url avec l'action et l'id organisation configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlActionOrg($url) |
{ |
$this->url_action_org = $url; |
} |
/** Accesseur getUrlActionOrg() - Retourne l'url avec l'action et l'id organisation configurable. |
* |
* @return string l'url avec l'action et l'id organisation configurable via sprintf. |
* @access public |
*/ |
function getUrlActionOrg() |
{ |
return $this->url_action_org; |
} |
/** Accesseur setUrlActionOrgEquipe() - Ajoute l'url avec l'action, l'id organisation et l'id equipe configurable. |
* |
* @param string l'url avec l'action, l'id organisation et l'id equipe configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlActionOrgEquipe($url) |
{ |
$this->url_action_org_equipe = $url; |
} |
/** Accesseur getUrlActionOrgEquipe() - Retourne l'url avec l'action, l'id organisation et l'id equipe configurable. |
* |
* @return string l'url avec l'action, l'id organisation et l'id equipe configurable via sprintf. |
* @access public |
*/ |
function getUrlActionOrgEquipe() |
{ |
return $this->url_action_org_equipe; |
} |
/** Accesseur setUrlActionOrgColl() - Ajoute l'url avec l'action, l'id organisation et l'id collection configurable. |
* |
* @param string l'url avec l'action, l'id organisation et l'id collection configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlActionOrgColl($url) |
{ |
$this->url_action_org_coll = $url; |
} |
/** Accesseur getUrlActionOrgColl() - Retourne l'url avec l'action, l'id organisation et l'id collection configurable. |
* |
* @return string l'url avec l'action, l'id organisation et l'id collection configurable via sprintf. |
* @access public |
*/ |
function getUrlActionOrgColl() |
{ |
return $this->url_action_org_coll; |
} |
/** Accesseur setUrlActionOrgNote() - Ajoute l'url avec action, id organisation et id note configurable. |
* |
* @param string l'url avec l'action, l'id organisation et id note configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlActionOrgNote($url) |
{ |
$this->url_action_org_note = $url; |
} |
/** Accesseur getUrlActionOrgNote() - Retourne l'url avec l'action, l'id organisation et id note configurable. |
* |
* @return string l'url avec l'action, l'id organisation et l'id note configurable via sprintf. |
* @access public |
*/ |
function getUrlActionOrgNote() |
{ |
return $this->url_action_org_note; |
} |
/** Accesseur setUrlActionOrgCollNote() - Ajoute l'url avec action, id organisation, id collection et id note configurable. |
* |
* @param string l'url avec l'action, l'id organisation, l'id collection et id note configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlActionOrgCollNote($url) |
{ |
$this->url_action_org_coll_note = $url; |
} |
/** Accesseur getUrlActionOrgCollNote() - Retourne l'url avec l'action, l'id organisation, l'id collection et id note configurable. |
* |
* @return string l'url avec l'action, l'id organisation, l'id collection et l'id note configurable via sprintf. |
* @access public |
*/ |
function getUrlActionOrgCollNote() |
{ |
return $this->url_action_org_coll_note; |
} |
/** Accesseur setUrlActionUtilisateur() - Ajoute l'url avec l'action et l'id utilisateur configurable. |
* |
* @param string l'url avec l'action et l'id utilisateur configurable via sprintf. |
* @return void |
* @access public |
*/ |
function setUrlActionUtilisateur($url) |
{ |
$this->url_action_utilisateur = $url; |
} |
/** Accesseur getUrlActionUtilisateur() - Retourne l'url avec l'action et l'id utilisateur configurable. |
* |
* @return string l'url avec l'action et l'id utilisateur configurable via sprintf. |
* @access public |
*/ |
function getUrlActionUtilisateur() |
{ |
return $this->url_action_utilisateur; |
} |
/** Accesseur setUtilisateur() - Ajoute l'utilisateur courant. |
* |
* @param H_Utilisateur l'objet l'utilisateur courant. |
* @return void |
* @access public |
*/ |
function setUtilisateur(&$un_utilisateur) |
{ |
$this->utilisateur =& $un_utilisateur; |
} |
/** Accesseur getUtilisateur() - Retourne l'utilisateur courant. |
* |
* @return H_Utilisateur l'objet l'utilisateur courant. |
* @access public |
*/ |
function getUtilisateur() |
{ |
return $this->utilisateur; |
} |
/** Accesseur setCorrespondant() - Ajoute le correspondant courant. |
* |
* @param H_Utilisateur l'objet correspondant courant. |
* @return void |
* @access public |
*/ |
function setCorrespondant(&$un_correspondant) |
{ |
$this->correspondant =& $un_correspondant; |
} |
/** Accesseur getCorrespondant() - Retourne le correspondant courant. |
* |
* @return H_Utilisateur l'objet correspondant courant. |
* @access public |
*/ |
function getCorrespondant() |
{ |
return $this->correspondant; |
} |
/** Accesseur setRedacteur() - Ajoute le rédacteur courant. |
* |
* @param H_Utilisateur l'objet rédacteur courant. |
* @return void |
* @access public |
*/ |
function setRedacteur(&$un_redacteur) |
{ |
$this->redacteur =& $un_redacteur; |
} |
/** Accesseur getRedacteur() - Retourne le rédacteur courant. |
* |
* @return H_Utilisateur l'objet rédacteur courant. |
* @access public |
*/ |
function getRedacteur() |
{ |
return $this->redacteur; |
} |
/** Accesseur setOrganisation() - Ajoute l'organisation de l'utilisateur. |
* |
* @param H_Organisation l'objet organisation correspondant à l'utilisateur. |
* @return void |
* @access public |
*/ |
function setOrganisation(&$une_organisation) |
{ |
$this->organisation =& $une_organisation; |
} |
/** Accesseur getOrganisation() - Retourne l'organisation courante. |
* |
* @return H_Organisation l'objet organisation courant de l'utilisateur. |
* @access public |
*/ |
function getOrganisation() |
{ |
return $this->organisation; |
} |
/** Accesseur setEquipe() - Ajoute l'équipe courante. |
* |
* @param H_equipe l'objet équipe correspondant à l'organisation courante. |
* @return void |
* @access public |
*/ |
function setEquipe(&$une_equipe) |
{ |
$this->equipe =& $une_equipe; |
} |
/** Accesseur setCollection() - Ajoute une collection. |
* |
* @param H_collection l'objet collection courant. |
* @return void |
* @access public |
*/ |
function setCollection(&$une_collection) |
{ |
$this->collection =& $une_collection; |
} |
/** Accesseur getCollection() - Retourne une collection. |
* |
* @return H_collection l'objet collection courant. |
* @access public |
*/ |
function getCollection() |
{ |
return $this->collection; |
} |
/** Accesseur setNote() - Ajoute une note. |
* |
* @param H_indic l'objet note (H_indic) courant. |
* @return void |
* @access public |
*/ |
function setNote(&$une_note) |
{ |
$this->note =& $une_note; |
} |
// +--------------------------------------------------------------------------------------------------+ |
// MÉTHODES |
/** |
* Méthode remplacerEsperluette() - Remplace les & en & |
* |
* Permet de remplacer les & en & dans les données extraites de la |
* base de données. |
* |
* @param object l'objet dans lequel il faut ramplacer les & des attributs. |
* @return mixed l'objet avec les & remplacés en & ou si erreur FALSE. |
* @access public |
*/ |
function remplacerEsperluette(&$objet) |
{ |
// Remplacement des & en & avant renvoi des données |
if (is_object($objet)) { |
foreach (get_object_vars($objet) as $cle => $valeur) { |
$objet->$cle = str_replace(' & ', ' & ', $valeur); |
} |
return $objet; |
} |
return FALSE; |
} |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.1 2005/03/08 14:13:21 jpm |
* Ajout des classes d'accès à la base de données. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/hb_type.class.php |
---|
New file |
0,0 → 1,111 |
<?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. | |
// | | |
// | 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_type.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe H_type |
* |
* Classe permettant de récupérer les données concernant les types de la base de données. |
* |
*@package Herbier |
*@subpackage Classes |
//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 | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe H_type() |
* |
* Contient la structure nécessaire pour |
* représenter une table HERBIERS_STAFF dont voici |
* la structure. |
* @package herbiers |
*/ |
class H_type { |
var $id_type; |
/** |
* Constructeur de H_type |
* |
* @param aucun |
* @return void |
* @access public |
*/ |
function H_type() |
{ |
} |
/** Méthode getFromSQL() - Renvoie un objet de type H_equipe |
* |
* Renvoie un objet de type H_equipe dont |
* l'identificateur est spécifié en paramètre. |
* L'objet correspond à un membre d'une equipe décrite |
* par la table HERBIERS_STAFF |
* |
* @param integer $id l'identifiant de la table HERBIERS_STAFF |
* @return H_equipe un objet de la classe H_equipe |
* @access public |
*/ |
function getFromSQL($id) |
{ |
$requete = 'SELECT LABEL_TYPE '. |
'FROM HERBIERS_TYPE '. |
'WHERE HERBIERS_TYPE.ID_TYPE = '.$id; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
//return H_Herbier::remplacerEsperluette($ligne); |
return; |
} |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.1 2005/03/08 14:13:21 jpm |
* Ajout des classes d'accès à la base de données. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/hb_commun.fonct.php |
---|
New file |
0,0 → 1,111 |
<?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. | |
// | | |
// | 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_commun.fonct.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Fonctions communes aux applications d'Herbier |
* |
* Bibliothèque de fonctions communes aux applications d'Herbier. |
* |
*@package Herbier |
*@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 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Fonction getCountryName() - Renvois le nom d'un pays en fonction de son identifiant passé en paramètre |
* |
* Renvois le nom d'un pays en fonction de son identifiant passé en paramètre, |
* le nom renvoyé est le nom entier (exemple : France), l'identifiant est l'extension |
* des noms de domaines internet de chaque pays (exemple : fr) |
* |
* @param string l'identifiant du pays. |
* @return string le nom du pays. |
* @access public |
*/ |
function getCountryName($id) |
{ |
$requete = 'SELECT GC_NAME '. |
'FROM gen_COUNTRY '. |
'WHERE GC_ID = "'.$id.'"'; |
$resultat = mysql_query($requete) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat); |
return $ligne->GC_NAME; |
} |
/** |
* Fonction getPreservationMethod() - Renvois un tableau de méthode de préservation |
* |
* Renvoie un tableau contenant en l'ensemble des |
* méthode de préservation pour une collection donnée |
* La colection est identifiant par l'argument $id |
* |
* @param string $id l'identifiant de la collection |
* @return array les nom des méthodes de préservation |
* @access public |
*/ |
function getPreservationMethod($id) |
{ |
$array_pres = array(); |
$requete = 'SELECT HERBIERS_PRES.LABEL '. |
'FROM HERBIERS_PRES, HERBIERS_ont_pres '. |
'WHERE HERBIERS_ont_pres.ID = '.$id.' '. |
'AND HERBIERS_ont_pres.ID_PRES = HERBIERS_PRES.ID_PRES'; |
$resultat = mysql_query($requete) or die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
while ($ligne = mysql_fetch_object($resultat)) { |
array_push($array_pres, $ligne->LABEL); |
} |
return $array_pres; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.1 2005/03/08 14:13:21 jpm |
* Ajout des classes d'accès à la base de données. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/cartographie/carto.php |
---|
New file |
0,0 → 1,92 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.3 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of 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: carto.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Fournie une image cartographique. |
* |
* Fichier permettant de récupérer l'image d'une carte créer par la bibliothèque cartographique |
* et de la faire passer dans les entête HTTP. |
* |
*@package Cartographie |
//Auteur original : |
*@author Nicolas MATHIEU |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
session_name($_GET['session']); |
session_start(); |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
$image = imagecreatefrompng($_SESSION['chemin'].$_SESSION['fichier'].'.png'); |
if (!$image) { |
echo session_name(); |
echo session_id(); |
trigger_error($image); |
} else { |
header("Expires: Wen, 01 Dec 1999 01:00:00 GMT");// Date du passé |
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");// toujours modifié |
header("Cache-Control: no-cache, must-revalidate");// HTTP/1.1 |
header("Pragma: no-cache"); // HTTP/1.0 |
header ("content-type:image/png"); |
chmod($_SESSION['chemin'].$_SESSION['fichier'].'.png', 755); |
imagepng($image); |
unlink($_SESSION['chemin'].$_SESSION['fichier'].'.png'); |
//Nous nettoyons le dossier tmp des fichiers qu'il contient: |
$poignet_de_dossier = opendir($_SESSION['chemin']); |
while ($fichier_dechet = readdir($poignet_de_dossier)) { |
if ($fichier_dechet != '.' && $fichier_dechet != '..') { |
unlink($_SESSION['chemin'].$fichier_dechet); |
} |
} |
closedir($poignet_de_dossier); |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
exit(); |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/09 15:57:12 jpm |
* Ajout de la bibliothèque cartographique. |
* |
* Revision 1.1 2005/02/28 15:03:49 jpm |
* Ajout des fichiers de la bibliothèque cartographique. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/cartographie/carto_historique.class.php |
---|
New file |
0,0 → 1,135 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.3 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of 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: carto_historique.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe Carto_Historique. |
* |
* Classe permettant de réaliser des cartes. |
* |
*@package Cartographie |
//Auteur original : |
*@author Nicolas MATHIEU |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe Carto_Historique() - Affiche les liens avec les carte précédentes. |
* |
* La classe Carto_Historique sert à pouvoir afficher les liens avec les carte précédentes |
* On accède à cette fonctionnalité grâce à la méthode afficherHistoriqueCarte() |
* L'objet Carto_HistoriqueCarte recoit en parametres : |
* - la généalogie du niveau ou on en est (du type monde*europe*france ) |
* - l'url du document |
* - en option : - le caractere de separation (par defaut c'est >) |
* - la classe css des liens |
*/ |
class Carto_Historique |
{ |
// +--------------------------------------------------------------------------------------------------+ |
// LES ATTRIBUTS DE LA CLASSE |
var $historique; |
var $url; |
var $caractere_separation; |
var $class_css; |
var $nom; |
// +--------------------------------------------------------------------------------------------------+ |
// LE CONSTRUCTEUR DE LA CLASSE |
/** |
* Constructeur Carto_Historique() |
* |
* Constructeur initialisant les attributs de la classe Carto_Historique(). |
*/ |
function Carto_Historique($objet_carte, $caractere = '>', $class = '') |
{ |
$this->historique = $objet_carte->historique; |
$this->url = $objet_carte->url; |
$this->nom = $objet_carte->nom; |
unset ($objet_carte); |
$this->caractere_separation = $caractere; |
$this->class_css = $class; |
}//Fin du constructeur Carto_Historique(). |
// +--------------------------------------------------------------------------------------------------+ |
// LES METHODES PUBLIQUES |
function afficherHistoriqueCarte() |
{ |
$res=''; |
$tabonglet = explode ('*', $this->historique); |
$tabnom = explode ('*', $this->nom); |
foreach ($tabonglet as $key=>$value) { |
if ($key == 0) { |
$chemin = $value; |
} |
else { |
$chemin .= '*'.$value; |
} |
$res.= '<a '; |
if (!empty($this->class_css)) { |
$res.='class="'.$this->class_css.'" '; |
} |
$res.='href="'.$this->url.'&historique_cartes='.$chemin.'"> '.$this->caractere_separation.' '.$tabnom[$key].'</a>'; |
} |
return $res; |
}//Fin de la méthode afficherHistoriqueCarte(). |
}//Fin de la classe Carto_Historique. |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/09 15:57:12 jpm |
* Ajout de la bibliothèque cartographique. |
* |
* Revision 1.1 2005/02/28 15:03:49 jpm |
* Ajout des fichiers de la bibliothèque cartographique. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/cartographie/carto_action.class.php |
---|
New file |
0,0 → 1,221 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.3 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of 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: carto_action.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe ActionCarte. |
* |
* Calsse permettant de connaître les actions à réaliser sur une carte. |
* |
*@package Cartographie |
//Auteur original : |
*@author Nicolas MATHIEU |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe Carto_Action() - Recueille les infos sur l'action à réaliser pour une zone géo donnée. |
* |
* La classe Carto_Action sert a definir les paramètres nécessaires pour recueillir l'action a réaliser en |
* fonction des coordonnées du point, du masque et du niveau. |
* Elle remplace la fonction get_cartoAction() que l'on peut trouver dans le fichier carto_commun.php |
* des différentes application utilisant la carto. |
* Les champs a renseigner sont les suivants : |
* -le nom de la table ($nom_table_carto_action) où sont stokée les actions à réalisées |
* en fonction des couleurs |
* -les 5 champs principaux de la table : |
* -l'identifiant de la zone géographique (un nom, un numéro ou une abréviation) -> $nom_champ_cle |
* -les couleurs -> $nom_champ_rouge, $nom_champ_vert, $nom_champ_bleu |
* -l'action -> $nom_champ_action |
* Elle possède une seule méthode : get_cartoAction(). |
*/ |
class Carto_Action |
{ |
// +--------------------------------------------------------------------------------------------------+ |
// LES ATTRIBUTS DE LA CLASSE |
var $_table_zone_geo; |
var $_id_zone_geo_zone; |
var $_rouge; |
var $_vert; |
var $_bleu; |
var $_table_action; |
var $_id_carte_action; |
var $_id_zone_geo_action; |
var $_type_zone_geo_action; |
var $_action; |
var $_id_carte_destination; |
// +--------------------------------------------------------------------------------------------------+ |
// LE CONSTRUCTEUR DE LA CLASSE |
/** |
* Constructeur Carto_Action() |
* |
* Constructeur initialisant les attributs de la classe Carto_Action(). |
*/ |
function Carto_Action($info_table_zone_geo, $info_table_action) |
{ |
$this->_table_zone_geo = $info_table_zone_geo['nom_table_zone']; |
$this->_id_zone_geo_zone = $info_table_zone_geo['nom_chp_id_zone']; |
$this->_rouge = $info_table_zone_geo['nom_chp_rouge']; |
$this->_vert = $info_table_zone_geo['nom_chp_vert']; |
$this->_bleu = $info_table_zone_geo['nom_chp_bleu']; |
$this->_table_action = $info_table_action['nom_table_action']; |
$this->_id_carte_action = $info_table_action['nom_chp_id_carte']; |
$this->_id_zone_geo_action = $info_table_action['nom_chp_id_zg_action']; |
$this->_type_zone_geo_action = $info_table_action['nom_chp_type_zg']; |
$this->_action = $info_table_action['nom_chp_action']; |
$this->_id_carte_destination = $info_table_action['nom_chp_id_carte_destination']; |
} |
// +--------------------------------------------------------------------------------------------------+ |
// LES METHODES PRIVÉES |
/** |
* Méthode _consulterActionImage($imageX, $imageY, $masque, $id_carte) |
* |
* Elle renvoit l'action a réaliser. |
* Nous passons les paramètres suivant : |
* -les coordonnees du point ($imageX et $imageY) |
* -le masque pour recuperer la couleur ($masque) |
* -l'identifiant de la carte où nous nous trouvons ($id_carte) |
*/ |
function _consulterActionImage($imageX, $imageY, $masque, $id_carte) |
{ |
// Nous récuperons les valeurs RVB de la couleur sur laquelle l'utilisateur a cliqué. |
// Les valeurs RVB sont stockées dans le tableau associatif $valeurs_RVB. |
$masque_courant = imagecreatefrompng($masque); |
$index_couleur = imagecolorat($masque_courant, $imageX, $imageY); |
$valeurs_RVB = imagecolorsforindex($masque_courant, $index_couleur); |
// Nous effectuons une requete dans la table carto_ACTION pour récupérer la valeur |
// du champ "action", afin de savoir quoi faire. |
$requete = |
'SELECT '.$this->_action.', '.$this->_id_carte_destination.', '.$this->_id_zone_geo_action. |
' FROM '.$this->_table_action.', '.$this->_table_zone_geo. |
' WHERE '.$this->_table_zone_geo.'.'.$this->_rouge.' = '.$valeurs_RVB['red']. |
' AND '.$this->_table_zone_geo.'.'.$this->_vert.' = '.$valeurs_RVB['green']. |
' AND '.$this->_table_zone_geo.'.'.$this->_bleu.' = '.$valeurs_RVB['blue']. |
' AND '.$this->_table_action.'.'.$this->_id_zone_geo_action.' = '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone. |
' AND '.$this->_table_action.'.'.$this->_id_carte_action.' = "'.$id_carte.'"'; |
$resultat=mysql_query($requete) or die(' |
<h2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</h2>'. |
'<b>Fichier : </b>'.__FILE__.'<br />'. |
'<b>Ligne : </b>'.__LINE__.'<br />'. |
'<b>Requete : </b>'.$requete.'<br />'. |
'<b>Erreur : </b>'.mysql_error()); |
$ligne = mysql_fetch_object ($resultat); |
if (mysql_num_rows ($resultat) != 0) { |
$chp_id_zone_geo = $this->_id_zone_geo_action; |
$chp_action = $this->_action; |
$chp_id_carte_destination = $this->_id_carte_destination; |
$action['id_zone_geo'] = $ligne->$chp_id_zone_geo; |
$action['type_action'] = $ligne->$chp_action; |
$action['id_carte_destination'] = $ligne->$chp_id_carte_destination; |
return $action; |
} |
}//Fin de la méthode _consulterActionImage(). |
/** |
* Méthode _consulterActionListe($id_zone_carte, $id_carte) |
* |
* Elle renvoit l'action a réaliser. |
* Nous passons les paramètres suivant : |
* -l'identifiant de la zone que l'on veut afficher |
* -l'identifiant de la carte où nous nous trouvons ($id_carte) |
*/ |
function _consulterActionListe($id_zone_carte, $id_carte) |
{ |
// Nous effectuons une requete dans la table carto_ACTION pour récupérer la valeur |
// du champ "action", afin de savoir quoi faire. |
$requete = |
'SELECT '.$this->_action.', '.$this->_id_carte_destination.', '.$this->_id_zone_geo_action. |
' FROM '.$this->_table_action.', '.$this->_table_zone_geo. |
' WHERE '.$this->_table_action.'.'.$this->_id_zone_geo_action.' = '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone. |
' AND '.$this->_table_zone_geo.'.'.$this->_id_zone_geo_zone.' = "'.$id_zone_carte.'"'. |
' AND '.$this->_table_action.'.'.$this->_id_carte_action.' = "'.$id_carte.'"'; |
$resultat=mysql_query($requete) or die(' |
<h2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</h2>'. |
'<b>Fichier : </b>'.__FILE__.'<br />'. |
'<b>Ligne : </b>'.__LINE__.'<br />'. |
'<b>Requete : </b>'.$requete.'<br />'. |
'<b>Erreur : </b>'.mysql_error()); |
$ligne = mysql_fetch_object ($resultat); |
if (mysql_num_rows ($resultat) != 0) { |
$chp_id_zone_geo = $this->_id_zone_geo_action; |
$chp_action = $this->_action; |
$chp_id_carte_destination = $this->_id_carte_destination; |
$action['id_zone_geo'] = $ligne->$chp_id_zone_geo; |
$action['type_action'] = $ligne->$chp_action; |
$action['id_carte_destination'] = $ligne->$chp_id_carte_destination; |
return $action; |
} |
}//Fin de la méthode get_cartoAction(). |
}//Fin de la classe Carto_Action. |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/09 15:57:12 jpm |
* Ajout de la bibliothèque cartographique. |
* |
* Revision 1.2 2005/03/01 15:20:34 jpm |
* Modification des fichiers au niveau des infos d'erreur de requete sql. |
* |
* Revision 1.1 2005/02/28 15:03:49 jpm |
* Ajout des fichiers de la bibliothèque cartographique. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/cartographie/carto_carte.class.php |
---|
New file |
0,0 → 1,828 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.3 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of 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: carto_carte.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe Carto_Carte. |
* |
* Calsse permettant de réaliser des cartes. |
* |
*@package Cartographie |
//Auteur original : |
*@author Nicolas MATHIEU |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
require 'carto_action.class.php'; |
require 'carto_couleur.class.php'; |
require 'carto_historique.class.php'; |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe Carto_Carte() - Classe principale de la cartographie. |
* |
* La classe Carto_Carte permet de travailler les fichiers images des cartes. |
*/ |
class Carto_Carte |
{ |
// +--------------------------------------------------------------------------------------------------+ |
// LES ATTRIBUTS DE LA CLASSE |
var $id; |
var $_id_zone_geo_carte; |
var $nom; |
var $masque; |
var $fond; |
var $chemin; |
var $image; |
var $fils; |
var $url; |
var $_info_table_zg; |
var $filiation; |
var $image_x; |
var $image_y; |
var $historique_cartes; |
var $liste_zone_carte; |
var $historique; |
// La couleur dominante ( $maxiRVB ), la couleur la plus claire ($miniRVB) et la couleur |
// intermédiaire précédant le maximum ( $mediumRVB ) au cas ou il y aurait un trop grand |
//ecart entre les deux plus grandes valeurs. |
var $_zeroR; |
var $_zeroV; |
var $_zeroB; |
var $_miniR; |
var $_miniV; |
var $_miniB; |
var $_mediumR; |
var $_mediumV; |
var $_mediumB; |
var $_maxiR; |
var $_maxiV; |
var $_maxiB; |
//Le type de formule mathématique permettant de colorier la carte |
var $_formule_coloriage; |
//L'action à réaliser |
var $_action; |
// +--------------------------------------------------------------------------------------------------+ |
// LE CONSTRUCTEUR DE LA CLASSE |
function Carto_Carte($id, $id_zone_geo_carte, $nom, $masque, $fond, $chemin, $info_table_zg, $info_table_action) |
{ |
$this->id = $id; |
$this->_id_zone_geo_carte = $id_zone_geo_carte; |
$this->nom = $nom; |
$this->masque = $chemin.$masque; |
$this->fond = $chemin.$fond; |
$this->chemin = $chemin; |
$this->_info_table_zg = $info_table_zg; |
$this->_action = new Carto_Action($info_table_zg, $info_table_action); |
$this->fils = array(); |
$this->filiation = $id; |
$this->historique_cartes = ''; |
$this->liste_zone_carte = ''; |
$this->definirCouleurs(); |
$this->definirFormuleColoriage(); |
} |
// +--------------------------------------------------------------------------------------------------+ |
// LES METHODES PUBLIQUES |
function definirCouleurs ( |
$couleur_zero_R = '255', $couleur_zero_V = '255', $couleur_zero_B = '255', |
$couleur_mini_R = '210', $couleur_mini_V = '230', $couleur_mini_B = '210', |
$couleur_medium_R = '92', $couleur_medium_V = '181', $couleur_medium_B = '92', |
$couleur_maxi_R = '0', $couleur_maxi_V = '127', $couleur_maxi_B = '0') |
{ |
$this->_zeroR = $couleur_zero_R; |
$this->_zeroV = $couleur_zero_V; |
$this->_zeroB = $couleur_zero_B; |
$this->_miniR = $couleur_mini_R; |
$this->_miniV = $couleur_mini_V; |
$this->_miniB = $couleur_mini_B; |
$this->_mediumR = $couleur_medium_R; |
$this->_mediumV = $couleur_medium_V; |
$this->_mediumB = $couleur_medium_B; |
$this->_maxiR = $couleur_maxi_R; |
$this->_maxiV = $couleur_maxi_V; |
$this->_maxiB = $couleur_maxi_B; |
} |
function definirFormuleColoriage ($nomFormuleColoriage = 'defaut') |
{ |
$this->_formule_coloriage = $nomFormuleColoriage; |
} |
/** |
* Méthode donnerImageSimple() - Fournit image non cliquable. |
* |
* La méthode donnerImageSimple ($objet) permet de récupérer une image non cliquable. |
* |
*@param object un objet carto. |
*@return string le code XHTML de l'image non cliquable. |
*/ |
function donnerImageSimple($objet) |
{ |
$nom_fichier_image = $this->_donnerIdUnique(); |
$objet->_lancerColoriage('', $nom_fichier_image); |
$retour = '<img src="cartographie/bibliotheque/lib.carto.extractimg.php?fichier='.$nom_fichier_image.'" alt="Carte" />'; |
return $retour; |
} |
/** |
* Méthode ajouterFils() - Ajoute une sous-carte. |
* |
* La methode ajouterFils() est essentielle. Elle permet d'ajouter toutes les sous cartes voulues. |
* Il faut lui indiquer, comme a la carte du niveau du dessus, son nom, le masque, le fond et info_table_couleur. |
* On a ainsi une inclusion d'objets les uns dans les autres. |
* |
*@return null l'objet carte fils est ajouté.; |
*/ |
function ajouterFils($id, $id_zone_geo_carte, $nom, $masque, $fond, $info_table_zg, $info_table_action) |
{ |
$this->fils[$id] = new Carto_Carte($id, $id_zone_geo_carte, $nom, $masque, $fond, $this->chemin, $info_table_zg, $info_table_action); |
//Si on ajoute à la carte du monde comme fils celle de l'europe, alors |
//on aura comme valeur pour $this->filiation de la carte d'europe : monde*europe |
$this->fils[$id]->filiation = $this->filiation.'*'.$id; |
$this->fils[$id]->url = $this->url; |
//Si on ajoute à la carte du monde dont le nom est 'Monde' comme fils celle de l'europe, |
//dont le nom est 'Europe', alors on aura comme valeur pour $this->nom de la carte d'europe : Monde*Europe |
$this->fils[$id]->nom = $this->nom.'*'.$nom; |
$this->fils[$id]->historique_cartes = $this->historique_cartes; |
} |
//********************************************************************************************************* |
// La methode donnerFormulaireImage() est la methode principale de la carto. C'est elle qui gere ce qu'il y a faire en |
// fonction de l'action de l'utilisateur. |
// Trois cas se distinguent : |
// -soit l'utilisateur a clique sur un point de la carte. |
// -soit il a clique sur un des liens que l'on a afficher avec la méthode afficherHistoriqueCarte de l'objet Carto_HistoriqueCarte. |
// -soit il a sélectionné une zone géographique dans la liste déroulante. |
// Elle renvoit a la fin: |
// -soit une nouvelle carte coloriée |
// -soit false. |
//********************************************************************************************************** |
function donnerFormulaireImage () |
{ |
//global $GS_GLOBAL; |
$res = ''; |
// Nous commençons par tester tout d'abords si nous venons d'une autre carte. Pour cela nous vérifions, |
// si les attributs $this->image_x et $this->image_y de la classe Carte existe ou ne sont pas null. |
// La carte est une image appelée par une balise <input type="image"> et non par une balise classique <img>. |
// Ansi, lorsqu'on clique sur la carte le formulaire appelle (via l'url du formulaire) l'application |
// utilisant la classe carte et lui renvoit deux variables contenant les coordonnées x et y du clic. |
// L'application instancie à nouveau les objets cartes mais cette fois ci la carte affichée dépendra des |
// informations founit par une table de la base de données. |
// La classe carto_action instanciée dans l'application utilisant la classe carte fournit les noms |
// des champs et celui de la table contenant les valeur RVB de chaque zone des cartes, l'identifiant |
// de la zone et l'action à entreprendre pour la zone conssidérée. |
// La méthode imgform() utilise la méthode get_cartoAction() de l'objet Carto_Action pour connaître |
// en fonction des coordonnées du clic l'action à entreprendre. |
// Quoi qu'il arrive, on ouvre la balise formulaire |
$res = '<form id="cartographie" action="'.$this->url.'" method="post">'."\n"; |
$res .= '<p>'; |
if (isset ($this->image_x) && ($this->image_x != '') && isset ($this->image_y) && ($this->image_y != '')) { |
// on regarde ici si l'on a pas un objet de plus bas niveau présent dans la variable de session carte |
//a charger a la place de l'objet de plus haut niveau |
$var_session_retour = $_SESSION['carte']; |
if ($var_session_retour) { |
$image_x = $this->image_x; |
$image_y = $this->image_y; |
$liste_zone_carte = $this->liste_zone_carte; |
// Nous chargons alors l'ojet approprié en descendant grâce a la généalogie |
$historique_cartes = explode('*',$this->historique_cartes); |
foreach ($historique_cartes as $key => $value) { |
if ($key != 0) { |
//$this = $this->fils[$value]; |
foreach (get_object_vars($this->fils[$value]) as $key => $value) { |
$this->$key = $value; |
} |
} |
} |
$this->image_x = $image_x; |
$this->image_y = $image_y; |
$this->liste_zone_carte = $liste_zone_carte; |
unset($_SESSION['carte']) ; |
} |
// on regarde qu'est-ce qu'on doit faire grace a la methode _consulterAction() de l'objet Carto_Action |
$action = $this->_action->_consulterActionImage($this->image_x, $this->image_y, $this->masque, $this->id); |
// Nous distinguons 2 cas : |
//le cas ou il faut afficher une nouvelle carte ... : |
if ($action['type_action'] == 'Aller_a') { |
$id_carte_destination = $action['id_carte_destination'] ; |
$this->fils[$id_carte_destination]->liste_zone_carte = $this->liste_zone_carte; |
$res .= ''.$this->fils[$id_carte_destination]->_donnerListeZoneCarte()."<br />\n"; |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->fils[$id_carte_destination]->_lancerColoriage($id_image); |
$obj = serialize($this->fils[$id_carte_destination]); |
$_SESSION['carte'] = $obj; |
$this->historique = $this->fils[$id_carte_destination]->filiation; |
$this->id = $this->fils[$id_carte_destination]->id; |
$this->nom = $this->fils[$id_carte_destination]->nom; |
} |
//Dans le cas où l'on veut rappeler une nouvelle carte, il se peut que la nouvelle carte à rappeler |
//soit la même que précédement. |
//Cette possibilité peut se présenter quand on clique sur un zone blanche d'une carte (càd dans la mer) |
//Là, on recharge la carte précédente : |
elseif ($action['type_action'] == 'Recharger') { |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
$obj = serialize($this); |
$_SESSION['carte'] = $obj ; |
$this->historique = $this->filiation; |
} |
// ... et le cas ou il faut lancer le dernier niveau |
else if ($action['type_action'] == 'Stop') { |
unset ($_SESSION['carte']) ; |
$this->historique = $this->filiation.'*'.$action['id_zone_geo']; |
$obj = serialize($this); |
$_SESSION['carte'] = $obj ; |
return false; |
} |
} |
elseif ($this->liste_zone_carte != '') { |
$liste_zone_carte = $this->liste_zone_carte; |
$historique_cartes = explode('*',$this->historique_cartes); |
foreach ($historique_cartes as $key => $value) { |
if ($key != 0) { |
//$this = $this->fils[$value]; |
foreach (get_object_vars($this->fils[$value]) as $key => $value) { |
$this->$key = $value; |
} |
} |
} |
$this->liste_zone_carte = $liste_zone_carte; |
$res .= ''.$this->_donnerListeZoneCarte($this->liste_zone_carte)."<br />\n"; |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image, '', $this->liste_zone_carte); |
$this->historique = $this->historique_cartes; |
$obj = serialize($this); |
$_SESSION['carte'] = $obj ; |
} |
// On teste maintenant si l'on vient d'un lien. Si c'est le cas on a recu un argument |
// qui nous donne la "genealogie" de la carte que l'on doit afficher |
else if ($this->historique_cartes) { |
// Nous chargons alors l'ojet approprié en descendant grâce a la généalogie |
$historique_cartes = explode('*',$this->historique_cartes); |
foreach ($historique_cartes as $key => $value) { |
if ($key != 0) { |
//$this = $this->fils[$value]; |
foreach (get_object_vars($this->fils[$value]) as $key => $value) { |
$this->$key = $value; |
} |
} |
} |
// une foit que l'on a charge le bon objet nous le colorions |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
$this->historique = $this->historique_cartes; |
$obj = serialize($this); |
$_SESSION['carte'] = $obj ; |
} |
// Enfin si on ne vient pas d'une carte ou d'un lien c'est que l'on vient de l'onglet carto du menu |
// et on affiche alors la premiere carte |
else { |
unset ($_SESSION['carte']) ; |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
$this->historique = $this->id; |
$obj = serialize($this); |
$_SESSION['carte'] = $obj; |
} |
$_SESSION['chemin'] = CAR_CHEMIN_TMP; |
$_SESSION['fichier'] = $this->id.$id_image; |
$res .= CAR_CHEMIN_CARTE.'"'; |
$res .= ' name="image" onmouseover="javascript:show(\'d\');" onmouseout="javascript:show(\'d\');" />'."\n"; |
$res .= '<input type="hidden" name="historique_cartes" value="'.$this->historique.'" />'."\n"; |
$res .= '</p>'."\n"; |
$res .= '</form>'."\n"; |
return $res; |
} |
// +--------------------------------------------------------------------------------------------------+ |
// LES METHODES PRIVÉES |
function _donnerListeZoneCarte($zone_par_defaut = '') |
{ |
$retour = ''; |
$requete = 'SELECT '.$this->_info_table_zg['nom_chp_id_zone'].', '.$this->_info_table_zg['nom_chp_nom_zone'].' '. |
'FROM '.$this->_info_table_zg['nom_table_zone'].' '; |
// Nous éliminons la zone blanche ne correspondant à rien |
if (ereg('[a-z]+', $this->_info_table_zg['nom_chp_id_zone'])) { |
$requete .= 'WHERE '.$this->_info_table_zg['nom_chp_id_zone'].' != "0" '; |
} else { |
$requete .= 'WHERE '.$this->_info_table_zg['nom_chp_id_zone'].' != 0 '; |
} |
// Nous sélectionnons en fonction de la zone géo supérieure. |
if ($this->_info_table_zg['nom_chp_zone_sup'] != '') { |
if (ereg('[a-z]+', $this->_id_zone_geo_carte)) { |
$requete .= 'AND '.$this->_info_table_zg['nom_chp_zone_sup'].' = "'.$this->_id_zone_geo_carte.'" '; |
} else{ |
$requete .= 'AND '.$this->_info_table_zg['nom_chp_zone_sup'].' = '.$this->_id_zone_geo_carte.' '; |
} |
} |
// Nous trions par ordre alphabétique |
$requete .= 'ORDER BY '.$this->_info_table_zg['nom_chp_nom_zone'].' ASC'; |
$resultat = mysql_query ($requete) or die(' |
<h2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</h2>'. |
'<b>Fichier : </b>'. __FILE__ . |
'<b>Ligne : </b>'. __LINE__ . |
'<b>Requete : </b>'.$requete. |
'<br/><br/><b>Erreur : </b>'.mysql_error()); |
$i=0; |
$retour = '<select id="liste_zone_carte" name="liste_zone_carte" onchange="javascript:this.form.submit();">'."\n"; |
$retour .= '<option value="">Visualiser une zone :</option>'."\n"; |
$nom_chp_nom_zone = $this->_info_table_zg['nom_chp_nom_zone']; |
$nom_chp_id_zone = $this->_info_table_zg['nom_chp_id_zone']; |
while ($ligne = mysql_fetch_object ($resultat)) { |
if ($zone_par_defaut == $ligne->$nom_chp_id_zone) { |
$retour .= '<option value="'.$ligne->$nom_chp_id_zone.'" selected="selected">'.$ligne->$nom_chp_nom_zone.'</option>'."\n"; |
} else { |
$retour .= '<option value="'.$ligne->$nom_chp_id_zone.'">'.$ligne->$nom_chp_nom_zone.'</option>'."\n"; |
} |
$i++; |
} |
$retour .= '</select>'."\n"; |
return $retour; |
} |
//============================================================================== |
// METHODE _lancerColoriage() |
// |
// Elle lance le coloriage de l'image. |
// Elle est lancée toute seule par la méthode donnerFormulaireImage(). |
// Les informations qui lui sont necessaires sont déjà données à l'objet carte (fond, info_table_couleur). |
//============================================================================== |
function _lancerColoriage($id_image = '_00', $nom_fichier = '', $id_zone_a_reperer = '') |
{ |
$this->image = imagecreatefrompng($this->fond); |
$this->_colorierImage ($this->image, $this->_info_table_zg['nom_table_zone'], $this->_info_table_zg['nom_chp_id_zone'], $this->_info_table_zg['nom_chp_rouge'], |
$this->_info_table_zg['nom_chp_vert'], $this->_info_table_zg['nom_chp_bleu'], $this->_info_table_zg['nom_chp_zone_sup'], |
$this->_info_table_zg['tableau_valeurs_zone'], $id_zone_a_reperer) ; |
if ($nom_fichier != '') { |
imagepng(&$this->image, CAR_CHEMIN_TMP.$nom_fichier.'.png'); |
//$this->image = imagepng(&$this->image); |
} |
else { |
imagepng(&$this->image, CAR_CHEMIN_TMP.$this->id.$id_image.'.png'); |
//imagepng(&$this->image); |
} |
} |
//============================================================================== |
// METHODE _colorierImage() |
// |
// Elle réalise le coloriage de l'image. |
//============================================================================== |
function _colorierImage(&$image_fond, $table_zone_geo, $chp_id_zone_couleur, $chp_rouge, $chp_vert, $chp_bleu, $chp_zone_sup, $tableau_valeurs_zone, $id_zone_a_reperer) |
{ |
//---------------------------------------------------------------------------- |
// Cherche les valeurs RVB de la couleur de chaque zone géographique et les rentre dans |
//un tableau d'objets Carto_InformationCouleur (voir la description de la classe ci-dessus. |
$requete_01 = |
'SELECT *'. |
' FROM '.$table_zone_geo; |
if ($chp_zone_sup != ''){ |
if(ereg("[a-z]+",$this->_id_zone_geo_carte)){ |
$requete_01 .= |
' WHERE '.$chp_zone_sup.' = "'.$this->_id_zone_geo_carte.'"'; |
} |
else{ |
$requete_01 .= |
' WHERE '.$chp_zone_sup.' = '.$this->_id_zone_geo_carte; |
} |
} |
$resultat_01 = mysql_query ($requete_01) or die(' |
<H2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</H2>'. |
'<b>Fichier : </b>'.__FILE__. |
'<b>Ligne : </b>'.__LINE__. |
'<b>Requete : </b>'.$requete_01. |
'<br/><br/><b>Erreur : </b>'.mysql_error()); |
$i=0; |
$attachments = array(); |
while ($ligne_01 = mysql_fetch_object($resultat_01)) { |
$attachments[$i] = new Carto_Couleur($ligne_01->$chp_id_zone_couleur, $ligne_01->$chp_rouge, $ligne_01->$chp_vert, $ligne_01->$chp_bleu); |
$i++; |
} |
//Nous libérons toute la mémoire associée à l'identifiant de résultat. |
mysql_free_result ($resultat_01); |
//---------------------------------------------------------------------------- |
// On realide l'association entre l'index des couleurs et la zone de meme couleur |
$attachments = $this->_construireAssociationIndexZone ($image_fond, $attachments); |
//---------------------------------------------------------------------------- |
//Dans l'application qui utilise la classe carte, nous avons instancié un tableau |
//associatif qui contient en clé l'identifiant d'une zone géographique et en valeur |
//un nombre (qui peut-être un nombre d'inscrit, d'institutions, de taxons...). |
// Nous récupérons ci-dessous la valeur minimum autre que 0 présente dans ce tableau |
//puis une valeur conscidérée comme maximum |
if (!is_array($tableau_valeurs_zone)) { |
$mini = 0; |
$medium = 0; |
$maxi = 0; |
$nbre_valeurs = 0; |
} |
else { |
if (count($tableau_valeurs_zone) == 0) { |
$mini=0; |
$medium = 0; |
$maxi=0; |
} |
else { |
$i=0; |
foreach ($tableau_valeurs_zone as $cle => $valeur) { |
//Nous recherchons le minimum, le maximum et le la valeur médium juste au dessous du maximum. |
if ($valeur != 0) { |
$tablo_valeurs[$i] = $valeur; |
$i++; |
} |
} |
//Nombre d'entrées dans le tableau de valeurs non nulles : |
$nbre_valeurs = count($tablo_valeurs); |
$somme_valeurs = array_sum($tablo_valeurs); |
$tablo_frequences = array_count_values($tablo_valeurs); |
$nbre_frequences = count($tablo_frequences); |
if ($nbre_valeurs > 0){ |
//Nous trions le tableau dans l'ordre croissant : |
sort($tablo_valeurs); |
//Nous récupérons la valeur la plus petite : |
$mini = $tablo_valeurs[0]; |
$maxi = $tablo_valeurs[$nbre_valeurs-1]; |
isset($tablo_valeurs[$nbre_valeurs-2]) ? $medium = $tablo_valeurs[$nbre_valeurs-2] : $medium = 0; |
$moyenne = $somme_valeurs/$nbre_valeurs; |
$ecart_au_carre_moyen = 0; |
for ($i = 0; $i < $nbre_valeurs; $i++) { |
$ecart_au_carre_moyen += pow(($tablo_valeurs[$i] - $moyenne), 2); |
} |
$variance = $ecart_au_carre_moyen/$nbre_valeurs; |
$ecart_type = sqrt($variance); |
$moyenne = round($moyenne, 0); |
$variance = round($variance, 0); |
$ecart_type = round($ecart_type, 0); |
/*echo 'Nombre de valeurs : '.$nbre_valeurs.'<br>'; |
echo 'Nombre de frequences : '.$nbre_frequences.'<br>'; |
echo 'Moyenne : '.$moyenne.'<br>'; |
echo 'Variance : '.$variance.'<br>'; |
echo 'Ecart-type : '.$ecart_type.'<br>'; |
echo 'Formule de coloriage : '.$this->_formule_coloriage.'<br>'; |
echo "mini : $mini medium : $medium maxi : $maxi<br/>"; |
*/ |
} |
} |
} |
//---------------------------------------------------------------------------- |
// Nous réalisons le coloriage de toutes les zones : |
$requete_03 = 'SELECT '.$chp_id_zone_couleur.' '. |
'FROM '.$table_zone_geo; |
$resultat_03 = mysql_query ($requete_03) or die(' |
<h2 style="text-align: center; font-weight: bold; font-size: 26px;">Erreur de requête</h2>'. |
'<b>Fichier : </b>'.__FILE__. |
'<b>Ligne : </b>'.__LINE__. |
'<b>Requete : </b>'.$requete_03. |
'<br/><br/><b>Erreur : </b>'.mysql_error()); |
while ($ligne_03 = mysql_fetch_object ($resultat_03)) { |
$id_zone_geo = $ligne_03->$chp_id_zone_couleur; |
if (!isset ($tableau_valeurs_zone[$id_zone_geo])) { |
$tableau_valeurs_zone[$id_zone_geo] = 0; |
} |
//Nous cherchons la couleur a afficher pour chaque zone. |
if ($tableau_valeurs_zone[$id_zone_geo] != 0) { |
//echo 'ZONE:'.$id_zone_geo."<br/>"; |
//echo $tableau_valeurs_zone[$id_zone_geo]."<br/>"; |
$theColor = $this->_donnerCouleur ( |
$this->_miniR, $this->_miniV, $this->_miniB, |
$this->_mediumR , $this->_mediumV , $this->_mediumB , |
$this->_maxiR , $this->_maxiV , $this->_maxiB , |
$mini, $medium, $maxi, $nbre_valeurs, $ecart_type, $moyenne, $tablo_valeurs, |
$tablo_frequences, $nbre_frequences, |
$tableau_valeurs_zone[$id_zone_geo], |
$this->_formule_coloriage); |
//echo $theColor['R'].'<br>'; |
//echo $theColor['V'].'<br>'; |
//echo $theColor['B'].'<br>'; |
} |
else { |
$theColor['R'] = $this->_zeroR; |
$theColor['V'] = $this->_zeroV; |
$theColor['B'] = $this->_zeroB; |
} |
//Nous réalisons le coloriage de toutes les zones de l'image avec la couleur obtenue. |
$this->_remplacerCouleur ($image_fond, $attachments, $id_zone_geo, $theColor['R'], $theColor['V'], $theColor['B'], $id_zone_a_reperer); |
} |
//Nous libérons toute la mémoire associée à l'identifiant de résultat de la requête. |
mysql_free_result ($resultat_03); |
} |
//============================================================================== |
// METHODE _construireAssociationIndexZone ($image, &$att) |
// |
// Le tableau $att est passé par référence. La méthode modifie donc directement |
// le tableau et ne renvoit donc rien. |
// Attache dans un tableau $att, contenant sous forme d'objet (Carto_ColorInfo) |
// les valeurs RVB des zones d'une image, la valeur de l'index correspondant |
// à la couleur de la zone. |
// Note : les images en question sont constituées de zones distincte possédant |
// chacune une couleur unique et unie. |
//============================================================================== |
function _construireAssociationIndexZone(&$image_fond, &$att) |
{ |
// Nous récupérons le nombre de couleur différentes contenues dans l'image. |
//echo $this->fond.'<BR>'; |
$image_fond = imagecreatefrompng($this->fond); |
$taille_palette = imagecolorstotal ($image_fond); |
//echo $taille_palette.'<br>'; |
// Pour chaque couleur contenue dans l'image, nous cherchons l'objet correspondant |
// dans le tableau $att, qui contient des informations sur chaque zone de l'image, |
// et nous attribuons à l'objet la valeur de l'index de sa couleur dans l'image. |
for ($i = 0; $i < $taille_palette; $i++) { |
$valeurs_RVB = array(); |
$valeurs_RVB = imagecolorsforindex ($image_fond, $i); |
for ($j = 0; $j < count ($att); $j++) { |
if (($att[$j]->rouge == $valeurs_RVB['red']) && ($att[$j]->vert == $valeurs_RVB['green']) && ($att[$j]->bleu == $valeurs_RVB['blue'])) { |
$att[$j]->index = $i; |
//echo 'ICI'.$att[$j]->id_zone.$att[$j]->index.'<br>'; |
break; |
} |
} |
} |
return $att; |
}//Fin méthode _construireAssociationIndexZone() |
//============================================================================== |
// METHODE _donnerCouleur() |
//------------------------------------------------------------------------------ |
// Renvoie pour une valeur donnee la couleur a mettre |
//------------------------------------------------------------------------------ |
// ENTREE |
// $miniR : valeur rouge du minimum |
// $miniV : valeur vert du minimum |
// $miniB : valeur blue du minimum |
// $maxiR : valeur rouge du maximum |
// $maxiV : valeur vert du maximum |
// $maxiB : valeur bleu du maximum |
// $mediumR : valeur rouge du deuxieme maximum |
// $mediumV : valeur vert du deuxieme maximum |
// $mediumB : valeur bleu du deuxieme maximum |
// $mini : valeur mini sur l'echelle |
// $medium : valeur juste au dessous du maximum sur l'echelle |
// $maxi : valeur maxi sur l'echelle |
// $val : valeur dont on cherche la couleur |
//------------------------------------------------------------------------------ |
// SORTIE |
// $couleur array donne la couleur pour la valeur demande ($val) |
//------------------------------------------------------------------------------ |
function _donnerCouleur($miniR, $miniV, $miniB, $mediumR, $mediumV, $mediumB, $maxiR, |
$maxiV, $maxiB, $mini, $medium, $maxi, $nbre_valeurs, $ecart_type, $moyenne, $tablo_valeurs, $tablo_frequences, $nbre_frequences, $val, $formuleColoriage) |
{ |
if ($formuleColoriage == 'defaut'){ |
if ($val == $maxi) { |
$couleur['R'] = $maxiR; |
$couleur['V'] = $maxiV; |
$couleur['B'] = $maxiB; |
} |
if ($val == $mini && $val != $maxi) { |
$couleur['R'] = $miniR; |
$couleur['V'] = $miniV; |
$couleur['B'] = $miniB; |
} |
if ($maxi/10 > $medium && $maxi/40 < $medium) { |
$diff = $medium - $mini; |
if ($diff > 0 && $val != $medium && $val != $maxi) { |
$diffR = $mediumR - $miniR; |
$diffV = $mediumV - $miniV; |
$diffB = $mediumB - $miniB; |
$variationR = round ( ($diffR/$diff ), 0 ); |
$variationV = round ( ($diffV/$diff ), 0 ); |
$variationB = round ( ($diffB/$diff ), 0 ); |
$couleur['R'] = Carto_Couleur::couleur_bornerNbre(($miniR + ($val * $variationR)), 0, 255); |
$couleur['V'] = Carto_Couleur::couleur_bornerNbre(($miniV + ($val * $variationV)), 0, 255); |
$couleur['B'] = Carto_Couleur::couleur_bornerNbre(($miniB + ($val * $variationB)), 0, 255); |
} |
else if ($val == $medium) { |
$couleur['R'] = $mediumR; |
$couleur['V'] = $mediumV; |
$couleur['B'] = $mediumB; |
} |
} |
else { |
$diff = $maxi - $mini; |
if ($diff > 0 && $val != $maxi && $val != $mini) { |
$diffR = $maxiR - $miniR; |
$diffV = $maxiV - $miniV; |
$diffB = $maxiB - $miniB; |
$variationR = round ( ($diffR/$diff ), 0 ); |
$variationV = round ( ($diffV/$diff ), 0 ); |
$variationB = round ( ($diffB/$diff ), 0 ); |
$couleur['R'] = Carto_Couleur::couleur_bornerNbre(($miniR + ($val * $variationR)), 0, 255); |
$couleur['V'] = Carto_Couleur::couleur_bornerNbre(($miniV + ($val * $variationV)), 0, 255); |
$couleur['B'] = Carto_Couleur::couleur_bornerNbre(($miniB + ($val * $variationB)), 0, 255); |
} |
else if ($diff == 0){ |
$couleur['R'] = $mediumR; |
$couleur['V'] = $mediumV; |
$couleur['B'] = $mediumB; |
} |
} |
} |
elseif ($formuleColoriage == 'ecart_type') { |
if ($ecart_type == 0) { |
$couleur['R'] = $maxiR; |
$couleur['V'] = $maxiV; |
$couleur['B'] = $maxiB; |
} |
elseif ($ecart_type >= 1 && $ecart_type <= 15) { |
if ($val == $mini) { |
$couleur['R'] = $miniR; |
$couleur['V'] = $miniV; |
$couleur['B'] = $miniB; |
} |
elseif ($val == $medium) { |
$couleur['R'] = $mediumR; |
$couleur['V'] = $mediumV; |
$couleur['B'] = $mediumB; |
} |
elseif ($val == $maxi) { |
$couleur['R'] = $maxiR; |
$couleur['V'] = $maxiV; |
$couleur['B'] = $maxiB; |
} |
else { |
$dif_valeur_maxi_mini = $maxi - $mini; |
$diffR = $maxiR - $miniR; |
$diffV = $maxiV - $miniV; |
$diffB = $maxiB - $miniB; |
$variationR = round ( ($diffR/$dif_valeur_maxi_mini ), 0 ); |
$variationV = round ( ($diffV/$dif_valeur_maxi_mini ), 0 ); |
$variationB = round ( ($diffB/$dif_valeur_maxi_mini ), 0 ); |
$couleur['R']=$miniR + ($val * $variationR); |
$couleur['V']=$miniV + ($val * $variationV); |
$couleur['B']=$miniB + ($val * $variationB); |
} |
} |
elseif ($ecart_type > 15) { |
//Le tableau est trié de la plus petite à la plus grande clé. |
ksort($tablo_frequences); |
$i = 0; |
foreach ($tablo_frequences as $cle => $valeur){ |
//Nous cherchons la correspondance entre la valeur et la clé. |
if ($cle == $val) { |
//Pour faire le Rouge, Vert, Bleu |
$couleur['R'] = $miniR + ($i/$nbre_frequences) * ($maxiR - $miniR); |
$couleur['V'] = $miniV + ($i/$nbre_frequences) * ($maxiV - $miniV); |
$couleur['B'] = $miniB + ($i/$nbre_frequences) * ($maxiB - $miniB); |
} |
$i++; |
} |
} |
} |
return $couleur; |
}//Fin méthode _donnerCouleur() |
//============================================================================== |
// METHODE _remplacerCouleur ($img, $att, $id_zone_geo, $r, $g, $b) |
// |
// $img is the image, $att an array of carto_colorinfo objects, $id_zone_geo the name |
// of an object of $att, ($r, $g, $b) the new color. |
// |
// In the palette of $img, the color matching with $id_zone_geo is modified. |
//============================================================================== |
function _remplacerCouleur (&$image, &$atta, $id_zone_geo, $rouge, $vert, $bleu, $id_zone_a_reperer) |
{ |
// Nous recherchons la valeur de l'index. |
$index = -1; |
for ($i = 0; $i < count ($atta); $i++) { |
if ($atta[$i]->id_zone == $id_zone_geo) { |
$index = $atta[$i]->index; |
//Dans le cas où nous voulons repérer une zone sur la carte : |
if($id_zone_geo == $id_zone_a_reperer) { |
$rouge = 255; |
$vert = 0; |
$bleu = 0; |
} |
break; |
} |
} |
// Nous mettons à jour l'image de la carte avec la valeur de l'index. |
if ($index >= 0) { |
imagecolorset (&$image, $index, $rouge, $vert, $bleu); |
} |
}//Fin de la méthode _remplacerCouleur |
//============================================================================== |
// METHODE _donnerIdUnique () |
// |
// Cette méthode privée retourne un identifiant de 32 caractères unique. |
// |
//============================================================================== |
function _donnerIdUnique () |
{ |
$id = ''; |
$id = md5 (uniqid (rand())); |
return $id; |
}//Fin de la méthode _donnerIdUnique() |
}//Fin de la classe Carto_Carte() |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/09 15:57:12 jpm |
* Ajout de la bibliothèque cartographique. |
* |
* Revision 1.3 2005/03/03 08:58:11 jpm |
* Correction erreur dans requête sélection des zones de la carte. |
* |
* Revision 1.2 2005/03/01 15:20:34 jpm |
* Modification des fichiers au niveau des infos d'erreur de requete sql. |
* |
* Revision 1.1 2005/02/28 15:03:49 jpm |
* Ajout des fichiers de la bibliothèque cartographique. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/cartographie/carto_couleur.class.php |
---|
New file |
0,0 → 1,193 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.3 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of 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: carto_couleur.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe Carto_Couleur. |
* |
* Classe permettant de réaliser des cartes. |
* |
*@package Cartographie |
//Auteur original : |
*@author Nicolas MATHIEU |
//Autres auteurs : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe Carto_Couleur() - Info sur les couleurs. |
* |
* La classe Carto_Couleur n'est utilisée que par la classe carte. |
* C'est une classe privée. |
* Elle sert à stocker les informations (RVB et index) sur la couleur d'une |
* zone d'une image. |
*/ |
class Carto_Couleur |
{ |
// +--------------------------------------------------------------------------------------------------+ |
// LES ATTRIBUTS DE LA CLASSE |
var $id_zone; |
var $rouge; |
var $vert; |
var $bleu; |
var $index; |
// +--------------------------------------------------------------------------------------------------+ |
// LE CONSTRUCTEUR DE LA CLASSE |
/** |
* Constructeur Carto_Couleur() |
* |
* Constructeur initialisant les attributs de la classe Carto_Couleur(). |
*/ |
function Carto_Couleur($id_zone, $rouge, $vert, $bleu) |
{ |
$this->id_zone = $id_zone; |
$this->rouge = $rouge; |
$this->vert = $vert; |
$this->bleu = $bleu; |
$this->index = -1; |
} |
// +--------------------------------------------------------------------------------------------------+ |
// LES METHODES PUBLIQUES |
/** |
* La fonction array couleur_hexadecimalAuRgb(string color) renvoie des valeurs de couleur en RGB. |
* |
*Cette fonction prend une valeur de couleur codée en hexadécimal et retourne |
*les valeurs RGB correspondantes sous forme de tableau. |
*Exemple d'utilisation: |
*$rgb = couleur_hexadecimalAuRgb("fffc49"); |
*echo "<br>couleur_hexadecimalAuRgb de 'fffc49' : ".$rgb['R']." ".$rgb['V']." ".$rgb['B']; |
* |
*@author iubito <sylvain_machefert@yahoo.fr> |
*@copyright iubito - http://iubito.free.fr/ - 2003 |
* |
*@param string $couleur représente une couleur codée en héxadécimal. |
* |
*@return array tableau associatif contenant les 3 valeurs RGB, avec clé du rouge 'R', |
* du vert 'V' et enfin du bleu 'B'. |
*/ |
function couleur_hexadecimalAuRgb($couleur_html) |
{ |
//gestion du #... |
if (substr($couleur_html, 0, 1) == "#") { |
$couleur_html = substr($couleur_html, 1, 6); |
} |
$tablo_rgb['R'] = hexdec(substr($couleur_html, 0, 2)); |
$tablo_rgb['V'] = hexdec(substr($couleur_html, 2, 2)); |
$tablo_rgb['B'] = hexdec(substr($couleur_html, 4, 2)); |
return $tablo_rgb; |
} |
/** |
* La fonction string couleur_rgbAuHexadecimal(array tablo) renvoie la valeur d'une |
*couleur en héxadécimal. |
* |
*Cette fonction prend un tableau de valeurs d'une couleur codées en RGB et retourne |
*la valeur hexadécimal correspondante sous forme de chaîne. |
*C'est la réciproque exacte de la fonction couleur_hexadecimalAuRgb. |
* |
*@author iubito <sylvain_machefert@yahoo.fr> |
*@copyright iubito - http://iubito.free.fr/ - 2003 |
* |
*@param array $tablo_RGB représente un tableau associatif avec les valeurs RGB |
*d'une couleur.Les trois clés du tableau sont : R pour rouge, V pour vert et B pour bleu. |
* |
*@return string chaîne contenant la valeur de la couleur sous forme héxadécimale. |
*/ |
function couleur_rgbAuHexadecimal($tablo_rgb) |
{ |
//Vérification des bornes... |
foreach($tablo_rgb as $cle => $valeur) { |
$tablo_rgb[$cle] = bornes($tablo_rgb[$cle],0,255); |
} |
//Le str_pad permet de remplir avec des 0 |
//parce que sinon couleur_rgbAuHexadecimal(array(0,255,255)) retournerai #0ffff<=manque un 0 ! |
return "#".str_pad(dechex(($tablo_rgb['R']<<16)|($tablo_rgb['V']<<8)|$tablo_rgb['B']),6,"0",STR_PAD_LEFT); |
} |
/** |
* La fonction int couleur_bornerNbre(int nb, int min, int max) borne des nombres. |
* |
*Cette fonction permet de borner la valeur d'un nombre entre un minimum $mini et |
*un maximum $maxi. |
* |
*@author iubito <sylvain_machefert@yahoo.fr> |
*@copyright iubito - http://iubito.free.fr/ - 2003 |
* |
*@param integer $nbre le nombre à borner. |
*@param integer $mini la borne minimum. |
*@param integer $maxi la borne maximum. |
* |
*@return integer le nombre limité aux bornes si nécessaire. |
*/ |
function couleur_bornerNbre($nbre, $mini, $maxi) |
{ |
if ($nbre < $mini) { |
$nbre = $mini; |
} |
if ($nbre > $maxi) { |
$nbre = $maxi; |
} |
return $nbre; |
} |
}//Fin de la classe Carto_Couleur |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/09 15:57:12 jpm |
* Ajout de la bibliothèque cartographique. |
* |
* Revision 1.1 2005/02/28 15:03:49 jpm |
* Ajout des fichiers de la bibliothèque cartographique. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/bibliotheque/cartographie/cartes/france_masque.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/bibliotheque/cartographie/cartes/france_masque.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/bibliotheque/cartographie/cartes/france.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/bibliotheque/cartographie/cartes/france.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/bibliotheque/hb_indic.class.php |
---|
New file |
0,0 → 1,158 |
<?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. | |
// | | |
// | 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_indic.class.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Classe H_indic |
* |
* Classe permettant de récupérer les données concernant les indic de la base de données. |
* |
*@package Herbier |
*@subpackage Classes |
//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 | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe H_indic() |
* |
* Contient la structure nécessaire pour |
* représenter une table HERBIERS_INDIC. |
*/ |
class H_indic { |
var $id; |
var $type_indic; |
var $indic_hist; |
/** |
* Constructeur de H_indic |
* |
* @param aucun |
* @return void |
* @access public |
*/ |
function H_indic($id_note = null) |
{ |
if (!is_null($id_note)) { |
$this->setId($id_note); |
} |
$this->type_indic = array(); |
$this->indic_hist = array(); |
} |
/** Accesseur getId() - Retourner l'id de la note. |
* |
* @return integer l'identifiant de la note. |
* @access public |
*/ |
function getId() |
{ |
return $this->id; |
} |
/** Accesseur setId() - Attribuer un id à la note. |
* |
* @param integer l'identifiant de la note. |
* @return void l'identifiant est ajouté à l'objet. |
* @access public |
*/ |
function setId($id) |
{ |
$this->id = $id; |
} |
/** |
* Méthode getFromSQL() - Initialise objet H_indic |
* |
* Initialise un objet H_indic dont les propriétés |
* contiennent l'information rataché à une indic |
* caractérisé par son $id (un entier positif) qui correspond |
* à la clé primaire ID_INDIC de la table HERBIERS_INDIC |
* |
* @param int la clé primaire de la table HERBIERS_INDIC |
* @return void |
* @access public |
*/ |
function getFromSQL($id) { |
$requete = 'SELECT * '. |
'FROM HERBIERS_INDIC '. |
'WHERE ID_INDIC = '.$id; |
$resultat = mysql_query($requete) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete)); |
$ligne = mysql_fetch_object($resultat); |
foreach (get_object_vars($ligne) as $cle => $valeur) { |
$this->$cle = $valeur; |
} |
$requete_02 = 'SELECT ID_TYPE '. |
'FROM HERBIERS_A_UN_TYPE '. |
'WHERE HERBIERS_A_UN_TYPE.ID_INDIC = '.$id; |
$resultat_02 = mysql_query($requete_02) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_02)); |
while ($ligne_02 = mysql_fetch_object($resultat_02)) { |
$temp_indic_label = new H_type(); |
$this->type_indic[] = $temp_indic_label->getFromSQL($ligne_02->ID_TYPE); |
} |
$requete_indic_hist = 'SELECT ID_INDIC '. |
'FROM HERBIERS_INDIC_HISTORIQUE '. |
'WHERE ID_INDIC = '.$id.' '. |
'LIMIT 0,1'; |
$resultat_indic_hist = mysql_query($requete_indic_hist) or die(BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), $requete_indic_hist)); |
while ($ligne_indic_hist = mysql_fetch_object($resultat_indic_hist)) { |
$temp_indic_hist = new H_indic_hist(); |
$this->indic_hist[] = $temp_indic_hist->getFromSQL($ligne_indic_hist->ID_INDIC); |
} |
unset($temp_indic_label); |
unset($temp_indic_hist); |
return H_Herbier::remplacerEsperluette($this); |
} |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/04/06 13:29:17 jpm |
* Ajout et modifications des objets représentant la base de données Herbier. |
* |
* Revision 1.2 2005/03/09 15:57:33 jpm |
* Modification de la forme. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/herbier_admin.php |
---|
New file |
0,0 → 1,74 |
<?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. | |
// | | |
// | 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: herbier_admin.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Application Herbier variante Administration |
* |
* Cette application permet d'administrer des collections botaniques comprises dans la base de données |
* d'Herbier grâce à des interfaces Web. |
* |
*@package Herbier |
//Auteur original : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
//Autres auteurs : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// Nous spécifions l'application à appeler. |
if (!isset($_REQUEST['appli'])) { |
$_REQUEST['appli'] = 'hb_admin'; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** Inclusion du fichier principal de Herbier.*/ |
require_once 'herbier.php'; |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/04/06 13:34:41 jpm |
* Ajout du fichier résumant pour Papyrus l'ajout de l'appli Administration des Herbiers. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/herbier_carto.php |
---|
New file |
0,0 → 1,74 |
<?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. | |
// | | |
// | 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: herbier_carto.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Application Herbier variante Cartographie |
* |
* Cette application permet de recherche des collection botanique comprises dans la base de données |
* d'Herbier grâce à une cartographie. |
* |
*@package Herbier |
//Auteur original : |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
//Autres auteurs : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// Nous spécifions l'application à appeler. |
if (!isset($_REQUEST['appli'])) { |
$_REQUEST['appli'] = 'hb_carto'; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** Inclusion du fichier principal de Herbier.*/ |
require_once 'herbier.php'; |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/09 15:58:41 jpm |
* Ajout de l'accès Papyrus à la Cartographie des Herbiers. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/langues/hb_langue_fr.inc.php |
---|
--- trunk/presentations/scripts/hb_ouvrir_fermer.js (revision 0) |
+++ trunk/presentations/scripts/hb_ouvrir_fermer.js (revision 2) |
@@ -0,0 +1,358 @@ |
+/*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 Herbier. | |
+// | | |
+// | 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_ouvrir_fermer.js,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
+/** |
+* Script ouvrir-fermer |
+* |
+* These scripts were originally found on cooltype.com. |
+* Modified 01/01/1999 by Tobias Ratschiller for linuxapps.com |
+* Modified 7th June 2000 by Brian Birtles for Mozilla 5.0 |
+* compatibility for phpMyAdmin |
+* Rewritten and put in a libray 2nd May 2001 by Loïc Chapeaux |
+* Traduit en français et utilisé dans Tela-Botanica fin octobre 2000 |
+* par Alexandre Granier et Jean-Pascal Milcent. |
+* Test réussi avec : (Test passed with:) |
+* - Mozilla 0.8.1, 0.9.0, 0.9.1, 0.9.2 for Windows (js enabled |
+* & disabled) |
+* - IE5, 5.01, 5.5 for Windows |
+* - Netscape 4.75 for Windows |
+* Test échoué avec : ((crappy DOM implementations) with:) |
+* - Opera 5.02 for windows: 'getElementsByTagName' is unsupported |
+* - Opera 5.10 to 5.12 for windows, Opera 5+ for Linux: 'style.display' can't |
+* be changed |
+* - Konqueror 2+: 'style.display' can't be changed |
+* |
+*@package Herbier |
+*@subpackage Javascripts |
+//Auteur original : |
+*@author cooltype.com |
+//Autres auteurs : |
+*@author Tobias Ratschiller |
+*@author Brian Birtles |
+*@author Loïc Chapeaux |
+*@author Alexandre Granier |
+*@author Jean-Pascal Milcent |
+*@copyright Tela-Botanica 2000-2005 |
+*@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
+// +------------------------------------------------------------------------------------------------------+ |
+*/ |
+ |
+// inclusion intempestive |
+/** |
+ * Variables et test normalement présent dans le fichier html dans le head entre |
+ * des balises <script></script> |
+ */ |
+var isDOM = (typeof(document.getElementsByTagName) != 'undefined') ? 1 : 0; |
+var isIE4 = ((typeof(document.all) != 'undefined') && (parseInt(navigator.appVersion) >= 4)) ? 1 : 0; |
+var isNS4 = (typeof(document.layers) != 'undefined') ? 1 : 0; |
+var capable = (isDOM || isIE4 || isNS4) ? 1 : 0; |
+// Uggly fix for Konqueror and Opera that are not fully DOM compliant |
+// Implémentation de la variable 'capable' pour Konqueror et Opera qui |
+// qui ne supporte pas complêtement DOM. |
+if (capable && typeof(navigator.userAgent) != 'undefined') { |
+ var browserName = ' ' + navigator.userAgent.toLowerCase(); |
+ if (browserName.indexOf('opera') > 0 || browserName.indexOf('konqueror') > 0) { |
+ capable = 0; |
+ } |
+} |
+var fontFamily = 'arial, geneva, sans-serif'; |
+var isServer = true; |
+var isExpanded = false; |
+var imgOpened = new Image(9,9); |
+imgOpened.src = 'client/herbier/presentations/images/fermer.png'; |
+var imgClosed = new Image(9,9); |
+imgClosed.src = 'client/herbier/presentations/images/ouvrir.png'; |
+ |
+ |
+/** |
+ *Recharge le 'frame' si la fenêtre est redimensionée sous Netscape4+. |
+ *(Do reloads the frame if the window has been resized under Netscape4+) |
+ * |
+ *@access privée (private) |
+ */ |
+function reDo() |
+{ |
+ if (innerWidth != origWidth || innerHeight != origHeight) |
+ location.reload(true); |
+} // fin de la fonction 'reDo()' (end of the 'reDo()' function]) |
+ |
+ |
+/** |
+ * Positionnement du redimensionnement pour Netscape4+. |
+ * (Positioned element resize bug under NS4+) |
+ * |
+ */ |
+if (isNS4) { |
+ var origWidth = innerWidth; |
+ var origHeight = innerHeight; |
+ onresize = reDo; |
+} |
+ |
+ |
+/** |
+ * Prend l'id du premier élement de plier-déplier. |
+ * Fonction utilisée pour Netscape seulement. |
+ * (Gets the id of the first collapsible room) |
+ * |
+ * @param string le nom de la première pièce du plier-déplier (the name of the first collapsible room) |
+ * |
+ * @return integer le numèro d'index correspondant à cette pièce (the index number corresponding to this room) |
+ * |
+ * @access public |
+ */ |
+function nsGetIndex(el) |
+{ |
+ var ind = null; |
+ var theLayers = document.layers; |
+ var layersCnt = theLayers.length; |
+ for (var i = 0; i < layersCnt; i++) { |
+ if (theLayers[i].id == el) { |
+ ind = i; |
+ break; |
+ } |
+ } |
+ return ind; |
+} // fin de la fonction 'nsGetIndex()' (end of the 'nsGetIndex()' function) |
+ |
+ |
+/** |
+ * Positions des calques sous Netscape4+. |
+ * (Positions layers under NS4+) |
+ * |
+ * @access public |
+ */ |
+function nsArrangeList() |
+{ |
+ if (firstInd != null) { |
+ var theLayers = document.layers; |
+ var layersCnt = theLayers.length; |
+ var nextY = theLayers[firstInd].pageY + theLayers[firstInd].document.height; |
+ for (var i = firstInd + 1; i < layersCnt; i++) { |
+ if (theLayers[i].visibility != 'hide') { |
+ theLayers[i].pageY = nextY; |
+ nextY += theLayers[i].document.height; |
+ } |
+ } |
+ } |
+} // fin de la fonction 'nsArrangeList()' (end of the 'nsArrangeList()' function) |
+ |
+ |
+/** |
+ * Déplier les données au démmarage. |
+ * Fonction utilisée pour Netscape seulement. |
+ * (Expand databases at startup) |
+ * |
+ * @access public |
+ */ |
+function nsShowAll() |
+{ |
+ var theLayers = document.layers; |
+ var layersCnt = theLayers.length; |
+ for (i = firstInd; i < layersCnt; i++) { |
+ theLayers[i].visibility = 'show'; |
+ } |
+} // fin de la fonction 'nsShowAll()' (end of the 'nsShowAll()' function) |
+ |
+ |
+/** |
+ * Pliage des données au démarrage. |
+ * (Collapses databases at startup) |
+ * |
+ * @access public |
+ */ |
+function initIt() |
+{ |
+ if (!capable || !isServer) |
+ return; |
+ |
+ if (isDOM) { |
+ var tempColl = document.getElementsByTagName('DIV'); |
+ var tempCollCnt = tempColl.length; |
+ for (var i = 0; i < tempCollCnt; i++) { |
+ if (tempColl[i].id == expandedDb) |
+ tempColl[i].style.display = 'block'; |
+ else if (tempColl[i].className == 'child') |
+ tempColl[i].style.display = 'none'; |
+ } |
+ } // Fin du cas DOM (end of the DOM case) |
+ else if (isIE4) { |
+ tempColl = document.all.tags('DIV'); |
+ var tempCollCnt = tempColl.length; |
+ for (var i = 0; i < tempCollCnt; i++) { |
+ if (tempColl(i).id == expandedDb) |
+ tempColl(i).style.display = 'block'; |
+ else if (tempColl(i).className == 'child') |
+ tempColl(i).style.display = 'none'; |
+ } |
+ } // Fin du cas IE4 (end of the IE4 case) |
+ else if (isNS4) { |
+ var theLayers = document.layers; |
+ var layersCnt = theLayers.length; |
+ for (var i = 0; i < layersCnt; i++) { |
+ if (theLayers[i].id == expandedDb) |
+ theLayers[i].visibility = 'show'; |
+ else if (theLayers[i].id.indexOf('Child') != -1) |
+ theLayers[i].visibility = 'hide'; |
+ else |
+ theLayers[i].visibility = 'show'; |
+ } |
+ nsArrangeList(); |
+ } // Fin du cas NS4 (end of the NS4 case) |
+} // Fin de la fonction 'initIt()' (end of the 'initIt()' function) |
+ |
+ |
+/** |
+ * Plier/Déplier les données quand l'utilisateur le demande. |
+ * (Collapses/expands a database when the user require this to be done) |
+ * |
+ * @param string le nom de l'élément à activer (the name of the room to act on) |
+ * @param boolean si oui ou non le contenu des données doit être affiché (whether to expand or to collapse the database content) |
+ * |
+ * @access public |
+ */ |
+function expandBase(el, unexpand) |
+{ |
+ if (!capable) |
+ return; |
+ |
+ if (isDOM) { |
+ var whichEl = document.getElementById(el + 'Child'); |
+ var whichIm = document.getElementById(el + 'Img'); |
+ if (whichEl.style.display == 'none' && whichIm) { |
+ whichEl.style.display = 'block'; |
+ whichIm.src = imgOpened.src; |
+ } |
+ else if (unexpand) { |
+ whichEl.style.display = 'none'; |
+ whichIm.src = imgClosed.src; |
+ } |
+ } // Fin du cas DOM (end of the DOM case) |
+ else if (isIE4) { |
+ var whichEl = document.all(el + 'Child'); |
+ var whichIm = document.images.item(el + 'Img'); |
+ if (whichEl.style.display == 'none') { |
+ whichEl.style.display = 'block'; |
+ whichIm.src = imgOpened.src; |
+ } |
+ else if (unexpand) { |
+ whichEl.style.display = 'none'; |
+ whichIm.src = imgClosed.src; |
+ } |
+ } // Fin du cas IE4 (end of the IE4 case) |
+ else if (isNS4) { |
+ var whichEl = document.layers[el + 'Child']; |
+ var whichIm = document.layers[el + 'Parent'].document.images['imEx']; |
+ if (whichEl.visibility == 'hide') { |
+ whichEl.visibility = 'show'; |
+ whichIm.src = imgOpened.src; |
+ } |
+ else if (unexpand) { |
+ whichEl.visibility = 'hide'; |
+ whichIm.src = imgClosed.src; |
+ } |
+ nsArrangeList(); |
+ } // Fin du cas NS4 (end of the NS4 case) |
+} // fin de la fonction 'expandBase()' (end of the 'expandBase()' function) |
+ |
+ |
+/** |
+ * Ajout des styles permettant le positionnement des calques. |
+ * Le style display est important pour afficher ou masquer les calques. |
+ * Les styles child et parent doivent être utilisé pour les div du fichier html. |
+ * (Add styles for positioned layers) |
+ */ |
+if (capable) { |
+ with (document) { |
+ // Brian Birtles : This is not the ideal method of doing this |
+ // but under the 7th June '00 Mozilla build (and many before |
+ // it) Mozilla did not treat text between <style> tags as |
+ // style information unless it was written with the one call |
+ // to write(). |
+ if (isDOM) { |
+ var lstyle = '<style type="text/css">' |
+ + 'div {color: #000000;}' |
+ + '.heada {font-family: Arial, Helvetica, Verdana, sans-serif; font-size: 12px}' |
+ + '.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration:none; display: block}' |
+ + '.child {font-family: ' + fontFamily + '; text-decoration:none; display: none}' |
+ + '.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt;}' |
+ + '.tblItem:hover {color: #FF0000; text-decoration: underline}' |
+ + '<\/style>'; |
+ write(lstyle); |
+ } |
+ else { |
+ write('<style type="text/css">'); |
+ write('div {color: #000000; }'); |
+ write('.heada {font-family: ' + fontFamily + '; font-size: 10pt}'); |
+ if (isIE4) { |
+ write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; display: block}'); |
+ write('.child {font-family: ' + fontFamily + '; text-decoration: none; display: none}'); |
+ write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none; font-size: 8pt}'); |
+ write('.tblItem:hover {color: #FF0000; text-decoration: underline}'); |
+ } |
+ else { |
+ write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none; position: absolute; visibility: hidden}'); |
+ write('.child {font-family: ' + fontFamily + '; position: absolute; visibility: hidden}'); |
+ write('.item, .tblItem {color: #333399; text-decoration: none}'); |
+ } |
+ write('<\/style>'); |
+ } |
+ } |
+} |
+else { |
+ with (document) { |
+ write('<style type="text/css">'); |
+ write('div {color: #000000; }'); |
+ write('.heada {font-family: ' + fontFamily + '; font-size: 10pt ; font-weight:bold}'); |
+ write('.parent {font-family: ' + fontFamily + '; color: #000000; text-decoration: none}'); |
+ write('.child {font-family: ' + fontFamily + '; text-decoration: none}'); |
+ write('.item, .item:active, .item:hover, .tblItem, .tblItem:active {color: #333399; text-decoration: none}'); |
+ write('.tblItem:hover {color: #FF0000; text-decoration: underline}'); |
+ write('<\/style>'); |
+ } |
+} // Fin de l'ajout des styles (end of adding styles) |
+ |
+ |
+onload = initIt; |
+ |
+/** |
+ * Test normalement présent dans le fichier html à la fin entre |
+ * des balises <script></script> |
+ */ |
+ |
+if (isNS4) { |
+ firstEl = 'el1Parent'; |
+ firstInd = nsGetIndex(firstEl); |
+ nsShowAll(); |
+ nsArrangeList(); |
+} |
+expandedDb = ''; |
+ |
+/* +--Fin du code ----------------------------------------------------------------------------------------+ |
+* |
+* $Log: not supported by cvs2svn $ |
+* Revision 1.1 2005/03/08 14:14:47 jpm |
+* Ajout du fichier javascript permettant d'ouvrir et fermer du html. |
+* |
+* |
+* +-- Fin du code ----------------------------------------------------------------------------------------+ |
+*/ |
\ No newline at end of file |
/trunk/presentations/styles/herbier.css |
---|
New file |
0,0 → 1,123 |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
/* ======================================================================================================== |
| Copyright (C) 1999-2005 Tela Botanica (accueil@tela-botanica.org) | |
+---------------------------------------------------------------------------------------------------------+ |
| This file is part of Herbier. | |
| | |
| 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: herbier.css,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
=========================================================================================================== |
DESCRIPTION : Fichier des styles CSS de Herbier. |
=========================================================================================================== |
Auteur original : Jean-Pascal MILCENT |
Autres auteurs : Aucun |
=========================================================================================================== |
AUTEUR : $Author: jp_milcent $ |
VERSION : $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
======================================================================================================= */ |
/* +----------------------------------------------------------------------------------------------------+ |
| STRUCTURE | |
+----------------------------------------------------------------------------------------------------+*/ |
/* +----------------------------------------------------------------------------------------------------+ |
/* Liste de définition : style provenant de pompage.net : http://pompage.net/pompe/listesdefinitions/ */ |
dl.hb_affichage_tabulaire { |
width: 61em; |
} |
.hb_affichage_tabulaire dt { |
width: 20em; |
float: left; |
margin: 0; |
padding: .2em; |
} |
/* hack de commentaire avec un antislash pour ie5 mac \*/ |
dt { clear: both; } |
/* end hack */ |
.hb_affichage_tabulaire dd { |
float: left; |
z-index:1; |
width: 40em; |
margin: 0; |
padding: .2em; |
} |
/* +----------------------------------------------------------------------------------------------------+ |
/* Autres */ |
h2, .parent, .hb_espace, .hb_ligne { |
clear: both; |
} |
.hb_titre_en_ligne { |
display: inline; |
padding-top: 1em; |
} |
/* +----------------------------------------------------------------------------------------------------+ |
| DESIGN | |
+----------------------------------------------------------------------------------------------------+*/ |
dt, label { |
font-weight: bold; |
} |
form ul { |
list-style-type: none; |
} |
.hb_img_icone { |
border:0; |
width:9px; |
height:9px; |
} |
.hb_img_fermer { |
border:0; |
width:9px; |
height:9px; |
} |
.hb_ligne { |
border: .2em dotted; |
width:4em; |
} |
.hb_plier_deplier td{ |
padding:0; |
margin:0; |
text-align:left; |
height:12px; |
border-width:0; |
} |
.hb_arborescence td{ |
padding:0; |
margin: -5px 0 0 0; |
text-align:left; |
vertical-align:top; |
border-width:0; |
} |
.pair{ |
background-color: #FAD2C6; |
} |
/* +--Fin des CSS ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/04/06 13:26:21 jpm |
* Correction taille image. |
* |
* Revision 1.2 2005/04/06 13:23:34 jpm |
* Styles généraux des applis Herbiers. |
* |
* Revision 1.1 2005/03/08 14:14:59 jpm |
* Ajout du fichier css de Herbier. |
* |
* |
* +-- Fin des CSS ----------------------------------------------------------------------------------------+ |
*/ |
/trunk/presentations/images/arborescence_trait_fin.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/arborescence_trait_fin.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/arborescence_trait.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/arborescence_trait.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/aide/hb_admin_login.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/aide/hb_admin_login.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/aide/hb_admin_institution_accueil.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/aide/hb_admin_institution_accueil.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/aide/hb_consultation_recherche.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/aide/hb_consultation_recherche.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/aide/hb_admin_renseignement.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/aide/hb_admin_renseignement.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/aide/hb_collection.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/aide/hb_collection.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/aide/hb_admin_accueil.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/aide/hb_admin_accueil.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/fermer.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/fermer.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/presentations/images/ouvrir.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/presentations/images/ouvrir.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/installation/herbiers.sql |
---|
New file |
0,0 → 1,515 |
#+---------------------------------------------------------------------------------------------------------+ |
#| Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) | |
#+---------------------------------------------------------------------------------------------------------+ |
#| This file is part of Herbier. | |
#| | |
#| 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: herbiers.sql,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
# |
# Base de données Herbier |
# |
# Script de création de la structure de la base de données Herbier. |
# |
#@package Herbier |
#@subpackage Sql |
# Auteur original : |
#@author Alexandre GRANIER <alexandre@tela-botanica.org> |
#Autres auteurs : |
#@author Aucun |
#@copyright Tela-Botanica 2000-2005 |
#@version $Revision: 1.1 $ $Date: 2005-11-23 10:32:32 $ |
# +------------------------------------------------------------------------------------------------------+ |
# |
# Structure de la table `EFLORE_DROIT` |
# |
CREATE TABLE `EFLORE_DROIT` ( |
`ED_ID_DROIT` int(11) NOT NULL default '0', |
`ED_INTITULE_DROIT` varchar(50) NOT NULL default '', |
`ED_DESCRIPTION_DROIT` varchar(255) NOT NULL default '', |
PRIMARY KEY (`ED_ID_DROIT`), |
UNIQUE KEY `EFLORE_DROIT_PK` (`ED_ID_DROIT`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `EFLORE_DROIT` |
# |
INSERT INTO `EFLORE_DROIT` VALUES (1, 'Super-administrateur', 'Droits : gestion, validation, modification, ajout & consultation. Appliqué par défaut à : tous les projets.'); |
INSERT INTO `EFLORE_DROIT` VALUES (2, 'Administrateur', 'Droits : gestion, validation, modification, ajout & consultation. Appliqué par défaut à : un projet donné.'); |
INSERT INTO `EFLORE_DROIT` VALUES (3, 'Modérateur', 'Droits : validation & consultation. Appliqué par défaut à : l\'ensemble du contenu d\'un projet.'); |
INSERT INTO `EFLORE_DROIT` VALUES (4, 'Contributeur', 'Droits : modification, ajout & consultation. Appliqué par défaut à : l\'ensemble du contenu d\'un projet.'); |
INSERT INTO `EFLORE_DROIT` VALUES (5, 'Utilisateur', 'Droits : consultation. Appliqué par défaut à : l\'ensemble du contenu d\'un projet.'); |
# -------------------------------------------------------- |
# |
# Structure de la table `EFLORE_DROIT_POSSEDER` |
# |
CREATE TABLE `EFLORE_DROIT_POSSEDER` ( |
`EDP_ID_UTILISATEUR` int(11) NOT NULL default '0', |
`EDP_ID_PROJET` int(11) NOT NULL default '0', |
`EDP_ID_DROIT` int(11) NOT NULL default '0', |
PRIMARY KEY (`EDP_ID_UTILISATEUR`,`EDP_ID_DROIT`,`EDP_ID_PROJET`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `EFLORE_DROIT_POSSEDER` |
# |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (5, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (18, 1, 1); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (19, 1, 1); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (29, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (68, 1, 1); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (97, 1, 1); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (210, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (253, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (415, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (423, 1, 1); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (551, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (871, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (920, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (937, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (1084, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (1237, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (1815, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (3036, 1, 2); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (3567, 1, 1); |
INSERT INTO `EFLORE_DROIT_POSSEDER` VALUES (4077, 1, 2); |
# -------------------------------------------------------- |
# |
# Structure de la table `EFLORE_PROJET` |
# |
CREATE TABLE `EFLORE_PROJET` ( |
`EPR_ID_PROJET` int(11) NOT NULL default '0', |
`EPR_CE_TYPE_PROJET_ORIGINE` int(11) NOT NULL default '0', |
`EPR_CE_OUVRAGE_SOURCE` int(11) default NULL, |
`EPR_INTITULE_PROJET` varchar(255) NOT NULL default '', |
`EPR_ABREVIATION_PROJET` varchar(40) default NULL, |
`EPR_DESCRIPTION_PROJET` varchar(255) default NULL, |
`EPR_LIEN_WEB` varchar(255) default NULL, |
`EPR_NOTES_PROJET` text, |
PRIMARY KEY (`EPR_ID_PROJET`), |
UNIQUE KEY `EFLORE_PROJET_PK` (`EPR_ID_PROJET`), |
KEY `POSSEDER_TYPE_PROJET_FK` (`EPR_CE_TYPE_PROJET_ORIGINE`), |
KEY `ETRE_BASE_SUR_OUVRAGE_FK` (`EPR_CE_OUVRAGE_SOURCE`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `EFLORE_PROJET` |
# |
INSERT INTO `EFLORE_PROJET` VALUES (1, 0, NULL, 'Inventaire des herbiers de France', 'IHF', 'Réalisation d\'un inventaire de toutes les collections d\'herbiers présentes sur le territoire.', NULL, NULL); |
# |
# Structure de la table `HERBIERS_ADMINISTRER` |
# |
CREATE TABLE `HERBIERS_ADMINISTRER` ( |
`HA_ID_ANNUAIRE` int(10) unsigned default NULL, |
`HA_ID_ORG` int(10) unsigned default NULL |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_A_UN_TYPE` |
# |
CREATE TABLE `HERBIERS_A_UN_TYPE` ( |
`ID_INDIC` int(11) NOT NULL default '0', |
`ID_TYPE` int(11) NOT NULL default '0', |
PRIMARY KEY (`ID_INDIC`,`ID_TYPE`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_COLLECTION` |
# |
CREATE TABLE `HERBIERS_COLLECTION` ( |
`ID` int(11) NOT NULL auto_increment, |
`PARENT_ID` int(11) default NULL, |
`LEVEL` varchar(255) default NULL, |
`COLLECTION_CODE` varchar(64) default NULL, |
`NOM_COLLECTION` varchar(255) NOT NULL default '', |
`DESCRIPTION` text, |
`STATUT` tinyint(3) unsigned NOT NULL default '1', |
`URL` varchar(255) default NULL, |
`INCLUDED_TYPE` tinyint(4) default '0', |
`STRENGTH` text, |
`PURPOSE` text, |
`NUM_ORGANISATION` int(11) default NULL, |
`NUM_SPECIMENS` int(11) default NULL, |
`NUM_SPECIES` int(11) default NULL, |
`DOC_STATE` text, |
`PERCENT_DATABASED` smallint(6) default NULL, |
`BIOCASE_URL` varchar(255) default NULL, |
`ACCESS_RESTRICTION` text, |
`USAGE_RESTRICTION` text, |
`COLLECTION_ACTIVITY` varchar(255) default NULL, |
`COLLECTION_FOCUS` varchar(255) default NULL, |
`NOTES` text, |
`COLLECTION_CLASS` tinyint(3) unsigned NOT NULL default '1', |
`COLLECTEURS` text, |
`DATE_DEBUT` date default '0000-00-00', |
`DATE_FIN` date default '0000-00-00', |
`DATE_DEBUT_CARAC` tinyint(3) unsigned NOT NULL default '1', |
`DATE_FIN_CARAC` tinyint(3) unsigned NOT NULL default '1', |
`PREC_SPECIMENS` tinyint(3) unsigned NOT NULL default '3', |
`PREC_SPECIES` tinyint(3) unsigned NOT NULL default '3', |
`ETAT_SPECIMENS` enum('1','2','3','4') NOT NULL default '1', |
`ETAT_CLASSEMENT` enum('1','2','3','4') NOT NULL default '1', |
`ETAT_PRESENTATION` enum('1','2','3','4') NOT NULL default '1', |
`MODE_CLASSEMENT` text, |
PRIMARY KEY (`ID`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_COLLECTIONS` |
# |
CREATE TABLE `HERBIERS_COLLECTIONS` ( |
`ID_COLLECTIONS` int(11) NOT NULL default '0', |
`ID` int(11) NOT NULL default '0', |
`NAME` varchar(255) default NULL, |
PRIMARY KEY (`ID_COLLECTIONS`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_COLLECTION_CLASS` |
# |
CREATE TABLE `HERBIERS_COLLECTION_CLASS` ( |
`HCC_ID` tinyint(3) unsigned NOT NULL default '0', |
`HCC_LABEL` varchar(255) default NULL, |
PRIMARY KEY (`HCC_ID`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_COLL_STATUT` |
# |
CREATE TABLE `HERBIERS_COLL_STATUT` ( |
`ID_COLL_STATUT` tinyint(3) unsigned NOT NULL auto_increment, |
`LABEL` varchar(255) NOT NULL default '', |
PRIMARY KEY (`ID_COLL_STATUT`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_COMMON_NAME` |
# |
CREATE TABLE `HERBIERS_COMMON_NAME` ( |
`ID_COMMON_NAME` int(11) NOT NULL default '0', |
`ID` int(11) NOT NULL default '0', |
`NAME` varchar(255) default NULL, |
`SOURCE` varchar(255) default NULL, |
PRIMARY KEY (`ID_COMMON_NAME`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_COORDONNE` |
# |
CREATE TABLE `HERBIERS_COORDONNE` ( |
`HC_ID_COORDINATEUR` int(10) unsigned NOT NULL default '0', |
`HC_ID_REDACTEUR` int(10) unsigned NOT NULL default '0', |
PRIMARY KEY (`HC_ID_COORDINATEUR`,`HC_ID_REDACTEUR`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_DATE_DEBUT_CARAC` |
# |
CREATE TABLE `HERBIERS_DATE_DEBUT_CARAC` ( |
`ID_DATE_CARAC` tinyint(3) unsigned NOT NULL default '0', |
`LABEL_DATE_DEBUT_CARAC` varchar(255) default NULL, |
PRIMARY KEY (`ID_DATE_CARAC`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_DATE_FIN_CARAC` |
# |
CREATE TABLE `HERBIERS_DATE_FIN_CARAC` ( |
`ID_DATE_CARAC` tinyint(3) unsigned NOT NULL default '0', |
`LABEL_DATE_FIN_CARAC` varchar(255) default NULL, |
PRIMARY KEY (`ID_DATE_CARAC`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_DENOMBREMENT_CARAC_SC` |
# |
CREATE TABLE `HERBIERS_DENOMBREMENT_CARAC_SC` ( |
`HDC_ID` tinyint(3) unsigned NOT NULL default '0', |
`HDC_LABEL` varchar(255) default NULL, |
PRIMARY KEY (`HDC_ID`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_DENOMBREMENT_CARAC_SP` |
# |
CREATE TABLE `HERBIERS_DENOMBREMENT_CARAC_SP` ( |
`HDC_ID` tinyint(3) unsigned NOT NULL default '0', |
`HDC_LABEL` varchar(255) default NULL, |
PRIMARY KEY (`HDC_ID`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_ETAT_LABEL` |
# |
CREATE TABLE `HERBIERS_ETAT_LABEL` ( |
`HEL_ID` tinyint(3) unsigned NOT NULL default '0', |
`HEL_LABEL` varchar(255) default NULL, |
PRIMARY KEY (`HEL_ID`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_INDIC` |
# |
CREATE TABLE `HERBIERS_INDIC` ( |
`ID_INDIC` int(11) NOT NULL auto_increment, |
`ID` int(11) NOT NULL default '0', |
`REM_INDIC` text, |
`MAJ_INDIC` int(11) default NULL, |
`TXT_INDIC` text, |
PRIMARY KEY (`ID_INDIC`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_INDIC_HISTORIQUE` |
# |
CREATE TABLE `HERBIERS_INDIC_HISTORIQUE` ( |
`ID_INDIC_HIST` int(10) unsigned NOT NULL auto_increment, |
`ID_INDIC` int(10) unsigned NOT NULL default '0', |
`DATE_INDIC` int(10) unsigned NOT NULL default '0', |
`ID_INDICATEUR` int(10) unsigned NOT NULL default '0', |
PRIMARY KEY (`ID_INDIC_HIST`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_ONT_COLLECTEURS` |
# |
CREATE TABLE `HERBIERS_ONT_COLLECTEURS` ( |
`HOC_ID_COLL` int(10) unsigned default NULL, |
`HOC_ID_IBN` int(10) unsigned default NULL |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_ORGANISATION` |
# |
CREATE TABLE `HERBIERS_ORGANISATION` ( |
`ID_ORG` int(11) NOT NULL auto_increment, |
`NUM_COLLECTION` int(11) default NULL, |
`ADRESS_TEXT` text, |
`INSTITUTION_NAME` text, |
`ADRESS_LINE` text, |
`TOWN` varchar(255) default NULL, |
`REGION` varchar(255) default NULL, |
`COUNTRY_CODE` char(3) default NULL, |
`ZIP` varchar(16) default NULL, |
`TEL` varchar(64) default NULL, |
`FAX` varchar(64) default NULL, |
`EMAIL` varchar(255) default NULL, |
`HO_URL` varchar(255) default 'http://', |
`LOGO` varchar(255) default NULL, |
`TIME_ZONE` varchar(255) default NULL, |
`ORGANISATION_CLASS` enum('Botanic_Garden','Zoo','Hoticultural','Museum','Herbarium','Laboratory','Other') NOT NULL default 'Botanic_Garden', |
`COLLECTION_CLASS` enum('living','dormant','culture','preserved','observations','photography','fossil','other') NOT NULL default 'living', |
`INDEX_HERB` varchar(16) default NULL, |
`ACCESS_RESTRICTION` text, |
`STATUT_PUBLICATION` tinyint(3) unsigned NOT NULL default '0', |
`SOURCE_DES_DONNEES` varchar(255) NOT NULL default 'IH - Index Herbariorum', |
PRIMARY KEY (`ID_ORG`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_PERSON_NAME` |
# |
CREATE TABLE `HERBIERS_PERSON_NAME` ( |
`ID_PERSON_NAME` int(11) NOT NULL default '0', |
`ID` int(11) NOT NULL default '0', |
`PERSON` varchar(255) default NULL, |
`ROLE` varchar(255) default NULL, |
PRIMARY KEY (`ID_PERSON_NAME`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_PRES` |
# |
CREATE TABLE `HERBIERS_PRES` ( |
`ID_PRES` int(10) unsigned NOT NULL auto_increment, |
`LABEL` varchar(255) NOT NULL default '', |
`LABEL_ANG` varchar(255) NOT NULL default '', |
PRIMARY KEY (`ID_PRES`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_PUBLICATIONS` |
# |
CREATE TABLE `HERBIERS_PUBLICATIONS` ( |
`ID_PUBLICATIONS` int(11) NOT NULL default '0', |
`ID` int(11) NOT NULL default '0', |
`PUBLICATIONS` varchar(255) default NULL, |
PRIMARY KEY (`ID_PUBLICATIONS`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_STAFF` |
# |
CREATE TABLE `HERBIERS_STAFF` ( |
`ID_STAFF` int(11) NOT NULL auto_increment, |
`NOM` varchar(255) default NULL, |
`PRENOM` varchar(255) default NULL, |
`ADRESSE1` varchar(255) default NULL, |
`ADRESSE2` varchar(255) default NULL, |
`CP` varchar(10) default NULL, |
`VILLE` varchar(255) default NULL, |
`MAIL` varchar(255) default NULL, |
`TEL` varchar(64) NOT NULL default '', |
`FAX` varchar(64) NOT NULL default '', |
`ID_TELA_BOTANICA` int(11) default NULL, |
`FONCTION` varchar(255) default NULL, |
`CONTACT` enum('non','oui') NOT NULL default 'non', |
PRIMARY KEY (`ID_STAFF`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_STATUT_PUBLICATION` |
# |
CREATE TABLE `HERBIERS_STATUT_PUBLICATION` ( |
`HSP_ID` tinyint(3) unsigned NOT NULL default '0', |
`HSP_LABEL` varchar(255) default NULL, |
PRIMARY KEY (`HSP_ID`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_TYPE` |
# |
CREATE TABLE `HERBIERS_TYPE` ( |
`ID_TYPE` int(11) NOT NULL auto_increment, |
`LABEL_TYPE` varchar(255) default NULL, |
PRIMARY KEY (`ID_TYPE`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_WEBSITES` |
# |
CREATE TABLE `HERBIERS_WEBSITES` ( |
`ID_WEBSITES` int(11) NOT NULL default '0', |
`URL` varchar(255) default NULL, |
PRIMARY KEY (`ID_WEBSITES`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_ont_pres` |
# |
CREATE TABLE `HERBIERS_ont_pres` ( |
`ID` int(10) unsigned NOT NULL default '0', |
`ID_PRES` int(10) unsigned NOT NULL default '0', |
PRIMARY KEY (`ID`,`ID_PRES`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `HERBIERS_ont_un_staff` |
# |
CREATE TABLE `HERBIERS_ont_un_staff` ( |
`ID_ORG` int(11) NOT NULL default '0', |
`ID_STAFF` int(11) NOT NULL default '0', |
PRIMARY KEY (`ID_ORG`,`ID_STAFF`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# -------------------------------------------------------- |
# |
# Structure de la table `gen_COUNTRY` |
# |
CREATE TABLE `gen_COUNTRY` ( |
`GC_ID` varchar(5) NOT NULL default '', |
`GC_LOCALE` varchar(5) NOT NULL default '', |
`GC_NAME` varchar(80) NOT NULL default '', |
`GC_CAPITAL` varchar(80) NOT NULL default '', |
`GC_CONTINENT_ID` int(11) NOT NULL default '0', |
PRIMARY KEY (`GC_ID`,`GC_LOCALE`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
/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.'&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> </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"> </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"> </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/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"> </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> </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é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 .= ' '; |
} |
$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é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_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/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/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/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_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 ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/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, '>', '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/herbier.php |
---|
New file |
0,0 → 1,212 |
<?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. | |
// | | |
// | 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: herbier.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Application Herbier |
* |
* Cette application permet de consulter et d'administrer des collection botanique comprise dans le modèle |
* d'Herbier. |
* Ce fichier permet d'appeler les fichiers partagés par l'ensemble des applications d'Hebier. |
* Il permet aussi d'appeler les fichiers de chaque application spécifique et de vérifier s'il y a besoin |
* que l'utilisateur soit identifié ou pas. |
* Il joue le role de controlleur. |
* |
*@package Herbier |
//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 la base de données de BiblioBota.*/ |
require_once 'client'.GEN_SEP.'herbier'.GEN_SEP.'configuration'.GEN_SEP.'hb_config_bdd.inc.php'; |
/** Inclusion du fichier de configuration général de BiblioBota.*/ |
require_once 'client'.GEN_SEP.'herbier'.GEN_SEP.'configuration'.GEN_SEP.'hb_config.inc.php'; |
/** Inclusion de l'API Débogage */ |
require_once HB_CHEMIN_API_DEBOGAGE.'BOG_sql.fonct.php'; |
/** Inclusion de la bibliothèque de fonctions communes aux applications de Herbier */ |
require_once HB_CHEMIN_BIBLIO.'hb_commun.fonct.php'; |
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */ |
require_once 'DB.php'; |
/** Inclusion de la classe PEAR de gestion des URL. */ |
require_once 'Net/URL.php'; |
/** Inclusion du fichier de configuration des url de BiblioBota.*/ |
require_once HB_CHEMIN_CONFIG.'hb_config_url.inc.php'; |
/** Definition de la variable globale stokant la connexion à la base de données. */ |
$GLOBALS['_HERBIER_']['bdd'] =& DB::connect(HB_DSN); |
if (DB::isError($GLOBALS['_HERBIER_']['bdd'])) { |
die (BOG_afficherErreurSql(__FILE__, __LINE__, mysql_error(), null, $GLOBALS['_HERBIER_']['bdd']->getMessage())); |
} |
// Stockage des styles de l'application |
GEN_stockerStyleExterne('herbier', HB_CHEMIN_STYLES.'herbier.css'); |
// Appel du fichier de traduction des textes de l'application Herbier |
if (file_exists(HB_CHEMIN_LANGUES.'hb_langue_'.HB_I18N.'.inc.php')) { |
/** Inclusion du fichier de traduction de l'application Herbier. */ |
include_once HB_CHEMIN_LANGUES.'hb_langue_'.HB_I18N.'.inc.php'; |
} else { |
/** Inclusion du fichier de traduction fr par défaut. */ |
include_once HB_CHEMIN_LANGUES.'hb_langue_fr.inc.php'; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** Fonction afficherContenuNavigation() - Fonction appelé par le gestionnaire Papyrus. |
* |
* Elle retourne les onglets de l'application Herbier. |
* Todo : Il serait nécessaire de revoir les arguments passés dans les liens. Il y a |
* surement moyen de simplifier les choses. |
* |
* @return string du code XHTML correspondant à la zone d'onglets de l'application. |
*/ |
function afficherContenuNavigation() |
{ |
$sortie = ''; |
// Dans le cas où nous sommes passé en consultation avancée... |
$class_onglet_herbier = 'menu_inactif'; |
$class_onglet_collection = 'menu_inactif'; |
if (isset($_GET['consultation'])) { |
if ($_GET['consultation'] == 'herbier') { |
$class_onglet_herbier = 'menu_actif'; |
} else if ($_GET['consultation'] == 'collection') { |
$class_onglet_collection = 'menu_actif'; |
} |
$sortie .= '<ul class="onglets">'."\n"; |
$sortie .= '<li class="'.$class_onglet_herbier.'" >'."\n"; |
$sortie .= ' <a '. |
'href="'.HB_URL_COURANTE_CONSULTATION_FICHE_HERBIER.'&id_org='.$_GET['id_org'].'">'. |
'Herbier'. |
'</a> '."\n"; |
$sortie .= '</li>'."\n"; |
$sortie .= '<li class="'.$class_onglet_collection.'">'."\n"; |
$sortie .= ' <a '. |
'href="'.HB_URL_COURANTE_CONSULTATION_FICHE_COLECTION.'&id_org='.$_GET['id_org'].'">'. |
'Collection'. |
'</a> '."\n"; |
$sortie .= '</li>'."\n"; |
$sortie .= '</ul>'."\n"; |
} |
return $sortie; |
} |
/** Fonction afficherContenuNavigation() - Fonction appelé par le gestionnaire Papyrus. |
* |
* Elle retourne les onglets de l'application Herbier. |
* Todo : Il serait nécessaire de revoir les arguments passés dans les liens. Il y a |
* surement moyen de simplifier les choses. |
* |
* @return string du code XHTML correspondant à la zone d'onglets de l'application. |
*/ |
function afficherContenuMenu() |
{ |
// +------------------------------------------------------------------------------------------------------+ |
// Initialisation des variables |
$sortie = ''; |
if (!defined('HB_ARGUMENT_AUTH') || HB_ARGUMENT_AUTH == 0 || (HB_ARGUMENT_AUTH == 1 && $GLOBALS['_HERBIER_']['auth']->getAuth())) { |
// Nous incluons l'application demandée : |
$chemin_application = HB_CHEMIN_APPLI.HB_ARGUMENT_APPLI.GEN_SEP.HB_ARGUMENT_APPLI.'.menu.php'; |
if (file_exists($chemin_application)) { |
include_once $chemin_application; |
} |
} |
return $sortie; |
} |
/** Fonction afficherContenuTete() - Fonction appelé par le gestionnaire Papyrus. |
* |
* Elle retourne l'entête de l'application Herbier. |
* Todo : Il serait nécessaire de revoir les arguments passés dans les liens. Il y a |
* surement moyen de simplifier les choses. |
* |
* @return string du code XHTML correspondant à la zone d'entête de l'application. |
*/ |
function afficherContenuTete() |
{ |
$sortie = ''; |
if (isset($_GET['consultation'])) { |
$sortie .= '<p>'."\n"; |
$sortie .= ' <a href="'.HB_URL_COURANTE.'">'.'Retour'.'</a>'."\n"; |
$sortie .= '</p>'."\n"; |
} |
return $sortie; |
} |
/** Fonction afficherContenuCorps() - Fonction appelé par le gestionnaire Papyrus. |
* |
* Elle retourne le contenu de l'application Herbier. |
* |
* @return string du code XHTML correspondant au contenu renvoyé par l'application. |
*/ |
function afficherContenuCorps() |
{ |
// +------------------------------------------------------------------------------------------------------+ |
// Initialisation des variables |
$sortie = ''; |
if (!defined('HB_ARGUMENT_AUTH') || HB_ARGUMENT_AUTH == 0 || (HB_ARGUMENT_AUTH == 1 && $GLOBALS['_HERBIER_']['auth']->getAuth())) { |
// Nous incluons l'application demandée : |
$chemin_application = HB_CHEMIN_APPLI.HB_ARGUMENT_APPLI.GEN_SEP.HB_ARGUMENT_APPLI.'.php'; |
if (file_exists($chemin_application)) { |
include_once $chemin_application; |
} else { |
$sortie = '<p class="pap_erreur">'.'Application inexistantes!'.'</p>'; |
} |
} elseif (HB_ARGUMENT_AUTH == 1) { |
return GEN_afficherInfoIdentification($GLOBALS['_HERBIER_']['url']->getURL()); |
} else { |
$sortie = '<p class="pap_erreur">'. |
'ERREUR : problème!'.'<br />'.'LIGNE : '. __LINE__ .'<br />'.'FICHIER : '. __FILE__ . |
'</p>'; |
} |
return $sortie; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/05/18 07:30:13 jpm |
* Correction des bogues et derniers réglages avant mise en ligne du site v4. |
* |
* Revision 1.2 2005/04/06 13:35:04 jpm |
* Modification vis à vis de l'application Administration. |
* |
* Revision 1.1 2005/03/08 14:17:19 jpm |
* Ajout des fichiers principaux. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/configuration/hb_config.inc.php |
---|
New file |
0,0 → 1,169 |
<?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. | |
// | | |
// | 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_config.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Configuration générale des applications de Herbier |
* |
* Ce fichier permet de stocker les valeurs de configuration communes aux différentes applications |
* constituant Herbier. |
* |
*@package Herbier |
*@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 | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
/** Definition de la variable globale de Herbier.*/ |
$GLOBALS['_HERBIER_'] = array(); |
/** Variable globale stockant une URL de base de l'application recherche de plante sous forme d'objet Pear URL.*/ |
$GLOBALS['_HERBIER_']['url'] =& $GLOBALS['_GEN_commun']['url']; |
/** Variable globale stockant l'objet Pear d'identification.*/ |
$GLOBALS['_HERBIER_']['auth'] =& $GLOBALS['_GEN_commun']['pear_auth']; |
/** Variable globale stockant l'objet Pear DB.*/ |
$GLOBALS['_HERBIER_']['bdd'] = null; |
// +------------------------------------------------------------------------------------------------------+ |
// Définition de la langue |
/** Constante stockant la valeur i18n fournie par Papyrus et pouvant être passée dans l'url.*/ |
define('HB_I18N', $GLOBALS['_GEN_commun']['i18n']); |
// +------------------------------------------------------------------------------------------------------+ |
// Définition des arguments de l'appel de l'application |
/** Constante stockant la demande d'authentification pour accéder aux applications.*/ |
define('HB_ARGUMENT_AUTH', 0); |
if (!isset($GLOBALS['_GEN_commun']['info_application']->application)) { |
$GLOBALS['_GEN_commun']['info_application']->application = $_REQUEST['appli']; |
} |
define('HB_ARGUMENT_APPLI', $GLOBALS['_GEN_commun']['info_application']->application); |
// +------------------------------------------------------------------------------------------------------+ |
// Définition des chemins de fichiers. |
/** Constante stockant le chemin du dossier contenant l'API partagée.*/ |
define('HB_CHEMIN_API', GEN_CHEMIN_API); |
/** Constante stockant le chemin du dossier contenant l'API Débogage.*/ |
define('HB_CHEMIN_API_DEBOGAGE', HB_CHEMIN_API.'debogage'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant l'API Fragmenteur.*/ |
define('HB_CHEMIN_API_FRAGMENTEUR', HB_CHEMIN_API.'fragmenteur'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant l'API Formulaire.*/ |
define('HB_CHEMIN_API_FORMULAIRE', HB_CHEMIN_API.'formulaire'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant l'API Date.*/ |
define('HB_CHEMIN_API_FORM', HB_CHEMIN_API.'formulaire'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant l'API Date.*/ |
define('HB_CHEMIN_API_DATE', HB_CHEMIN_API.'date'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant l'API Fragmenteur.*/ |
define('HB_CHEMIN_API_VOIRAUSSI', HB_CHEMIN_API.'voiraussi'.GEN_SEP); |
/** Constante stockant le chemin du dossier racine de l'application.*/ |
define('HB_CHEMIN_RACINE', GEN_CHEMIN_CLIENT.'herbier'.GEN_SEP); |
/** Constante stockant le chemin du dossier de configuration générale.*/ |
define('HB_CHEMIN_CONFIG', HB_CHEMIN_RACINE.'configuration'.GEN_SEP); |
/** Constante stockant le chemin absolu du dossier racine de l'application.*/ |
define('HB_CHEMIN_ABSO_RACINE', PAP_CHEMIN_RACINE.GEN_CHEMIN_CLIENT.'herbier'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant les applications spécifiques de Herbier.*/ |
define('HB_CHEMIN_APPLI', HB_CHEMIN_RACINE.'applications'.GEN_SEP); |
/** Constante stockant le chemin absolu du dossier contenant les applications spécifiques de Herbier.*/ |
define('HB_CHEMIN_ABSO_APPLI', HB_CHEMIN_ABSO_RACINE.'applications'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant les traductions générales.*/ |
define('HB_CHEMIN_LANGUES', HB_CHEMIN_RACINE.'langues'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant la présentation générale.*/ |
define('HB_CHEMIN_PRESENTATION', HB_CHEMIN_RACINE.'presentations'.GEN_SEP); |
/** Constante stockant le chemin absolu du dossier contenant la présentation générale.*/ |
define('HB_CHEMIN_ABSO_PRESENTATION', HB_CHEMIN_ABSO_RACINE.'presentations'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant les images de Herbier.*/ |
define('HB_CHEMIN_IMAGES', HB_CHEMIN_PRESENTATION.'images'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant les styles de Herbier.*/ |
define('HB_CHEMIN_STYLES', HB_CHEMIN_PRESENTATION.'styles'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant les scripts côté client de Herbier.*/ |
define('HB_CHEMIN_SCRIPTS', HB_CHEMIN_PRESENTATION.'scripts'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant la bibliothèque de code générale.*/ |
define('HB_CHEMIN_BIBLIO', HB_CHEMIN_RACINE.'bibliotheque'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant les documents de Herbier.*/ |
define('HB_CHEMIN_DOC', HB_CHEMIN_PRESENTATION.'documents'.GEN_SEP); |
/** Constante stockant le chemin absolu du dossier contenant les documents de Herbier.*/ |
define('HB_CHEMIN_ABSO_DOC', HB_CHEMIN_ABSO_PRESENTATION.'documents'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant la bibliothèque de Cartographie.*/ |
define('HB_CHEMIN_BIBLIO_CARTO', HB_CHEMIN_BIBLIO.'cartographie'.GEN_SEP); |
/** Constante stockant le chemin du dossier contenant les cartes de la bibliothèque de Cartographie.*/ |
define('HB_CHEMIN_CARTE', HB_CHEMIN_BIBLIO_CARTO.'cartes'.GEN_SEP); |
// +------------------------------------------------------------------------------------------------------+ |
// Définition de chemin d'accès et de nom de fichier pour la Cartographie |
/** Constante stockant le chemin d'accès et le nom du fichier récupérant l'image de la carte et la renvoyant au client.*/ |
define('CAR_CHEMIN_CARTE', HB_CHEMIN_BIBLIO_CARTO.'carto.php?session='.session_name()); |
/** Constante stockant le chemin d'accès au dossier stockant les cartes temporaires générées par la carto.*/ |
define('CAR_CHEMIN_TMP', HB_CHEMIN_ABSO_DOC.'cartes_tmp'.GEN_SEP); |
/** Constante stockant le nom du fichier de la carte de France des départements.*/ |
define('CAR_FICHIER_CARTE_FR_DPT', 'france.png'); |
/** Constante stockant le nom du fichier de la carte de France des départements.*/ |
define('CAR_FICHIER_CARTE_FR_DPT_MASQUE', 'france_masque.png'); |
// +------------------------------------------------------------------------------------------------------+ |
// Définition des chemins d'accès aux images. |
/** Constante stockant le chemin d'accès au fichier ouvrir.png de Herbier.*/ |
define('HB_IMG_OUVRIR', HB_CHEMIN_IMAGES.'ouvrir.png'); |
/** Constante stockant le chemin d'accès au fichier fermer.png de Herbier.*/ |
define('HB_IMG_FERMER', HB_CHEMIN_IMAGES.'fermer.png'); |
/** Constante stockant le chemin d'accès au fichier arobrescence_trai.png de Herbier.*/ |
define('HB_IMG_ARBO', HB_CHEMIN_IMAGES.'arborescence_trait.png'); |
/** Constante stockant le chemin d'accès au fichier arobrescence_trai_fin.png de Herbier.*/ |
define('HB_IMG_ARBO_FIN', HB_CHEMIN_IMAGES.'arborescence_trait_fin.png'); |
/** Constante stockant le nom de la classe générique des icones de Herbier.*/ |
define('HB_CLASS_IMG_ICONE', 'hb_img_icone'); |
/** Constante stockant le nom de la classe générique de l'image fermer.png de Herbier.*/ |
define('HB_CLASS_IMG_FERMER', 'hb_img_fermer'); |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// ATTENTION : reprise directe des variables de conf de BiblioBota version 0.0 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/04/06 13:28:51 jpm |
* Ajout des constantes de configuration. |
* |
* Revision 1.2 2005/03/09 15:58:00 jpm |
* Ajout et modification de constantes. |
* |
* Revision 1.1 2005/03/08 14:13:59 jpm |
* Ajout des fichiers de configuration de Herbier. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/configuration/hb_config_url.inc.php |
---|
New file |
0,0 → 1,101 |
<?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. | |
// | | |
// | 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_config_url.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Configuration générale des url des applications de Biblio Bota |
* |
* Ce fichier permet de stocker les valeurs concernant les url communes aux différentes applications |
* constituant Herbier. |
* |
*@package Herbier |
*@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 | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// Définition des URL |
// Redéfini le séparateur utilisé lorsque PHP génère des URLs pour séparer les arguments. |
//ini_set('arg_separator.output', '&');// Déjà défini dans Papyrus |
/** Constante stockant l'url de base de l'application.*/ |
define('HB_URL_COURANTE', $GLOBALS['_GEN_commun']['url']->getUrl()); |
/** Constante stockant l'url de base et un argument appelant l'application hb_admin de Herbier.*/ |
define('HB_URL_COURANTE_ADMIN', HB_URL_COURANTE.'&appli=hb_admin'); |
/** Constante stockant l'url de base et un argument appelant l'application hb_admin de Herbier avec l'action configurable.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION', HB_URL_COURANTE_ADMIN.'&action=%s'); |
/** Constante stockant l'url de base et un argument appelant l'application hb_admin de Herbier avec la lettre configurable.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_LETTRE', HB_URL_COURANTE_ADMIN_ACTION.'&lettre=%s'); |
/** Constante stockant l'url de base et un argument appelant l'application hb_admin de Herbier pour une organisation donnée.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_ORGANISATION', HB_URL_COURANTE_ADMIN_ACTION.'&id_org=%s'); |
/** Constante stockant l'url de base et un argument appelant l'application hb_admin de Herbier pour un équipier donné.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_ORG_EQUIPE', HB_URL_COURANTE_ADMIN_ACTION_ORGANISATION.'&id_equipe=%s'); |
/** Constante stockant l'url de base et des arguments appelant l'application hb_admin de Herbier pour une collection donnée.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_ORG_COLL', HB_URL_COURANTE_ADMIN_ACTION_ORGANISATION.'&id_coll=%s'); |
/** Constante stockant l'url de base et des arguments appelant l'application hb_admin de Herbier pour une note donnée.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_ORG_COLL_NOTE', HB_URL_COURANTE_ADMIN_ACTION_ORG_COLL.'&id_note=%s'); |
/** Constante stockant l'url de base et des arguments appelant l'application hb_admin de Herbier pour une note donnée.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_ORG_NOTE', HB_URL_COURANTE_ADMIN_ACTION_ORGANISATION.'&id_note=%s'); |
/** Constante stockant l'url de base et un argument appelant l'application hb_admin de Herbier avec l'action configurable.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_UTILISATEUR', HB_URL_COURANTE_ADMIN_ACTION.'&id_utilisateur=%s'); |
/** Constante stockant l'url de base et un argument appelant l'application hb_admin de Herbier pour un correspondant précis.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_COR', HB_URL_COURANTE_ADMIN_ACTION.'&id_cor=%s#hba_correspondant_%s'); |
/** Constante stockant l'url de base et un argument appelant l'application hb_admin de Herbier pour un rédacteur précis.*/ |
define('HB_URL_COURANTE_ADMIN_ACTION_RED', HB_URL_COURANTE_ADMIN_ACTION.'&id_red=%s'); |
/** Constante stockant l'url de base et un argument appelant l'application hb_consultation de Herbier.*/ |
define('HB_URL_COURANTE_CONSULTATION', HB_URL_COURANTE.'&appli=hb_consultation'); |
/** Constante stockant l'url de base et un argument appelant la consulation d'une fiche herbier |
* de l'application hb_moteur de Herbier.*/ |
define('HB_URL_COURANTE_CONSULTATION_FICHE_HERBIER', HB_URL_COURANTE_CONSULTATION.'&consultation=herbier'); |
/** Constante stockant l'url de base et un argument appelant la consulation d'une fiche herbier précise |
* de l'application hb_moteur de Herbier.*/ |
define('HB_URL_COURANTE_CONSULTATION_FICHE_HERBIER_ID', HB_URL_COURANTE_CONSULTATION_FICHE_HERBIER.'&id_org=%s'); |
/** Constante stockant l'url de base et un argument appelant la consulation d'une fiche collection |
* de l'application hb_moteur de Herbier.*/ |
define('HB_URL_COURANTE_CONSULTATION_FICHE_COLECTION', HB_URL_COURANTE_CONSULTATION.'&consultation=collection'); |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/04/06 13:28:51 jpm |
* Ajout des constantes de configuration. |
* |
* Revision 1.2 2005/03/09 15:58:00 jpm |
* Ajout et modification de constantes. |
* |
* Revision 1.1 2005/03/08 14:13:59 jpm |
* Ajout des fichiers de configuration de Herbier. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/configuration/hb_config_bdd.inc.php |
---|
New file |
0,0 → 1,103 |
<?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. | |
// | | |
// | 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_config_bdd.inc.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Configuration de la base de données Herbier |
* |
* Fichier contenant les constantes permettant de se connecter à la base de données de Herbier. |
* |
*@package Herbier |
*@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 | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// Paramétrage de la base de données. |
/** Constante stockant le protocole de la base de données.*/ |
define('HB_BDD_PROTOCOLE', 'mysql'); |
/** Constante stockant le nom du serveur de bases de données.*/ |
define('HB_BDD_SERVEUR', 'localhost'); |
/** Constante stockant le nom de l'utilisateur de la base de données.*/ |
define('HB_BDD_UTILISATEUR', ''); |
/** Constante stockant le mot de passse de l'utilisateur de la base de données.*/ |
define('HB_BDD_MOT_DE_PASSE', ''); |
/** Constante stockant le nom de la base de données par défaut pour les Herbiers.*/ |
define('HB_BDD_NOM', ''); |
/** Constante stockant le nom de la base de données où se trouvent les tables pour la Cartographie.*/ |
define('HB_BDD_NOM_CARTO', ''); |
/** Constante stockant le nom de la base de données où se trouvent les tables pour l'annuaire.*/ |
define('HB_BDD_NOM_ANNUAIRE', ''); |
// +------------------------------------------------------------------------------------------------------+ |
// Paramétrage de la valeur du DSN pour Pear DB. |
/** Constante stockant le DSN permetant de se connecter à la base de données de Biblio Bota.*/ |
define('HB_DSN', HB_BDD_PROTOCOLE.'://'.HB_BDD_UTILISATEUR.':'.HB_BDD_MOT_DE_PASSE.'@'.HB_BDD_SERVEUR.'/'.HB_BDD_NOM); |
// +------------------------------------------------------------------------------------------------------+ |
// Base de données |
/** Constante stockant le nom de la table Annuaire.*/ |
define('HB_BDD_TAB_ANNUAIRE', HB_BDD_NOM_ANNUAIRE.'.annuaire_tela'); |
/** Constante stockant le nom du champ identifiant de la table Annuaire.*/ |
define('HB_BDD_TAB_ANNUAIRE_CHP_ID', 'U_ID'); |
/** Constante stockant le nom du champ prénom de la table Annuaire.*/ |
define('HB_BDD_TAB_ANNUAIRE_CHP_PRENOM', 'U_SURNAME'); |
/** Constante stockant le nom du champ prénom de la table Annuaire.*/ |
define('HB_BDD_TAB_ANNUAIRE_CHP_NOM', 'U_NAME'); |
/** Constante stockant le nom du champ e-mail de la table Annuaire.*/ |
define('HB_BDD_TAB_ANNUAIRE_CHP_MAIL', 'U_MAIL'); |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/04/06 13:28:51 jpm |
* Ajout des constantes de configuration. |
* |
* Revision 1.2 2005/02/28 16:56:07 jpm |
* Ajout d'une constante de définition du nom d'une base de données. |
* |
* Revision 1.1 2005/02/24 11:14:37 jpm |
* Ajout du fichier de configuration de la base de données. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/herbier_moteur_recherche.php |
---|
New file |
0,0 → 1,74 |
<?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. | |
// | | |
// | 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: herbier_moteur_recherche.php,v 1.1 2005-11-23 10:32:32 jp_milcent Exp $ |
/** |
* Application Herbier variante Moteur de Recherche |
* |
* Cette application permet de recherche des collection botanique comprise dans la base de données |
* d'Herbier. |
* |
*@package Herbier |
//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 | |
// +------------------------------------------------------------------------------------------------------+ |
// Nous spécifions l'application à appeler. |
if (!isset($_REQUEST['appli'])) { |
$_REQUEST['appli'] = 'hb_consultation'; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** Inclusion du fichier principal de Herbier.*/ |
require_once 'herbier.php'; |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/03/08 14:17:19 jpm |
* Ajout des fichiers principaux. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |