diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php index 998e44fe137..2734a547200 100644 --- a/dev/skeletons/modMyModule.class.php +++ b/dev/skeletons/modMyModule.class.php @@ -53,14 +53,14 @@ class modMyModule extends DolibarrModules // Family can be 'crm','financial','hr','projects','products','ecm','technic','other' // It is used to group modules in module setup page $this->family = "projects"; - // Module label (no space allowed) used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = "MyModuleLabel"; - // Module description used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) $this->description = "Description of module MyModule"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version $this->version = '1.0'; // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) - $this->const_name = 'MAIN_MODULE_MYMODULE'; + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Where to store the module in setup page (0=common,1=interface,2=other) $this->special = 1; // Name of png file (without png) used for this module. diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 9b58399af21..ff9809e677d 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -90,19 +90,11 @@ foreach($modules as $const => $desc) * Affiche page */ -llxHeader("",""); - -$html=new Form($db); - -$h = 0; - -$head[$h][0] = DOL_URL_ROOT."/admin/fckeditor.php"; -$head[$h][1] = $langs->trans("Activation"); -$hselected=$h; -$h++; - -dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); +llxHeader(); +$linkback=''.$langs->trans("BackToModuleList").''; +print_fiche_titre($langs->trans("FCKEditor"),$linkback,'setup'); +print '
'; /* * Activation/désactivation de FCKeditor */ diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 022e58ed25d..545d0113847 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -28,7 +28,7 @@ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); -$mode=isset($_GET["mode"])?$_GET["mode"]:0; +$mode=isset($_GET["mode"])?$_GET["mode"]:(isset($_SESSION['mode'])?$_SESSION['mode']:0); $mesg=isset($_GET["mesg"])?urldecode($_GET["mesg"]):""; if (!$user->admin) @@ -159,6 +159,7 @@ function UnActivate($value,$requiredby=1) /* * Affichage page */ +$_SESSION["mode"]=$mode; llxHeader("",""); @@ -210,8 +211,8 @@ foreach ($dirlist as $dirroot) if ($objMod->needleftmenu && sizeof($objMod->needleftmenu) && ! in_array($conf->left_menu,$objMod->needleftmenu)) $modulequalified=0; if ($objMod->needtopmenu && sizeof($objMod->needtopmenu) && ! in_array($conf->top_menu,$objMod->needtopmenu)) $modulequalified=0; - // We dsicard modules according to features level (if active we always show them) - $const_name = $objMod->const_name; + // We discard modules according to features level (PS: if module is activated we always show it) + $const_name = 'MAIN_MODULE_'.strtoupper(eregi_replace('^mod','',get_class($objMod))); if ($objMod->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2 && ! $conf->global->$const_name) $modulequalified=0; if ($objMod->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1 && ! $conf->global->$const_name) $modulequalified=0; @@ -324,7 +325,7 @@ foreach ($orders as $key => $value) $modName = $filename[$key]; $objMod = $modules[$key]; - $const_name = $objMod->const_name; + $const_name = 'MAIN_MODULE_'.strtoupper(eregi_replace('^mod','',get_class($objMod))); // Load all lang files of module if (is_array($objMod->langfiles)) diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index 59d21409cff..4375900debe 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -179,8 +179,6 @@ foreach ($orders as $key => $value) $objMod = new $modName($db); } - $const_name = $objMod->const_name; - $var=!$var; // Define disabledbyname and disabledbymodule diff --git a/htdocs/includes/modules/DolibarrModules.class.php b/htdocs/includes/modules/DolibarrModules.class.php index 68966c90912..2c035e1b61e 100644 --- a/htdocs/includes/modules/DolibarrModules.class.php +++ b/htdocs/includes/modules/DolibarrModules.class.php @@ -226,7 +226,7 @@ class DolibarrModules } else { - // Si traduction du nom du module n'existe pas, on prend definition en dur dans module + // If translation of module with its numero does not exists, we take its name return $this->name; } } diff --git a/htdocs/includes/modules/modAdherent.class.php b/htdocs/includes/modules/modAdherent.class.php index bfb97fb52ef..db1c8a463f0 100644 --- a/htdocs/includes/modules/modAdherent.class.php +++ b/htdocs/includes/modules/modAdherent.class.php @@ -52,7 +52,8 @@ class modAdherent extends DolibarrModules $this->numero = 310 ; $this->family = "hr"; - $this->name = "Adherents"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion des adherents d'une association"; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_ADHERENT'; diff --git a/htdocs/includes/modules/modAgenda.class.php b/htdocs/includes/modules/modAgenda.class.php index fdc311645c9..45b4ed9ed9a 100644 --- a/htdocs/includes/modules/modAgenda.class.php +++ b/htdocs/includes/modules/modAgenda.class.php @@ -52,10 +52,12 @@ class modAgenda extends DolibarrModules $this->numero = 2400; $this->family = "projects"; - $this->name = "Agenda"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion de l'agenda et des actions"; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_AGENDA'; + // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); $this->special = 0; $this->picto='calendar'; diff --git a/htdocs/includes/modules/modBanque.class.php b/htdocs/includes/modules/modBanque.class.php index e47fa1892b0..c76abd97e5f 100644 --- a/htdocs/includes/modules/modBanque.class.php +++ b/htdocs/includes/modules/modBanque.class.php @@ -50,7 +50,8 @@ class modBanque extends DolibarrModules $this->numero = 85 ; $this->family = "financial"; - $this->name = "Banque"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion des comptes financiers de type Comptes bancaires ou postaux"; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/modules/modBarcode.class.php b/htdocs/includes/modules/modBarcode.class.php index 69ef2bb54f5..093b8c25f38 100644 --- a/htdocs/includes/modules/modBarcode.class.php +++ b/htdocs/includes/modules/modBarcode.class.php @@ -19,108 +19,109 @@ */ /** - \defgroup barcode Module code barre - \brief Module pour gerer les codes barres - \version $Id$ -*/ + \defgroup barcode Module code barre + \brief Module pour gerer les codes barres + \version $Id$ + */ /** - \file htdocs/includes/modules/modBarcode.class.php - \ingroup barcode,produit - \brief Fichier de description et activation du module Barcode -*/ + \file htdocs/includes/modules/modBarcode.class.php + \ingroup barcode,produit + \brief Fichier de description et activation du module Barcode + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modBarcode - \brief Classe de description et activation du module Barcode -*/ + \class modBarcode + \brief Classe de description et activation du module Barcode + */ class modBarcode extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modBarcode($DB) - { - $this->db = $DB ; - $this->numero = 55 ; - - $this->family = "technic"; - $this->name = "Codes barres"; - $this->description = "Gestion des codes barres"; - $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_BARCODE'; - $this->special = 2; - $this->picto='barcode'; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modBarcode($DB) + { + $this->db = $DB ; + $this->numero = 55 ; - // Dir - $this->dirs = array(); + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des codes barres"; + $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_BARCODE'; + $this->special = 2; + $this->picto='barcode'; - // D�pendances - $this->depends = array("modProduit"); - $this->requiredby = array(); - - // Config pages - $this->config_page_url = array("barcode.php"); - - // Constantes - $this->const = array(); + // Dir + $this->dirs = array(); - // Boxes - $this->boxes = array(); + // D�pendances + $this->depends = array("modProduit"); + $this->requiredby = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'barcode'; - - $this->rights[1][0] = 300; // id de la permission - $this->rights[1][1] = 'Lire les codes barres'; // libelle de la permission - $this->rights[1][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[1][3] = 1; // La permission est-elle une permission par d�faut - $this->rights[1][4] = 'lire'; + // Config pages + $this->config_page_url = array("barcode.php"); - $this->rights[2][0] = 301; // id de la permission - $this->rights[2][1] = 'Cr�er/modifier les codes barres'; // libelle de la permission - $this->rights[2][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[2][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[2][4] = 'creer'; + // Constantes + $this->const = array(); - $this->rights[4][0] = 302; // id de la permission - $this->rights[4][1] = 'Supprimer les codes barres'; // libelle de la permission - $this->rights[4][2] = 'd'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[4][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[4][4] = 'supprimer'; + // Boxes + $this->boxes = array(); - } + // Permissions + $this->rights = array(); + $this->rights_class = 'barcode'; + + $this->rights[1][0] = 300; // id de la permission + $this->rights[1][1] = 'Lire les codes barres'; // libelle de la permission + $this->rights[1][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[1][3] = 1; // La permission est-elle une permission par d�faut + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 301; // id de la permission + $this->rights[2][1] = 'Cr�er/modifier les codes barres'; // libelle de la permission + $this->rights[2][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[2][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[2][4] = 'creer'; + + $this->rights[4][0] = 302; // id de la permission + $this->rights[4][1] = 'Supprimer les codes barres'; // libelle de la permission + $this->rights[4][2] = 'd'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[4][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[4][4] = 'supprimer'; + + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - // Permissions - $this->remove(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + // Permissions + $this->remove(); - $sql = array(); + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modBookmark.class.php b/htdocs/includes/modules/modBookmark.class.php index b24f7fa8c79..9be729dfe31 100644 --- a/htdocs/includes/modules/modBookmark.class.php +++ b/htdocs/includes/modules/modBookmark.class.php @@ -18,113 +18,114 @@ */ /** - \defgroup bookmark Module Bookmark - \brief Module pour g�rer les Bookmarks - \version $Id$ -*/ + \defgroup bookmark Module Bookmark + \brief Module pour g�rer les Bookmarks + \version $Id$ + */ /** - \file htdocs/includes/modules/modBookmark.class.php - \ingroup bookmark - \brief Fichier de description et activation du module Bookmarks -*/ + \file htdocs/includes/modules/modBookmark.class.php + \ingroup bookmark + \brief Fichier de description et activation du module Bookmarks + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); -/** - \class modBookmark - \brief Classe de description et activation du module Bookmark -*/ +/** + \class modBookmark + \brief Classe de description et activation du module Bookmark + */ class modBookmark extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modBookmark($DB) - { - $this->db = $DB ; - $this->numero = 330; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modBookmark($DB) + { + $this->db = $DB ; + $this->numero = 330; - $this->family = "technic"; - $this->name = "Bookmarks"; - $this->description = "Gestion des Bookmarks"; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des Bookmarks"; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; - $this->const_name = 'MAIN_MODULE_BOOKMARK'; - $this->special = 2; - $this->picto='bookmark'; + $this->const_name = 'MAIN_MODULE_BOOKMARK'; + $this->special = 2; + $this->picto='bookmark'; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); - // Config pages - //$this->config_page_url = array(); + // Config pages + //$this->config_page_url = array(); - // Constantes - $this->const = array(); + // Constantes + $this->const = array(); - // Boites - $this->boxes = array(); - $this->boxes[0][1] = "box_bookmarks.php"; + // Boites + $this->boxes = array(); + $this->boxes[0][1] = "box_bookmarks.php"; - // Permissions - $this->rights = array(); - $this->rights_class = 'bookmark'; - $r=0; - - $r++; - $this->rights[$r][0] = 331; // id de la permission - $this->rights[$r][1] = 'Lire les bookmarks'; // libelle de la permission - $this->rights[$r][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut - $this->rights[$r][4] = 'lire'; + // Permissions + $this->rights = array(); + $this->rights_class = 'bookmark'; + $r=0; - $r++; - $this->rights[$r][0] = 332; // id de la permission - $this->rights[$r][1] = 'Creer/modifier les bookmarks'; // libelle de la permission - $this->rights[$r][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut - $this->rights[$r][4] = 'creer'; + $r++; + $this->rights[$r][0] = 331; // id de la permission + $this->rights[$r][1] = 'Lire les bookmarks'; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut + $this->rights[$r][4] = 'lire'; - $r++; - $this->rights[$r][0] = 333; // id de la permission - $this->rights[$r][1] = 'Supprimer les bookmarks'; // libelle de la permission - $this->rights[$r][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut - $this->rights[$r][4] = 'supprimer'; + $r++; + $this->rights[$r][0] = 332; // id de la permission + $this->rights[$r][1] = 'Creer/modifier les bookmarks'; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut + $this->rights[$r][4] = 'creer'; - } + $r++; + $this->rights[$r][0] = 333; // id de la permission + $this->rights[$r][1] = 'Supprimer les bookmarks'; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut + $this->rights[$r][4] = 'supprimer'; - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { + } - $sql = array(); - - return $this->_init($sql); - } + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + $sql = array(); - return $this->_remove($sql); - } + return $this->_init($sql); + } + + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modBoutique.class.php b/htdocs/includes/modules/modBoutique.class.php index b3ad816f057..7388bd974fe 100644 --- a/htdocs/includes/modules/modBoutique.class.php +++ b/htdocs/includes/modules/modBoutique.class.php @@ -51,7 +51,8 @@ class modBoutique extends DolibarrModules $this->numero = 800; $this->family = "products"; - $this->name = "OSCommerce direct"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Interface de visualisation d'une boutique OSCommerce ou OSCSS"; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_BOUTIQUE'; diff --git a/htdocs/includes/modules/modCashDesk.class.php b/htdocs/includes/modules/modCashDesk.class.php index 38dc4c0e7a5..6be54302954 100644 --- a/htdocs/includes/modules/modCashDesk.class.php +++ b/htdocs/includes/modules/modCashDesk.class.php @@ -44,12 +44,16 @@ class modCashDesk extends DolibarrModules function modCashDesk ($DB) { $this->db = $DB; + + // Id for module (must be unique). + // Use here a free id (See in Home -> System information -> Dolibarr for list of used module id). $this->numero = 50100; // Key text used to identify module (for permission, menus, etc...) $this->rights_class = 'cashdesk'; $this->family = "products"; - $this->name = "CashDesk"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "CashDesk module"; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/modules/modCategorie.class.php b/htdocs/includes/modules/modCategorie.class.php index a35d553e700..0cddf2bf7ad 100644 --- a/htdocs/includes/modules/modCategorie.class.php +++ b/htdocs/includes/modules/modCategorie.class.php @@ -48,7 +48,8 @@ class modCategorie extends DolibarrModules $this->numero = 1780; $this->family = "technic"; - $this->name = "Catégories"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion des catégories (produits, clients, fournisseurs...)"; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/modules/modClickToDial.class.php b/htdocs/includes/modules/modClickToDial.class.php index 8bc0396bbda..9723d1d1a51 100644 --- a/htdocs/includes/modules/modClickToDial.class.php +++ b/htdocs/includes/modules/modClickToDial.class.php @@ -18,90 +18,91 @@ */ /** - \defgroup clicktodial Module click to dial - \brief Module pour g�rer l'appel automatique -*/ + \defgroup clicktodial Module click to dial + \brief Module pour g�rer l'appel automatique + */ /** - \file htdocs/includes/modules/modClickToDial.class.php - \ingroup clicktodial - \brief Fichier de description et activation du module de click to Dial - \version $Id$ -*/ + \file htdocs/includes/modules/modClickToDial.class.php + \ingroup clicktodial + \brief Fichier de description et activation du module de click to Dial + \version $Id$ + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); -/** - \class modClickToDial - \brief Classe de description et activation du module de Click to Dial -*/ +/** + \class modClickToDial + \brief Classe de description et activation du module de Click to Dial + */ class modClickToDial extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modClickToDial($DB) - { - $this->db = $DB ; - $this->numero = 58 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modClickToDial($DB) + { + $this->db = $DB ; + $this->numero = 58 ; - $this->family = "technic"; - $this->name = "ClickToDial"; - $this->description = "Gestion du Click To Dial"; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion du Click To Dial"; - $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version + $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_CLICKTODIAL'; - $this->special = 1; - $this->picto='phoning'; + $this->const_name = 'MAIN_MODULE_CLICKTODIAL'; + $this->special = 1; + $this->picto='phoning'; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // Dependencies - $this->depends = array(); - $this->requiredby = array(); + // Dependencies + $this->depends = array(); + $this->requiredby = array(); - // Config pages - $this->config_page_url = array("clicktodial.php"); + // Config pages + $this->config_page_url = array("clicktodial.php"); - // Constants - $this->const = array(); + // Constants + $this->const = array(); - // Boxes - $this->boxes = array(); + // Boxes + $this->boxes = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'clicktodial'; - } + // Permissions + $this->rights = array(); + $this->rights_class = 'clicktodial'; + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - global $conf; + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + global $conf; - $sql = array(); - - return $this->_init($sql); - } + $sql = array(); - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + return $this->_init($sql); + } - return $this->_remove($sql); - } + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php index 1c4d5ef53c0..476c7f9b174 100644 --- a/htdocs/includes/modules/modCommande.class.php +++ b/htdocs/includes/modules/modCommande.class.php @@ -51,7 +51,8 @@ class modCommande extends DolibarrModules $this->numero = 25 ; $this->family = "crm"; - $this->name = "Commande"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion des commandes clients"; $this->revision = explode(' ','$Revision$'); $this->version = $this->revision[1]; diff --git a/htdocs/includes/modules/modCommercial.class.php b/htdocs/includes/modules/modCommercial.class.php index c6d775c1421..443e7617959 100644 --- a/htdocs/includes/modules/modCommercial.class.php +++ b/htdocs/includes/modules/modCommercial.class.php @@ -50,7 +50,8 @@ class modCommercial extends DolibarrModules $this->numero = 2 ; $this->family = "crm"; - $this->name = "Commercial"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion commercial"; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/modules/modComptabilite.class.php b/htdocs/includes/modules/modComptabilite.class.php index 36fa31f53e0..1a84633194f 100644 --- a/htdocs/includes/modules/modComptabilite.class.php +++ b/htdocs/includes/modules/modComptabilite.class.php @@ -52,8 +52,9 @@ class modComptabilite extends DolibarrModules $this->numero = 10 ; $this->family = "financial"; - $this->name = "Comptabilite"; - $this->description = "Gestion sommaire de comptabilit�"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion sommaire de comptabilite"; $this->revision = explode(" ","$Revision$"); $this->version = $this->revision[1]; diff --git a/htdocs/includes/modules/modComptabiliteExpert.class.php b/htdocs/includes/modules/modComptabiliteExpert.class.php index 4fff9b43071..1808ac94ecf 100644 --- a/htdocs/includes/modules/modComptabiliteExpert.class.php +++ b/htdocs/includes/modules/modComptabiliteExpert.class.php @@ -20,143 +20,144 @@ */ /** \defgroup comptabilite_expert Module comptabilite expert - \brief Module pour inclure des fonctions de comptabilit� (gestion de comptes comptables et rapports) - \version $Id$ -*/ + \brief Module pour inclure des fonctions de comptabilit� (gestion de comptes comptables et rapports) + \version $Id$ + */ /** - \file htdocs/includes/modules/modComptabiliteExpert.class.php - \ingroup comptabilite_expert - \brief Fichier de description et activation du module Comptabilite Expert -*/ + \file htdocs/includes/modules/modComptabiliteExpert.class.php + \ingroup comptabilite_expert + \brief Fichier de description et activation du module Comptabilite Expert + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modComptabiliteExpert - \brief Classe de description et activation du module Comptabilite Expert -*/ + \class modComptabiliteExpert + \brief Classe de description et activation du module Comptabilite Expert + */ class modComptabiliteExpert extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modComptabiliteExpert($DB) - { - global $conf; - - $this->db = $DB ; - $this->numero = 130 ; - - $this->family = "financial"; - $this->name = "ComptabiliteExpert"; - $this->description = "Gestion expert de comptabilite (doubles parties)"; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modComptabiliteExpert($DB) + { + global $conf; -// $this->revision = explode(' ','$Revision$'); -// $this->version = $this->revision[1]; - $this->version = "development"; + $this->db = $DB ; + $this->numero = 130 ; - $this->const_name = 'MAIN_MODULE_COMPTABILITEEXPERT'; - $this->special = 0; - - // Config pages - $this->config_page_url = array("comptaexpert.php"); + $this->family = "financial"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion expert de comptabilite (doubles parties)"; - // Dependances - $this->depends = array("modFacture","modBanque"); - $this->requiredby = array(); - $this->conflictwith = array("modComptabilite"); - $this->langfiles = array("compta"); + // $this->revision = explode(' ','$Revision$'); + // $this->version = $this->revision[1]; + $this->version = "development"; - // Constantes - $this->const = array(); + $this->const_name = 'MAIN_MODULE_COMPTABILITEEXPERT'; + $this->special = 0; - // Repertoires - $this->dirs = array(); - $this->dirs[0] = $conf->comptaexpert->dir_output; - $this->dirs[1] = $conf->comptaexpert->dir_output."/rapport"; - $this->dirs[2] = $conf->comptaexpert->dir_output."/export"; - $this->dirs[3] = $conf->comptaexpert->dir_images; + // Config pages + $this->config_page_url = array("comptaexpert.php"); - // Boites - $this->boxes = array(); + // Dependances + $this->depends = array("modFacture","modBanque"); + $this->requiredby = array(); + $this->conflictwith = array("modComptabilite"); + $this->langfiles = array("compta"); - // Permissions - $this->rights = array(); - $this->rights_class = 'comptaexpert'; + // Constantes + $this->const = array(); - $this->rights[1][0] = 131; - $this->rights[1][1] = 'Lire le plan de compte'; - $this->rights[1][2] = 'r'; - $this->rights[1][3] = 1; - $this->rights[1][4] = 'plancompte'; - $this->rights[1][5] = 'lire'; + // Repertoires + $this->dirs = array(); + $this->dirs[0] = $conf->comptaexpert->dir_output; + $this->dirs[1] = $conf->comptaexpert->dir_output."/rapport"; + $this->dirs[2] = $conf->comptaexpert->dir_output."/export"; + $this->dirs[3] = $conf->comptaexpert->dir_images; - $this->rights[2][0] = 132; - $this->rights[2][1] = 'Creer/modifier un plan de compte'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'plancompte'; - $this->rights[2][5] = 'creer'; + // Boites + $this->boxes = array(); - $this->rights[3][0] = 133; - $this->rights[3][1] = 'Cloturer plan de compte'; - $this->rights[3][2] = 'w'; - $this->rights[3][3] = 0; - $this->rights[3][4] = 'plancompte'; - $this->rights[3][5] = 'cloturer'; + // Permissions + $this->rights = array(); + $this->rights_class = 'comptaexpert'; - $this->rights[4][0] = 141; - $this->rights[4][1] = 'Lire les mouvements comptables'; - $this->rights[4][2] = 'r'; - $this->rights[4][3] = 1; - $this->rights[4][4] = 'mouvements'; - $this->rights[4][5] = 'lire'; + $this->rights[1][0] = 131; + $this->rights[1][1] = 'Lire le plan de compte'; + $this->rights[1][2] = 'r'; + $this->rights[1][3] = 1; + $this->rights[1][4] = 'plancompte'; + $this->rights[1][5] = 'lire'; - $this->rights[5][0] = 142; - $this->rights[5][1] = 'Creer/modifier/annuler les mouvements comptables'; - $this->rights[5][2] = 'w'; - $this->rights[5][3] = 0; - $this->rights[5][4] = 'mouvements'; - $this->rights[5][5] = 'creer'; + $this->rights[2][0] = 132; + $this->rights[2][1] = 'Creer/modifier un plan de compte'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'plancompte'; + $this->rights[2][5] = 'creer'; - $this->rights[6][0] = 145; - $this->rights[6][1] = 'Lire CA, bilans, resultats, journaux, grands livres'; - $this->rights[6][2] = 'r'; - $this->rights[6][3] = 0; - $this->rights[6][4] = 'comptarapport'; - $this->rights[6][5] = 'lire'; + $this->rights[3][0] = 133; + $this->rights[3][1] = 'Cloturer plan de compte'; + $this->rights[3][2] = 'w'; + $this->rights[3][3] = 0; + $this->rights[3][4] = 'plancompte'; + $this->rights[3][5] = 'cloturer'; - } + $this->rights[4][0] = 141; + $this->rights[4][1] = 'Lire les mouvements comptables'; + $this->rights[4][2] = 'r'; + $this->rights[4][3] = 1; + $this->rights[4][4] = 'mouvements'; + $this->rights[4][5] = 'lire'; + + $this->rights[5][0] = 142; + $this->rights[5][1] = 'Creer/modifier/annuler les mouvements comptables'; + $this->rights[5][2] = 'w'; + $this->rights[5][3] = 0; + $this->rights[5][4] = 'mouvements'; + $this->rights[5][5] = 'creer'; + + $this->rights[6][0] = 145; + $this->rights[6][1] = 'Lire CA, bilans, resultats, journaux, grands livres'; + $this->rights[6][2] = 'r'; + $this->rights[6][3] = 0; + $this->rights[6][4] = 'comptarapport'; + $this->rights[6][5] = 'lire'; + + } - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees e creer pour ce module. - */ - function init() - { - global $conf; - - // Nettoyage avant activation - $this->remove(); + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees e creer pour ce module. + */ + function init() + { + global $conf; - return $this->_init($sql); - } + // Nettoyage avant activation + $this->remove(); - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + return $this->_init($sql); + } - return $this->_remove($sql); - } + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modContrat.class.php b/htdocs/includes/modules/modContrat.class.php index 884934dddfe..e0b65b14468 100644 --- a/htdocs/includes/modules/modContrat.class.php +++ b/htdocs/includes/modules/modContrat.class.php @@ -50,7 +50,8 @@ class modContrat extends DolibarrModules $this->numero = 54 ; $this->family = "crm"; - $this->name = "Contrats"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion des contrats de services"; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/modules/modDeplacement.class.php b/htdocs/includes/modules/modDeplacement.class.php index 2f64cd93479..eca9fc634f8 100644 --- a/htdocs/includes/modules/modDeplacement.class.php +++ b/htdocs/includes/modules/modDeplacement.class.php @@ -17,113 +17,114 @@ */ /** - \defgroup deplacement Module deplacement et notes de frais - \brief Module pour gerer les deplacements et notes de frais - \version $Id$ -*/ + \defgroup deplacement Module deplacement et notes de frais + \brief Module pour gerer les deplacements et notes de frais + \version $Id$ + */ /** - \file htdocs/includes/modules/modDeplacement.class.php - \ingroup deplacement - \brief Fichier de description et activation du module Deplacement et notes de frais -*/ + \file htdocs/includes/modules/modDeplacement.class.php + \ingroup deplacement + \brief Fichier de description et activation du module Deplacement et notes de frais + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modDeplacement - \brief Classe de description et activation du module Deplacement -*/ + \class modDeplacement + \brief Classe de description et activation du module Deplacement + */ class modDeplacement extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modDeplacement($DB) - { - $this->db = $DB ; - $this->numero = 75 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modDeplacement($DB) + { + $this->db = $DB ; + $this->numero = 75 ; - $this->family = "financial"; - $this->name = "D�placement et frais"; // Si traduction Module75Name non trouv�e - $this->description = "Gestion des notes de frais et d�placements"; // Si traduction Module75Desc non trouv�e + $this->family = "financial"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des notes de frais et deplacements"; // Si traduction Module75Desc non trouvee - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; - $this->const_name = 'MAIN_MODULE_DEPLACEMENT'; - $this->special = 0; - $this->picto = "generic"; - - // Dir - $this->dirs = array(); + $this->const_name = 'MAIN_MODULE_DEPLACEMENT'; + $this->special = 0; + $this->picto = "generic"; - // Config pages - $this->config_page_url = array(); + // Dir + $this->dirs = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); + // Config pages + $this->config_page_url = array(); - // Constantes - $this->const = array(); - - // Boxes - $this->boxes = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'deplacement'; + // Constantes + $this->const = array(); - $this->rights[1][0] = 170; - $this->rights[1][1] = 'Lire les deplacements'; - $this->rights[1][2] = 'r'; - $this->rights[1][3] = 1; - $this->rights[1][4] = 'lire'; + // Boxes + $this->boxes = array(); - $this->rights[2][0] = 171; - $this->rights[2][1] = 'Creer/modifier les deplacements'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; + // Permissions + $this->rights = array(); + $this->rights_class = 'deplacement'; - $this->rights[3][0] = 172; - $this->rights[3][1] = 'Supprimer les deplacements'; - $this->rights[3][2] = 'd'; - $this->rights[3][3] = 0; - $this->rights[3][4] = 'supprimer'; - - } + $this->rights[1][0] = 170; + $this->rights[1][1] = 'Lire les deplacements'; + $this->rights[1][2] = 'r'; + $this->rights[1][3] = 1; + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 171; + $this->rights[2][1] = 'Creer/modifier les deplacements'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; + + $this->rights[3][0] = 172; + $this->rights[3][1] = 'Supprimer les deplacements'; + $this->rights[3][2] = 'd'; + $this->rights[3][3] = 0; + $this->rights[3][4] = 'supprimer'; + + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - // Permissions - $this->remove(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + // Permissions + $this->remove(); - $sql = array(); + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); + return $this->_remove($sql); - } + } } ?> diff --git a/htdocs/includes/modules/modDocument.class.php b/htdocs/includes/modules/modDocument.class.php index 307b627b5eb..1256d1bca66 100644 --- a/htdocs/includes/modules/modDocument.class.php +++ b/htdocs/includes/modules/modDocument.class.php @@ -17,113 +17,114 @@ */ /** - \defgroup document Module de generation de documents - \brief Module pour gerer des generations de documents - \version $Id$ -*/ + \defgroup document Module de generation de documents + \brief Module pour gerer des generations de documents + \version $Id$ + */ /** - \file htdocs/includes/modules/modDocument.class.php - \ingroup document - \brief Fichier de description et activation du module Generation document -*/ + \file htdocs/includes/modules/modDocument.class.php + \ingroup document + \brief Fichier de description et activation du module Generation document + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modDocument - \brief Classe de description et activation du module Document -*/ + \class modDocument + \brief Classe de description et activation du module Document + */ class modDocument extends DolibarrModules { - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modDocument($DB) - { - $this->db = $DB ; - $this->numero = 51 ; - - $this->family = "other"; - $this->name = "Document"; - $this->description = "Gestion des documents"; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; - $this->const_name = 'MAIN_MODULE_DOCUMENT'; - $this->special = 2; - $this->picto='dir'; - // Dir - $this->dirs = array(); - $this->dirs[0] = DOL_DATA_ROOT."/ged"; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modDocument($DB) + { + $this->db = $DB ; + $this->numero = 51 ; - // Config pages - //$this->config_page_url = array("document.php"); + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des documents"; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; + $this->const_name = 'MAIN_MODULE_DOCUMENT'; + $this->special = 2; + $this->picto='dir'; - // D�pendances - $this->depends = array(); - $this->requiredby = array(); - $this->conflictwith = array(); - $this->langfiles = array("orders","bills","companies"); + // Dir + $this->dirs = array(); + $this->dirs[0] = DOL_DATA_ROOT."/ged"; - // Constantes + // Config pages + //$this->config_page_url = array("document.php"); - $this->const = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); + $this->conflictwith = array(); + $this->langfiles = array("orders","bills","companies"); - // Boites - $this->boxes = array(); + // Constantes - // Permissions - $this->rights = array(); - $this->rights_class = 'document'; - - $r=0; + $this->const = array(); - $this->rights[$r][0] = 510; - $this->rights[$r][1] = 'Lire les documents'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'lire'; + // Boites + $this->boxes = array(); - $r++; - $this->rights[$r][0] = 511; - $this->rights[$r][1] = 'Supprimer les documents clients'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'supprimer'; - } + // Permissions + $this->rights = array(); + $this->rights_class = 'document'; + + $r=0; + + $this->rights[$r][0] = 510; + $this->rights[$r][1] = 'Lire les documents'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'lire'; + + $r++; + $this->rights[$r][0] = 511; + $this->rights[$r][1] = 'Supprimer les documents clients'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'supprimer'; + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - $sql = array(); - - return $this->_init($sql); - } - - - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + $sql = array(); + + return $this->_init($sql); + } + + + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modDomain.class.php b/htdocs/includes/modules/modDomain.class.php index 99c67ebb3b5..94d0aa387a1 100644 --- a/htdocs/includes/modules/modDomain.class.php +++ b/htdocs/includes/modules/modDomain.class.php @@ -50,7 +50,8 @@ class modDomain extends DolibarrModules $this->numero = 1300 ; $this->family = "other"; - $this->name = "Domains"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion d'une base de noms de domaines"; $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_DOMAIN'; diff --git a/htdocs/includes/modules/modDon.class.php b/htdocs/includes/modules/modDon.class.php index 530db9af100..8165bd8d306 100644 --- a/htdocs/includes/modules/modDon.class.php +++ b/htdocs/includes/modules/modDon.class.php @@ -20,109 +20,110 @@ */ /** - \defgroup don Module don - \brief Module pour g�rer le suivi des dons -*/ + \defgroup don Module don + \brief Module pour g�rer le suivi des dons + */ /** - \file htdocs/includes/modules/modDon.class.php - \ingroup don - \brief Fichier de description et activation du module Don -*/ + \file htdocs/includes/modules/modDon.class.php + \ingroup don + \brief Fichier de description et activation du module Don + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modDon - \brief Classe de description et activation du module Don -*/ + \class modDon + \brief Classe de description et activation du module Don + */ class modDon extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modDon($DB) - { - $this->db = $DB ; - $this->numero = 700 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modDon($DB) + { + $this->db = $DB ; + $this->numero = 700 ; - $this->family = "financial"; - $this->name = "Don"; - $this->description = "Gestion des dons"; - $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_DON'; - $this->special = 0; + $this->family = "financial"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des dons"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_DON'; + $this->special = 0; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); - // Config pages - $this->config_page_url = array("dons.php"); + // Config pages + $this->config_page_url = array("dons.php"); - // Constantes - $this->const = array(); - $this->const[0][0] = "DON_FORM"; - $this->const[0][1] = "chaine"; - $this->const[0][2] = "fsfe.fr.php"; - $this->const[0][3] = 'Nom du gestionnaire de formulaire de dons'; - $this->const[0][4] = 0; + // Constantes + $this->const = array(); + $this->const[0][0] = "DON_FORM"; + $this->const[0][1] = "chaine"; + $this->const[0][2] = "fsfe.fr.php"; + $this->const[0][3] = 'Nom du gestionnaire de formulaire de dons'; + $this->const[0][4] = 0; - // Boxes - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'don'; + // Boxes + $this->boxes = array(); - $this->rights[1][0] = 700; - $this->rights[1][1] = 'Lire les dons'; - $this->rights[1][2] = 'r'; - $this->rights[1][3] = 1; - $this->rights[1][4] = 'lire'; + // Permissions + $this->rights = array(); + $this->rights_class = 'don'; - $this->rights[2][0] = 701; - $this->rights[2][1] = 'Cr�er/modifier les dons'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; + $this->rights[1][0] = 700; + $this->rights[1][1] = 'Lire les dons'; + $this->rights[1][2] = 'r'; + $this->rights[1][3] = 1; + $this->rights[1][4] = 'lire'; - $this->rights[3][0] = 702; - $this->rights[3][1] = 'Supprimer les dons'; - $this->rights[3][2] = 'd'; - $this->rights[3][3] = 0; - $this->rights[3][4] = 'supprimer'; + $this->rights[2][0] = 701; + $this->rights[2][1] = 'Cr�er/modifier les dons'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; - } + $this->rights[3][0] = 702; + $this->rights[3][1] = 'Supprimer les dons'; + $this->rights[3][2] = 'd'; + $this->rights[3][3] = 0; + $this->rights[3][4] = 'supprimer'; + + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modDroitPret.class.php b/htdocs/includes/modules/modDroitPret.class.php index 0c96330058d..22a2b36650b 100644 --- a/htdocs/includes/modules/modDroitPret.class.php +++ b/htdocs/includes/modules/modDroitPret.class.php @@ -17,100 +17,101 @@ */ /** - \defgroup DroitPret Module pret - \version $Id$ - \brief Module pour gerer le suivi des droits de prets -*/ + \defgroup DroitPret Module pret + \version $Id$ + \brief Module pour gerer le suivi des droits de prets + */ /** - \file htdocs/includes/modules/modDroitPret.class.php - \ingroup don - \brief Fichier de description et activation du module DroitPret -*/ + \file htdocs/includes/modules/modDroitPret.class.php + \ingroup don + \brief Fichier de description et activation du module DroitPret + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modDroitPret - \brief Classe de description et activation du module DroitPr�t -*/ + \class modDroitPret + \brief Classe de description et activation du module DroitPr�t + */ class modDroitPret extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modDroitPret($DB) - { - $this->db = $DB ; - $this->numero = 2200 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modDroitPret($DB) + { + $this->db = $DB ; + $this->numero = 2200 ; - $this->family = "other"; - $this->name = "Droit Pret"; - $this->description = "Gestion du droit de prets"; - $this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_DROITPRET'; - $this->special = 2; + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion du droit de prets"; + $this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_DROITPRET'; + $this->special = 2; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); - // Config pages - $this->config_page_url = array("droitpret.php"); + // Config pages + $this->config_page_url = array("droitpret.php"); - // Constantes - $this->const = array(); + // Constantes + $this->const = array(); - // Boxes - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'droitpret'; + // Boxes + $this->boxes = array(); - $this->rights[1][0] = 2200; - $this->rights[1][1] = 'Lire les droits de pr�ts'; - $this->rights[1][2] = 'r'; - $this->rights[1][3] = 1; - $this->rights[1][4] = 'lire'; + // Permissions + $this->rights = array(); + $this->rights_class = 'droitpret'; - $this->rights[2][0] = 2201; - $this->rights[2][1] = 'Cr�er/modifier les droits de pr�ts'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; + $this->rights[1][0] = 2200; + $this->rights[1][1] = 'Lire les droits de pr�ts'; + $this->rights[1][2] = 'r'; + $this->rights[1][3] = 1; + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 2201; + $this->rights[2][1] = 'Cr�er/modifier les droits de pr�ts'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; - } + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modECM.class.php b/htdocs/includes/modules/modECM.class.php index 4aa163af518..f62cc7e21de 100644 --- a/htdocs/includes/modules/modECM.class.php +++ b/htdocs/includes/modules/modECM.class.php @@ -53,8 +53,8 @@ class modECM extends DolibarrModules // Family can be 'crm','financial','hr','projects','product','ecm','technic','other' // It is used to sort modules in module setup page $this->family = "ecm"; - // Module title used if translation string 'ModuleXXXName' not found (XXX is id value) - $this->name = "ECM"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); // Module description used if translation string 'ModuleXXXDesc' not found (XXX is id value) $this->description = "Electronic Content Management"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version diff --git a/htdocs/includes/modules/modEditeur.class.php b/htdocs/includes/modules/modEditeur.class.php index d4af24adcab..14ca3494ff0 100644 --- a/htdocs/includes/modules/modEditeur.class.php +++ b/htdocs/includes/modules/modEditeur.class.php @@ -17,103 +17,104 @@ */ /** - \defgroup editeur Module editeur - \brief Module pour gerer le suivi des editeurs - \version $Id$ -*/ + \defgroup editeur Module editeur + \brief Module pour gerer le suivi des editeurs + \version $Id$ + */ /** - \file htdocs/includes/modules/modEditeur.class.php - \ingroup editeur - \brief Fichier de description et activation du module Editeur -*/ + \file htdocs/includes/modules/modEditeur.class.php + \ingroup editeur + \brief Fichier de description et activation du module Editeur + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modEditeur - \brief Classe de description et activation du module Editeur -*/ + \class modEditeur + \brief Classe de description et activation du module Editeur + */ class modEditeur extends DolibarrModules { - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modEditeur($DB) - { - $this->db = $DB ; - $this->numero = 49 ; - - $this->family = "other"; - $this->name = "Editeur"; - $this->description = "Gestion des �diteurs"; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; - $this->const_name = 'MAIN_MODULE_EDITEUR'; - $this->special = 3; - $this->picto='book'; - // Dir - $this->dirs = array(); + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modEditeur($DB) + { + $this->db = $DB ; + $this->numero = 49 ; - // Config pages - $this->config_page_url = array("editeur.php"); + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des editeurs"; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; + $this->const_name = 'MAIN_MODULE_EDITEUR'; + $this->special = 3; + $this->picto='book'; - // D�pendances - $this->depends = array(); - $this->requiredby = array(); - $this->conflictwith = array(); - $this->needleftmenu = array('default.php'); - $this->needtotopmenu = array(); - $this->langfiles = array("orders","bills","companies"); + // Dir + $this->dirs = array(); - // Constantes + // Config pages + $this->config_page_url = array("editeur.php"); - $this->const = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); + $this->conflictwith = array(); + $this->needleftmenu = array('default.php'); + $this->needtotopmenu = array(); + $this->langfiles = array("orders","bills","companies"); - // Boites - $this->boxes = array(); + // Constantes - // Documents - $this->docs = array(); - $this->docs[0][0] = 1; - $this->docs[0][1] = 'Courrier des droits'; - $this->docs[0][2] = 'docs/class/courrier-droit-editeur.class.php'; - $this->docs[0][3] = 'pdf_courrier_droit_editeur'; + $this->const = array(); - // Permissions - $this->rights = array(); + // Boites + $this->boxes = array(); - } + // Documents + $this->docs = array(); + $this->docs[0][0] = 1; + $this->docs[0][1] = 'Courrier des droits'; + $this->docs[0][2] = 'docs/class/courrier-droit-editeur.class.php'; + $this->docs[0][3] = 'pdf_courrier_droit_editeur'; + + // Permissions + $this->rights = array(); + + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - global $conf; - - $sql = array(); - - return $this->_init($sql); - } - - - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + global $conf; + + $sql = array(); + + return $this->_init($sql); + } + + + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modEnergie.class.php b/htdocs/includes/modules/modEnergie.class.php index 2a3e30cfc4e..4ac745b879e 100644 --- a/htdocs/includes/modules/modEnergie.class.php +++ b/htdocs/includes/modules/modEnergie.class.php @@ -19,101 +19,102 @@ * $Id$ */ -/** - \defgroup energie Module energie - \brief Module pour le suivi de la consommation d'energie -*/ +/** + \defgroup energie Module energie + \brief Module pour le suivi de la consommation d'energie + */ /** - \file htdocs/includes/modules/modEnergie.class.php - \ingroup energie - \brief Fichier de description et activation du module Energie -*/ + \file htdocs/includes/modules/modEnergie.class.php + \ingroup energie + \brief Fichier de description et activation du module Energie + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modEnergie - \brief Classe de description et activation du module Energie -*/ + \class modEnergie + \brief Classe de description et activation du module Energie + */ class modEnergie extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modEnergie($DB) - { - $this->db = $DB ; - $this->numero = 23 ; - - $this->family = "other"; - $this->name = "Energie"; - $this->description = "Suivi de la consommation des energies"; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modEnergie($DB) + { + $this->db = $DB ; + $this->numero = 23 ; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Suivi de la consommation des energies"; - $this->const_name = 'MAIN_MODULE_ENERGIE'; - $this->special = 2; - $this->picto='energie'; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; - // Dir - $this->dirs = array(); + $this->const_name = 'MAIN_MODULE_ENERGIE'; + $this->special = 2; + $this->picto='energie'; - // D�pendances - $this->depends = array(); + // Dir + $this->dirs = array(); - // Config pages - $this->config_page_url = array("energie.php"); + // D�pendances + $this->depends = array(); - // Constantes - $this->const = array(); + // Config pages + $this->config_page_url = array("energie.php"); - // Boxes - $this->boxes = array(); - $r=0; - $this->boxes[$r][1] = "box_energie_releve.php"; - $r++; - $this->boxes[$r][1] = "box_energie_graph.php"; - $r++; + // Constantes + $this->const = array(); - // Permissions - $this->rights = array(); + // Boxes + $this->boxes = array(); + $r=0; + $this->boxes[$r][1] = "box_energie_releve.php"; + $r++; + $this->boxes[$r][1] = "box_energie_graph.php"; + $r++; - } + // Permissions + $this->rights = array(); + + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - global $conf; - // Permissions et valeurs par d�faut - $this->remove(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + global $conf; + // Permissions et valeurs par d�faut + $this->remove(); - $sql = array(); + $sql = array(); - $this->dirs[0] = DOL_DATA_ROOT."/energie"; - $this->dirs[1] = DOL_DATA_ROOT."/energie/graph"; - - return $this->_init($sql); - } + $this->dirs[0] = DOL_DATA_ROOT."/energie"; + $this->dirs[1] = DOL_DATA_ROOT."/energie/graph"; - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + return $this->_init($sql); + } - return $this->_remove($sql); - } + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modExpedition.class.php b/htdocs/includes/modules/modExpedition.class.php index ad59c5f2dce..1938ee4a1eb 100644 --- a/htdocs/includes/modules/modExpedition.class.php +++ b/htdocs/includes/modules/modExpedition.class.php @@ -20,165 +20,166 @@ */ /** - \defgroup expedition Module expedition - \brief Module pour gerer les expeditions de produits -*/ + \defgroup expedition Module expedition + \brief Module pour gerer les expeditions de produits + */ /** - \file htdocs/includes/modules/modExpedition.class.php - \ingroup expedition - \brief Fichier de description et activation du module Expedition -*/ + \file htdocs/includes/modules/modExpedition.class.php + \ingroup expedition + \brief Fichier de description et activation du module Expedition + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modExpedition - \brief Classe de description et activation du module Expedition -*/ + \brief Classe de description et activation du module Expedition + */ class modExpedition extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modExpedition($DB) - { - $this->db = $DB ; - $this->numero = 80 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modExpedition($DB) + { + $this->db = $DB ; + $this->numero = 80 ; - $this->family = "crm"; - $this->name = "Expedition"; - $this->description = "Gestion des expeditions"; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; - $this->const_name = 'MAIN_MODULE_EXPEDITION'; - $this->special = 0; - $this->picto = "sending"; + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des expeditions"; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; + $this->const_name = 'MAIN_MODULE_EXPEDITION'; + $this->special = 0; + $this->picto = "sending"; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // Config pages - $this->config_page_url = array("confexped.php"); + // Config pages + $this->config_page_url = array("confexped.php"); - // Dependances - $this->depends = array("modPropale"); - $this->requiredby = array(); + // Dependances + $this->depends = array("modPropale"); + $this->requiredby = array(); - // Constantes - $this->const = array(); - $this->const[0][0] = "LIVRAISON_ADDON_PDF"; - $this->const[0][1] = "chaine"; - $this->const[0][2] = "typhon"; - $this->const[0][3] = 'Nom du gestionnaire de generation des commandes en PDF'; - $this->const[0][4] = 0; - - $this->const[1][0] = "LIVRAISON_ADDON"; - $this->const[1][1] = "chaine"; - $this->const[1][2] = "mod_livraison_jade"; - $this->const[1][3] = 'Nom du gestionnaire de numerotation des bons de livraison'; - $this->const[1][4] = 0; - - // Boxes - $this->boxes = array(); + // Constantes + $this->const = array(); + $this->const[0][0] = "LIVRAISON_ADDON_PDF"; + $this->const[0][1] = "chaine"; + $this->const[0][2] = "typhon"; + $this->const[0][3] = 'Nom du gestionnaire de generation des commandes en PDF'; + $this->const[0][4] = 0; - // Permissions - $this->rights = array(); - $this->rights_class = 'expedition'; - $r=0; - - $r++; - $this->rights[$r][0] = 101; - $this->rights[$r][1] = 'Lire les expeditions'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'lire'; + $this->const[1][0] = "LIVRAISON_ADDON"; + $this->const[1][1] = "chaine"; + $this->const[1][2] = "mod_livraison_jade"; + $this->const[1][3] = 'Nom du gestionnaire de numerotation des bons de livraison'; + $this->const[1][4] = 0; - $r++; - $this->rights[$r][0] = 102; - $this->rights[$r][1] = 'Creer modifier les expeditions'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'creer'; + // Boxes + $this->boxes = array(); - $r++; - $this->rights[$r][0] = 104; - $this->rights[$r][1] = 'Valider les expeditions'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'valider'; + // Permissions + $this->rights = array(); + $this->rights_class = 'expedition'; + $r=0; - $r++; - $this->rights[$r][0] = 109; - $this->rights[$r][1] = 'Supprimer les expeditions'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'supprimer'; - - $r++; - $this->rights[$r][0] = 1101; - $this->rights[$r][1] = 'Lire les bons de livraison'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'livraison'; - $this->rights[$r][5] = 'lire'; + $r++; + $this->rights[$r][0] = 101; + $this->rights[$r][1] = 'Lire les expeditions'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'lire'; - $r++; - $this->rights[$r][0] = 1102; - $this->rights[$r][1] = 'Creer modifier les bons de livraison'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; - $this->rights[$r][5] = 'creer'; + $r++; + $this->rights[$r][0] = 102; + $this->rights[$r][1] = 'Creer modifier les expeditions'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'creer'; - $r++; - $this->rights[$r][0] = 1104; - $this->rights[$r][1] = 'Valider les bons de livraison'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; - $this->rights[$r][5] = 'valider'; + $r++; + $this->rights[$r][0] = 104; + $this->rights[$r][1] = 'Valider les expeditions'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'valider'; - $r++; - $this->rights[$r][0] = 1109; - $this->rights[$r][1] = 'Supprimer les bons de livraison'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'livraison'; - $this->rights[$r][5] = 'supprimer'; + $r++; + $this->rights[$r][0] = 109; + $this->rights[$r][1] = 'Supprimer les expeditions'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'supprimer'; - } + $r++; + $this->rights[$r][0] = 1101; + $this->rights[$r][1] = 'Lire les bons de livraison'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'livraison'; + $this->rights[$r][5] = 'lire'; + + $r++; + $this->rights[$r][0] = 1102; + $this->rights[$r][1] = 'Creer modifier les bons de livraison'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'livraison'; + $this->rights[$r][5] = 'creer'; + + $r++; + $this->rights[$r][0] = 1104; + $this->rights[$r][1] = 'Valider les bons de livraison'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'livraison'; + $this->rights[$r][5] = 'valider'; + + $r++; + $this->rights[$r][0] = 1109; + $this->rights[$r][1] = 'Supprimer les bons de livraison'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'livraison'; + $this->rights[$r][5] = 'supprimer'; + + } - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - // Permissions - $this->remove(); + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + // Permissions + $this->remove(); - // Dir - $this->dirs[0] = DOL_DATA_ROOT."/expedition"; + // Dir + $this->dirs[0] = DOL_DATA_ROOT."/expedition"; - $sql = array(); + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modExport.class.php b/htdocs/includes/modules/modExport.class.php index 21530dc211f..5ceadd17a31 100644 --- a/htdocs/includes/modules/modExport.class.php +++ b/htdocs/includes/modules/modExport.class.php @@ -19,98 +19,99 @@ */ /** \defgroup export Module export - \brief Module g�n�rique pour r�aliser des exports de donn�es en base -*/ + \brief Module g�n�rique pour r�aliser des exports de donn�es en base + */ /** - \file htdocs/includes/modules/modExport.class.php - \ingroup export - \brief Fichier de description et activation du module export -*/ + \file htdocs/includes/modules/modExport.class.php + \ingroup export + \brief Fichier de description et activation du module export + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modExport - \brief Classe de description et activation du module export -*/ + \brief Classe de description et activation du module export + */ class modExport extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modExport($DB) - { - $this->db = $DB ; - $this->numero = 240; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modExport($DB) + { + $this->db = $DB ; + $this->numero = 240; - $this->family = "technic"; - $this->name = "Exports"; - $this->description = "Outils d'exports de donn�es Dolibarr (via un assistant)"; - $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_EXPORT'; - $this->special = 0; - $this->picto=''; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Outils d'exports de donnees Dolibarr (via un assistant)"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_EXPORT'; + $this->special = 0; + $this->picto=''; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // Config pages - $this->config_page_url = array(); + // Config pages + $this->config_page_url = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); - $this->phpmin = array(4,2,0); - $this->phpmax = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); + $this->phpmin = array(4,2,0); + $this->phpmax = array(); - // Constantes - $this->const = array(); + // Constantes + $this->const = array(); - // Boxes - $this->boxes = array(); + // Boxes + $this->boxes = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'export'; - - $this->rights[1][0] = 1201; - $this->rights[1][1] = 'Lire les exports'; - $this->rights[1][2] = 'r'; - $this->rights[1][3] = 1; - $this->rights[1][4] = 'lire'; + // Permissions + $this->rights = array(); + $this->rights_class = 'export'; - $this->rights[2][0] = 1202; - $this->rights[2][1] = 'Cr�er/modifier un export'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; - - } + $this->rights[1][0] = 1201; + $this->rights[1][1] = 'Lire les exports'; + $this->rights[1][2] = 'r'; + $this->rights[1][3] = 1; + $this->rights[1][4] = 'lire'; - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - $sql = array(); - - return $this->_init($sql); - } + $this->rights[2][0] = 1202; + $this->rights[2][1] = 'Cr�er/modifier un export'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + } - return $this->_remove($sql); - } + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + $sql = array(); + + return $this->_init($sql); + } + + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modExternalRss.class.php b/htdocs/includes/modules/modExternalRss.class.php index cf966041304..b2849c29305 100644 --- a/htdocs/includes/modules/modExternalRss.class.php +++ b/htdocs/includes/modules/modExternalRss.class.php @@ -20,80 +20,81 @@ */ /** \defgroup externalrss Module externalrss - \brief Module pour inclure des informations externes RSS -*/ + \brief Module pour inclure des informations externes RSS + */ /** - \file htdocs/includes/modules/modExternalRss.class.php - \ingroup externalrss - \brief Fichier de description et activation du module externalrss -*/ + \file htdocs/includes/modules/modExternalRss.class.php + \ingroup externalrss + \brief Fichier de description et activation du module externalrss + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modExternalRss - \brief Classe de description et activation du module externalrss -*/ + \brief Classe de description et activation du module externalrss + */ class modExternalRss extends DolibarrModules { /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ function modExternalRss($DB) { global $conf; - + $this->db = $DB ; $this->numero = 320; - + $this->family = "technic"; - $this->name = "Syndication RSS"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Ajout de files d'informations RSS dans les �crans Dolibarr"; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_EXTERNALRSS'; $this->special = 1; $this->picto='rss'; - + // Dir $this->dirs = array(); - + // Config pages $this->config_page_url = array("external_rss.php"); - + // D�pendances $this->depends = array(); $this->requiredby = array(); $this->phpmin = array(4,2,0); $this->phpmax = array(); - + // Constantes $this->const = array(); - + // R�pertoires $this->dirs = array(); $this->dirs[0] = $conf->externalrss->dir_temp; - + // Boxes $this->boxes = array(); // Les boites sont ajout�es lors de la configuration des flux - + // Permissions $this->rights = array(); $this->rights_class = 'externalrss'; } /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ function init() { $sql = array(); - + // Recherche configuration de boites $this->boxes=array(); $sql="select name, value from ".MAIN_DB_PREFIX."const"; @@ -113,23 +114,23 @@ class modExternalRss extends DolibarrModules } $this->db->free($result); } - + $sql = array(); - + return $this->_init($sql); } /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ function remove() { $sql = array(); - + // Supprime anciennes delcarations de la boite RSS $this->boxes[0][1] = "box_external_rss.php"; - + return $this->_remove($sql); } } diff --git a/htdocs/includes/modules/modFacture.class.php b/htdocs/includes/modules/modFacture.class.php index 7be8170c6d2..0f3d1b152a2 100644 --- a/htdocs/includes/modules/modFacture.class.php +++ b/htdocs/includes/modules/modFacture.class.php @@ -51,7 +51,8 @@ class modFacture extends DolibarrModules $this->numero = 30; $this->family = "financial"; - $this->name = "Factures"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion des factures"; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/modules/modFckeditor.class.php b/htdocs/includes/modules/modFckeditor.class.php index d1cb48a48e1..97f2b3daff3 100644 --- a/htdocs/includes/modules/modFckeditor.class.php +++ b/htdocs/includes/modules/modFckeditor.class.php @@ -19,88 +19,89 @@ */ /** - \defgroup fckeditor Module fckeditor - \brief Module pour mettre en page les zones de saisie de texte - \version $Id$ -*/ + \defgroup fckeditor Module fckeditor + \brief Module pour mettre en page les zones de saisie de texte + \version $Id$ + */ /** - \file htdocs/includes/modules/modFckeditor.class.php - \ingroup fckeditor - \brief Fichier de description et activation du module Fckeditor -*/ + \file htdocs/includes/modules/modFckeditor.class.php + \ingroup fckeditor + \brief Fichier de description et activation du module Fckeditor + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modFckeditor - \brief Classe de description et activation du module Fckeditor -*/ + \brief Classe de description et activation du module Fckeditor + */ class modFckeditor extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modFckeditor($DB) - { - $this->db = $DB ; - $this->numero = 2000 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modFckeditor($DB) + { + $this->db = $DB ; + $this->numero = 2000 ; - $this->name = "FCKeditor"; - $this->family = "technic"; - $this->description = "Editeur WYSIWYG"; - $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_FCKEDITOR'; - $this->special = 2; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Editeur WYSIWYG"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_FCKEDITOR'; + $this->special = 2; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // Config pages - $this->config_page_url = array("fckeditor.php"); + // Config pages + $this->config_page_url = array("fckeditor.php"); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); - // Constantes - $this->const = array(); - - // Boites - $this->boxes = array(); + // Constantes + $this->const = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'fckeditor'; - } + // Boites + $this->boxes = array(); - /** - * \brief Fonction appel� lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - global $conf; - - // Dir - $this->dirs[0] = $conf->fckeditor->dir_images; - - $sql = array(); + // Permissions + $this->rights = array(); + $this->rights_class = 'fckeditor'; + } - return $this->_init($sql); - } + /** + * \brief Fonction appel� lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + global $conf; - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + // Dir + $this->dirs[0] = $conf->fckeditor->dir_images; - return $this->_remove($sql); - } + $sql = array(); + + return $this->_init($sql); + } + + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modFicheinter.class.php b/htdocs/includes/modules/modFicheinter.class.php index 3a386c11fd7..2caa1f624bc 100644 --- a/htdocs/includes/modules/modFicheinter.class.php +++ b/htdocs/includes/modules/modFicheinter.class.php @@ -20,131 +20,132 @@ */ /** - \defgroup ficheinter Module intervention cards - \brief Module to manage intervention cards - \version $Id$ -*/ + \defgroup ficheinter Module intervention cards + \brief Module to manage intervention cards + \version $Id$ + */ /** - \file htdocs/includes/modules/modFicheinter.class.php - \ingroup ficheinter - \brief Fichier de description et activation du module Ficheinter -*/ + \file htdocs/includes/modules/modFicheinter.class.php + \ingroup ficheinter + \brief Fichier de description et activation du module Ficheinter + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modFicheinter - \brief Classe de description et activation du module Ficheinter -*/ + \class modFicheinter + \brief Classe de description et activation du module Ficheinter + */ class modFicheinter extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modFicheinter($DB) - { - $this->db = $DB ; - $this->numero = 70 ; - - $this->family = "crm"; - $this->name = "Fiche d'intervention"; - $this->description = "Gestion des fiches d'intervention"; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modFicheinter($DB) + { + $this->db = $DB ; + $this->numero = 70 ; - $this->revision = explode(" ","$Revision$"); - $this->version = $this->revision[1]; + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des fiches d'intervention"; - $this->const_name = 'MAIN_MODULE_FICHEINTER'; - $this->special = 0; - $this->picto = "intervention"; - - // Dir - $this->dirs = array(); + $this->revision = explode(" ","$Revision$"); + $this->version = $this->revision[1]; - // Config pages - $this->config_page_url = array("fichinter.php"); + $this->const_name = 'MAIN_MODULE_FICHEINTER'; + $this->special = 0; + $this->picto = "intervention"; - // D�pendances - $this->depends = array("modSociete","modCommercial"); - $this->requiredby = array(); + // Dir + $this->dirs = array(); - // Constantes - $this->const = array(); - $r=0; - - $this->const[$r][0] = "FICHEINTER_ADDON_PDF"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "soleil"; - $r++; + // Config pages + $this->config_page_url = array("fichinter.php"); - $this->const[$r][0] = "FICHEINTER_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "pacific"; - $r++; + // D�pendances + $this->depends = array("modSociete","modCommercial"); + $this->requiredby = array(); - // Boites - $this->boxes = array(); + // Constantes + $this->const = array(); + $r=0; + + $this->const[$r][0] = "FICHEINTER_ADDON_PDF"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "soleil"; + $r++; - // Permissions - $this->rights = array(); - $this->rights_class = 'ficheinter'; + $this->const[$r][0] = "FICHEINTER_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "pacific"; + $r++; - $this->rights[1][0] = 61; - $this->rights[1][1] = 'Lire les fiches d\'intervention'; - $this->rights[1][2] = 'r'; - $this->rights[1][3] = 1; - $this->rights[1][4] = 'lire'; + // Boites + $this->boxes = array(); - $this->rights[2][0] = 62; - $this->rights[2][1] = 'Creer/modifier les fiches d\'intervention'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; + // Permissions + $this->rights = array(); + $this->rights_class = 'ficheinter'; - $this->rights[3][0] = 64; - $this->rights[3][1] = 'Supprimer les fiches d\'intervention'; - $this->rights[3][2] = 'd'; - $this->rights[3][3] = 0; - $this->rights[3][4] = 'supprimer'; + $this->rights[1][0] = 61; + $this->rights[1][1] = 'Lire les fiches d\'intervention'; + $this->rights[1][2] = 'r'; + $this->rights[1][3] = 1; + $this->rights[1][4] = 'lire'; - } + $this->rights[2][0] = 62; + $this->rights[2][1] = 'Creer/modifier les fiches d\'intervention'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; + + $this->rights[3][0] = 64; + $this->rights[3][1] = 'Supprimer les fiches d\'intervention'; + $this->rights[3][2] = 'd'; + $this->rights[3][3] = 0; + $this->rights[3][4] = 'supprimer'; + + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - // Dir - $this->dirs[0] = $conf->facture->dir_output; - - $sql = array( + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + // Dir + $this->dirs[0] = $conf->facture->dir_output; + + $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."'", "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type) VALUES('".$this->const[0][2]."','ficheinter')", - ); - - return $this->_init($sql); - } + ); - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + return $this->_init($sql); + } - return $this->_remove($sql); - } + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modFournisseur.class.php b/htdocs/includes/modules/modFournisseur.class.php index 956ee6dee67..d743226381f 100644 --- a/htdocs/includes/modules/modFournisseur.class.php +++ b/htdocs/includes/modules/modFournisseur.class.php @@ -19,46 +19,47 @@ */ /** \defgroup fournisseur Module fournisseur - \brief Module pour gerer des societes et contacts de type fournisseurs - \version $Id$ -*/ + \brief Module pour gerer des societes et contacts de type fournisseurs + \version $Id$ + */ /** - \file htdocs/includes/modules/modFournisseur.class.php - \ingroup fournisseur - \brief Fichier de description et activation du module Fournisseur -*/ + \file htdocs/includes/modules/modFournisseur.class.php + \ingroup fournisseur + \brief Fichier de description et activation du module Fournisseur + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modFournisseur - \brief Classe de description et activation du module Fournisseur -*/ + \brief Classe de description et activation du module Fournisseur + */ class modFournisseur extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modFournisseur($DB) - { + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modFournisseur($DB) + { $this->db = $DB ; $this->numero = 40 ; - + $this->family = "products"; - $this->name = "Fournisseur"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Gestion des fournisseurs"; - + $this->revision = explode(' ','$Revision$'); $this->version = $this->revision[1]; - + $this->const_name = 'MAIN_MODULE_FOURNISSEUR'; $this->special = 0; $this->picto='company'; - + // Dir $this->dirs = array(); @@ -66,46 +67,46 @@ class modFournisseur extends DolibarrModules $this->depends = array("modSociete"); $this->requiredby = array(); $this->langfiles = array("bills","companies","suppliers"); - + // Config pages $this->config_page_url = array("fournisseur.php"); - + // Constantes $this->const = array(); - + $this->const[0][0] = "COMMANDE_SUPPLIER_ADDON_PDF"; $this->const[0][1] = "chaine"; $this->const[0][2] = "muscadet"; - + $this->const[1][0] = "COMMANDE_SUPPLIER_ADDON"; $this->const[1][1] = "chaine"; $this->const[1][2] = "emeraude"; - + // Boxes $this->boxes = array(); $r=0; - + $this->boxes[$r][1] = "box_fournisseurs.php"; $r++; - - $this->boxes[$r][1] = "box_factures_fourn_imp.php"; + + $this->boxes[$r][1] = "box_factures_fourn_imp.php"; $r++; - $this->boxes[$r][1] = "box_factures_fourn.php"; + $this->boxes[$r][1] = "box_factures_fourn.php"; $r++; - + // Permissions $this->rights = array(); $this->rights_class = 'fournisseur'; $r=0; - + $r++; $this->rights[$r][0] = 1181; $this->rights[$r][1] = 'Consulter les fournisseurs'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 1; $this->rights[$r][4] = 'lire'; - + $r++; $this->rights[$r][0] = 1182; $this->rights[$r][1] = 'Lire les commandes fournisseur'; @@ -113,7 +114,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 1; $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'lire'; - + $r++; $this->rights[$r][0] = 1183; $this->rights[$r][1] = 'Creer une commande fournisseur'; @@ -121,7 +122,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'creer'; - + $r++; $this->rights[$r][0] = 1184; $this->rights[$r][1] = 'Valider une commande fournisseur'; @@ -129,7 +130,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'valider'; - + $r++; $this->rights[$r][0] = 1185; $this->rights[$r][1] = 'Approuver les commandes fournisseur'; @@ -137,7 +138,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'approuver'; - + $r++; $this->rights[$r][0] = 1186; $this->rights[$r][1] = 'Commander une commande fournisseur'; @@ -145,7 +146,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'commander'; - + $r++; $this->rights[$r][0] = 1187; $this->rights[$r][1] = 'Receptionner les commandes fournisseur'; @@ -153,7 +154,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'receptionner'; - + $r++; $this->rights[$r][0] = 1188; $this->rights[$r][1] = 'Cloturer les commandes fournisseur'; @@ -161,7 +162,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'cloturer'; - + $r++; $this->rights[$r][0] = 1189; $this->rights[$r][1] = 'Annuler les commandes fournisseur'; @@ -169,7 +170,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'commande'; $this->rights[$r][5] = 'annuler'; - + $r++; $this->rights[$r][0] = 1231; $this->rights[$r][1] = 'Lire les factures fournisseur'; @@ -177,7 +178,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 1; $this->rights[$r][4] = 'facture'; $this->rights[$r][5] = 'lire'; - + $r++; $this->rights[$r][0] = 1232; $this->rights[$r][1] = 'Creer une facture fournisseur'; @@ -185,7 +186,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'facture'; $this->rights[$r][5] = 'creer'; - + $r++; $this->rights[$r][0] = 1233; $this->rights[$r][1] = 'Valider une facture fournisseur'; @@ -193,7 +194,7 @@ class modFournisseur extends DolibarrModules $this->rights[$r][3] = 0; $this->rights[$r][4] = 'facture'; $this->rights[$r][5] = 'valider'; - + $r++; $this->rights[$r][0] = 1234; $this->rights[$r][1] = 'Supprimer une facture fournisseur'; @@ -202,116 +203,116 @@ class modFournisseur extends DolibarrModules $this->rights[$r][4] = 'facture'; $this->rights[$r][5] = 'supprimer'; - $r++; - $this->rights[$r][0] = 1236; - $this->rights[$r][1] = 'Exporter les factures fournisseurs, attributs et reglements'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'facture'; - $this->rights[$r][5] = 'export'; + $r++; + $this->rights[$r][0] = 1236; + $this->rights[$r][1] = 'Exporter les factures fournisseurs, attributs et reglements'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'facture'; + $this->rights[$r][5] = 'export'; - // Exports - //-------- - $r=0; - - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='Factures fournisseurs et lignes de facture'; - $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePayed",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_taux'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineHT",'fd.total_ttc'=>"LineTTC",'fd.tva'=>"LineVAT"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_taux'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line"); - $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total_ht'=>"totalht",'f.total_ttc'=>"totalttc",'f.total_tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.tva_taux'=>"linevatrate",'fd.qty'=>"lineqty",'fd.total_ht'=>"total_ht",'fd.total_ttc'=>"total_ttc",'fd.tva'=>"tva"); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'facture_fourn as f, '.MAIN_DB_PREFIX.'facture_fourn_det as fd, '.MAIN_DB_PREFIX.'societe as s'; + // Exports + //-------- + $r=0; + + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='Factures fournisseurs et lignes de facture'; + $this->export_permission[$r]=array(array("fournisseur","facture","export")); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePayed",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_taux'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.total_ht'=>"LineHT",'fd.total_ttc'=>"LineTTC",'fd.tva'=>"LineVAT"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'fd.rowid'=>'invoice_line','fd.description'=>"invoice_line",'fd.tva_taux'=>"invoice_line",'fd.qty'=>"invoice_line",'fd.total_ht'=>"invoice_line",'fd.total_ttc'=>"invoice_line",'fd.tva'=>"invoice_line"); + $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total_ht'=>"totalht",'f.total_ttc'=>"totalttc",'f.total_tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.tva_taux'=>"linevatrate",'fd.qty'=>"lineqty",'fd.total_ht'=>"total_ht",'fd.total_ttc'=>"total_ttc",'fd.tva'=>"tva"); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'facture_fourn as f, '.MAIN_DB_PREFIX.'facture_fourn_det as fd, '.MAIN_DB_PREFIX.'societe as s'; $this->export_sql_end[$r].=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture_fourn'; - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='Factures fournisseurs et reglements'; - $this->export_permission[$r]=array(array("fournisseur","facture","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePayed",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); - $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total_ht'=>"totalht",'f.total_ttc'=>"totalttc",'f.total_tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'pf.amount'=>'amount_payment','p.datep'=>'date_payment','p.num_paiement'=>'num_payment'); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture_fourn as f, '.MAIN_DB_PREFIX.'societe as s) LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn as p ON pf.fk_paiementfourn = p.rowid'; + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='Factures fournisseurs et reglements'; + $this->export_permission[$r]=array(array("fournisseur","facture","export")); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','f.rowid'=>"InvoiceId",'f.facnumber'=>"InvoiceRef",'f.datec'=>"InvoiceDateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.total_tva'=>"TotalVAT",'f.paye'=>"InvoicePayed",'f.fk_statut'=>'InvoiceStatus','f.note'=>"InvoiceNote",'pf.amount'=>'AmountPayment','p.datep'=>'DatePayment','p.num_paiement'=>'PaymentNumber'); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','f.rowid'=>"invoice",'f.facnumber'=>"invoice",'f.datec'=>"invoice",'f.datef'=>"invoice",'f.total_ht'=>"invoice",'f.total_ttc'=>"invoice",'f.total_tva'=>"invoice",'f.paye'=>"invoice",'f.fk_statut'=>'invoice','f.note'=>"invoice",'pf.amount'=>'payment','p.datep'=>'payment','p.num_paiement'=>'payment'); + $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total_ht'=>"totalht",'f.total_ttc'=>"totalttc",'f.total_tva'=>"totalvat",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'pf.amount'=>'amount_payment','p.datep'=>'date_payment','p.num_paiement'=>'num_payment'); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'facture_fourn as f, '.MAIN_DB_PREFIX.'societe as s) LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn as p ON pf.fk_paiementfourn = p.rowid'; $this->export_sql_end[$r].=' WHERE f.fk_soc = s.rowid'; - } + } - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - $this->remove(); - - // Dir - $this->dirs[0] = $conf->fournisseur->dir_output; - //$this->dirs[1] = $conf->fournisseur->commande->dir_output; - //$this->dirs[2] = $conf->fournisseur->facture->dir_output; + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + $this->remove(); - $sql = array(); + // Dir + $this->dirs[0] = $conf->fournisseur->dir_output; + //$this->dirs[1] = $conf->fournisseur->commande->dir_output; + //$this->dirs[2] = $conf->fournisseur->facture->dir_output; - $this->load_datas(); - - return $this->_init($sql); - } + $sql = array(); - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + $this->load_datas(); - return $this->_remove($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel� par l'init (donc lors de l'activation d'un module) - * - */ - function load_datas() - { - $sql = "SELECT count(rowid) FROM ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - if ($this->db->query($sql)) - { - $row = $this->db->fetch_row(); + return $this->_remove($sql); + } - if ($row[0] == 0) + /** + * \brief Fonction appel� par l'init (donc lors de l'activation d'un module) + * + */ + function load_datas() + { + $sql = "SELECT count(rowid) FROM ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; + + if ($this->db->query($sql)) + { + $row = $this->db->fetch_row(); + + if ($row[0] == 0) { - $this->db->free(); + $this->db->free(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; - $sql .= " (code,libelle) VALUES ('OrderByMail','Courrier')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; + $sql .= " (code,libelle) VALUES ('OrderByMail','Courrier')"; - $this->db->query($sql); + $this->db->query($sql); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; - $sql .= " (code,libelle) VALUES ('OrderByFax','Fax')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; + $sql .= " (code,libelle) VALUES ('OrderByFax','Fax')"; - $this->db->query($sql); + $this->db->query($sql); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; - $sql .= " (code,libelle) VALUES ('OrderByEMail','EMail')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; + $sql .= " (code,libelle) VALUES ('OrderByEMail','EMail')"; - $this->db->query($sql); + $this->db->query($sql); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; - $sql .= " (code,libelle) VALUES ('OrderByPhone','Telephone')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; + $sql .= " (code,libelle) VALUES ('OrderByPhone','Telephone')"; - $this->db->query($sql); + $this->db->query($sql); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; - $sql .= " (code,libelle) VALUES ('OrderByWWW','En ligne')"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."c_methode_commande_fournisseur"; + $sql .= " (code,libelle) VALUES ('OrderByWWW','En ligne')"; - $this->db->query($sql); + $this->db->query($sql); } - } - } + } + } } ?> diff --git a/htdocs/includes/modules/modImport.class.php b/htdocs/includes/modules/modImport.class.php index ce327b2b722..fc670ef319a 100644 --- a/htdocs/includes/modules/modImport.class.php +++ b/htdocs/includes/modules/modImport.class.php @@ -20,98 +20,99 @@ */ /** \defgroup import Module Import - \brief Module g�n�rique pour r�aliser des imports de donn�es en base -*/ + \brief Module g�n�rique pour r�aliser des imports de donn�es en base + */ /** - \file htdocs/includes/modules/modImport.class.php - \ingroup import - \brief Fichier de description et activation du module Import -*/ + \file htdocs/includes/modules/modImport.class.php + \ingroup import + \brief Fichier de description et activation du module Import + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modImport - \brief Classe de description et activation du module Import -*/ + \brief Classe de description et activation du module Import + */ class modImport extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modImport($DB) - { - $this->db = $DB ; - $this->numero = 250; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modImport($DB) + { + $this->db = $DB ; + $this->numero = 250; - $this->family = "technic"; - $this->name = "Imports"; - $this->description = "Outils d'imports de donn�es Dolibarr (via un assistant)"; - $this->version = 'development'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_IMPORT'; - $this->special = 0; - $this->picto=''; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Outils d'imports de donnees Dolibarr (via un assistant)"; + $this->version = 'development'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_IMPORT'; + $this->special = 0; + $this->picto=''; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // Config pages - $this->config_page_url = array(); + // Config pages + $this->config_page_url = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); - $this->phpmin = array(4,2,0); - $this->phpmax = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); + $this->phpmin = array(4,2,0); + $this->phpmax = array(); - // Constantes - $this->const = array(); + // Constantes + $this->const = array(); - // Boxes - $this->boxes = array(); + // Boxes + $this->boxes = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'import'; - - $this->rights[1][0] = 1401; - $this->rights[1][1] = 'Lire les imports'; - $this->rights[1][2] = 'r'; - $this->rights[1][3] = 1; - $this->rights[1][4] = 'lire'; + // Permissions + $this->rights = array(); + $this->rights_class = 'import'; - $this->rights[2][0] = 1402; - $this->rights[2][1] = 'Cr�er/modifier un import'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; - - } + $this->rights[1][0] = 1401; + $this->rights[1][1] = 'Lire les imports'; + $this->rights[1][2] = 'r'; + $this->rights[1][3] = 1; + $this->rights[1][4] = 'lire'; - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - $sql = array(); - - return $this->_init($sql); - } + $this->rights[2][0] = 1402; + $this->rights[2][1] = 'Cr�er/modifier un import'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + } - return $this->_remove($sql); - } + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + $sql = array(); + + return $this->_init($sql); + } + + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modLabel.class.php b/htdocs/includes/modules/modLabel.class.php index 03ebfbb0126..0e2553faf07 100644 --- a/htdocs/includes/modules/modLabel.class.php +++ b/htdocs/includes/modules/modLabel.class.php @@ -18,106 +18,107 @@ */ /** - \defgroup label Module Etiquettes - \version $Id$ - \brief Module pour gerer les formats d'impression des etiquettes -*/ + \defgroup label Module Etiquettes + \version $Id$ + \brief Module pour gerer les formats d'impression des etiquettes + */ /** - \file htdocs/includes/modules/modLabel.class.php - \ingroup other - \brief Fichier de description et activation du module Label -*/ + \file htdocs/includes/modules/modLabel.class.php + \ingroup other + \brief Fichier de description et activation du module Label + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modLabel - \brief Classe de description et activation du module Label -*/ + \class modLabel + \brief Classe de description et activation du module Label + */ class modLabel extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modLabel($DB) - { - $this->db = $DB ; - $this->numero = 60 ; - - $this->family = "other"; - $this->name = "Etiquettes"; - $this->description = "Gestion des etiquettes"; - $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_LABEL'; - $this->special = 2; - $this->picto='label'; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modLabel($DB) + { + $this->db = $DB ; + $this->numero = 60 ; - // Dir - $this->dirs = array(); + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des etiquettes"; + $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_LABEL'; + $this->special = 2; + $this->picto='label'; - // Dependancies - $this->depends = array(); - $this->requiredby = array(); - - // Config pages - $this->config_page_url = array("label.php"); - - // Constants - $this->const = array(); + // Dir + $this->dirs = array(); - // Boxes - $this->boxes = array(); + // Dependancies + $this->depends = array(); + $this->requiredby = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'label'; - - $this->rights[1][0] = 601; // id de la permission - $this->rights[1][1] = 'Lire les etiquettes'; // libelle de la permission - $this->rights[1][3] = 1; // La permission est-elle une permission par defaut - $this->rights[1][4] = 'lire'; + // Config pages + $this->config_page_url = array("label.php"); - $this->rights[2][0] = 602; // id de la permission - $this->rights[2][1] = 'Creer/modifier les etiquettes'; // libelle de la permission - $this->rights[2][3] = 0; // La permission est-elle une permission par defaut - $this->rights[2][4] = 'creer'; + // Constants + $this->const = array(); - $this->rights[4][0] = 609; // id de la permission - $this->rights[4][1] = 'Supprimer les etiquettes'; // libelle de la permission - $this->rights[4][3] = 0; // La permission est-elle une permission par defaut - $this->rights[4][4] = 'supprimer'; + // Boxes + $this->boxes = array(); - } + // Permissions + $this->rights = array(); + $this->rights_class = 'label'; + + $this->rights[1][0] = 601; // id de la permission + $this->rights[1][1] = 'Lire les etiquettes'; // libelle de la permission + $this->rights[1][3] = 1; // La permission est-elle une permission par defaut + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 602; // id de la permission + $this->rights[2][1] = 'Creer/modifier les etiquettes'; // libelle de la permission + $this->rights[2][3] = 0; // La permission est-elle une permission par defaut + $this->rights[2][4] = 'creer'; + + $this->rights[4][0] = 609; // id de la permission + $this->rights[4][1] = 'Supprimer les etiquettes'; // libelle de la permission + $this->rights[4][3] = 0; // La permission est-elle une permission par defaut + $this->rights[4][4] = 'supprimer'; + + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - // Permissions - $this->remove(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + // Permissions + $this->remove(); - $sql = array(); + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modLdap.class.php b/htdocs/includes/modules/modLdap.class.php index 5bb8fbd750c..1934a70e23f 100644 --- a/htdocs/includes/modules/modLdap.class.php +++ b/htdocs/includes/modules/modLdap.class.php @@ -21,54 +21,55 @@ */ /** \defgroup ldap Module ldap - \brief Module pour interfacer les contacts avec un annuaire Ldap -*/ + \brief Module pour interfacer les contacts avec un annuaire Ldap + */ /** - \file htdocs/includes/modules/modLdap.class.php - \ingroup ldap - \brief Fichier de description et activation du module Ldap -*/ + \file htdocs/includes/modules/modLdap.class.php + \ingroup ldap + \brief Fichier de description et activation du module Ldap + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modLdap - \brief Classe de description et activation du module Ldap -*/ + \brief Classe de description et activation du module Ldap + */ class modLdap extends DolibarrModules { /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ function modLdap($DB) { $this->db = $DB ; $this->numero = 200 ; - - $this->name = "Ldap"; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Synchronisation Ldap"; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_LDAP'; $this->special = 1; - + // Dir $this->dirs = array(); - + // Config pages $this->config_page_url = array("ldap.php"); - + // D�pendances $this->depends = array(); $this->requiredby = array(); - + // Constantes $this->const = array(); $r=0; - + $this->const[$r][0] = "LDAP_USER_DN"; $this->const[$r][1] = "chaine"; $this->const[$r][2] = "ou=users,dc=my-domain,dc=com"; @@ -126,32 +127,32 @@ class modLdap extends DolibarrModules // Boites $this->boxes = array(); - + // Permissions $this->rights = array(); $this->rights_class = 'ldap'; } - /** - * \brief Fonction appel� lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - $sql = array(); + /** + * \brief Fonction appel� lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modMailing.class.php b/htdocs/includes/modules/modMailing.class.php index 8aa8361cc86..e7601e88063 100644 --- a/htdocs/includes/modules/modMailing.class.php +++ b/htdocs/includes/modules/modMailing.class.php @@ -18,113 +18,114 @@ */ /** - \defgroup mailing Module mailing - \brief Module pour gerer les mailings - \version $Id$ -*/ + \defgroup mailing Module mailing + \brief Module pour gerer les mailings + \version $Id$ + */ /** - \file htdocs/includes/modules/modMailing.class.php - \ingroup mailing - \brief Fichier de description et activation du module Mailing -*/ + \file htdocs/includes/modules/modMailing.class.php + \ingroup mailing + \brief Fichier de description et activation du module Mailing + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modMailing - \brief Classe de description et activation du module Mailing -*/ + \class modMailing + \brief Classe de description et activation du module Mailing + */ class modMailing extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modMailing($DB) - { - $this->db = $DB ; - $this->numero = 22 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modMailing($DB) + { + $this->db = $DB ; + $this->numero = 22 ; - $this->family = "technic"; - $this->name = "EMailings"; - $this->description = "Gestion des EMailings"; - $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_MAILING'; - $this->special = 1; - $this->picto='email'; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des EMailings"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_MAILING'; + $this->special = 1; + $this->picto='email'; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); - $this->langfiles = array("mails"); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); + $this->langfiles = array("mails"); - // Config pages - $this->config_page_url = array("mailing.php"); + // Config pages + $this->config_page_url = array("mailing.php"); - // Constantes - $this->const = array(); + // Constantes + $this->const = array(); - // Boites - $this->boxes = array(); + // Boites + $this->boxes = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'mailing'; + // Permissions + $this->rights = array(); + $this->rights_class = 'mailing'; - $this->rights[1][0] = 221; // id de la permission - $this->rights[1][1] = 'Consulter les mailings'; // libelle de la permission - $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[1][3] = 1; // La permission est-elle une permission par d�faut - $this->rights[1][4] = 'lire'; + $this->rights[1][0] = 221; // id de la permission + $this->rights[1][1] = 'Consulter les mailings'; // libelle de la permission + $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[1][3] = 1; // La permission est-elle une permission par d�faut + $this->rights[1][4] = 'lire'; - $this->rights[2][0] = 222; - $this->rights[2][1] = 'Creer/modifier les mailings (sujet, destinataires...)'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; + $this->rights[2][0] = 222; + $this->rights[2][1] = 'Creer/modifier les mailings (sujet, destinataires...)'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; - $this->rights[3][0] = 223; - $this->rights[3][1] = 'Valider les mailings (permet leur envoi)'; - $this->rights[3][2] = 'w'; - $this->rights[3][3] = 0; - $this->rights[3][4] = 'valider'; + $this->rights[3][0] = 223; + $this->rights[3][1] = 'Valider les mailings (permet leur envoi)'; + $this->rights[3][2] = 'w'; + $this->rights[3][3] = 0; + $this->rights[3][4] = 'valider'; - $this->rights[4][0] = 229; - $this->rights[4][1] = 'Supprimer les mailings)'; - $this->rights[4][2] = 'd'; - $this->rights[4][3] = 0; - $this->rights[4][4] = 'supprimer'; - - } + $this->rights[4][0] = 229; + $this->rights[4][1] = 'Supprimer les mailings)'; + $this->rights[4][2] = 'd'; + $this->rights[4][3] = 0; + $this->rights[4][4] = 'supprimer'; + + } - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - // Permissions - $this->remove(); - - return $this->_init($sql); - } + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + // Permissions + $this->remove(); + + return $this->_init($sql); + } - /** - \brief Fonction appelee lors de la desactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + \brief Fonction appelee lors de la desactivation d'un module. + Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modMantis.class.php b/htdocs/includes/modules/modMantis.class.php index 1165d5f208b..f15b60e7857 100644 --- a/htdocs/includes/modules/modMantis.class.php +++ b/htdocs/includes/modules/modMantis.class.php @@ -54,10 +54,10 @@ class modMantis extends DolibarrModules // Family can be 'crm','financial','hr','projects','product','technic','other' // It is used to sort modules in module setup page $this->family = "projects"; - // Module title used if translation string 'ModuleXXXName' not found (XXX is id value) - $this->name = "Mantis"; - // Module descriptoin used translation string 'ModuleXXXDesc' not found (XXX is id value) - $this->description = "Interfa�age avec le bug tracking Mantis"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + // Module description used translation string 'ModuleXXXDesc' not found (XXX is id value) + $this->description = "Interfacage avec le bug tracking Mantis"; // Possible values for version are: 'experimental' or 'dolibarr' or version $this->version = 'dolibarr'; // Id used in llx_const table to manage module status (enabled/disabled) diff --git a/htdocs/includes/modules/modNotification.class.php b/htdocs/includes/modules/modNotification.class.php index 66364fc96e6..0834eb9e46c 100644 --- a/htdocs/includes/modules/modNotification.class.php +++ b/htdocs/includes/modules/modNotification.class.php @@ -20,88 +20,89 @@ */ /** - \defgroup notification Module notification - \brief Module pour g�rer les notifications (par mail ou autre) -*/ + \defgroup notification Module notification + \brief Module pour g�rer les notifications (par mail ou autre) + */ /** - \file htdocs/includes/modules/modNotification.class.php - \ingroup notification - \brief Fichier de description et activation du module Notification -*/ + \file htdocs/includes/modules/modNotification.class.php + \ingroup notification + \brief Fichier de description et activation du module Notification + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modMailing - \brief Classe de description et activation du module Mailing -*/ + \class modMailing + \brief Classe de description et activation du module Mailing + */ class modNotification extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modNotification($DB) - { - $this->db = $DB ; - $this->numero = 600; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modNotification($DB) + { + $this->db = $DB ; + $this->numero = 600; - $this->family = "technic"; - $this->name = "Notifications"; - $this->description = "Gestion des notifications (par mail) sur �v�nement Dolibarr"; - $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_NOTIFICATION'; - $this->special = 1; - $this->picto='email'; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des notifications (par mail) sur �v�nement Dolibarr"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_NOTIFICATION'; + $this->special = 1; + $this->picto='email'; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); - $this->langfiles = array("mails"); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); + $this->langfiles = array("mails"); - // Config pages - $this->config_page_url = array("notification.php"); + // Config pages + $this->config_page_url = array("notification.php"); - // Constantes - $this->const = array(); + // Constantes + $this->const = array(); - // Boites - $this->boxes = array(); + // Boites + $this->boxes = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'notification'; - } + // Permissions + $this->rights = array(); + $this->rights_class = 'notification'; + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - // Permissions - $this->remove(); - - return $this->_init($sql); - } + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + // Permissions + $this->remove(); + + return $this->_init($sql); + } - /** - \brief Fonction appel�e lors de la d�sactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + \brief Fonction appel�e lors de la d�sactivation d'un module. + Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modOSCommerce2.class.php b/htdocs/includes/modules/modOSCommerce2.class.php index c12e90b047c..13c6038c0b5 100644 --- a/htdocs/includes/modules/modOSCommerce2.class.php +++ b/htdocs/includes/modules/modOSCommerce2.class.php @@ -22,22 +22,22 @@ */ /** \defgroup oscommerce2 Module OSCommerce 2 - \brief Module pour g�rer une boutique et interface avec OSCommerce via Web Services -*/ + \brief Module pour g�rer une boutique et interface avec OSCommerce via Web Services + */ /** - \file htdocs/includes/modules/modOSCommerce2.class.php - \ingroup oscommerce2 - \brief Fichier de description et activation du module OSCommerce2 -*/ + \file htdocs/includes/modules/modOSCommerce2.class.php + \ingroup oscommerce2 + \brief Fichier de description et activation du module OSCommerce2 + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); -/** - \class modOSCommerce2 - \brief Classe de description et activation du module OSCommerce2 -*/ +/** + \class modOSCommerce2 + \brief Classe de description et activation du module OSCommerce2 + */ class modOSCommerce2 extends DolibarrModules { @@ -50,45 +50,46 @@ class modOSCommerce2 extends DolibarrModules { $this->db = $DB ; $this->numero = 900; - + $this->family = "products"; - $this->name = "OSCommerce by WS"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); $this->description = "Interface de visualisation d'une boutique OSCommerce via des Web services.\nCe module requiert d'installer les composants dans /oscommerce_ws/ws_server sur OSCommerce. Voir fichier README dans /oscommerce_ws/ws_server"; $this->version = 'experimental'; // 'development' or 'experimental' or 'dolibarr' or version $this->const_name = 'MAIN_MODULE_OSCOMMERCEWS'; $this->special = 1; - + // Dir $this->dirs = array(); - + // Config pages $this->config_page_url = array(); - + // D�pendances $this->depends = array(); $this->requiredby = array(); - $this->conflictwith = array("modBoutique"); - $this->langfiles = array("shop"); - + $this->conflictwith = array("modBoutique"); + $this->langfiles = array("shop"); + // Constantes $this->const = array(); - - // Boites - $this->boxes = array(); + + // Boites + $this->boxes = array(); // Permissions $this->rights = array(); $this->rights_class = 'boutique'; } - - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ + + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ function init() { $sql = array(); - + return $this->_init($sql); } @@ -99,9 +100,9 @@ class modOSCommerce2 extends DolibarrModules function remove() { $sql = array(); - + return $this->_remove($sql); } - + } ?> diff --git a/htdocs/includes/modules/modPhenix.class.php b/htdocs/includes/modules/modPhenix.class.php index 830c39d2b29..c03d25a4b5a 100644 --- a/htdocs/includes/modules/modPhenix.class.php +++ b/htdocs/includes/modules/modPhenix.class.php @@ -53,8 +53,8 @@ class modPhenix extends DolibarrModules // Family can be 'crm','financial','hr','projects','product','technic','other' // It is used to sort modules in module setup page $this->family = "projects"; - // Module title used if translation string 'ModuleXXXName' not found (XXX is id value) - $this->name = "Phenix"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); // Module descriptoin used translation string 'ModuleXXXDesc' not found (XXX is id value) $this->description = "Interface avec le calendrier Phenix"; // Possible values for version are: 'experimental' or 'dolibarr' or version diff --git a/htdocs/includes/modules/modPostnuke.class.php b/htdocs/includes/modules/modPostnuke.class.php index df9b20d7245..d8f3b9ffd42 100644 --- a/htdocs/includes/modules/modPostnuke.class.php +++ b/htdocs/includes/modules/modPostnuke.class.php @@ -20,80 +20,81 @@ */ /** \defgroup postnuke Module postnuke - \brief Module d'interfacage avec Postnuke -*/ + \brief Module d'interfacage avec Postnuke + */ /** - \file htdocs/includes/modules/modPostnuke.class.php - \ingroup postnuke - \brief Fichier de description et activation du module Postnuke -*/ + \file htdocs/includes/modules/modPostnuke.class.php + \ingroup postnuke + \brief Fichier de description et activation du module Postnuke + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modPostnuke - \brief Classe de description et activation du module Postnuke -*/ + \class modPostnuke + \brief Classe de description et activation du module Postnuke + */ class modPostnuke extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modPostnuke($DB) - { - $this->db = $DB ; - $this->numero = 210; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modPostnuke($DB) + { + $this->db = $DB ; + $this->numero = 210; - $this->family = "technic"; - $this->name = "Postnuke"; - $this->description = "Gestion de l'outil PostNuke"; - $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_POSTNUKE'; - $this->special = 1; + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion de l'outil PostNuke"; + $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_POSTNUKE'; + $this->special = 1; - // Dir - $this->dirs = array(); + // Dir + $this->dirs = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); - // Constantes - $this->const = array(); - - // Boxes - $this->boxes = array(); + // Constantes + $this->const = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'postnuke'; - } + // Boxes + $this->boxes = array(); - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - $sql = array(); - - return $this->_init($sql); - } + // Permissions + $this->rights = array(); + $this->rights_class = 'postnuke'; + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_init($sql); + } + + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modPrelevement.class.php b/htdocs/includes/modules/modPrelevement.class.php index eb618e7bae7..98b586d4b33 100644 --- a/htdocs/includes/modules/modPrelevement.class.php +++ b/htdocs/includes/modules/modPrelevement.class.php @@ -18,45 +18,46 @@ */ /** - \defgroup prelevement Module prelevement - \brief Module de gestion des prelevements bancaires - \version $Id$ -*/ + \defgroup prelevement Module prelevement + \brief Module de gestion des prelevements bancaires + \version $Id$ + */ /** - \file htdocs/includes/modules/modPrelevement.class.php - \ingroup prelevement - \brief Fichier de description et activation du module Prelevement -*/ + \file htdocs/includes/modules/modPrelevement.class.php + \ingroup prelevement + \brief Fichier de description et activation du module Prelevement + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modPrelevement - \brief Classe de description et activation du module Prelevement -*/ + \class modPrelevement + \brief Classe de description et activation du module Prelevement + */ class modPrelevement extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ function modPrelevement($DB) { global $conf; - + $this->db = $DB ; $this->numero = 57 ; - + $this->family = "financial"; - $this->name = "Prelevement"; - $this->description = "Gestion des Pr�l�vements"; - + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des Prelevements"; + $this->revision = explode(' ','$Revision$'); $this->version = $this->revision[1]; - + $this->const_name = 'MAIN_MODULE_PRELEVEMENT'; $this->special = 0; // Name of png file (without png) used for this module @@ -64,42 +65,42 @@ class modPrelevement extends DolibarrModules // Dir $this->dirs = array(); $this->data_directory = $conf->prelevement->dir_output . "/bon"; - + // D�pendances $this->depends = array("modFacture"); $this->requiredby = array(); - + // Constantes $this->const = array(); - + // Boites $this->boxes = array(); - + // Permissions $this->rights = array(); $this->rights_class = 'prelevement'; - + $this->rights[1][0] = 151; $this->rights[1][1] = 'Consulter les prelevements'; $this->rights[1][2] = 'r'; $this->rights[1][3] = 1; $this->rights[1][4] = 'bons'; $this->rights[1][5] = 'lire'; - + $this->rights[2][0] = 152; $this->rights[2][1] = 'Configurer les prelevements'; $this->rights[2][2] = 'w'; $this->rights[2][3] = 0; $this->rights[2][4] = 'bons'; $this->rights[2][5] = 'configurer'; - + $this->rights[3][0] = 153; $this->rights[3][1] = 'Consulter les bons de prelevements'; $this->rights[3][2] = 'r'; $this->rights[3][3] = 0; $this->rights[3][4] = 'bons'; $this->rights[3][5] = 'lire'; - + $this->rights[4][0] = 154; $this->rights[4][1] = 'Creer un bon de prelevement'; $this->rights[4][2] = 'w'; @@ -109,23 +110,23 @@ class modPrelevement extends DolibarrModules } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ function init() { global $conf; - + // Permissions $this->remove(); - + // Dir $this->dirs[0] = $conf->prelevement->dir_output; $this->dirs[1] = $conf->prelevement->dir_output."/bon" ; - + $sql = array(); - + return $this->_init($sql); } @@ -136,7 +137,7 @@ class modPrelevement extends DolibarrModules function remove() { $sql = array(); - + return $this->_remove($sql); } diff --git a/htdocs/includes/modules/modProduit.class.php b/htdocs/includes/modules/modProduit.class.php index fcb0d0e8333..417356f909c 100644 --- a/htdocs/includes/modules/modProduit.class.php +++ b/htdocs/includes/modules/modProduit.class.php @@ -20,181 +20,182 @@ */ /** - \defgroup produit Module produit - \brief Module pour gerer le suivi de produits predefinis - \version $Id$ -*/ + \defgroup produit Module produit + \brief Module pour gerer le suivi de produits predefinis + \version $Id$ + */ /** - \file htdocs/includes/modules/modProduit.class.php - \ingroup produit - \brief Fichier de description et activation du module Produit -*/ + \file htdocs/includes/modules/modProduit.class.php + \ingroup produit + \brief Fichier de description et activation du module Produit + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modProduit - \brief Classe de description et activation du module Produit -*/ + \class modProduit + \brief Classe de description et activation du module Produit + */ class modProduit extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modProduit($DB) - { - global $conf; - - $this->db = $DB ; - $this->numero = 50 ; - - $this->family = "products"; - $this->name = "Produit"; - $this->description = "Gestion des produits"; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modProduit($DB) + { + global $conf; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; + $this->db = $DB ; + $this->numero = 50 ; - $this->const_name = 'MAIN_MODULE_PRODUIT'; - $this->special = 0; - $this->picto='product'; + $this->family = "products"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des produits"; - // Dir - $this->dirs = array(); + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; - // D�pendances - $this->depends = array(); - $this->requiredby = array("modStock","modService","modBarcode"); + $this->const_name = 'MAIN_MODULE_PRODUIT'; + $this->special = 0; + $this->picto='product'; - // Config pages - $this->config_page_url = array("produit.php"); - $this->langfiles = array("products","companies"); - - // Constantes - $this->const = array(); - $r=0; - - $this->const[$r][0] = "MAIN_SEARCHFORM_PRODUITSERVICE"; - $this->const[$r][1] = "yesno"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = "Affichage formulaire de recherche des Produits et Services dans la barre de gauche"; - $this->const[$r][4] = 0; - $r++; + // Dir + $this->dirs = array(); - // Boxes - $this->boxes = array(); - $this->boxes[0][1] = "box_produits.php"; + // D�pendances + $this->depends = array(); + $this->requiredby = array("modStock","modService","modBarcode"); - // Permissions - $this->rights = array(); - $this->rights_class = 'produit'; - $r=0; - - $r++; - $this->rights[$r][0] = 31; // id de la permission - $this->rights[$r][1] = 'Lire les produits/services'; // libelle de la permission - $this->rights[$r][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut - $this->rights[$r][4] = 'lire'; + // Config pages + $this->config_page_url = array("produit.php"); + $this->langfiles = array("products","companies"); - $r++; - $this->rights[$r][0] = 32; // id de la permission - $this->rights[$r][1] = 'Cr�er modifier les produits/services'; // libelle de la permission - $this->rights[$r][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[$r][4] = 'creer'; + // Constantes + $this->const = array(); + $r=0; - $r++; - $this->rights[$r][0] = 33; // id de la permission - $this->rights[$r][1] = 'Commander les produits/services'; // libelle de la permission - $this->rights[$r][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[$r][4] = 'commander'; + $this->const[$r][0] = "MAIN_SEARCHFORM_PRODUITSERVICE"; + $this->const[$r][1] = "yesno"; + $this->const[$r][2] = "1"; + $this->const[$r][3] = "Affichage formulaire de recherche des Produits et Services dans la barre de gauche"; + $this->const[$r][4] = 0; + $r++; - $r++; - $this->rights[$r][0] = 34; // id de la permission - $this->rights[$r][1] = 'Supprimer les produits/services'; // libelle de la permission - $this->rights[$r][2] = 'd'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[$r][4] = 'supprimer'; + // Boxes + $this->boxes = array(); + $this->boxes[0][1] = "box_produits.php"; - $r++; - $this->rights[$r][0] = 38; - $this->rights[$r][1] = 'Exporter les produits'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'export'; + // Permissions + $this->rights = array(); + $this->rights_class = 'produit'; + $r=0; + + $r++; + $this->rights[$r][0] = 31; // id de la permission + $this->rights[$r][1] = 'Lire les produits/services'; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[$r][3] = 1; // La permission est-elle une permission par d�faut + $this->rights[$r][4] = 'lire'; + + $r++; + $this->rights[$r][0] = 32; // id de la permission + $this->rights[$r][1] = 'Cr�er modifier les produits/services'; // libelle de la permission + $this->rights[$r][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[$r][4] = 'creer'; + + $r++; + $this->rights[$r][0] = 33; // id de la permission + $this->rights[$r][1] = 'Commander les produits/services'; // libelle de la permission + $this->rights[$r][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[$r][4] = 'commander'; + + $r++; + $this->rights[$r][0] = 34; // id de la permission + $this->rights[$r][1] = 'Supprimer les produits/services'; // libelle de la permission + $this->rights[$r][2] = 'd'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[$r][4] = 'supprimer'; + + $r++; + $this->rights[$r][0] = 38; + $this->rights[$r][1] = 'Exporter les produits'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'export'; - // Exports - //-------- - $r=0; + // Exports + //-------- + $r=0; - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="ProductsOrServices"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("produit","export")); - $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification'); - $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product'); - $this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification'); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; - - - // Imports - //-------- - $r=0; + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]="ProductsOrServices"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r]=array(array("produit","export")); + $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification'); + $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product'); + $this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification'); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; + + + // Imports + //-------- + $r=0; + + $r++; + $this->import_code[$r]=$this->id.'_'.$r; + $this->import_label[$r]="ProductsOrServices"; // Translation key + $this->import_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration"); + $this->import_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product"); + //$this->import_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration"); + + if($conf->global->PRODUIT_MULTIPRICES) + { + $this->import_multiprices[$r]=array(); + + for($i=1;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++) + { + $this->import_multiprices[$r][$i]["price_ht"] = "SellingPriceHT ".$i; + $this->import_multiprices[$r][$i]["price_ttc"] = "SellingPriceTTC ".$i; + } + } - $r++; - $this->import_code[$r]=$this->id.'_'.$r; - $this->import_label[$r]="ProductsOrServices"; // Translation key - $this->import_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"SellingPriceHT",'p.price_ttc'=>"SellingPriceTTC",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration"); - $this->import_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product"); - //$this->import_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration"); - - if($conf->global->PRODUIT_MULTIPRICES) - { - $this->import_multiprices[$r]=array(); - - for($i=1;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++) - { - $this->import_multiprices[$r][$i]["price_ht"] = "SellingPriceHT ".$i; - $this->import_multiprices[$r][$i]["price_ttc"] = "SellingPriceTTC ".$i; - } - } - } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - // Permissions - $this->remove(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + // Permissions + $this->remove(); - $sql = array(); + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modProjet.class.php b/htdocs/includes/modules/modProjet.class.php index 41ba2d47c0d..7c6680ffdd6 100644 --- a/htdocs/includes/modules/modProjet.class.php +++ b/htdocs/includes/modules/modProjet.class.php @@ -22,98 +22,99 @@ */ /** \defgroup projet Module projet - \brief Module pour inclure le detail par projets dans les autres modules -*/ + \brief Module pour inclure le detail par projets dans les autres modules + */ /** \file htdocs/includes/modules/modProjet.class.php - \ingroup projet - \brief Fichier de description et activation du module Projet -*/ + \ingroup projet + \brief Fichier de description et activation du module Projet + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modProjet - \brief Classe de description et activation du module Projet -*/ + \class modProjet + \brief Classe de description et activation du module Projet + */ class modProjet extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modProjet($DB) - { - $this->db = $DB ; - $this->numero = 400 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modProjet($DB) + { + $this->db = $DB ; + $this->numero = 400 ; - $this->family = "projects"; - $this->name = "Projets"; - $this->description = "Gestion des projets"; - $this->revision = explode(" ","$Revision$"); - $this->version = $this->revision[1]; - $this->const_name = 'MAIN_MODULE_PROJET'; - $this->special = 0; - $this->picto='email'; - - // D�pendances - $this->depends = array(); - $this->requiredby = array(); + $this->family = "projects"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des projets"; + $this->revision = explode(" ","$Revision$"); + $this->version = $this->revision[1]; + $this->const_name = 'MAIN_MODULE_PROJET'; + $this->special = 0; + $this->picto='email'; - // Constantes - $this->const = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); - // Boites - $this->boxes = array(); + // Constantes + $this->const = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'projet'; + // Boites + $this->boxes = array(); - $this->rights[1][0] = 41; // id de la permission - $this->rights[1][1] = 'Lire les projets'; // libelle de la permission - $this->rights[1][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[1][3] = 1; // La permission est-elle une permission par d�faut - $this->rights[1][4] = 'lire'; + // Permissions + $this->rights = array(); + $this->rights_class = 'projet'; - $this->rights[2][0] = 42; // id de la permission - $this->rights[2][1] = 'Cr�er modifier les projets'; // libelle de la permission - $this->rights[2][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[2][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[2][4] = 'creer'; + $this->rights[1][0] = 41; // id de la permission + $this->rights[1][1] = 'Lire les projets'; // libelle de la permission + $this->rights[1][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[1][3] = 1; // La permission est-elle une permission par d�faut + $this->rights[1][4] = 'lire'; - $this->rights[3][0] = 44; // id de la permission - $this->rights[3][1] = 'Supprimer les projets'; // libelle de la permission - $this->rights[3][2] = 'd'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[3][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[3][4] = 'supprimer'; - } + $this->rights[2][0] = 42; // id de la permission + $this->rights[2][1] = 'Cr�er modifier les projets'; // libelle de la permission + $this->rights[2][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[2][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[2][4] = 'creer'; + + $this->rights[3][0] = 44; // id de la permission + $this->rights[3][1] = 'Supprimer les projets'; // libelle de la permission + $this->rights[3][2] = 'd'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[3][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[3][4] = 'supprimer'; + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - // Permissions - $this->remove(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + // Permissions + $this->remove(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modPropale.class.php b/htdocs/includes/modules/modPropale.class.php index 04c2e8e8c0d..8462eb30e50 100644 --- a/htdocs/includes/modules/modPropale.class.php +++ b/htdocs/includes/modules/modPropale.class.php @@ -22,147 +22,148 @@ */ /** \defgroup propale Module propale - \brief Module pour gerer la tenue de propositions commerciales -*/ + \brief Module pour gerer la tenue de propositions commerciales + */ /** - \file htdocs/includes/modules/modPropale.class.php - \ingroup propale - \brief Fichier de description et activation du module Propale -*/ + \file htdocs/includes/modules/modPropale.class.php + \ingroup propale + \brief Fichier de description et activation du module Propale + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modPropale - \brief Classe de description et activation du module Propale -*/ + \brief Classe de description et activation du module Propale + */ class modPropale extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modPropale($DB) - { - $this->db = $DB ; - $this->numero = 20 ; - - $this->family = "crm"; - $this->name = "Propositions commerciales"; - $this->description = "Gestion des propositions commerciales"; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modPropale($DB) + { + $this->db = $DB ; + $this->numero = 20 ; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des propositions commerciales"; - $this->const_name = 'MAIN_MODULE_PROPALE'; - $this->special = 0; - $this->picto='propal'; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; - // Dir - $this->dirs = array(); + $this->const_name = 'MAIN_MODULE_PROPALE'; + $this->special = 0; + $this->picto='propal'; - // Dependances - $this->depends = array("modSociete","modCommercial"); - $this->config_page_url = array("propale.php"); + // Dir + $this->dirs = array(); - // Constantes - $this->const = array(); + // Dependances + $this->depends = array("modSociete","modCommercial"); + $this->config_page_url = array("propale.php"); - $this->const[0][0] = "PROPALE_ADDON_PDF"; - $this->const[0][1] = "chaine"; - $this->const[0][2] = "azur"; - $this->const[0][3] = 'Nom du gestionnaire de generation des propales en PDF'; - $this->const[0][4] = 0; + // Constantes + $this->const = array(); - $this->const[1][0] = "PROPALE_ADDON"; - $this->const[1][1] = "chaine"; - $this->const[1][2] = "mod_propale_marbre"; - $this->const[1][3] = 'Nom du gestionnaire de numerotation des propales'; - $this->const[1][4] = 0; + $this->const[0][0] = "PROPALE_ADDON_PDF"; + $this->const[0][1] = "chaine"; + $this->const[0][2] = "azur"; + $this->const[0][3] = 'Nom du gestionnaire de generation des propales en PDF'; + $this->const[0][4] = 0; - // Boxes - $this->boxes = array(); - $this->boxes[0][1] = "box_propales.php"; + $this->const[1][0] = "PROPALE_ADDON"; + $this->const[1][1] = "chaine"; + $this->const[1][2] = "mod_propale_marbre"; + $this->const[1][3] = 'Nom du gestionnaire de numerotation des propales'; + $this->const[1][4] = 0; - // Permissions - $this->rights = array(); - $this->rights_class = 'propale'; + // Boxes + $this->boxes = array(); + $this->boxes[0][1] = "box_propales.php"; - $this->rights[1][0] = 21; // id de la permission - $this->rights[1][1] = 'Lire les propositions commerciales'; // libelle de la permission - $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[1][3] = 1; // La permission est-elle une permission par defaut - $this->rights[1][4] = 'lire'; + // Permissions + $this->rights = array(); + $this->rights_class = 'propale'; - $this->rights[2][0] = 22; // id de la permission - $this->rights[2][1] = 'Creer/modifier les propositions commerciales'; // libelle de la permission - $this->rights[2][2] = 'w'; // type de la permission (deprecie a ce jour) - $this->rights[2][3] = 0; // La permission est-elle une permission par defaut - $this->rights[2][4] = 'creer'; + $this->rights[1][0] = 21; // id de la permission + $this->rights[1][1] = 'Lire les propositions commerciales'; // libelle de la permission + $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[1][3] = 1; // La permission est-elle une permission par defaut + $this->rights[1][4] = 'lire'; - $this->rights[3][0] = 24; // id de la permission - $this->rights[3][1] = 'Valider les propositions commerciales'; // libelle de la permission - $this->rights[3][2] = 'd'; // type de la permission (deprecie a ce jour) - $this->rights[3][3] = 0; // La permission est-elle une permission par defaut - $this->rights[3][4] = 'valider'; + $this->rights[2][0] = 22; // id de la permission + $this->rights[2][1] = 'Creer/modifier les propositions commerciales'; // libelle de la permission + $this->rights[2][2] = 'w'; // type de la permission (deprecie a ce jour) + $this->rights[2][3] = 0; // La permission est-elle une permission par defaut + $this->rights[2][4] = 'creer'; - $this->rights[4][0] = 25; // id de la permission - $this->rights[4][1] = 'Envoyer les propositions commerciales aux clients'; // libelle de la permission - $this->rights[4][2] = 'd'; // type de la permission (deprecie a ce jour) - $this->rights[4][3] = 0; // La permission est-elle une permission par defaut - $this->rights[4][4] = 'envoyer'; + $this->rights[3][0] = 24; // id de la permission + $this->rights[3][1] = 'Valider les propositions commerciales'; // libelle de la permission + $this->rights[3][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[3][3] = 0; // La permission est-elle une permission par defaut + $this->rights[3][4] = 'valider'; - $this->rights[5][0] = 26; // id de la permission - $this->rights[5][1] = 'Cloturer les propositions commerciales'; // libelle de la permission - $this->rights[5][2] = 'd'; // type de la permission (deprecie a ce jour) - $this->rights[5][3] = 0; // La permission est-elle une permission par defaut - $this->rights[5][4] = 'cloturer'; + $this->rights[4][0] = 25; // id de la permission + $this->rights[4][1] = 'Envoyer les propositions commerciales aux clients'; // libelle de la permission + $this->rights[4][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[4][3] = 0; // La permission est-elle une permission par defaut + $this->rights[4][4] = 'envoyer'; - $this->rights[6][0] = 27; // id de la permission - $this->rights[6][1] = 'Supprimer les propositions commerciales'; // libelle de la permission - $this->rights[6][2] = 'd'; // type de la permission (deprecie a ce jour) - $this->rights[6][3] = 0; // La permission est-elle une permission par defaut - $this->rights[6][4] = 'supprimer'; + $this->rights[5][0] = 26; // id de la permission + $this->rights[5][1] = 'Cloturer les propositions commerciales'; // libelle de la permission + $this->rights[5][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[5][3] = 0; // La permission est-elle une permission par defaut + $this->rights[5][4] = 'cloturer'; - } + $this->rights[6][0] = 27; // id de la permission + $this->rights[6][1] = 'Supprimer les propositions commerciales'; // libelle de la permission + $this->rights[6][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[6][3] = 0; // La permission est-elle une permission par defaut + $this->rights[6][4] = 'supprimer'; + + } - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - // Permissions et valeurs par defaut - $this->remove(); + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + // Permissions et valeurs par defaut + $this->remove(); - // Repertoires - $this->dirs[0] = $conf->propal->dir_output; - $this->dirs[1] = $conf->propal->dir_temp; + // Repertoires + $this->dirs[0] = $conf->propal->dir_output; + $this->dirs[1] = $conf->propal->dir_temp; - $sql = array( + $sql = array( "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."'", "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type) VALUES('".$this->const[0][2]."','propal')", - ); - - return $this->_init($sql); + ); - } + return $this->_init($sql); - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + } - return $this->_remove($sql); + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - } + return $this->_remove($sql); + + } } ?> diff --git a/htdocs/includes/modules/modService.class.php b/htdocs/includes/modules/modService.class.php index 3647be6bce7..9d08ec1ac5b 100644 --- a/htdocs/includes/modules/modService.class.php +++ b/htdocs/includes/modules/modService.class.php @@ -22,113 +22,114 @@ */ /** - \defgroup service Module service - \brief Module pour g�rer le suivi de services pr�d�finis -*/ + \defgroup service Module service + \brief Module pour g�rer le suivi de services pr�d�finis + */ /** - \file htdocs/includes/modules/modService.class.php - \ingroup service - \brief Fichier de description et activation du module Service -*/ + \file htdocs/includes/modules/modService.class.php + \ingroup service + \brief Fichier de description et activation du module Service + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** \class modService - \brief Classe de description et activation du module Service -*/ + \brief Classe de description et activation du module Service + */ class modService extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modService($DB) - { - $this->db = $DB ; - $this->numero = 53 ; - - $this->family = "products"; - $this->name = "Service"; - $this->description = "Gestion des services"; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modService($DB) + { + $this->db = $DB ; + $this->numero = 53 ; - $this->revision = explode(" ","$Revision$"); - $this->version = $this->revision[1]; + $this->family = "products"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des services"; - $this->const_name = 'MAIN_MODULE_SERVICE'; - $this->special = 0; - $this->picto='service'; + $this->revision = explode(" ","$Revision$"); + $this->version = $this->revision[1]; - // D�pendances - $this->depends = array("modProduit"); - $this->requiredby = array("modContrat"); + $this->const_name = 'MAIN_MODULE_SERVICE'; + $this->special = 0; + $this->picto='service'; - // Constantes - $this->const = array(); + // D�pendances + $this->depends = array("modProduit"); + $this->requiredby = array("modContrat"); - // Boites - $this->boxes = array(); - $this->boxes[0][1] = "box_services_vendus.php"; + // Constantes + $this->const = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'service'; + // Boites + $this->boxes = array(); + $this->boxes[0][1] = "box_services_vendus.php"; -/* Pour l'instant droits sur services non g�r�s - $this->rights[1][0] = 331; // id de la permission - $this->rights[1][1] = 'Lire les services'; // libelle de la permission - $this->rights[1][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[1][3] = 1; // La permission est-elle une permission par d�faut - $this->rights[1][4] = 'lire'; + // Permissions + $this->rights = array(); + $this->rights_class = 'service'; - $this->rights[2][0] = 332; // id de la permission - $this->rights[2][1] = 'Cr�er/modifier les services'; // libelle de la permission - $this->rights[2][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[2][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[2][4] = 'creer'; + /* Pour l'instant droits sur services non g�r�s + $this->rights[1][0] = 331; // id de la permission + $this->rights[1][1] = 'Lire les services'; // libelle de la permission + $this->rights[1][2] = 'r'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[1][3] = 1; // La permission est-elle une permission par d�faut + $this->rights[1][4] = 'lire'; - $this->rights[3][0] = 333; // id de la permission - $this->rights[3][1] = 'Commander un service'; // libelle de la permission - $this->rights[3][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[3][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[3][4] = 'commander'; + $this->rights[2][0] = 332; // id de la permission + $this->rights[2][1] = 'Cr�er/modifier les services'; // libelle de la permission + $this->rights[2][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[2][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[2][4] = 'creer'; - $this->rights[4][0] = 334; // id de la permission - $this->rights[4][1] = 'Supprimer les services'; // libelle de la permission - $this->rights[4][2] = 'd'; // type de la permission (d�pr�ci� � ce jour) - $this->rights[4][3] = 0; // La permission est-elle une permission par d�faut - $this->rights[4][4] = 'supprimer'; -*/ + $this->rights[3][0] = 333; // id de la permission + $this->rights[3][1] = 'Commander un service'; // libelle de la permission + $this->rights[3][2] = 'w'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[3][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[3][4] = 'commander'; - } + $this->rights[4][0] = 334; // id de la permission + $this->rights[4][1] = 'Supprimer les services'; // libelle de la permission + $this->rights[4][2] = 'd'; // type de la permission (d�pr�ci� � ce jour) + $this->rights[4][3] = 0; // La permission est-elle une permission par d�faut + $this->rights[4][4] = 'supprimer'; + */ + + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - // Permissions et valeurs par d�faut - $this->remove(); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + // Permissions et valeurs par d�faut + $this->remove(); - $sql = array(); + $sql = array(); - return $this->_init($sql); - } + return $this->_init($sql); + } - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); - return $this->_remove($sql); - } + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modSociete.class.php b/htdocs/includes/modules/modSociete.class.php index c976321a8a1..3fdccf076e5 100644 --- a/htdocs/includes/modules/modSociete.class.php +++ b/htdocs/includes/modules/modSociete.class.php @@ -20,223 +20,224 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/** - \defgroup societe Module societe - \brief Module pour gerer les societes et contacts clients - \version $Id$ -*/ +/** + \defgroup societe Module societe + \brief Module pour gerer les societes et contacts clients + \version $Id$ + */ /** - \file htdocs/includes/modules/modSociete.class.php - \ingroup societe - \brief Fichier de description et activation du module Societe -*/ + \file htdocs/includes/modules/modSociete.class.php + \ingroup societe + \brief Fichier de description et activation du module Societe + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); -/** - \class modSociete - \brief Classe de description et activation du module Societe -*/ +/** + \class modSociete + \brief Classe de description et activation du module Societe + */ class modSociete extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modSociete($DB) - { - $this->db = $DB ; - $this->numero = 1 ; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modSociete($DB) + { + $this->db = $DB ; + $this->numero = 1 ; - $this->family = "crm"; - $this->name = "Module societe"; - $this->description = "Gestion des societes et contacts"; + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des societes et contacts"; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; - $this->const_name = 'MAIN_MODULE_SOCIETE'; - $this->special = 0; - $this->config_page_url = array("societe.php"); - $this->picto='company'; - - // Dir - $this->dirs = array(); + $this->const_name = 'MAIN_MODULE_SOCIETE'; + $this->special = 0; + $this->config_page_url = array("societe.php"); + $this->picto='company'; - // Dependances - $this->depends = array(); - $this->requiredby = array("modCommercial","modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande"); - $this->langfiles = array("companies"); - - // Constantes - $this->const = array(); - $r=0; - - $this->const[$r][0] = "SOCIETE_FISCAL_MONTH_START"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "0"; - $this->const[$r][3] = "Mettre le numero du mois du debut d\'annee fiscale, ex: 9 pour septembre"; - $this->const[$r][4] = 1; - $r++; - - $this->const[$r][0] = "MAIN_SEARCHFORM_SOCIETE"; - $this->const[$r][1] = "yesno"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = "Affichage formulaire de recherche des Societes dans la barre de gauche"; - $this->const[$r][4] = 0; - $r++; + // Dir + $this->dirs = array(); - $this->const[$r][0] = "MAIN_SEARCHFORM_CONTACT"; - $this->const[$r][1] = "yesno"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = "Affichage formulaire de recherche des Contacts dans la barre de gauche"; - $this->const[$r][4] = 0; - $r++; + // Dependances + $this->depends = array(); + $this->requiredby = array("modCommercial","modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande"); + $this->langfiles = array("companies"); - // Boxes - $this->boxes = array(); - $r=0; - $this->boxes[$r][1] = "box_clients.php"; - $r++; - $this->boxes[$r][1] = "box_prospect.php"; - $r++; - - // Permissions - $this->rights = array(); - $this->rights_class = 'societe'; - $r=0; - - $r++; - $this->rights[$r][0] = 121; // id de la permission - $this->rights[$r][1] = 'Lire les societes'; // libelle de la permission - $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 1; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'lire'; + // Constantes + $this->const = array(); + $r=0; - $r++; - $this->rights[$r][0] = 122; // id de la permission - $this->rights[$r][1] = 'Creer modifier les societes'; // libelle de la permission - $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'creer'; + $this->const[$r][0] = "SOCIETE_FISCAL_MONTH_START"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "0"; + $this->const[$r][3] = "Mettre le numero du mois du debut d\'annee fiscale, ex: 9 pour septembre"; + $this->const[$r][4] = 1; + $r++; - $r++; - $this->rights[$r][0] = 125; // id de la permission - $this->rights[$r][1] = 'Supprimer les societes'; // libelle de la permission - $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'supprimer'; + $this->const[$r][0] = "MAIN_SEARCHFORM_SOCIETE"; + $this->const[$r][1] = "yesno"; + $this->const[$r][2] = "1"; + $this->const[$r][3] = "Affichage formulaire de recherche des Societes dans la barre de gauche"; + $this->const[$r][4] = 0; + $r++; - $r++; - $this->rights[$r][0] = 126; // id de la permission - $this->rights[$r][1] = 'Exporter les societes'; // libelle de la permission - $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'export'; - - // 262 : Resteindre l'acces des commerciaux - $r++; - $this->rights[$r][0] = 262; - $this->rights[$r][1] = 'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'client'; - $this->rights[$r][5] = 'voir'; + $this->const[$r][0] = "MAIN_SEARCHFORM_CONTACT"; + $this->const[$r][1] = "yesno"; + $this->const[$r][2] = "1"; + $this->const[$r][3] = "Affichage formulaire de recherche des Contacts dans la barre de gauche"; + $this->const[$r][4] = 0; + $r++; - $r++; - $this->rights[$r][0] = 281; // id de la permission - $this->rights[$r][1] = 'Lire les contacts'; // libelle de la permission - $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 1; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'contact'; - $this->rights[$r][5] = 'lire'; - - $r++; - $this->rights[$r][0] = 282; // id de la permission - $this->rights[$r][1] = 'Creer modifier les contacts'; // libelle de la permission - $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'contact'; - $this->rights[$r][5] = 'creer'; - - $r++; - $this->rights[$r][0] = 283; // id de la permission - $this->rights[$r][1] = 'Supprimer les contacts'; // libelle de la permission - $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'contact'; - $this->rights[$r][5] = 'supprimer'; + // Boxes + $this->boxes = array(); + $r=0; + $this->boxes[$r][1] = "box_clients.php"; + $r++; + $this->boxes[$r][1] = "box_prospect.php"; + $r++; - $r++; - $this->rights[$r][0] = 286; // id de la permission - $this->rights[$r][1] = 'Exporter les contacts'; // libelle de la permission - $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) - $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut - $this->rights[$r][4] = 'contact'; - $this->rights[$r][5] = 'export'; + // Permissions + $this->rights = array(); + $this->rights_class = 'societe'; + $r=0; - - // Exports - //-------- - $r=0; + $r++; + $this->rights[$r][0] = 121; // id de la permission + $this->rights[$r][1] = 'Lire les societes'; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 1; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'lire'; - // Export des liste des societes et attributs - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='ExportDataset_company_1'; - $this->export_permission[$r]=array(array("societe","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.prefix_comm'=>"company",'s.client'=>"company",'s.fournisseur'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.ville'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'t.libelle'=>"company"); - $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>"name",'s.prefix_comm'=>"prefix",'s.client'=>"iscustomer",'s.fournisseur'=>"issupplier",'s.datec'=>"datecreation",'s.tms'=>"datelastmodification",'s.code_client'=>"customercode",'s.code_fournisseur'=>"suppliercode",'s.address'=>"address",'s.cp'=>"zip",'s.ville'=>"town",'p.libelle'=>"country",'p.code'=>"countrycode",'s.tel'=>"phone",'s.fax'=>"fax",'s.url'=>"url",'s.email'=>"email",'s.siret'=>"idprof1",'s.siren'=>"idprof2",'s.ape'=>"idprof3",'s.idprof4'=>"idprof4",'s.tva_intra'=>"vatintra",'s.capital'=>"capital",'s.note'=>"note",'t.libelle'=>"thirdpartytype"); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r]=' FROM '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid'; + $r++; + $this->rights[$r][0] = 122; // id de la permission + $this->rights[$r][1] = 'Creer modifier les societes'; // libelle de la permission + $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'creer'; - // Export des liste des contacts et attributs - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='ExportDataset_company_2'; - $this->export_permission[$r]=array(array("societe","contact","export")); - $this->export_fields_array[$r]=array('c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.ville'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode"); - $this->export_entities_array[$r]=array('c.civilite'=>"contact",'c.name'=>'contact','c.firstname'=>'contact','c.datec'=>"contact",'c.tms'=>"contact",'c.priv'=>"contact",'c.address'=>"contact",'c.cp'=>"contact",'c.ville'=>"contact",'c.phone'=>"contact",'c.fax'=>"contact",'c.email'=>"contact",'p.libelle'=>"contact",'p.code'=>"contact",'s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company"); - $this->export_alias_array[$r]=array('c.civilite'=>"civilitycode",'c.name'=>'lastname','c.firstname'=>'firstname','c.datec'=>"datecreation",'c.tms'=>"datelastmodification",'c.priv'=>"private",'c.address'=>"address",'c.cp'=>"zip",'c.ville'=>"town",'c.phone'=>"phone",'c.fax'=>"fax",'c.email'=>"email",'p.libelle'=>"country",'p.code'=>"countrycode",'s.rowid'=>"socid",'s.nom'=>"companyname",'s.code_client'=>"customercode",'s.code_fournisseur'=>"suppliercode"); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'c_pays as p, '.MAIN_DB_PREFIX.'socpeople as c LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid'; - $this->export_sql_end[$r].=' WHERE c.fk_pays = p.rowid'; -} + $r++; + $this->rights[$r][0] = 125; // id de la permission + $this->rights[$r][1] = 'Supprimer les societes'; // libelle de la permission + $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'supprimer'; - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - // Dir - $this->dirs[0] = $conf->societe->dir_output; - - $sql = array(); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } + $r++; + $this->rights[$r][0] = 126; // id de la permission + $this->rights[$r][1] = 'Exporter les societes'; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'export'; + + // 262 : Resteindre l'acces des commerciaux + $r++; + $this->rights[$r][0] = 262; + $this->rights[$r][1] = 'Consulter tous les tiers par utilisateurs internes (sinon uniquement si contact commercial). Non effectif pour utilisateurs externes (tjs limités à eux-meme).'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'client'; + $this->rights[$r][5] = 'voir'; + + $r++; + $this->rights[$r][0] = 281; // id de la permission + $this->rights[$r][1] = 'Lire les contacts'; // libelle de la permission + $this->rights[$r][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 1; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'contact'; + $this->rights[$r][5] = 'lire'; + + $r++; + $this->rights[$r][0] = 282; // id de la permission + $this->rights[$r][1] = 'Creer modifier les contacts'; // libelle de la permission + $this->rights[$r][2] = 'w'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'contact'; + $this->rights[$r][5] = 'creer'; + + $r++; + $this->rights[$r][0] = 283; // id de la permission + $this->rights[$r][1] = 'Supprimer les contacts'; // libelle de la permission + $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'contact'; + $this->rights[$r][5] = 'supprimer'; + + $r++; + $this->rights[$r][0] = 286; // id de la permission + $this->rights[$r][1] = 'Exporter les contacts'; // libelle de la permission + $this->rights[$r][2] = 'd'; // type de la permission (deprecie a ce jour) + $this->rights[$r][3] = 0; // La permission est-elle une permission par defaut + $this->rights[$r][4] = 'contact'; + $this->rights[$r][5] = 'export'; + + + // Exports + //-------- + $r=0; + + // Export des liste des societes et attributs + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='ExportDataset_company_1'; + $this->export_permission[$r]=array(array("societe","export")); + $this->export_fields_array[$r]=array('s.rowid'=>"Id",'s.nom'=>"Name",'s.prefix_comm'=>"Prefix",'s.client'=>"Customer",'s.fournisseur'=>"Supplier",'s.datec'=>"DateCreation",'s.tms'=>"DateLastModification",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode",'s.address'=>"Address",'s.cp'=>"Zip",'s.ville'=>"Town",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.tel'=>"Phone",'s.fax'=>"Fax",'s.url'=>"Url",'s.email'=>"Email",'s.siret'=>"IdProf1",'s.siren'=>"IdProf2",'s.ape'=>"IdProf3",'s.idprof4'=>"IdProf4",'s.tva_intra'=>"VATIntraShort",'s.capital'=>"Capital",'s.note'=>"Note",'t.libelle'=>"ThirdPartyType"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>"company",'s.prefix_comm'=>"company",'s.client'=>"company",'s.fournisseur'=>"company",'s.datec'=>"company",'s.tms'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company",'s.address'=>"company",'s.cp'=>"company",'s.ville'=>"company",'p.libelle'=>"company",'p.code'=>"company",'s.tel'=>"company",'s.fax'=>"company",'s.url'=>"company",'s.email'=>"company",'s.siret'=>"company",'s.siren'=>"company",'s.ape'=>"company",'s.idprof4'=>"company",'s.tva_intra'=>"company",'s.capital'=>"company",'s.note'=>"company",'t.libelle'=>"company"); + $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>"name",'s.prefix_comm'=>"prefix",'s.client'=>"iscustomer",'s.fournisseur'=>"issupplier",'s.datec'=>"datecreation",'s.tms'=>"datelastmodification",'s.code_client'=>"customercode",'s.code_fournisseur'=>"suppliercode",'s.address'=>"address",'s.cp'=>"zip",'s.ville'=>"town",'p.libelle'=>"country",'p.code'=>"countrycode",'s.tel'=>"phone",'s.fax'=>"fax",'s.url'=>"url",'s.email'=>"email",'s.siret'=>"idprof1",'s.siren'=>"idprof2",'s.ape'=>"idprof3",'s.idprof4'=>"idprof4",'s.tva_intra'=>"vatintra",'s.capital'=>"capital",'s.note'=>"note",'t.libelle'=>"thirdpartytype"); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r]=' FROM '.MAIN_DB_PREFIX.'societe as s LEFT JOIN '.MAIN_DB_PREFIX.'c_typent as t ON s.fk_typent = t.id LEFT JOIN '.MAIN_DB_PREFIX.'c_pays as p ON s.fk_pays = p.rowid'; + + // Export des liste des contacts et attributs + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='ExportDataset_company_2'; + $this->export_permission[$r]=array(array("societe","contact","export")); + $this->export_fields_array[$r]=array('c.civilite'=>"CivilityCode",'c.name'=>'Lastname','c.firstname'=>'Firstname','c.datec'=>"DateCreation",'c.tms'=>"DateLastModification",'c.priv'=>"ContactPrivate",'c.address'=>"Address",'c.cp'=>"Zip",'c.ville'=>"Town",'c.phone'=>"Phone",'c.fax'=>"Fax",'c.email'=>"EMail",'p.libelle'=>"Country",'p.code'=>"CountryCode",'s.rowid'=>"IdCompany",'s.nom'=>"CompanyName",'s.code_client'=>"CustomerCode",'s.code_fournisseur'=>"SupplierCode"); + $this->export_entities_array[$r]=array('c.civilite'=>"contact",'c.name'=>'contact','c.firstname'=>'contact','c.datec'=>"contact",'c.tms'=>"contact",'c.priv'=>"contact",'c.address'=>"contact",'c.cp'=>"contact",'c.ville'=>"contact",'c.phone'=>"contact",'c.fax'=>"contact",'c.email'=>"contact",'p.libelle'=>"contact",'p.code'=>"contact",'s.rowid'=>"company",'s.nom'=>"company",'s.code_client'=>"company",'s.code_fournisseur'=>"company"); + $this->export_alias_array[$r]=array('c.civilite'=>"civilitycode",'c.name'=>'lastname','c.firstname'=>'firstname','c.datec'=>"datecreation",'c.tms'=>"datelastmodification",'c.priv'=>"private",'c.address'=>"address",'c.cp'=>"zip",'c.ville'=>"town",'c.phone'=>"phone",'c.fax'=>"fax",'c.email'=>"email",'p.libelle'=>"country",'p.code'=>"countrycode",'s.rowid'=>"socid",'s.nom'=>"companyname",'s.code_client'=>"customercode",'s.code_fournisseur'=>"suppliercode"); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'c_pays as p, '.MAIN_DB_PREFIX.'socpeople as c LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON c.fk_soc = s.rowid'; + $this->export_sql_end[$r].=' WHERE c.fk_pays = p.rowid'; + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + // Dir + $this->dirs[0] = $conf->societe->dir_output; + + $sql = array(); + + return $this->_init($sql); + } + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modStock.class.php b/htdocs/includes/modules/modStock.class.php index 3e8860c2d5b..c378d5f8f9d 100644 --- a/htdocs/includes/modules/modStock.class.php +++ b/htdocs/includes/modules/modStock.class.php @@ -18,140 +18,141 @@ */ /** - \defgroup stock Module stock - \brief Module pour gerer la tenue de stocks produits - \version $Id$ -*/ + \defgroup stock Module stock + \brief Module pour gerer la tenue de stocks produits + \version $Id$ + */ /** - \file htdocs/includes/modules/modStock.class.php - \ingroup stock - \brief Fichier de description et activation du module Stock -*/ + \file htdocs/includes/modules/modStock.class.php + \ingroup stock + \brief Fichier de description et activation du module Stock + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modStock - \brief Classe de description et activation du module Stock -*/ + \class modStock + \brief Classe de description et activation du module Stock + */ class modStock extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modStock($DB) - { - $this->db = $DB ; - $this->numero = 52 ; - - $this->family = "products"; - $this->name = "Stock produits"; - $this->description = "Gestion des stocks"; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modStock($DB) + { + $this->db = $DB ; + $this->numero = 52 ; - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; + $this->family = "products"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des stocks"; - $this->const_name = 'MAIN_MODULE_STOCK'; - $this->special = 0; - $this->picto='stock'; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; - // Dir - $this->dirs = array(); + $this->const_name = 'MAIN_MODULE_STOCK'; + $this->special = 0; + $this->picto='stock'; - $this->config_page_url = array("stock.php"); + // Dir + $this->dirs = array(); - // Dependencies - $this->depends = array("modProduit"); - $this->requiredby = array(); - $this->langfiles = array("stocks"); + $this->config_page_url = array("stock.php"); - // Constantes - $this->const = array(); - - // Boxes - $this->boxes = array(); + // Dependencies + $this->depends = array("modProduit"); + $this->requiredby = array(); + $this->langfiles = array("stocks"); - // Permissions - $this->rights = array(); - $this->rights_class = 'stock'; + // Constantes + $this->const = array(); - $this->rights[0][0] = 1001; - $this->rights[0][1] = 'Lire les stocks'; - $this->rights[0][2] = 'r'; - $this->rights[0][3] = 1; - $this->rights[0][4] = 'lire'; - $this->rights[0][5] = ''; + // Boxes + $this->boxes = array(); - $this->rights[1][0] = 1002; - $this->rights[1][1] = 'Creer/Modifier les stocks'; - $this->rights[1][2] = 'w'; - $this->rights[1][3] = 0; - $this->rights[1][4] = 'creer'; - $this->rights[1][5] = ''; + // Permissions + $this->rights = array(); + $this->rights_class = 'stock'; - $this->rights[2][0] = 1003; - $this->rights[2][1] = 'Supprimer les stocks'; - $this->rights[2][2] = 'd'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'supprimer'; - $this->rights[2][5] = ''; + $this->rights[0][0] = 1001; + $this->rights[0][1] = 'Lire les stocks'; + $this->rights[0][2] = 'r'; + $this->rights[0][3] = 1; + $this->rights[0][4] = 'lire'; + $this->rights[0][5] = ''; - $this->rights[3][0] = 1004; - $this->rights[3][1] = 'Lire mouvements de stocks'; - $this->rights[3][2] = 'r'; - $this->rights[3][3] = 1; - $this->rights[3][4] = 'mouvement'; - $this->rights[3][5] = 'lire'; + $this->rights[1][0] = 1002; + $this->rights[1][1] = 'Creer/Modifier les stocks'; + $this->rights[1][2] = 'w'; + $this->rights[1][3] = 0; + $this->rights[1][4] = 'creer'; + $this->rights[1][5] = ''; - $this->rights[4][0] = 1005; - $this->rights[4][1] = 'Creer/modifier mouvements de stocks'; - $this->rights[4][2] = 'w'; - $this->rights[4][3] = 0; - $this->rights[4][4] = 'mouvement'; - $this->rights[4][5] = 'creer'; + $this->rights[2][0] = 1003; + $this->rights[2][1] = 'Supprimer les stocks'; + $this->rights[2][2] = 'd'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'supprimer'; + $this->rights[2][5] = ''; - // Exports - //-------- - $r=0; + $this->rights[3][0] = 1004; + $this->rights[3][1] = 'Lire mouvements de stocks'; + $this->rights[3][2] = 'r'; + $this->rights[3][3] = 1; + $this->rights[3][4] = 'mouvement'; + $this->rights[3][5] = 'lire'; - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]="Stocks"; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("stock","lire")); - $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'RealStock','e.rowid'=>'IdWarehouse','e.label'=>'LabelWareHouse','e.label'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.ville'=>'Town'); - $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock','e.rowid'=>'warehouse','e.label'=>'warehouse','e.label'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.ville'=>'warehouse'); - $this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification','ps.reel'=>'quantity','e.rowid'=>'idwarehouse','e.label'=>'labelwarehouse','e.label'=>'descwarehouse','e.lieu'=>'lieuwarehouse','e.address'=>'addresswarehouse','e.cp'=>'zipwarehouse','e.ville'=>'townwarehouse'); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p, '.MAIN_DB_PREFIX.'product_stock as ps, '.MAIN_DB_PREFIX.'entrepot as e'; - $this->export_sql_end[$r] .=' WHERE p.rowid = ps.fk_product AND ps.fk_entrepot = e.rowid'; - } + $this->rights[4][0] = 1005; + $this->rights[4][1] = 'Creer/modifier mouvements de stocks'; + $this->rights[4][2] = 'w'; + $this->rights[4][3] = 0; + $this->rights[4][4] = 'mouvement'; + $this->rights[4][5] = 'creer'; - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - $sql = array(); - - return $this->_init($sql); - } + // Exports + //-------- + $r=0; - /** - * \brief Fonction appel�e lors de la d�sactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]="Stocks"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r]=array(array("stock","lire")); + $this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','ps.reel'=>'RealStock','e.rowid'=>'IdWarehouse','e.label'=>'LabelWareHouse','e.label'=>'DescWareHouse','e.lieu'=>'LieuWareHouse','e.address'=>'Address','e.cp'=>'Zip','e.ville'=>'Town'); + $this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','ps.reel'=>'stock','e.rowid'=>'warehouse','e.label'=>'warehouse','e.label'=>'warehouse','e.lieu'=>'warehouse','e.address'=>'warehouse','e.cp'=>'warehouse','e.ville'=>'warehouse'); + $this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification','ps.reel'=>'quantity','e.rowid'=>'idwarehouse','e.label'=>'labelwarehouse','e.label'=>'descwarehouse','e.lieu'=>'lieuwarehouse','e.address'=>'addresswarehouse','e.cp'=>'zipwarehouse','e.ville'=>'townwarehouse'); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p, '.MAIN_DB_PREFIX.'product_stock as ps, '.MAIN_DB_PREFIX.'entrepot as e'; + $this->export_sql_end[$r] .=' WHERE p.rowid = ps.fk_product AND ps.fk_entrepot = e.rowid'; + } - return $this->_remove($sql); + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + $sql = array(); - } + return $this->_init($sql); + } + + /** + * \brief Fonction appel�e lors de la d�sactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + + } } ?> diff --git a/htdocs/includes/modules/modSyslog.class.php b/htdocs/includes/modules/modSyslog.class.php index 7addf7e0ca3..b7b109f49c2 100644 --- a/htdocs/includes/modules/modSyslog.class.php +++ b/htdocs/includes/modules/modSyslog.class.php @@ -18,86 +18,87 @@ */ /** - \defgroup syslog Module syslog - \brief Module pour gerer les messages d'erreur dans syslog -*/ + \defgroup syslog Module syslog + \brief Module pour gerer les messages d'erreur dans syslog + */ /** - \file htdocs/includes/modules/modSyslog.class.php - \ingroup syslog - \brief Fichier de description et activation du module de syslog -*/ + \file htdocs/includes/modules/modSyslog.class.php + \ingroup syslog + \brief Fichier de description et activation du module de syslog + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modSyslog - \brief Classe de description et activation du module Syslog -*/ + \class modSyslog + \brief Classe de description et activation du module Syslog + */ class modSyslog extends DolibarrModules { - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modSyslog($DB) - { - $this->db = $DB ; - $this->numero = 42 ; - - $this->family = "technic"; - $this->name = "Syslog"; - $this->description = "Activation des traces debug (syslog)"; - $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_SYSLOG'; - $this->special = 2; - //$this->picto='phoning'; - // Dir - $this->dirs = array(); + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modSyslog($DB) + { + $this->db = $DB ; + $this->numero = 42 ; - // Config pages - $this->config_page_url = array("syslog.php"); + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Activation des traces debug (syslog)"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_SYSLOG'; + $this->special = 2; + //$this->picto='phoning'; - // D�pendances - $this->depends = array(); - $this->requiredby = array(); + // Dir + $this->dirs = array(); - // Constantes - $this->const = array(); + // Config pages + $this->config_page_url = array("syslog.php"); - // Boites - $this->boxes = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'syslog'; - } + // Constantes + $this->const = array(); + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'syslog'; + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - $sql = array(); - - return $this->_init($sql); + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + $sql = array(); - } + return $this->_init($sql); - /** - \brief Fonction appel�e lors de la d�sactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + } - return $this->_remove($sql); - } + /** + \brief Fonction appel�e lors de la d�sactivation d'un module. + Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modTax.class.php b/htdocs/includes/modules/modTax.class.php index ff1f07bde27..bd73dca0fe1 100644 --- a/htdocs/includes/modules/modTax.class.php +++ b/htdocs/includes/modules/modTax.class.php @@ -52,8 +52,10 @@ class modTax extends DolibarrModules $this->numero = 500 ; $this->family = "financial"; - $this->name = "Taxes et charges sociales"; - $this->description = "Gestion des taxes et charges sociales"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + // Module description used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) + $this->description = "Gestion des taxes, charges sociales et dividendes"; $this->revision = explode(" ","$Revision$"); $this->version = $this->revision[1]; diff --git a/htdocs/includes/modules/modTelephonie.class.php b/htdocs/includes/modules/modTelephonie.class.php index ed84c5a5072..286b55892ed 100644 --- a/htdocs/includes/modules/modTelephonie.class.php +++ b/htdocs/includes/modules/modTelephonie.class.php @@ -20,440 +20,441 @@ */ /** - \defgroup telephonie Module telephonie - \brief Module pour g�rer la t�l�phonie -*/ + \defgroup telephonie Module telephonie + \brief Module pour g�rer la t�l�phonie + */ /** - \file htdocs/includes/modules/modTelephonie.class.php - \ingroup telephonie - \brief Fichier de description et activation du module de Telephonie -*/ + \file htdocs/includes/modules/modTelephonie.class.php + \ingroup telephonie + \brief Fichier de description et activation du module de Telephonie + */ include_once(DOL_DOCUMENT_ROOT."/includes/modules/DolibarrModules.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); /** - \class modTelephonie - \brief Classe de description et activation du module Telephonie -*/ + \class modTelephonie + \brief Classe de description et activation du module Telephonie + */ class modTelephonie extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modTelephonie($DB) - { - $this->db = $DB ; - $this->numero = 56 ; - - $this->family = "other"; - $this->name = "Telephonie"; - $this->description = "Gestion de la Telephonie"; - - $this->revision = explode(" ","$Revision$"); - $this->version = $this->revision[1]; - - $this->const_name = "MAIN_MODULE_TELEPHONIE"; - $this->special = 2; - $this->picto='phoning'; - - // Dir - $this->dirs = array(); - - // Dependances - $this->depends = array(); - $this->requiredby = array(); - - // Constantes - $this->const = array(); - - // Boites - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'telephonie'; - - $this->rights[1][0] = 211; // id de la permission - $this->rights[1][1] = 'Consulter la telephonie'; // libelle de la permission - $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[1][3] = 1; // La permission est-elle une permission par defaut - $this->rights[1][4] = 'lire'; - - $this->rights[2][0] = 212; // id de la permission - $this->rights[2][1] = 'Commander les lignes'; // libelle de la permission - $this->rights[2][2] = 'w'; // type de la permission (deprecie a ce jour) - $this->rights[2][3] = 0; // La permission est-elle une permission par defaut - $this->rights[2][4] = 'ligne_commander'; - - $this->rights[3][0] = 213; - $this->rights[3][1] = 'Activer une ligne'; - $this->rights[3][2] = 'w'; - $this->rights[3][3] = 0; - $this->rights[3][4] = 'ligne_activer'; - - $this->rights[4][0] = 214; // id de la permission - $this->rights[4][1] = 'Configurer la telephonie'; // libelle de la permission - $this->rights[4][2] = 'w'; - $this->rights[4][3] = 0; - $this->rights[4][4] = 'configurer'; - - $this->rights[5][0] = 215; - $this->rights[5][1] = 'Configurer les fournisseurs'; - $this->rights[5][2] = 'w'; - $this->rights[5][3] = 0; - $this->rights[5][4] = 'fournisseur'; - $this->rights[5][5] = 'config'; - - $this->rights[6][0] = 192; - $this->rights[6][1] = 'Creer des lignes'; - $this->rights[6][2] = 'w'; - $this->rights[6][3] = 0; - $this->rights[6][4] = 'ligne'; - $this->rights[6][5] = 'creer'; - - $this->rights[7][0] = 202; - $this->rights[7][1] = 'Creer des liaisons ADSL'; - $this->rights[7][2] = 'w'; - $this->rights[7][3] = 0; - $this->rights[7][4] = 'adsl'; - $this->rights[7][5] = 'creer'; - - $this->rights[8][0] = 203; - $this->rights[8][1] = "Demander la commande des liaisons"; - $this->rights[8][2] = 'w'; - $this->rights[8][3] = 0; - $this->rights[8][4] = 'adsl'; - $this->rights[8][5] = 'requete'; - - $this->rights[9][0] = 204; - $this->rights[9][1] = 'Commander les liaisons'; - $this->rights[9][2] = 'w'; - $this->rights[9][3] = 0; - $this->rights[9][4] = 'adsl'; - $this->rights[9][5] = 'commander'; - - $this->rights[10][0] = 205; - $this->rights[10][1] = 'Gerer les liaisons'; - $this->rights[10][2] = 'w'; - $this->rights[10][3] = 0; - $this->rights[10][4] = 'adsl'; - $this->rights[10][5] = 'gerer'; - $r = 10; - - $r++; - - - $this->rights[$r][0] = 271; - $this->rights[$r][1] = 'Consulter le CA'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'ca'; - $this->rights[$r][5] = 'lire'; - $r++; - - $this->rights[$r][0] = 272; - $this->rights[$r][1] = 'Consulter les factures'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'facture'; - $this->rights[$r][5] = 'lire'; - $r++; - - $this->rights[$r][0] = 273; - $this->rights[$r][1] = 'Emmettre les factures'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'facture'; - $this->rights[$r][5] = 'ecrire'; - $r++; - - $this->rights[$r][0] = 206; - $this->rights[$r][1] = 'Consulter les liaisons'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'adsl'; - $this->rights[$r][5] = 'lire'; - $r++; - - $this->rights[$r][0] = 231; - $this->rights[$r][1] = 'Definir le mode de reglement'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'contrat'; - $this->rights[$r][5] = 'paiement'; - $r++; - - $this->rights[$r][0] = 193; - $this->rights[$r][1] = 'Resilier des lignes'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'ligne'; - $this->rights[$r][5] = 'resilier'; - $r++; - - $this->rights[$r][0] = 194; - $this->rights[$r][1] = 'Consulter la marge des lignes'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'ligne'; - $this->rights[$r][5] = 'gain'; - $r++; - - $this->rights[$r][0] = 146; - $this->rights[$r][1] = 'Consulter les fournisseurs'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'fournisseur'; - $this->rights[$r][5] = 'lire'; - $r++; - - $this->rights[$r][0] = 147; - $this->rights[$r][1] = 'Consulter les stats'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'stats'; - $this->rights[$r][5] = 'lire'; - $r++; - - $this->rights[$r][0] = 311; - $this->rights[$r][1] = 'Consulter les services'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'service'; - $this->rights[$r][5] = 'lire'; - $r++; - - $this->rights[$r][0] = 312; - $this->rights[$r][1] = 'Affecter des services a un contrat'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'service'; - $this->rights[$r][5] = 'affecter'; - $r++; - - $this->rights[$r][0] = 291; - $this->rights[$r][1] = 'Consulter les tarifs'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'tarifs'; - $this->rights[$r][5] = 'lire'; - $r++; - - $this->rights[$r][0] = 292; - $this->rights[$r][1] = 'Definir les permissions sur les tarifs'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'tarif'; - $this->rights[$r][5] = 'permission'; - $r++; - - $this->rights[$r][0] = 293; - $this->rights[$r][1] = 'Modifier les tarifs clients'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'tarif'; - $this->rights[$r][5] = 'client_modifier'; - $r++; - } - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - // Dir - $this->dirs[0] = $conf->telephonie->dir_output; - $this->dirs[1] = $conf->telephonie->dir_output."/ligne"; - $this->dirs[2] = $conf->telephonie->dir_output."/ligne/commande" ; - $this->dirs[3] = $conf->telephonie->dir_output."/logs" ; - $this->dirs[4] = $conf->telephonie->dir_output."/client" ; - $this->dirs[5] = $conf->telephonie->dir_output."/rapports" ; - $this->dirs[6] = $conf->telephonie->dir_output."/ligne/commande/retour" ; - $this->dirs[7] = $conf->telephonie->dir_output."/cdr" ; - $this->dirs[8] = $conf->telephonie->dir_output."/cdr/archive" ; - $this->dirs[9] = $conf->telephonie->dir_output."/cdr/atraiter" ; - $this->dirs[10] = $conf->telephonie->dir_output."/ligne/commande/retour/traite" ; - // - $this->load_tables(); - // - return $this->_init($sql); - } - - /** - \brief Fonction appelee lors de la desactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } - /* - * - * - */ - function load_tables() - { - /************************************************************************************** - * - * Chargement fichiers tables/*.sql (non *.key.sql) - * A faire avant les fichiers *.key.sql - * - ***************************************************************************************/ - $ok = 1; - if ($ok) + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modTelephonie($DB) { - $dir = DOL_DOCUMENT_ROOT.'/telephonie/sql/'; + $this->db = $DB ; + $this->numero = 56 ; - $ok = 0; - $handle=opendir($dir); - $table_exists = 0; - while (($file = readdir($handle))!==false) + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion de la Telephonie"; + + $this->revision = explode(" ","$Revision$"); + $this->version = $this->revision[1]; + + $this->const_name = "MAIN_MODULE_TELEPHONIE"; + $this->special = 2; + $this->picto='phoning'; + + // Dir + $this->dirs = array(); + + // Dependances + $this->depends = array(); + $this->requiredby = array(); + + // Constantes + $this->const = array(); + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'telephonie'; + + $this->rights[1][0] = 211; // id de la permission + $this->rights[1][1] = 'Consulter la telephonie'; // libelle de la permission + $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[1][3] = 1; // La permission est-elle une permission par defaut + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 212; // id de la permission + $this->rights[2][1] = 'Commander les lignes'; // libelle de la permission + $this->rights[2][2] = 'w'; // type de la permission (deprecie a ce jour) + $this->rights[2][3] = 0; // La permission est-elle une permission par defaut + $this->rights[2][4] = 'ligne_commander'; + + $this->rights[3][0] = 213; + $this->rights[3][1] = 'Activer une ligne'; + $this->rights[3][2] = 'w'; + $this->rights[3][3] = 0; + $this->rights[3][4] = 'ligne_activer'; + + $this->rights[4][0] = 214; // id de la permission + $this->rights[4][1] = 'Configurer la telephonie'; // libelle de la permission + $this->rights[4][2] = 'w'; + $this->rights[4][3] = 0; + $this->rights[4][4] = 'configurer'; + + $this->rights[5][0] = 215; + $this->rights[5][1] = 'Configurer les fournisseurs'; + $this->rights[5][2] = 'w'; + $this->rights[5][3] = 0; + $this->rights[5][4] = 'fournisseur'; + $this->rights[5][5] = 'config'; + + $this->rights[6][0] = 192; + $this->rights[6][1] = 'Creer des lignes'; + $this->rights[6][2] = 'w'; + $this->rights[6][3] = 0; + $this->rights[6][4] = 'ligne'; + $this->rights[6][5] = 'creer'; + + $this->rights[7][0] = 202; + $this->rights[7][1] = 'Creer des liaisons ADSL'; + $this->rights[7][2] = 'w'; + $this->rights[7][3] = 0; + $this->rights[7][4] = 'adsl'; + $this->rights[7][5] = 'creer'; + + $this->rights[8][0] = 203; + $this->rights[8][1] = "Demander la commande des liaisons"; + $this->rights[8][2] = 'w'; + $this->rights[8][3] = 0; + $this->rights[8][4] = 'adsl'; + $this->rights[8][5] = 'requete'; + + $this->rights[9][0] = 204; + $this->rights[9][1] = 'Commander les liaisons'; + $this->rights[9][2] = 'w'; + $this->rights[9][3] = 0; + $this->rights[9][4] = 'adsl'; + $this->rights[9][5] = 'commander'; + + $this->rights[10][0] = 205; + $this->rights[10][1] = 'Gerer les liaisons'; + $this->rights[10][2] = 'w'; + $this->rights[10][3] = 0; + $this->rights[10][4] = 'adsl'; + $this->rights[10][5] = 'gerer'; + $r = 10; + + $r++; + + + $this->rights[$r][0] = 271; + $this->rights[$r][1] = 'Consulter le CA'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'ca'; + $this->rights[$r][5] = 'lire'; + $r++; + + $this->rights[$r][0] = 272; + $this->rights[$r][1] = 'Consulter les factures'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'facture'; + $this->rights[$r][5] = 'lire'; + $r++; + + $this->rights[$r][0] = 273; + $this->rights[$r][1] = 'Emmettre les factures'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'facture'; + $this->rights[$r][5] = 'ecrire'; + $r++; + + $this->rights[$r][0] = 206; + $this->rights[$r][1] = 'Consulter les liaisons'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'adsl'; + $this->rights[$r][5] = 'lire'; + $r++; + + $this->rights[$r][0] = 231; + $this->rights[$r][1] = 'Definir le mode de reglement'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'contrat'; + $this->rights[$r][5] = 'paiement'; + $r++; + + $this->rights[$r][0] = 193; + $this->rights[$r][1] = 'Resilier des lignes'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'ligne'; + $this->rights[$r][5] = 'resilier'; + $r++; + + $this->rights[$r][0] = 194; + $this->rights[$r][1] = 'Consulter la marge des lignes'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'ligne'; + $this->rights[$r][5] = 'gain'; + $r++; + + $this->rights[$r][0] = 146; + $this->rights[$r][1] = 'Consulter les fournisseurs'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'fournisseur'; + $this->rights[$r][5] = 'lire'; + $r++; + + $this->rights[$r][0] = 147; + $this->rights[$r][1] = 'Consulter les stats'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'stats'; + $this->rights[$r][5] = 'lire'; + $r++; + + $this->rights[$r][0] = 311; + $this->rights[$r][1] = 'Consulter les services'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'service'; + $this->rights[$r][5] = 'lire'; + $r++; + + $this->rights[$r][0] = 312; + $this->rights[$r][1] = 'Affecter des services a un contrat'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'service'; + $this->rights[$r][5] = 'affecter'; + $r++; + + $this->rights[$r][0] = 291; + $this->rights[$r][1] = 'Consulter les tarifs'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'tarifs'; + $this->rights[$r][5] = 'lire'; + $r++; + + $this->rights[$r][0] = 292; + $this->rights[$r][1] = 'Definir les permissions sur les tarifs'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'tarif'; + $this->rights[$r][5] = 'permission'; + $r++; + + $this->rights[$r][0] = 293; + $this->rights[$r][1] = 'Modifier les tarifs clients'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'tarif'; + $this->rights[$r][5] = 'client_modifier'; + $r++; + } + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + // Dir + $this->dirs[0] = $conf->telephonie->dir_output; + $this->dirs[1] = $conf->telephonie->dir_output."/ligne"; + $this->dirs[2] = $conf->telephonie->dir_output."/ligne/commande" ; + $this->dirs[3] = $conf->telephonie->dir_output."/logs" ; + $this->dirs[4] = $conf->telephonie->dir_output."/client" ; + $this->dirs[5] = $conf->telephonie->dir_output."/rapports" ; + $this->dirs[6] = $conf->telephonie->dir_output."/ligne/commande/retour" ; + $this->dirs[7] = $conf->telephonie->dir_output."/cdr" ; + $this->dirs[8] = $conf->telephonie->dir_output."/cdr/archive" ; + $this->dirs[9] = $conf->telephonie->dir_output."/cdr/atraiter" ; + $this->dirs[10] = $conf->telephonie->dir_output."/ligne/commande/retour/traite" ; + // + $this->load_tables(); + // + return $this->_init($sql); + } + + /** + \brief Fonction appelee lors de la desactivation d'un module. + Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } + /* + * + * + */ + function load_tables() + { + /************************************************************************************** + * + * Chargement fichiers tables/*.sql (non *.key.sql) + * A faire avant les fichiers *.key.sql + * + ***************************************************************************************/ + $ok = 1; + if ($ok) { - if (substr($file, strlen($file) - 4) == '.sql' && substr($file,0,4) == 'llx_' && substr($file, -8) <> '.key.sql') + $dir = DOL_DOCUMENT_ROOT.'/telephonie/sql/'; + + $ok = 0; + $handle=opendir($dir); + $table_exists = 0; + while (($file = readdir($handle))!==false) { - $name = substr($file, 0, strlen($file) - 4); - $buffer = ''; - $fp = fopen($dir.$file,"r"); - if ($fp) + if (substr($file, strlen($file) - 4) == '.sql' && substr($file,0,4) == 'llx_' && substr($file, -8) <> '.key.sql') { - while (!feof ($fp)) + $name = substr($file, 0, strlen($file) - 4); + $buffer = ''; + $fp = fopen($dir.$file,"r"); + if ($fp) { - $buf = fgets($fp, 4096); - if (substr($buf, 0, 2) <> '--') + while (!feof ($fp)) { - $buffer .= $buf; + $buf = fgets($fp, 4096); + if (substr($buf, 0, 2) <> '--') + { + $buffer .= $buf; + } } + fclose($fp); } - fclose($fp); - } - - //print "Creation de la table $name/td>"; - $requestnb++; - if (@$this->db->query($buffer)) - { - //print "OK requete ==== $buffer"; - } - else - { - if ($this->db->errno() == 'DB_ERROR_TABLE_ALREADY_EXISTS') + + //print "Creation de la table $name/td>"; + $requestnb++; + if (@$this->db->query($buffer)) { - //print "Deje existante"; - $table_exists = 1; + //print "OK requete ==== $buffer"; } else { - $error++; + if ($this->db->errno() == 'DB_ERROR_TABLE_ALREADY_EXISTS') + { + //print "Deje existante"; + $table_exists = 1; + } + else + { + $error++; + } } } + } - - } - closedir($handle); + closedir($handle); - if ($error == 0) + if ($error == 0) + { + $ok = 1; + } + } + + + /*************************************************************************************** + * + * Chargement fichiers tables/*.key.sql + * A faire apres les fichiers *.sql + * + ***************************************************************************************/ + if ($ok) { - $ok = 1; - } - } + $okkeys = 0; + $handle=opendir($dir); + $table_exists = 0; + while (($file = readdir($handle))!==false) + { + if (substr($file, strlen($file) - 4) == '.sql' && substr($file,0,4) == 'llx_' && substr($file, -8) == '.key.sql') + { + $name = substr($file, 0, strlen($file) - 4); + $buffer = ''; + $fp = fopen($dir.$file,"r"); + if ($fp) + { + while (!feof ($fp)) + { + $buf = fgets($fp, 4096); + + // Cas special de lignes autorisees pour certaines versions uniquement + if (eregi('^-- V([0-9\.]+)',$buf,$reg)) + { + $versioncommande=split('\.',$reg[1]); + //print var_dump($versioncommande); + //print var_dump($versionarray); + if (sizeof($versioncommande) && sizeof($versionarray) + && versioncompare($versioncommande,$versionarray) <= 0) + { + // Version qualified, delete SQL comments + $buf=eregi_replace('^-- V([0-9\.]+)','',$buf); + //print "Ligne $i qualifiee par version: ".$buf.'
'; + } + } + + // Ajout ligne si non commentaire + if (! eregi('^--',$buf)) $buffer .= $buf; + } + fclose($fp); + } - - /*************************************************************************************** - * - * Chargement fichiers tables/*.key.sql - * A faire apres les fichiers *.sql - * - ***************************************************************************************/ - if ($ok) - { - $okkeys = 0; - $handle=opendir($dir); - $table_exists = 0; - while (($file = readdir($handle))!==false) - { - if (substr($file, strlen($file) - 4) == '.sql' && substr($file,0,4) == 'llx_' && substr($file, -8) == '.key.sql') - { - $name = substr($file, 0, strlen($file) - 4); - $buffer = ''; - $fp = fopen($dir.$file,"r"); - if ($fp) - { - while (!feof ($fp)) - { - $buf = fgets($fp, 4096); - - // Cas special de lignes autorisees pour certaines versions uniquement - if (eregi('^-- V([0-9\.]+)',$buf,$reg)) - { - $versioncommande=split('\.',$reg[1]); - //print var_dump($versioncommande); - //print var_dump($versionarray); - if (sizeof($versioncommande) && sizeof($versionarray) - && versioncompare($versioncommande,$versionarray) <= 0) - { - // Version qualified, delete SQL comments - $buf=eregi_replace('^-- V([0-9\.]+)','',$buf); - //print "Ligne $i qualifiee par version: ".$buf.'
'; - } - } - - // Ajout ligne si non commentaire - if (! eregi('^--',$buf)) $buffer .= $buf; - } - fclose($fp); - } - - // Si plusieurs requetes, on boucle sur chaque - $listesql=split(';',$buffer); - foreach ($listesql as $buffer) - { - if (trim($buffer)) - { - $requestnb++; - if (@$this->db->query(trim($buffer))) - { - //print "OK requete ==== $buffer"; - } - else - { - if ($this->db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS' || - $this->db->errno() == 'DB_ERROR_CANNOT_CREATE' || - $this->db->errno() == 'DB_ERROR_PRIMARY_KEY_ALREADY_EXISTS' || - eregi('duplicate key name',$this->db->error())) - { + // Si plusieurs requetes, on boucle sur chaque + $listesql=split(';',$buffer); + foreach ($listesql as $buffer) + { + if (trim($buffer)) + { + $requestnb++; + if (@$this->db->query(trim($buffer))) + { + //print "OK requete ==== $buffer"; + } + else + { + if ($this->db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS' || + $this->db->errno() == 'DB_ERROR_CANNOT_CREATE' || + $this->db->errno() == 'DB_ERROR_PRIMARY_KEY_ALREADY_EXISTS' || + eregi('duplicate key name',$this->db->error())) + { $key_exists = 1; - } - else - { + } + else + { $error++; - } - } - } - } - } - + } + } + } + } + } + } - closedir($handle); - - if ($error == 0) + closedir($handle); + + if ($error == 0) { - $okkeys = 1; + $okkeys = 1; } - } - - } + } + + } } ?> diff --git a/htdocs/includes/modules/modUser.class.php b/htdocs/includes/modules/modUser.class.php index b68ee1c94d5..0510d74054c 100644 --- a/htdocs/includes/modules/modUser.class.php +++ b/htdocs/includes/modules/modUser.class.php @@ -20,167 +20,168 @@ */ /** - \defgroup user Module user - \brief Module pour g�rer les utilisateurs -*/ + \defgroup user Module user + \brief Module pour g�rer les utilisateurs + */ /** - \file htdocs/includes/modules/modUser.class.php - \ingroup user - \brief Fichier de description et activation du module Utilisateur -*/ + \file htdocs/includes/modules/modUser.class.php + \ingroup user + \brief Fichier de description et activation du module Utilisateur + */ include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); /** - \class modUser - \brief Classe de description et activation du module User -*/ + \class modUser + \brief Classe de description et activation du module User + */ class modUser extends DolibarrModules { - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acc�s base - */ - function modUser($DB) - { - $this->db = $DB ; - $this->numero = 0; + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acc�s base + */ + function modUser($DB) + { + $this->db = $DB ; + $this->numero = 0; - $this->family = "base"; // Family for module (or "base" if core module) - $this->name = "User"; - $this->description = "Gestion des utilisateurs (requis)"; - $this->always_enabled = 1; // Can't be disabled - - $this->revision = explode(' ','$Revision$'); - $this->version = $this->revision[1]; + $this->family = "base"; // Family for module (or "base" if core module) + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); + $this->description = "Gestion des utilisateurs (requis)"; + $this->always_enabled = 1; // Can't be disabled - $this->const_name = 'MAIN_MODULE_USER'; - $this->special = 0; - $this->picto='group'; + $this->revision = explode(' ','$Revision$'); + $this->version = $this->revision[1]; - // Dir - $this->dirs = array(); + $this->const_name = 'MAIN_MODULE_USER'; + $this->special = 0; + $this->picto='group'; - // Config pages - // $this->config_page_url = array("/user/admin/index.php"); + // Dir + $this->dirs = array(); - // D�pendances - $this->depends = array(); - $this->requiredby = array(); - $this->langfiles = array("main","users","companies"); + // Config pages + // $this->config_page_url = array("/user/admin/index.php"); - // Constantes - $this->const = array(); + // D�pendances + $this->depends = array(); + $this->requiredby = array(); + $this->langfiles = array("main","users","companies"); - // Boites - $this->boxes = array(); + // Constantes + $this->const = array(); - // Permissions - $this->rights = array(); - $this->rights_class = 'user'; - $this->rights_admin_allowed = 1; // Admin is always granted of permission (even when module is disabled) - $r=0; - - $r++; - $this->rights[$r][0] = 251; - $this->rights[$r][1] = 'Consulter les autres utilisateurs, leurs groupes et permissions'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'user'; - $this->rights[$r][5] = 'lire'; + // Boites + $this->boxes = array(); - $r++; - $this->rights[$r][0] = 252; - $this->rights[$r][1] = 'Creer/modifier les autres utilisateurs, les groupes et leurs permissions'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'user'; - $this->rights[$r][5] = 'creer'; + // Permissions + $this->rights = array(); + $this->rights_class = 'user'; + $this->rights_admin_allowed = 1; // Admin is always granted of permission (even when module is disabled) + $r=0; - $r++; - $this->rights[$r][0] = 253; - $this->rights[$r][1] = 'Modifier mot de passe des autres utilisateurs'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'user'; - $this->rights[$r][5] = 'password'; + $r++; + $this->rights[$r][0] = 251; + $this->rights[$r][1] = 'Consulter les autres utilisateurs, leurs groupes et permissions'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'user'; + $this->rights[$r][5] = 'lire'; - $r++; - $this->rights[$r][0] = 254; - $this->rights[$r][1] = 'Supprimer ou desactiver les autres utilisateurs'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'user'; - $this->rights[$r][5] = 'supprimer'; + $r++; + $this->rights[$r][0] = 252; + $this->rights[$r][1] = 'Creer/modifier les autres utilisateurs, les groupes et leurs permissions'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'user'; + $this->rights[$r][5] = 'creer'; - $r++; - $this->rights[$r][0] = 255; - $this->rights[$r][1] = 'Creer/modifier ses propres infos utilisateur'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'self'; - $this->rights[$r][5] = 'creer'; + $r++; + $this->rights[$r][0] = 253; + $this->rights[$r][1] = 'Modifier mot de passe des autres utilisateurs'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'user'; + $this->rights[$r][5] = 'password'; - $r++; - $this->rights[$r][0] = 256; - $this->rights[$r][1] = 'Modifier son propre mot de passe'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'self'; - $this->rights[$r][5] = 'password'; + $r++; + $this->rights[$r][0] = 254; + $this->rights[$r][1] = 'Supprimer ou desactiver les autres utilisateurs'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'user'; + $this->rights[$r][5] = 'supprimer'; - $r++; - $this->rights[$r][0] = 258; - $this->rights[$r][1] = 'Exporter les utilisateurs'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'user'; - $this->rights[$r][5] = 'export'; + $r++; + $this->rights[$r][0] = 255; + $this->rights[$r][1] = 'Creer/modifier ses propres infos utilisateur'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'self'; + $this->rights[$r][5] = 'creer'; - // Exports - //-------- - $r=0; + $r++; + $this->rights[$r][0] = 256; + $this->rights[$r][1] = 'Modifier son propre mot de passe'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'self'; + $this->rights[$r][5] = 'password'; - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs'; - $this->export_permission[$r]=array(array("user","user","export")); - $this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.name'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Tel','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.statut'=>'Status','u.fk_socpeople'=>"IdContact",'u.fk_societe'=>"IdCompany",'u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion'); - $this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.name'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.fk_socpeople'=>"contact",'u.fk_societe'=>"company",'u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user'); - $this->export_alias_array[$r]=array('u.rowid'=>"rowid",'u.login'=>"login",'u.name'=>"name",'u.firstname'=>"firstname",'u.office_phone'=>'tel','u.office_fax'=>'fax','u.email'=>'email','u.datec'=>"datecreation",'u.tms'=>"datelastmodification",'u.admin'=>"admin",'u.statut'=>'status','u.fk_socpeople'=>"idcontact",'u.fk_societe'=>"idcompany",'u.note'=>"note",'u.datelastlogin'=>'datelastlogin','u.datepreviouslogin'=>'datepreviouslogin'); - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'user as u'; - } + $r++; + $this->rights[$r][0] = 258; + $this->rights[$r][1] = 'Exporter les utilisateurs'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'user'; + $this->rights[$r][5] = 'export'; + + // Exports + //-------- + $r=0; + + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs'; + $this->export_permission[$r]=array(array("user","user","export")); + $this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.login'=>"Login",'u.name'=>"Lastname",'u.firstname'=>"Firstname",'u.office_phone'=>'Tel','u.office_fax'=>'Fax','u.email'=>'EMail','u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.statut'=>'Status','u.fk_socpeople'=>"IdContact",'u.fk_societe'=>"IdCompany",'u.note'=>"Note",'u.datelastlogin'=>'LastConnexion','u.datepreviouslogin'=>'PreviousConnexion'); + $this->export_entities_array[$r]=array('u.rowid'=>"user",'u.login'=>"user",'u.name'=>"user",'u.firstname'=>"user",'u.office_phone'=>'user','u.office_fax'=>'user','u.email'=>'user','u.datec'=>"user",'u.tms'=>"user",'u.admin'=>"user",'u.statut'=>'user','u.fk_socpeople'=>"contact",'u.fk_societe'=>"company",'u.note'=>"user",'u.datelastlogin'=>'user','u.datepreviouslogin'=>'user'); + $this->export_alias_array[$r]=array('u.rowid'=>"rowid",'u.login'=>"login",'u.name'=>"name",'u.firstname'=>"firstname",'u.office_phone'=>'tel','u.office_fax'=>'fax','u.email'=>'email','u.datec'=>"datecreation",'u.tms'=>"datelastmodification",'u.admin'=>"admin",'u.statut'=>'status','u.fk_socpeople'=>"idcontact",'u.fk_societe'=>"idcompany",'u.note'=>"note",'u.datelastlogin'=>'datelastlogin','u.datepreviouslogin'=>'datepreviouslogin'); + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'user as u'; + } - /** - * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. - * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. - */ - function init() - { - global $conf; + /** + * \brief Fonction appel�e lors de l'activation du module. Ins�re en base les constantes, boites, permissions du module. + * D�finit �galement les r�pertoires de donn�es � cr�er pour ce module. + */ + function init() + { + global $conf; - // Permissions - $this->remove(); + // Permissions + $this->remove(); - $sql = array(); - - return $this->_init($sql); - } + $sql = array(); - /** - \brief Fonction appel�e lors de la d�sactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); + return $this->_init($sql); + } - return $this->_remove($sql); - } + /** + \brief Fonction appel�e lors de la d�sactivation d'un module. + Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } } ?> diff --git a/htdocs/includes/modules/modWebcalendar.class.php b/htdocs/includes/modules/modWebcalendar.class.php index adebc4e1d5f..2c263847945 100644 --- a/htdocs/includes/modules/modWebcalendar.class.php +++ b/htdocs/includes/modules/modWebcalendar.class.php @@ -54,8 +54,8 @@ class modWebcalendar extends DolibarrModules // Family can be 'crm','financial','hr','projects','product','technic','other' // It is used to sort modules in module setup page $this->family = "projects"; - // Module title used if translation string 'ModuleXXXName' not found (XXX is id value) - $this->name = "Webcalendar"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = eregi_replace('^mod','',get_class($this)); // Module description used if translation string 'ModuleXXXDesc' not found (XXX is id value) $this->description = "Interfacage avec le calendrier Webcalendar"; // Possible values for version are: 'development', 'experimental', 'dolibarr' or version diff --git a/htdocs/includes/triggers/README-FR b/htdocs/includes/triggers/README-FR index 36b5cb7c5e5..3a429a10d2d 100644 --- a/htdocs/includes/triggers/README-FR +++ b/htdocs/includes/triggers/README-FR @@ -8,7 +8,7 @@ La syntaxe d'un fichier Trigger est: where: > modModule est la partie du nom du descripteur de module trouve dans le repertoire includes/modules pour lequel le trigger doit etre. - actiff ou la valeure 'all' si ne doit pas etre actif pour un + actif ou la valeur 'all' si ne doit pas etre actif pour un module particulier. > Mytrigger est le nom du trigger. La classe PHP dans le fichier trigger aura pour nom InterfaceMytrigger. diff --git a/htdocs/includes/triggers/interface_all_Demo.class.php-NORUN b/htdocs/includes/triggers/interface_all_Demo.class.php-NORUN index f09807eb1b8..5bfe71e0cc3 100644 --- a/htdocs/includes/triggers/interface_all_Demo.class.php-NORUN +++ b/htdocs/includes/triggers/interface_all_Demo.class.php-NORUN @@ -48,7 +48,7 @@ class InterfaceDemo { $this->db = $DB ; - $this->name = "Demo"; // Put here same value than in file and class name + $this->name = eregi_replace('^Interface','',get_class($this)); $this->family = "demo"; $this->description = "Les triggers de ce composant sont des fonctions vierges. Elles n'ont aucun effet. Ce composant est fourni à des fins de tutorial."; $this->version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' or version diff --git a/htdocs/includes/triggers/interface_all_Logevents.class.php b/htdocs/includes/triggers/interface_all_Logevents.class.php index d2b107bc9e8..98c9fba9089 100644 --- a/htdocs/includes/triggers/interface_all_Logevents.class.php +++ b/htdocs/includes/triggers/interface_all_Logevents.class.php @@ -47,7 +47,7 @@ class InterfaceLogevents { $this->db = $DB ; - $this->name = "Logevents"; + $this->name = eregi_replace('^Interface','',get_class($this)); $this->family = "core"; $this->description = "Les triggers de ce composant permettent de logguer les evenements de securite Dolibarr."; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version diff --git a/htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php b/htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php index 776410ef8b3..a1f93603bcc 100644 --- a/htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php +++ b/htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php @@ -47,7 +47,7 @@ class InterfaceActionsAuto { $this->db = $DB ; - $this->name = "ActionsAuto"; + $this->name = eregi_replace('^Interface','',get_class($this)); $this->family = "agenda"; $this->description = "Triggers of this module add actions in agenda according to setup made in agenda setup."; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version diff --git a/htdocs/includes/triggers/interface_modCommande_Ecotax.class.php-NORUN b/htdocs/includes/triggers/interface_modCommande_Ecotax.class.php-NORUN index 8ebfbad4bf5..64fddf1bf28 100644 --- a/htdocs/includes/triggers/interface_modCommande_Ecotax.class.php-NORUN +++ b/htdocs/includes/triggers/interface_modCommande_Ecotax.class.php-NORUN @@ -43,7 +43,7 @@ class InterfaceEcotax { $this->db = $DB ; - $this->name = "Ecotax"; + $this->name = eregi_replace('Interface','',get_class($this)); $this->family = "facture"; $this->description = "Les triggers de ce composant calculent le ecotax du produit si le produit est membre d'une categorie speciale (par default: 'Ecotax', change le valeur du variable \$ecotax dans le trigger pour accomoder votre choix)."; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/triggers/interface_modCommande_Fraisport.class.php-NORUN b/htdocs/includes/triggers/interface_modCommande_Fraisport.class.php-NORUN index 253183afa62..2e2ddf085d0 100644 --- a/htdocs/includes/triggers/interface_modCommande_Fraisport.class.php-NORUN +++ b/htdocs/includes/triggers/interface_modCommande_Fraisport.class.php-NORUN @@ -43,7 +43,7 @@ class InterfaceFraisport { $this->db = $DB ; - $this->name = "Fraisport"; + $this->name = eregi_replace('Interface','',get_class($this)); $this->family = "facture"; $this->description = "Les triggers de ce composant calculent les frais de port."; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/triggers/interface_modEditeur_Editeur.class.php-NORUN b/htdocs/includes/triggers/interface_modEditeur_Editeur.class.php-NORUN index 93136971749..bcf08a29491 100644 --- a/htdocs/includes/triggers/interface_modEditeur_Editeur.class.php-NORUN +++ b/htdocs/includes/triggers/interface_modEditeur_Editeur.class.php-NORUN @@ -43,7 +43,7 @@ class InterfaceEditeur { $this->db = $DB ; - $this->name = "Editeur"; + $this->name = eregi_replace('Interface','',get_class($this)); $this->family = "editeur"; $this->description = "Les triggers de ce composant tri les lignes commandes par stock_loc."; $this->revision = explode(' ','$Revision$'); diff --git a/htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php b/htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php index 1c86c168068..d402c546754 100644 --- a/htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php +++ b/htdocs/includes/triggers/interface_modLdap_Ldapsynchro.class.php @@ -45,7 +45,7 @@ class InterfaceLdapsynchro { $this->db = $DB ; - $this->name = "Ldapsynchro"; + $this->name = eregi_replace('Interface','',get_class($this)); $this->family = "ldap"; $this->description = "Les triggers de ce composant permettent d'effectuer les synchro de Dolibarr vers un annuaire LDAP."; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version diff --git a/htdocs/includes/triggers/interface_modNotification_Notification.class.php b/htdocs/includes/triggers/interface_modNotification_Notification.class.php index 350baa5aab0..865f434ca1f 100644 --- a/htdocs/includes/triggers/interface_modNotification_Notification.class.php +++ b/htdocs/includes/triggers/interface_modNotification_Notification.class.php @@ -42,7 +42,7 @@ class InterfaceNotification { $this->db = $DB ; - $this->name = "Notification"; + $this->name = eregi_replace('Interface','',get_class($this)); $this->family = "notification"; $this->description = "Les triggers de ce composant envoie les notifications par mail selon configuration du module Notification."; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version diff --git a/htdocs/includes/triggers/interface_modPhenix_Phenixsynchro.class.php b/htdocs/includes/triggers/interface_modPhenix_Phenixsynchro.class.php index 0a81b865262..f10cea23d21 100644 --- a/htdocs/includes/triggers/interface_modPhenix_Phenixsynchro.class.php +++ b/htdocs/includes/triggers/interface_modPhenix_Phenixsynchro.class.php @@ -51,7 +51,7 @@ class InterfacePhenixsynchro { $this->db = $DB ; - $this->name = "Phenixsynchro"; + $this->name = eregi_replace('Interface','',get_class($this)); $this->family = "phenix"; $this->description = "Les triggers de ce composant permettent d'insérer un évênement dans le calendrier phenix pour chaque grand évênement Dolibarr."; $this->version = 'experimental'; // 'experimental' or 'dolibarr' or version diff --git a/htdocs/includes/triggers/interface_modWebcalendar_Webcalsynchro.class.php b/htdocs/includes/triggers/interface_modWebcalendar_Webcalsynchro.class.php index fd423ca65a3..98a558acbbc 100644 --- a/htdocs/includes/triggers/interface_modWebcalendar_Webcalsynchro.class.php +++ b/htdocs/includes/triggers/interface_modWebcalendar_Webcalsynchro.class.php @@ -49,7 +49,7 @@ class InterfaceWebcalsynchro { $this->db = $DB ; - $this->name = "Webcalsynchro"; + $this->name = eregi_replace('Interface','',get_class($this)); $this->family = "webcal"; $this->description = "Les triggers de ce composant permettent d'insérer un évênement dans le calendrier webcalendar pour chaque grand évênement Dolibarr."; $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index c668327853b..3fbb41049b3 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -276,8 +276,8 @@ Module400Name=Projets Module400Desc=Gestion des projets au sein des autres modules Module410Name=Webcalendar Module410Desc=Interface avec le calendrier Webcalendar -Module500Name=Taxes, charges sociales et dividendes -Module500Desc=Gestion des taxes et charges sociales +Module500Name=Taxes et dividendes +Module500Desc=Gestion des taxes, charges sociales et dividendes Module600Name=Notifications Module600Desc=Envoi de notifications (par mail) sur les évênements métiers Dolibarr Module700Name=Dons