Subversion Repositories Sites.tela-botanica.org

Compare Revisions

No changes between revisions

Ignore whitespace Rev 590 → Rev 608

/tags/v4.0/client/annuaire/langues/ann_langue_en.inc.php
New file
0,0 → 1,99
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: ann_langue_en.inc.php,v 1.1.1.1 2005/01/03 17:27:49 alex Exp $
/**
* Fichier de traduction en français de l'application inscription
*
* Fichier de traduction en français de l'application inscription
*
*@package vecam
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1.1.1 $ $Date: 2005/01/03 17:27:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
define ("ANN_NOM", "Name :") ;
define ("ANN_PRENOM", "First name") ;
define ("ANN_CP", "Zip Code") ;
define ("ANN_PAYS", "Country") ;
define ("ANN_LANGUES_PARLES", "Languages spoken :") ;
define ("ANN_EMAIL", "E-mail :") ;
define ("ANN_MOT_DE_PASSE", "Password:") ;
define ("ANN_REPETE_MOT_DE_PASSE", "Repeat the password :") ;
define ("ANN_RETABLIR", "Restore") ;
define ("ANN_VALIDER", "Validate") ;
define ("ANN_MOTS_DE_PASSE_DIFFERENTS", "The two passwords are different !") ;
define ("ANN_EMAIL_REQUIS", "You must enter your e-mail.") ;
define ("ANN_MOT_DE_PASSE_REQUIS", "You must enter your password.") ;
 
define ("ANN_MAIL_INCORRECT", "E-mail addresses must be in the following format, user@domain.ext") ;
define ("ANN_NOTE_REQUIS", "Indicate the required fields") ;
define ("ANN_MODIFIER_INSCRIPTION", "Modify your registration") ;
define ("ANN_SUPPRIMER_INSCRIPTION", "Cancel your registration") ;
define ("ANN_MESSAGE_BIENVENU", "You are registered at i-twinning ") ;
 
define ("ANN_CLIQUEZ_LETTRE", "Click on a letter to see the members ") ;
define ("ANN_LISTE_INSCRIT_LETTRE", "List of the newsletter's subscribers") ;
define ("ANN_TITRE", "I-twinning repertory") ;
define ("ANN_TEXTE_PERDU", "If you forgot your password, enter your e-mail address in the Login ".
"field below and click on \Validate\ ") ;
define ("ANN_CHECK_UNCHECK", "Tick the boxes to select your recipient or tick / untick all") ;
define ("ANN_ENVOYER_MAIL", "Send an e-mail") ;
define ("ANN_SUJET", "Subject") ;
define ("ANN_MESSAGE", "Message") ;
define ("ANN_ENVOYER", "Send") ;
define ("ANN_CLIC_CONFIRMATION", "Click on OK to confirm") ;
define ("ANN_PAS_D_INSCRIT", "No registered members") ;
 
// ========================= Labels pour les mails =============================
 
define ("ANN_VERIF_MAIL_COCHE", "Please tick at least one recipient for your mail.") ;
define ("ANN_VERIF_TITRE", "Your message must be composed of a title <i>et</i> and a content") ;
 
define ("ANN_PIED_MESSAGE", "\n---------------------------------------------------------------------------".
"\nThis message has been sent by".
"\n(http://www.vecam.org) VECAM, ".
"\nwhere you are currently registered.".
"\nOther members may also have received this message.") ;
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: ann_langue_en.inc.php,v $
* Revision 1.1.1.1 2005/01/03 17:27:49 alex
* Import initial
*
* Revision 1.1 2005/01/03 17:19:32 alex
* version initiale
*
* Revision 1.1 2004/06/30 08:50:01 alex
* traduction
*
* Revision 1.1 2004/06/18 08:45:45 alex
* version initiale
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/v4.0/client/annuaire/langues/ann_langue_pt.inc.php
New file
0,0 → 1,101
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: ann_langue_pt.inc.php,v 1.1.1.1 2005/01/03 17:27:49 alex Exp $
/**
* Fichier de traduction en français de l'application inscription
*
* Fichier de traduction en français de l'application inscription
*
*@package vecam
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1.1.1 $ $Date: 2005/01/03 17:27:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
define ("ANN_NOM", "Name :") ;
define ("ANN_PRENOM", "First name") ;
define ("ANN_PAYS", "Country:") ;
define ("ANN_LANGUES_PARLES", "Languages spoken :") ;
define ("ANN_EMAIL", "E-mail :") ;
define ("ANN_MOT_DE_PASSE", "Password:") ;
define ("ANN_REPETE_MOT_DE_PASSE", "Repeat the password :") ;
define ("ANN_RETABLIR", "Restore") ;
define ("ANN_VALIDER", "Validate") ;
define ("ANN_MOTS_DE_PASSE_DIFFERENTS", "The two passwords are different !") ;
define ("ANN_EMAIL_REQUIS", "You must enter your e-mail.") ;
define ("ANN_MOT_DE_PASSE_REQUIS", "You must enter your password.") ;
 
define ("ANN_MAIL_INCORRECT", "E-mail addresses must be in the following format, user@domain.ext") ;
define ("ANN_NOTE_REQUIS", "Indicate the required fields") ;
define ("ANN_MODIFIER_INSCRIPTION", "Modify your registration") ;
define ("ANN_SUPPRIMER_INSCRIPTION", "Cancel your registration") ;
define ("ANN_MESSAGE_BIENVENU", "You are registered at i-twinning ") ;
 
define ("ANN_CLIQUEZ_LETTRE", "Click on a letter to see the members ") ;
define ("ANN_LISTE_INSCRIT_LETTRE", "List of the newsletter's subscribers") ;
define ("ANN_TITRE", "I-twinning repertory") ;
define ("ANN_TEXTE_PERDU", "If you forgot your password, enter your e-mail address in the Login ".
"field below and click on \Validate\ ") ;
define ("ANN_CHECK_UNCHECK", "Tick the boxes to select your recipient or tick / untick all") ;
define ("ANN_ENVOYER_MAIL", "Send an e-mail") ;
define ("ANN_SUJET", "Subject") ;
define ("ANN_MESSAGE", "Message") ;
define ("ANN_ENVOYER", "Send") ;
define ("ANN_CLIC_CONFIRMATION", "Click on OK to confirm") ;
define ("ANN_PAS_D_INSCRIT", "No registered members") ;
 
// ========================= Labels pour les mails =============================
 
define ("ANN_VERIF_MAIL_COCHE", "Please tick at least one recipient for your mail.") ;
define ("ANN_VERIF_TITRE", "Your message must be composed of a title <i>et</i> and a content") ;
 
define ("ANN_PIED_MESSAGE", "\n---------------------------------------------------------------------------".
"\nThis message has been sent by".
"\n(http://www.vecam.org) VECAM, ".
"\nwhere you are currently registered.".
"\nOther members may also have received this message.") ;
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: ann_langue_pt.inc.php,v $
* Revision 1.1.1.1 2005/01/03 17:27:49 alex
* Import initial
*
* Revision 1.1 2005/01/03 17:19:32 alex
* version initiale
*
* Revision 1.1 2004/09/14 11:54:49 alex
* version initiale
*
* Revision 1.1 2004/06/30 08:50:01 alex
* traduction
*
* Revision 1.1 2004/06/18 08:45:45 alex
* version initiale
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/tags/v4.0/client/annuaire/langues/ann_langue_es.inc.php
New file
0,0 → 1,77
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: ann_langue_es.inc.php,v 1.1.1.1 2005/01/03 17:27:49 alex Exp $
/**
* Fichier de traduction en français de l'application inscription
*
* Fichier de traduction en français de l'application inscription
*
*@package vecam
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1.1.1 $ $Date: 2005/01/03 17:27:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
define ("ANN_NOM", "pellido") ;
define ("ANN_PRENOM", "Nombre") ;
define ("ANN_PAYS", "Pais") ;
define ("ANN_LANGUES_PARLES", "Idiomas hablados") ;
define ("ANN_EMAIL", "Correo electronico") ;
define ("ANN_MOT_DE_PASSE", "Contraseña") ;
define ("ANN_REPETE_MOT_DE_PASSE", "Repetir la contraseñas") ;
define ("ANN_RETABLIR", "Restablecer") ;
define ("ANN_VALIDER", "Ingresar") ;
define ("ANN_MOTS_DE_PASSE_DIFFERENTS", "Las contraseñas son diferentes!") ;
define ("ANN_EMAIL_REQUIS", "Debe ingresar un correo electronico") ;
define ("ANN_MOT_DE_PASSE_REQUIS", "Debe ingresar una contraseña.") ;
define ("ANN_MAIL_INCORRECT", "El correo electronico debe tener una forma correcta, utilisador@domaine.ext") ;
define ("ANN_NOTE_REQUIS", "Indique los espacios requeridos") ;
define ("ANN_MODIFIER_INSCRIPTION", "Modificar su inscripcion") ;
define ("ANN_SUPPRIMER_INSCRIPTION", "Cancelar su inscripcion") ;
define ("ANN_MESSAGE_BIENVENU", "Esta inscrito en I-Enlace") ;
define ("ANN_CLIQUEZ_LETTRE", "Haga clic en una letra para ver los miembros.") ;
define ("ANN_LISTE_INSCRIT_LETTRE", "Lista de los inscritos en la carta") ;
define ("ANN_TITRE", "Guia de I-Enlace") ;
define ("ANN_TEXTE_PERDU", "Si ha perdido su contraseña, indique su correo electronico en el espaciologin y haga clic en Ingresar") ;
define ("ANN_CHECK_UNCHECK", "Marcar en la casilla para seleccionar su destinatario o marcar/quitar todo") ;
define ("ANN_ENVOYER_MAIL", "Enviar un correo electronico") ;
define ("ANN_SUJET", "Objet") ;
define ("ANN_MESSAGE", "Mensaje") ;
define ("ANN_ENVOYER", "Enviar") ;
define ("ANN_CLIC_CONFIRMATION", "Haga clic en OK para confirmar") ;
define ("ANN_PAS_D_INSCRIT", "Ninguninscrito") ;
//======================== labels pour les mails===========================
define ("ANN_VERIF_MAIL_COCHE", "Marque al menos un destinatario para su correo electronico") ;
define ("ANN_VERIF_TITRE", "Su mensaje debe tener un titulo y un cuerpo") ;
 
define ("ANN_PIED_MESSAGE", "\n---------------------------------------------------------------------------".
"\nCe message vous est envoyé par l'intermédiaire du site Internet".
"\n(http://www.vecam.org) de VECAM, ".
"\nauquel vous êtes inscrit.".
"\nD'autres inscrits au réseau peuvent avoir reçu ce message.".
"\nNe répondez que si vous êtes concerné, ou si vous avez des".
"\ninformations utiles à transmettre au demandeur." ) ;
?>
/tags/v4.0/client/annuaire/langues/ann_langue_fr.inc.php
New file
0,0 → 1,133
<?php
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
/**
* Fichier de traduction en français de l'application inscription
*
* Fichier de traduction en français de l'application inscription
*
*@package vecam
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Id$
// +------------------------------------------------------------------------------------------------------+
*/
 
