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

   1  <?php
   2  /* Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
   3   *
   4   * This program is free software; you can redistribute it and/or modify
   5   * it under the terms of the GNU General Public License as published by
   6   * the Free Software Foundation; either version 2 of the License, or
   7   * (at your option) any later version.
   8   *
   9   * This program is distributed in the hope that it will be useful,
  10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12   * GNU General Public License for more details.
  13   *
  14   * You should have received a copy of the GNU General Public License
  15   * along with this program; if not, write to the Free Software
  16   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17   *
  18   * $Id: modDeplacement.class.php,v 1.7 2005/12/03 00:36:18 eldy Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modDeplacement.class.php,v $
  20   */
  21  
  22  /**
  23          \defgroup   deplacement     Module deplacement
  24          \brief      Module pour gérer les déplacements
  25  */
  26  
  27  /**
  28          \file       htdocs/includes/modules/modDeplacement.class.php
  29          \ingroup    deplacement
  30          \brief      Fichier de description et activation du module Deplacement
  31  */
  32  
  33  include_once  "DolibarrModules.class.php";
  34  
  35  /**
  36          \class      modDeplacement
  37          \brief      Classe de description et activation du module Deplacement
  38  */
  39  
  40  class modDeplacement extends DolibarrModules
  41  {
  42  
  43     /**
  44      *   \brief      Constructeur. Definit les noms, constantes et boites
  45      *   \param      DB      handler d'accès base
  46      */
  47    function modDeplacement($DB)
  48    {
  49      $this->db = $DB ;
  50      $this->numero = 75 ;
  51  
  52      $this->family = "crm";
  53      $this->name = "Déplacement";                        // Si traduction Module75Name non trouvée
  54      $this->description = "Gestion des déplacements";    // Si traduction Module75Desc non trouvée
  55  
  56      $this->revision = explode(' ','$Revision: 1.7 $');
  57      $this->version = $this->revision[1];
  58  
  59      $this->const_name = 'MAIN_MODULE_DEPLACEMENT';
  60      $this->special = 0;
  61      $this->picto = "trip";
  62      
  63      // Dir
  64      $this->dirs = array();
  65  
  66      // Config pages
  67      $this->config_page_url = "";
  68  
  69      // Dépendances
  70      $this->depends = array();
  71      $this->requiredby = array();
  72  
  73      // Constantes
  74      $this->const = array();
  75      
  76      // Boxes
  77      $this->boxes = array();
  78  
  79      // Permissions
  80      $this->rights = array();
  81      $this->rights_class = 'deplacement';
  82  
  83      $this->rights[1][0] = 170;
  84      $this->rights[1][1] = 'Lire les déplacements';
  85      $this->rights[1][2] = 'r';
  86      $this->rights[1][3] = 1;
  87      $this->rights[1][4] = 'lire';
  88  
  89      $this->rights[2][0] = 171;
  90      $this->rights[2][1] = 'Créer/modifier les déplacements';
  91      $this->rights[2][2] = 'w';
  92      $this->rights[2][3] = 0;
  93      $this->rights[2][4] = 'creer';
  94  
  95      $this->rights[3][0] = 172;
  96      $this->rights[3][1] = 'Supprimer les déplacements';
  97      $this->rights[3][2] = 'd';
  98      $this->rights[3][3] = 0;
  99      $this->rights[3][4] = 'supprimer';
 100    
 101    }
 102  
 103  
 104     /**
 105      *   \brief      Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
 106      *               Définit également les répertoires de données à créer pour ce module.
 107      */
 108    function init()
 109    {
 110      // Permissions
 111      $this->remove();
 112  
 113      $sql = array();
 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  }
 130  ?>


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