28require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
38 public $module =
'workstation';
43 public $element =
'workstation';
48 public $table_element =
'workstation_workstation';
54 public $ismultientitymanaged = 1;
59 public $isextrafieldmanaged = 0;
64 public $picto =
'workstation';
67 const STATUS_DISABLED = 0;
68 const STATUS_ENABLED = 1;
101 public $fields = array(
102 'rowid' => array(
'type' =>
'integer',
'label' =>
'TechnicalID',
'enabled' => 1,
'position' => 1,
'notnull' => 1,
'visible' => 0,
'noteditable' => 1,
'index' => 1,
'css' =>
'left',
'comment' =>
"Id"),
103 'entity' => array(
'type' =>
'integer',
'label' =>
'Entity',
'enabled' => 1,
'visible' => 0,
'position' => 5,
'notnull' => 1,
'default' =>
'1',
'index' => 1),
104 'ref' => array(
'type' =>
'varchar(128)',
'label' =>
'Ref',
'enabled' => 1,
'position' => 10,
'notnull' => 1,
'visible' => 1,
'noteditable' => 0,
'default' =>
'',
'index' => 1,
'searchall' => 1,
'showoncombobox' => 1,
'comment' =>
"Reference of object",
'csslist' =>
'nowraponall'),
105 'label' => array(
'type' =>
'varchar(255)',
'label' =>
'Label',
'enabled' => 1,
'position' => 30,
'notnull' => 1,
'visible' => 1,
'searchall' => 1,
'css' =>
'minwidth300',
'csslist' =>
'tdoverflowmax125',
'showoncombobox' =>
'2',),
106 'type' => array(
'type' =>
'varchar(8)',
'label' =>
'Type',
'enabled' => 1,
'position' => 32,
'default' =>
'1',
'notnull' => 1,
'visible' => 1,
'arrayofkeyval' => array(
'HUMAN' =>
'Human',
'MACHINE' =>
'Machine',
'BOTH' =>
'HumanMachine'),),
107 'note_public' => array(
'type' =>
'html',
'label' =>
'NotePublic',
'enabled' => 1,
'position' => 61,
'notnull' => 0,
'visible' => 0,),
108 'note_private' => array(
'type' =>
'html',
'label' =>
'NotePrivate',
'enabled' => 1,
'position' => 62,
'notnull' => 0,
'visible' => 0,),
109 'date_creation' => array(
'type' =>
'datetime',
'label' =>
'DateCreation',
'enabled' => 1,
'position' => 500,
'notnull' => 1,
'visible' => -2,
'csslist' =>
'nowraponall'),
110 'tms' => array(
'type' =>
'timestamp',
'label' =>
'DateModification',
'enabled' => 1,
'position' => 501,
'notnull' => 0,
'visible' => -2,
'csslist' =>
'nowraponall'),
111 'fk_user_creat' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserAuthor',
'enabled' => 1,
'position' => 510,
'notnull' => 1,
'visible' => -2,
'foreignkey' =>
'user.rowid',),
112 'fk_user_modif' => array(
'type' =>
'integer:User:user/class/user.class.php',
'label' =>
'UserModif',
'enabled' => 1,
'position' => 511,
'notnull' => -1,
'visible' => -2,),
113 'import_key' => array(
'type' =>
'varchar(14)',
'label' =>
'ImportId',
'enabled' => 1,
'position' => 512,
'notnull' => -1,
'visible' => -2,),
114 'nb_operators_required' => array(
'type' =>
'integer',
'label' =>
'NbOperatorsRequired',
'enabled' => 1,
'position' => 50,
'notnull' => 0,
'visible' => 1,
'css' =>
'right',
'csslist' =>
'maxwidth75imp'),
115 'thm_operator_estimated' => array(
'type' =>
'double',
'help' =>
'THMOperatorEstimatedHelp',
'label' =>
'THMOperatorEstimated',
'enabled' => 1,
'position' => 50,
'notnull' => 0,
'visible' => 1,
'css' =>
'right',
'csslist' =>
'maxwidth75imp'),
116 'thm_machine_estimated' => array(
'type' =>
'double',
'help' =>
'THMMachineEstimatedHelp',
'label' =>
'THMMachineEstimated',
'enabled' => 1,
'position' => 50,
'notnull' => 0,
'visible' => 1,
'css' =>
'right',
'csslist' =>
'maxwidth75imp'),
117 'status' => array(
'type' =>
'smallint',
'label' =>
'Status',
'enabled' => 1,
'position' => 1000,
'default' =>
'1',
'notnull' => 1,
'visible' => 1,
'index' => 1,
'arrayofkeyval' => array(
'0' =>
'Disabled',
'1' =>
'Enabled'),),
143 public $fk_user_creat;
148 public $fk_user_modif;
158 public $nb_operators_required;
163 public $thm_operator_estimated;
168 public $thm_machine_estimated;
189 global
$conf, $langs;
191 require_once DOL_DOCUMENT_ROOT.
'/workstation/class/workstationusergroup.class.php';
192 require_once DOL_DOCUMENT_ROOT.
'/workstation/class/workstationresource.class.php';
196 $this->ismultientitymanaged = 1;
197 $this->isextrafieldmanaged = 0;
200 $this->fields[
'rowid'][
'visible'] = 0;
202 if (empty(
$conf->multicompany->enabled) && isset($this->fields[
'entity'])) {
203 $this->fields[
'entity'][
'enabled'] = 0;
207 foreach ($this->fields as $key => $val) {
208 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
209 unset($this->fields[$key]);
214 if (is_object($langs)) {
215 foreach ($this->fields as $key => $val) {
216 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
217 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
218 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
239 $groups =
GETPOST(
'groups',
'array:int');
240 if (empty($groups)) {
241 $groups = $this->usergroups;
243 if (!empty($groups)) {
244 foreach ($groups as $id_group) {
246 $ws_usergroup->fk_workstation = $id;
247 $ws_usergroup->fk_usergroup = $id_group;
248 $ws_usergroup->createCommon($user);
249 $this->usergroups[] = $id_group;
254 $resources =
GETPOST(
'resources',
'array:int');
255 if (empty($resources)) {
256 $resources = $this->resources;
258 if (!empty($resources)) {
259 foreach ($resources as $id_resource) {
261 $ws_resource->fk_workstation = $id;
262 $ws_resource->fk_resource = $id_resource;
263 $ws_resource->createCommon($user);
264 $this->resources[] = $id_resource;
280 global $langs, $extrafields;
290 $result =
$object->fetch($fromid);
291 if ($result > 0 && !empty(
$object->table_element_line)) {
305 if (property_exists(
$object,
'ref')) {
306 $object->ref = empty($this->fields[
'ref'][
'default']) ?
"Copy_Of_".$object->ref : $this->fields[
'ref'][
'default'];
308 if (property_exists(
$object,
'label')) {
310 $object->label = empty($this->fields[
'label'][
'default']) ? $langs->trans(
"CopyOf").
" ".
$object->label : $this->fields[
'label'][
'default'];
312 if (property_exists(
$object,
'status')) {
313 $object->status = self::STATUS_DISABLED;
315 if (property_exists(
$object,
'date_creation')) {
318 if (property_exists(
$object,
'date_modification')) {
319 $object->date_modification =
null;
323 if (is_array(
$object->array_options) && count(
$object->array_options) > 0) {
324 $extrafields->fetch_name_optionals_label($this->table_element);
325 foreach (
$object->array_options as $key => $option) {
326 $shortkey = preg_replace(
'/options_/',
'', $key);
327 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
330 unset(
$object->array_options[$key]);
336 $object->context[
'createfromclone'] =
'createfromclone';
337 $result =
$object->create($user);
341 $this->errors =
$object->errors;
353 if (property_exists($this,
'socid') && $this->socid ==
$object->socid) {
360 unset(
$object->context[
'createfromclone']);
367 $this->db->rollback();
379 public function fetch($id, $ref =
null)
386 if ($result > 0 && !empty($this->table_element_line)) {
399 $this->lines = array();
418 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, $filter =
'', $filtermode =
'AND')
426 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
427 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
428 $sql .=
' WHERE t.entity IN ('.getEntity($this->element).
')';
430 $sql .=
' WHERE 1 = 1';
437 $this->errors[] = $errormessage;
438 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
442 if (!empty($sortfield)) {
443 $sql .= $this->db->order($sortfield, $sortorder);
445 if (!empty($limit)) {
446 $sql .= $this->db->plimit($limit, $offset);
449 $resql = $this->db->query($sql);
451 $num = $this->db->num_rows($resql);
453 while ($i < ($limit ? min($limit, $num) : $num)) {
454 $obj = $this->db->fetch_object($resql);
456 $record =
new self($this->db);
457 $record->setVarsFromFetchObj($obj);
459 $records[$record->id] = $record;
463 $this->db->free($resql);
467 $this->errors[] =
'Error '.$this->db->lasterror();
468 dol_syslog(__METHOD__.
' '.implode(
',', $this->errors), LOG_ERR);
485 $groups =
GETPOST(
'groups',
'array:int');
487 $this->usergroups = array();
489 foreach ($groups as $id_group) {
491 $ws_usergroup->fk_workstation = $this->id;
492 $ws_usergroup->fk_usergroup = $id_group;
493 $ws_usergroup->createCommon($user);
494 $this->usergroups[] = $id_group;
498 $resources =
GETPOST(
'resources',
'array:int');
500 $this->resources = array();
501 if (!empty($resources)) {
502 foreach ($resources as $id_resource) {
504 $ws_resource->fk_workstation = $this->id;
505 $ws_resource->fk_resource = $id_resource;
506 $ws_resource->createCommon($user);
507 $this->resources[] = $id_resource;
521 public function delete(
User $user, $notrigger = 0)
538 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
558 if (empty($status)) {
575 return $this->
setStatusCommon($user, self::STATUS_ENABLED, $notrigger,
'WORKSTATION_ENABLED');
588 return $this->
setStatusCommon($user, self::STATUS_DISABLED, $notrigger,
'WORKSTATION_DISABLED');
599 global
$conf, $langs;
604 $datas[
'picto'] =
img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"Workstation").
'</u>';
605 $datas[
'ref'] =
'<br><b>'.$langs->trans(
'Ref').
':</b> '.$this->ref;
606 if (isset($this->
status)) {
607 $datas[
'status'] =
'<br><b>'.$langs->trans(
"Status").
":</b> ".$this->
getLibStatut(5);
623 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
625 global
$conf, $langs, $hookmanager;
627 if (!empty(
$conf->dol_no_mouse_hover)) {
635 'objecttype' => $this->element,
637 $classfortooltip =
'classfortooltip';
640 $classfortooltip =
'classforajaxtooltip';
641 $dataparams =
' data-params="'.dol_escape_htmltag(json_encode($params)).
'"';
647 $url =
dol_buildpath(
'/workstation/workstation_card.php', 1).
'?id='.$this->id;
649 if ($option !=
'nolink') {
651 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
652 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
653 $add_save_lastsearch_values = 1;
655 if ($add_save_lastsearch_values) {
656 $url .=
'&save_lastsearch_values=1';
661 if (empty($notooltip)) {
663 $label = $langs->trans(
"ShowWorkstation");
664 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
666 $linkclose .= ($label ?
' title="'.dol_escape_htmltag($label, 1).
'"' :
' title="tocomplete"');
667 $linkclose .= $dataparams.
' class="'.$classfortooltip.($morecss ?
' '.$morecss :
'').
'"';
669 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
672 $linkstart =
'<a href="'.$url.
'"';
673 $linkstart .= $linkclose.
'>';
676 $result .= $linkstart;
678 if (empty($this->showphoto_on_popup)) {
680 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'mrp'), (($withpicto != 2) ?
'class="paddingright"' :
''), 0, 0, $notooltip ? 0 : 1);
684 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
686 list($class, $module) = explode(
'@', $this->picto);
689 $filename = $filearray[0][
'name'];
690 if (!empty($filename)) {
691 $pospoint = strpos($filearray[0][
'name'],
'.');
693 $pathtophoto = $class.
'/'.$this->
ref.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
695 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.
'" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.
$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div></div>';
697 $result .=
'<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.
'/viewimage.php?modulepart='.$module.
'&entity='.
$conf->entity.
'&file='.urlencode($pathtophoto).
'"></div>';
702 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'mrp'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
707 if ($withpicto != 2) {
708 $result .= $this->ref;
714 global $action, $hookmanager;
715 $hookmanager->initHooks(array(
'workstationdao'));
716 $parameters = array(
'id' => $this->
id,
'getnomurl' => &$result);
717 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
719 $result = $hookmanager->resPrint;
721 $result .= $hookmanager->resPrint;
736 global
$conf, $langs;
738 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
740 $return =
'<div class="box-flex-item box-flex-grow-zero">';
741 $return .=
'<div class="info-box info-box-sm">';
742 $return .=
'<span class="info-box-icon bg-infobox-action">';
744 $return .=
'</span>';
745 $return .=
'<div class="info-box-content">';
746 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl() : $this->ref).
'</span>';
747 if ($selected >= 0) {
748 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
750 if (property_exists($this,
'label')) {
751 $return .=
' <div class="inline-block opacitymedium valignmiddle tdoverflowmax100">'.$this->label.
'</div>';
753 if (property_exists($this,
'thirdparty') && is_object($this->thirdparty)) {
754 $return .=
'<br><div class="info-box-ref tdoverflowmax150">'.$this->thirdparty->getNomUrl(1).
'</div>';
756 if (property_exists($this,
'amount')) {
758 $return .=
'<span class="info-box-label amount">'.price($this->amount, 0, $langs, 1, -1, -1,
$conf->currency).
'</span>';
760 if (method_exists($this,
'getLibStatut')) {
761 $return .=
'<br><div class="info-box-status">'.$this->getLibStatut(3).
'</div>';
792 if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
795 $this->labelStatus[self::STATUS_DISABLED] = $langs->transnoentitiesnoconv(
'Disabled');
796 $this->labelStatus[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv(
'Enabled');
797 $this->labelStatusShort[self::STATUS_DISABLED] = $langs->transnoentitiesnoconv(
'Disabled');
798 $this->labelStatusShort[self::STATUS_ENABLED] = $langs->transnoentitiesnoconv(
'Enabled');
801 $statusType =
'status'.$status;
803 if ($status == self::STATUS_ENABLED) {
804 $statusType =
'status4';
807 return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status],
'', $statusType, $mode);
818 $sql =
'SELECT rowid, date_creation as datec, tms as datem,';
819 $sql .=
' fk_user_creat, fk_user_modif';
820 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
821 $sql .=
' WHERE t.rowid = '.((int) $id);
822 $result = $this->db->query($sql);
824 if ($this->db->num_rows($result)) {
825 $obj = $this->db->fetch_object($result);
827 $this->
id = $obj->rowid;
829 $this->user_creation_id = $obj->fk_user_creat;
830 $this->user_modification_id = $obj->fk_user_modif;
831 $this->date_creation = $this->db->jdate($obj->datec);
832 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
835 $this->db->free($result);
859 global $langs,
$conf;
860 $langs->load(
"workstation");
863 $conf->global->WORKSTATION_WORKSTATION_ADDON =
'mod_workstation_standard';
873 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
874 foreach ($dirmodels as $reldir) {
878 if (file_exists($dir.$file)) {
879 $mybool = ((bool) @include_once $dir.$file) || $mybool;
888 if (class_exists($classname)) {
889 $obj =
new $classname();
890 '@phan-var-force ModeleNumRefWorkstation $obj';
891 $numref = $obj->getNextValue($this);
893 if ($numref !=
'' && $numref !=
'-1') {
896 $this->error = $obj->error;
901 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
905 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
921 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
923 global
$conf, $langs;
926 $includedocgeneration = 0;
928 $langs->load(
"workstation");
931 $modele =
'standard_workstation';
933 if ($this->model_pdf) {
934 $modele = $this->model_pdf;
940 $modelpath =
"core/modules/workstation/doc/";
942 if ($includedocgeneration) {
943 $result = $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Parent class of all other business classes (invoices, contracts, proposals, orders,...
deleteLineCommon(User $user, $idline, $notrigger=0)
Delete a line of object in database.
commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
Common function for all objects extending CommonObject for generating documents.
createCommon(User $user, $notrigger=0)
Create object in the database.
getFieldList($alias='', $excludefields=array())
Function to concat keys of fields.
updateCommon(User $user, $notrigger=0)
Update object into database.
setStatusCommon($user, $status, $notrigger=0, $triggercode='')
Set to a status.
initAsSpecimenCommon()
Initialise object with example values Id must be 0 if object instance is a specimen.
copy_linked_contact($objFrom, $source='internal')
Copy contact from one element to current.
fetchLinesCommon($morewhere='', $noextrafields=0)
Load object in memory from the database.
fetchCommon($id, $ref=null, $morewhere='', $noextrafields=0)
Load object in memory from the database.
deleteCommon(User $user, $notrigger=0, $forcechilddeletion=0)
Delete object in database.
Class to manage Dolibarr database access.
Class to manage Dolibarr users.
fetch($id, $ref=null)
Load object in memory from the database.
getNextNumRef()
Returns the reference to the following non used object depending on the active numbering module.
createFromClone(User $user, $fromid)
Clone an object into another one.
fetchLines()
Load object lines in memory from the database.
setEnabled($user, $notrigger=0)
Set draft status.
getTooltipContentArray($params)
getTooltipContentArray
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return a link to the object card (with optionally the picto)
getKanbanView($option='', $arraydata=null)
Return a thumb for kanban views.
create(User $user, $notrigger=0)
Create object into database.
setDisabled($user, $notrigger=0)
Set draft status.
deleteLine(User $user, $idline, $notrigger=0)
Delete a line of object in database.
fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, $filter='', $filtermode='AND')
Load list of objects in memory from the database.
update(User $user, $notrigger=0)
Update object into database.
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
Create a document onto disk according to template module.
info($id)
Load the info information in the object.
getLibStatut($mode=0)
Return the label of the status.
__construct(DoliDB $db)
Constructor.
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen.
LibStatut($status, $mode=0)
Return the status.
setStatus($status, $notrigger=0)
Set draft status.
Class to link resource with Workstations.
static getAllResourcesOfWorkstation($fk_workstation)
Function used to get an array with all resources linked to a workstation.
static deleteAllResourcesOfWorkstation($fk_workstation)
Function used to remove all resources linked to a workstation.
Class to link User groups and Workstations.
static deleteAllGroupsOfWorkstation($fk_workstation)
Function used to remove all usergroups linked to a workstation.
static getAllGroupsOfWorkstation($fk_workstation)
Function used to get an array with all usergroups linked to a workstation.
print $langs trans("Ref").' m titre as m m statut as status
Or an array listing all the potential status of the object: array: int of the status => translated la...
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.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
forgeSQLFromUniversalSearchCriteria($filter, &$errorstr='', $noand=0, $nopar=0, $noerror=0)
forgeSQLFromUniversalSearchCriteria
dol_now($mode='auto')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dolGetStatus($statusLabel='', $statusLabelShort='', $html='', $statusType='status0', $displayMode=0, $url='', $params=array())
Output the badge of a status.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...