define ('ANN_NOM', 'Nom') ;
define ('ANN_PRENOM', 'Pr&eacute;nom') ;
define ('ANN_CP', 'Code Postal') ;
define ('ANN_PAYS', 'Pays') ;
define ('ANN_LANGUES_PARLES', 'Langues parl&eacute;s :') ;
define ('ANN_EMAIL', 'E-mail :') ;
define ('ANN_MOT_DE_PASSE', 'Mot de passe :') ;
define ('ANN_REPETE_MOT_DE_PASSE', 'R&eacute;p&eacute;ter le mot de passe :') ;
define ('ANN_RETABLIR', 'Rétablir') ;
define ('ANN_VALIDER', 'Valider') ;
define ('ANN_MOTS_DE_PASSE_DIFFERENTS', 'Les mots de passe sont diff&eacute;rents !') ;
define ('ANN_EMAIL_REQUIS', 'Vous devez saisir un email.') ;
define ('ANN_MOT_DE_PASSE_REQUIS', 'Vous devez saisir un mot de passe.') ;
define ('ANN_MAIL_INCORRECT', 'L\'email doit avoir une forme correcte, utilisateur@domaine.ext') ;
define ('ANN_NOTE_REQUIS', 'Indique les champs requis') ;
define ('ANN_MODIFIER_INSCRIPTION', 'Modifier votre inscription') ;
define ('ANN_SUPPRIMER_INSCRIPTION', 'Supprimer votre inscription') ;
define ('ANN_MESSAGE_BIENVENU', 'Vous &ecirc;tes inscrit &agrave; I-Jumelage') ;
define ('ANN_CLIQUEZ_LETTRE', 'Cliquez sur une lettre pour voir les inscrits.') ;
define ('ANN_LISTE_INSCRIT_LETTRE', 'Liste des inscrits &agrave; la lettre') ;
define ('ANN_TITRE', 'Annuaire du réseau') ;
define ('ANN_IDENTIFICATION_PRESENTATION_XHTML',
'<h2>S\'identifier et s\'inscrire</h2>
<p>Afin de pouvoir consulter l\'annuaire, il est indispensable de s\'inscrire.<br />
L\'inscription est libre et gratuite !<br />
Elle vous permet de :</p>
<ul>
<li>consulter l\'annuaire des personnes inscrites et pouvoir ainsi échanger des informations ;</li>
<li>accéder à certaines informations diffusées sur le site ;</li>
<li>recevoir une lettre électronique d\'informations.</li>
<li>saisir des fiches pour nous informer ;</li>
</ul>
<p>Par la suite, il vous sera possible de modifier voire annuler votre inscription.<br />
Seuls vos prénom, nom, ville, commune et pays apparaîtrons dans l\'annuaire, les autres informations restent confidentielles (e-mail, adresse). </p>
<p>En application des articles 39 et suivants de la loi du 6 janvier 1978 modifiée, vous bénéficiez d\'un droit d\'accès
et de rectification aux informations qui vous concernent.</p>
<p><strong>L\'inscription à l\'annuaire du site de Tela Botanica implique que vous soyez d\'accord pour que votre nom, prénom, ville,
code postal et pays apparaissent en clair dans le site Internet de Tela Botanica</strong>.</p>
 
<p>Si vous avez perdu votre mot de passe, veuillez cliquez sur le lien suivant : <a href="http://www.tela-botanica.org/page:inscription?action=mdp_oubli">perte de mot de passe</a></p>
<p>Déjà inscrit, identifiez-vous pour accéder à votre fiche personnelle :</p>');
define ('ANN_TEXTE_PERDU', 'Si vous avez perdu votre mot de passe, indiquer '.
'votre adresse email dans le champs login ci-dessus et cliquez sur "Valider"') ;
define ('ANN_CHECK_UNCHECK', 'Cocher les cases pour s&eacute;lectionner votre destinataire ou cocher / d&eacute;cocher tout') ;
define ('ANN_ENVOYER_MAIL', 'Envoyer un email') ;
define ('ANN_MESSAGE_A_TOUS', 'Si votre message concerne une actualit&eacute; botanique (expo, sortie, stage, nouvel ouvrage, emploi,...) vous pouvez le diffuser &agrave; l\'ensemble des membres du r&eacute;seau : voir la page <a href="http://www.tela-botanica.org/actu/article220.html">comment proposer des informations</a>.');
define ('ANN_ACTUALITE', 'les actualités de Tela Botanica');
define ('ANN_SURVEILLANCE', '<strong>Avertissement :</strong> la messagerie ci-dessous est destinée à vous permettre d\'échanger ' .
'des messages entre inscrit au site de Tela Botanica, sans dévoiler les adresses email des inscrits. Afin de respecter la ' .
'tranquillité de chacun, il est strictement interdit d\'utiliser cette messagerie interne pour faire des relances périodiques ' .
'd\'informations ou des annonces publicitaires et commerciales. Une surveillance du contenu des mails échangés est effectuée ' .
'par Tela Botanica. Merci de votre compréhension.') ;
define ('ANN_SUJET', 'Sujet') ;
define ('ANN_MESSAGE', 'Message') ;
define ('ANN_ENVOYER', 'Envoyer') ;
define ('ANN_CLIC_CONFIRMATION', 'Cliquez sur OK pour confirmer') ;
define ('ANN_PAS_D_INSCRIT', 'Pas d\'inscrit') ;
define ('ANN_MAIL_ENVOYER', 'Votre mail a été envoyé') ;
define ('ANN_DATE_INS', 'Date d\'inscription') ;
define ('ANN_VILLE', 'Ville') ;
define ('ANN_PIED_INFO', 'Si vous constatez des problèmes en utilisant cette application, veuillez contacter : ') ;
define ('ANN_PIED_MAIL', 'webmestre@tela-botanica.org') ;
define ('ANN_TITRE_MAIL_MODERATION', 'Un nouveau message aux adhérents est en attente de modération') ;
define ('ANN_EXPEDITEUR_ORIGINAL', 'vous a envoyé un message par l\'intermédiaire du site Internet (http://www.tela-botanica.org) du Réseau Tela Botanica auquel vous êtes inscrit. D\'autres inscrits peuvent avoir reçu ce message. Ne répondez que si vous êtes concerné, ou si vous avez des informations utiles à transmettre au demandeur.') ;
define ('ANN_LISTE_DESTINATAIRES','aux destinataires suivants') ;
define ('ANN_CONTENU_MESSAGE','Contenu du message') ;
define ('ANN_TITRE_MAIL','Sujet du message') ;
 
// ========================= Labels pour les mails ============================
 
define ('ANN_VERIF_MAIL_COCHE', 'Veuillez cocher au moins un destinataire pour votre mail' );
define ('ANN_VERIF_TITRE', 'Votre message doit comporter un titre <i>et</i> un corps') ;
define ('ANN_MESSAGE_APPLI', 'Application ANNUAIRE');
define ('ANN_MESSAGE_ENVOYE_A', 'Ce message a été envoyé à ');
define ('ANN_MAIL_ATTENTE_MODERATION','Ce message a été envoyé au modérateur, il sera envoyé aux destinataires dès sa validation') ;
define ("ANN_PIED_MESSAGE", "\n---------------------------------------------------------------------------".
"\nCe message vous est envoyé par l'intermédiaire du site Internet".
"\n(http://www.tela-botanica.org) de Tela Botanica, ".
"\nauquel vous êtes inscrit.".
"\nD'autres inscrits au réseau peuvent avoir reçu ce message.".
"\nNe répondez que si vous êtes concerné, ou si vous avez des".
"\ninformations utiles à transmettre au demandeur." ) ;
 
 
// ============================ Label de lannuaire Back ===========================
define ('AM_L_TITRE', 'Chercher un adhérent') ;
define ('AM_L_RECHERCHER', 'Rechercher') ;
define ('AM_L_PAYS', 'Pays') ;
define ('AM_L_NOM', 'Nom') ;
define ('AM_L_PRENOM', 'Prénom') ;
define ('AM_L_VILLE', 'Ville') ;
define ('AM_L_DEPARTEMENT', 'Département') ;
define ('AM_L_MAIL', 'Mail') ;
define ('AM_L_COTISANTS', 'Cotisants') ;
define ('AM_L_GRP_RES', 'Grouper les résultats') ;
define ('AM_L_TOUS', 'Tous') ;
define ('AM_L_MAIL_SELECTION', 'Envoyer un mail à la sélection') ;
?>
/tags/v4.0/client/annuaire/admin_annu.php
New file
0,0 → 1,576
<?php
 
// +--------------------------------------------------------------------------------+
// | admin_annu.php |
// +--------------------------------------------------------------------------------+
// | Copyright (c) 2002 |
// +--------------------------------------------------------------------------------+
// | Administration des inscrits à un annuaire de type annuaire_tela |
// | de Gsite, |
// | Sont également mises en jeux les tables gen_COUNTRY, gen_FRENCH_DPT, |
// | LABELS |
// | Plus spécifique la fonction cotisation($id) en bas permet de |
// | gérer les cotisations versées par les inscrits, avec la table |
// | annuaire_COTISATION |
// +--------------------------------------------------------------------------------+
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> |
// +--------------------------------------------------------------------------------+
//
// $Id: admin_annu.php,v 1.1 2005/03/24 08:47:31 alex Exp $
 
 
define ("URL_RECU", $GLOBALS['ann_url']->protocol. '://'.$GLOBALS['ann_url']->host."/client/annuaire/voir_recu_pdf.php") ;
 
include_once ("HTML/Table.php") ;
include_once 'api/formulaire/FORM_formulaire.class.php' ;
 
// admin_annu est une application cliente de gsite elle commence donc
// dans une fonction putFrame()
 
 
function putFrame()
{
global $u_id, $cotisation_id ;
global $action ;
 
if (empty($action)) $action = false ;
 
$url = $GLOBALS['ann_url']->getURL() ;
 
// mise à jour si il y lieu
 
if ($action == "up") {
$res .= upSQL() ;
}
 
// Requete de pour récupérer toutes les infos d'un usager
 
$query = "select annuaire_tela.*,annuaire_LABEL_ACT.*,annuaire_LABEL_ASS.*,gen_COUNTRY.GC_NAME" ;
$query .= ", annuaire_LABEL_NIV.*" ;
$query .= " from annuaire_tela,gen_COUNTRY,gen_FRENCH_DPT," ;
$query .= " annuaire_LABEL_ACT,annuaire_LABEL_ASS, annuaire_LABEL_NIV" ;
$query .= " where U_ID=$u_id" ;
//$query .= " and annuaire_tela.U_FRENCH_DPT=gen_FRENCH_DPT.GFD_ID" ;
$query .= " and annuaire_tela.U_COUNTRY=gen_COUNTRY.GC_ID" ;
$query .= " and annuaire_tela.U_ACT=annuaire_LABEL_ACT.ID_LABEL_ACT" ;
$query .= " and annuaire_tela.U_ASS=annuaire_LABEL_ASS.ID_LABEL_ASS" ;
$query .= " and annuaire_tela.U_NIV=annuaire_LABEL_NIV.ID_LABEL_NIV" ;
 
$resultat = $GLOBALS['ann_db']->query($query) ;
if (DB::isError($resultat)) {
return $resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'.$query ;
}
$row = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
 
$lettre = 'non' ;
if($row->U_LETTRE == 1) {
$lettre = 'oui' ;
}
 
$res = "<h1>Edition d'un adh&eacute;rent : $row->U_NAME $row->U_SURNAME</h1>\n" ;
$res .= "<div>".form("Nom : ", "U_NAME", $row->U_NAME)."</div>\n" ;
$res .= "<div>".form("Pr&eacute;nom : ", "U_SURNAME", $row->U_SURNAME)."</div>\n" ;
$res .= "<div>".form("Adresse mail : ", "U_MAIL", $row->U_MAIL)."</div>\n" ;
$res .= "<div>".form("Date d'inscription : ", "U_DATE", $row->U_DATE)."</div>\n" ;
$res .= "<div>".form("Adresse 1 : ", "U_ADDR1", $row->U_ADDR1)."</div>\n" ;
$res .= "<div>".form("Adresse 2 : ", "U_ADDR2", $row->U_ADDR2)."</div>\n" ;
$res .= "<div>".form("Région : ", "U_STATE", $row->U_STATE)."</div>\n" ;
$res .= "<div>".form("Code postal : ", "U_ZIP_CODE", $row->U_ZIP_CODE)."</div>\n" ;
$res .= "<div>".form("Ville : ", "U_CITY", $row->U_CITY)."</div>\n" ;
$res .= "<div>".form("Pays : ", "U_COUNTRY", $row->U_COUNTRY)."</div>\n" ;
$res .= "<div>".form("Site web personnel : ", "U_WEB", $row->U_WEB)."</div>\n" ;
$res .= "<div>".form("Inscrit à la lettre d'actualit&eacute;s : ", "U_LETTRE", $lettre)."</div>\n" ;
$res .= "<div>".form("Organisme : ", "U_TITLE", $row->U_TITLE)."</div>\n" ;
$res .= "<div>".form("Fonction : ", "U_FONCTION", $row->U_FONCTION)."</div>\n" ;
$res .= "<div>".form("Niveau en botanique : ", "LABEL_NIV", $row->LABEL_NIV)."</div>\n" ;
$res .= "<div>".form("Activit&eacute; : ", "LABEL_ACT", $row->LABEL_ACT)."</div>\n" ;
$res .= "<div>".form("Secteur associatif : ", "LABEL_ASS", $row->LABEL_ASS)."</div>\n" ;
$res .= "<div>".form("Sp&eacute;cialit&eacute; : ", "U_SPE", $row->U_SPE)."</div>\n" ;
$res .= "<div>".form("Sp&eacute;cialit&eacute; g&eacute;ographique : ", "U_GEO", $row->U_GEO)."</div>\n" ;
 
if (isset($cotisation_id) && $cotisation_id != "") {
$db = & $GLOBALS['ann_db'];
include_once ANN_CHEMIN_APPLI."recu_pdf_corps.php" ;
// buffer est une propriété de la classe FPDF qui contient les données au format PDF.
// habituellement on ne l'utilise pas, on appelle $pdf->Output() qui envoie les
// entete HTTP du document généré
 
$pdf->Close() ;
$buf = $pdf->buffer;
 
// Inclusion des bibliothèques PEAR
 
include_once ('Mail.php');
include_once ('Mail/mime.php');
 
$file = 'Recu_Fiscal_Tela_Botanica.pdf';
$crlf = "\r\n";
$hdrs = array(
'From' => 'accueil@tela-botanica.org',
'Subject' => 'Reçu pour don à Tela Botanica'
);
 
$mime = new Mail_mime($crlf);
$text = "Bonjour !\n\n".
"Le Réseau Tela Botanica vous remercie du soutien financier que vous lui avez apporté. Votre contribution permettra au réseau :\n\n".
"- de continuer à encourager et accompagner des projets botaniques,\n".
"- de maintenir et d'améliorer nos services Internet dédiés à la botanique.\n\n".
"Vous trouverez en pièce jointe à ce message un document PDF contenant le reçu fiscal à imprimer".
" et à joindre à votre déclaration d'impôts. Si vous n'arrivez pas à imprimer ce document, veuillez".
" nous le signaler en répondant à ce mail et en indiquant votre nom et votre adresse postale. Nous vous".
" ferons parvenir le reçu imprimé à cette adresse.\n\n".
"Rappel : Votre contribution financière ne constitue pas une adhésion à l'Association Tela Botanica mais ".
"bien un soutien aux actions menées par le Réseau Tela Botanica.\n\n".
"Si ce n'est déjà fait, n'oubliez pas de vous inscrire au Réseau sur le site Internet, à l'adresse : ".
"http://www.tela-botanica.org (menu « Inscription», onglet « Inscription»), afin que vous puissiez :\n\n".
"- consulter l'annuaire des personnes inscrites au Réseau ;\n- localiser les membres du Réseau dans tous".
" les pays;\n- accédez à certaines données diffusées sur le site ;\n- vous inscrire à des projets ".
"botaniques ;\n- être informé personnellement des actualités du Réseau.\n\n".
"Bien cordialement,\n\n".
"Tela Botanica\nLe Réseau des Botanistes Francophones\n163, rue A. Broussonnet\n34090 Montpellier\n".
"Tél. : 04-67-52-41-22\naccueil@tela-botanica.org\nhttp://www.tela-botanica.org\n" ;
$mime->setTXTBody($text);
 
// On attache le document PDF grace à $buf, et en indiquant son type MIME
$mime->addAttachment($buf, 'application/pdf', $file, false, 'base64') ;
 
$body = $mime->get();
$hdrs = $mime->headers($hdrs);
 
$mail =& Mail::factory('mail');
$mail->send($ligne->U_MAIL, $hdrs, $body);
 
// On insere le numéro du reçu dans la table annuaire_COTISATION
@mysql_query("update annuaire_COTISATION set IC_RECU=$num_recu, IC_DATE_ENVOIE_RECU=NOW() where IC_ID=$cotisation_id") ;
 
// On incrémente le compteur de mail de 1
if (!$deja_envoye) {
$num_recu++ ;
mysql_query("update COMPTEUR_COTISATION set COMPTEUR=$num_recu ") ;
}
$res .= "<div>Le reçu a été envoyé</div>\n" ;
}
$res .= cotisation($u_id) ;
$res .= suppression($u_id) ;
return $res ;
}
 
 
// form construit soit un formulaire de type <input type="text" ...> et
// de nom $field_ et place un $label devant
// soit construit un lien vers un formulaire à partir du champs $field_
 
 
function form($label, $field_, $value)
{
global $u_id, $GS_GLOBAL, $field ;
 
$url = $GLOBALS['ann_url']->getURL() ;
 
if ($field != $field_) {
$res = "<b>$label</b>" ;
$res .= "<a href=\"$url&amp;field=$field_\">" ;
if ($field_ == 'LABEL_NIV' || $field_ == 'LABEL_ACT' || $field_== 'LABEL_ASS') {
$res .= $value ? $value : "(vide)";
} else if ($field_ == "U_COT") {
if ($value == 0) {
$res .= "non" ;
} else {
$res .= "oui" ;
}
} else {
$res .= $value ? $value : "(vide)";
}
$res .= "</a>\n" ;
}
if ($field == $field_) {
$res = "\n<form action=\"$url&amp;u_id=$u_id&amp;action=up&amp;field_=$field_\" method=\"post\">" ;
$res .= "<b>$label</b>\n" ;
switch ($field_) {
case "U_COUNTRY" :
$select_country = new form($GS_GLOBAL['link']) ;
$res .= ereg_replace("gen_COUNTRY", "U_COUNTRY", $select_country->selectFromTable("gen_COUNTRY", $value, "GC_ID", "GC_NAME")) ;
unset($select_country) ;
break ;
 
case "LABEL_NIV" :
$res .= getFormInsInfo($field_, $value) ;
break ;
 
case "LABEL_ASS" :
$res .= getFormInsInfo($field_, $value) ;
break ;
 
case "LABEL_ACT" :
$res .= getFormInsInfo($field_, $value) ;
break ;
 
case "LABEL_STATUT" :
$res .= getFormInsInfo($field_, $value) ;
break ;
 
case "U_COT" :
$res .= "<select class=\"insInputForm\" name=\"II_COT\">\n" ;
if ($value == 0) {
$check0 = " selected" ;
$check1 = "" ;
} else {
$check1 = " selected" ;
$check0 = "" ;
}
$res .= "<option value=\"0\"$check0>non</option>\n" ;
$res .= "<option value=\"1\"$check1>oui</option>\n" ;
$res .= "</select>\n" ;
break ;
 
default :
$res .= "<input type=\"text\" size=\"40\" name=\"$field_\" value=\"$value\">\n" ;
}
$res .= "<input type=\"submit\" value=\"valider\" class=\"texte_tb\">\n" ;
$res .= "</form>" ;
}
return $res ;
}
 
 
// upSQL met à jour la table annuaire_tela
 
function upSQL()
{
global $field_ ;
global $u_id ;
global $HTTP_POST_VARS ;
switch ($field_) {
case "LABEL_NIV" : $field_ = "U_NIV" ;
$id_field = "ID_LABEL_NIV";
break ;
case "LABEL_ACT" : $field_ = "U_ACT" ;
$id_field = "ID_LABEL_ACT";
break ;
case "LABEL_ASS" : $field_ = "U_ACT" ;
$id_field = "ID_LABEL_ASS";
break ;
default :$id_field = $field_ ;
}
 
// Recherche de l'ancien mail
$req_am = "select U_MAIL from annuaire_tela where U_ID = $u_id" ;
$res_am = mysql_query ($req_am);
if(!$res_am) {
$res .= "<br>Echec de la requete dans la table annuaire, l'identifiant de personnes est invalide : ".$u_id."<br />" ;
}
$ligne_am = mysql_fetch_object ($res_am) ;
$ancien_mail = $ligne_am->U_MAIL ;
 
$query = "update annuaire_tela set $field_=\"".$HTTP_POST_VARS[$id_field]."\" where U_ID = $u_id" ;
$res_update = mysql_query($query);
 
if(!$res_update) {
$res .= "<br>Echec de la requete de mise à jour de la table annuaire <br> du paramètre U_ID <br />
ancienne valeur : ".$u_id." nouvelle valeur : ".$HTTP_POST_VARS[$id_field]." <br />" ;
}
 
// Traitement du département
if ($field_ == "U_ZIP_CODE") {
if (preg_match("/^97|98[0-9]*/", $HTTP_POST_VARS['U_ZIP_CODE'])) {
$n_dpt = substr($HTTP_POST_VARS['U_ZIP_CODE'], 0, 3) ;
} else {
$n_dpt = substr($HTTP_POST_VARS['U_ZIP_CODE'], 0, 2) ;
}
mysql_query ("update annuaire_tela set U_FRENCH_DPT='$n_dpt' where U_ID='$u_id'") ;
}
 
// Traitement de l'adresse mail
 
 
if ($field_ == "U_MAIL") {
$requete = "update ins_STATS set IS_MAIL=\"".$HTTP_POST_VARS['U_MAIL']."\" where IS_MAIL=\"$ancien_mail\"" ;
mysql_query ($requete) ;
}
 
return "";
}
 
function getFormInsInfo($field, $value)
{
 
$query = "select * from annuaire_$field" ;
$id_field = "ID_$field" ;
$result = mysql_query($query) or die ("Echec de la requete sur ID_$field<br>".mysql_error()) ;
 
$res = "<select name=\"$id_field\" class=\"insInputForm\">\n" ;
$i = 0 ;
while ($row = mysql_fetch_object($result)) {
 
$res .= "<option value=\"".$row->$id_field."\"" ;
if ($value == $row->$field) $res .= " selected";
$res .= ">" ;
$res .= $row->$field ;
$res .= "</option>\n" ;
$i++ ;
}
$res .= "</select>\n" ;
return $res ;
}
 
// Fonction pour gérer les cotisations d'un inscrit, en
// fonction de son id ($u_id)
 
function cotisation($u_id)
{
global $action, $IC_MONTANT, $IC_DATE, $id_cot, $IC_MC_ID ;
 
$res = '' ;
// un peu de javascript pour la confirmation en cas de destruction
 
$outputText = "function confirmLink(theLink, theSqlQuery)
{
var is_confirmed = confirm(theSqlQuery);
return is_confirmed;
} " ;
 
// fonction gsite pour inclure la fonction Javascript
// au code html
 
GEN_stockerCodeScript($outputText) ;
 
$url = $GLOBALS['ann_url']->getURL() ;
 
// Ce qui suit sont le traitement des 3 actions ajouter, modifier, supprimer
// qui agissent sur la table annuaire_COTISATION
 
// l'action 'cu' consiste en l'insertion d'une ligne dans la table annuaire_COTISATION
 
if ($action == "cu") {
$date = preg_replace("/([0-9]+)-([0-9]+)-([0-9]+)/", "\\3\\2\\1", $IC_DATE) ;
$query = 'insert into annuaire_COTISATION values ("", '.$IC_MC_ID.', '.$u_id.', '.$date.',"'.$IC_MONTANT.'", 0, "0000-00-00")' ;
$resultat = $GLOBALS['ann_db']->query ($query) ;
if (DB::isError($resultat)) {
echo $resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'.$query ;
}
$GLOBALS['ann_db']->query("update annuaire_tela set U_COT=1 where U_ID=$u_id") ;
}
 
// l'action 'mu' permet de mettre à jour une ligne dans annuaire_COTISATION
 
if ($action == "mu") {
$date = preg_replace("/([0-9]+)-([0-9]+)-([0-9]+)/", "\\3-\\2-\\1", $IC_DATE) ;
$query = 'update annuaire_COTISATION set IC_DATE="'.$date.'", IC_MONTANT="'.$IC_MONTANT.'",
IC_MC_ID='.$IC_MC_ID.' where IC_ID='.$id_cot ;
$GLOBALS['ann_db']->query ($query) ;
if (DB::isError($resultat)) {
echo $resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'.$query ;
}
}
 
// l'action 'rm' retire une ligne de la table annuaire_COTISATION
 
if ($action == "rm") {
$query = "delete from annuaire_COTISATION where IC_ID=$id_cot" ;
$GLOBALS['ann_db']->query ($query) ;
if (DB::isError($resultat)) {
echo $resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'.$query ;
}
$GLOBALS['ann_db']->query("update annuaire_tela set U_COT=0 where U_ID=$u_id") ;
}
 
// Quoi qu'il arrive, on récupère les informations concernant
// les cotisations d'un inscrit et on les affiche sous forme de
// table HTML
 
$query = "select * from annuaire_COTISATION, MODE_COTISATION where IC_ANNU_ID=$u_id
and IC_MC_ID=MC_ID ORDER BY IC_DATE" ;
$result = $GLOBALS['ann_db']->query($query) ;
if (DB::isError($result)) {
return $result->getMessage().'<br />'.$result->getDebugInfo().'<br />'.$query;
}
$res = "<h1>Etat des cotisations : </h1>" ;
 
// formatage de la date
$date = date("d-m-Y") ;
 
 
// l'action 'sc' correspond à l'édition d'une ligne de la table
// annuaire_COTISATION. Si elle est présente on affiche un formulaire
// de modification
 
if ($action == "sc") {
 
$res .= "<div><form action=\"$url&action=cu\" method=\"post\"><b>Date : </b>" ;
$res .= "<input type=\"text\" size=\"9\" class=\"insInputForm\" name=\"IC_DATE\" value=\"";
$res .= $date ;
$res .= "\">\n" ;
$res .= "<b>Montant : </b><input type=\"text\" class=\"insInputForm\" size=\"5\" name=\"IC_MONTANT\" value=\"30\"> &euro;\n" ;
$res .= mode_paiement(0) ;
$res .= "<input type=\"submit\" value=\"Valider\" class=\"texte_tb\">\n" ;
$res .= "<input type=\"button\" value=\"Annuler\" class=\"texte_tb\" onclick=\"javascript:window.location.href='$url';\"></form>\n" ;
$res .= "</div>\n" ;
 
// si l'action 'sc' n'est pas active on affiche toutes les lignes
// de cotisation de l'inscrit
 
} else {
if ($result->numRows() != 0) {
$res .= "<div>" ;
$table = new HTML_Table(array("class" => "table_cadre")) ;
$table->addRow(array("Date", "Montant", "Mode", "modifier", "supprimer", "Voir le reçu", "Envoyer le reçu",
"Date d'envoie du reçu"),'', 'TH') ;
 
while ($row = $result->fetchRow(DB_FETCHMODE_OBJECT)) {
// Le reçu a t il été envoyé ?
if ($row->IC_RECU != 0) {
$message_envoye = $row->IC_DATE_ENVOIE_RECU ; ;
} else {
$message_envoye = "Reçu non envoyé";
}
if ($action != "mc" || $id_cot != $row->IC_ID) {
$table->addRow(array ($row->IC_DATE, $row->IC_MONTANT." <b>&euro;</b>", $row->MC_LABEL,
"<a href=\"$url&amp;action=mc&amp;id_cot=$row->IC_ID\">modifier</a>",
"<a href=\"$url&amp;action=rm&amp;id_cot=$row->IC_ID\"".
" onclick=\"javascript:return confirmLink(this, '&ecirc;tes-vous".
" s&ucirc;r de vouloir supprimer cette entr&eacute;e');\">supprimer</a>",
"<a href=\"".URL_RECU."?cotisation_id=$row->IC_ID\">Voir le reçu</a>",
"<a href=\"$url&cotisation_id=$row->IC_ID&action=er\">Envoyer le reçu</a>",
$message_envoye)) ;
} else {
// Recherche du mode de paiement
 
$table->addRow(array("<form action=\"$url&amp;action=mu&amp;id_cot=$row->IC_ID\" method=\"post\">\n".
"<input type=\"text\" size=\"9\" class=\"insInputForm\" name=\"IC_DATE\" value=\"".date ("j-m-Y", $row->IC_DATE)."\">",
"<input type=\"text\" size=\"5\" class=\"insInputForm\" name=\"IC_MONTANT\" value=\"$row->IC_MONTANT\"><b>&euro;</b>",
mode_paiement($row->IC_MC_ID),
"<input type=\"submit\" class=\"texte_tb\" value=\"valider\">".
"<input type=\"button\" value=\"Annuler\" class=\"texte_tb\" onclick=\"javascript:window.location.href='$url';\"></form>",
"&nbsp;")) ;
}
}
$table->altRowAttributes(1, array("class" => "ligne_paire"), array("class" => "ligne_impaire")) ;
$res .= $table->toHTML()."</div>\n" ;
unset($table) ;
} else {
$res .= "<div>non cotisant</div>\n" ;
}
$res .= "<div><input type=\"button\" class=\"texte_tb\" " ;
$res .= "value=\"Saisir une cotisation\" onclick=\"javascript:window.location.href='$url&action=sc';\"></div>\n" ;
}
 
return $res ;
}
 
function suppression($u_id) {
global $GS_GLOBAL, $action ;
 
// un peu de javascript pour la confirmation en cas de destruction
 
$outputText = "function confirmLink(theLink, theSqlQuery)
{
var is_confirmed = confirm(theSqlQuery);
return is_confirmed;
} " ;
 
// fonction gsite pour inclure la fonction Javascript
// au code html
 
GEN_stockerCodeScript($outputText) ;
 
$url = $GLOBALS['ann_url']->getURL() ;
 
$res = "<div>Supprimer l'inscription</div>\n" ;
$res .="<div><form action=\"$url&action=suppr_adh\" method=\"post\">\n" ;
$res .= "<input type=\"submit\" class=\"texte_tb\" value=\"Supprimer\" " ;
$res .= "onclick=\"javascript:return confirmLink(this, '&ecirc;tes-vous s&ucirc;r de vouloir supprimer cet adh&eacute;rent');\">\n" ;
$res .= "</form></div>\n" ;
 
if ($action=="suppr_adh") {
$requete_utilisateur = "select U_MAIL from annuaire_tela where U_ID=".$u_id ;
$resultat_utilisateur = mysql_query($requete_utilisateur);
 
if(!$resultat_utilisateur) {
$res .= "<br>Echec de la requete dans la table annuaire utilisateurs, l'identifiant de personne est invalide : ".$u_id."<br />" ;
}
$utilisateur = mysql_fetch_object($resultat_utilisateur) ;
$mail = $utilisateur->U_MAIL ;
mysql_free_result($resultat_utilisateur) ;
 
// vérifications
// 1. annu_ADMIN
$requete_annuaire_admin = "select ".ANNUAIRE_ADMIN_ID." from ".ANNUAIRE_ADMIN." where ".ANNUAIRE_ADMIN_ID."=".$u_id ;
$r_annu_ADMIN = mysql_query($requete_annuaire_admin);
 
if(!$r_annu_ADMIN) {
$res .= "<br>Echec de la requete dans la table annuaire administrateurs, l'identifiant de personne est invalide : ".$u_id
."<br /> Requete : ".$requete_annuaire_admin ;
}
 
if (mysql_num_rows($r_annu_ADMIN) != 0) {
$res .= "Une référence dans annu_ADMIN" ;
}
 
// 2.
// suppression
$query_supp = "delete from annuaire_tela where U_ID=".$u_id ;
$res_supp = mysql_query($query_supp);
if(!$res_supp) {
$res .= "<br>Echec de la suppression dans la table annuaire utilisateurs, l'identifiant de personne est invalide : ".$u_id
."<br /> Requete : ".$query_supp ;
}
 
// Suppression dans SPIP
if (INS_UTILISE_SPIP) {
desinscription_spip($u_id) ;
}
 
// Désinscription de la lettre d'info
if (INS_UTILISE_LISTE) {
if ($utilisateur->U_LETTRE == 1) {
$supp_abo = file_get_contents(URL_LISTE_ACTU.'suppression_abonne.php?domaine=tela-botanica.org&liste=actu&mail='.$mail) ;
}
}
// Appel des actions desinscriptions des applications clientes
$msg = '';
 
$id_utilisateur = $u_id;
 
$d = dir(GEN_CHEMIN_CLIENT);
while (false !== ($repertoire = $d->read())) {
if ($repertoire != '.' || $repertoire != '..') {
if (file_exists(GEN_CHEMIN_CLIENT.$repertoire.GEN_SEP.$repertoire.'.desinscription.inc.php'))
include_once GEN_CHEMIN_CLIENT.$repertoire.GEN_SEP.$repertoire.'.desinscription.inc.php' ;
}
if ($msg != '') $res .= $msg;
}
}
return $res ;
}
 
/** function mode_paiement () Produit un champs select avec le mode de paiement
*
*
* @param integer mode de paiement par defaut
* @return string HTML
*/
function mode_paiement ($defaut) {
$res = '<select name="IC_MC_ID" >'."\n" ;
$req_mode = "select * from MODE_COTISATION" ;
$res_mode = $GLOBALS['ann_db']->query($req_mode) ;
while ($ligne_mode = $res_mode->fetchROW(DB_FETCHMODE_OBJECT)) {
$res .= '<option value="'.$ligne_mode->MC_ID.'"' ;
if ($ligne_mode ->MC_ID == $defaut) $res .= " selected" ;
$res .= ">$ligne_mode->MC_LABEL</option>\n" ;
}
$res .= "</select>\n" ;
return $res ;
}
 
function desinscription_spip($id_utilisateur)
{
//BIEN METTRE alea_actuel, htpass ET alea_futur À ""
$requete = 'DELETE FROM '.INS_BDD_SPIP.'.spip_auteurs WHERE id_auteur='.$id_utilisateur ;
//echo $requete;
$resultat = $GLOBALS['ins_db']->query ($requete) ;
if (DB::isError ($resultat)) {
return "Echec de la requete : $requete<br />".$resultat->getMessage() ;
}
}
 
?>
/tags/v4.0/client/annuaire/signature_Daniel.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/v4.0/client/annuaire/signature_Daniel.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/v4.0/client/annuaire/annuaire_moteur_fonction.php
New file
0,0 → 1,430
<?php
 
// +--------------------------------------------------------------------------------+
// | annuaire_moteur_fonction.php |
// +--------------------------------------------------------------------------------+
// | Copyright (c) 2000 - 2003 Tela Botanica |
// +--------------------------------------------------------------------------------+
// | Les fonctions de annuaire_moteur.php |
// +--------------------------------------------------------------------------------+
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> |
// +--------------------------------------------------------------------------------+
//
// $Id: annuaire_moteur_fonction.php,v 1.1 2005/03/24 08:47:31 alex Exp $
 
include_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm.php';
include_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/select.php';
 
/** function mkengine ()
*
*
*
* @return
*/
function mkengine()
{
global $label_bbota;
global $nbr_total;
global $bouton, $HTTP_POST_VARS ;
$mes_vars = array ("recherche", "nom", "ville", "mail" ,"dept", "prenom", "cotisant", "pays", "sort", "T_REPONSE", "lettre","statut") ;
// Deux cas , soit on a cliqué sur rechercher, soit on a cliqué sur un lien
foreach ($mes_vars as $key=>$value) {
if (!$bouton) { // on a cliqué sur un lien
if (empty($HTTP_POST_VARS[$value])) {
}
} else {
// Si on clique sur le bouton rechercher
if (empty ($HTTP_POST_VARS[$value])) {
$$value = "" ;
} else {
$$value = $HTTP_POST_VARS[$value] ;
}
}
}
// Comptage du nombre total de données dans la table (hors CACHER = 1)
$query = "select count(*) as CPT from ".ANN_ANNUAIRE;
$result = $GLOBALS['ann_db']->query($query) ;
if (DB::isError($result)) {
return $result->getMessage().'<br />'.$result->getDebugInfo();
}
 
if ($result->numRows() == 1) {
$tmp_nb = $result->fetchRow(DB_FETCHMODE_OBJECT);
$nbr_total = $tmp_nb->CPT;
if ($nbr_total > 0) $chaine = "parmi $nbr_total données";
else die("<B>Erreur</B> lors du comptage des structures ($nbr_total trouvées) : $query");
} else die("<B>Erreur</B> lors du comptage des structures : $query");
 
$result->free();
// fin comptage
 
$ret = '<h1>'.AM_L_TITRE.'</h1>'."\n";
$ret .= '<h2>'.AM_L_TITRE.' '.$chaine.'</h2>'."\n";
// construction du moteur de str
$formulaire = new HTML_QuickForm('formulaire_recherche', 'post', str_replace('&amp;', '&', $GLOBALS['ann_url']->getURL()));
$squelette =& $formulaire->defaultRenderer();
$squelette->setFormTemplate("\n".'<div id="annuaire_zone_recherche"><table id="annuaire_recherche"><form{attributes}>'."\n".'{content}'."\n".'</form></table></div>'."\n");
$squelette->setElementTemplate( '<tr>'."\n".
'<td class="champ">{label}</td>'."\n".
'<td class="valeur">{element}'.
'<!-- BEGIN required --><span class="symbole_obligatoire">'.ADME_LG_FORM_SYMBOLE_CHP_OBLIGATOIRE.'</span><!-- END required -->'.
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'.
'</td>'."\n".
'</tr>'."\n");
$formulaire->addElement('text', 'recherche', AM_L_RECHERCHER);
$requete = 'select GC_ID, GC_NAME from gen_COUNTRY where GC_LOCALE="fr"';
$pays = &$GLOBALS['ann_db']->getAssoc ($requete);
$pays = array_merge (array('tous' => 'Tous les pays'), $pays);
if (DB::isError($pays)) {
return $pays->getMessage().'<br />'.$pays->getDebugInfo();
}
 
$select = new HTML_QuickForm_select ('pays', AM_L_PAYS, $pays, array ('class' => 'projet_asso')) ;
$formulaire->addElement($select) ;
$formulaire->addElement('text', 'nom', AM_L_NOM);
$formulaire->addElement('text', 'prenom', AM_L_PRENOM);
$formulaire->addElement('text', 'ville', AM_L_VILLE);
$departement['tous'] = 'Tous';
$resultat = & $GLOBALS['ann_db']->query('select GFD_ID, CONCAT(GFD_ID,\' - \',GFD_NAME) as GFD_NAME from gen_FRENCH_DPT');
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) $departement[$ligne->GFD_ID] = $ligne->GFD_NAME;
$select_dpt = new HTML_QuickForm_select ('departement', AM_L_DEPARTEMENT, $departement, array ('class' => 'projet_asso')) ;
$formulaire->addElement($select_dpt);
$formulaire->addElement('text', 'mail', AM_L_MAIL);
$cotisant = array (1 => 'Tous', 2 => 'Cotisants', 3 => 'Non cotisants');
$select_cotisant = new HTML_QuickForm_select ('cotisant', AM_L_COTISANTS, $cotisant, array ('class' => 'projet_asso')) ;
$formulaire->addElement($select_cotisant);
$requete = 'select distinct(YEAR(IC_DATE)) as annees from annuaire_COTISATION';
$resultat_annee_cotisation = &$GLOBALS['ann_db']->query ($requete);
if (DB::isError($resultat_annee_cotisation)) {
return $resultat_annee_cotisation->getMessage().'<br />'.$resultat_annee_cotisation->getDebugInfo();
}
$tableau_annee_cotisation['Toutes'] = 'Toutes';
while ($ligne_annee_cotisation = $resultat_annee_cotisation->fetchRow(DB_FETCHMODE_OBJECT)) {
$tableau_annee_cotisation[$ligne_annee_cotisation->annees] = $ligne_annee_cotisation->annees;
}
$select_annee = new HTML_QuickForm_select ('annee_cotisation', 'Année', $tableau_annee_cotisation, array ('class' => 'projet_asso')) ;
$formulaire->addElement($select_annee);
$grp = array(20 => 20, 50 => 50, 100 => 100) ;
$select_grp = new HTML_QuickForm_select ('T_REPONSE', 'Résultat par', $grp, array ('class' => 'projet_asso')) ;
$formulaire->addElement($select_grp);
$formulaire->addElement('submit', 'bouton', AM_L_RECHERCHER);
foreach ($mes_vars as $key=>$value) {
if (isset($_POST[$value])) {
$default[$value] = $_POST[$value] ;
}
}
$formulaire->setDefaults($_POST);
 
$ret .= '<br />'.$formulaire->toHTML();
return $ret;
}
 
