[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/includes/modules/ -> modAdherent.class.php (source)

   1  <?php
   2  /* Copyright (C) 2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2003      Jean-Louis Bergamo   <jlb@j1b.org>
   4   * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
   5   * Copyright (C) 2004      Sebastien Di Cintio  <sdicintio@ressource-toi.org>
   6   * Copyright (C) 2004      Benoit Mortier       <benoit.mortier@opensides.be>
   7   *
   8   * This program is free software; you can redistribute it and/or modify
   9   * it under the terms of the GNU General Public License as published by
  10   * the Free Software Foundation; either version 2 of the License, or
  11   * (at your option) any later version.
  12   *
  13   * This program is distributed in the hope that it will be useful,
  14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16   * GNU General Public License for more details.
  17   *
  18   * You should have received a copy of the GNU General Public License
  19   * along with this program; if not, write to the Free Software
  20   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  21   *
  22   * $Id: modAdherent.class.php,v 1.25 2005/10/22 13:45:24 eldy Exp $
  23   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modAdherent.class.php,v $
  24   */
  25  
  26  /**
  27          \defgroup   adherent     Module adherents
  28          \brief      Module pour gérer les adhérents d'une association
  29  */
  30  
  31  /**
  32          \file       htdocs/includes/modules/modAdherent.class.php
  33          \ingroup    adherent
  34          \brief      Fichier de description et activation du module adherents
  35  */
  36  
  37  include_once  "DolibarrModules.class.php";
  38  
  39  /**
  40          \class      modAdherent
  41          \brief      Classe de description et activation du module Adherent
  42  */
  43  
  44  class modAdherent extends DolibarrModules
  45  {
  46  
  47      /**
  48       *   \brief      Constructeur. Definit les noms, constantes et boites
  49       *   \param      DB      handler d'accès base
  50       */
  51      function modAdherent($DB)
  52      {
  53          $this->db = $DB ;
  54          $this->numero = 310 ;
  55      
  56          $this->family = "hr";
  57          $this->name = "Adhérents";
  58          $this->description = "Gestion des adhérents d'une association";
  59          $this->version = 'dolibarr';                        // 'experimental' or 'dolibarr' or version
  60          $this->const_name = 'MAIN_MODULE_ADHERENT';
  61          $this->special = 1;
  62          $this->picto='user';
  63      
  64          // Dir
  65          //----
  66          $this->dirs = array();
  67      
  68          // Config pages
  69          //-------------
  70          $this->config_page_url = "adherent.php";
  71      
  72          // Dépendances
  73          //------------
  74          $this->depends = array();
  75          $this->requiredby = array();
  76      
  77          // Constantes
  78          //-----------
  79          $this->const = array();
  80          $this->const[0]= array("ADHERENT_MAIL_RESIL","texte","Votre adhesion sur %SERVEUR% vient d'etre resilie.\r\nNous esperons vous revoir tres bientot","Mail de résiliation");
  81          $this->const[1]=array("ADHERENT_MAIL_VALID","texte","Votre adhesion vient d'etre validee. \r\nVoici le rappel de vos coordonnees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l'adresse suivante : \r\n%SERVEUR%public/adherents/","Mail de validation");
  82          $this->const[2]= array("ADHERENT_MAIL_EDIT","texte","Voici le rappel des coordonnees que vous avez modifiees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l'adresse suivante :\r\n%SERVEUR%public/adherents/","Mail d'edition");
  83          $this->const[3] = array("ADHERENT_MAIL_RESIL","texte","Votre adhesion sur %SERVEUR% vient d'etre resilie.\r\nNous esperons vous revoir tres bientot","Mail de résiliation");
  84          $this->const[4] = array("ADHERENT_MAIL_NEW","texte","Merci de votre inscription. Votre adhesion devrait etre rapidement validee.^M\nVoici le rappel des coordonnees que vous avez rentrees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l'adresse suivante :\r\n%SERVEUR%public/adherents/","Mail de nouvel inscription");
  85          $this->const[5] = array("ADHERENT_MAIL_VALID_SUBJECT","chaine"," Votre adh<E9>sion a ete valid<E9>e sur %SERVEUR%","sujet du mail de validation");
  86          $this->const[6] = array("ADHERENT_MAIL_RESIL_SUBJECT","chaine","Resiliation de votre adhesion sur %SERVEUR% ","sujet du mail de resiliation");
  87          $this->const[7] = array("ADHERENT_MAIL_NEW_SUBJECT","chaine","Bienvenue sur %SERVEUR%","Sujet du mail de nouvelle adhesion");
  88          $this->const[8] = array("ADHERENT_MAIL_EDIT_SUBJECT","chaine","Votre fiche a ete editee sur %SERVEUR%","Sujet du mail d'edition");
  89          $this->const[9] = array("ADHERENT_GLASNOST_SERVEUR","chaine","","serveur glasnost");
  90          $this->const[10] = array("ADHERENT_MAILMAN_UNSUB_URL","chaine","http://%SERVER%/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%ADMINPW%&user=%EMAIL%","Url de desinscription aux listes mailman");
  91          $this->const[11] = array("ADHERENT_MAILMAN_URL","chaine","http://%SERVER%/cgi-bin/mailman/admin/%LISTE%/members?adminpw=%ADMINPW%&send_welcome_msg_to_this_batch=1&subscribees=%EMAIL%","url pour les inscriptions mailman");
  92          $this->const[12] = array("ADHERENT_MAILMAN_LISTS","chaine","","Listes auxquelles les nouveaux adhérents sont inscris");
  93          $this->const[13] = array("ADHERENT_GLASNOST_USER","chaine","","Administrateur glasnost");
  94          $this->const[14] = array("ADHERENT_GLASNOST_PASS","chaine","","password de l'administrateur");
  95          $this->const[15] = array("ADHERENT_USE_GLASNOST_AUTO","yesno","","inscription automatique a glasnost ?");
  96          $this->const[16] = array("ADHERENT_USE_SPIP_AUTO","yesno","","Utilisation de SPIP automatiquement");
  97          $this->const[17] = array("ADHERENT_SPIP_USER","chaine","","Utilisateur de connection a la base spip");
  98          $this->const[18] = array("ADHERENT_SPIP_PASS","chaine","","Mot de passe de connection a la base spip");
  99          $this->const[19] = array("ADHERENT_SPIP_SERVEUR","chaine","","serveur spip");
 100          $this->const[20] = array("ADHERENT_SPIP_DB","chaine","","db spip");
 101          $this->const[21] = array("ADHERENT_MAIL_FROM","chaine","","From des mails");
 102          $this->const[22] = array("ADHERENT_MAIL_COTIS","texte","Bonjour %PRENOM%,^M\n^M\nCet email confirme que votre cotisation a ete recue\r\net enregistree","Mail de validation de cotisation");
 103          $this->const[23] = array("ADHERENT_MAIL_COTIS_SUBJECT","chaine"," Recu de votre cotisation","sujet du mail de validation de cotisation");
 104          $this->const[24] = array("ADHERENT_TEXT_NEW_ADH","texte","","Texte d'entete du formaulaire d'adhesion en ligne");
 105          $this->const[25] = array("ADHERENT_CARD_HEADER_TEXT","chaine","%ANNEE%","Texte imprime sur le haut de la carte adherent");
 106          $this->const[26] = array("ADHERENT_CARD_FOOTER_TEXT","chaine","Association %SERVER%","Texte imprime sur le bas de la carte adherent");
 107          $this->const[27] = array("ADHERENT_CARD_TEXT","texte","%PRENOM% %NOM%\r\nMembre n° %ID%\r\n%EMAIL%\r\n%ADRESSE%\r\n%CP% %VILLE%\r\n%PAYS%","Texte imprime sur la carte adherent");
 108          $this->const[28] = array("ADHERENT_MAILMAN_ADMINPW","chaine","","Mot de passe Admin des liste mailman");
 109          $this->const[29] = array("ADHERENT_MAILMAN_SERVER","chaine","","Serveur hebergeant les interfaces d'Admin des listes mailman");
 110          $this->const[30] = array("ADHERENT_MAILMAN_LISTS_COTISANT","chaine","","Liste(s) auxquelles les nouveaux cotisants sont inscris automatiquement");
 111          $this->const[31] = array("ADHERENT_BANK_USE_AUTO","yesno","","Insertion automatique des cotisation dans le compte banquaire");
 112          $this->const[32] = array("ADHERENT_BANK_ACCOUNT","chaine","","ID du Compte banquaire utilise");
 113          $this->const[33] = array("ADHERENT_BANK_CATEGORIE","chaine","","ID de la categorie banquaire des cotisations");
 114          $this->const[34] = array("ADHERENT_ETIQUETTE_TYPE","chaine","L7163","Type d etiquette (pour impression de planche d etiquette)");
 115      
 116          // Boites
 117          //-------
 118          $this->boxes = array();
 119      
 120          // Permissions
 121          //------------
 122          $this->rights = array();
 123          $this->rights_class = 'adherent';
 124          $r=0;
 125  
 126          // $this->rights[$r][0]     Id permission (unique tous modules confondus)
 127          // $this->rights[$r][1]     Libellé par défaut si traduction de clé "PermissionXXX" non trouvée (XXX = Id permission)
 128          // $this->rights[$r][2]     Non utilisé
 129          // $this->rights[$r][3]     1=Permis par defaut, 0=Non permis par defaut
 130          // $this->rights[$r][4]     Niveau 1 pour nommer permission dans code
 131          // $this->rights[$r][5]     Niveau 2 pour nommer permission dans code
 132          
 133          $r++;
 134          $this->rights[$r][0] = 71;
 135          $this->rights[$r][1] = 'Lire les fiche adherents';
 136          $this->rights[$r][2] = 'r';
 137          $this->rights[$r][3] = 1;
 138          $this->rights[$r][4] = 'lire';
 139      
 140          $r++;
 141          $this->rights[$r][0] = 72;
 142          $this->rights[$r][1] = 'Créer/modifier les adherents';
 143          $this->rights[$r][2] = 'w';
 144          $this->rights[$r][3] = 0;
 145          $this->rights[$r][4] = 'creer';
 146      
 147          $r++;
 148          $this->rights[$r][0] = 74;
 149          $this->rights[$r][1] = 'Supprimer les adherents';
 150          $this->rights[$r][2] = 'd';
 151          $this->rights[$r][3] = 0;
 152          $this->rights[$r][4] = 'supprimer';
 153      
 154          $r++;
 155          $this->rights[$r][0] = 76;
 156          $this->rights[$r][1] = 'Exporter les adhérents';
 157          $this->rights[$r][2] = 'r';
 158          $this->rights[$r][3] = 0;
 159          $this->rights[$r][4] = 'export';
 160      
 161          $r++;
 162          $this->rights[$r][0] = 75;
 163          $this->rights[$r][1] = 'Configurer les types et caractéristiques des adherents';
 164          $this->rights[$r][2] = 'w';
 165          $this->rights[$r][3] = 0;
 166          $this->rights[$r][4] = 'configurer';
 167  
 168          $r++;
 169          $this->rights[$r][0] = 78;
 170          $this->rights[$r][1] = 'Lire les cotisations';
 171          $this->rights[$r][2] = 'r';
 172          $this->rights[$r][3] = 1;
 173          $this->rights[$r][4] = 'cotisation';
 174          $this->rights[$r][5] = 'lire';
 175      
 176          $r++;
 177          $this->rights[$r][0] = 79;
 178          $this->rights[$r][1] = 'Créer/modifier les cotisations';
 179          $this->rights[$r][2] = 'w';
 180          $this->rights[$r][3] = 0;
 181          $this->rights[$r][4] = 'cotisation';
 182          $this->rights[$r][5] = 'creer';
 183  
 184          // Exports
 185          //--------
 186          $r=0;
 187  
 188          // $this->export_code[$r]          Code unique identifiant l'export (tous modules confondus)
 189          // $this->export_label[$r]         Libellé par défaut si traduction de clé "ExportXXX" non trouvée (XXX = Code)
 190          // $this->export_fields_sql[$r]    Liste des champs exportables en codif sql
 191          // $this->export_fields_name[$r]   Liste des champs exportables en codif traduction
 192          // $this->export_sql[$r]           Requete sql qui offre les données à l'export
 193          // $this->export_permission[$r]    Liste des codes permissions requis pour faire l'export
 194  
 195          $r++;
 196          $this->export_code[$r]=$this->numero.'_'.$r;
 197          $this->export_label[$r]='Adhérents et attributs';
 198          $this->export_fields_code[$r]=array(0=>'a.nom',1=>'a.prenom',2=>'a.login',3=>'a.cp',4=>'a.ville',5=>'a.pays',6=>'a.email',7=>'a.login',8=>'a.naiss');
 199          $this->export_fields_label[$r]=array(0=>"Lastname",1=>"Firstname",2=>"Address",3=>"Zip",4=>"Town",5=>"Country",6=>"Email",7=>"Login",8=>"Birthday");
 200          $this->export_sql[$r]="select ".join(',',$this->export_fields_code[$r]).' from '.MAIN_DB_PREFIX.'adherent';
 201          $this->export_permission[$r]=array(array("adherent","export"));
 202      }
 203  
 204      
 205      /**
 206       *   \brief      Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
 207       *               Définit également les répertoires de données à créer pour ce module.
 208       */
 209      function init()
 210      {
 211          global $conf;
 212          
 213          // Permissions
 214          $this->remove();
 215          
 216          // Dir
 217          $this->dirs[0] = $conf->adherent->dir_output;
 218          $this->dirs[1] = $conf->adherent->dir_output."/photos";
 219          $this->dirs[2] = $conf->adherent->dir_export;
 220          
 221          $sql = array();
 222          
 223          return $this->_init($sql);
 224      }
 225      
 226      /**
 227       *    \brief      Fonction appelée lors de la désactivation d'un module.
 228       *                Supprime de la base les constantes, boites et permissions du module.
 229       */
 230      function remove()
 231      {
 232      $sql = array();
 233      
 234      return $this->_remove($sql);
 235      }
 236  
 237  }
 238  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics