dolibarr 25.0.0-alpha
doc_generic_recruitmentjobposition_odt.modules.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
4 * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
5 * Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
6 * Copyright (C) 2018-2021 Philippe Grand <philippe.grand@atoo-net.com>
7 * Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
8 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 * or see https://www.gnu.org/
23 */
24
31require_once DOL_DOCUMENT_ROOT.'/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php';
32require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
33require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
34require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
35require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
36require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
37require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php';
38
39
44{
49 public $emetteur;
50
55 public $phpmin = array(7, 0);
56
60 public $version = 'dolibarr';
61
62
68 public function __construct($db)
69 {
70 global $conf, $langs, $mysoc;
71
72 // Load translation files required by the page
73 $langs->loadLangs(array("main", "companies"));
74
75 $this->db = $db;
76 $this->name = "ODT templates";
77 $this->description = $langs->trans("DocumentModelOdt");
78 $this->scandir = 'RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH'; // Name of constant that is used to save list of directories to scan
79
80 // Page size for A4 format
81 $this->type = 'odt';
82 $this->page_largeur = 0;
83 $this->page_hauteur = 0;
84 $this->format = array($this->page_largeur, $this->page_hauteur);
85 $this->marge_gauche = 0;
86 $this->marge_droite = 0;
87 $this->marge_haute = 0;
88 $this->marge_basse = 0;
89
90 $this->option_logo = 1; // Display logo
91 $this->option_tva = 0; // Manage the vat option COMMANDE_TVAOPTION
92 $this->option_modereg = 0; // Display payment mode
93 $this->option_condreg = 0; // Display payment terms
94 $this->option_multilang = 1; // Available in several languages
95 $this->option_escompte = 0; // Displays if there has been a discount
96 $this->option_credit_note = 0; // Support credit notes
97 $this->option_freetext = 1; // Support add of a personalised text
98 $this->option_draft_watermark = 0; // Support add of a watermark on drafts
99
100 if ($mysoc === null) {
101 dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR);
102 return;
103 }
104
105 // Get source company
106 $this->emetteur = $mysoc;
107 if (!$this->emetteur->country_code) {
108 $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined
109 }
110 }
111
112
119 public function info($langs)
120 {
121 global $conf, $langs;
122
123 // Load translation files required by the page
124 $langs->loadLangs(array("errors", "companies"));
125
126 $form = new Form($this->db);
127
128 $texte = $this->description.".<br>\n";
129 $texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/form-data">';
130 $texte .= '<input type="hidden" name="token" value="'.newToken().'">';
131 $texte .= '<input type="hidden" name="page_y" value="">';
132 $texte .= '<input type="hidden" name="action" value="setModuleOptions">';
133 $texte .= '<input type="hidden" name="param1" value="RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH">';
134 $texte .= '<table class="nobordernopadding centpercent">';
135
136 // List of directories area
137 $texte .= '<tr><td>';
138 $texttitle = $langs->trans("ListOfDirectories");
139 $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH'))));
140 $listoffiles = array();
141 foreach ($listofdir as $key => $tmpdir) {
142 $tmpdir = trim($tmpdir);
143 $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir);
144 if (!$tmpdir) {
145 unset($listofdir[$key]);
146 continue;
147 }
148 if (!is_dir($tmpdir)) {
149 $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), '');
150 } else {
151 $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.(ods|odt)');
152 if (count($tmpfiles)) {
153 $listoffiles = array_merge($listoffiles, $tmpfiles);
154 }
155 }
156 }
157 $texthelp = $langs->trans("ListOfDirectoriesForModelGenODT");
158 $texthelp .= '<br><br><span class="opacitymedium">'.$langs->trans("ExampleOfDirectoriesForModelGen").'</span>';
159 // Add list of substitution keys
160 $texthelp .= '<br>'.$langs->trans("FollowingSubstitutionKeysCanBeUsed").'<br>';
161 $texthelp .= $langs->transnoentitiesnoconv("FullListOnOnlineDocumentation"); // This contains an url, we don't modify it
162
163 // Scan directories
164 $nbofiles = count($listoffiles);
165 if (getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH')) {
166 $texte .= '<span class="opacitylow">'.$langs->trans("NumberOfModelFilesFound").': <b>';
167 //$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
168 $texte .= count($listoffiles);
169 //$texte.=$nbofiles?'</a>':'';
170 $texte .= '</b></span>';
171 }
172
173 if ($nbofiles) {
174 $texte .= '<div id="div_'.get_class($this).'" class="hidden opacitylow">';
175 foreach ($listoffiles as $file) {
176 $texte .= '- '.$file['name'];
177 //$texte .= ' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=recruitementjobposition/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
178 //$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
179 $texte .= '<br>';
180 }
181 $texte .= '</div>';
182 }
183
184 $texte .= '<br><br>';
185 // Link to show/hide the area to manage directories of ODT models and template files
186 $texte .= '<span class="classlink cursorpointer" onclick="javascript: jQuery(\'.div_odtmodelsof'.get_class($this).'\').toggle();">'.img_picto('', 'add').' '.$langs->trans("UploadNewTemplate").'...</span>';
187 $texte .= '<div class="div_odtmodelsof'.get_class($this).'" style="display: none; margin-top: 6px;">';
188 $texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1);
189 $texte .= '<div><div style="display: inline-block; min-width: 100px; vertical-align: middle;">';
190 $texte .= '<textarea class="flat textareafordir" spellcheck="false" cols="60" name="value1">';
191 $texte .= getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH');
192 $texte .= '</textarea>';
193 $texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
194 $texte .= '<input type="submit" class="button button-edit smallpaddingimp reposition" name="modify" value="'.$langs->trans("Modify").'">';
195 $texte .= '<br></div></div>';
196
197 // Add input to upload a new template file.
198 $texte .= '<div>';
199 $maxfilesizearray = getMaxFileSizeArray();
200 $maxmin = $maxfilesizearray['maxmin'];
201 if ($maxmin > 0) {
202 $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
203 }
204 $texte .= ' <input type="file" name="uploadfile">';
205 $texte .= '<input type="hidden" value="RECRUITMENT_RECRUITMENTJOBPOSITION_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
206 $texte .= '<input type="submit" class="button smallpaddingimp reposition" value="'.dol_escape_htmltag($langs->trans("Upload")).'" name="upload">';
207 $texte .= '</div>';
208 $texte .= '</div>';
209 $texte .= '</td>';
210
211 $texte .= '</tr>';
212
213 $texte .= '</table>';
214 $texte .= '</form>';
215
216 return $texte;
217 }
218
219 // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
231 public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
232 {
233 // phpcs:enable
234 global $user, $langs, $conf, $mysoc, $hookmanager;
235 global $action;
236
237 if (empty($srctemplatepath)) {
238 dol_syslog("doc_generic_odt::write_file parameter srctemplatepath empty", LOG_WARNING);
239 return -1;
240 }
241
242 // Add odtgeneration hook
243 if (!is_object($hookmanager)) {
244 include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
245 $hookmanager = new HookManager($this->db);
246 }
247 $hookmanager->initHooks(array('odtgeneration'));
248 global $action;
249
250 if (!is_object($outputlangs)) {
251 $outputlangs = $langs;
252 }
253 $sav_charset_output = $outputlangs->charset_output;
254 $outputlangs->charset_output = 'UTF-8';
255
256 $outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
257
258 $dir = getMultidirOutput($object);
259
260 if ($dir) {
261 // If $object is id instead of object
262 if (!is_object($object)) {
263 $id = $object;
264 $object = new RecruitmentJobPosition($this->db);
265 $result = $object->fetch($id);
266 if ($result < 0) {
267 dol_print_error($this->db, $object->error);
268 return -1;
269 }
270 }
271
272 $objectref = dol_sanitizeFileName((string) $object->ref);
273 if (!preg_match('/specimen/i', $objectref)) {
274 $dir .= "/".$objectref;
275 }
276 $file = $dir."/".$objectref.".odt";
277
278 if (!file_exists($dir)) {
279 if (dol_mkdir($dir) < 0) {
280 $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir);
281 return -1;
282 }
283 }
284
285 if (file_exists($dir)) {
286 //print "srctemplatepath=".$srctemplatepath; // Src filename
287 $newfile = basename($srctemplatepath);
288 $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile);
289 $newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
290 $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
291 $newfiletmp = $objectref.'_'.$newfiletmp;
292 //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
293 // Get extension (ods or odt)
294 $newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
295 if (getDolGlobalString('MAIN_DOC_USE_TIMING')) {
296 $format = getDolGlobalString('MAIN_DOC_USE_TIMING');
297 if ($format == '1') {
298 $format = '%Y%m%d%H%M%S';
299 }
300 $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
301 } else {
302 $filename = $newfiletmp.'.'.$newfileformat;
303 }
304 $file = $dir.'/'.$filename;
305 //print "newdir=".$dir;
306 //print "newfile=".$newfile;
307 //print "file=".$file;
308 //print "conf->societe->dir_temp=".$conf->societe->dir_temp;
309
310 dol_mkdir($conf->recruitment->dir_temp);
311 if (!is_writable($conf->recruitment->dir_temp)) {
312 $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->recruitment->dir_temp);
313 dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
314 return -1;
315 }
316
317 // If CUSTOMER contact defined on order, we use it
318 $usecontact = false;
319 $arrayidcontact = $object->getIdContact('external', 'CUSTOMER');
320 if (count($arrayidcontact) > 0) {
321 $usecontact = true;
322 $result = $object->fetch_contact($arrayidcontact[0]);
323 }
324
325 // Recipient name
326 $contactobject = null;
327 if (!empty($usecontact)) {
328 // We can use the company of contact instead of thirdparty company
329 if ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || getDolGlobalString('MAIN_USE_COMPANY_NAME_OF_CONTACT'))) {
330 $object->contact->fetch_thirdparty();
331 $socobject = $object->contact->thirdparty;
332 $contactobject = $object->contact;
333 } else {
334 $socobject = $object->thirdparty;
335 // if we have a CUSTOMER contact and we don't use it as thirdparty recipient we store the contact object for later use
336 $contactobject = $object->contact;
337 }
338 } else {
339 $socobject = $object->thirdparty;
340 }
341
342 // Make substitution
343 $substitutionarray = array(
344 '__FROM_NAME__' => $this->emetteur->name,
345 '__FROM_EMAIL__' => $this->emetteur->email,
346 '__TOTAL_TTC__' => $object->total_ttc,
347 '__TOTAL_HT__' => $object->total_ht,
348 '__TOTAL_VAT__' => $object->total_tva
349 );
350 complete_substitutions_array($substitutionarray, $langs, $object);
351 // Call the ODTSubstitution hook
352 $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$substitutionarray);
353 $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
354
355 // Line of free text
356 $newfreetext = '';
357 $paramfreetext = 'ORDER_FREE_TEXT';
358 if (getDolGlobalString($paramfreetext)) {
359 $newfreetext = make_substitutions(getDolGlobalString($paramfreetext), $substitutionarray);
360 }
361
362 // Open and load template
363 require_once ODTPHP_PATH.'odf.php';
364 try {
365 $odfHandler = new Odf(
366 $srctemplatepath,
367 array(
368 'PATH_TO_TMP' => $conf->recruitment->dir_temp,
369 'ZIP_PROXY' => getDolGlobalString('MAIN_ODF_ZIP_PROXY', 'PclZipProxy'), // PhpZipProxy or PclZipProxy. Got "bad compression method" error when using PhpZipProxy.
370 'DELIMITER_LEFT' => '{',
371 'DELIMITER_RIGHT' => '}'
372 )
373 );
374 } catch (Exception $e) {
375 $this->error = $e->getMessage();
376 dol_syslog($e->getMessage(), LOG_INFO);
377 return -1;
378 }
379 // After construction $odfHandler->contentXml contains content and
380 // [!-- BEGIN row.lines --]*[!-- END row.lines --] has been replaced by
381 // [!-- BEGIN lines --]*[!-- END lines --]
382 //print html_entity_decode($odfHandler->__toString());
383 //print exit;
384
385
386 // Make substitutions into odt of freetext
387 try {
388 $odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8');
389 } catch (OdfException $e) {
390 dol_syslog($e->getMessage(), LOG_INFO);
391 }
392
393 // Define substitution array
394 $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object);
395 $array_object_from_properties = $this->get_substitutionarray_each_var_object($object, $outputlangs);
396 $array_objet = $this->get_substitutionarray_object($object, $outputlangs);
397 $array_user = $this->get_substitutionarray_user($user, $outputlangs);
398 $array_soc = $this->get_substitutionarray_mysoc($mysoc, $outputlangs);
399 $array_thirdparty = $this->get_substitutionarray_thirdparty($socobject, $outputlangs);
400 $array_other = $this->get_substitutionarray_other($outputlangs);
401 // retrieve contact information for use in object as contact_xxx tags
402 $array_thirdparty_contact = array();
403 if ($usecontact && is_object($contactobject)) {
404 $array_thirdparty_contact = $this->get_substitutionarray_contact($contactobject, $outputlangs, 'contact');
405 }
406
407 $tmparray = array_merge($substitutionarray, $array_object_from_properties, $array_user, $array_soc, $array_thirdparty, $array_objet, $array_other, $array_thirdparty_contact);
408 complete_substitutions_array($tmparray, $outputlangs, $object);
409
410 // Call the ODTSubstitution hook
411 $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
412 $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
413
414 // retrieve the constant to apply a ratio for image size or set the ratio to 1
415 if (getDolGlobalString('MAIN_DOC_ODT_IMAGE_RATIO')) {
416 $ratio = (float) getDolGlobalString('MAIN_DOC_ODT_IMAGE_RATIO');
417 } else {
418 $ratio = 1;
419 }
420
421 foreach ($tmparray as $key => $value) {
422 try {
423 if (preg_match('/logo$/', $key)) {
424 // Image
425 if (file_exists($value)) {
426 $odfHandler->setImage($key, $value, $ratio);
427 } else {
428 $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
429 }
430 } else {
431 // Text
432 $odfHandler->setVars($key, $value, true, 'UTF-8');
433 }
434 } catch (OdfException $e) {
435 dol_syslog($e->getMessage(), LOG_INFO);
436 }
437 }
438 // Replace tags of lines
439 $foundtagforlines = 1;
440 try {
441 $listlines = $odfHandler->setSegment('lines');
442 } catch (OdfExceptionSegmentNotFound $e) {
443 // We may arrive here if tags for lines not present into template
444 $foundtagforlines = 0;
445 dol_syslog($e->getMessage(), LOG_INFO);
446 }
447 if ($foundtagforlines) {
448 $linenumber = 0;
449 foreach ($object->lines as $line) {
451 $linenumber++;
452 $tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
453 complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
454 // Call the ODTSubstitutionLine hook
455 $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray, 'line' => $line);
456 $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
457 foreach ($tmparray as $key => $val) {
458 try {
459 $listlines->setVars($key, $val, true, 'UTF-8');
460 } catch (SegmentException $e) {
461 dol_syslog($e->getMessage(), LOG_INFO);
462 }
463 }
464 $listlines->merge();
465 }
466 try {
467 $odfHandler->mergeSegment($listlines);
468 } catch (OdfException $e) {
469 $this->error = $e->getMessage();
470 dol_syslog($this->error, LOG_WARNING);
471 return -1;
472 }
473 }
474
475 // Replace labels translated
476 $tmparray = $outputlangs->get_translations_for_substitutions();
477 foreach ($tmparray as $key => $value) {
478 try {
479 $odfHandler->setVars($key, $value, true, 'UTF-8');
480 } catch (OdfException $e) {
481 dol_syslog($e->getMessage(), LOG_INFO);
482 }
483 }
484
485 // Call the beforeODTSave hook
486
487 $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
488 $reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
489
490 // Write new file
491 if (getDolGlobalString('MAIN_ODT_AS_PDF')) {
492 try {
493 $odfHandler->exportAsAttachedPDF($file);
494 } catch (Exception $e) {
495 $this->error = $e->getMessage();
496 dol_syslog($e->getMessage(), LOG_INFO);
497 return -1;
498 }
499 } else {
500 try {
501 $odfHandler->saveToDisk($file);
502 } catch (Exception $e) {
503 $this->error = $e->getMessage();
504 dol_syslog($e->getMessage(), LOG_INFO);
505 return -1;
506 }
507 }
508
509 $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray);
510 $reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
511
512 dolChmod($file);
513
514 $odfHandler = null; // Destroy object
515
516 $this->result = array('fullpath' => $file);
517
518 return 1; // Success
519 } else {
520 $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir);
521 return -1;
522 }
523 }
524
525 return -1;
526 }
527}
$propal type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
Definition propal.php:281
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
Class to manage generation of HTML components Only common components must be here.
write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
Function to build a document on disk using the generic odt module.
Class to build documents using ODF templates generator.
global $mysoc
print $script_file $mode $langs defaultlang(is_numeric($duration_value) ? " delay=". $duration_value :"").(is_numeric($duration_value2) ? " after cd cd cd description as description
Only used if Module[ID]Desc translation string is not found.
dol_dir_list($utf8_path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0, $nbsecondsold=0)
Scan a directory and return a list of files/directories.
Definition files.lib.php:66
getCallerInfoString()
Get caller info as a string that can be appended to a log message.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
conf($dolibarr_main_document_root, $realpathconf=null)
Load conf file (file must exists)
Definition inc.php:431
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:165
multi select button
0 = Do not include form tag and submit button -1 = Do not include form tag but include submit button