[ Index ] |
|
Code source de Dolibarr 2.0.1 |
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 * Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com> 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: modSociete.class.php,v 1.34 2005/12/02 12:28:47 hregis Exp $ 23 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/includes/modules/modSociete.class.php,v $ 24 * 25 */ 26 27 /** 28 \defgroup societe Module societe 29 \brief Module pour gérer les societes et contacts clients 30 */ 31 32 /** 33 \file htdocs/includes/modules/modSociete.class.php 34 \ingroup societe 35 \brief Fichier de description et activation du module Societe 36 */ 37 38 include_once "DolibarrModules.class.php"; 39 40 /** 41 \class modSociete 42 \brief Classe de description et activation du module Societe 43 */ 44 45 class modSociete extends DolibarrModules 46 { 47 48 /** 49 * \brief Constructeur. Definit les noms, constantes et boites 50 * \param DB handler d'accès base 51 */ 52 function modSociete($DB) 53 { 54 $this->db = $DB ; 55 $this->numero = 1 ; 56 57 $this->family = "crm"; 58 $this->name = "Module societe"; 59 $this->description = "Gestion des sociétés et contacts"; 60 61 $this->revision = explode(' ','$Revision: 1.34 $'); 62 $this->version = $this->revision[1]; 63 64 $this->const_name = 'MAIN_MODULE_SOCIETE'; 65 $this->special = 0; 66 $this->config_page_url = "societe.php"; 67 $this->picto='company'; 68 69 // Dir 70 $this->dirs = array(); 71 72 // Dépendances 73 $this->depends = array(); 74 $this->requiredby = array("modCommercial","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande"); 75 76 // Constantes 77 $this->const = array(); 78 79 // Boxes 80 $this->boxes = array(); 81 82 // Permissions 83 $this->rights = array(); 84 $this->rights_class = 'societe'; 85 86 $this->rights[1][0] = 121; // id de la permission 87 $this->rights[1][1] = 'Lire les societes'; // libelle de la permission 88 $this->rights[1][2] = 'r'; // type de la permission (déprécié à ce jour) 89 $this->rights[1][3] = 1; // La permission est-elle une permission par défaut 90 $this->rights[1][4] = 'lire'; 91 92 $this->rights[2][0] = 122; // id de la permission 93 $this->rights[2][1] = 'Créer modifier les societes'; // libelle de la permission 94 $this->rights[2][2] = 'w'; // type de la permission (déprécié à ce jour) 95 $this->rights[2][3] = 0; // La permission est-elle une permission par défaut 96 $this->rights[2][4] = 'creer'; 97 98 $this->rights[3][0] = 129; // id de la permission 99 $this->rights[3][1] = 'Supprimer les sociétés'; // libelle de la permission 100 $this->rights[3][2] = 'd'; // type de la permission (déprécié à ce jour) 101 $this->rights[3][3] = 0; // La permission est-elle une permission par défaut 102 $this->rights[3][4] = 'supprimer'; 103 104 $this->rights[4][0] = 281; // id de la permission 105 $this->rights[4][1] = 'Lire les contacts'; // libelle de la permission 106 $this->rights[4][2] = 'r'; // type de la permission (déprécié à ce jour) 107 $this->rights[4][3] = 1; // La permission est-elle une permission par défaut 108 $this->rights[4][4] = 'contact'; 109 $this->rights[4][5] = 'lire'; 110 111 $this->rights[5][0] = 282; // id de la permission 112 $this->rights[5][1] = 'Créer modifier les contacts'; // libelle de la permission 113 $this->rights[5][2] = 'w'; // type de la permission (déprécié à ce jour) 114 $this->rights[5][3] = 0; // La permission est-elle une permission par défaut 115 $this->rights[5][4] = 'contact'; 116 $this->rights[5][5] = 'creer'; 117 118 $this->rights[6][0] = 283; // id de la permission 119 $this->rights[6][1] = 'Supprimer les contacts'; // libelle de la permission 120 $this->rights[6][2] = 'd'; // type de la permission (déprécié à ce jour) 121 $this->rights[6][3] = 0; // La permission est-elle une permission par défaut 122 $this->rights[6][4] = 'contact'; 123 $this->rights[6][5] = 'supprimer'; 124 125 } 126 127 128 /** 129 * \brief Fonction appelée lors de l'activation du module. Insère en base les constantes, boites, permissions du module. 130 * Définit également les répertoires de données à créer pour ce module. 131 */ 132 function init() 133 { 134 global $conf; 135 136 // Permissions 137 $this->remove(); 138 139 // Dir 140 $this->dirs[0] = $conf->societe->dir_output; 141 142 $sql = array(); 143 144 return $this->_init($sql); 145 } 146 147 /** 148 * \brief Fonction appelée lors de la désactivation d'un module. 149 * Supprime de la base les constantes, boites et permissions du module. 150 */ 151 function remove() 152 { 153 $sql = array(); 154 155 return $this->_remove($sql); 156 } 157 } 158 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |