dolibarr  16.0.5
modulehelp.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
3  * Copyright (C) 2017 Regis Houssin <regis.houssin@inodbox.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17  */
18 
24 if (!defined('NOREQUIREMENU')) {
25  define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu
26 }
27 if (!defined('NOTOKENRENEWAL')) {
28  define('NOTOKENRENEWAL', '1'); // Disabled because this page is into a popup on module search page and we want to avoid to have an Anti CSRF token error (done if MAIN_SECURITY_CSRF_WITH_TOKEN is on) when we make a second search after closing popup.
29 }
30 
31 
32 require '../main.inc.php';
33 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
34 require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
36 
37 // Load translation files required by the page
38 $langs->loadLangs(array('errors', 'admin', 'modulebuilder', 'exports'));
39 
40 $mode = GETPOST('mode', 'alpha');
41 $action = GETPOST('action', 'aZ09');
42 $id = GETPOST('id', 'int');
43 if (empty($mode)) {
44  $mode = 'desc';
45 }
46 
47 if (!$user->admin) {
49 }
50 
51 
52 
53 /*
54  * Actions
55  */
56 
57 // Nothing
58 
59 
60 /*
61  * View
62  */
63 
64 $form = new Form($db);
65 
66 $help_url = 'EN:First_setup|FR:Premiers_param├ętrages|ES:Primeras_configuraciones';
67 llxHeader('', $langs->trans("Setup"), $help_url);
68 
69 print '<!-- Force style container -->'."\n".'<style>
70 .id-container {
71  width: 100%;
72 }
73 #id-right {
74  padding-left: unset;
75 }
76 </style>';
77 
78 $arrayofnatures = array('core'=>$langs->transnoentitiesnoconv("Core"), 'external'=>$langs->transnoentitiesnoconv("External").' - '.$langs->trans("AllPublishers"));
79 
80 // Search modules dirs
81 $modulesdir = dolGetModulesDirs();
82 
83 
84 $filename = array();
85 $modules = array();
86 $orders = array();
87 $categ = array();
88 $dirmod = array();
89 $i = 0; // is a sequencer of modules found
90 $j = 0; // j is module number. Automatically affected if module number not defined.
91 $modNameLoaded = array();
92 
93 foreach ($modulesdir as $dir) {
94  // Load modules attributes in arrays (name, numero, orders) from dir directory
95  //print $dir."\n<br>";
96  dol_syslog("Scan directory ".$dir." for module descriptor files (modXXX.class.php)");
97  $handle = @opendir($dir);
98  if (is_resource($handle)) {
99  while (($file = readdir($handle)) !== false) {
100  //print "$i ".$file."\n<br>";
101  if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php') {
102  $modName = substr($file, 0, dol_strlen($file) - 10);
103 
104  if ($modName) {
105  if (!empty($modNameLoaded[$modName])) {
106  $mesg = "Error: Module ".$modName." was found twice: Into ".$modNameLoaded[$modName]." and ".$dir.". You probably have an old file on your disk.<br>";
107  setEventMessages($mesg, null, 'warnings');
108  dol_syslog($mesg, LOG_ERR);
109  continue;
110  }
111 
112  try {
113  $res = include_once $dir.$file;
114  if (class_exists($modName)) {
115  try {
116  $objMod = new $modName($db);
117  $modNameLoaded[$modName] = $dir;
118 
119  if (!$objMod->numero > 0 && $modName != 'modUser') {
120  dol_syslog('The module descriptor '.$modName.' must have a numero property', LOG_ERR);
121  }
122  $j = $objMod->numero;
123 
124  $modulequalified = 1;
125 
126  // We discard modules according to features level (PS: if module is activated we always show it)
127  $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
128  if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) {
129  $modulequalified = 0;
130  }
131  if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) {
132  $modulequalified = 0;
133  }
134  if (preg_match('/deprecated/', $objMod->version) && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL >= 0))) {
135  $modulequalified = 0;
136  }
137 
138  // We discard modules according to property disabled
139  //if (! empty($objMod->hidden)) $modulequalified=0;
140 
141  if ($modulequalified > 0) {
142  $publisher = dol_escape_htmltag($objMod->getPublisher());
143  $external = ($objMod->isCoreOrExternalModule() == 'external');
144  if ($external) {
145  if ($publisher) {
146  $arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher;
147  } else {
148  $arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers");
149  }
150  }
151  ksort($arrayofnatures);
152  }
153 
154  // Define array $categ with categ with at least one qualified module
155  if ($modulequalified > 0) {
156  $modules[$i] = $objMod;
157  $filename[$i] = $modName;
158 
159  // Gives the possibility to the module, to provide his own family info and position of this family
160  if (is_array($objMod->familyinfo) && !empty($objMod->familyinfo)) {
161  if (!is_array($familyinfo)) {
162  $familyinfo = array();
163  }
164  $familyinfo = array_merge($familyinfo, $objMod->familyinfo);
165  $familykey = key($objMod->familyinfo);
166  } else {
167  $familykey = $objMod->family;
168  }
169 
170  $moduleposition = ($objMod->module_position ? $objMod->module_position : '50');
171  if ($moduleposition == '50' && ($objMod->isCoreOrExternalModule() == 'external')) {
172  $moduleposition = '80'; // External modules at end by default
173  }
174 
175  if (empty($familyinfo[$familykey]['position'])) {
176  $familyinfo[$familykey]['position'] = '0';
177  }
178 
179  $orders[$i] = $familyinfo[$familykey]['position']."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number
180  $dirmod[$i] = $dir;
181  //print $i.'-'.$dirmod[$i].'<br>';
182  // Set categ[$i]
183  $specialstring = 'unknown';
184  if ($objMod->version == 'development' || $objMod->version == 'experimental') {
185  $specialstring = 'expdev';
186  }
187  if (isset($categ[$specialstring])) {
188  $categ[$specialstring]++; // Array of all different modules categories
189  } else {
190  $categ[$specialstring] = 1;
191  }
192  $j++;
193  $i++;
194  } else {
195  dol_syslog("Module ".get_class($objMod)." not qualified");
196  }
197  } catch (Exception $e) {
198  dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
199  }
200  } else {
201  print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)<br>";
202  }
203  } catch (Exception $e) {
204  dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
205  }
206  }
207  }
208  }
209  closedir($handle);
210  } else {
211  dol_syslog("htdocs/admin/modulehelp.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING);
212  }
213 }
214 
215 asort($orders);
216 //var_dump($orders);
217 //var_dump($categ);
218 //var_dump($modules);
219 
220 
221 unset($objMod);
222 $i = 0;
223 foreach ($orders as $tmpkey => $tmpvalue) {
224  $tmpMod = $modules[$tmpkey];
225  if ($tmpMod->numero == $id) {
226  $key = $i;
227  $modName = $filename[$tmpkey];
228  $dirofmodule = $dirmod[$tmpkey];
229  $objMod = $tmpMod;
230  break;
231  }
232  $i++;
233 }
234 $value = $orders[$key];
235 $tab = explode('_', $value);
236 $familyposition = $tab[0]; $familykey = $tab[1]; $module_position = $tab[2]; $numero = $tab[3];
237 
238 
239 
240 $head = modulehelp_prepare_head($objMod);
241 
242 // Check filters
243 $modulename = $objMod->getName();
244 $moduledesc = $objMod->getDesc();
245 $moduleauthor = $objMod->getPublisher();
246 $moduledir = strtolower(preg_replace('/^mod/i', '', get_class($objMod)));
247 
248 $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($objMod)));
249 
250 $text = '<span class="opacitymedium">'.$langs->trans("LastActivationDate").':</span> ';
251 if (!empty($conf->global->$const_name)) {
252  $text .= dol_print_date($objMod->getLastActivationDate(), 'dayhour');
253 } else {
254  $text .= $langs->trans("Disabled");
255 }
256 $tmp = $objMod->getLastActivationInfo();
257 $authorid = (empty($tmp['authorid']) ? '' : $tmp['authorid']);
258 if ($authorid > 0) {
259  $tmpuser = new User($db);
260  $tmpuser->fetch($authorid);
261  $text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationAuthor").':</span> ';
262  $text .= $tmpuser->getNomUrl(1);
263 }
264 $ip = (empty($tmp['ip']) ? '' : $tmp['ip']);
265 if ($ip) {
266  $text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationIP").':</span> ';
267  $text .= $ip;
268 }
269 $lastactivationversion = (empty($tmp['lastactivationversion']) ? '' : $tmp['lastactivationversion']);
270 if ($lastactivationversion) {
271  $text .= '<br><span class="opacitymedium">'.$langs->trans("LastActivationVersion").':</span> ';
272  $text .= $lastactivationversion;
273 }
274 
275 $moreinfo = $text;
276 
277 $title = ($modulename ? $modulename : $moduledesc);
278 
279 print '<div class="centpercent">';
280 
281 $picto = 'object_'.$objMod->picto;
282 
283 print load_fiche_titre(($modulename ? $modulename : $moduledesc), $moreinfo, $picto, 0, '', 'titlemodulehelp');
284 print '<br>';
285 
286 print dol_get_fiche_head($head, $mode, '', -1);
287 
288 if (!$modulename) {
289  dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING);
290 }
291 
292 // Load all lang files of module
293 if (isset($objMod->langfiles) && is_array($objMod->langfiles)) {
294  foreach ($objMod->langfiles as $domain) {
295  $langs->load($domain);
296  }
297 }
298 
299 
300 
301 
302 // Version (with picto warning or not)
303 $version = $objMod->getVersion(0);
304 $versiontrans = '';
305 if (preg_match('/development/i', $version)) {
306  $versiontrans .= img_warning($langs->trans("Development"), 'style="float: left"');
307 }
308 if (preg_match('/experimental/i', $version)) {
309  $versiontrans .= img_warning($langs->trans("Experimental"), 'style="float: left"');
310 }
311 if (preg_match('/deprecated/i', $version)) {
312  $versiontrans .= img_warning($langs->trans("Deprecated"), 'style="float: left"');
313 }
314 $versiontrans .= $objMod->getVersion(1);
315 
316 // Define imginfo
317 $imginfo = "info";
318 if ($objMod->isCoreOrExternalModule() == 'external') {
319  $imginfo = "info_black";
320 }
321 
322 // Define text of description of module
323 $text = '';
324 
325 if ($mode == 'desc') {
326  if ($moduledesc) {
327  $text .= '<br>'.$moduledesc.'<br><br><br>';
328  }
329 
330  $text .= '<span class="opacitymedium">'.$langs->trans("Version").':</span> '.$version;
331 
332  $moduledescriptorfile = get_class($objMod).'.class.php';
333  $text .= '<br><span class="opacitymedium">'.$langs->trans("DescriptorFile").':</span> '.$moduledescriptorfile;
334 
335  $textexternal = '';
336  if ($objMod->isCoreOrExternalModule() == 'external') {
337  $tmpdirofmoduletoshow = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', $dirofmodule);
338  $textexternal .= '<br><span class="opacitymedium">'.$langs->trans("Origin").':</span> '.$langs->trans("ExternalModule").' - '.$langs->trans("InstalledInto", $tmpdirofmoduletoshow);
339 
340  global $dolibarr_allow_download_external_modules;
341  if (!empty($dolibarr_allow_download_external_modules) && preg_match('/\/custom\//', $dirofmodule)) {
342  // Add a link to download a zip of the module
343  $textexternal .= ' <a href="'.DOL_URL_ROOT.'/admin/tools/export_files.php?export_type=externalmodule&what='.urlencode($moduledir).'&compression=zip&zipfilename_template=module_'.$moduledir.'-'.$version.'.notorig" target="_blank" rel="noopener">'.img_picto('', 'download').'</a>';
344  }
345 
346  if ($objMod->editor_name != 'dolibarr') {
347  $textexternal .= '<br><span class="opacitymedium">'.$langs->trans("Publisher").':</span> '.(empty($objMod->editor_name) ? $langs->trans("Unknown") : $objMod->editor_name);
348  }
349  $editor_url = $objMod->editor_url;
350  if (!preg_match('/^http/', $editor_url)) {
351  $editor_url = 'http://'.$editor_url;
352  }
353  if (!empty($objMod->editor_url) && !preg_match('/dolibarr\.org/i', $objMod->editor_url)) {
354  $textexternal .= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_picto('', 'globe').' <a href="'.$editor_url.'" target="_blank" rel="noopener noreferrer external">'.$objMod->editor_url.'</a>';
355  }
356  $text .= $textexternal;
357  $text .= '<br>';
358  } else {
359  $text .= '<br><span class="opacitymedium">'.$langs->trans("Origin").':</span> '.$langs->trans("Core").'<br>';
360  }
361 
362  $moduledesclong = $objMod->getDescLong();
363  if ($moduledesclong) {
364  $text .= '<br><hr><div class="moduledesclong">'.$moduledesclong.'<div>';
365  }
366 }
367 
368 if ($mode == 'feature') {
369  $text .= '<br><strong>'.$langs->trans("DependsOn").':</strong> ';
370  if (count($objMod->depends)) {
371  $text .= join(',', $objMod->depends);
372  } else {
373  $text .= $langs->trans("None");
374  }
375  $text .= '<br><strong>'.$langs->trans("RequiredBy").':</strong> ';
376  if (count($objMod->requiredby)) {
377  $text .= join(',', $objMod->requiredby);
378  } else {
379  $text .= $langs->trans("None");
380  }
381 
382  $text .= '<br><br>';
383 
384  $text .= '<br><strong>'.$langs->trans("AddDataTables").':</strong> ';
385  $listofsqlfiles1 = dol_dir_list(DOL_DOCUMENT_ROOT.'/install/mysql/tables/', 'files', 0, 'llx.*-'.$moduledir.'\.sql', array('\.key\.sql', '\.sql\.back'));
386  $listofsqlfiles2 = dol_dir_list(dol_buildpath($moduledir.'/sql/'), 'files', 0, 'llx.*\.sql', array('\.key\.sql', '\.sql\.back'));
387  $sqlfiles = array_merge($listofsqlfiles1, $listofsqlfiles2);
388 
389  if (count($sqlfiles) > 0) {
390  $i = 0;
391  foreach ($sqlfiles as $val) {
392  $text .= ($i ? ', ' : '').preg_replace('/\-'.$moduledir.'$/', '', preg_replace('/\.sql$/', '', preg_replace('/llx_/', '', $val['name'])));
393  $i++;
394  }
395  } else {
396  $text .= $langs->trans("No");
397  }
398 
399  $text .= '<br>';
400 
401  $text .= '<br><strong>'.$langs->trans("AddDictionaries").':</strong> ';
402  if (isset($objMod->dictionaries) && isset($objMod->dictionaries['tablib']) && is_array($objMod->dictionaries['tablib']) && count($objMod->dictionaries['tablib'])) {
403  $i = 0;
404  foreach ($objMod->dictionaries['tablib'] as $val) {
405  $text .= ($i ? ', ' : '').$val;
406  $i++;
407  }
408  } else {
409  $text .= $langs->trans("No");
410  }
411 
412  $text .= '<br>';
413 
414  $text .= '<br><strong>'.$langs->trans("AddData").':</strong> ';
415  $filedata = dol_buildpath($moduledir.'/sql/data.sql');
416  if (dol_is_file($filedata)) {
417  $text .= $langs->trans("Yes").' <span class="opacitymedium">('.$moduledir.'/sql/data.sql)</span>';
418  } else {
419  $text .= $langs->trans("No");
420  }
421 
422  $text .= '<br>';
423 
424  $text .= '<br><strong>'.$langs->trans("AddRemoveTabs").':</strong> ';
425  if (isset($objMod->tabs) && is_array($objMod->tabs) && count($objMod->tabs)) {
426  $i = 0;
427  foreach ($objMod->tabs as $val) {
428  if (is_array($val)) {
429  $val = $val['data'];
430  }
431  if (is_string($val)) {
432  $tmp = explode(':', $val, 3);
433  $text .= ($i ? ', ' : '').$tmp[0].':'.$tmp[1];
434  $i++;
435  }
436  }
437  } else {
438  $text .= $langs->trans("No");
439  }
440 
441  $text .= '<br>';
442 
443  $text .= '<br><strong>'.$langs->trans("AddModels").':</strong> ';
444  if (isset($objMod->module_parts) && isset($objMod->module_parts['models']) && $objMod->module_parts['models']) {
445  $text .= $langs->trans("Yes");
446  } else {
447  $text .= $langs->trans("No");
448  }
449 
450  $text .= '<br>';
451 
452  $text .= '<br><strong>'.$langs->trans("AddSubstitutions").':</strong> ';
453  if (isset($objMod->module_parts) && isset($objMod->module_parts['substitutions']) && $objMod->module_parts['substitutions']) {
454  $text .= $langs->trans("Yes");
455  } else {
456  $text .= $langs->trans("No");
457  }
458 
459  $text .= '<br>';
460 
461  $text .= '<br><strong>'.$langs->trans("AddSheduledJobs").':</strong> ';
462  if (isset($objMod->cronjobs) && is_array($objMod->cronjobs) && count($objMod->cronjobs)) {
463  $i = 0;
464  foreach ($objMod->cronjobs as $val) {
465  $text .= ($i ? ', ' : '').($val['label']);
466  $i++;
467  }
468  } else {
469  $text .= $langs->trans("No");
470  }
471 
472  $text .= '<br>';
473 
474  $text .= '<br><strong>'.$langs->trans("AddTriggers").':</strong> ';
475  $moreinfoontriggerfile = '';
476  if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers']) {
477  $yesno = 'Yes';
478  } else {
479  $yesno = 'No';
480  }
481  require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php';
482  $interfaces = new Interfaces($db);
483  $triggers = $interfaces->getTriggersList(array((($objMod->isCoreOrExternalModule() == 'external') ? '/'.$moduledir : '').'/core/triggers'));
484  foreach ($triggers as $triggercursor) {
485  if ($triggercursor['module'] == $moduledir) {
486  $yesno = 'Yes';
487  $moreinfoontriggerfile = ' ('.$triggercursor['relpath'].')';
488  }
489  }
490 
491  $text .= $langs->trans($yesno).$moreinfoontriggerfile;
492 
493  $text .= '<br>';
494 
495  $text .= '<br><strong>'.$langs->trans("AddBoxes").':</strong> ';
496  if (isset($objMod->boxes) && is_array($objMod->boxes) && count($objMod->boxes)) {
497  $i = 0;
498  foreach ($objMod->boxes as $val) {
499  $text .= ($i ? ', ' : '').($val['file'] ? $val['file'] : $val[0]);
500  $i++;
501  }
502  } else {
503  $text .= $langs->trans("No");
504  }
505 
506  $text .= '<br>';
507 
508  $text .= '<br><strong>'.$langs->trans("AddHooks").':</strong> ';
509  if (isset($objMod->module_parts) && is_array($objMod->module_parts['hooks']) && count($objMod->module_parts['hooks'])) {
510  $i = 0;
511  foreach ($objMod->module_parts['hooks'] as $key => $val) {
512  if ($key === 'entity') {
513  continue;
514  }
515 
516  // For special values
517  if ($key === 'data') {
518  if (is_array($val)) {
519  foreach ($val as $value) {
520  $text .= ($i ? ', ' : '').($value);
521  $i++;
522  }
523 
524  continue;
525  }
526  }
527 
528  $text .= ($i ? ', ' : '').($val);
529  $i++;
530  }
531  } else {
532  $text .= $langs->trans("No");
533  }
534 
535  $text .= '<br>';
536 
537  $text .= '<br><strong>'.$langs->trans("AddPermissions").':</strong> ';
538  if (isset($objMod->rights) && is_array($objMod->rights) && count($objMod->rights)) {
539  $i = 0;
540  foreach ($objMod->rights as $val) {
541  $text .= ($i ? ', ' : '').($val[1]);
542  $i++;
543  }
544  } else {
545  $text .= $langs->trans("No");
546  }
547 
548  $text .= '<br>';
549 
550  $text .= '<br><strong>'.$langs->trans("AddMenus").':</strong> ';
551  if (isset($objMod->menu) && !empty($objMod->menu)) { // objMod can be an array or just an int 1
552  $text .= $langs->trans("Yes");
553  } else {
554  $text .= $langs->trans("No");
555  }
556 
557  $text .= '<br>';
558 
559  $text .= '<br><strong>'.$langs->trans("AddExportProfiles").':</strong> ';
560  if (isset($objMod->export_label) && is_array($objMod->export_label) && count($objMod->export_label)) {
561  $i = 0;
562  foreach ($objMod->export_label as $val) {
563  $text .= ($i ? ', ' : '').($val);
564  $i++;
565  }
566  } else {
567  $text .= $langs->trans("No");
568  }
569 
570  $text .= '<br>';
571 
572  $text .= '<br><strong>'.$langs->trans("AddImportProfiles").':</strong> ';
573  if (isset($objMod->import_label) && is_array($objMod->import_label) && count($objMod->import_label)) {
574  $i = 0;
575  foreach ($objMod->import_label as $val) {
576  $text .= ($i ? ', ' : '').($val);
577  $i++;
578  }
579  } else {
580  $text .= $langs->trans("No");
581  }
582 
583  $text .= '<br>';
584 
585  $text .= '<br><strong>'.$langs->trans("AddOtherPagesOrServices").':</strong> ';
586  $text .= $langs->trans("DetectionNotPossible");
587 }
588 
589 
590 if ($mode == 'changelog') {
591  $changelog = $objMod->getChangeLog();
592  if ($changelog) {
593  $text .= '<div class="moduledesclong">'.$changelog.'<div>';
594  } else {
595  $text .= '<div class="moduledesclong">'.$langs->trans("NotAvailable").'</div>';
596  }
597 }
598 
599 print $text;
600 
601 
602 print dol_get_fiche_end();
603 
604 print '</div>';
605 
606 // End of page
607 llxFooter();
608 $db->close();
dol_escape_htmltag
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields.
Definition: functions.lib.php:1454
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5190
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1062
img_warning
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
Definition: functions.lib.php:4507
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
Interfaces
Class to manage triggers.
Definition: interfaces.class.php:32
dol_dir_list
dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0)
Scan a directory and return a list of files/directories.
Definition: files.lib.php:60
dol_is_file
dol_is_file($pathoffile)
Return if path is a file.
Definition: files.lib.php:477
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:116
dol_print_date
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
Definition: functions.lib.php:2500
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3866
Exception
dol_syslog
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
Definition: functions.lib.php:1589
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1808
dol_strlen
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
Definition: functions.lib.php:3733
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2004
dolGetModulesDirs
dolGetModulesDirs($subdir='')
Return list of modules directories.
Definition: functions2.lib.php:80
User
Class to manage Dolibarr users.
Definition: user.class.php:44
modulehelp_prepare_head
modulehelp_prepare_head($object)
Prepare array with list of tabs.
Definition: admin.lib.php:847
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8122
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59