dolibarr 18.0.6
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 = ''; $classname = ''; $filefound = 0;
85 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
86 foreach ($dirmodels as $reldir) {
87 $file = dol_buildpath($reldir."core/modules/expensereport/doc/pdf_".$modele.".modules.php", 0);
88 if (file_exists($file)) {
89 $filefound = 1;
90 $classname = "pdf_".$modele;
91 break;
92 }
93 }
94
95 if ($filefound) {
96 require_once $file;
97
98 $module = new $classname($db);
99
100 if ($module->write_file($expensespecimen, $langs) > 0) {
101 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=expensereport&file=SPECIMEN.pdf");
102 return;
103 } else {
104 setEventMessages($module->error, $module->errors, 'errors');
105 dol_syslog($module->error, LOG_ERR);
106 }
107 } else {
108 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
109 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
110 }
111} elseif ($action == 'set') {
112 // Activate a model
113 $ret = addDocumentModel($value, $type, $label, $scandir);
114 if ($ret > 0 && empty($conf->global->EXPENSEREPORT_ADDON_PDF)) {
115 dolibarr_set_const($db, 'EXPENSEREPORT_ADDON_PDF', $value, 'chaine', 0, '', $conf->entity);
116 }
117} elseif ($action == 'del') {
118 $ret = delDocumentModel($value, $type);
119 if ($ret > 0) {
120 if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$value") {
121 dolibarr_del_const($db, 'EXPENSEREPORT_ADDON_PDF', $conf->entity);
122 }
123 }
124} elseif ($action == 'setdoc') {
125 // Set default model
126 if (dolibarr_set_const($db, "EXPENSEREPORT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
127 // La constante qui a ete lue en avant du nouveau set
128 // on passe donc par une variable pour avoir un affichage coherent
129 $conf->global->EXPENSEREPORT_ADDON_PDF = $value;
130 }
131
132 // On active le modele
133 $ret = delDocumentModel($value, $type);
134 if ($ret > 0) {
135 $ret = addDocumentModel($value, $type, $label, $scandir);
136 }
137} elseif ($action == 'setmod') {
138 // TODO Verifier si module numerotation choisi peut etre active
139 // par appel methode canBeActivated
140
141 dolibarr_set_const($db, "EXPENSEREPORT_ADDON", $value, 'chaine', 0, '', $conf->entity);
142} elseif ($action == 'setoptions') {
143 $db->begin();
144
145 $freetext = GETPOST('EXPENSEREPORT_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
146 $res1 = dolibarr_set_const($db, "EXPENSEREPORT_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
147
148 $draft = GETPOST('EXPENSEREPORT_DRAFT_WATERMARK', 'alpha');
149 $res2 = dolibarr_set_const($db, "EXPENSEREPORT_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
150
151 $res3 = 0;
152 if (isModEnabled('project') && GETPOSTISSET('EXPENSEREPORT_PROJECT_IS_REQUIRED')) { // Option may not be provided
153 $res3 = dolibarr_set_const($db, 'EXPENSEREPORT_PROJECT_IS_REQUIRED', GETPOST('EXPENSEREPORT_PROJECT_IS_REQUIRED', 'int'), 'chaine', 0, '', $conf->entity);
154 }
155
156 $dates = GETPOST('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', 'int');
157 $res4 = dolibarr_set_const($db, 'EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', intval($dates), 'chaine', 0, '', $conf->entity);
158
159 $amounts = GETPOST('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', 'int');
160 $res5 = dolibarr_set_const($db, 'EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', intval($amounts), 'chaine', 0, '', $conf->entity);
161
162 if (!($res1 > 0) || !($res2 > 0) || !($res3 >= 0) || !($res4 >0) || !($res5 >0)) {
163 $error++;
164 }
165
166 if (!$error) {
167 $db->commit();
168 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
169 } else {
170 $db->rollback();
171 setEventMessages($langs->trans("Error"), null, 'errors');
172 }
173}
174
175
176/*
177 * View
178 */
179
180$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
181
182llxHeader('', $langs->trans("ExpenseReportsSetup"));
183
184$form = new Form($db);
185
186$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
187print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup');
188
189
191
192print dol_get_fiche_head($head, 'expensereport', $langs->trans("ExpenseReports"), -1, 'trip');
193
194/*
195 * Expense report numbering model
196 */
197
198print load_fiche_titre($langs->trans("ExpenseReportNumberingModules"), '', '');
199
200print '<table class="noborder centpercent">';
201print '<tr class="liste_titre">';
202print '<td>'.$langs->trans("Name").'</td>';
203print '<td>'.$langs->trans("Description").'</td>';
204print '<td class="nowrap">'.$langs->trans("Example").'</td>';
205print '<td class="center" width="60">'.$langs->trans("Status").'</td>';
206print '<td class="center" width="16">'.$langs->trans("ShortInfo").'</td>';
207print '</tr>'."\n";
208
209clearstatcache();
210
211foreach ($dirmodels as $reldir) {
212 $dir = dol_buildpath($reldir."core/modules/expensereport/");
213
214 if (is_dir($dir)) {
215 $handle = opendir($dir);
216 if (is_resource($handle)) {
217 while (($file = readdir($handle)) !== false) {
218 if (substr($file, 0, 18) == 'mod_expensereport_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
219 $file = substr($file, 0, dol_strlen($file) - 4);
220
221 require_once $dir.$file.'.php';
222
223 $module = new $file($db);
224
225 // Show modules according to features level
226 if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
227 continue;
228 }
229 if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
230 continue;
231 }
232
233 if ($module->isEnabled()) {
234 print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
235 print $module->info();
236 print '</td>';
237
238 // Show example of numbering model
239 print '<td class="nowrap">';
240 $tmp = $module->getExample();
241 if (preg_match('/^Error/', $tmp)) {
242 $langs->load("errors");
243 print '<div class="error">'.$langs->trans($tmp).'</div>';
244 } elseif ($tmp == 'NotConfigured') {
245 print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
246 } else {
247 print $tmp;
248 }
249 print '</td>'."\n";
250
251 print '<td class="center">';
252 if ($conf->global->EXPENSEREPORT_ADDON == $file) {
253 print img_picto($langs->trans("Activated"), 'switch_on');
254 } else {
255 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
256 print img_picto($langs->trans("Disabled"), 'switch_off');
257 print '</a>';
258 }
259 print '</td>';
260
261 $exp = new ExpenseReport($db);
262 $exp->initAsSpecimen();
263
264 // Info
265 $htmltooltip = '';
266 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
267 $nextval = $module->getNextValue($exp);
268 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
269 $htmltooltip .= ''.$langs->trans("NextValue").': ';
270 if ($nextval) {
271 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
272 $nextval = $langs->trans($nextval);
273 }
274 $htmltooltip .= $nextval.'<br>';
275 } else {
276 $htmltooltip .= $langs->trans($module->error).'<br>';
277 }
278 }
279
280 print '<td class="center">';
281 print $form->textwithpicto('', $htmltooltip, 1, 0);
282 print '</td>';
283
284 print "</tr>\n";
285 }
286 }
287 }
288 closedir($handle);
289 }
290 }
291}
292print "</table><br>\n";
293
294/*
295 * Documents models for ExpenseReport
296 */
297
298print load_fiche_titre($langs->trans("TemplatePDFExpenseReports"), '', '');
299
300// Defini tableau def des modeles
301$type = 'expensereport';
302$def = array();
303$sql = "SELECT nom";
304$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
305$sql .= " WHERE type = '".$db->escape($type)."'";
306$sql .= " AND entity = ".$conf->entity;
307$resql = $db->query($sql);
308if ($resql) {
309 $i = 0;
310 $num_rows = $db->num_rows($resql);
311 while ($i < $num_rows) {
312 $array = $db->fetch_array($resql);
313 array_push($def, $array[0]);
314 $i++;
315 }
316} else {
317 dol_print_error($db);
318}
319
320print '<table class="noborder centpercent">';
321print '<tr class="liste_titre">';
322print '<td>'.$langs->trans("Name").'</td>';
323print '<td>'.$langs->trans("Description").'</td>';
324print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n";
325print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
326print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
327print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
328print "</tr>\n";
329
330clearstatcache();
331
332foreach ($dirmodels as $reldir) {
333 $dir = dol_buildpath($reldir."core/modules/expensereport/doc");
334
335 if (is_dir($dir)) {
336 $handle = opendir($dir);
337 if (is_resource($handle)) {
338 while (($file = readdir($handle)) !== false) {
339 $filelist[] = $file;
340 }
341 closedir($handle);
342 arsort($filelist);
343
344 foreach ($filelist as $file) {
345 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
346 if (file_exists($dir.'/'.$file)) {
347 $name = substr($file, 4, dol_strlen($file) - 16);
348 $classname = substr($file, 0, dol_strlen($file) - 12);
349
350 require_once $dir.'/'.$file;
351 $module = new $classname($db);
352
353 $modulequalified = 1;
354 if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
355 $modulequalified = 0;
356 }
357 if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
358 $modulequalified = 0;
359 }
360
361 if ($modulequalified) {
362 print '<tr class="oddeven"><td width="100">';
363 print (empty($module->name) ? $name : $module->name);
364 print "</td><td>\n";
365 if (method_exists($module, 'info')) {
366 print $module->info($langs);
367 } else {
368 print $module->description;
369 }
370 print '</td>';
371
372 // Active
373 if (in_array($name, $def)) {
374 print '<td class="center">'."\n";
375 print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">';
376 print img_picto($langs->trans("Enabled"), 'switch_on');
377 print '</a>';
378 print "</td>";
379 } else {
380 print '<td class="center">'."\n";
381 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>';
382 print "</td>";
383 }
384
385 // Default
386 print '<td class="center">';
387 if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name") {
388 print img_picto($langs->trans("Default"), 'on');
389 } else {
390 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>';
391 }
392 print '</td>';
393
394 // Info
395 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
396 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
397 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
398 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
399 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
400 $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
401 $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
402 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
403 $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
404 print '<td class="center">';
405 print $form->textwithpicto('', $htmltooltip, -1, 0);
406 print '</td>';
407
408 // Preview
409 print '<td class="center">';
410 if ($module->type == 'pdf') {
411 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
412 } else {
413 print img_object($langs->trans("PreviewNotAvailable"), 'generic');
414 }
415 print '</td>';
416
417 print '</tr>';
418 }
419 }
420 }
421 }
422 }
423 }
424}
425
426print '</table>';
427
428
429print '<br>';
430
431
432
433/*
434 * Other options
435 */
436
437print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
438print '<input type="hidden" name="token" value="'.newToken().'">';
439print '<input type="hidden" name="action" value="setoptions">';
440
441print load_fiche_titre($langs->trans("OtherOptions"), '', '');
442print '<table class="noborder centpercent">';
443print '<tr class="liste_titre">';
444print '<td>'.$langs->trans("Parameter").'</td>';
445print '<td class="center" width="60"></td>';
446print "</tr>\n";
447
448$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
449$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
450$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
451foreach ($substitutionarray as $key => $val) {
452 $htmltext .= $key.'<br>';
453}
454$htmltext .= '</i>';
455
456print '<tr class="oddeven"><td colspan="2">';
457print $form->textwithpicto($langs->trans("FreeLegalTextOnExpenseReports"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
458$variablename = 'EXPENSEREPORT_FREE_TEXT';
459if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
460 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
461} else {
462 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
463 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
464 print $doleditor->Create();
465}
466print '</td></tr>'."\n";
467
468// Use draft Watermark
469
470print '<tr class="oddeven"><td colspan="2">';
471print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
472print '<input class="flat minwidth200" type="text" name="EXPENSEREPORT_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('EXPENSEREPORT_DRAFT_WATERMARK')).'">';
473print '</td></tr>'."\n";
474
475if (isModEnabled('project')) {
476 print '<tr class="oddeven"><td>';
477 print $langs->trans('ProjectIsRequiredOnExpenseReports');
478 print '</td><td class="right">';
479 print $form->selectyesno('EXPENSEREPORT_PROJECT_IS_REQUIRED', empty($conf->global->EXPENSEREPORT_PROJECT_IS_REQUIRED) ? 0 : 1, 1);
480 print '</td></tr>';
481}
482
483print '<tr class="oddeven"><td>';
484print $langs->trans('PrefillExpenseReportDatesWithCurrentMonth');
485print '</td><td class="right">';
486print $form->selectyesno('EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH', empty($conf->global->EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH) ? 0 : 1, 1);
487print '</td></tr>';
488
489print '<tr class="oddeven"><td>';
490print $langs->trans('ForceExpenseReportsLineAmountsIncludingTaxesOnly');
491print '</td><td class="right">';
492print $form->selectyesno('EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY', empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY) ? 0 : 1, 1);
493print '</td></tr>';
494
495print '</table>';
496
497print $form->buttonsSaveCancel("Save", '');
498
499print '</form>';
500
501print dol_get_fiche_end();
502
503// End of page
504llxFooter();
505$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:56
llxFooter()
Empty footer.
Definition wrapper.php:70
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.
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:758
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:123
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.