29require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobject.class.php';
41 public $module =
'hrm';
46 public $element =
'job';
51 public $table_element =
'hrm_job';
57 public $ismultientitymanaged = 0;
62 public $isextrafieldmanaged = 1;
67 public $picto =
'technic';
70 const STATUS_DRAFT = 0;
71 const STATUS_VALIDATED = 1;
72 const STATUS_CANCELED = 9;
105 public $fields=array(
106 'rowid' => array(
'type'=>
'integer',
'label'=>
'TechnicalID',
'enabled'=>
'1',
'position'=>1,
'notnull'=>1,
'visible'=>0,
'noteditable'=>
'1',
'index'=>1,
'css'=>
'left',
'comment'=>
"Id"),
107 'label' => array(
'type'=>
'varchar(128)',
'label'=>
'Label',
'enabled'=>
'1',
'position'=>20,
'notnull'=>1,
'visible'=>1,
'index'=>1,
'searchall'=>1,
'showoncombobox'=>
'1',
'comment'=>
"Label of object"),
108 'description' => array(
'type'=>
'text',
'label'=>
'Description',
'enabled'=>
'1',
'position'=>21,
'notnull'=>0,
'visible'=>1,),
109 'date_creation' => array(
'type'=>
'datetime',
'label'=>
'DateCreation',
'enabled'=>
'1',
'position'=>500,
'notnull'=>1,
'visible'=>2,),
110 'tms' => array(
'type'=>
'timestamp',
'label'=>
'DateModification',
'enabled'=>
'1',
'position'=>501,
'notnull'=>0,
'visible'=>2,),
111 'deplacement' => array(
'type'=>
'select',
'required'=> 1,
'label'=>
'NeedBusinessTravels',
'enabled'=> 1,
'position'=> 90,
'notnull'=> 1,
'visible'=> 1,
'arrayofkeyval'=> array(0 =>
"No", 1=>
"Yes"),
'default'=>0),
112 'note_public' => array(
'type'=>
'html',
'label'=>
'NotePublic',
'enabled'=>
'1',
'position'=>70,
'notnull'=>0,
'visible'=>0,),
113 'note_private' => array(
'type'=>
'html',
'label'=>
'NotePrivate',
'enabled'=>
'1',
'position'=>71,
'notnull'=>0,
'visible'=>0,),
114 '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',),
115 'fk_user_modif' => array(
'type'=>
'integer:User:user/class/user.class.php',
'label'=>
'UserModif',
'enabled'=>
'1',
'position'=>511,
'notnull'=>-1,
'visible'=>-2,),
121 public $date_creation;
125 public $note_private;
126 public $fk_user_creat;
127 public $fk_user_modif;
141 public $fk_element =
'fk_job';
151 protected $childtables = array(
'hrm_evaluation',
'hrm_job_user');
158 protected $childtablesoncascade = array(
"@SkillRank:hrm/class/skillrank.class.php:fk_object:objecttype='job'");
174 global $conf, $langs;
179 $this->fields[
'rowid'][
'visible'] = 0;
181 if (!isModEnabled(
'multicompany') && isset($this->fields[
'entity'])) {
182 $this->fields[
'entity'][
'enabled'] = 0;
192 foreach ($this->fields as $key => $val) {
193 if (isset($val[
'enabled']) && empty($val[
'enabled'])) {
194 unset($this->fields[$key]);
199 if (is_object($langs)) {
200 foreach ($this->fields as $key => $val) {
201 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
202 foreach ($val[
'arrayofkeyval'] as $key2 => $val2) {
203 $this->fields[$key][
'arrayofkeyval'][$key2] = $langs->trans($val2);
223 return $resultcreate;
235 global $langs, $extrafields;
240 $object =
new self($this->db);
245 $result = $object->fetchCommon($fromid);
246 if ($result > 0 && !empty($object->table_element_line)) {
247 $object->fetchLines();
256 unset($object->fk_user_creat);
257 unset($object->import_key);
260 if (property_exists($object,
'ref')) {
261 $object->ref = empty($this->fields[
'ref'][
'default']) ?
"Copy_Of_".$object->ref : $this->fields[
'ref'][
'default'];
263 if (property_exists($object,
'label')) {
264 $object->label = empty($this->fields[
'label'][
'default']) ? $langs->trans(
"CopyOf").
" ".$object->label : $this->fields[
'label'][
'default'];
266 if (property_exists($object,
'status')) {
267 $object->status = self::STATUS_DRAFT;
269 if (property_exists($object,
'date_creation')) {
270 $object->date_creation =
dol_now();
272 if (property_exists($object,
'date_modification')) {
273 $object->date_modification =
null;
277 if (is_array($object->array_options) && count($object->array_options) > 0) {
278 $extrafields->fetch_name_optionals_label($this->table_element);
279 foreach ($object->array_options as $key => $option) {
280 $shortkey = preg_replace(
'/options_/',
'', $key);
281 if (!empty($extrafields->attributes[$this->table_element][
'unique'][$shortkey])) {
283 unset($object->array_options[$key]);
289 $object->context[
'createfromclone'] =
'createfromclone';
290 $result = $object->createCommon($user);
293 $this->error = $object->error;
294 $this->errors = $object->errors;
306 if (property_exists($this,
'fk_soc') && $this->fk_soc == $object->socid) {
313 unset($object->context[
'createfromclone']);
320 $this->db->rollback();
332 public function fetch($id, $ref =
null)
335 if ($result > 0 && !empty($this->table_element_line)) {
348 $this->lines = array();
366 public function fetchAll($sortorder =
'', $sortfield =
'', $limit = 0, $offset = 0, array $filter = array(), $filtermode =
'AND')
376 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
377 if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) {
378 $sql .=
' WHERE t.entity IN ('.getEntity($this->element).
')';
380 $sql .=
' WHERE 1 = 1';
384 if (count($filter) > 0) {
385 foreach ($filter as $key => $value) {
386 if ($key ==
't.rowid') {
387 $sqlwhere[] = $key.
'='.$value;
388 } elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key][
'type'], array(
'date',
'datetime',
'timestamp'))) {
389 $sqlwhere[] = $key.
' = \''.$this->db->idate($value).
'\'';
390 } elseif ($key ==
'customsql') {
391 $sqlwhere[] = $value;
392 } elseif (strpos($value,
'%') ===
false) {
393 $sqlwhere[] = $key.
' IN ('.$this->db->sanitize($this->db->escape($value)).
')';
395 $sqlwhere[] = $key.
' LIKE \'%'.$this->db->escape($value).
'%\'';
399 if (count($sqlwhere) > 0) {
400 $sql .=
" AND (".implode(
" ".$filtermode.
" ", $sqlwhere).
")";
403 if (!empty($sortfield)) {
404 $sql .= $this->db->order($sortfield, $sortorder);
406 if (!empty($limit)) {
407 $sql .=
' '.$this->db->plimit($limit, $offset);
410 $resql = $this->db->query($sql);
412 $num = $this->db->num_rows($resql);
414 while ($i < ($limit ? min($limit, $num) : $num)) {
415 $obj = $this->db->fetch_object($resql);
417 $record =
new self($this->db);
418 $record->setVarsFromFetchObj($obj);
420 $records[$record->id] = $record;
424 $this->db->free($resql);
428 $this->errors[] =
'Error '.$this->db->lasterror();
429 dol_syslog(__METHOD__.
' '.join(
',', $this->errors), LOG_ERR);
454 public function delete(
User $user, $notrigger =
false)
471 $this->error =
'ErrorDeleteLineNotAllowedByObjectStatus';
488 global $conf, $langs;
490 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
495 if ($this->
status == self::STATUS_VALIDATED) {
496 dol_syslog(get_class($this).
"::validate action abandonned: already validated", LOG_WARNING);
513 if (!$error && (preg_match(
'/^[\(]?PROV/i', $this->
ref) || empty($this->
ref))) {
518 $this->newref = $num;
522 $sql =
"UPDATE ".MAIN_DB_PREFIX.$this->table_element;
523 $sql .=
" SET ref = '".$this->db->escape($num).
"',";
524 $sql .=
" status = ".self::STATUS_VALIDATED;
525 if (!empty($this->fields[
'date_validation'])) {
526 $sql .=
", date_validation = '".$this->db->idate($now).
"'";
528 if (!empty($this->fields[
'fk_user_valid'])) {
529 $sql .=
", fk_user_valid = ".((int) $user->id);
531 $sql .=
" WHERE rowid = ".((int) $this->
id);
533 dol_syslog(get_class($this).
"::validate()", LOG_DEBUG);
534 $resql = $this->db->query($sql);
537 $this->error = $this->db->lasterror();
541 if (!$error && !$notrigger) {
543 $result = $this->
call_trigger(
'HRM_JOB_VALIDATE', $user);
552 $this->oldref = $this->ref;
555 if (preg_match(
'/^[\(]?PROV/i', $this->
ref)) {
557 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filename = CONCAT('".$this->db->escape($this->newref).
"', SUBSTR(filename, ".(strlen($this->
ref) + 1).
")), filepath = 'job/".$this->db->escape($this->newref).
"'";
558 $sql .=
" WHERE filename LIKE '".$this->db->escape($this->
ref).
"%' AND filepath = 'job/".$this->db->escape($this->
ref).
"' and entity = ".$conf->entity;
559 $resql = $this->db->query($sql);
562 $this->error = $this->db->lasterror();
564 $sql =
'UPDATE '.MAIN_DB_PREFIX.
"ecm_files set filepath = 'job/".$this->db->escape($this->newref).
"'";
565 $sql .=
" WHERE filepath = 'job/".$this->db->escape($this->
ref).
"' and entity = ".$conf->entity;
566 $resql = $this->db->query($sql);
569 $this->error = $this->db->lasterror();
575 $dirsource = $conf->hrm->dir_output.
'/job/'.$oldref;
576 $dirdest = $conf->hrm->dir_output.
'/job/'.$newref;
577 if (!$error && file_exists($dirsource)) {
578 dol_syslog(get_class($this).
"::validate() rename dir ".$dirsource.
" into ".$dirdest);
580 if (@rename($dirsource, $dirdest)) {
583 $listoffiles =
dol_dir_list($conf->hrm->dir_output.
'/job/'.$newref,
'files', 1,
'^'.preg_quote($oldref,
'/'));
584 foreach ($listoffiles as $fileentry) {
585 $dirsource = $fileentry[
'name'];
586 $dirdest = preg_replace(
'/^'.preg_quote($oldref,
'/').
'/', $newref, $dirsource);
587 $dirsource = $fileentry[
'path'].
'/'.$dirsource;
588 $dirdest = $fileentry[
'path'].
'/'.$dirdest;
589 @rename($dirsource, $dirdest);
599 $this->
status = self::STATUS_VALIDATED;
606 $this->db->rollback();
625 $lastpos = array_shift($Tab);
642 $TPosition = $position->getForUser($userid);
643 foreach ($TPosition as $UPosition) {
644 $TReturn[$UPosition->Job->rowid] = $UPosition->Job->ref;
659 if ($this->
status <= self::STATUS_DRAFT) {
670 return $this->
setStatusCommon($user, self::STATUS_DRAFT, $notrigger,
'JOB_UNVALIDATE');
680 public function cancel($user, $notrigger = 0)
683 if ($this->
status != self::STATUS_VALIDATED) {
694 return $this->
setStatusCommon($user, self::STATUS_CANCELED, $notrigger,
'JOB_CANCEL');
704 public function reopen($user, $notrigger = 0)
707 if ($this->
status != self::STATUS_CANCELED) {
718 return $this->
setStatusCommon($user, self::STATUS_VALIDATED, $notrigger,
'JOB_REOPEN');
731 public function getNomUrl($withpicto = 0, $option =
'', $notooltip = 0, $morecss =
'', $save_lastsearch_value = -1)
733 global $conf, $langs, $hookmanager;
735 if (!empty($conf->dol_no_mouse_hover)) {
741 $label =
img_picto(
'', $this->picto).
' <u>'.$langs->trans(
"JobProfile").
'</u>';
742 if (isset($this->
status)) {
743 $label .=
' '.$this->getLibStatut(5);
746 $label .=
'<b>'.$langs->trans(
'Label').
':</b> '.$this->label;
748 $url =
dol_buildpath(
'/hrm/job_card.php', 1).
'?id='.$this->id;
750 if ($option !=
'nolink') {
752 $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0);
753 if ($save_lastsearch_value == -1 && isset($_SERVER[
"PHP_SELF"]) && preg_match(
'/list\.php/', $_SERVER[
"PHP_SELF"])) {
754 $add_save_lastsearch_values = 1;
756 if ($add_save_lastsearch_values) {
757 $url .=
'&save_lastsearch_values=1';
762 if (empty($notooltip)) {
764 $label = $langs->trans(
"ShowJob");
765 $linkclose .=
' alt="'.dol_escape_htmltag($label, 1).
'"';
767 $linkclose .=
' title="'.dol_escape_htmltag($label, 1).
'"';
768 $linkclose .=
' class="classfortooltip'.($morecss ?
' '.$morecss :
'').
'"';
770 $linkclose = ($morecss ?
' class="'.$morecss.
'"' :
'');
773 if ($option ==
'nolink') {
774 $linkstart =
'<span';
776 $linkstart =
'<a href="'.$url.
'"';
778 $linkstart .= $linkclose.
'>';
779 if ($option ==
'nolink') {
780 $linkend =
'</span>';
785 $result .= $linkstart;
787 if (empty($this->showphoto_on_popup)) {
789 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
793 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
795 list($class, $module) = explode(
'@', $this->picto);
796 $upload_dir = $conf->$module->multidir_output[$conf->entity].
"/$class/".
dol_sanitizeFileName($this->label);
798 $filename = $filearray[0][
'name'];
799 if (!empty($filename)) {
800 $pospoint = strpos($filearray[0][
'name'],
'.');
802 $pathtophoto = $class.
'/'.$this->label.
'/thumbs/'.substr($filename, 0, $pospoint).
'_mini'.substr($filename, $pospoint);
804 $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>';
806 $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>';
811 $result .=
img_object(($notooltip ?
'' : $label), ($this->picto ? $this->picto :
'generic'), ($notooltip ? (($withpicto != 2) ?
'class="paddingright"' :
'') :
'class="'.(($withpicto != 2) ?
'paddingright ' :
'').
'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
816 if ($withpicto != 2) {
817 $result .= $this->label;
823 global $action, $hookmanager;
824 $hookmanager->initHooks(array(
'jobdao'));
825 $parameters = array(
'id'=>$this->
id,
'getnomurl' => &$result);
826 $reshook = $hookmanager->executeHooks(
'getNomUrl', $parameters, $this, $action);
828 $result = $hookmanager->resPrint;
830 $result .= $hookmanager->resPrint;
890 $sql =
'SELECT rowid, date_creation as datec, tms as datem,';
891 $sql .=
' fk_user_creat, fk_user_modif';
892 $sql .=
' FROM '.MAIN_DB_PREFIX.$this->table_element.
' as t';
893 $sql .=
' WHERE t.rowid = '.((int) $id);
894 $result = $this->db->query($sql);
896 if ($this->db->num_rows($result)) {
897 $obj = $this->db->fetch_object($result);
899 $this->
id = $obj->rowid;
901 $this->user_creation_id = $obj->fk_user_creat;
902 $this->user_modification_id = $obj->fk_user_modif;
903 $this->date_creation = $this->db->jdate($obj->datec);
904 $this->date_modification = empty($obj->datem) ?
'' : $this->db->jdate($obj->datem);
907 $this->db->free($result);
935 $this->lines = array();
937 $objectline =
new JobLine($this->db);
938 $result = $objectline->fetchAll(
'ASC',
'position', 0, 0, array(
'customsql'=>
'fk_job = '.$this->
id));
940 if (is_numeric($result)) {
941 $this->error = $objectline->error;
942 $this->errors = $objectline->errors;
945 $this->lines = $result;
957 global $langs, $conf;
961 $conf->global->hrm_JOB_ADDON =
'mod_job_standard';
968 $classname = $conf->global->hrm_JOB_ADDON;
971 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
972 foreach ($dirmodels as $reldir) {
976 $mybool |= @include_once $dir.$file;
979 if ($mybool ===
false) {
984 if (class_exists($classname)) {
985 $obj =
new $classname();
986 $numref = $obj->getNextValue($this);
988 if ($numref !=
'' && $numref !=
'-1') {
991 $this->error = $obj->error;
996 print $langs->trans(
"Error").
" ".$langs->trans(
"ClassNotFound").
' '.$classname;
1000 print $langs->trans(
"ErrorNumberingModuleNotSetup", $this->element);
1016 public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams =
null)
1018 global $conf, $langs;
1021 $includedocgeneration = 0;
1023 $langs->load(
"hrm");
1026 $modele =
'standard_job';
1028 if (!empty($this->model_pdf)) {
1029 $modele = $this->model_pdf;
1031 $modele = $conf->global->JOB_ADDON_PDF;
1035 $modelpath =
"core/modules/hrm/doc/";
1037 if ($includedocgeneration && !empty($modele)) {
1038 $result = $this->
commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
1053 global $conf, $langs;
1069 $this->db->commit();
1083 global $selected, $langs;
1085 $selected = (empty($arraydata[
'selected']) ? 0 : $arraydata[
'selected']);
1087 $return =
'<div class="box-flex-item box-flex-grow-zero">';
1088 $return .=
'<div class="info-box info-box-sm">';
1089 $return .=
'<span class="info-box-icon bg-infobox-action">';
1091 $return .=
'</span>';
1092 $return .=
'<div class="info-box-content">';
1093 $return .=
'<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this,
'getNomUrl') ? $this->
getNomUrl(0) : $this->ref).
'</span>';
1094 if ($selected >= 0) {
1095 $return .=
'<input id="cb'.$this->id.
'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->
id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1101 if (property_exists($this,
'description') && !(empty($this->
description))) {
1103 $return .=
'<br><span class="info-box-label ">'.(strlen($this->
description) > 30 ?
dol_substr($this->
description, 0, 25).
'...' : $this->description).
'</span>';
1105 $return .=
'</div>';
1106 $return .=
'</div>';
1107 $return .=
'</div>';
1120 $skillranks = array();
1121 $sql =
"SELECT rowid";
1122 $sql .=
" FROM ".MAIN_DB_PREFIX.
"hrm_skillrank";
1123 $sql .=
" WHERE fk_object = ".((int) $id);
1125 $resql = $this->db->query($sql);
1127 $num = $this->db->num_rows($resql);
1130 $obj = $this->db->fetch_object($resql);
1131 $skillranks[] = $obj;
1134 $this->db->free($resql);
1143require_once DOL_DOCUMENT_ROOT.
'/core/class/commonobjectline.class.php';
1156 public $isextrafieldmanaged = 0;
print $langs trans("AuditedSecurityEvents").'</strong >< span class="opacitymedium"></span >< br > status
Parent class of all other business classes (invoices, contracts, proposals, orders,...
commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
Common function for all objects extending CommonObject for generating documents.
deleteLineCommon(User $user, $idline, $notrigger=false)
Delete a line of object in database.
createCommon(User $user, $notrigger=false)
Create object into database.
deleteCommon(User $user, $notrigger=false, $forcechilddeletion=0)
Delete object in database.
getFieldList($alias='', $excludefields=array())
Function to concat keys of fields.
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.
updateCommon(User $user, $notrigger=false)
Update object into database.
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.
call_trigger($triggerName, $user)
Call trigger based on this instance.
Parent class for class inheritance lines of business objects This class is useless for the moment so ...
Class to manage Dolibarr database access.
doScheduledJob()
Action executed by scheduler CAN BE A CRON TASK.
update(User $user, $notrigger=false)
Update object into database.
getNextNumRef()
Returns the reference to the following non used object depending on the active numbering module.
fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter=array(), $filtermode='AND')
Load list of objects in memory from the database.
getLastJobForUser($fk_user)
Get the last occupied position for a user.
fetchLines()
Load object lines in memory from the database.
cancel($user, $notrigger=0)
Set cancel status.
__construct(DoliDB $db)
Constructor.
generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
Create a document onto disk according to template module.
setDraft($user, $notrigger=0)
Set draft status.
validate($user, $notrigger=0)
Validate object.
getLibStatut($mode=0)
Return the label of the status.
getLinesArray()
Create an array of lines.
fetch($id, $ref=null)
Load object in memory from the database.
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen.
LibStatut($status, $mode=0)
Return the status.
getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
Return a link to the object card (with optionaly the picto)
createFromClone(User $user, $fromid)
Clone an object into another one.
create(User $user, $notrigger=false)
Create object into database.
reopen($user, $notrigger=0)
Set back to validated status.
deleteLine(User $user, $idline, $notrigger=false)
Delete a line of object in database.
getSkillRankForJob($id)
function for get required skills associate to job object
getForUser($userid)
Get array of occupied positions for a user.
getKanbanView($option='', $arraydata=null)
Return clicable link of object (with eventually picto)
info($id)
Load the info information in the object.
__construct(DoliDB $db)
Constructor.
Class to manage Dolibarr users.
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($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.
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_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
dol_now($mode='auto')
Return date for now.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_substr($string, $start, $length=null, $stringencoding='', $trunconbytes=0)
Make a substring.
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.
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.