31require
'../main.inc.php';
34require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
35require_once DOL_DOCUMENT_ROOT.
'/hrm/lib/hrm.lib.php';
36require_once DOL_DOCUMENT_ROOT.
'/hrm/class/skill.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/hrm/class/evaluation.class.php';
48$langs->loadLangs(array(
"admin",
"hrm"));
56$action =
GETPOST(
'action',
'aZ09');
57$backtopage =
GETPOST(
'backtopage',
'alpha');
59$value =
GETPOST(
'value',
'alpha');
60$label =
GETPOST(
'label',
'alpha');
61$modulepart =
GETPOST(
'modulepart',
'aZ09');
63$scandir =
GETPOST(
'scan_dir',
'alpha');
66$arrayofparameters = array(
67 'HRM_MAXRANK' => array(
'type' =>
'integer',
'enabled' => 1,
'css' =>
''),
68 'HRM_DEFAULT_SKILL_DESCRIPTION' => array(
'type' =>
'varchar',
'enabled' => 1,
'css' =>
''),
74$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
80 'label' =>
'Evaluation',
81 'includerefgeneration' => 1,
82 'includedocgeneration' => 1,
83 'class' =>
'Evaluation'
87$tmpobjectkey =
GETPOST(
'object',
'aZ09');
88if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) {
97include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
99if ($action ==
'update') {
103 if (!empty($max_rank)) {
104 $static_skill =
new Skill($db);
105 $TAllSkills = $static_skill->fetchAll();
106 if (is_array($TAllSkills)) {
107 foreach ($TAllSkills as &$skill) {
108 if (empty($skill->lines)) {
109 $skill->fetchLines();
111 if (count($skill->lines) <
$conf->global->HRM_MAXRANK) {
112 $skill->createSkills(count($skill->lines) + 1);
117} elseif ($action ==
'updateMask') {
118 $maskconst =
GETPOST(
'maskconstEvaluation',
'aZ09');
119 $maskvalue =
GETPOST(
'maskEvaluation',
'alpha');
121 if ($maskconst && preg_match(
'/_MASK$/', $maskconst)) {
133} elseif ($action ==
'specimen' && $tmpobjectkey) {
134 $modele =
GETPOST(
'module',
'alpha');
136 $className = $myTmpObjects[$tmpobjectkey][
'class'];
137 $tmpobject =
new $className($db);
138 $tmpobject->initAsSpecimen();
143 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
144 foreach ($dirmodels as $reldir) {
145 $file =
dol_buildpath($reldir.
"core/modules/hrm/doc/pdf_".$modele.
".modules.php", 0);
146 if (file_exists($file)) {
147 $classname =
"pdf_".$modele;
152 if ($classname !==
'') {
155 $module =
new $classname($db);
156 '@phan-var-force ModelePDFEvaluation $module';
158 if ($module->write_file($tmpobject, $langs) > 0) {
159 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=hrm&file=evaluation/SPECIMEN.pdf");
167 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
169} elseif ($action ==
'setmod') {
171 if (!empty($tmpobjectkey)) {
172 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
"_ADDON";
175} elseif ($action ==
'set') {
178} elseif ($action ==
'del') {
181 if (!empty($tmpobjectkey)) {
182 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
188} elseif ($action ==
'setdoc') {
190 if (!empty($tmpobjectkey)) {
191 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
195 $conf->global->$constforval = $value;
204} elseif ($action ==
'unsetdoc') {
205 if (!empty($tmpobjectkey)) {
206 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
216$form =
new Form($db);
219$page_name =
"HRMSetup";
221llxHeader(
'', $langs->trans($page_name), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-hrm');
224$linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
233foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
234 if ($myTmpObjectKey != $type) {
237 if ($myTmpObjectArray[
'includerefgeneration']) {
243 print
load_fiche_titre($langs->trans(
"NumberingModules").
' ('.$myTmpObjectArray[
'label'].
')',
'',
'');
245 print
'<table class="noborder centpercent">';
246 print
'<tr class="liste_titre">';
247 print
'<td>'.$langs->trans(
"Name").
'</td>';
248 print
'<td>'.$langs->trans(
"Description").
'</td>';
249 print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
250 print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
251 print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
256 foreach ($dirmodels as $reldir) {
260 $handle = opendir($dir);
261 if (is_resource($handle)) {
262 while (($file = readdir($handle)) !==
false) {
263 if (strpos($file,
'mod_'.strtolower($myTmpObjectKey).
'_') === 0 && substr($file,
dol_strlen($file) - 3, 3) ==
'php') {
264 $file = substr($file, 0,
dol_strlen($file) - 4);
266 require_once $dir.
'/'.$file.
'.php';
268 $module =
new $file($db);
270 '@phan-var-force ModeleNumRefEvaluation $module';
273 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
276 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
280 if ($module->isEnabled()) {
281 dol_include_once(
'/'.$moduledir.
'/class/'.strtolower($myTmpObjectKey).
'.class.php');
283 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
284 print $module->info($langs);
288 print
'<td class="nowrap">';
289 $tmp = $module->getExample();
290 if (preg_match(
'/^Error/', $tmp)) {
291 $langs->load(
"errors");
292 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
293 } elseif ($tmp ==
'NotConfigured') {
294 print $langs->trans($tmp);
300 print
'<td class="center">';
301 $constforvar =
'HRMTEST_'.strtoupper($myTmpObjectKey).
'_ADDON';
303 print
img_picto($langs->trans(
"Activated"),
'switch_on');
305 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&object='.strtolower($myTmpObjectKey).
'&value='.urlencode($file).
'">';
306 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
311 $nameofclass = ucfirst($myTmpObjectKey);
312 $mytmpinstance =
new $nameofclass($db);
313 '@phan-var-force Evaluation $mytmpinstance';
314 $mytmpinstance->initAsSpecimen();
318 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
320 $nextval = $module->getNextValue($mytmpinstance);
321 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
322 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
324 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
325 $nextval = $langs->trans($nextval);
327 $htmltooltip .= $nextval.
'<br>';
329 $htmltooltip .= $langs->trans($module->error).
'<br>';
333 print
'<td class="center">';
334 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
348 if ($myTmpObjectArray[
'includedocgeneration']) {
353 $type = strtolower($myTmpObjectKey);
355 print
load_fiche_titre($langs->trans(
"DocumentModules", $myTmpObjectKey),
'',
'');
360 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
361 $sql .=
" WHERE type = '".$db->escape($type).
"'";
362 $sql .=
" AND entity = ".$conf->entity;
363 $resql = $db->query($sql);
366 $num_rows = $db->num_rows($resql);
367 while ($i < $num_rows) {
368 $array = $db->fetch_array($resql);
369 if (is_array($array)) {
370 array_push($def, $array[0]);
378 print
'<div class="div-table-responsive">';
379 print
'<table class="noborder centpercent">'.
"\n";
380 print
'<tr class="liste_titre">'.
"\n";
381 print
'<td>'.$langs->trans(
"Name").
'</td>';
382 print
'<td>'.$langs->trans(
"Description").
'</td>';
383 print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
384 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
385 print
'<td class="center" width="38">'.$langs->trans(
"ShortInfo").
'</td>';
386 print
'<td class="center" width="38">'.$langs->trans(
"Preview").
'</td>';
391 foreach ($dirmodels as $reldir) {
392 foreach (array(
'',
'/doc') as $valdir) {
393 $realpath = $reldir.
"core/modules/".$moduledir.$valdir;
397 $handle = opendir($dir);
398 if (is_resource($handle)) {
400 while (($file = readdir($handle)) !==
false) {
406 foreach ($filelist as $file) {
407 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
408 if (file_exists($dir.
'/'.$file)) {
409 $name = substr($file, 4,
dol_strlen($file) - 16);
410 $classname = substr($file, 0,
dol_strlen($file) - 12);
412 require_once $dir.
'/'.$file;
413 $module =
new $classname($db);
415 '@phan-var-force ModelePDFEvaluation $module';
417 $modulequalified = 1;
418 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
419 $modulequalified = 0;
421 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
422 $modulequalified = 0;
425 if ($modulequalified) {
426 print
'<tr class="oddeven"><td width="100">';
427 print(empty($module->name) ? $name : $module->
name);
429 if (method_exists($module,
'info')) {
430 print $module->info($langs);
432 print $module->description;
437 if (in_array($name, $def)) {
438 print
'<td class="center">'.
"\n";
439 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.
newToken().
'&value='.$name.
'">';
440 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
444 print
'<td class="center">'.
"\n";
445 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>';
450 print
'<td class="center">';
451 $constforvar =
'HRMTEST_'.strtoupper($myTmpObjectKey).
'_ADDON';
455 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>';
457 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>';
462 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
463 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
464 if ($module->type ==
'pdf') {
465 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
467 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
469 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
470 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
471 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
473 print
'<td class="center">';
474 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
478 print
'<td class="center">';
479 if ($module->type ==
'pdf') {
480 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'&object='.$myTmpObjectKey.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
482 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
504 $conf->global->HRM_MAXRANK = Skill::DEFAULT_MAX_RANK_PER_SKILL;
507if ($action ==
'edit') {
508 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
509 print
'<input type="hidden" name="token" value="'.newToken().
'">';
510 print
'<input type="hidden" name="action" value="update">';
512 print
'<table class="noborder centpercent">';
513 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
515 foreach ($arrayofparameters as $constname => $val) {
516 if ($val[
'enabled'] == 1) {
518 print
'<tr class="oddeven"><td>';
519 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
520 print
'<span id="helplink'.$constname.
'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1,
'info',
'', 0, 3,
'tootips'.$constname).
'</span>';
523 if ($val[
'type'] ==
'textarea') {
524 print
'<textarea class="flat" name="' . $constname .
'" id="' . $constname .
'" cols="50" rows="5" wrap="soft">' .
"\n";
526 print
"</textarea>\n";
527 } elseif ($val[
'type'] ==
'integer') {
528 print
'<input class="flat" name="' . $constname .
'" id="' . $constname .
'" value="' .
getDolGlobalString($constname) .
'" type="number" step="1" min="0" max="50" >' .
"\n";
529 } elseif ($val[
'type'] ==
'html') {
530 require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
531 $doleditor =
new DolEditor($constname,
getDolGlobalString($constname),
'', 160,
'dolibarr_notes',
'',
false,
false, isModEnabled(
'fckeditor'), ROWS_5,
'90%');
532 $doleditor->Create();
533 } elseif ($val[
'type'] ==
'yesno') {
535 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
536 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
539 $tmp = explode(
':', $val[
'type']);
540 $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user,
null, 1);
542 $arrayofmessagename = array();
543 if (is_array($formmail->lines_model)) {
544 foreach ($formmail->lines_model as $modelmail) {
547 if (!empty($arrayofmessagename[$modelmail->label])) {
548 $moreonlabel =
' <span class="opacitymedium">(' . $langs->trans(
"SeveralLangugeVariatFound") .
')</span>';
551 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace(
'/\(|\)/',
'', $modelmail->label)) . $moreonlabel;
554 print $form->selectarray($constname, $arrayofmessagename,
getDolGlobalString($constname),
'None', 0, 0,
'', 0, 0, 0,
'',
'', 1);
555 } elseif (preg_match(
'/category:/', $val[
'type'])) {
556 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
557 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
560 $tmp = explode(
':', $val[
'type']);
561 print
img_picto(
'',
'category',
'class="pictofixedwidth"');
562 print $formother->select_categories($tmp[1],
getDolGlobalString($constname), $constname, 0, $langs->trans(
'CustomersProspectsCategoriesShort'));
563 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
564 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
566 print $formcompany->selectProspectCustomerType(
getDolGlobalString($constname), $constname);
567 } elseif ($val[
'type'] ==
'securekey') {
568 print
'<input required="required" type="text" class="flat" id="' . $constname .
'" name="' . $constname .
'" value="' . (
GETPOST($constname,
'alpha') ?
GETPOST($constname,
'alpha') :
getDolGlobalString($constname)) .
'" size="40">';
569 if (!empty(
$conf->use_javascript_ajax)) {
570 print
' ' .
img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token' . $constname .
'" class="linkobject"');
574 include_once DOL_DOCUMENT_ROOT .
'/core/lib/security2.lib.php';
576 } elseif ($val[
'type'] ==
'product') {
577 if (isModEnabled(
'product') || isModEnabled(
'service')) {
579 $form->select_produits($selected, $constname,
'', 0);
582 print
'<input name="' . $constname .
'" class="flat ' . (empty($val[
'css']) ?
'minwidth200' : $val[
'css']) .
'" value="' .
getDolGlobalString($constname) .
'">';
589 print
'<br><div class="center">';
590 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
596 if (!empty($arrayofparameters)) {
597 print
'<table class="noborder centpercent">';
598 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
600 foreach ($arrayofparameters as $constname => $val) {
601 if ($val[
'enabled'] == 1) {
603 print
'<tr class="oddeven"><td>';
604 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
605 print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
608 if ($val[
'type'] ==
'textarea') {
610 } elseif ($val[
'type'] ==
'html') {
612 } elseif ($val[
'type'] ==
'yesno') {
613 print ajax_constantonoff($constname);
614 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
615 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
618 $tmp = explode(
':', $val[
'type']);
620 $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs,
getDolGlobalString($constname));
624 print $langs->trans($template->label);
625 } elseif (preg_match(
'/category:/', $val[
'type'])) {
631 $ways = $c->print_all_ways(
' >> ',
'none', 0, 1);
633 foreach ($ways as $way) {
634 $toprint[] =
'<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ?
' style="background: #' . $c->color .
';"' :
' style="background: #bbb"') .
'>' . $way .
'</li>';
636 print
'<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(
' ', $toprint) .
'</ul></div>';
637 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
639 print $langs->trans(
"Prospect");
641 print $langs->trans(
"ProspectCustomer");
643 print $langs->trans(
"Customer");
645 print $langs->trans(
"NorProspectNorCustomer");
647 } elseif ($val[
'type'] ==
'product') {
652 } elseif ($resprod < 0) {
664 print
'<div class="tabsAction">';
665 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit">'.$langs->trans(
"Modify").
'</a>';
668 print
'<br>'.$langs->trans(
"NothingToSetup");
673if (empty($setupnotempty)) {
674 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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
$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.