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 ModelePDFEvaluation $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);
265 '@phan-var-force ModeleNumRefEvaluation $module';
268 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
271 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
275 if ($module->isEnabled()) {
276 dol_include_once(
'/'.$moduledir.
'/class/'.strtolower($myTmpObjectKey).
'.class.php');
278 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
279 print $module->info($langs);
283 print
'<td class="nowrap">';
284 $tmp = $module->getExample();
285 if (preg_match(
'/^Error/', $tmp)) {
286 $langs->load(
"errors");
287 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
288 } elseif ($tmp ==
'NotConfigured') {
289 print $langs->trans($tmp);
295 print
'<td class="center">';
296 $constforvar =
'HRMTEST_'.strtoupper($myTmpObjectKey).
'_ADDON';
298 print
img_picto($langs->trans(
"Activated"),
'switch_on');
300 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&object='.strtolower($myTmpObjectKey).
'&value='.urlencode($file).
'">';
301 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
306 $nameofclass = ucfirst($myTmpObjectKey);
307 $mytmpinstance =
new $nameofclass($db);
308 '@phan-var-force Evaluation $mytmpinstance';
309 $mytmpinstance->initAsSpecimen();
313 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
315 $nextval = $module->getNextValue($mytmpinstance);
316 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
317 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
319 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
320 $nextval = $langs->trans($nextval);
322 $htmltooltip .= $nextval.
'<br>';
324 $htmltooltip .= $langs->trans($module->error).
'<br>';
328 print
'<td class="center">';
329 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
343 if ($myTmpObjectArray[
'includedocgeneration']) {
348 $type = strtolower($myTmpObjectKey);
350 print
load_fiche_titre($langs->trans(
"DocumentModules", $myTmpObjectKey),
'',
'');
355 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
356 $sql .=
" WHERE type = '".$db->escape($type).
"'";
357 $sql .=
" AND entity = ".$conf->entity;
358 $resql = $db->query($sql);
361 $num_rows = $db->num_rows($resql);
362 while ($i < $num_rows) {
363 $array = $db->fetch_array($resql);
364 if (is_array($array)) {
365 array_push($def, $array[0]);
373 print
'<div class="div-table-responsive">';
374 print
'<table class="noborder centpercent">'.
"\n";
375 print
'<tr class="liste_titre">'.
"\n";
376 print
'<td>'.$langs->trans(
"Name").
'</td>';
377 print
'<td>'.$langs->trans(
"Description").
'</td>';
378 print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
379 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
380 print
'<td class="center" width="38">'.$langs->trans(
"ShortInfo").
'</td>';
381 print
'<td class="center" width="38">'.$langs->trans(
"Preview").
'</td>';
386 foreach ($dirmodels as $reldir) {
387 foreach (array(
'',
'/doc') as $valdir) {
388 $realpath = $reldir.
"core/modules/".$moduledir.$valdir;
392 $handle = opendir($dir);
393 if (is_resource($handle)) {
395 while (($file = readdir($handle)) !==
false) {
401 foreach ($filelist as $file) {
402 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
403 if (file_exists($dir.
'/'.$file)) {
404 $name = substr($file, 4,
dol_strlen($file) - 16);
405 $classname = substr($file, 0,
dol_strlen($file) - 12);
407 require_once $dir.
'/'.$file;
408 $module =
new $classname($db);
410 '@phan-var-force ModelePDFEvaluation $module';
412 $modulequalified = 1;
413 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
414 $modulequalified = 0;
416 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
417 $modulequalified = 0;
420 if ($modulequalified) {
421 print
'<tr class="oddeven"><td width="100">';
422 print(empty($module->name) ? $name : $module->
name);
424 if (method_exists($module,
'info')) {
425 print $module->info($langs);
427 print $module->description;
432 if (in_array($name, $def)) {
433 print
'<td class="center">'.
"\n";
434 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.$name.
'">';
435 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
439 print
'<td class="center">'.
"\n";
440 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>';
445 print
'<td class="center">';
446 $constforvar =
'HRMTEST_'.strtoupper($myTmpObjectKey).
'_ADDON';
450 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>';
452 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>';
457 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
458 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
459 if ($module->type ==
'pdf') {
460 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
462 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
464 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
465 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
466 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
468 print
'<td class="center">';
469 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
473 print
'<td class="center">';
474 if ($module->type ==
'pdf') {
475 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'&object='.$myTmpObjectKey.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
477 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
499 $conf->global->HRM_MAXRANK = Skill::DEFAULT_MAX_RANK_PER_SKILL;
502if ($action ==
'edit') {
503 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
504 print
'<input type="hidden" name="token" value="'.newToken().
'">';
505 print
'<input type="hidden" name="action" value="update">';
507 print
'<table class="noborder centpercent">';
508 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
510 foreach ($arrayofparameters as $constname => $val) {
511 if ($val[
'enabled'] == 1) {
513 print
'<tr class="oddeven"><td>';
514 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
515 print
'<span id="helplink'.$constname.
'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1,
'info',
'', 0, 3,
'tootips'.$constname).
'</span>';
518 if ($val[
'type'] ==
'textarea') {
519 print
'<textarea class="flat" name="' . $constname .
'" id="' . $constname .
'" cols="50" rows="5" wrap="soft">' .
"\n";
521 print
"</textarea>\n";
522 } elseif ($val[
'type'] ==
'integer') {
523 print
'<input class="flat" name="' . $constname .
'" id="' . $constname .
'" value="' .
getDolGlobalString($constname) .
'" type="number" step="1" min="0" max="50" >' .
"\n";
524 } elseif ($val[
'type'] ==
'html') {
525 require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
526 $doleditor =
new DolEditor($constname,
getDolGlobalString($constname),
'', 160,
'dolibarr_notes',
'',
false,
false, isModEnabled(
'fckeditor'), ROWS_5,
'90%');
527 $doleditor->Create();
528 } elseif ($val[
'type'] ==
'yesno') {
530 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
531 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
534 $tmp = explode(
':', $val[
'type']);
535 $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user,
null, 1);
537 $arrayofmessagename = array();
538 if (is_array($formmail->lines_model)) {
539 foreach ($formmail->lines_model as $modelmail) {
542 if (!empty($arrayofmessagename[$modelmail->label])) {
543 $moreonlabel =
' <span class="opacitymedium">(' . $langs->trans(
"SeveralLangugeVariatFound") .
')</span>';
546 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace(
'/\(|\)/',
'', $modelmail->label)) . $moreonlabel;
549 print $form->selectarray($constname, $arrayofmessagename,
getDolGlobalString($constname),
'None', 0, 0,
'', 0, 0, 0,
'',
'', 1);
550 } elseif (preg_match(
'/category:/', $val[
'type'])) {
551 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
552 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
555 $tmp = explode(
':', $val[
'type']);
556 print
img_picto(
'',
'category',
'class="pictofixedwidth"');
557 print $formother->select_categories($tmp[1],
getDolGlobalString($constname), $constname, 0, $langs->trans(
'CustomersProspectsCategoriesShort'));
558 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
559 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
561 print $formcompany->selectProspectCustomerType(
getDolGlobalString($constname), $constname);
562 } elseif ($val[
'type'] ==
'securekey') {
563 print
'<input required="required" type="text" class="flat" id="' . $constname .
'" name="' . $constname .
'" value="' . (
GETPOST($constname,
'alpha') ?
GETPOST($constname,
'alpha') :
getDolGlobalString($constname)) .
'" size="40">';
564 if (!empty($conf->use_javascript_ajax)) {
565 print
' ' .
img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token' . $constname .
'" class="linkobject"');
569 include_once DOL_DOCUMENT_ROOT .
'/core/lib/security2.lib.php';
571 } elseif ($val[
'type'] ==
'product') {
572 if (isModEnabled(
'product') || isModEnabled(
'service')) {
574 $form->select_produits($selected, $constname,
'', 0);
577 print
'<input name="' . $constname .
'" class="flat ' . (empty($val[
'css']) ?
'minwidth200' : $val[
'css']) .
'" value="' .
getDolGlobalString($constname) .
'">';
584 print
'<br><div class="center">';
585 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
591 if (!empty($arrayofparameters)) {
592 print
'<table class="noborder centpercent">';
593 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
595 foreach ($arrayofparameters as $constname => $val) {
596 if ($val[
'enabled'] == 1) {
598 print
'<tr class="oddeven"><td>';
599 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
600 print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
603 if ($val[
'type'] ==
'textarea') {
605 } elseif ($val[
'type'] ==
'html') {
607 } elseif ($val[
'type'] ==
'yesno') {
608 print ajax_constantonoff($constname);
609 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
610 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
613 $tmp = explode(
':', $val[
'type']);
615 $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs,
getDolGlobalString($constname));
619 print $langs->trans($template->label);
620 } elseif (preg_match(
'/category:/', $val[
'type'])) {
626 $ways = $c->print_all_ways(
' >> ',
'none', 0, 1);
628 foreach ($ways as $way) {
629 $toprint[] =
'<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ?
' style="background: #' . $c->color .
';"' :
' style="background: #bbb"') .
'>' . $way .
'</li>';
631 print
'<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(
' ', $toprint) .
'</ul></div>';
632 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
634 print $langs->trans(
"Prospect");
636 print $langs->trans(
"ProspectCustomer");
638 print $langs->trans(
"Customer");
640 print $langs->trans(
"NorProspectNorCustomer");
642 } elseif ($val[
'type'] ==
'product') {
647 } elseif ($resprod < 0) {
659 print
'<div class="tabsAction">';
660 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit">'.$langs->trans(
"Modify").
'</a>';
663 print
'<br>'.$langs->trans(
"NothingToSetup");
668if (empty($setupnotempty)) {
669 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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
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)
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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'.
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
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_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.
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.