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');
69$arrayofparameters = array(
70 'HRM_MAXRANK' => array(
'type' =>
'integer',
'enabled' => 1,
'css' =>
''),
71 'HRM_DEFAULT_SKILL_DESCRIPTION' => array(
'type' =>
'varchar',
'enabled' => 1,
'css' =>
''),
77$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
83 'label' =>
'Evaluation',
84 'includerefgeneration' => 1,
85 'includedocgeneration' => 1,
86 'class' =>
'Evaluation'
90$tmpobjectkey =
GETPOST(
'object',
'aZ09');
91if ($tmpobjectkey && !array_key_exists($tmpobjectkey, $myTmpObjects)) {
100include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
102if ($action ==
'update') {
106 if (!empty($max_rank)) {
107 $static_skill =
new Skill($db);
108 $TAllSkills = $static_skill->fetchAll();
109 if (is_array($TAllSkills)) {
110 foreach ($TAllSkills as &$skill) {
111 if (empty($skill->lines)) {
112 $skill->fetchLines();
114 if (count($skill->lines) <
$conf->global->HRM_MAXRANK) {
115 $skill->createSkills(count($skill->lines) + 1);
120} elseif ($action ==
'updateMask') {
121 $maskconst =
GETPOST(
'maskconstEvaluation',
'aZ09');
122 $maskvalue =
GETPOST(
'maskEvaluation',
'alpha');
124 if ($maskconst && preg_match(
'/_MASK$/', $maskconst)) {
132 setEventMessages($langs->trans(
"SetupSaved"),
null,
'mesgs');
134 setEventMessages($langs->trans(
"Error"),
null,
'errors');
136} elseif ($action ==
'specimen' && $tmpobjectkey) {
137 $modele =
GETPOST(
'module',
'alpha');
139 $className = $myTmpObjects[$tmpobjectkey][
'class'];
140 $tmpobject =
new $className($db);
141 $tmpobject->initAsSpecimen();
146 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
147 foreach ($dirmodels as $reldir) {
148 $file =
dol_buildpath($reldir.
"core/modules/hrm/doc/pdf_".$modele.
".modules.php", 0);
149 if (file_exists($file)) {
150 $classname =
"pdf_".$modele;
155 if ($classname !==
'') {
159 '@phan-var-force ModelePDFEvaluation $module';
161 if (
$module->write_file($tmpobject, $langs) > 0) {
162 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=hrm&file=evaluation/SPECIMEN.pdf");
165 setEventMessages(
$module->error,
null,
'errors');
169 setEventMessages($langs->trans(
"ErrorModuleNotFound"),
null,
'errors');
170 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
172} elseif ($action ==
'setmod') {
174 if (!empty($tmpobjectkey)) {
175 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
"_ADDON";
178} elseif ($action ==
'set') {
181} elseif ($action ==
'del') {
184 if (!empty($tmpobjectkey)) {
185 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
191} elseif ($action ==
'setdoc') {
193 if (!empty($tmpobjectkey)) {
194 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
198 $conf->global->$constforval = $value;
207} elseif ($action ==
'unsetdoc') {
208 if (!empty($tmpobjectkey)) {
209 $constforval =
'HRMTEST_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
219$form =
new Form($db);
222$page_name =
"HRMSetup";
224llxHeader(
'', $langs->trans($page_name), $help_url,
'', 0, 0,
'',
'',
'',
'mod-admin page-hrm');
227$linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.img_picto($langs->trans(
"BackToModuleList"),
'back',
'class="pictofixedwidth"').
'<span class="hideonsmartphone">'.$langs->trans(
"BackToModuleList").
'</span></a>';
236foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
237 if ($myTmpObjectKey != $type) {
240 if ($myTmpObjectArray[
'includerefgeneration']) {
246 print
load_fiche_titre($langs->trans(
"NumberingModules").
' ('.$myTmpObjectArray[
'label'].
')',
'',
'');
248 print
'<table class="noborder centpercent">';
249 print
'<tr class="liste_titre">';
250 print
'<td>'.$langs->trans(
"Name").
'</td>';
251 print
'<td>'.$langs->trans(
"Description").
'</td>';
252 print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
253 print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
254 print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
259 foreach ($dirmodels as $reldir) {
263 $handle = opendir($dir);
264 if (is_resource($handle)) {
265 while (($file = readdir($handle)) !==
false) {
266 if (strpos($file,
'mod_'.strtolower($myTmpObjectKey).
'_') === 0 &&
dol_substr($file,
dol_strlen($file) - 3, 3) ==
'php') {
269 require_once $dir.
'/'.$file.
'.php';
272 '@phan-var-force ModeleNumRefEvaluation $module';
284 dol_include_once(
'/'.$moduledir.
'/class/'.strtolower($myTmpObjectKey).
'.class.php');
286 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
291 print
'<td class="nowrap">';
293 if (preg_match(
'/^Error/', $tmp)) {
294 $langs->load(
"errors");
295 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
296 } elseif ($tmp ==
'NotConfigured') {
297 print $langs->trans($tmp);
303 print
'<td class="center">';
304 $constforvar =
'HRMTEST_'.strtoupper($myTmpObjectKey).
'_ADDON';
306 print img_picto($langs->trans(
"Activated"),
'switch_on');
308 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.
newToken().
'&object='.strtolower($myTmpObjectKey).
'&value='.urlencode($file).
'">';
309 print img_picto($langs->trans(
"Disabled"),
'switch_off');
314 $nameofclass = ucfirst($myTmpObjectKey);
315 $mytmpinstance =
new $nameofclass($db);
316 '@phan-var-force Evaluation $mytmpinstance';
318 $mytmpinstance->initAsSpecimen();
322 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.
$module->getVersion().
'</b><br>';
324 $nextval =
$module->getNextValue($mytmpinstance);
325 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
326 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
328 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
329 $nextval = $langs->trans($nextval);
331 $htmltooltip .= $nextval.
'<br>';
333 $htmltooltip .= $langs->trans(
$module->error).
'<br>';
337 print
'<td class="center">';
338 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
352 if ($myTmpObjectArray[
'includedocgeneration']) {
357 $type = strtolower($myTmpObjectKey);
359 print
load_fiche_titre($langs->trans(
"DocumentModules", $myTmpObjectKey),
'',
'');
364 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
365 $sql .=
" WHERE type = '".$db->escape($type).
"'";
366 $sql .=
" AND entity = ".((int)
$conf->entity);
367 $resql = $db->query($sql);
370 $num_rows = $db->num_rows($resql);
371 while ($i < $num_rows) {
372 $array = $db->fetch_array($resql);
373 if (is_array($array)) {
374 array_push($def, $array[0]);
379 dol_print_error($db);
382 print
'<div class="div-table-responsive">';
383 print
'<table class="noborder centpercent">'.
"\n";
384 print
'<tr class="liste_titre">'.
"\n";
385 print
'<td>'.$langs->trans(
"Name").
'</td>';
386 print
'<td>'.$langs->trans(
"Description").
'</td>';
387 print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
388 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
389 print
'<td class="center" width="38">'.$langs->trans(
"ShortInfo").
'</td>';
390 print
'<td class="center" width="38">'.$langs->trans(
"Preview").
'</td>';
395 foreach ($dirmodels as $reldir) {
396 foreach (array(
'',
'/doc') as $valdir) {
397 $realpath = $reldir.
"core/modules/".$moduledir.$valdir;
401 $handle = opendir($dir);
402 if (is_resource($handle)) {
404 while (($file = readdir($handle)) !==
false) {
410 foreach ($filelist as $file) {
411 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
412 if (file_exists($dir.
'/'.$file)) {
416 require_once $dir.
'/'.$file;
419 '@phan-var-force ModelePDFEvaluation $module';
421 $modulequalified = 1;
423 $modulequalified = 0;
426 $modulequalified = 0;
429 if ($modulequalified) {
430 print
'<tr class="oddeven"><td width="100">';
433 if (method_exists(
$module,
'info')) {
441 if (in_array($name, $def)) {
442 print
'<td class="center">'.
"\n";
443 print
'<a href="'.dolBuildUrl($_SERVER[
"PHP_SELF"], [
'action' =>
'del',
'value' => $name],
true).
'">';
444 print img_picto($langs->trans(
"Enabled"),
'switch_on');
448 print
'<td class="center">'.
"\n";
449 print
'<a href="'.dolBuildUrl($_SERVER[
"PHP_SELF"], [
'action' =>
'set',
'value' => $name,
'scan_dir' =>
$module->scandir,
'label' =>
$module->name],
true).
'">'.img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
454 print
'<td class="center">';
455 $constforvar =
'HRMTEST_'.strtoupper($myTmpObjectKey).
'_ADDON';
459 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>';
461 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>';
466 $htmltooltip =
''.$langs->trans(
"Name").
': '.
$module->name;
467 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.(
$module->type ?
$module->type : $langs->trans(
"Unknown"));
469 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.
$module->page_largeur.
'/'.
$module->page_hauteur;
471 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
473 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
474 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.yn(
$module->option_logo, 1, 1);
475 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.yn(
$module->option_multilang, 1, 1);
477 print
'<td class="center">';
478 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
482 print
'<td class="center">';
484 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'&object='.$myTmpObjectKey.
'">'.img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
486 print img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
508 $conf->global->HRM_MAXRANK = Skill::DEFAULT_MAX_RANK_PER_SKILL;
511if ($action !=
'editxxx') {
512 print
'<form method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'" spellcheck="false">';
513 print
'<input type="hidden" name="token" value="'.newToken().
'">';
514 print
'<input type="hidden" name="action" value="update">';
516 print
'<table class="noborder centpercent">';
517 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
519 foreach ($arrayofparameters as $constname => $val) {
520 if ($val[
'enabled'] == 1) {
522 print
'<tr class="oddeven"><td>';
523 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
524 print
'<span id="helplink'.$constname.
'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1,
'info',
'', 0, 3,
'tootips'.$constname).
'</span>';
527 if ($val[
'type'] ==
'textarea') {
528 print
'<textarea class="flat" name="' . $constname .
'" id="' . $constname .
'" cols="50" rows="5" wrap="soft">' .
"\n";
530 print
"</textarea>\n";
531 } elseif ($val[
'type'] ==
'integer') {
532 print
'<input class="flat" name="' . $constname .
'" id="' . $constname .
'" value="' .
getDolGlobalString($constname) .
'" type="number" step="1" min="0" max="50" >' .
"\n";
533 } elseif ($val[
'type'] ==
'html') {
534 require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
535 $doleditor =
new DolEditor($constname,
getDolGlobalString($constname),
'', 160,
'dolibarr_notes',
'',
false,
false,
isModEnabled(
'fckeditor'), ROWS_5,
'90%');
536 $doleditor->Create();
537 } elseif ($val[
'type'] ==
'yesno') {
539 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
540 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
543 $tmp = explode(
':', $val[
'type']);
544 $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user,
null, 1);
546 $arrayofmessagename = array();
547 if (is_array($formmail->lines_model)) {
548 foreach ($formmail->lines_model as $modelmail) {
551 if (!empty($arrayofmessagename[$modelmail->label])) {
552 $moreonlabel =
' <span class="opacitymedium">(' . $langs->trans(
"SeveralLangugeVariatFound") .
')</span>';
555 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace(
'/\(|\)/',
'', $modelmail->label)) . $moreonlabel;
558 print $form->selectarray($constname, $arrayofmessagename,
getDolGlobalString($constname),
'None', 0, 0,
'', 0, 0, 0,
'',
'', 1);
559 } elseif (preg_match(
'/category:/', $val[
'type'])) {
560 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
561 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
564 $tmp = explode(
':', $val[
'type']);
565 print img_picto(
'',
'category',
'class="pictofixedwidth"');
566 print $formother->select_categories($tmp[1],
getDolGlobalInt($constname), $constname, 0, $langs->trans(
'CustomersProspectsCategoriesShort'));
567 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
568 require_once DOL_DOCUMENT_ROOT .
'/core/class/html.formcompany.class.php';
570 print $formcompany->selectProspectCustomerType(
getDolGlobalString($constname), $constname);
571 } elseif ($val[
'type'] ==
'securekey') {
572 print
'<input required="required" type="text" class="flat" id="' . $constname .
'" name="' . $constname .
'" value="' . (
GETPOST($constname,
'alpha') ?
GETPOST($constname,
'alpha') :
getDolGlobalString($constname)) .
'" size="40">';
573 if (!empty(
$conf->use_javascript_ajax)) {
574 print
' ' . img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token' . $constname .
'" class="linkobject"');
578 include_once DOL_DOCUMENT_ROOT .
'/core/lib/security2.lib.php';
580 } elseif ($val[
'type'] ==
'product') {
583 $form->select_produits($selected, $constname,
'', 0);
586 print
'<input name="' . $constname .
'" class="flat ' . (empty($val[
'css']) ?
'minwidth200' : $val[
'css']) .
'" value="' .
getDolGlobalString($constname) .
'">';
593 print
'<br><div class="center">';
594 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
600 if (!empty($arrayofparameters)) {
601 print
'<table class="noborder centpercent">';
602 print
'<tr class="liste_titre"><td>'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
604 foreach ($arrayofparameters as $constname => $val) {
605 if ($val[
'enabled'] == 1) {
607 print
'<tr class="oddeven"><td>';
608 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
609 print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
612 if ($val[
'type'] ==
'textarea') {
614 } elseif ($val[
'type'] ==
'html') {
616 } elseif ($val[
'type'] ==
'yesno') {
617 print ajax_constantonoff($constname);
618 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
619 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
622 $tmp = explode(
':', $val[
'type']);
624 $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs,
getDolGlobalInt($constname));
626 setEventMessages(
null, $formmail->errors,
'errors');
628 print $langs->trans($template->label);
629 } elseif (preg_match(
'/category:/', $val[
'type'])) {
633 setEventMessages(
null,
$c->errors,
'errors');
635 $ways =
$c->print_all_ways(
'auto',
'none', 0, 1);
637 foreach ($ways as $way) {
638 $toprint[] =
'<li class="select2-search-choice-dolibarr noborderoncategories"' . (
$c->color ?
' style="background: #' .
$c->color .
';"' :
' style="background: #bbb"') .
'>' . $way .
'</li>';
640 print
'<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(
' ', $toprint) .
'</ul></div>';
641 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
643 print $langs->trans(
"Prospect");
645 print $langs->trans(
"ProspectCustomer");
647 print $langs->trans(
"Customer");
649 print $langs->trans(
"NorProspectNorCustomer");
651 } elseif ($val[
'type'] ==
'product') {
656 } elseif ($resprod < 0) {
657 setEventMessages($product->error, $product->errors,
"errors");
668 print
'<div class="tabsAction">';
669 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit">'.$langs->trans(
"Modify").
'</a>';
672 print
'<br>'.$langs->trans(
"NothingToSetup");
677if (empty($setupnotempty)) {
678 print
'<br>'.$langs->trans(
"NothingToSetup");
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.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
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.
if(! $sortfield) if(! $sortorder) $module
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, $nodefault=0)
Return value of a param into GET or POST supervariable.
dol_substr($string, $start, $length=null, $stringencoding='', $trunconbytes=0)
Make a substring.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
hrmAdminPrepareHead()
Prepare admin pages header.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
$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.