| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  | /* Copyright (C) 2003      Rodolphe Quiedeville <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  |  * Copyright (C) 2004-2015 Laurent Destailleur  <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  * Copyright (C) 2005-2016 Regis Houssin        <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  * This program is free software; you can redistribute it and/or modify | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  |  * it under the terms of the GNU General Public License as published by | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  |  * the Free Software Foundation; either version 3 of the License, or | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  * (at your option) any later version. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |  * This program is distributed in the hope that it will be useful, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |  * GNU General Public License for more details. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  * You should have received a copy of the GNU General Public License | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |  * along with this program. If not, see <http://www.gnu.org/licenses/>. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |  *    \defgroup   mymodule     Module MyModule | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |  *  \brief      Example of a module descriptor. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |  *                Such a file must be copied into htdocs/mymodule/core/modules directory. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  *  \file       htdocs/mymodule/core/modules/modMyModule.class.php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |  *  \ingroup    mymodule | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  *  \brief      Description and activation file for module MyModule | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  | include_once DOL_DOCUMENT_ROOT . '/core/modules/DolibarrModules.class.php'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |  *  Description and activation class for module MyModule | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  | class modFlightLog extends DolibarrModules | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  | { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |     const MENU_TYPE_LEFT = 'left'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |     const MENU_TYPE_TOP = 'top'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |      * @var array Indexed list of export IDs | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |     public $export_code = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |      * @var array Indexed list of export names | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |     public $export_label = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |      * @var array Indexed list of export enabling conditions | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |     public $export_enabled = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |      * @var array Indexed list of export required permissions | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |     public $export_permission = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |      * @var array Indexed list of export fields | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 67 |  |  |     public $export_fields_array = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 69 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 70 |  |  |      * @var array Indexed list of export entities | 
            
                                                                                                            
                            
            
                                    
            
            
                | 71 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 72 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 73 |  |  |     public $export_entities_array = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 74 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 75 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 76 |  |  |      * @var array Indexed list of export SQL queries start | 
            
                                                                                                            
                            
            
                                    
            
            
                | 77 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 78 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 79 |  |  |     public $export_sql_start = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 80 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 81 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 82 |  |  |      * @var array Indexed list of export SQL queries end | 
            
                                                                                                            
                            
            
                                    
            
            
                | 83 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 84 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 85 |  |  |     public $export_sql_end = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 86 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 87 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 88 |  |  |      * @var array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 89 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 90 |  |  |     public $export_TypeFields_array = []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 91 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 92 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 93 |  |  |      * @var array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 94 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 95 |  |  |     public $menus; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 96 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 97 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 98 |  |  |      * @var array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 99 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 100 |  |  |     public $tabs; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 101 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 102 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 103 |  |  |      * @var array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 104 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 105 |  |  |     public $dictionaries; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 106 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 107 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 108 |  |  |      * Constructor. Define names, constants, directories, boxes, permissions | 
            
                                                                                                            
                            
            
                                    
            
            
                | 109 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 110 |  |  |      * @param DoliDB $db Database handler | 
            
                                                                                                            
                            
            
                                    
            
            
                | 111 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 112 |  |  |     public function __construct($db) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 113 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 114 |  |  |         parent::__construct($db); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 115 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 116 |  |  |         global $conf; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 117 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 118 |  |  |         // Id for module (must be unique). | 
            
                                                                                                            
                            
            
                                    
            
            
                | 119 |  |  |         $this->numero = 500000; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 120 |  |  |         // Key text used to identify module (for permissions, menus, etc...) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 121 |  |  |         $this->rights_class = 'flightlog'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 122 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 123 |  |  |         $this->family = "Belgian Balloon Club"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 124 |  |  |         $this->module_position = 500; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 125 |  |  |         $this->name = preg_replace('/^mod/i', '', get_class($this)); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 126 |  |  |         // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 127 |  |  |         $this->description = "Pilots flight log"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 128 |  |  |         $this->descriptionlong = "Manage flights and flight types for the Belgian Balloon Club"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 129 |  |  |         $this->editor_name = 'De Coninck Laurent'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 130 |  |  |         $this->editor_url = 'http://www.dolibarr.org'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 131 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 132 |  |  |         // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' | 
            
                                                                                                            
                            
            
                                    
            
            
                | 133 |  |  |         $this->version = '1.5'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 134 |  |  |         // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 135 |  |  |         $this->const_name = 'MAIN_MODULE_' . strtoupper($this->name); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 136 |  |  |         // Name of image file used for this module. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 137 |  |  |         // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' | 
            
                                                                                                            
                            
            
                                    
            
            
                | 138 |  |  |         // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' | 
            
                                                                                                            
                            
            
                                    
            
            
                | 139 |  |  |         $this->picto = 'flight@flightlog'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 140 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 141 |  |  |         $this->configureCss(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 142 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 143 |  |  |         // Data directories to create when module is enabled. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 144 |  |  |         $this->dirs = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 145 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 146 |  |  |         // Config pages. Put here list of php page, stored into mymodule/admin directory, to use to setup module. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 147 |  |  |         $this->config_page_url = [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 148 |  |  |             "vol.php@flightlog", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 149 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 150 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 151 |  |  |         // Dependencies | 
            
                                                                                                            
                            
            
                                    
            
            
                | 152 |  |  |         $this->hidden = false; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 153 |  |  |         $this->depends = []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 154 |  |  |         $this->requiredby = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 155 |  |  |         $this->conflictwith = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 156 |  |  |         $this->phpmin = array(5, 5); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 157 |  |  |         $this->need_dolibarr_version = array(4, 0); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 158 |  |  |         $this->langfiles = array("mymodule@flightlog"); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 159 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 160 |  |  |         // Constants | 
            
                                                                                                            
                            
            
                                    
            
            
                | 161 |  |  |         $this->initConstants(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 162 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 163 |  |  |         if (!isset($conf->flightLog) || !isset($conf->flightLog->enabled)) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 164 |  |  |             $conf->flightLog = new stdClass(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 165 |  |  |             $conf->flightLog->enabled = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 166 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 167 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 168 |  |  |         $this->boxes = []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 169 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 170 |  |  |         $this->initTabs(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 171 |  |  |         $this->initDictionnaries(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 172 |  |  |         $this->initCronJobs(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 173 |  |  |         $this->initMenu(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 174 |  |  |         $this->initHooks(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 175 |  |  |         $this->initPermissions(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 176 |  |  |         $this->initExports(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 177 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 178 |  |  |         $this->activateTriggers(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 179 |  |  |         $this->initWorkflows(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 180 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 181 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 182 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 183 |  |  |      *        Function called when module is enabled. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 184 |  |  |      *        The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 185 |  |  |      *        It also creates data directories | 
            
                                                                                                            
                            
            
                                    
            
            
                | 186 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 187 |  |  |      * @param      string $options Options when enabling module ('', 'noboxes') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 188 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 189 |  |  |      * @return     int                1 if OK, 0 if KO | 
            
                                                                                                            
                            
            
                                    
            
            
                | 190 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 191 |  |  |     public function init($options = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 192 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 193 |  |  |         $sql = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 194 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 195 |  |  |         $this->_load_tables('/flightlog/sql/'); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 196 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 197 |  |  |         return $this->_init($sql, $options); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 198 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 199 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 200 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 201 |  |  |      * Function called when module is disabled. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 202 |  |  |      * Remove from database constants, boxes and permissions from Dolibarr database. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 203 |  |  |      * Data directories are not deleted | 
            
                                                                                                            
                            
            
                                    
            
            
                | 204 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 205 |  |  |      * @param      string $options Options when enabling module ('', 'noboxes') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 206 |  |  |      * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 207 |  |  |      * @return     int                1 if OK, 0 if KO | 
            
                                                                                                            
                            
            
                                    
            
            
                | 208 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 209 |  |  |     public function remove($options = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 210 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 211 |  |  |         $sql = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 212 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 213 |  |  |         return $this->_remove($sql, $options); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 214 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 215 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 216 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 217 |  |  |      * Init menu | 
            
                                                                                                            
                            
            
                                    
            
            
                | 218 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 219 |  |  |     private function initMenu() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 220 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 221 |  |  |         $this->menus = array(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 222 |  |  |         $r = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 223 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 224 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 225 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 226 |  |  |             'type' => self::MENU_TYPE_TOP, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 227 |  |  |             'titre' => 'Carnet de vols', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 228 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 229 |  |  |             'leftmenu' => 'readFlight', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 230 |  |  |             'url' => '/flightlog/readFlights.php', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 231 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 232 |  |  |             'position' => 100, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 233 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 234 |  |  |             'perms' => '$user->rights->flightlog->vol->access', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 235 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 236 |  |  |             'user' => 0 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 237 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 238 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 239 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 240 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 241 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 242 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 243 |  |  |             'titre' => 'Ajouter une commande', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 244 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 245 |  |  |             'leftmenu' => 'addOrder', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 246 |  |  |             'url' => '/flightlog/addOrder.php', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 247 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 248 |  |  |             'position' => 101, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 249 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 250 |  |  |             'perms' => '$user->rights->commande->creer', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 251 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 252 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 253 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 254 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 255 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 256 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 257 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 258 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 259 |  |  |             'titre' => 'Mes commandes', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 260 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 261 |  |  |             'leftmenu' => 'listOrder', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 262 |  |  |             'url' => '/commande/list.php?search_sale=__USERID__', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 263 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 264 |  |  |             'position' => 102, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 265 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 266 |  |  |             'perms' => '$user->rights->commande->creer', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 267 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 268 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 269 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 270 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 271 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 272 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 273 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 274 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 275 |  |  |             'titre' => 'Ajouter un vol', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 276 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 277 |  |  |             'leftmenu' => 'addFlight', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 278 |  |  |             'url' => '/flightlog/addFlight.php', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 279 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 280 |  |  |             'position' => 102, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 281 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 282 |  |  |             'perms' => '$user->rights->flightlog->vol->add', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 283 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 284 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 285 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 286 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 287 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 288 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 289 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 290 |  |  |             'titre' => 'Visualisation', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 291 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 292 |  |  |             'leftmenu' => 'showFlight', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 293 |  |  |             'url' => '/flightlog/readFlights.php', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 294 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 295 |  |  |             'position' => 103, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 296 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 297 |  |  |             'perms' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 298 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 299 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 300 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 301 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 302 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 303 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 304 |  |  |             'titre' => 'Les vols', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 305 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 306 |  |  |             'leftmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 307 |  |  |             'url' => '/flightlog/list.php', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 308 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 309 |  |  |             'position' => 104, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 310 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 311 |  |  |             'perms' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 312 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 313 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 314 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 315 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 316 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 317 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 318 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 319 |  |  |             'titre' => 'Gestion', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 320 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 321 |  |  |             'leftmenu' => 'management', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 322 |  |  |             'url' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 323 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 324 |  |  |             'position' => 105, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 325 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 326 |  |  |             'perms' => '$user->rights->flightlog->vol->status||$user->rights->flightlog->vol->detail', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 327 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 328 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 329 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 330 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 331 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 332 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog,fk_leftmenu=management', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 333 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 334 |  |  |             'titre' => 'Payement', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 335 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 336 |  |  |             'leftmenu' => 'flightBilling', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 337 |  |  |             'url' => '/flightlog/listFact.php?view=1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 338 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 339 |  |  |             'position' => 106, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 340 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 341 |  |  |             'perms' => '$user->rights->flightlog->vol->financial', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 342 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 343 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 344 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 345 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 346 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 347 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog,fk_leftmenu=management', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 348 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 349 |  |  |             'titre' => 'Aviabel', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 350 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 351 |  |  |             'leftmenu' => 'flightAviabel', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 352 |  |  |             'url' => '/flightlog/listFact.php?view=2', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 353 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 354 |  |  |             'position' => 107, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 355 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 356 |  |  |             'perms' => '$user->rights->flightlog->vol->detail', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 357 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 358 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 359 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 360 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 361 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 362 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog,fk_leftmenu=management', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 363 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 364 |  |  |             'titre' => 'Facturation mensuelle', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 365 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 366 |  |  |             'leftmenu' => 'monthlyBill', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 367 |  |  |             'url' => '/flightlog/generateMonthlyBilling.php', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 368 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 369 |  |  |             'position' => 108, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 370 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 371 |  |  |             'perms' => '$user->rights->flightlog->vol->financial', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 372 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 373 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 374 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 375 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 376 |  |  |         $this->menu[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 377 |  |  |             'fk_menu' => 'fk_mainmenu=flightlog,fk_leftmenu=management', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 378 |  |  |             'type' => self::MENU_TYPE_LEFT, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 379 |  |  |             'titre' => 'Notes de frais', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 380 |  |  |             'mainmenu' => 'flightlog', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 381 |  |  |             'leftmenu' => 'expensenotes', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 382 |  |  |             'url' => '/flightlog/generateExpenseNote.php', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 383 |  |  |             'langs' => 'mylangfile', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 384 |  |  |             'position' => 109, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 385 |  |  |             'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 386 |  |  |             'perms' => '$user->rights->flightlog->vol->financial', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 387 |  |  |             'target' => '', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 388 |  |  |             'user' => 2 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 389 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 390 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 391 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 392 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 393 |  |  |      * Init permissions | 
            
                                                                                                            
                            
            
                                    
            
            
                | 394 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 395 |  |  |     private function initPermissions() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 396 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 397 |  |  |         $this->rights = array();        // Permission array used by this module | 
            
                                                                                                            
                            
            
                                    
            
            
                | 398 |  |  |         $r = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 399 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 400 |  |  |         $this->rights[$r][0] = 9993; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 401 |  |  |         $this->rights[$r][1] = 'Permet d\'acceder au module des vols.'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 402 |  |  |         $this->rights[$r][3] = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 403 |  |  |         $this->rights[$r][4] = 'vol'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 404 |  |  |         $this->rights[$r][5] = 'access'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 405 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 406 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 407 |  |  |         $this->rights[$r][0] = 9998; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 408 |  |  |         $this->rights[$r][1] = 'Enregistrer un nouveau vol.'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 409 |  |  |         $this->rights[$r][3] = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 410 |  |  |         $this->rights[$r][4] = 'vol'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 411 |  |  |         $this->rights[$r][5] = 'add'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 412 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 413 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 414 |  |  |         $this->rights[$r][0] = 9997; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 415 |  |  |         $this->rights[$r][1] = 'Permet de facturer un vol.'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 416 |  |  |         $this->rights[$r][3] = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 417 |  |  |         $this->rights[$r][4] = 'vol'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 418 |  |  |         $this->rights[$r][5] = 'status'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 419 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 420 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 421 |  |  |         $this->rights[$r][0] = 9996; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 422 |  |  |         $this->rights[$r][1] = 'Permet de supprimer un vol.'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 423 |  |  |         $this->rights[$r][3] = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 424 |  |  |         $this->rights[$r][4] = 'vol'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 425 |  |  |         $this->rights[$r][5] = 'delete'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 426 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 427 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 428 |  |  |         $this->rights[$r][0] = 9995; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 429 |  |  |         $this->rights[$r][1] = 'Permet de modifier tous les vols.'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 430 |  |  |         $this->rights[$r][3] = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 431 |  |  |         $this->rights[$r][4] = 'vol'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 432 |  |  |         $this->rights[$r][5] = 'edit'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 433 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 434 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 435 |  |  |         $this->rights[$r][0] = 9994; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 436 |  |  |         $this->rights[$r][1] = 'affiche les details de tous les ballons et de tous les pilotes.'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 437 |  |  |         $this->rights[$r][3] = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 438 |  |  |         $this->rights[$r][4] = 'vol'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 439 |  |  |         $this->rights[$r][5] = 'detail'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 440 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 441 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 442 |  |  |         $this->rights[$r][0] = 9999; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 443 |  |  |         $this->rights[$r][1] = 'Gérer les aspects financier des vols'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 444 |  |  |         $this->rights[$r][3] = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 445 |  |  |         $this->rights[$r][4] = 'vol'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 446 |  |  |         $this->rights[$r][5] = 'financial'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 447 |  |  |         $r++; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 448 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 449 |  |  |         $this->rights[$r][0] = 10000; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 450 |  |  |         $this->rights[$r][1] = 'Gérer des documents financiers'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 451 |  |  |         $this->rights[$r][3] = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 452 |  |  |         $this->rights[$r][4] = 'vol'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 453 |  |  |         $this->rights[$r][5] = 'financialGenerateDocuments'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 454 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 455 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 456 |  |  |     private function initCronJobs() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 457 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 458 |  |  |         $this->cronjobs = [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 459 |  |  |             0=>array('label'=>'bbcMonthlyFlightsBill', 'jobtype'=>'method', 'class'=>'flightlog/core/cron/BbcMonthlyFlightsBillCron.php', 'objectname'=>'BbcMonthlyFlightsBillCron', 'method'=>'run', 'parameters'=>'', 'comment'=>'Generate month bill.', 'frequency'=>1, 'unitfrequency'=>2592000), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 460 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 461 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 462 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 463 |  |  |     private function initDictionnaries() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 464 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 465 |  |  |         $this->initFlightTypeDictionnary(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 466 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 467 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 468 |  |  |     private function initFlightTypeDictionnary() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 469 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 470 |  |  |         $this->dictionaries = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 471 |  |  |             'langs' => 'mylangfile@mymodule', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 472 |  |  |             'tabname' => array(MAIN_DB_PREFIX . "bbc_types"), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 473 |  |  |             'tablib' => array("Types de vols"), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 474 |  |  |             'tabsql' => array('SELECT f.idType, f.numero, f.nom, f.active FROM ' . MAIN_DB_PREFIX . 'bbc_types as f',), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 475 |  |  |             'tabsqlsort' => array("numero ASC"), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 476 |  |  |             'tabfield' => array("idType,numero,nom"), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 477 |  |  |             'tabfieldvalue' => array("numero,nom"), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 478 |  |  |             'tabfieldinsert' => array("numero,nom"), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 479 |  |  |             'tabrowid' => array("idType"), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 480 |  |  |             'tabcond' => array('$conf->flightlog->enabled'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 481 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 482 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 483 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 484 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 485 |  |  |      * Init hooks | 
            
                                                                                                            
                            
            
                                    
            
            
                | 486 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 487 |  |  |     private function initHooks() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 488 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 489 |  |  |         if (!isset($this->module_parts["hooks"])) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 490 |  |  |             $this->module_parts["hooks"] = []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 491 |  |  |         } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 492 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 493 |  |  |         $this->module_parts["hooks"][] = "searchform"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 494 |  |  |         $this->module_parts["hooks"][] = "showLinkToObjectBlock"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 495 |  |  |         $this->module_parts["hooks"][] = "criccar"; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 496 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 497 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 498 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 499 |  |  |     private function initConstants() | 
            
                                                                        
                            
            
                                    
            
            
                | 500 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 501 |  |  |         $this->const = array( | 
            
                                                                        
                            
            
                                    
            
            
                | 502 |  |  |             0 => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 503 |  |  |                 'BBC_FLIGHT_LOG_TAUX_REMB_KM', | 
            
                                                                        
                            
            
                                    
            
            
                | 504 |  |  |                 'chaine', | 
            
                                                                        
                            
            
                                    
            
            
                | 505 |  |  |                 '0.25', | 
            
                                                                        
                            
            
                                    
            
            
                | 506 |  |  |                 'Taux remboursement des kilomètres au BBC', | 
            
                                                                        
                            
            
                                    
            
            
                | 507 |  |  |                 true, | 
            
                                                                        
                            
            
                                    
            
            
                | 508 |  |  |                 'current', | 
            
                                                                        
                            
            
                                    
            
            
                | 509 |  |  |                 true | 
            
                                                                        
                            
            
                                    
            
            
                | 510 |  |  |             ], | 
            
                                                                        
                            
            
                                    
            
            
                | 511 |  |  |             1 => [ | 
            
                                                                        
                            
            
                                    
            
            
                | 512 |  |  |                 'BBC_FLIGHT_LOG_UNIT_PRICE_MISSION', | 
            
                                                                        
                            
            
                                    
            
            
                | 513 |  |  |                 'chaine', | 
            
                                                                        
                            
            
                                    
            
            
                | 514 |  |  |                 '35', | 
            
                                                                        
                            
            
                                    
            
            
                | 515 |  |  |                 'Unit price special mission', | 
            
                                                                        
                            
            
                                    
            
            
                | 516 |  |  |                 true, | 
            
                                                                        
                            
            
                                    
            
            
                | 517 |  |  |                 'current', | 
            
                                                                        
                            
            
                                    
            
            
                | 518 |  |  |                 true | 
            
                                                                        
                            
            
                                    
            
            
                | 519 |  |  |             ], | 
            
                                                                        
                            
            
                                    
            
            
                | 520 |  |  |         ); | 
            
                                                                        
                            
            
                                    
            
            
                | 521 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 522 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 523 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 524 |  |  |      * Init exports | 
            
                                                                                                            
                            
            
                                    
            
            
                | 525 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 526 |  |  |     private function initExports() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 527 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 528 |  |  |         $r = 0; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 529 |  |  |         $this->addFullFlightsExport($r); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 530 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 531 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 532 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 533 |  |  |      * @param int $r | 
            
                                                                                                            
                            
            
                                    
            
            
                | 534 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 535 |  |  |     private function addFullFlightsExport($r) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 536 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 537 |  |  |         $this->export_code[$r] = $this->rights_class . '_' . $r; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 538 |  |  |         $this->export_label[$r] = 'Flights export'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 539 |  |  |         $this->export_enabled[$r] = '1'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 540 |  |  |         $this->export_permission[$r] = array(array("flightlog", "vol", "detail")); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 541 |  |  |         $this->export_fields_array[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 542 |  |  |             "flight.idBBC_vols" => "Identifiant", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 543 |  |  |             "flight.date" => "Date", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 544 |  |  |             "flight.lieuD" => "Lieu décollage ", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 545 |  |  |             "flight.lieuA" => "Lieu atterissage", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 546 |  |  |             "flight.heureD" => "Heure décollage", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 547 |  |  |             "flight.heureA" => "Heure atterissage", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 548 |  |  |             "flight.BBC_ballons_idBBC_ballons" => "Identifiant ballon", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 549 |  |  |             "flight.nbrPax" => "# pax", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 550 |  |  |             "flight.remarque" => "Remarque", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 551 |  |  |             "flight.incidents" => "Incidents", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 552 |  |  |             "flight.fk_type" => "Identifiant type", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 553 |  |  |             "flight.fk_pilot" => "Identifiant pilote", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 554 |  |  |             "flight.fk_organisateur" => "Identifiant organisateur", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 555 |  |  |             "flight.is_facture" => "Facture Oui/Non", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 556 |  |  |             "flight.kilometers" => "# Km", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 557 |  |  |             "flight.cost" => "Cout", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 558 |  |  |             "flight.fk_receiver" => "Identifiant receveur d'argent", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 559 |  |  |             "flight.justif_kilometers" => "Justificatif kilomètres", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 560 |  |  |             "balloon.immat" => "Immat.", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 561 |  |  |             "pilot.login" => "Pilote", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 562 |  |  |             "flightType.nom" => "Type de vol", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 563 |  |  |             "organisator.login" => "Organisateur", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 564 |  |  |             "receiver.login" => "Percepteur", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 565 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 566 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 567 |  |  |         $this->export_TypeFields_array[$r] = [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 568 |  |  |             "flight.date" => "Date", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 569 |  |  |             "flight.lieuD" => "Text", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 570 |  |  |             "flight.lieuA" => "Text", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 571 |  |  |             "flight.heureD" => "Text", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 572 |  |  |             "flight.heureA" => "Text", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 573 |  |  |             "flight.BBC_ballons_idBBC_ballons" => implode(":", ["List", "bbc_ballons", "immat", "rowid"]), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 574 |  |  |             "flight.nbrPax" => "Numeric", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 575 |  |  |             "flight.remarque" => "Text", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 576 |  |  |             "flight.incidents" => "Text", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 577 |  |  |             "flight.fk_type" => implode(":", ["List", "bbc_types", "nom", "idType"]), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 578 |  |  |             "flight.fk_pilot" => implode(":", ["List", "user", "login", "rowid"]), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 579 |  |  |             "flight.fk_organisateur" => implode(":", ["List", "user", "login", "rowid"]), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 580 |  |  |             "flight.is_facture" => "Boolean", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 581 |  |  |             "flight.kilometers" => "Numeric", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 582 |  |  |             "flight.cost" => "Numeric", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 583 |  |  |             "flight.fk_receiver" => implode(":", ["List", "user", "login", "rowid"]), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 584 |  |  |             "flight.justif_kilometers" => "Text", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 585 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 586 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 587 |  |  |         $this->export_entities_array[$r] = array( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 588 |  |  |             "flight.idBBC_vols" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 589 |  |  |             "flight.date" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 590 |  |  |             "flight.lieuD" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 591 |  |  |             "flight.lieuA" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 592 |  |  |             "flight.heureD" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 593 |  |  |             "flight.heureA" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 594 |  |  |             "flight.BBC_ballons_idBBC_ballons" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 595 |  |  |             "flight.nbrPax" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 596 |  |  |             "flight.remarque" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 597 |  |  |             "flight.incidents" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 598 |  |  |             "flight.fk_type" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 599 |  |  |             "flight.fk_pilot" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 600 |  |  |             "flight.fk_organisateur" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 601 |  |  |             "flight.is_facture" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 602 |  |  |             "flight.kilometers" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 603 |  |  |             "flight.cost" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 604 |  |  |             "flight.fk_receiver" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 605 |  |  |             "flight.justif_kilometers" => "Flight", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 606 |  |  |             "balloon.immat" => "Balloon", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 607 |  |  |             "pilot.login" => "Pilot", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 608 |  |  |             "flightType.nom" => "FlightType", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 609 |  |  |             "organisator.login" => "Organisator", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 610 |  |  |             "receiver.login" => "Percepteur", | 
            
                                                                                                            
                            
            
                                    
            
            
                | 611 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 612 |  |  |         $this->export_sql_start[$r] = 'SELECT DISTINCT '; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 613 |  |  |         $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'bbc_vols as flight'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 614 |  |  |         $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bbc_ballons as balloon on (flight.BBC_ballons_idBBC_ballons = balloon.rowid)'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 615 |  |  |         $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bbc_types as flightType on (flight.fk_type = flightType.idType)'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 616 |  |  |         $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'user as pilot on (flight.fk_pilot = pilot.rowid)'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 617 |  |  |         $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'user as organisator on (flight.fk_organisateur = organisator.rowid)'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 618 |  |  |         $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'user as receiver on (flight.fk_receiver = receiver.rowid)'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 619 |  |  |         $this->export_sql_end[$r] .= ' WHERE 1 = 1'; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 620 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 621 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 622 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 623 |  |  |      * Activate triggers for this module | 
            
                                                                                                            
                            
            
                                    
            
            
                | 624 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 625 |  |  |     private function activateTriggers() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 626 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 627 |  |  |         $this->module_parts['triggers'] = 1; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 628 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 629 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 630 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 631 |  |  |      * Initialize all workflows | 
            
                                                                                                            
                            
            
                                    
            
            
                | 632 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 633 |  |  |     private function initWorkflows() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 634 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 635 |  |  |         $this->module_parts['workflow'] = [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 636 |  |  |             "WORKFLOW_BBC_FLIGHTLOG_SEND_MAIL_ON_INCIDENT" => [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 637 |  |  |                 'family' => 'create', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 638 |  |  |                 'position' => 10, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 639 |  |  |                 'enabled' => '1', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 640 |  |  |                 'picto' => 'order' | 
            
                                                                                                            
                            
            
                                    
            
            
                | 641 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 642 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 643 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 644 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 645 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 646 |  |  |      * Add stylesheets | 
            
                                                                                                            
                            
            
                                    
            
            
                | 647 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 648 |  |  |     private function configureCss() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 649 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 650 |  |  |         $this->module_parts['css'] = [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 651 |  |  |             '/flightlog/css/flightlog.css', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 652 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 653 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 654 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 655 |  |  |     /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 656 |  |  |      * Init tabs to inject in other modules. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 657 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 658 |  |  |     private function initTabs() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 659 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 660 |  |  |         $this->tabs = []; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 661 |  |  |         $this->tabs[] = [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 662 |  |  |             'data'=>'project:+instruction:Vol d\'instructions:mymodule@flightlog:1:/flightlog/tabs/project/instructions.php?id=__ID__' | 
            
                                                                                                            
                            
            
                                    
            
            
                | 663 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 664 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 665 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 666 |  |  | } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 667 |  |  |  | 
            
                                                        
            
                                    
            
            
                | 668 |  |  |  |