function mkquery()
{
// définition des variables globales
global $lettre ;
global $bouton ;
// Requete sur l'annuaire pour extraire le nom, prénom, ville, nom du département (jointure),
// l'état de la cotisation (jointure)
// le tableau suivant contient tous les champs de la table annuaire_tela sur lesquels on peut effectuer une recherche
$fields_annu = array('departement' => 'U_FRENCH_DPT', "pays" => ANN_CHAMPS_PAYS ) ;
 
$mes_vars = array ("recherche", "nom", "ville", "mail" ,"departement",
"prenom", "cotisant", "pays", "sort", "T_REPONSE",
"lettre","statut", "annee_cotisation") ;
 
foreach ($mes_vars as $key=>$value) {
if (!$bouton) {
} else {
$lettre = "" ;
if (empty ($_REQUEST[$value])) {
$$value = "" ;
} else {
$$value = $_REQUEST[$value] ;
}
}
}
$queries = 'select '.ANN_CHAMPS_ID.','.ANN_CHAMPS_NOM.', '.ANN_CHAMPS_PRENOM.', '.
ANN_CHAMPS_PAYS.','.ANN_CHAMPS_MAIL.', '.ANN_CHAMPS_VILLE ;
$queries .= ", ".ANN_TABLE_PAYS.".GC_NAME ";
$queries .= "from ";
$queries .= ANN_TABLE_PAYS.','.ANN_ANNUAIRE ;
 
// Construction en fonction des champs saisies
// juste le champs "rechercher", on regarde partout
$queries .= " where 1 " ;
if ($lettre == "") {
if ($_REQUEST['recherche'] != '') {
$queries .= ' and ('.ANN_CHAMPS_NOM.' like "%'.$_REQUEST['recherche'].'%"' ; // le premier
foreach($fields_annu as $key=>$value) {
if ($key == "nom") continue ;
$queries .= ($key == "pays" ?
$pays == "tous" ? ")" :
") and $value = '$pays'" : " or $value like '%$recherche%'") ; // les autres
}
//$queries .= ' and ' ;
} else {
 
// si un ou plusieurs autres champs ont été indiqué, on les rajoute ici
 
$or_flag = false ;
foreach($fields_annu as $key=>$valeur) {
if ($key != "") {
if ($key == "pays" && ($$key != 'tous' && $$key != '')) {
if ($$key != "tous") $queries .= " and $valeur like \"%".$$key."%\"" ;
} else {
if ($key == "departement") {
if (isset ($_REQUEST[$key]) && $_REQUEST[$key] != "tous") {
$queries .= ' and U_FRENCH_DPT="'.$_REQUEST[$key].'"' ;
if ($fields_annu["pays"] != "fr") $queries .= ' and '.ANN_CHAMPS_PAYS.'="fr"' ;
}
} else {
if ($$key != '' && $key != 'pays') {
$queries .= ' and '.$valeur.' like "%'.$$key.'%"' ;
}
}
}
$or_flag = true ;
}
}
// ici le cas ou rien n'a été saisie du tout, on affiche tout
if (!$or_flag) {
$queries .= ANN_CHAMPS_NOM.' like "%")' ;
}
}
} else {
if ($lettre == "tous") $lettre = "" ;
$queries .= 'and '.ANN_CHAMPS_NOM.' like "'.$lettre.'%" ' ;
}
$queries .= "" ;
// jointure entre annuaire et table des pays annuaire_tela et gen_COUNTRY
$queries .= " and ".ANN_ANNUAIRE.".".ANN_CHAMPS_PAYS."=".ANN_TABLE_PAYS.".GC_ID" ;
if (isset($nom) && $nom != "") $queries .= " and ".ANN_CHAMPS_NOM." like \"%$nom%\"" ;
if (isset($prenom) && $prenom != "") $queries .= " and ".ANN_CHAMPS_PRENOM." like \"%$prenom%\"" ;
if (isset($ville) && $ville != "") $queries .= " and ".ANN_CHAMPS_VILLE." like \"%$ville%\"" ;
if (isset($mail) && $mail != "") $queries .= " and ".ANN_CHAMPS_MAIL." like \"%$mail%\"" ;
if (isset($_REQUEST['sort']) && $_REQUEST['sort'] != '') $queries .= ' order by '.$_REQUEST['sort'] ;
// traitement de l etat de cotisation
if (isset($cotisant) && $cotisant != 1) {
$queries .= ' and U_ID IN (select IC_ANNU_ID from annuaire_COTISATION where ';
if (isset($annee_cotisation) && $annee_cotisation != 0) {
$queries .= ' year(IC_DATE)='.$annee_cotisation ;
} else {
$queries .= 'year(IC_DATE)='.date('Y') ;
}
$queries .= ')';
}
return $queries;
}
function mkresu() {
$requete = mkquery() ;
// Requete sans le limit pour le nombre de resultat
$resultat_nbr = $GLOBALS['ann_db']->query($requete) ;
if (DB::isError($resultat_nbr)) {
return $resultat_nbr->getMessage().'<br />'.$resultat_nbr->getDebugInfo().'<br />'.$requete ;
}
$nbr_final = $resultat_nbr->numRows() ;
$resultat_nbr->free();
$_SESSION['requete_mail_tous'] = $requete ;
if (!isset($_REQUEST['T_REPONSE'])) $_REQUEST['T_REPONSE'] = 20 ;
$debut = $_REQUEST['pageID'] * $_REQUEST['T_REPONSE'];
$requete .= ' limit '.$debut.','.$_REQUEST['T_REPONSE'];
// Requetes avec les résultats affichés
 
$resultat = $GLOBALS['ann_db']->query($requete) ;
if (DB::isError($resultat)) {
return $resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'.$requete ;
}
$variables_a_supprimer = array ('username', 'password', 'connexion');
foreach ($variables_a_supprimer as $var) if (isset($_POST[$var])) unset ($_POST[$var]) ;
$variables = array_merge ($_POST, $_GET);
foreach ($variables as $key => $var) if ($variables[$key] != '') $GLOBALS['ann_url']->addQueryString($key, $variables[$key]);
$ret = "<table id=\"recherche_alphabetique\"><tr>" ;
for ($i = 65 ; $i <91 ; $i++) {
$ret .= "\t<td><a href=\"".$GLOBALS['ann_url']->getURL()."&lettre=";
$ret .= chr($i)."\">";
$ret .= chr($i) ;
$ret .= "</a></td>\n";
}
$GLOBALS['ann_url']->addQueryString('lettre', 'tous');
$ret .= '<td>&nbsp;&nbsp;<a href="'.$GLOBALS['ann_url']->getURL().'">'.AM_L_TOUS."</a></td>\n" ;
$ret .= "<tr></table>\n" ;
include_once 'api/pear/Pager/Pager.php';
$params = array(
'mode' => 'Jumping',
'perPage' => $_REQUEST['T_REPONSE'],
'delta' => 12,
'httpMethod' => 'GET',
'extraVars' => array_merge($_POST, $_GET),
'altNext' => 'Suivant',
'altPrev' => 'Précédent',
'nextImg' => 'Suivant',
'prevImg' => 'Précedent',
'totalItems' => $nbr_final
);
$pager = & Pager::factory($params);
$data = $pager->getPageData();
$links = $pager->getLinks();
$range = $pager->getOffsetByPageId();
$ret .= '<h2>'.$range[0].' - '.$range[1].' parmi '.$nbr_final.'</h2>';
$ret .= '<div class="bazar_numero">'.$pager->links.'</div>'."\n";
include_once 'api/pear/HTML/Table.php';
$table = new HTML_Table(array("class" => "table_cadre"));
$table->addRow(array("<a href=\"".$GLOBALS['ann_url']->getURL()."&amp;sort=".ANN_CHAMPS_NOM."\">Identit&eacute;</a>",
"<a href=\"".$GLOBALS['ann_url']->getURL()."&amp;sort=".ANN_CHAMPS_MAIL."\">Adresse mail</a>",
"<a href=\"".$GLOBALS['ann_url']->getURL()."&amp;sort=".ANN_CHAMPS_VILLE."\">".AM_L_VILLE, "Pays ou Dpt (fr)",
"<a href=\"".$GLOBALS['ann_url']->getURL()."&amp;sort=U_COT\">Cotisant en ".date(Y)),'', 'TH') ;
while ($valeur = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
$ligne_tableau = array();
$montant = 0;
// Le nom de l inscrit avec un lien dessus pour voir les details
$GLOBALS['ann_url']->addQueryString('u_id', $valeur[ANN_CHAMPS_ID]);
array_push ($ligne_tableau, '<a href="'.$GLOBALS['ann_url']->getURL().'">'.$valeur[ANN_CHAMPS_NOM].' '.$valeur[ANN_CHAMPS_PRENOM].'</a>');
// l email
array_push ($ligne_tableau, '<a href="mailto:'.$valeur[ANN_CHAMPS_MAIL].'">'.$valeur[ANN_CHAMPS_MAIL].'</a>');
// La ville
array_push ($ligne_tableau, $valeur[ANN_CHAMPS_VILLE]);
// Le pays ou le departement si francais
if ($valeur['U_COUNTRY'] != 'fr') {
array_push ($ligne_tableau, $valeur['GC_NAME']) ;
} else {
$req_dpt = 'select GFD_NAME from '.ANN_TABLE_DEPARTEMENT.','.ANN_ANNUAIRE.
' where '.ANN_ANNUAIRE.'.'.ANN_CHAMPS_ID.'='.$valeur[ANN_CHAMPS_ID] ;
$req_dpt .= " and ".ANN_ANNUAIRE.".U_FRENCH_DPT=".ANN_TABLE_DEPARTEMENT.".GFD_ID" ;
$resultat_dpt = $GLOBALS['ann_db']->query($req_dpt) ;
if (DB::isError($resultat_dpt)) {
return $resultat_dpt->getMessage().'<br />'.$resultat_dpt->getDebugInfo().'<br />'.$req_dpt ;
}
$ligne_dpt = $resultat_dpt->fetchRow(DB_FETCHMODE_OBJECT) ;
array_push ($ligne_tableau, $ligne_dpt->GFD_NAME) ;
}
// Si cotisant
if ($valeur->IC_MONTANT != NULL) $montant = $valeur->IC_MONTANT.' &euro;';
array_push ($ligne_tableau, $montant);
$table->addRow($ligne_tableau);
}
$table->altRowAttributes(1, array("class" => "ligne_paire"), array("class" => "ligne_impaire"), true);
$ret .= $table->toHTML();
$GLOBALS['ann_url']->removeQueryString('u_id');
$ret .= '<div class="bazar_numero">'.$pager->links.'</div>'."\n";
$GLOBALS['ann_url']->addQueryString(ANN_VARIABLE_ACTION, ANN_ACTION_MAIL_TOUS);
$ret .= "<div id=\"envoyer_selection\"><a href=\"".$GLOBALS['ann_url']->getURL()."\">".AM_L_MAIL_SELECTION."</a></div>\n" ;
$ret .= '<pre id="debogage">'.$requete.'</pre>';
return $ret;
}
 
function resume_cotisation() {
$res = '<h1>Etat des cotisations</h1>'."\n";
$requete = 'select distinct(YEAR(IC_DATE)) as annees from annuaire_COTISATION';
$tableau_annee_cotisation = &$GLOBALS['ann_db']->getCol ($requete);
if (DB::isError($tableau_annee_cotisation)) {
return $tableau_annee_cotisation->getMessage().'<br />'.$tableau_annee_cotisation->getDebugInfo();
}
$requete = 'select MC_ID,MC_LABEL from MODE_COTISATION order by MC_ID' ;
$tableau_mode_cotisation = & $GLOBALS['ann_db']->getAssoc($requete);
if (DB::isError($tableau_annee_cotisation)) {
return $tableau_mode_cotisation->getMessage().'<br />'.$tableau_mode_cotisation->getDebugInfo();
}
// Initialisation de la table
include_once 'api/pear/HTML/Table.php';
$table = new HTML_Table(array('class' => 'table_cadre'));
$table->addRow(array_merge (array('Année'), $tableau_mode_cotisation,
array('Total', 'Nb cotisant', 'Nb inscrit', 'Ratio')), '', 'TH');
foreach ($tableau_annee_cotisation as $annee) {
// recherche du nombre d adherent de l annee
$requete_nb_cotisant = 'select count(*) as nbr from annuaire_tela where U_DATE < "'.$annee.'-12-31" union'.
' select count(*) as nbr from annuaire_COTISATION where year(IC_DATE)='.$annee;
// La requete union renvoie une colonne appele nbr avec 2 lignes le nbre inscrit a tela et le nbre de cotisant
// pour une année donnee
$resultat = $GLOBALS['ann_db']->query($requete_nb_cotisant);
if (DB::isError($resultat)) {
return $resultat->getMessage().'<br />'.$rseultat->getDebugInfo();
}
$nb_inscrit_annee = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
$nb_cotisant_annee = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
$ratio = $nb_cotisant_annee->nbr / $nb_inscrit_annee->nbr * 100;
$ligne_table = array();
// On insere une premiere colone pour les annees
array_push ($ligne_table, $annee);
$somme_annee = 0;
foreach ($tableau_mode_cotisation as $mode_id => $mode_label) {
$requete = 'select sum(IC_MONTANT) as montant from annuaire_COTISATION where IC_MC_ID='.$mode_id.
' and year(IC_DATE)='.$annee;
$montant = $GLOBALS['ann_db']->getOne($requete);
if (DB::isError($montant)) {
return $montant->getMessage().'<br />'.$montant->getDebugInfo();
}
array_push ($ligne_table, $montant);
$somme_annee += $montant;
}
array_push ($ligne_table, $somme_annee, $nb_cotisant_annee->nbr, $nb_inscrit_annee->nbr,substr((string)$ratio, 0, 5).' %');
$table->addRow($ligne_table);
}
$res .= $table->toHTML();
return $res;
}
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log:$
* * +-- Fin du code ----------------------------------------------------------------------------------------+
*/
 
?>
/tags/v4.0/client/annuaire/mail_tous.php
New file
0,0 → 1,104
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: annuaire.php,v 1.3 2005/01/06 15:44:33 alex Exp $
/**
* Permet d'envoie un mail à une sélection dans l'annuaire
*
*
*@package annuaire
//Auteur original :
*@author Alexandre Granier <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.3 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
function putFrame() {
// configuration
global $objet, $corps, $annuaire_LABEL_STATUT, $SERVER_ADMIN ;
global $action ;
$url = $GLOBALS['ann_url']->getURL() ;
$annu_table = "annuaire_tela" ;
$champs_mail = "U_MAIL" ;
 
// Entete
$corps_debut = "RESEAU TELA BOTANICA - Le ".date("j/m/Y").
"\n\nBonjour,\n"."\n\nCordialement,\n-------------------\nTela Botanica le réseau des botanistes francophones\naccueil@tela-botanica.org\nhttp://www.tela-botanica.org\n";
 
$res = "<h1>Envoi d'un mail &agrave; tous les membres</h1>\n" ;
if ($_GET['action'] == ANN_MAIL_TOUS_ENVOIE) $res .= envoie_mail_selection() ;
$GLOBALS['ann_url']->addQueryString('action', ANN_MAIL_TOUS_ENVOIE);
// formulaire
$res .= '<div><form action="'.$GLOBALS['ann_url']->getURL()."\" method=\"post\"><table>\n" ;
$res .= "<tr><td class=\"insLabel\">" ;
$res .= "Objet&nbsp;:&nbsp;</td><td><input size=\"91\" name=\"objet\" type=\"text\" class=\"insInputForm\"></td></tr>\n" ;
$res .= "<tr><td class=\"insLabel\">Corps&nbsp;:&nbsp;</td><td><textarea name=\"corps\" cols=\"90\" rows=\"30\" class=\"insInputForm\">$corps_debut</textarea></td></tr>\n" ;
$res .= "<tr><td></td><td><input type=\"submit\" class=\"texte_tb\" value=\"envoyer\"" ;
$res .= " onclick=\"javascript:return confirm('Etes-vous sur de vouloir envoyer ce message !!');\"" ;
$res .= "></td></tr>\n" ;
$res .= "</table></form></div>\n" ;
$res .= $_SESSION['requete_mail_tous'];
 
return $res ;
}
 
include_once ("Mail.php");
 
// envoie le mail à tous
function envoie_mail_selection()
{
global $objet, $corps, $annuaire_LABEL_STATUT, $SERVER_ADMIN, $GS_GLOBAL ;
$annuaire = "annuaire_tela" ;
$champs_mail = "U_MAIL" ;
$headers['From'] = "accueil@tela-botanica.org" ;
$headers['Subject'] = stripslashes($objet) ;
 
$corps = stripslashes($corps) ;
$requete = $_SESSION['requete_mail_tous'] ;
unset ($_SESSION['requete_mail_tous']) ;
 
$resultat = mysql_query($requete) or die ("echec") ;
while ($ligne = mysql_fetch_object($resultat)) {
if (!mail($ligne->U_MAIL, $headers['Subject'], $corps, "From: ".$headers['From'])) {
return "<tr><td>Une erreur s'est produite:<br>".$mail_object->getMessage()."</td></tr>\n" ;
}
}
return "<div>Le mail est parti !</div>\n";
 
}
?>
/tags/v4.0/client/annuaire/annuaire_moteur.php
New file
0,0 → 1,120
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: annuaire_moteur.php,v 1.2 2005/03/24 08:24:39 alex Exp $
/**
* programme principal du module annuaire_moteur
*
* programme principal du module annuaire_moteur
*
*@package annuaire
//Auteur original :
*@author Alexandre Granier <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.2 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
include_once 'client/annuaire/configuration/ann_config.inc.php' ;
 
include_once (ANN_CHEMIN_APPLI."annuaire_moteur_fonction.php");
include_once (ANN_CHEMIN_LIBRAIRIE."annuaire.fonct.php") ;
 
if (isset($lang)) {
include_once ANN_CHEMIN_APPLI."/langues/ann_langue_$lang.inc.php" ;
} else {
include_once ANN_CHEMIN_APPLI.'/langues/ann_langue_fr.inc.php' ;
}
 
define ("ANN_MAIL_TOUS", 1) ;
define ("ANN_MAIL_TOUS_ENVOIE", 2) ;
define ('ANN_ACTION_VOIR_ADHERENT', 'voir_adherent');
define ('ANN_ACTION_VOIR_COTISATION', 'voir_cotisation');
define ('ANN_VARIABLE_ACTION', 'action');
define ('ANN_ACTION_MAIL_TOUS', 'mail_tous');
define ('ANN_ACTION_SUPPRIMER_ADHERENT', 'suppr_adh');
 
// Action pour les cotisations
define ('ANN_ACTION_SAISIR_COTISATION', 'sc');
define ('ANN_ACTION_VALIDER_COTISATION', 'cu');
define ('ANN_ACTION_MODIFIER_COTISATION', 'mu');
define ('ANN_ACTION_SUPPRIMER_COTISATION', 'rm');
define ('ANN_ACTION_ENVOYER_RECU', 'er');
 
 
function afficherContenuNavigation () {
$res .= '<ul class="onglets">';
$GLOBALS['ann_url']->addQueryString(ANN_VARIABLE_ACTION, ANN_ACTION_VOIR_ADHERENT);
$res .= '<li class="'.cma(ANN_ACTION_VOIR_ADHERENT).'"><a href="'.$GLOBALS['ann_url']->getURL().'">Adh&eacute;rents</a></li>';
$GLOBALS['ann_url']->addQueryString(ANN_VARIABLE_ACTION, ANN_ACTION_VOIR_COTISATION);
$res .= '<li class="'.cma(ANN_ACTION_VOIR_COTISATION).'"><a href="'.$GLOBALS['ann_url']->getURL().'">Cotisations</a></li>';
$res .= '</ul>';
$GLOBALS['ann_url']->removeQueryString (ANN_VARIABLE_ACTION) ;
return $res ;
}
 
function afficherContenuCorps () {
global $statut ;
if (!isset($_REQUEST[ANN_VARIABLE_ACTION])) $_REQUEST[ANN_VARIABLE_ACTION] = ANN_ACTION_VOIR_ADHERENT;
if (!$GLOBALS['AUTH']->getAuth()) {
$res = AUTH_formulaire_login() ;
} else {
switch ($_REQUEST[ANN_VARIABLE_ACTION]) {
case ANN_ACTION_SAISIR_COTISATION:
case ANN_ACTION_MODIFIER_COTISATION:
case ANN_ACTION_SUPPRIMER_COTISATION:
case ANN_ACTION_VALIDER_COTISATION:
case ANN_ACTION_ENVOYER_RECU:
if (isset($_GET['u_id'])) {
include_once (ANN_CHEMIN_APPLI.'admin_annu.php');
$GLOBALS['ann_url']->addQueryString ('u_id', $_GET['u_id']) ;
return putFrame() ;
}
case ANN_ACTION_VOIR_COTISATION:
$res .= '<div>'.resume_cotisation().'</div>'."\n";
break;
case ANN_ACTION_MAIL_TOUS:
case ANN_MAIL_TOUS_ENVOIE:
include_once (ANN_CHEMIN_APPLI.'mail_tous.php') ;
return putFrame() ;
default:
if (isset ($_GET['u_id'])) {
include_once (ANN_CHEMIN_APPLI.'admin_annu.php');
$GLOBALS['ann_url']->addQueryString ('u_id', $_GET['u_id']) ;
return putFrame() ;
}
return mkengine().mkresu();
}
}
return $res ;
}
 
function cma ($var) {
$class = $_REQUEST[ANN_VARIABLE_ACTION] == $var ? 'menu_actif' : 'menu_inactif' ;
return $class ;
}
?>
/tags/v4.0/client/annuaire/recu_pdf_corps.php
New file
0,0 → 1,171
<?php
// +----------------------------------------------------------------------------+
// |pdf_recu_et_mail.php |
// +----------------------------------------------------------------------------+
// | Copyright (c) 2003 Tela Botanica |
// +----------------------------------------------------------------------------+
// | Ce fichier génère un fichier PDF |
// | contenant le recu pour une cotisation à Tela Botanica |
// | Il utilise la librairie FPDF |
// | http://www.fpdf.org/ |
// | Il envoie également un email à l'adhérent concerné |
// +----------------------------------------------------------------------------+
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> |
// +----------------------------------------------------------------------------+
//
// $Id: recu_pdf_corps.php,v 1.1.1.1 2005/01/03 17:27:49 alex Exp $
 
 
// Recherche des informations sur un utilisateur
 
$requete = "select * from annuaire_COTISATION, annuaire_tela, MODE_COTISATION
where IC_ID=$cotisation_id
and IC_ANNU_ID=U_ID
and IC_MC_ID=MC_ID" ;
$resultat = $db->query($requete) ;
if (DB::isError ($resultat)) {
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ;
}
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ;
$resultat->free() ;
 
/*
// On regarde si le reçu a déjà été envoyé
$requete = "select IC_RECU from annuaire_COTISATION where IC_ID=$cotisation_id" ;
$resultat = mysql_query ($requete) or die ($requete."<br>".mysql_error()) ;
$ligne = mysql_fetch_object($resultat) ;
mysql_free_result($resultat) ;
*/
 
if ($ligne->IC_RECU != 0) {
$num_recu = $ligne->IC_RECU ;
// $deja_envoye permettra au programme admin_annu.php de ne pas incrementé
// le compteur de recu
$deja_envoye = true ;
} else {
$res_compteur = $db->query("select COMPTEUR from COMPTEUR_COTISATION") ;
$ligne_compteur = $res_compteur->fetchRow(DB_FETCHMODE_OBJECT) ;
$num_recu = $ligne_compteur->COMPTEUR ;
$deja_envoye = false ;
}
 
@include_once "api/fpdf/fpdf.php";
@include_once "bibliotheque/Words.php";
 
if (!isset($envoie)) $chemin = "client/annuaire/" ;
 
// Constante nécessaire à fpdf.php
define('FPDF_FONTPATH','font/');
 
// Création de l'objet pdf
 
$pdf = new FPDF();
 
$pdf->Open();
$pdf->AddPage("P");
// La ligne du haut
 
$pdf->Line(10, 10, 200, 10) ;
 
// Contenu du document
 
$pdf->SetFont('Arial', '', 8) ;
 
$pdf->Cell(150, 10, "", 0, 0) ;
 
$pdf->MultiCell(40, 10, "Numéro d'ordre : $num_recu", 1,1, "C") ;
 
$pdf->SetY($pdf->GetY() - 10) ;
 
