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

   1  <?php
   2  /* Copyright (C) 2005      Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2004-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: modContrat.class.php,v 1.25 2005/10/22 13:45:24 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modContrat.class.php,v $
  21   *
  22   */
  23  
  24  /**
  25          \defgroup   contrat     Module contrat
  26          \brief      Module pour gérer la tenue de contrat de services
  27  */
  28  
  29  /**
  30          \file       htdocs/includes/modules/modContrat.class.php
  31          \ingroup    contrat
  32          \brief      Fichier de description et activation du module Contrat
  33  */
  34  
  35  include_once  "DolibarrModules.class.php";
  36  
  37  
  38  /**
  39          \class      modContrat
  40          \brief      Classe de description et activation du module Contrat
  41  */
  42  
  43  class modContrat extends DolibarrModules
  44  {
  45  
  46      /**
  47       *   \brief      Constructeur. Definit les noms, constantes et boites
  48       *   \param      DB      handler d'accès base
  49       */
  50      function modcontrat($DB)
  51      {
  52          $this->db = $DB ;
  53          $this->numero = 54 ;
  54  
  55          $this->family = "crm";
  56          $this->name = "Contrats";
  57          $this->description = "Gestion des contrats de services";
  58  
  59          $this->revision = explode(' ','$Revision: 1.25 $');
  60          $this->version = $this->revision[1];
  61  
  62          $this->const_name = 'MAIN_MODULE_CONTRAT';
  63          $this->special = 0;
  64          $this->picto='contract';
  65  
  66          // Dir
  67          $this->dirs = array();
  68  
  69          // Dépendances
  70          $this->depends = array("modService");
  71          $this->requiredby = array();
  72  
  73          // Constantes
  74          $this->const = array();
  75  
  76          // Boites
  77          $this->boxes = array();
  78  
  79          // Permissions
  80          $this->rights = array();
  81          $this->rights_class = 'contrat';
  82  
  83          $this->rights[1][0] = 161;
  84          $this->rights[1][1] = 'Lire les contrats';
  85          $this->rights[1][2] = 'r';
  86          $this->rights[1][3] = 1;
  87          $this->rights[1][4] = 'lire';
  88  
  89          $this->rights[2][0] = 162;
  90          $this->rights[2][1] = 'Créer / modifier les contrats';
  91          $this->rights[2][2] = 'w';
  92          $this->rights[2][3] = 0;
  93          $this->rights[2][4] = 'creer';
  94  
  95          $this->rights[3][0] = 163;
  96          $this->rights[3][1] = 'Activer un service d\'un contrat';
  97          $this->rights[3][2] = 'w';
  98          $this->rights[3][3] = 0;
  99          $this->rights[3][4] = 'activer';
 100  
 101          $this->rights[4][0] = 164;
 102          $this->rights[4][1] = 'Désactiver un service d\'un contrat';
 103          $this->rights[4][2] = 'w';
 104          $this->rights[4][3] = 0;
 105          $this->rights[4][4] = 'desactiver';
 106  
 107          $this->rights[5][0] = 165;
 108          $this->rights[5][1] = 'Supprimer un contrat';
 109          $this->rights[5][2] = 'd';
 110          $this->rights[5][3] = 0;
 111          $this->rights[5][4] = 'supprimer';
 112  
 113      }
 114  
 115  
 116      /**
 117       *   \brief      Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module.
 118       *               Définit également les répertoires de données à créer pour ce module.
 119       */
 120      function init()
 121      {
 122          global $conf;
 123          
 124          // Nettoyage avant activation
 125          $this->remove();
 126  
 127          return $this->_init($sql);
 128      }
 129  
 130      /**
 131       *    \brief      Fonction appelée lors de la désactivation d'un module.
 132       *                Supprime de la base les constantes, boites et permissions du module.
 133       */
 134      function remove()
 135      {
 136          $sql = array();
 137  
 138          return $this->_remove($sql);
 139  
 140      }
 141  }
 142  ?>


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