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

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


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