$pdf->SetFont('Arial','B',14);
$pdf->Cell(0,10,'Reçu dons aux œuvres', 0, 1, "C");
$pdf->SetFont('Arial', '', 10) ;
$pdf->Cell(0, 0, 'Articles 200, 238 bis et 885-0 du code général des impôts (CGI)', 0, 1, "C") ;
 
$pdf->Cell(0, 10, 'REÇU A CONSERVER ET A JOINDRE A VOTRE DECLARATION DE REVENUS 2009', 0, 1, "L") ;
 
// On met le logo de Tela
$pdf->Image($chemin."logotb.png", 12, 35, "29", "", "PNG", "http://www.tela-botanica.org/") ;
 
 
 
// On écrie Les titres du cadre
 
$pdf->SetFontSize(12) ;
$pdf->Cell(100, 10, 'Bénéficiaire du don', 0, 0, "C") ;
$pdf->Cell(100, 10, 'Donateur', 0, 1, "C") ;
 
$pdf->SetFont('Arial', 'B', 10) ;
 
$pdf->Cell(38, 5, '', 0, 0) ;
$pdf->Cell(62, 5, 'Association Tela Botanica', 0, 0, "L") ;
 
$pdf->SetFont('Arial', 'B', 10) ;
 
$pdf->Cell(100, 5, "$ligne->U_NAME $ligne->U_SURNAME", 0, 1, "L") ;
 
$pdf->SetFont('Arial', '', 10) ;
 
$pdf->Cell(38, 5, '', 0, 0) ;
$pdf->Cell(62, 5, 'Institut de Botanique', 0, 1, "L") ;
$pdf->Cell(38, 5, '', 0, 0) ;
$pdf->Cell(62, 5, '163, rue A. Broussonnet', 0, 0, "L") ;
$pdf->Cell(100, 5, "$ligne->U_ADDR1", 0, 1, "L") ;
 
$pdf->Cell(38, 5, '', 0, 0) ;
$pdf->Cell(62, 5, '34090 Montpellier', 0, 0, "L") ;
$pdf->Cell(100, 8, "$ligne->U_ADDR2", 0, 1, "L") ;
 
 
$pdf->Cell(100, 5, 'Objet :', 0,1, "L") ;
$pdf->SetFontSize(8) ;
$pdf->MultiCell(100, 4, 'Contribuer au rapprochement de tous les botanistes de langue française. Favoriser l\'échange d\'information'.
' et animer des projets botaniques grâce aux nouvelles technologies de la communication.', 0, 1, "") ;
 
$pdf->SetFontSize(10) ;
 
$pdf->Text(111, 58 + 8, "$ligne->U_ZIP_CODE $ligne->U_CITY") ;
$pdf->SetFontSize(8) ;
$pdf->MultiCell(100,4, 'Organisme d\'intérêt général à caractère scientifique concourant à la diffusion de la langue et des connaissances scientifiques françaises.', 0,1, "R") ;
 
 
// On remonte le curseur de 52
$pdf->SetY($pdf->GetY() - 58) ;
 
// Le cadre central
$pdf->Cell(100, 60, '', 1) ;
$pdf->Cell(90, 60, '', 1) ;
$pdf->Ln() ;
 
$pdf->SetFontSize(10) ;
$pdf->Cell(0,10, 'L\'Association reconnaît avoir reçu en numéraire, à titre de don, la somme de :', 0, 1, "L") ;
 
$wordsConverter = new Numbers_Words() ;
$montantLettres = $wordsConverter->toWords($ligne->IC_MONTANT,'fr') ;
 
$pdf->SetFont('Arial', 'B', 11) ;
$pdf->Cell(0,10, "*** $ligne->IC_MONTANT euros ***", 0, 1, "C") ;
$pdf->Ln() ;
$pdf->Cell(0,10, "*** ($montantLettres euros) ***", 0, 1, "C") ;
 
$pdf->SetFont('Arial', '', 10) ;
 
$pdf->Ln() ;
$pdf->Cell(100,10, "Date du paiement : ".date("d/m/Y",strtotime($ligne->IC_DATE)), 0, 0, "L") ;
$pdf->Cell(100, 10, 'Montpellier, le '.date("d/m/Y"), 0, 1, "L") ;
 
// La signature de Daniel
$pdf->Image($chemin."signature_Mathez.png", 110, $pdf->GetY(),28.22, "") ;
 
$pdf->Ln() ;
$pdf->Cell(0, 10, "Mode de versement : $ligne->MC_LABEL", 0, 1, "L") ;
 
$pdf->Cell(100, 10, '', 0, 0) ;
$pdf->Cell (100, 10, 'Joël Mathez, Trésorier', 0, 1, "L") ;
$pdf->Ln(5) ;
 
$pdf->SetFontSize(10) ;
$pdf->Cell(0, 7, '66 % de votre don à Tela Botanica est déductible de vos impôts dans la limite de 20 % de votre revenu imposable.', 1, 1, "C") ;
 
 
?>
/tags/v4.0/client/annuaire/images/redaction_pied.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v4.0/client/annuaire/images/redaction_pied.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v4.0/client/annuaire/images/redaction_tete.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v4.0/client/annuaire/images/redaction_tete.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v4.0/client/annuaire/images/redaction_milieu.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v4.0/client/annuaire/images/redaction_milieu.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v4.0/client/annuaire/configuration/ann_config.inc.php
New file
0,0 → 1,121
<?php
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
/**
* Fichier de configuration de l'annuaire
*
* A éditer de façon spécifique à chaque déploiement
*
*@package inscription
//Auteur original :
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2004
*@version $Id: ann_config.inc.php,v 1.2 2005/03/08 09:43:34 alex Exp $
// +------------------------------------------------------------------------------------------------------+
*/
 
// Paramêtres indiquant que l'on est en français pourpermettre la mise en majuscule des caractères accentués
setlocale(LC_CTYPE, 'fr_FR');
 
/**
//=========================DEFINITION DE VARIABLES =================================
* Définition des variables globales
//==================================================================================
*/
$GLOBALS['AUTH'] =& $GLOBALS['_GEN_commun']['pear_auth'] ;
$GLOBALS['ann_db'] =& $GLOBALS['_GEN_commun']['pear_db'] ;
$GLOBALS['ins_db'] =& $GLOBALS['_GEN_commun']['pear_db'] ;
 
/**
//==================================== LES URLS ==================================
* Constantes liées à l'utilisation des url
//==================================================================================
*/
$GLOBALS['ann_url'] =& $GLOBALS['_GEN_commun']['url'];//l'url de base de l'application, un objet Net_URL
// Créer cet objet par $GLOBALS['ins_url'] = new Net_URL('http://....') ;
define('ANN_URL_ACTUALITE', 'http://www.tela-botanica.org/actu/article220.html') ;
/** Variable définissant la lettre par défaut du parcour alphabétique.*/
define('ANN_LETTRE_DEFAUT', 'A') ;// une lettre de l'aphabet ou "tous"
/** Variable définissant si oui ou non on affiche l'entrée "tous" dans le parcour alphabétique.*/
define('ANN_TOUS_BOOL', false) ;// true ou false
/**
//==================================== LES CHEMINS =================================
* Constantes définissant les chemins d'accé au différents fichiers inclus dans les
* applications.
//==================================================================================
*/
define('ANN_CHEMIN_APPLI','client/annuaire/');//le chemin vers l'application courrante
define('ANN_CHEMIN_LIBRAIRIE', ANN_CHEMIN_APPLI.'bibliotheque/');//le chemin de la librairie de fichier php
/**
//==================================== CONSTANTES ==================================
* Constantes des noms de tables et de champs dans l'annuaire
//==================================================================================
*/
define ("ANN_ANNUAIRE", "annuaire_tela");
define ("ANN_CHAMPS_NOM", "U_NAME"); // Nom du champs nom
define ("ANN_CHAMPS_MAIL", "U_MAIL"); // Nom du champs mail
define ("ANN_CHAMPS_PRENOM", "U_SURNAME"); // Nom du champs prénom
define ("ANN_CHAMPS_ID", "U_ID"); // Nom du champs id
define ("ANN_CHAMPS_DATE_INS", "U_DATE");
define ("ANN_CHAMPS_CODE_POSTAL", "U_ZIP_CODE");
define ("ANN_CHAMPS_VILLE", "U_CITY");
define ("ANN_CHAMPS_PAYS", "U_COUNTRY");
 
define ("ANN_TABLE_PAYS", "gen_COUNTRY");
define ("ANN_GC_ID", "GC_ID");
define ("ANN_GC_NOM", "GC_NAME");
 
define ("ANN_TABLE_DEPARTEMENT", "gen_FRENCH_DPT") ;
 
define ('MAIL_MODERATION','moderation@tela-botanica.org') ;
 
/**
//==================================== CONSTANTES ==================================
* Constantes des applications extérieures
//==================================================================================
*/
define ('INS_UTILISE_LISTE', true);
define ('INS_MAIL_INSCRIPTION_LISTE', 'actu-subscribe@tela-botanica.org');
define ('INS_MAIL_DESINSCRIPTION_LISTE', 'actu-unsubscribe@tela-botanica.org');
 
define ('INS_UTILISE_SPIP', 1);
if (INS_UTILISE_SPIP) {
define ('INS_BDD_SPIP', 'tela_prod_spip_actu');
}
 
define ('ANNUAIRE_ADMIN', 'gen_annuaire');
define ('ANNUAIRE_ADMIN_ID', 'ga_id_administrateur');
 
define(INS_CHAMPS_ID, 'U_ID');
define(INS_CHAMPS_MAIL, 'U_MAIL');
define(INS_ANNUAIRE, 'annuaire_tela');
define(INS_CHAMPS_NOM, 'U_NAME');
define(INS_CHAMPS_PRENOM, 'U_SURNAME');
 
 
/** Tableau global contenant les mails des administrateurs. */
// Liste des personne recevant le mail après envoie de courriel par l'annuaire
$GLOBALS['mail_admin'] = array ('Accueil <accueil@tela-botanica.org>',
'Daniel MATHIEU <dmathieu@tela-botanica.org>',
'Jean-Pascal MILCENT <jpm@tela-botanica.org>',
'Élise MOUYSSET <elise@tela-botanica.org>');
?>
/tags/v4.0/client/annuaire/annuaire.php
New file
0,0 → 1,113
<?
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
/**
* programme principal du module annuaire
*
* programme principal du module annuaire
*
*@package annuaire
//Auteur original :
*@author Alexandre Granier <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
*@copyright Tela-Botanica 2000-2007
*@version $Id: annuaire.php,v 1.4 2005/03/24 08:24:39 alex Exp $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
include_once 'client/annuaire/configuration/ann_config.inc.php' ;
include_once ANN_CHEMIN_LIBRAIRIE.'annuaire.fonct.php' ;
/** Constante "dynamique" stockant la langue demandée par l'utilisateur pour l'application.*/
define('INS_LANGUE', substr($GLOBALS['_GEN_commun']['i18n'], 0, 2));
$fichier_lg = ANN_CHEMIN_APPLI.'/langues/ann_langue_'.INS_LANGUE.'.inc.php';
if (file_exists($fichier_lg)) {
include_once $fichier_lg;
} else {
include_once ANN_CHEMIN_APPLI.'/langues/ann_langue_fr.inc.php' ;
}
include_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm.php' ;
 
// Ajout d'une feuille de style externe
GEN_stockerStyleExterne ('inscription', 'client/annuaire/annuaire.css') ;
 
/**
* Renvoie le code HTML de l'application
*
* @return string HTML
*/
function afficherContenuCorps () {
$res = '<h1 class="annuaire_titre1">'.ANN_TITRE.'</h1>'."\n";
if (!$GLOBALS['AUTH']->getAuth()) {
$res .= AUTH_formulaire_login();
} else {
// Le code javascript des cases à cocher
$java =
"function setCheckboxes(the_form)
{
var do_check=document.forms[the_form].elements['selecttotal'].checked;
var elts = document.forms[the_form].elements['select[]'];
var elts_cnt = (typeof(elts.length) != 'undefined')
? elts.length
: 0;
if (elts_cnt) {
for (var i = 0; i < elts_cnt; i++) {
elts[i].checked = do_check;
} // Fin for
} else {
elts.checked = do_check;
} // Fin if... else
return true;
} // Fin de la fonction 'setCheckboxes()'";
GEN_stockerCodeScript($java) ;
 
$res .= '<h2 class="annuaire_titre2">'.ANN_CLIQUEZ_LETTRE.'</h2>'."\n";
 
// Nettoyage des variables du POST
$cles = array('corps', 'titre_mail');
foreach ($cles as $cle) {
if (isset($_POST[$cle]) && !empty($_POST[$cle])) {
$_POST[$cle] = translittererCp1252VersIso88591(stripslashes($_POST[$cle]));
}
}
 
// S'il y a un mail a envoyé, on l'envoie
if (isset($_POST['select']) && is_array($_POST['select'])) {
if (isset($_POST['corps']) && isset($_POST['titre_mail'])) {
$res .= envoie_mail($_POST['select'], $_POST['titre_mail'], $_POST['corps']) ;
}
}
 
$res .= parcourrirAnnu() ;
}
return $res;
}
 
function afficherContenuPied () {
$sortie = '<p id="annuaire_pied_page">'.ANN_PIED_INFO.
'<a href="mailto:'.ANN_PIED_MAIL.'">'.ANN_PIED_MAIL.'</a>.'.
'</p>';
return $sortie;
}
?>
/tags/v4.0/client/annuaire/annuaire.css
New file
0,0 → 1,44
/* Pied de page */
#annuaire_pied_page {
color:#A9A9A9;
font-size:10px;
padding-top:10px;
text-align:center;}
 
/* Parcourir l'alphabet */
#annuaire_alphabet{
font-size:15px;}
 
/* Tableau des inscrits */
#annuaire {
border:1px solid;}
#annuaire table{
width:100%;
margin:0;
border:none;}
#annuaire tbody{
vertical-align:top;
min-height:1em;
height:200px;
overflow: auto;}
#annuaire td{
border:none;}
#annuaire tr{
height:1em;}
#redaction {
background:#D4D4D4 url(images/redaction_milieu.png) repeat-y scroll 0%;
color:#454545;
width:900px;}
#redaction .text, #redaction .forml {
width:800px;}
#redaction table,#redaction h2 {
margin:5px;}
#redaction_tete {
background:#D4D4D4 url(images/redaction_tete.png) no-repeat scroll 0%;
color:#FFFFFF;
height:15px;}
#redaction_pied {
background:#D4D4D4 url(images/redaction_pied.png) no-repeat scroll 0%;
color:#FFFFFF;
height:15px;}
/tags/v4.0/client/annuaire/logotb.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/v4.0/client/annuaire/logotb.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/v4.0/client/annuaire/bibliotheque/Words/lang.fr.php
New file
0,0 → 1,434
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Kouber Saparev <kouber@php.net> |
// +----------------------------------------------------------------------+
//
// $Id: lang.fr.php,v 1.4 2004/10/22 18:22:52 kouber Exp $
 
/**
* Class for translating numbers into French.
*
* @author Kouber Saparev <kouber@php.net>
* @package Numbers_Words
*/
class Numbers_Words_fr extends Numbers_Words
{
 
// {{{ properties
 
/**
* Locale name.
* @var string
* @access public
*/
var $locale = 'fr';
 
/**
* Language name in English.
* @var string
* @access public
*/
var $lang = 'French';
 
/**
* Native language name.
* @var string
* @access public
*/
var $lang_native = 'Français';
 
/**
* The words for some numbers.
* @var string
* @access private
*/
var $_misc_numbers = array(
10=>'dix', // 10
'onze', // 11
'douze', // 12
'treize', // 13
'quatorze', // 14
'quinze', // 15
'seize', // 16
20=>'vingt', // 20
30=>'trente', // 30
40=>'quarante', // 40
50=>'cinquante',// 50
60=>'soixante', // 60
100=>'cent' // 100
);
 
 
/**
* The words for digits (except zero).
* @var string
* @access private
*/
var $_digits = array(1=>"un", "deux", "trois", "quatre", "cinq", "six", "sept", "huit", "neuf");
 
/**
* The word for zero.
* @var string
* @access private
*/
var $_zero = 'zéro';
 
/**
* The word for infinity.
* @var string
* @access private
*/
var $_infinity = 'infini';
 
/**
* The word for the "and" language construct.
* @var string
* @access private
*/
var $_and = 'et';
/**
* The word separator.
* @var string
* @access private
*/
var $_sep = ' ';
 
/**
* The dash liaison.
* @var string
* @access private
*/
var $_dash = '-';
 
/**
* The word for the minus sign.
* @var string
* @access private
*/
var $_minus = 'moins'; // minus sign
 
/**
* The plural suffix (except for hundred).
* @var string
* @access private
*/
var $_plural = 's'; // plural suffix
 
/**
* The suffixes for exponents (singular).
* @var array
* @access private
*/
var $_exponent = array(
0 => '',
3 => 'mille',
6 => 'million',
9 => 'milliard',
12 => 'trillion',
15 => 'quadrillion',
18 => 'quintillion',
21 => 'sextillion',
24 => 'septillion',
27 => 'octillion',
30 => 'nonillion',
33 => 'decillion',
36 => 'undecillion',
39 => 'duodecillion',
42 => 'tredecillion',
45 => 'quattuordecillion',
48 => 'quindecillion',
51 => 'sexdecillion',
54 => 'septendecillion',
57 => 'octodecillion',
60 => 'novemdecillion',
63 => 'vigintillion',
66 => 'unvigintillion',
69 => 'duovigintillion',
72 => 'trevigintillion',
75 => 'quattuorvigintillion',
78 => 'quinvigintillion',
81 => 'sexvigintillion',
84 => 'septenvigintillion',
87 => 'octovigintillion',
90 => 'novemvigintillion',
93 => 'trigintillion',
96 => 'untrigintillion',
99 => 'duotrigintillion',
102 => 'trestrigintillion',
105 => 'quattuortrigintillion',
108 => 'quintrigintillion',
111 => 'sextrigintillion',
114 => 'septentrigintillion',
117 => 'octotrigintillion',
120 => 'novemtrigintillion',
123 => 'quadragintillion',
126 => 'unquadragintillion',
129 => 'duoquadragintillion',
132 => 'trequadragintillion',
135 => 'quattuorquadragintillion',
138 => 'quinquadragintillion',
141 => 'sexquadragintillion',
144 => 'septenquadragintillion',
147 => 'octoquadragintillion',
150 => 'novemquadragintillion',
153 => 'quinquagintillion',
156 => 'unquinquagintillion',
159 => 'duoquinquagintillion',
162 => 'trequinquagintillion',
165 => 'quattuorquinquagintillion',
168 => 'quinquinquagintillion',
171 => 'sexquinquagintillion',
174 => 'septenquinquagintillion',
177 => 'octoquinquagintillion',
180 => 'novemquinquagintillion',
183 => 'sexagintillion',
186 => 'unsexagintillion',
189 => 'duosexagintillion',
192 => 'tresexagintillion',
195 => 'quattuorsexagintillion',
198 => 'quinsexagintillion',
201 => 'sexsexagintillion',
204 => 'septensexagintillion',
207 => 'octosexagintillion',
210 => 'novemsexagintillion',
213 => 'septuagintillion',
216 => 'unseptuagintillion',
219 => 'duoseptuagintillion',
222 => 'treseptuagintillion',
225 => 'quattuorseptuagintillion',
228 => 'quinseptuagintillion',
231 => 'sexseptuagintillion',
234 => 'septenseptuagintillion',
237 => 'octoseptuagintillion',
240 => 'novemseptuagintillion',
243 => 'octogintillion',
246 => 'unoctogintillion',
249 => 'duooctogintillion',
252 => 'treoctogintillion',
255 => 'quattuoroctogintillion',
258 => 'quinoctogintillion',
261 => 'sexoctogintillion',
264 => 'septoctogintillion',
267 => 'octooctogintillion',
270 => 'novemoctogintillion',
273 => 'nonagintillion',
276 => 'unnonagintillion',
279 => 'duononagintillion',
282 => 'trenonagintillion',
285 => 'quattuornonagintillion',
288 => 'quinnonagintillion',
291 => 'sexnonagintillion',
294 => 'septennonagintillion',
297 => 'octononagintillion',
300 => 'novemnonagintillion',
303 => 'centillion'
);
// }}}
 
// {{{ _splitNumber()
 
/**
* Split a number to groups of three-digit numbers.
*
* @param mixed $num An integer or its string representation
* that need to be split
*
* @return array Groups of three-digit numbers.
*
* @access private
* @author Kouber Saparev <kouber@php.net>
* @since PHP 4.2.3
*/
 
function _splitNumber($num)
{
if (is_string($num)) {
$ret = array();
$strlen = strlen($num);
$first = substr($num, 0, $strlen%3);
preg_match_all('/\d{3}/', substr($num, $strlen%3, $strlen), $m);
$ret =& $m[0];
if ($first) array_unshift($ret, $first);
return $ret;
}
else
return explode(' ', number_format($num, 0, '', ' ')); // a faster version for integers
}
// }}}
 
// {{{ _showDigitsGroup()
 
/**
* Converts a three-digit number to its word representation
* in French language.
*
* @param integer $num An integer between 1 and 999 inclusive.
*
* @param boolean $last A flag, that determines if it is the last group of digits -
* this is used to accord the plural suffix of the "hundreds".
* Example: 200 = "deux cents", but 200000 = "deux cent mille".
*
*
* @return string The words for the given number.
*
* @access private
* @author Kouber Saparev <kouber@php.net>
*/
function _showDigitsGroup($num, $last = false)
{
$ret = '';
// extract the value of each digit from the three-digit number
$e = $num%10; // ones
$d = ($num-$e)%100/10; // tens
$s = ($num-$d*10-$e)%1000/100; // hundreds
// process the "hundreds" digit.
if ($s) {
if ($s>1) {
$ret .= $this->_digits[$s].$this->_sep.$this->_misc_numbers[100];
if ($last && !$e && !$d) {
$ret .= $this->_plural;
}
} else {
$ret .= $this->_misc_numbers[100];
}
$ret .= $this->_sep;
}
 
// process the "tens" digit, and optionally the "ones" digit.
if ($d) {
// in the case of 1, the "ones" digit also must be processed
if ($d==1) {
if ($e<=6) {
$ret .= $this->_misc_numbers[10+$e];
} else {
$ret .= $this->_misc_numbers[10].'-'.$this->_digits[$e];
}
$e = 0;
} elseif ($d>5) {
if ($d<8) {
$ret .= $this->_misc_numbers[60];
$resto = $d*10+$e-60;
if ($e==1) {
$ret .= $this->_sep.$this->_and.$this->_sep;
}
elseif ($resto) {
$ret .= $this->_dash;
}
if ($resto) {
$ret .= $this->_showDigitsGroup($resto);
}
$e = 0;
} else {
$ret .= $this->_digits[4].$this->_dash.$this->_misc_numbers[20];
$resto = $d*10+$e-80;
if ($resto) {
$ret .= $this->_dash;
$ret .= $this->_showDigitsGroup($resto);
$e = 0;
} else {
$ret .= $this->_plural;
}
}
} else {
$ret .= $this->_misc_numbers[$d*10];
}
}
 
// process the "ones" digit
if ($e) {
if ($d) {
if ($e==1) {
$ret .= $this->_sep.$this->_and.$this->_sep;
} else {
$ret .= $this->_dash;
}
}
$ret .= $this->_digits[$e];
}
 
// strip excessive separators
$ret = rtrim($ret, $this->_sep);
 
return $ret;
}
// }}}
 
// {{{ toWords()
 
/**
* Converts a number to its word representation
* in French language.
*
* @param integer $num An integer (or its string representation) between 9.99*-10^302
* and 9.99*10^302 (999 centillions) that need to be converted to words
*
* @return string The corresponding word representation
*
* @access public
* @author Kouber Saparev <kouber@php.net>
*/
function toWords($num = 0)
{
$ret = '';
 
// check if $num is a valid non-zero number
if (!$num || preg_match('/^-?0+$/', $num) || !preg_match('/^-?\d+$/', $num)) return $this->_zero;
 
// add a minus sign
if (substr($num, 0, 1) == '-') {
$ret = $this->_minus . $this->_sep;
$num = substr($num, 1);
}
 
// if the absolute value is greater than 9.99*10^302, return infinity
if (strlen($num)>306) {
return $ret . $this->_infinity;
}
 
// strip excessive zero signs
$num = ltrim($num, '0');
 
// split $num to groups of three-digit numbers
$num_groups = $this->_splitNumber($num);
 
$sizeof_numgroups = count($num_groups);
 
foreach ($num_groups as $i=>$number) {
// what is the corresponding exponent for the current group
$pow = $sizeof_numgroups-$i;
 
// skip processment for empty groups
if ($number!='000') {
if ($number!=1 || $pow!=2) {
$ret .= $this->_showDigitsGroup($number, $i+1==$sizeof_numgroups).$this->_sep;
}
$ret .= $this->_exponent[($pow-1)*3];
if ($pow>2 && $number>1) {
$ret .= $this->_plural;
}
$ret .= $this->_sep;
}
}
 
return rtrim($ret, $this->_sep);
}
// }}}
}
?>
/tags/v4.0/client/annuaire/bibliotheque/annuaire.fonct.php
New file
0,0 → 1,324
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 4.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library 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 |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: annuaire.fonct.php,v 1.1 2005/03/24 08:46:07 alex Exp $
/**
* Fonctions du module annuaire
*
* Fonctions du module annuaire
*
*@package annuaire
//Auteur original :
*@author Alexandre Granier <alexandre@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.1 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTETE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
 
 
 
// +------------------------------------------------------------------------------------------------------+
// | LISTE de FONCTIONS |
// +------------------------------------------------------------------------------------------------------+
 
function AUTH_formulaire_login() {
$res = '';
$url = preg_replace ('/&amp;/', '&', $GLOBALS['ann_url']->getURL()) ;
 
$res .= '<p>'.ANN_IDENTIFICATION_PRESENTATION_XHTML.'</p>'."\n" ;
$form = new HTML_QuickForm ('inscription', 'post', $url) ;
$form->addElement ('text', 'username', ANN_EMAIL) ;
$form->addElement ('password', 'password', ANN_MOT_DE_PASSE) ;
$form->addElement('submit', 'valider', ANN_VALIDER);
$res .= $form->toHTML() ;
 
return $res;
}
 
/** function parcourrirAnnu () Affiche l'annuaire à partir d'une lettre
*
*
*
* @return string HTML
*/
function parcourrirAnnu() {
 
$res = '<p id="annuaire_alphabet">';
 
// Alphabet pour la rechercher par lettre du nom des inscrits
for ($i = 65 ; $i <91 ; $i++) {
$GLOBALS['ann_url']->addQueryString('lettre', chr($i));
$url_lettre = $GLOBALS['ann_url']->getURL();
$GLOBALS['ann_url']->removeQueryString('lettre');
$res .= '<a href="'.$url_lettre.'">'.chr($i).'</a>&nbsp;'."\n";
}
if (ANN_TOUS_BOOL) {
$GLOBALS['ann_url']->addQueryString('lettre', 'tous');
$url_lettre = $GLOBALS['ann_url']->getURL();
$GLOBALS['ann_url']->removeQueryString('lettre');
$res .= '<a href="'.$url_lettre.'">'.'Tous'.'</a>'."\n";
}
$res .= '</p>'."\n";
 
// Si aucune lettre n'est sélectionnée, attribution de la lettre par défaut
if (empty($_REQUEST['lettre'])) {
$_REQUEST['lettre'] = ANN_LETTRE_DEFAUT;
}
// Une lettre est disponible...
$requete = 'SELECT '.ANN_ANNUAIRE.'.*, '.ANN_TABLE_PAYS.'.* '.
'FROM '.ANN_ANNUAIRE.','.ANN_TABLE_PAYS.' '.
'WHERE '.ANN_CHAMPS_PAYS.' = '.ANN_GC_ID.' ';
if ($_REQUEST['lettre'] != 'tous') {
$requete .= ' AND '.ANN_CHAMPS_NOM.' LIKE "'.$_REQUEST['lettre'].'%" ' ;
}
$requete .= 'ORDER BY '.ANN_CHAMPS_NOM;
$res .= listes_inscrit($requete, $GLOBALS['ann_url']->getURL(), '', $GLOBALS['ann_db'], $niveau = 'pays').
carto_texte_cocher().
carto_formulaire();
 
return $res;
}
 
/**
* Renvoie le code HTML de la liste des inscrits
* en fonction de la requete passé en parametre
*
* @return Renvoie le code HTML de la liste des inscrits
*/
function listes_inscrit($requete, $url, $argument, &$db, $niveau = 'pays') {
$resultat = $GLOBALS['ann_db']->query($requete);
(DB::isError($resultat)) ? die($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) : '';
if ($resultat->numRows() > 0) {
$res = '<form action="'.$url.'?mailer=1&amp;lettre='.$_REQUEST['lettre'].'" method="post" name="formmail">'."\n";
$res .= '<div id="annuaire" class="conteneur_table">
<table id="table_inscrit" class="table_cadre">
<colgroup>
<col />
<col />
<col />
<col />
<col />
<col />
<col />
</colgroup>
<thead class="entete_fixe">
<tr>
<th>&nbsp;</th>
<th>'.ANN_NOM.'</th>
<th>'.ANN_PRENOM.'</th>
<th>'.ANN_DATE_INS.'</th>
<th>'.ANN_CP.'</th>
<th>'.ANN_VILLE.'</th>
<th>'.ANN_PAYS.'</th>
</tr>
</thead>
<tbody class="contenu_deroulant">';
$indic = 0;
$i = 1;
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) {
if ($indic == 0) {
$res .= '<tr class="ligne_impaire">'."\n";
$indic = 1;
} else {
$res .= '<tr class="ligne_paire">'."\n";
$indic = 0;
}
$res.= '<td><input type="checkbox" name="select[]" value="'.$ligne[ANN_CHAMPS_MAIL].'" /></td>'."\n".
'<td>'.strtoupper($ligne[ANN_CHAMPS_NOM]).'&nbsp;</td>'."\n".
'<td>'.str_replace(' - ', '-', ucwords(strtolower(str_replace('-', ' - ', $ligne[ANN_CHAMPS_PRENOM])))).'&nbsp;</td>'."\n".
'<td>'.date('d m Y', strtotime($ligne[ANN_CHAMPS_DATE_INS])).'&nbsp;</td>'."\n".
'<td>'.$ligne[ANN_CHAMPS_CODE_POSTAL].'&nbsp;</td>'."\n".
'<td>'.strtoupper($ligne[ANN_CHAMPS_VILLE]).'&nbsp;</td>'."\n".
'<td>'.str_replace(' - ', '-', ucwords(strtolower(str_replace('-', ' - ', ($ligne[ANN_GC_NOM]))))).'&nbsp;</td>'."\n";
$res .= '</tr>'."\n";
}
$res .= '</tbody></table></div>'."\n";
} else {
$res = '<p class="information">'.'Aucun inscrit n\'a de nom commençant par '.$_REQUEST['lettre'].'</p>'."\n";
}
return $res;
}
 
