31require
'../main.inc.php';
36require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
37require_once DOL_DOCUMENT_ROOT.
'/hrm/lib/hrm.lib.php';
38require_once DOL_DOCUMENT_ROOT.
'/hrm/class/skill.class.php';
39require_once DOL_DOCUMENT_ROOT.
'/hrm/class/evaluation.class.php';
43$langs->loadLangs(array(
"admin",
"hrm"));
51$action =
GETPOST(
'action',
'aZ09');
52$backtopage =
GETPOST(
'backtopage',
'alpha');
54$value =
GETPOST(
'value',
'alpha');
55$label =
GETPOST(
'label',
'alpha');
56$modulepart =
GETPOST(
'modulepart',
'aZ09');
58$scandir =
GETPOST(
'scan_dir',
'alpha');
61$arrayofparameters = array(
62 'HRM_MAXRANK' => array(
'type' =>
'integer',
'enabled' => 1,
'css' =>
''),
63 'HRM_DEFAULT_SKILL_DESCRIPTION' => array(
'type' =>
'varchar',
'enabled' => 1,
'css' =>
''),
69$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
75 'label' =>
'Evaluation',
76 'includerefgeneration' => 1,
77 'includedocgeneration' => 1,
78 'class' =>
'Evaluation'
82$tmpobjectkey =
GETPOST(
'object',
'aZ09');
83if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) {
92include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
94if ($action ==
'update') {
98 if (!empty($max_rank)) {
99 $static_skill =
new Skill($db);
100 $TAllSkills = $static_skill->fetchAll();
101 if (is_array($TAllSkills)) {
102 foreach ($TAllSkills as &$skill) {
103 if (empty($skill->lines)) {
104 $skill->fetchLines();
106 if (count($skill->lines) < $conf->global->HRM_MAXRANK) {
107 $skill->createSkills(count($skill->lines) + 1);
112} elseif ($action ==
'updateMask') {
113 $maskconst =
GETPOST(
'maskconstEvaluation',
'aZ09');
114 $maskvalue =
GETPOST(
'maskEvaluation',
'alpha');
116 if ($maskconst && preg_match(
'/_MASK$/', $maskconst)) {
117 $res =
dolibarr_set_const($db, $maskconst, $maskvalue,
'chaine', 0,
'', $conf->entity);
128} elseif ($action ==
'specimen' && $tmpobjectkey) {
129 $modele =
GETPOST(
'module',
'alpha');
131 $className = $myTmpObjects[$tmpobjectkey][
'class'];
132 $tmpobject =
new $className($db);
133 $tmpobject->initAsSpecimen();
138 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
139 foreach ($dirmodels as $reldir) {
140 $file =
dol_buildpath($reldir.
"core/modules/hrm/doc/pdf_".$modele.
".modules.php", 0);
141 if (file_exists($file)) {
142 $classname =
"pdf_".$modele;
147 if ($classname !==
'') {
150 $module =
new $classname($db);
151 '@phan-var-force CommonDocGenerator $module';
153 if ($module->write_file($tmpobject, $langs) > 0) {
154 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=hrm&file=evaluation/SPECIMEN.pdf");
162 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
164} elseif ($action ==
'setmod') {
166 if (!empty($tmpobjectkey)) {
167 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
"_ADDON";
170} elseif ($action ==
'set') {
173} elseif ($action ==
'del') {
176 if (!empty($tmpobjectkey)) {
177 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
183} elseif ($action ==
'setdoc') {
185 if (!empty($tmpobjectkey)) {
186 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
190 $conf->global->$constforval = $value;
199} elseif ($action ==
'unsetdoc') {
200 if (!empty($tmpobjectkey)) {
201 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
211$form =
new Form($db);
214$page_name =
"HRMSetup";
216llxHeader(
'', $langs->trans($page_name), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-hrm');
219$linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
228foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
229 if ($myTmpObjectKey != $type) {
232 if ($myTmpObjectArray[
'includerefgeneration']) {
238 print
load_fiche_titre($langs->trans(
"NumberingModules").
' ('.$myTmpObjectArray[
'label'].
')',
'',
'');
240 print
'<table class="noborder centpercent">';
241 print
'<tr class="liste_titre">';
242 print
'<td>'.$langs->trans(
"Name").
'</td>';
243 print
'<td>'.$langs->trans(
"Description").
'</td>';
244 print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
245 print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
246 print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
251 foreach ($dirmodels as $reldir) {
255 $handle = opendir($dir);
256 if (is_resource($handle)) {
257 while (($file = readdir($handle)) !==
false) {
258 if (strpos($file,
'mod_'.strtolower($myTmpObjectKey).
'_') === 0 && substr($file,
dol_strlen($file) - 3, 3) ==
'php') {
259 $file = substr($file, 0,
dol_strlen($file) - 4);
261 require_once $dir.
'/'.$file.
'.php';
263 $module =
new $file($db);
266 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
269 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
273 if ($module->isEnabled()) {
274 dol_include_once(
'/'.$moduledir.
'/class/'.strtolower($myTmpObjectKey).
'.class.php');
276 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
277 print $module->info($langs);
281 print
'<td class="nowrap">';
282 $tmp = $module->getExample();
283 if (preg_match(
'/^Error/', $tmp)) {
284 $langs->load(
"errors");
285 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
286 } elseif ($tmp ==
'NotConfigured') {
287 print $langs->trans($tmp);
293 print
'<td class="center">';
294 $constforvar =
'HRMTEST_'.strtoupper($myTmpObjectKey).
'_ADDON';
296 print
img_picto($langs->trans(
"Activated"),
'switch_on');
298 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&object='.strtolower($myTmpObjectKey).
'&value='.urlencode($file).
'">';
299 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
304 $nameofclass = ucfirst($myTmpObjectKey);
305 $mytmpinstance =
new $nameofclass($db);
306 '@phan-var-force Evaluation $mytmpinstance';
307 $mytmpinstance->initAsSpecimen();
311 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
313 $nextval = $module->getNextValue($mytmpinstance);
314 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
315 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
317 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
318 $nextval = $langs->trans($nextval);
320 $htmltooltip .= $nextval.
'<br>';
322 $htmltooltip .= $langs->trans($module->error).
'<br>';
326 print
'<td class="center">';
327 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
341 if ($myTmpObjectArray[
'includedocgeneration']) {
346 $type = strtolower($myTmpObjectKey);
348 print
load_fiche_titre($langs->trans(
"DocumentModules", $myTmpObjectKey),
'',
'');
353 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
354 $sql .=
" WHERE type = '".$db->escape($type).
"'";
355 $sql .=
" AND entity = ".$conf->entity;
356 $resql = $db->query($sql);
359 $num_rows = $db->num_rows($resql);
360 while ($i < $num_rows) {
361 $array = $db->fetch_array($resql);
362 if (is_array($array)) {
363 array_push($def, $array[0]);
371 print
'<div class="div-table-responsive">';
372 print
'<table class="noborder centpercent">'.
"\n";
373 print
'<tr class="liste_titre">'.
"\n";
374 print
'<td>'.$langs->trans(
"Name").
'</td>';
375 print
'<td>'.$langs->trans(
"Description").
'</td>';
376 print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
377 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
378 print
'<td class="center" width="38">'.$langs->trans(
"ShortInfo").
'</td>';
379 print
'<td class="center" width="38">'.$langs->trans(
"Preview").
'</td>';
384 foreach ($dirmodels as $reldir) {
385 foreach (array(
'',
'/doc') as $valdir) {
386 $realpath = $reldir.
"core/modules/".$moduledir.$valdir;
390 $handle = opendir($dir);
391 if (is_resource($handle)) {
393 while (($file = readdir($handle)) !==
false) {
399 foreach ($filelist as $file) {
400 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
401 if (file_exists($dir.
'/'.$file)) {
402 $name = substr($file, 4,
dol_strlen($file) - 16);
403 $classname = substr($file, 0,
dol_strlen($file) - 12);
405 require_once $dir.
'/'.$file;
406 $module =
new $classname($db);
408 $modulequalified = 1;
409 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
410 $modulequalified = 0;
412 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
413 $modulequalified = 0;
416 if ($modulequalified) {
417 print
'<tr class="oddeven"><td width="100">';
418 print(empty($module->name) ? $name : $module->
name);
420 if (method_exists($module,
'info')) {
421 print $module->info($langs);
423 print $module->description;
428 if (in_array($name, $def)) {
429 print
'<td class="center">'.
"\n";
430 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.$name.
'">';
431 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
435 print
'<td class="center">'.
"\n";
436 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.
newToken().
'&value='.$name.
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
441 print
'<td class="center">';
442 $constforvar =
'HRMTEST_'.strtoupper($myTmpObjectKey).
'_ADDON';
446 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=unsetdoc&token='.
newToken().
'&object='.urlencode(strtolower($myTmpObjectKey)).
'&value='.$name.
'&scan_dir='.$module->scandir.
'&label='.urlencode($module->name).
'&type='.urlencode($type).
'" alt="'.$langs->trans(
"Disable").
'">'.
img_picto($langs->trans(
"Enabled"),
'on').
'</a>';
448 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.
newToken().
'&object='.urlencode(strtolower($myTmpObjectKey)).
'&value='.$name.
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
453 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
454 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
455 if ($module->type ==
'pdf') {
456 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
458 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
460 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
461 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
462 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
464 print
'<td class="center">';
465 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
469 print
'<td class="center">';
470 if ($module->type ==
'pdf') {
471 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'&object='.$myTmpObjectKey.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
473 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
495 $conf->global->HRM_MAXRANK = Skill::DEFAULT_MAX_RANK_PER_SKILL;
498if ($action ==
'edit') {
499 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
500 print
'<input type="hidden" name="token" value="'.newToken().
'">';
501 print
'<input type="hidden" name="action" value="update">';
503 print
'<table class="noborder centpercent">';
504 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
506 foreach ($arrayofparameters as $constname => $val) {
507 if ($val[
'enabled'] == 1) {
509 print
'<tr class="oddeven"><td>';
510 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
511 print
'<span id="helplink'.$constname.
'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1,
'info',
'', 0, 3,
'tootips'.$constname).
'</span>';
514 if ($val[
'type'] ==
'textarea') {
515 print
'<textarea class="flat" name="' . $constname .
'" id="' . $constname .
'" cols="50" rows="5" wrap="soft">' .
"\n";
517 print
"</textarea>\n";
518 } elseif ($val[
'type'] ==
'integer') {
519 print
'<input class="flat" name="' . $constname .
'" id="' . $constname .
'" value="' .
getDolGlobalString($constname) .
'" type="number" step="1" min="0" max="50" >' .
"\n";
520 } elseif ($val[
'type'] ==
'html') {
521 require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
522 $doleditor =
new DolEditor($constname,
getDolGlobalString($constname),
'', 160,
'dolibarr_notes',
'',
false,
false, isModEnabled(
'fckeditor'), ROWS_5,
'90%');
523 $doleditor->Create();
524 } elseif ($val[
'type'] ==
'yesno') {
526 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
527 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
530 $tmp = explode(
':', $val[
'type']);
531 $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user,
null, 1);
533 $arrayofmessagename = array();
534 if (is_array($formmail->lines_model)) {
535 foreach ($formmail->lines_model as $modelmail) {
538 if (!empty($arrayofmessagename[$modelmail->label])) {
539 $moreonlabel =
' <span class="opacitymedium">(' . $langs->trans(
"SeveralLangugeVariatFound") .
')</span>';
542 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace(
'/\(|\)/',
'', $modelmail->label)) . $moreonlabel;
545 print $form->selectarray($constname, $arrayofmessagename,
getDolGlobalString($constname),
'None', 0, 0,
'', 0, 0, 0,
'',
'', 1);
546 } elseif (preg_match(
'/category:/', $val[
'type'])) {
547 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
548 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
551 $tmp = explode(
':', $val[
'type']);
552 print
img_picto(
'',
'category',
'class="pictofixedwidth"');
553 print $formother->select_categories($tmp[1],
getDolGlobalString($constname), $constname, 0, $langs->trans(
'CustomersProspectsCategoriesShort'));
554 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
555 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
557 print $formcompany->selectProspectCustomerType(
getDolGlobalString($constname), $constname);
558 } elseif ($val[
'type'] ==
'securekey') {
559 print
'<input required="required" type="text" class="flat" id="' . $constname .
'" name="' . $constname .
'" value="' . (
GETPOST($constname,
'alpha') ?
GETPOST($constname,
'alpha') :
getDolGlobalString($constname)) .
'" size="40">';
560 if (!empty($conf->use_javascript_ajax)) {
561 print
' ' .
img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token' . $constname .
'" class="linkobject"');
565 include_once DOL_DOCUMENT_ROOT .
'/core/lib/security2.lib.php';
567 } elseif ($val[
'type'] ==
'product') {
568 if (isModEnabled(
'product') || isModEnabled(
'service')) {
570 $form->select_produits($selected, $constname,
'', 0);
573 print
'<input name="' . $constname .
'" class="flat ' . (empty($val[
'css']) ?
'minwidth200' : $val[
'css']) .
'" value="' .
getDolGlobalString($constname) .
'">';
580 print
'<br><div class="center">';
581 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
587 if (!empty($arrayofparameters)) {
588 print
'<table class="noborder centpercent">';
589 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
591 foreach ($arrayofparameters as $constname => $val) {
592 if ($val[
'enabled'] == 1) {
594 print
'<tr class="oddeven"><td>';
595 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
596 print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
599 if ($val[
'type'] ==
'textarea') {
601 } elseif ($val[
'type'] ==
'html') {
603 } elseif ($val[
'type'] ==
'yesno') {
604 print ajax_constantonoff($constname);
605 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
606 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
609 $tmp = explode(
':', $val[
'type']);
611 $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs,
getDolGlobalString($constname));
615 print $langs->trans($template->label);
616 } elseif (preg_match(
'/category:/', $val[
'type'])) {
622 $ways = $c->print_all_ways(
' >> ',
'none', 0, 1);
624 foreach ($ways as $way) {
625 $toprint[] =
'<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ?
' style="background: #' . $c->color .
';"' :
' style="background: #bbb"') .
'>' . $way .
'</li>';
627 print
'<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(
' ', $toprint) .
'</ul></div>';
628 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
630 print $langs->trans(
"Prospect");
632 print $langs->trans(
"ProspectCustomer");
634 print $langs->trans(
"Customer");
636 print $langs->trans(
"NorProspectNorCustomer");
638 } elseif ($val[
'type'] ==
'product') {
643 } elseif ($resprod < 0) {
655 print
'<div class="tabsAction">';
656 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit">'.$langs->trans(
"Modify").
'</a>';
659 print
'<br>'.$langs->trans(
"NothingToSetup");
664if (empty($setupnotempty)) {
665 print
'<br>'.$langs->trans(
"NothingToSetup");
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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.
Class to manage categories.
Class to manage a WYSIWYG editor.
Class to manage products or services.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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_get_fiche_end($notab=0)
Return tab footer of a card.
dol_nl2br($stringtoencode, $nl2brmode=0, $forxml=false)
Replace CRLF in string with a HTML BR tag.
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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.
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 dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
hrmAdminPrepareHead()
Prepare admin pages header.
$conf db name
Only used if Module[ID]Name translation string is not found.
dolJSToSetRandomPassword($htmlname, $htmlnameofbutton='generate_token', $generic=1)
Output javascript to autoset a generated password using default module into a HTML element.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.