dolibarr  9.0.0
modDocumentGeneration.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  * or see http://www.gnu.org/
18  */
19 
28 include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
29 
30 
35 {
36 
42  function __construct($db)
43  {
44  $this->db = $db;
45  $this->numero = 1520;
46 
47  $this->family = "technic";
48  $this->module_position = '80';
49  // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
50  $this->name = preg_replace('/^mod/i','',get_class($this));
51  $this->description = "Direct mail document generation";
52  // Possible values for version are: 'development', 'experimental', 'dolibarr' or version
53  $this->version = 'development';
54 
55  $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
56  $this->picto='email';
57 
58  // Data directories to create when module is enabled
59  $this->dirs = array("/documentgeneration/temp");
60 
61  // Config pages
62  //$this->config_page_url = array("document.php");
63 
64  // Dependencies
65  $this->depends = array();
66  $this->requiredby = array();
67  $this->conflictwith = array();
68  $this->langfiles = array("orders","bills","companies","mails");
69 
70  // Constants
71 
72  $this->const = array();
73 
74  // Boxes
75  $this->boxes = array();
76 
77  // Permissions
78  $this->rights = array();
79  $this->rights_class = 'document';
80 
81  $r=0;
82 
83  $this->rights[$r][0] = 1521;
84  $this->rights[$r][1] = 'Lire les documents';
85  $this->rights[$r][2] = 'r';
86  $this->rights[$r][3] = 0;
87  $this->rights[$r][4] = 'lire';
88 
89  $r++;
90  $this->rights[$r][0] = 1522;
91  $this->rights[$r][1] = 'Supprimer les documents clients';
92  $this->rights[$r][2] = 'd';
93  $this->rights[$r][3] = 0;
94  $this->rights[$r][4] = 'supprimer';
95  }
96 
97 
106  function init($options='')
107  {
108  global $conf;
109 
110  // Permissions
111  $this->remove($options);
112 
113  $sql = array();
114 
115  return $this->_init($sql,$options);
116  }
117 }
Class DolibarrModules.
</td >< td class="liste_titre" align="right"></td ></tr >< tr class="liste_titre">< input type="checkbox" onClick="toggle(this)"/> Ref p ref Label p label Duration p duration warehouseinternal SELECT description FROM product_lang WHERE qty< br > qty qty qty StockTooLow img yes disabled img no img no< tr class="oddeven">< td >< input type="checkbox" class="check" name="' . $i . '"' . $disabled . '></td >< td >< input type="checkbox" class="check" name="choose'.$i.'"></td >< td class="nowrap"></td >< td >< input type="hidden" name="desc' . $i . '" value="' . dol_escape_htmltag($objp-> description
Only used if Module[ID]Desc translation string is not found.
Definition: replenish.php:573
init($options='')
Function called when module is enabled.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:103
Class to describe and enable module Document.
_init($array_sql, $options='')
Enables a module.