[ 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/ -> modMailing.class.php (source)

   1  <?php
   2  /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: modMailing.class.php,v 1.4 2005/10/22 13:45:24 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modMailing.class.php,v $
  21   *
  22   */
  23  
  24  /**
  25     \defgroup   mailing  Module mailing
  26     \brief      Module pour gérer les mailings
  27  */
  28  
  29  /**
  30     \file       htdocs/includes/modules/modMailing.class.php
  31     \ingroup    mailing
  32     \brief      Fichier de description et activation du module Mailing
  33  */
  34  
  35  include_once  "DolibarrModules.class.php";
  36  
  37  /**
  38     \class      modMailing
  39     \brief      Classe de description et activation du module Mailing
  40  */
  41  
  42  class modMailing extends DolibarrModules
  43  {
  44  
  45     /**
  46      *   \brief      Constructeur. Definit les noms, constantes et boites
  47      *   \param      DB      handler d'accès base
  48      */
  49    function modMailing($DB)
  50    {
  51      $this->db = $DB ;
  52      $this->numero = 22 ;
  53  
  54      $this->family = "technic";
  55      $this->name = "Mailings";
  56      $this->description = "Gestion des Mailings";
  57      $this->version = 'dolibarr';    // 'experimental' or 'dolibarr' or version
  58      $this->const_name = 'MAIN_MODULE_MAILING';
  59      $this->special = 1;
  60      $this->picto='email';
  61  
  62      // Dir
  63      $this->dirs = array();
  64  
  65      // Dépendances
  66      $this->depends = array();
  67      $this->requiredby = array();
  68  
  69      // Constantes
  70      $this->const = array();
  71  
  72      // Boites
  73      $this->boxes = array();
  74  
  75      // Permissions
  76      $this->rights = array();
  77      $this->rights_class = 'mailing';
  78  
  79      $this->rights[1][0] = 221; // id de la permission
  80      $this->rights[1][1] = 'Consulter les mailings'; // libelle de la permission
  81      $this->rights[1][2] = 'r'; // type de la permission (déprécié à ce jour)
  82      $this->rights[1][3] = 1; // La permission est-elle une permission par défaut
  83      $this->rights[1][4] = 'lire';
  84  
  85      $this->rights[2][0] = 222;
  86      $this->rights[2][1] = 'Créer/modifier les mailings (sujet, destinataires...)';
  87      $this->rights[2][2] = 'w';
  88      $this->rights[2][3] = 0;
  89      $this->rights[2][4] = 'creer';
  90  
  91      $this->rights[3][0] = 223;
  92      $this->rights[3][1] = 'Valider les mailings (permet leur envoi)';
  93      $this->rights[3][2] = 'w';
  94      $this->rights[3][3] = 0;
  95      $this->rights[3][4] = 'valider';
  96  
  97      $this->rights[4][0] = 229;
  98      $this->rights[4][1] = 'Supprimer les mailings)';
  99      $this->rights[4][2] = 'd';
 100      $this->rights[4][3] = 0;
 101      $this->rights[4][4] = 'supprimer';
 102      
 103    }
 104  
 105  
 106     /**
 107      *   \brief      Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
 108      *               Définit également les répertoires de données à créer pour ce module.
 109      */
 110    function init()
 111    {
 112      // Permissions
 113      $this->remove();
 114     
 115      return $this->_init($sql);
 116    }
 117  
 118    /**
 119      \brief      Fonction appelée lors de la désactivation d'un module.
 120      Supprime de la base les constantes, boites et permissions du module.
 121     */
 122    function remove()
 123    {
 124      $sql = array();
 125  
 126      return $this->_remove($sql);
 127    }
 128  }
 129  ?>


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