function carto_formulaire() {
$res = '<div id="redaction">'."\n";
$res .= '<div id="redaction_tete"></div>'."\n";
$res .= '<h2 class="chapo">'.ANN_ENVOYER_MAIL.'</h2>'."\n";
$res .= '<table>'."\n".
'<tr><td class="texte">'.ANN_SUJET.' :</td>'."\n".
'<td><input class="forml" type="text" name="titre_mail" size="60" value="'.$_POST['titre_mail'].'"/></td>'."\n".
'</tr><tr><td class="texte" valign="top">'.ANN_MESSAGE.'&nbsp;:&nbsp;</td>'."\n".
'<td><textarea class="forml" name="corps" rows="5" cols="60">'.$_POST['corps'].'</textarea></td>'."\n".
'</tr><tr><td></td><td align="center">';
$res .='<input class="spip_bouton" type="submit" value="'.ANN_ENVOYER.'" />';
$res .= '</td>'."\n";
$res .= '</tr>'."\n";
$res .= '</table>'."\n";
$res .= '</form>'."\n";
$res .= '<div id="redaction_pied"/></div>'."\n";
$res .= '</div>'."\n";
$res .= '<p class="attention surveillance">'.ANN_SURVEILLANCE.'</p>' ;
$res .= '<p class="information message_a_tous">'.sprintf(ANN_MESSAGE_A_TOUS, '<a href="'.ANN_URL_ACTUALITE.'">'.ANN_ACTUALITE.'</a>').'</p>' ;
return $res ;
}
 
/** function carto_texte_cocher ()
*
*
* @return string HTML
*/
function carto_texte_cocher() {
$res .= '<div class="texte">'.ANN_CHECK_UNCHECK."\n";
$res .= '&nbsp;<input type="checkbox" name="selecttotal" onclick="javascript:setCheckboxes(\'formmail\');"/>'."\n";
$res .= '</div>';
return $res;
}
 
/** envoie_mail()
*
*
* @return envoie l'email
*/
function envoie_mail($selection, $titre_mail, $corps) {
$requete = 'SELECT '.ANN_CHAMPS_MAIL.' '.
'FROM '.ANN_ANNUAIRE.' '.
'WHERE '.ANN_CHAMPS_ID.' = "'.$GLOBALS['AUTH']->getAuthData(ANN_CHAMPS_ID).'" ';
$resultat = $GLOBALS['ann_db']->query($requete);
if (DB::isError($resultat)) {
die($resultat->getMessage().'<br />'.$resultat->getDebugInfo());
}
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC);
 
$liste = '';
$entete = '' ;
foreach ($selection as $key => $value) {
$liste .= $value."," ;
}
$precorps = $ligne[ANN_CHAMPS_MAIL]." ".ANN_EXPEDITEUR_ORIGINAL." \n" ;
$precorps .= ANN_LISTE_DESTINATAIRES." : ".$liste." \n" ;
$precorps .= ANN_TITRE_MAIL.' : '.$titre_mail." \n" ;
$precorps .= "\n------".ANN_CONTENU_MESSAGE."------\n";
$corps = $precorps.$corps ;
$corps .= "\n\n".ANN_PIED_MESSAGE."\n";
$corps .= "\n----------------------------------------------------------------------------";
$corps .= "\n".ANN_MESSAGE_APPLI."\n" ;
//$corps .= "\n".ANN_MESSAGE_ENVOYE_A." :\n $liste" ;
// Envoie du message au modérateur
if(!mail(MAIL_MODERATION,ANN_TITRE_MAIL_MODERATION,$corps, $entete))
{
trigger_error("Le courriel n'a pas été envoyé à : $courriel", E_USER_WARNING);
}
/*foreach ($GLOBALS['mail_admin'] as $courriel) {
if (!mail($courriel, $titre_mail, $corps, $entete)) {
trigger_error("Le courriel n'a pas été envoyé à : $courriel", E_USER_WANRNING);
}
}*/
 
return '<div class="information">'.ANN_MAIL_ATTENTE_MODERATION.'</div>' ;
}
 
/** translittererVersIso88591()
*
* Convertit les caractères CP1252 (= ANSI) non présent dans l'ISO-8859-1 par un équivalant ressemblant.
*
* @return envoie l'email
*/
function translittererCp1252VersIso88591($str, $translit = true) {
$cp1252_entite_map = array(
'\x80' => '&#8364;', /* EURO SIGN */
'\x82' => '&#8218;', /* SINGLE LOW-9 QUOTATION MARK */
'\x83' => '&#402;', /* LATIN SMALL LETTER F WITH HOOK */
'\x84' => '&#8222;', /* DOUBLE LOW-9 QUOTATION MARK */
'\x85' => '&#8230;', /* HORIZONTAL ELLIPSIS */
'\x86' => '&#8224;', /* DAGGER */
'\x87' => '&#8225;', /* DOUBLE DAGGER */
'\x88' => '&#710;', /* MODIFIER LETTER CIRCUMFLEX ACCENT */
'\x89' => '&#8240;', /* PER MILLE SIGN */
'\x8a' => '&#352;', /* LATIN CAPITAL LETTER S WITH CARON */
'\x8b' => '&#8249;', /* SINGLE LEFT-POINTING ANGLE QUOTATION */
'\x8c' => '&#338;', /* LATIN CAPITAL LIGATURE OE */
'\x8e' => '&#381;', /* LATIN CAPITAL LETTER Z WITH CARON */
'\x91' => '&#8216;', /* LEFT SINGLE QUOTATION MARK */
'\x92' => '&#8217;', /* RIGHT SINGLE QUOTATION MARK */
'\x93' => '&#8220;', /* LEFT DOUBLE QUOTATION MARK */
'\x94' => '&#8221;', /* RIGHT DOUBLE QUOTATION MARK */
'\x95' => '&#8226;', /* BULLET */
'\x96' => '&#8211;', /* EN DASH */
'\x97' => '&#8212;', /* EM DASH */
'\x98' => '&#732;', /* SMALL TILDE */
'\x99' => '&#8482;', /* TRADE MARK SIGN */
'\x9a' => '&#353;', /* LATIN SMALL LETTER S WITH CARON */
'\x9b' => '&#8250;', /* SINGLE RIGHT-POINTING ANGLE QUOTATION*/
'\x9c' => '&#339;', /* LATIN SMALL LIGATURE OE */
'\x9e' => '&#382;', /* LATIN SMALL LETTER Z WITH CARON */
'\x9f' => '&#376;' /* LATIN CAPITAL LETTER Y WITH DIAERESIS*/
);
$translit_map = array(
'&#8364;' => 'Euro', /* EURO SIGN */
'&#8218;' => ',', /* SINGLE LOW-9 QUOTATION MARK */
'&#402;' => 'f', /* LATIN SMALL LETTER F WITH HOOK */
'&#8222;' => ',,', /* DOUBLE LOW-9 QUOTATION MARK */
'&#8230;' => '...', /* HORIZONTAL ELLIPSIS */
'&#8224;' => '+', /* DAGGER */
'&#8225;' => '++', /* DOUBLE DAGGER */
'&#710;' => '^', /* MODIFIER LETTER CIRCUMFLEX ACCENT */
'&#8240;' => '0/00', /* PER MILLE SIGN */
'&#352;' => 'S', /* LATIN CAPITAL LETTER S WITH CARON */
'&#8249;' => '<', /* SINGLE LEFT-POINTING ANGLE QUOTATION */
'&#338;' => 'OE', /* LATIN CAPITAL LIGATURE OE */
'&#381;' => 'Z', /* LATIN CAPITAL LETTER Z WITH CARON */
'&#8216;' => "'", /* LEFT SINGLE QUOTATION MARK */
'&#8217;' => "'", /* RIGHT SINGLE QUOTATION MARK */
'&#8220;' => '"', /* LEFT DOUBLE QUOTATION MARK */
'&#8221;' => '"', /* RIGHT DOUBLE QUOTATION MARK */
'&#8226;' => '*', /* BULLET */
'&#8211;' => '-', /* EN DASH */
'&#8212;' => '--', /* EM DASH */
'&#732;' => '~', /* SMALL TILDE */
'&#8482;' => '(TM)', /* TRADE MARK SIGN */
'&#353;' => 's', /* LATIN SMALL LETTER S WITH CARON */
'&#8250;' => '>', /* SINGLE RIGHT-POINTING ANGLE QUOTATION*/
'&#339;' => 'oe', /* LATIN SMALL LIGATURE OE */
'&#382;' => 'z', /* LATIN SMALL LETTER Z WITH CARON */
'&#376;' => 'Y' /* LATIN CAPITAL LETTER Y WITH DIAERESIS*/
);
$str = strtr($str, $cp1252_entite_map);
if ($translit) {
$str = strtr($str, $translit_map);
}
return $str;
}
?>
/tags/v4.0/client/annuaire/bibliotheque/Words.php
New file
0,0 → 1,188
<?php
/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
//
// +----------------------------------------------------------------------+
// | PHP version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2006 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Piotr Klaban <makler@man.torun.pl> |
// +----------------------------------------------------------------------+
//
// $Id: Words.php,v 1.4 2006/06/13 11:29:35 makler Exp $
//
 
/**
* The Numbers_Words class provides method to convert arabic numerals to
* words (also with currency name).
*
* @author Piotr Klaban <makler@man.torun.pl>
* @package Numbers_Words
*/
 
// {{{ Numbers_Words
 
/**
* The Numbers_Words class provides method to convert arabic numerals to words.
*
* @access public
* @author Piotr Klaban <makler@man.torun.pl>
* @since PHP 4.2.3
* @package Numbers_Words
*/
class Numbers_Words
{
// {{{ toWords()
 
/**
* Converts a number to its word representation
*
* @param integer $num An integer between -infinity and infinity inclusive :)
* that should be converted to a words representation
*
* @param string $locale Language name abbreviation. Optional. Defaults to en_US.
*
* @return string The corresponding word representation
*
* @access public
* @author Piotr Klaban <makler@man.torun.pl>
* @since PHP 4.2.3
*/
function toWords($num, $locale = 'en_US') {
 
include_once("Words/lang.${locale}.php");
 
$classname = "Numbers_Words_${locale}";
 
if (!class_exists($classname)) {
return Numbers_Words::raiseError("Unable to include the Numbers/Words/lang.${locale}.php file");
}
 
$methods = get_class_methods($classname);
 
if (!in_array('toWords', $methods) && !in_array('towords', $methods)) {
return Numbers_Words::raiseError("Unable to find toWords method in '$classname' class");
}
 
@$obj =& new $classname;
 
return trim($obj->toWords($num));
}
// }}}
// {{{ toCurrency()
/**
* Converts a currency value to word representation (1.02 => one dollar two cents)
* If the number has not any fraction part, the "cents" number is omitted.
*
* @param float $num A float/integer/string number representing currency value
*
* @param string $locale Language name abbreviation. Optional. Defaults to en_US.
*
* @param string $int_curr International currency symbol
* as defined by the ISO 4217 standard (three characters).
* E.g. 'EUR', 'USD', 'PLN'. Optional.
* Defaults to $def_currency defined in the language class.
*
* @return string The corresponding word representation
*
* @access public
* @author Piotr Klaban <makler@man.torun.pl>
* @since PHP 4.2.3
*/
function toCurrency($num, $locale = 'en_US', $int_curr = '') {
$ret = $num;
 
@include_once("Numbers/Words/lang.${locale}.php");
 
$classname = "Numbers_Words_${locale}";
 
if (!class_exists($classname)) {
return Numbers_Words::raiseError("Unable to include the Numbers/Words/lang.${locale}.php file");
}
 
$methods = get_class_methods($classname);
 
if (!in_array('toCurrencyWords', $methods) && !in_array('tocurrencywords', $methods)) {
return Numbers_Words::raiseError("Unable to find toCurrencyWords method in '$classname' class");
}
 
@$obj =& new $classname;
 
if (strpos($num, '.') === false)
{
$ret = trim($obj->toCurrencyWords($int_curr, $num));
} else {
$currency = explode('.', $num, 2);
/* add leading zero */
if (strlen($currency[1]) == 1) {
$currency[1] .= '0';
}
$ret = trim($obj->toCurrencyWords($int_curr, $currency[0], $currency[1]));
}
return $ret;
}
// }}}
// {{{ getLocales()
/**
* Lists available locales for Numbers_Words
*
* @param string $int_curr International currency symbol
* @param mixed string/array of strings $locale
* Optional searched language name abbreviation.
* Default: all available locales.
*
* @return array The available locales (optionaly only the requested ones)
* @author Piotr Klaban <makler@man.torun.pl>
* @author Bertrand Gugger, bertrand at toggg dot com
*
* @access public
* @static
*/
function getLocales($locale = null) {
$ret = array();
if (isset($locale) && is_string($locale)) {
$locale = array($locale);
}
$dname = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Words' . DIRECTORY_SEPARATOR;
$dh=opendir($dname);
if ($dh) {
while ($fname = readdir($dh)) {
if (preg_match('#^lang\.([a-z_]+)\.php$#i', $fname, $matches)) {
if (is_file($dname . $fname) && is_readable($dname . $fname) &&
(!isset($locale) || in_array($matches[1], $locale))) {
$ret[] = $matches[1];
}
}
}
closedir($dh);
sort($ret);
}
return $ret;
}
// }}}
// {{{ raiseError()
/**
* Trigger a PEAR error
*
* To improve performances, the PEAR.php file is included dynamically.
*
* @param string error message
*/
function raiseError($msg)
{
include_once('PEAR.php');
return PEAR::raiseError($msg);
}
// }}}
}
 
// }}}
?>
/tags/v4.0/client/annuaire/signature_Mathez.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/tags/v4.0/client/annuaire/signature_Mathez.png
New file
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/tags/v4.0/client/annuaire/voir_recu_pdf.php
New file
0,0 → 1,39
<?php
// +----------------------------------------------------------------------------+
// |recu_pdf.php |
// +----------------------------------------------------------------------------+
// | Copyright (c) 2003 Tela Botanica |
// +----------------------------------------------------------------------------+
// | Ce fichier génère un fichier PDF |
// | contenant le recu pour une cotisation à Tela Botanica |
// | Il utilise la librairie FPDF |
// | http://www.fpdf.org/ |
// | |
// | Recoie $cotisation_id en parametre |
// +----------------------------------------------------------------------------+
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> |
// +----------------------------------------------------------------------------+
//
// $Id: voir_recu_pdf.php,v 1.1.1.1 2005/01/03 17:27:49 alex Exp $
 
 
// Inclusion des fichiers nécessaire à une connection
include_once ("../../papyrus/configuration/pap_config.inc.php") ;
include_once 'DB.php' ;
 
$db = DB::connect (PAP_DSN) ;
 
include_once "../../api/fpdf/fpdf.php";
 
$envoie = 1 ;
 
include_once "recu_pdf_corps.php" ;
 
 
// buffer est une propriété de la classe FPDF qui contient les données au format PDF.
// habituellement on ne l'utilise pas, on appelle $pdf->Output() qui envoie les
// entete HTTP du document généré
 
$pdf->Output() ;
 
?>