25require
'../main.inc.php';
26require_once DOL_DOCUMENT_ROOT.
"/core/lib/admin.lib.php";
27require_once DOL_DOCUMENT_ROOT.
'/webhook/lib/webhook.lib.php';
30$langs->loadLangs(array(
"admin",
"webhook"));
33$hookmanager->initHooks(array(
'webhooksetup',
'globalsetup'));
41$action =
GETPOST(
'action',
'aZ09');
42$backtopage =
GETPOST(
'backtopage',
'alpha');
43$modulepart =
GETPOST(
'modulepart',
'aZ09');
45$value =
GETPOST(
'value',
'alpha');
46$label =
GETPOST(
'label',
'alpha');
47$scandir =
GETPOST(
'scan_dir',
'alpha');
57if (!class_exists(
'FormSetup')) {
59 if (floatval(DOL_VERSION) < 16.0 && !class_exists(
'FormSetup')) {
60 require_once __DIR__.
'/../backport/v16/core/class/html.formsetup.class.php';
62 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formsetup.class.php';
69$setupnotempty = count($formSetup->items);
72$dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
79include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
81if ($action ==
'updateMask') {
82 $maskconst =
GETPOST(
'maskconst',
'aZ09');
83 $maskvalue =
GETPOST(
'maskvalue',
'alpha');
85 if ($maskconst && preg_match(
'/_MASK$/', $maskconst)) {
86 $res =
dolibarr_set_const($db, $maskconst, $maskvalue,
'chaine', 0,
'', $conf->entity);
97} elseif ($action ==
'specimen') {
98 $modele =
GETPOST(
'module',
'alpha');
99 $tmpobjectkey =
GETPOST(
'object');
101 $tmpobject =
new $tmpobjectkey($db);
102 $tmpobject->initAsSpecimen();
105 $file =
''; $classname =
''; $filefound = 0;
106 $dirmodels = array_merge(array(
'/'), (array) $conf->modules_parts[
'models']);
107 foreach ($dirmodels as $reldir) {
108 $file =
dol_buildpath($reldir.
"core/modules/webhook/doc/pdf_".$modele.
"_".strtolower($tmpobjectkey).
".modules.php", 0);
109 if (file_exists($file)) {
111 $classname =
"pdf_".$modele.
"_".strtolower($tmpobjectkey);
119 $module =
new $classname($db);
121 if ($module->write_file($tmpobject, $langs) > 0) {
122 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=webhook-".strtolower($tmpobjectkey).
"&file=SPECIMEN.pdf");
130 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
132} elseif ($action ==
'setmod') {
134 $tmpobjectkey =
GETPOST(
'object');
135 if (!empty($tmpobjectkey)) {
136 $constforval =
'WEBHOOK_'.strtoupper($tmpobjectkey).
"_ADDON";
139} elseif ($action ==
'set') {
142} elseif ($action ==
'del') {
145 $tmpobjectkey =
GETPOST(
'object');
146 if (!empty($tmpobjectkey)) {
147 $constforval =
'WEBHOOK_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
148 if ($conf->global->$constforval ==
"$value") {
153} elseif ($action ==
'setdoc') {
155 $tmpobjectkey =
GETPOST(
'object');
156 if (!empty($tmpobjectkey)) {
157 $constforval =
'WEBHOOK_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
161 $conf->global->$constforval = $value;
170} elseif ($action ==
'unsetdoc') {
171 $tmpobjectkey =
GETPOST(
'object');
172 if (!empty($tmpobjectkey)) {
173 $constforval =
'WEBHOOK_'.strtoupper($tmpobjectkey).
'_ADDON_PDF';
184$form =
new Form($db);
187$page_name =
"WebhookSetup";
189llxHeader(
'', $langs->trans($page_name), $help_url);
192$linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
201echo
'<span class="opacitymedium">'.$langs->trans(
"WebhookSetupPage").
'</span><br><br>';
204if ($action ==
'edit') {
205 if ($useFormSetup && (
float) DOL_VERSION >= 15) {
206 print $formSetup->generateOutput(
true);
208 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
209 print
'<input type="hidden" name="token" value="'.newToken().
'">';
210 print
'<input type="hidden" name="action" value="update">';
212 print
'<table class="noborder centpercent">';
213 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
215 foreach ($arrayofparameters as $constname => $val) {
216 if ($val[
'enabled']==1) {
218 print
'<tr class="oddeven"><td>';
219 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
220 print
'<span id="helplink'.$constname.
'" class="spanforparamtooltip">'.$form->textwithpicto($langs->trans($constname), $tooltiphelp, 1,
'info',
'', 0, 3,
'tootips'.$constname).
'</span>';
223 if ($val[
'type'] ==
'textarea') {
224 print
'<textarea class="flat" name="'.$constname.
'" id="'.$constname.
'" cols="50" rows="5" wrap="soft">' .
"\n";
226 print
"</textarea>\n";
227 } elseif ($val[
'type']==
'html') {
228 require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
229 $doleditor =
new DolEditor($constname,
getDolGlobalString($constname),
'', 160,
'dolibarr_notes',
'',
false,
false, isModEnabled(
'fckeditor'), ROWS_5,
'90%');
230 $doleditor->Create();
231 } elseif ($val[
'type'] ==
'yesno') {
233 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
234 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
237 $tmp = explode(
':', $val[
'type']);
238 $nboftemplates = $formmail->fetchAllEMailTemplate($tmp[1], $user,
null, 1);
240 $arrayofmessagename = array();
241 if (is_array($formmail->lines_model)) {
242 foreach ($formmail->lines_model as $modelmail) {
245 if (!empty($arrayofmessagename[$modelmail->label])) {
246 $moreonlabel =
' <span class="opacitymedium">(' . $langs->trans(
"SeveralLangugeVariatFound") .
')</span>';
249 $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace(
'/\(|\)/',
'', $modelmail->label)) . $moreonlabel;
252 print $form->selectarray($constname, $arrayofmessagename, $conf->global->{$constname},
'None', 0, 0,
'', 0, 0, 0,
'',
'', 1);
253 } elseif (preg_match(
'/category:/', $val[
'type'])) {
254 require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
255 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
258 $tmp = explode(
':', $val[
'type']);
259 print
img_picto(
'',
'category',
'class="pictofixedwidth"');
260 print $formother->select_categories($tmp[1], $conf->global->{$constname}, $constname, 0, $langs->trans(
'CustomersProspectsCategoriesShort'));
261 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
262 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
264 print $formcompany->selectProspectCustomerType($conf->global->{$constname}, $constname);
265 } elseif ($val[
'type'] ==
'securekey') {
266 print
'<input required="required" type="text" class="flat" id="'.$constname.
'" name="'.$constname.
'" value="'.(
GETPOST($constname,
'alpha') ?
GETPOST($constname,
'alpha') : $conf->global->{$constname}).
'" size="40">';
267 if (!empty($conf->use_javascript_ajax)) {
268 print
' '.img_picto($langs->trans(
'Generate'),
'refresh',
'id="generate_token'.$constname.
'" class="linkobject"');
272 include_once DOL_DOCUMENT_ROOT.
'/core/lib/security2.lib.php';
274 } elseif ($val[
'type'] ==
'product') {
275 if (isModEnabled(
"product") || isModEnabled(
"service")) {
276 $selected = (empty($conf->global->$constname) ?
'' : $conf->global->$constname);
277 $form->select_produits($selected, $constname,
'', 0);
280 print
'<input name="'.$constname.
'" class="flat '.(empty($val[
'css']) ?
'minwidth200' : $val[
'css']).
'" value="'.$conf->global->{$constname}.
'">';
287 print
'<br><div class="center">';
288 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
296 if ($useFormSetup && (
float) DOL_VERSION >= 15) {
297 if (!empty($formSetup->items)) {
298 print $formSetup->generateOutput();
301 if (!empty($arrayofparameters)) {
302 print
'<table class="noborder centpercent">';
303 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
305 foreach ($arrayofparameters as $constname => $val) {
306 if ($val[
'enabled']==1) {
308 print
'<tr class="oddeven"><td>';
309 $tooltiphelp = (($langs->trans($constname .
'Tooltip') != $constname .
'Tooltip') ? $langs->trans($constname .
'Tooltip') :
'');
310 print $form->textwithpicto($langs->trans($constname), $tooltiphelp);
313 if ($val[
'type'] ==
'textarea') {
315 } elseif ($val[
'type']==
'html') {
317 } elseif ($val[
'type'] ==
'yesno') {
318 print ajax_constantonoff($constname);
319 } elseif (preg_match(
'/emailtemplate:/', $val[
'type'])) {
320 include_once DOL_DOCUMENT_ROOT .
'/core/class/html.formmail.class.php';
323 $tmp = explode(
':', $val[
'type']);
325 $template = $formmail->getEMailTemplate($db, $tmp[1], $user, $langs,
getDolGlobalString($constname));
329 print $langs->trans($template->label);
330 } elseif (preg_match(
'/category:/', $val[
'type'])) {
335 } elseif ($result > 0 ) {
336 $ways = $c->print_all_ways(
' >> ',
'none', 0, 1);
338 foreach ($ways as $way) {
339 $toprint[] =
'<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ?
' style="background: #' . $c->color .
';"' :
' style="background: #bbb"') .
'>' . $way .
'</li>';
341 print
'<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(
' ', $toprint) .
'</ul></div>';
343 } elseif (preg_match(
'/thirdparty_type/', $val[
'type'])) {
345 print $langs->trans(
"Prospect");
347 print $langs->trans(
"ProspectCustomer");
349 print $langs->trans(
"Customer");
351 print $langs->trans(
"NorProspectNorCustomer");
353 } elseif ($val[
'type'] ==
'product') {
358 } elseif ($resprod < 0) {
372 if ($setupnotempty) {
373 print
'<div class="tabsAction">';
374 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.newToken().
'">'.$langs->trans(
"Modify").
'</a>';
382$moduledir =
'webhook';
383$myTmpObjects[
'MyObject'] = array(
'includerefgeneration'=>0,
'includedocgeneration'=>0);
386foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
387 if ($myTmpObjectKey ==
'MyObject') {
390 if ($myTmpObjectArray[
'includerefgeneration']) {
396 print
load_fiche_titre($langs->trans(
"NumberingModules", $myTmpObjectKey),
'',
'');
398 print
'<table class="noborder centpercent">';
399 print
'<tr class="liste_titre">';
400 print
'<td>'.$langs->trans(
"Name").
'</td>';
401 print
'<td>'.$langs->trans(
"Description").
'</td>';
402 print
'<td class="nowrap">'.$langs->trans(
"Example").
'</td>';
403 print
'<td class="center" width="60">'.$langs->trans(
"Status").
'</td>';
404 print
'<td class="center" width="16">'.$langs->trans(
"ShortInfo").
'</td>';
409 foreach ($dirmodels as $reldir) {
413 $handle = opendir($dir);
414 if (is_resource($handle)) {
415 while (($file = readdir($handle)) !==
false) {
416 if (strpos($file,
'mod_'.strtolower($myTmpObjectKey).
'_') === 0 && substr($file,
dol_strlen($file) - 3, 3) ==
'php') {
417 $file = substr($file, 0,
dol_strlen($file) - 4);
419 require_once $dir.
'/'.$file.
'.php';
421 $module =
new $file($db);
424 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
427 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
431 if ($module->isEnabled()) {
432 dol_include_once(
'/'.$moduledir.
'/class/'.strtolower($myTmpObjectKey).
'.class.php');
434 print
'<tr class="oddeven"><td>'.$module->name.
"</td><td>\n";
435 print $module->info();
439 print
'<td class="nowrap">';
440 $tmp = $module->getExample();
441 if (preg_match(
'/^Error/', $tmp)) {
442 $langs->load(
"errors");
443 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
444 } elseif ($tmp ==
'NotConfigured') {
445 print $langs->trans($tmp);
451 print
'<td class="center">';
452 $constforvar =
'WEBHOOK_'.strtoupper($myTmpObjectKey).
'_ADDON';
453 if ($conf->global->$constforvar == $file) {
454 print
img_picto($langs->trans(
"Activated"),
'switch_on');
456 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.newToken().
'&object='.strtolower($myTmpObjectKey).
'&value='.urlencode($file).
'">';
457 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
462 $mytmpinstance =
new $myTmpObjectKey($db);
463 $mytmpinstance->initAsSpecimen();
467 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
469 $nextval = $module->getNextValue($mytmpinstance);
470 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
471 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
473 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
474 $nextval = $langs->trans($nextval);
476 $htmltooltip .= $nextval.
'<br>';
478 $htmltooltip .= $langs->trans($module->error).
'<br>';
482 print
'<td class="center">';
483 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
494 print
"</table><br>\n";
497 if ($myTmpObjectArray[
'includedocgeneration']) {
502 $type = strtolower($myTmpObjectKey);
504 print
load_fiche_titre($langs->trans(
"DocumentModules", $myTmpObjectKey),
'',
'');
509 $sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
510 $sql .=
" WHERE type = '".$db->escape($type).
"'";
511 $sql .=
" AND entity = ".$conf->entity;
512 $resql = $db->query($sql);
515 $num_rows = $db->num_rows($resql);
516 while ($i < $num_rows) {
517 $array = $db->fetch_array($resql);
518 array_push($def, $array[0]);
525 print
"<table class=\"noborder\" width=\"100%\">\n";
526 print
"<tr class=\"liste_titre\">\n";
527 print
'<td>'.$langs->trans(
"Name").
'</td>';
528 print
'<td>'.$langs->trans(
"Description").
'</td>';
529 print
'<td class="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
530 print
'<td class="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
531 print
'<td class="center" width="38">'.$langs->trans(
"ShortInfo").
'</td>';
532 print
'<td class="center" width="38">'.$langs->trans(
"Preview").
'</td>';
537 foreach ($dirmodels as $reldir) {
538 foreach (array(
'',
'/doc') as $valdir) {
539 $realpath = $reldir.
"core/modules/".$moduledir.$valdir;
543 $handle = opendir($dir);
544 if (is_resource($handle)) {
545 while (($file = readdir($handle)) !==
false) {
551 foreach ($filelist as $file) {
552 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
553 if (file_exists($dir.
'/'.$file)) {
554 $name = substr($file, 4,
dol_strlen($file) - 16);
555 $classname = substr($file, 0,
dol_strlen($file) - 12);
557 require_once $dir.
'/'.$file;
558 $module =
new $classname($db);
560 $modulequalified = 1;
561 if ($module->version ==
'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
562 $modulequalified = 0;
564 if ($module->version ==
'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
565 $modulequalified = 0;
568 if ($modulequalified) {
569 print
'<tr class="oddeven"><td width="100">';
570 print (empty($module->name) ? $name : $module->
name);
572 if (method_exists($module,
'info')) {
573 print $module->info($langs);
575 print $module->description;
580 if (in_array($name, $def)) {
581 print
'<td class="center">'.
"\n";
582 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.newToken().
'&value='.urlencode($name).
'">';
583 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
587 print
'<td class="center">'.
"\n";
588 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=set&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
593 print
'<td class="center">';
594 $constforvar =
'WEBHOOK_'.strtoupper($myTmpObjectKey).
'_ADDON';
595 if ($conf->global->$constforvar == $name) {
598 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=unsetdoc&token='.newToken().
'&object='.urlencode(strtolower($myTmpObjectKey)).
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'&type='.urlencode($type).
'" alt="'.$langs->trans(
"Disable").
'">'.
img_picto($langs->trans(
"Enabled"),
'on').
'</a>';
600 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.newToken().
'&object='.urlencode(strtolower($myTmpObjectKey)).
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
605 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
606 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
607 if ($module->type ==
'pdf') {
608 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
610 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
612 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
613 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
614 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
616 print
'<td class="center">';
617 print $form->textwithpicto(
'', $htmltooltip, 1, 0);
621 print
'<td class="center">';
622 if ($module->type ==
'pdf') {
623 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'&object='.$myTmpObjectKey.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
625 print
img_object($langs->trans(
"PreviewNotAvailable"),
'generic');
643if (empty($setupnotempty)) {
644 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.
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($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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_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_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 dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.
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.
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.
$conf db name
Only used if Module[ID]Name translation string is not found.
dolJSToSetRandomPassword($htmlname, $htmlnameofbutton='generate_token', $generic=1)
Ouput javacript 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.
webhookAdminPrepareHead()
Prepare admin pages header.