dolibarr 19.0.4
expensereport.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
5 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
6 * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
7 * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
8 * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
9 * Copyright (C) 2011-2022 Philippe Grand <philippe.grand@atoo-net.com>
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 */
24
31// Load Dolibarr environment
32require '../main.inc.php';
33require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
34require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
35require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
36require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
37
38// Load translation files required by the page
39$langs->loadLangs(array('admin', 'errors', 'trips', 'other'));
40
41if (!$user->admin) {
43}
44
45$action = GETPOST('action', 'aZ09');
46$value = GETPOST('value', 'alpha');
47$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
48
49$label = GETPOST('label', 'alpha');
50$scandir = GETPOST('scan_dir', 'alpha');
51$type = 'expensereport';
52
53
54/*
55 * Actions
56 */
57
58include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
59
60if ($action == 'updateMask') {
61 $maskconst = GETPOST('maskconst', 'aZ09');
62 $maskvalue = GETPOST('maskvalue', 'alpha');
63 if ($maskconst && preg_match('/_MASK$/', $maskconst)) {
64 $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
65 }
66
67 if (!($res > 0)) {
68 $error++;
69 }
70
71 if (!$error) {
72 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
73 } else {
74 setEventMessages($langs->trans("Error"), null, 'errors');
75 }
76} elseif ($action == 'specimen') { // For fiche expensereport
77 $modele = GETPOST('module', 'alpha');
78
79 $expensespecimen = new ExpenseReport($db);
80 $expensespecimen->initAsSpecimen();
81 $expensespecimen->status = 0; // Force statut draft to show watermark
82
83 // Search template files
84 $file = '';
85 $classname = '';
86 $filefound = 0;
87 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
88 foreach ($dirmodels as $reldir) {
89 $file = dol_buildpath($reldir."core/modules/expensereport/doc/pdf_".$modele.".modules.php", 0);
90 if (file_exists($file)) {
91 $filefound = 1;
92 $classname = "pdf_".$modele;
93 break;
94 }
95 }
96
97 if ($filefound) {
98 require_once $file;
99
100 $module = new $classname($db);
101
102 if ($module->write_file($expensespecimen, $langs) > 0) {
103 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=expensereport&file=SPECIMEN.pdf");
104 return;
105 } else {
106 setEventMessages($module->error, $module->errors, 'errors');
107 dol_syslog($module->error, LOG_ERR);
108 }
109 } else {
110 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
111 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
112 }
113} elseif ($action == 'set') {
114 // Activate a model
115 $ret = addDocumentModel($value, $type, $label, $scandir);
116 if ($ret > 0 && !getDolGlobalString('EXPENSEREPORT_ADDON_PDF')) {
117 dolibarr_set_const($db, 'EXPENSEREPORT_ADDON_PDF', $value, 'chaine', 0, '', $conf->entity);
118 }
119} elseif ($action == 'del') {
120 $ret = delDocumentModel($value, $type);
121 if ($ret > 0) {
122 if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$value") {
123 dolibarr_del_const($db, 'EXPENSEREPORT_ADDON_PDF', $conf->entity);
124 }
125 }
126} elseif ($action == 'setdoc') {
127 // Set default model
128 if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
129 // La constante qui a ete lue en avant du nouveau set
130 // on passe donc par une variable pour avoir un affichage coherent
131 $conf->global->EXPENSEREPORT_ADDON_PDF = $value;
132 }
133
134 // On active le modele
135 $ret = delDocumentModel($value, $type);
136 if ($ret > 0) {
137 $ret = addDocumentModel($value, $type, $label, $scandir);
138 }
139} elseif ($action == 'setmod') {
140 // TODO Verifier si module numerotation choisi peut etre active
141 // par appel methode canBeActivated
142
143 dolibarr_set_const($db, "EXPENSEREPORT_ADDON", $value, 'chaine', 0, '', $conf->entity);
144} elseif ($action == 'setoptions') {
145 $db->begin();
146
147 $freetext = GETPOST('EXPENSEREPORT_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
148 $res1 = dolibarr_set_const($db, "EXPENSEREPORT_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
149
150 $draft = GETPOST('EXPENSEREPORT_DRAFT_WATERMARK', 'alpha');
151 $res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
152
153 $res3 = 0;
154 if (isModEnabled('project') && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided
155 $res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity);
156 }
157
158 $dates = GETPOST('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', 'int');
159 $res4 = dolibarr_set_const($db, 'EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', intval($dates), 'chaine', 0, '', $conf->entity);
160
161 $amounts = GETPOST('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', 'int');
162 $res5 = dolibarr_set_const($db, 'EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', intval($amounts), 'chaine', 0, '', $conf->entity);
163
164 if (!($res1 > 0) || !($res2 > 0) || !($res3 >= 0) || !($res4 >0) || !($res5 >0)) {
165 $error++;
166 }
167
168 if (!$error) {
169 $db->commit();
170 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
171 } else {
172 $db->rollback();
173 setEventMessages($langs->trans("Error"), null, 'errors');
174 }
175}
176
177
178/*
179 * View
180 */
181
182$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
183
184llxHeader('', $langs->trans("ExpenseReportsSetup"));
185
186$form = new Form($db);
187
188$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
189print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup');
190
191
193
194print dol_get_fiche_head($head, 'expensereport', $langs->trans("ExpenseReports"), -1, 'trip');
195
196/*
197 * Expense report numbering model
198 */
199
200print load_fiche_titre($langs->trans("ExpenseReportNumberingModules"), '', '');
201
202print '<table class="noborder centpercent">';
203print '<tr class="liste_titre">';
204print '<td>'.$langs->trans("Name").'</td>';
205print '<td>'.$langs->trans("Description").'</td>';
206print '<td class="nowrap">'.$langs->trans("Example").'</td>';
207print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
208print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
209print '</tr>'."\n";
210
211clearstatcache();
212
213foreach ($dirmodels as $reldir) {
214 $dir = dol_buildpath($reldir."core/modules/expensereport/");
215
216 if (is_dir($dir)) {
217 $handle = opendir($dir);
218 if (is_resource($handle)) {
219 while (($file = readdir($handle)) !== false) {
220 if (substr($file, 0, 18) == 'mod_expensereport_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
221 $file = substr($file, 0, dol_strlen($file) - 4);
222
223 require_once $dir.$file.'.php';
224
225 $module = new $file($db);
226
227 // Show modules according to features level
228 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
229 continue;
230 }
231 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
232 continue;
233 }
234
235 if ($module->isEnabled()) {
236 print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
237 print $module->info($langs);
238 print '</td>';
239
240 // Show example of numbering model
241 print '<td class="nowrap">';
242 $tmp = $module->getExample();
243 if (preg_match('/^Error/', $tmp)) {
244 $langs->load("errors");
245 print '<div class="error">'.$langs->trans($tmp).'</div>';
246 } elseif ($tmp == 'NotConfigured') {
247 print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
248 } else {
249 print $tmp;
250 }
251 print '</td>'."\n";
252
253 print '<td class="center">';
254 if ($conf->global->EXPENSEREPORT_ADDON == $file) {
255 print img_picto($langs->trans("Activated"), 'switch_on');
256 } else {
257 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
258 print img_picto($langs->trans("Disabled"), 'switch_off');
259 print '</a>';
260 }
261 print '</td>';
262
263 $exp = new ExpenseReport($db);
264 $exp->initAsSpecimen();
265
266 // Info
267 $htmltooltip = '';
268 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
269 $nextval = $module->getNextValue($exp);
270 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
271 $htmltooltip .= ''.$langs->trans("NextValue").': ';
272 if ($nextval) {
273 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
274 $nextval = $langs->trans($nextval);
275 }
276 $htmltooltip .= $nextval.'<br>';
277 } else {
278 $htmltooltip .= $langs->trans($module->error).'<br>';
279 }
280 }
281
282 print '<td class="center">';
283 print $form->textwithpicto('', $htmltooltip, 1, 0);
284 print '</td>';
285
286 print "</tr>\n";
287 }
288 }
289 }
290 closedir($handle);
291 }
292 }
293}
294print "</table><br>\n";
295
296/*
297 * Documents models for ExpenseReport
298 */
299
300print load_fiche_titre($langs->trans("TemplatePDFExpenseReports"), '', '');
301
302// Defini tableau def des modeles
303$type = 'expensereport';
304$def = array();
305$sql = "SELECT nom";
306$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
307$sql .= " WHERE type = '".$db->escape($type)."'";
308$sql .= " AND entity = ".$conf->entity;
309$resql = $db->query($sql);
310if ($resql) {
311 $i = 0;
312 $num_rows = $db->num_rows($resql);
313 while ($i < $num_rows) {
314 $array = $db->fetch_array($resql);
315 array_push($def, $array[0]);
316 $i++;
317 }
318} else {
319 dol_print_error($db);
320}
321
322print '<table class="noborder centpercent">';
323print '<tr class="liste_titre">';
324print '<td>'.$langs->trans("Name").'</td>';
325print '<td>'.$langs->trans("Description").'</td>';
326print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
327print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
328print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
329print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
330print "</tr>\n";
331
332clearstatcache();
333
334foreach ($dirmodels as $reldir) {
335 $dir = dol_buildpath($reldir."core/modules/expensereport/doc");
336
337 if (is_dir($dir)) {
338 $handle = opendir($dir);
339 if (is_resource($handle)) {
340 while (($file = readdir($handle)) !== false) {
341 $filelist[] = $file;
342 }
343 closedir($handle);
344 arsort($filelist);
345
346 foreach ($filelist as $file) {
347 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
348 if (file_exists($dir.'/'.$file)) {
349 $name = substr($file, 4, dol_strlen($file) - 16);
350 $classname = substr($file, 0, dol_strlen($file) - 12);
351
352 require_once $dir.'/'.$file;
353 $module = new $classname($db);
354
355 $modulequalified = 1;
356 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
357 $modulequalified = 0;
358 }
359 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
360 $modulequalified = 0;
361 }
362
363 if ($modulequalified) {
364 print '<tr class="oddeven"><td width="100">';
365 print(empty($module->name) ? $name : $module->name);
366 print "</td><td>\n";
367 if (method_exists($module, 'info')) {
368 print $module->info($langs);
369 } else {
370 print $module->description;
371 }
372 print '</td>';
373
374 // Active
375 if (in_array($name, $def)) {
376 print '<td class="center">'."\n";
377 print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">';
378 print img_picto($langs->trans("Enabled"), 'switch_on');
379 print '</a>';
380 print "</td>";
381 } else {
382 print '<td class="center">'."\n";
383 print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
384 print "</td>";
385 }
386
387 // Default
388 print '<td class="center">';
389 if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name") {
390 print img_picto($langs->trans("Default"), 'on');
391 } else {
392 print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
393 }
394 print '</td>';
395
396 // Info
397 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
398 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
399 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
400 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
401 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
402 $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
403 $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
404 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
405 $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
406 print '<td class="center">';
407 print $form->textwithpicto('', $htmltooltip, -1, 0);
408 print '</td>';
409
410 // Preview
411 print '<td class="center">';
412 if ($module->type == 'pdf') {
413 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
414 } else {
415 print img_object($langs->trans("PreviewNotAvailable"), 'generic');
416 }
417 print '</td>';
418
419 print '</tr>';
420 }
421 }
422 }
423 }
424 }
425 }
426}
427
428print '</table>';
429
430
431print '<br>';
432
433
434
435/*
436 * Other options
437 */
438
439print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
440print '<input type="hidden" name="token" value="'.newToken().'">';
441print '<input type="hidden" name="action" value="setoptions">';
442
443print load_fiche_titre($langs->trans("OtherOptions"), '', '');
444print '<table class="noborder centpercent">';
445print '<tr class="liste_titre">';
446print '<td>'.$langs->trans("Parameter").'</td>';
447print '<td class="center" width="60"></td>';
448print "</tr>\n";
449
450$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
451$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
452$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
453foreach ($substitutionarray as $key => $val) {
454 $htmltext .= $key.'<br>';
455}
456$htmltext .= '</i>';
457
458print '<tr class="oddeven"><td colspan="2">';
459print $form->textwithpicto($langs->trans("FreeLegalTextOnExpenseReports"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
460$variablename = 'EXPENSEREPORT_FREE_TEXT';
461if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
462 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
463} else {
464 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
465 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
466 print $doleditor->Create();
467}
468print '</td></tr>'."\n";
469
470// Use draft Watermark
471
472print '<tr class="oddeven"><td colspan="2">';
473print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
474print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('EXPENSEREPORT_DRAFT_WATERMARK')).'">';
475print '</td></tr>'."\n";
476
477if (isModEnabled('project')) {
478 print '<tr class="oddeven"><td>';
479 print $langs->trans('ProjectIsRequiredOnExpenseReports');
480 print '</td><td class="right">';
481 print $form->selectyesno('EXPENSEREPORT_PROJECT_IS_REQUIRED', !getDolGlobalString('EXPENSEREPORT_PROJECT_IS_REQUIRED') ? 0 : 1, 1);
482 print '</td></tr>';
483}
484
485print '<tr class="oddeven"><td>';
486print $langs->trans('PrefillExpenseReportDatesWithCurrentMonth');
487print '</td><td class="right">';
488print $form->selectyesno('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', !getDolGlobalString('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH') ? 0 : 1, 1);
489print '</td></tr>';
490
491print '<tr class="oddeven"><td>';
492print $langs->trans('ForceExpenseReportsLineAmountsIncludingTaxesOnly');
493print '</td><td class="right">';
494print $form->selectyesno('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', !getDolGlobalString('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY') ? 0 : 1, 1);
495print '</td></tr>';
496
497print '</table>';
498
499print $form->buttonsSaveCancel("Save", '');
500
501print '</form>';
502
503print dol_get_fiche_end();
504
505// End of page
506llxFooter();
507$db->close();
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
Class to manage a WYSIWYG editor.
Class to manage Trips and Expenses.
Class to manage generation of HTML components Only common components must be here.
expensereport_admin_prepare_head()
Return array head with list of tabs to view object informations.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0, $include=null)
Return array of possible substitutions for PDF content (without external module substitutions).
Definition pdf.lib.php:762
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:124
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.