35require
'../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/pdf.lib.php';
46require_once DOL_DOCUMENT_ROOT.
'/core/lib/fichinter.lib.php';
47require_once DOL_DOCUMENT_ROOT.
'/fichinter/class/fichinter.class.php';
50$langs->loadLangs(array(
'admin',
'errors',
'interventions',
'other'));
56$action =
GETPOST(
'action',
'aZ09');
57$value =
GETPOST(
'value',
'alpha');
58$modulepart =
GETPOST(
'modulepart',
'aZ09');
60$label =
GETPOST(
'label',
'alpha');
61$scandir =
GETPOST(
'scan_dir',
'alpha');
70include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
72if ($action ==
'updateMask') {
73 $maskconst =
GETPOST(
'maskconst',
'aZ09');
74 $maskvalue =
GETPOST(
'maskvalue',
'alpha');
78 if ($maskconst && preg_match(
'/_MASK$/', $maskconst)) {
91} elseif ($action ==
'specimen') {
92 $modele =
GETPOST(
'module',
'alpha');
95 $inter->initAsSpecimen();
100 $dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
101 foreach ($dirmodels as $reldir) {
102 $file =
dol_buildpath($reldir.
"core/modules/fichinter/doc/pdf_".$modele.
".modules.php", 0);
103 if (file_exists($file)) {
104 $classname =
"pdf_".$modele;
109 if ($classname !==
'') {
112 $module =
new $classname(
$db);
113 '@phan-var-force ModelePDFFicheinter $module';
115 if ($module->write_file($inter, $langs) > 0) {
116 header(
"Location: ".DOL_URL_ROOT.
"/document.php?modulepart=ficheinter&file=SPECIMEN.pdf");
124 dol_syslog($langs->trans(
"ErrorModuleNotFound"), LOG_ERR);
126} elseif ($action ==
'set') {
129} elseif ($action ==
'del') {
136} elseif ($action ==
'setdoc') {
141 $conf->global->FICHEINTER_ADDON_PDF = $value;
149} elseif ($action ==
'setmod') {
154} elseif ($action ==
'set_FICHINTER_FREE_TEXT') {
155 $freetext =
GETPOST(
'FICHINTER_FREE_TEXT',
'restricthtml');
167} elseif ($action ==
'set_FICHINTER_DRAFT_WATERMARK') {
168 $draft =
GETPOST(
'FICHINTER_DRAFT_WATERMARK',
'alpha');
180} elseif ($action ==
'set_FICHINTER_PRINT_PRODUCTS') {
181 $setFichInterPrintProducts =
GETPOSTINT(
'value');
192} elseif ($action ==
'set_FICHINTER_USE_SERVICE_DURATION') {
193 $setFichInterUseServiceDuration =
GETPOSTINT(
'value');
194 $res =
dolibarr_set_const(
$db,
"FICHINTER_USE_SERVICE_DURATION", $setFichInterUseServiceDuration,
'yesno', 0,
'',
$conf->entity);
204} elseif ($action ==
'set_FICHINTER_WITHOUT_DURATION') {
205 $setFichInterWithoutDuration =
GETPOSTINT(
'value');
216} elseif ($action ==
'set_FICHINTER_DATE_WITHOUT_HOUR') {
217 $setFichInterDateWithoutHour =
GETPOSTINT(
'value');
228} elseif ($action ==
"set_FICHINTER_ALLOW_ONLINE_SIGN") {
229 $setFichInterAllowOnlineSign =
GETPOSTINT(
'value');
240} elseif ($action ==
"set_FICHINTER_ALLOW_EXTERNAL_DOWNLOAD") {
241 $setFichInterAllowExternalDownload =
GETPOSTINT(
'value');
242 $res =
dolibarr_set_const(
$db,
"FICHINTER_ALLOW_EXTERNAL_DOWNLOAD", $setFichInterAllowExternalDownload,
'yesno', 0,
'',
$conf->entity);
260$dirmodels = array_merge(array(
'/'), (array)
$conf->modules_parts[
'models']);
262llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-fichinter');
266$linkback =
'<a href="'.dolBuildUrl(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>';
268print
load_fiche_titre($langs->trans(
"InterventionsSetup"), $linkback,
'title_setup');
273print
dol_get_fiche_head($head,
'ficheinter', $langs->trans(
"Interventions"), -1,
'intervention');
279print
'<div class="div-table-responsive-no-min">';
280print
'<table class="noborder centpercent">';
281print
'<tr class="liste_titre">';
282print
'<td width="100">'.$langs->trans(
"Name").
'</td>';
283print
'<td>'.$langs->trans(
"Description").
'</td>';
284print
'<td>'.$langs->trans(
"Example").
'</td>';
285print
'<td align="center" width="60">'.$langs->trans(
"Status").
'</td>';
286print
'<td align="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
291foreach ($dirmodels as $reldir) {
295 $handle = opendir($dir);
296 if (is_resource($handle)) {
297 while (($file = readdir($handle)) !==
false) {
298 if (preg_match(
'/^(mod_.*)\.php$/i', $file, $reg)) {
300 $classname = substr($file, 4);
302 require_once $dir.$file.
'.php';
304 $module =
new $file();
306 '@phan-var-force ModeleNumRefFicheinter $module';
308 if ($module->isEnabled()) {
310 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
313 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
318 print
'<tr class="oddeven"><td>'.$module->getName($langs).
"</td><td>\n";
319 print $module->info($langs);
323 print
'<td class="nowrap">';
324 $tmp = $module->getExample();
325 if (preg_match(
'/^Error/', $tmp)) {
326 $langs->load(
"errors");
327 print
'<div class="error">'.$langs->trans($tmp).
'</div>';
328 } elseif ($tmp ==
'NotConfigured') {
329 print
'<span class="opacitymedium">'.$langs->trans($tmp).
'</span>';
335 print
'<td class="center">';
337 print
img_picto($langs->trans(
"Activated"),
'switch_on');
339 print
'<a class="reposition" href="'.$_SERVER[
"PHP_SELF"].
'?action=setmod&token='.newToken().
'&value='.urlencode($classname).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'switch_off').
'</a>';
344 $ficheinter->initAsSpecimen();
348 $htmltooltip .=
''.$langs->trans(
"Version").
': <b>'.$module->getVersion().
'</b><br>';
349 $nextval = $module->getNextValue(
$mysoc, $ficheinter);
350 if (
"$nextval" != $langs->trans(
"NotAvailable")) {
351 $htmltooltip .=
''.$langs->trans(
"NextValue").
': ';
353 if (preg_match(
'/^Error/', $nextval) || $nextval ==
'NotConfigured') {
354 $nextval = $langs->trans($nextval);
356 $htmltooltip .= $nextval.
'<br>';
358 $htmltooltip .= $langs->trans($module->error).
'<br>';
361 print
'<td class="center">';
362 print $form->textwithpicto(
'', $htmltooltip, 1,
'info');
390$sql .=
" FROM ".MAIN_DB_PREFIX.
"document_model";
391$sql .=
" WHERE type = '".$db->escape($type).
"'";
392$sql .=
" AND entity = ".((int)
$conf->entity);
393$resql =
$db->query($sql);
396 $num_rows =
$db->num_rows($resql);
397 while ($i < $num_rows) {
398 $array =
$db->fetch_array($resql);
399 if (is_array($array)) {
400 array_push($def, $array[0]);
409print
'<div class="div-table-responsive-no-min">';
410print
'<table class="noborder centpercent">';
411print
'<tr class="liste_titre">';
412print
'<td>'.$langs->trans(
"Name").
'</td>';
413print
'<td>'.$langs->trans(
"Description").
'</td>';
414print
'<td align="center" width="60">'.$langs->trans(
"Status").
"</td>\n";
415print
'<td align="center" width="60">'.$langs->trans(
"Default").
"</td>\n";
416print
'<td align="center" width="80">'.$langs->trans(
"ShortInfo").
'</td>';
417print
'<td align="center" width="80">'.$langs->trans(
"Preview").
'</td>';
422foreach ($dirmodels as $reldir) {
423 $realpath = $reldir.
"core/modules/fichinter/doc";
427 $handle = opendir($dir);
428 if (is_resource($handle)) {
430 while (($file = readdir($handle)) !==
false) {
436 foreach ($filelist as $file) {
437 if (preg_match(
'/\.modules\.php$/i', $file) && preg_match(
'/^(pdf_|doc_)/', $file)) {
438 if (file_exists($dir.
'/'.$file)) {
439 $name = substr($file, 4,
dol_strlen($file) - 16);
440 $classname = substr($file, 0,
dol_strlen($file) - 12);
442 require_once $dir.
'/'.$file;
443 $module =
new $classname(
$db);
445 '@phan-var-force ModelePDFFicheinter $module';
447 $modulequalified = 1;
448 if ($module->version ==
'development' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 2) {
449 $modulequalified = 0;
451 if ($module->version ==
'experimental' &&
getDolGlobalInt(
'MAIN_FEATURES_LEVEL') < 1) {
452 $modulequalified = 0;
455 if ($modulequalified) {
456 print
'<tr class="oddeven"><td width="100">';
457 print(empty($module->name) ? $name : $module->
name);
459 if (method_exists($module,
'info')) {
460 print $module->info($langs);
462 print $module->description;
467 if (in_array($name, $def)) {
468 print
"<td align=\"center\">\n";
469 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=del&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'">';
470 print
img_picto($langs->trans(
"Enabled"),
'switch_on');
474 print
"<td align=\"center\">\n";
475 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>';
480 print
"<td align=\"center\">";
482 print
img_picto($langs->trans(
"Default"),
'on');
484 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=setdoc&token='.newToken().
'&value='.urlencode($name).
'&scan_dir='.urlencode($module->scandir).
'&label='.urlencode($module->name).
'" alt="'.$langs->trans(
"Default").
'">'.
img_picto($langs->trans(
"Disabled"),
'off').
'</a>';
489 $htmltooltip =
''.$langs->trans(
"Name").
': '.$module->name;
490 $htmltooltip .=
'<br>'.$langs->trans(
"Type").
': '.($module->type ? $module->type : $langs->trans(
"Unknown"));
491 $htmltooltip .=
'<br>'.$langs->trans(
"Width").
'/'.$langs->trans(
"Height").
': '.$module->page_largeur.
'/'.$module->page_hauteur;
492 $htmltooltip .=
'<br>'.$langs->trans(
"Path").
': '.preg_replace(
'/^\//',
'', $realpath).
'/'.$file;
494 $htmltooltip .=
'<br><br><u>'.$langs->trans(
"FeaturesSupported").
':</u>';
495 $htmltooltip .=
'<br>'.$langs->trans(
"Logo").
': '.
yn($module->option_logo, 1, 1);
496 $htmltooltip .=
'<br>'.$langs->trans(
"PaymentMode").
': '.
yn($module->option_modereg, 1, 1);
497 $htmltooltip .=
'<br>'.$langs->trans(
"PaymentConditions").
': '.
yn($module->option_condreg, 1, 1);
498 $htmltooltip .=
'<br>'.$langs->trans(
"MultiLanguage").
': '.
yn($module->option_multilang, 1, 1);
499 $htmltooltip .=
'<br>'.$langs->trans(
"WatermarkOnDraftOrders").
': '.
yn($module->option_draft_watermark, 1, 1);
500 print
'<td class="center">';
501 print $form->textwithpicto(
'', $htmltooltip, -1,
'info');
505 print
'<td class="center">';
506 if ($module->type ==
'pdf') {
507 print
'<a href="'.$_SERVER[
"PHP_SELF"].
'?action=specimen&module='.$name.
'">'.
img_object($langs->trans(
"Preview"),
'pdf').
'</a>';
509 print
img_object($langs->transnoentitiesnoconv(
"PreviewNotAvailable"),
'generic');
532print
'<div class="div-table-responsive-no-min">';
533print
'<table class="noborder centpercent">';
534print
'<tr class="liste_titre">';
535print
'<td>'.$langs->trans(
"Parameter").
'</td>';
536print
'<td align="center" width="60"></td>';
537print
"<td> </td>\n";
541$substitutionarray[
'__(AnyTranslationKey)__'] = $langs->trans(
"Translation");
542$htmltext =
'<i>'.$langs->trans(
"AvailableVariables").
':<br>';
543foreach ($substitutionarray as $key => $val) {
544 $htmltext .= $key.
'<br>';
548print
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
549print
'<input type="hidden" name="token" value="'.newToken().
'">';
550print
'<input type="hidden" name="action" value="set_FICHINTER_FREE_TEXT">';
551print
'<tr class="oddeven"><td colspan="2">';
552print $form->textwithpicto($langs->trans(
"FreeLegalTextOnInterventions"), $langs->trans(
"AddCRIfTooLong").
'<br><br>'.$htmltext, 1,
'help',
'', 0, 2,
'freetexttooltip').
'<br>';
553$variablename =
'FICHINTER_FREE_TEXT';
555 print
'<textarea name="'.$variablename.
'" class="flat" cols="120">'.
getDolGlobalString($variablename).
'</textarea>';
557 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
559 print $doleditor->Create();
561print
'</td><td class="right">';
562print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
"Modify").
'">';
567print
"<form method=\"post\" action=\"".$_SERVER[
"PHP_SELF"].
"\">";
568print
'<input type="hidden" name="token" value="'.newToken().
'">';
569print
"<input type=\"hidden\" name=\"action\" value=\"set_FICHINTER_DRAFT_WATERMARK\">";
570print
'<tr class="oddeven"><td>';
571print $form->textwithpicto($langs->trans(
"WatermarkOnDraftInterventionCards"), $htmltext, 1,
'help',
'', 0, 2,
'watermarktooltip').
'<br>';
573print
'<input class="flat minwidth200" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.dol_escape_htmltag(
getDolGlobalString(
'FICHINTER_DRAFT_WATERMARK')).
'">';
574print
'</td><td class="right">';
575print
'<input type="submit" class="button button-edit" value="'.$langs->trans(
"Modify").
'">';
580print
'<tr class="oddeven">';
581print
'<td width="80%">'.$langs->trans(
"PrintProductsOnFichinter").
' ('.$langs->trans(
"PrintProductsOnFichinterDetails").
')</td>';
582print
'<td> </td>';
583print
'<td class="center">';
584if (
$conf->use_javascript_ajax) {
585 print ajax_constantonoff(
'FICHINTER_PRINT_PRODUCTS');
588 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_PRINT_PRODUCTS&token=' . newToken() .
'&value=0">';
589 print
img_picto($langs->trans(
"Activated"),
'switch_on');
591 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_PRINT_PRODUCTS&token=' . newToken() .
'&value=1">';
592 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
600print
'<tr class="oddeven">';
601print
'<td width="80%">'.$langs->trans(
"UseServicesDurationOnFichinter").
'</td>';
602print
'<td> </td>';
603print
'<td class="center">';
604if (
$conf->use_javascript_ajax) {
605 print ajax_constantonoff(
'FICHINTER_USE_SERVICE_DURATION');
608 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_USE_SERVICE_DURATION&token=' . newToken() .
'&value=0">';
609 print
img_picto($langs->trans(
"Activated"),
'switch_on');
611 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_USE_SERVICE_DURATION&token=' . newToken() .
'&value=1">';
612 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
620print
'<tr class="oddeven">';
621print
'<td width="80%">'.$langs->trans(
"UseDurationOnFichinter").
'</td>';
622print
'<td> </td>';
623print
'<td class="center">';
624if (
$conf->use_javascript_ajax) {
625 print ajax_constantonoff(
'FICHINTER_WITHOUT_DURATION');
628 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_WITHOUT_DURATION&token=' . newToken() .
'&value=0">';
629 print
img_picto($langs->trans(
"Activated"),
'switch_on');
631 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_WITHOUT_DURATION&token=' . newToken() .
'&value=1">';
632 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
640print
'<tr class="oddeven">';
641print
'<td width="80%">'.$langs->trans(
"UseDateWithoutHourOnFichinter").
'</td>';
642print
'<td> </td>';
643print
'<td class="center">';
644if (
$conf->use_javascript_ajax) {
645 print ajax_constantonoff(
'FICHINTER_DATE_WITHOUT_HOUR');
648 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_DATE_WITHOUT_HOUR&token=' . newToken() .
'&value=0">';
649 print
img_picto($langs->trans(
"Activated"),
'switch_on');
651 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_DATE_WITHOUT_HOUR&token=' . newToken() .
'&value=1">';
652 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
660print
'<tr class="oddeven">';
661print
'<td width="80%">'.$langs->trans(
"AllowOnlineSign").
'</td>';
662print
'<td> </td>';
663print
'<td class="center">';
664if (
$conf->use_javascript_ajax) {
665 print ajax_constantonoff(
'FICHINTER_ALLOW_ONLINE_SIGN');
668 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_ALLOW_ONLINE_SIGN&token=' . newToken() .
'&value=0">';
669 print
img_picto($langs->trans(
"Activated"),
'switch_on');
671 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_ALLOW_ONLINE_SIGN&token=' . newToken() .
'&value=1">';
672 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
680print
'<tr class="oddeven">';
681print
'<td width="80%">'.$langs->trans(
"AllowExternalDownload").
'</td>';
682print
'<td> </td>';
683print
'<td class="center">';
684if (
$conf->use_javascript_ajax) {
685 print ajax_constantonoff(
'FICHINTER_ALLOW_EXTERNAL_DOWNLOAD');
688 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_ALLOW_EXTERNAL_DOWNLOAD&token=' . newToken() .
'&value=0">';
689 print
img_picto($langs->trans(
"Activated"),
'switch_on');
691 print
'<a class="reposition" href="' . $_SERVER[
'PHP_SELF'] .
'?action=set_FICHINTER_ALLOW_EXTERNAL_DOWNLOAD&token=' . newToken() .
'&value=1">';
692 print
img_picto($langs->trans(
"Disabled"),
'switch_off');
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 a WYSIWYG editor.
fichinter_admin_prepare_head()
Return array head with list of tabs to view object information.
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, $allowothertags=array())
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, $morecssdiv='')
Show tabs of a record.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
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.
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0, $include=null)
Return array of possible substitutions for PDF content (without external module substitutions).
$conf db name
Only used if Module[ID]Name translation string is not found.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.