26 require
'../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/partnership/class/partnership.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/partnership/lib/partnership.lib.php';
34 $langs->loadLangs(array(
"partnership",
"other"));
39 $action =
GETPOST(
'action',
'aZ09');
40 $confirm =
GETPOST(
'confirm',
'alpha');
41 $cancel =
GETPOST(
'cancel',
'aZ09');
42 $contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'partnershipcard';
43 $backtopage =
GETPOST(
'backtopage',
'alpha');
44 $backtopageforcancel =
GETPOST(
'backtopageforcancel',
'alpha');
45 $lineid =
GETPOST(
'lineid',
'int');
50 $diroutputmassaction = $conf->partnership->dir_output.
'/temp/massgeneration/'.$user->id;
51 $hookmanager->initHooks(array(
'partnershipcard',
'globalcard'));
54 $extrafields->fetch_name_optionals_label($object->table_element);
56 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element,
'',
'search_');
59 $search_all =
GETPOST(
"search_all",
'alpha');
62 foreach ($object->fields as $key => $val) {
63 if (
GETPOST(
'search_'.$key,
'alpha')) {
64 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
68 if (empty($action) && empty($id) && empty($ref)) {
73 include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php';
76 $permissiontoread = $user->rights->partnership->read;
77 $permissiontoadd = $user->rights->partnership->write;
78 $permissiontodelete = $user->rights->partnership->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
79 $permissionnote = $user->rights->partnership->write;
80 $permissiondellink = $user->rights->partnership->write;
81 $upload_dir = $conf->partnership->multidir_output[isset($object->entity) ? $object->entity : 1];
90 if ($object->id > 0 && !($object->fk_member > 0) && $managedfor ==
'member')
accessforbidden();
91 if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor ==
'thirdparty')
accessforbidden();
98 $parameters = array();
99 $reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
104 if (empty($reshook)) {
107 $backurlforlist =
dol_buildpath(
'/partnership/partnership_list.php', 1);
109 if (empty($backtopage) || ($cancel && empty($id))) {
110 if (empty($backtopage) || ($cancel && strpos($backtopage,
'__ID__'))) {
111 if (empty($id) && (($action !=
'add' && $action !=
'create') || $cancel)) {
112 $backtopage = $backurlforlist;
114 $backtopage =
dol_buildpath(
'/partnership/partnership_card.php', 1).
'?id='.($id > 0 ? $id :
'__ID__');
119 $fk_partner = ($managedfor ==
'member') ?
GETPOST(
'fk_member',
'int') :
GETPOST(
'fk_soc',
'int');
120 $obj_partner = ($managedfor ==
'member') ? $object->fk_member : $object->fk_soc;
123 include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
125 $triggermodname =
'PARTNERSHIP_MODIFY';
128 if ($action ==
'confirm_validate' && $confirm ==
'yes' && $permissiontoadd) {
129 $result = $object->validate($user);
132 if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
133 if (method_exists($object,
'generateDocument')) {
134 $outputlangs = $langs;
137 $newlang =
GETPOST(
'lang_id',
'aZ09');
140 $newlang = $object->thirdparty->default_lang;
142 if (!empty($newlang)) {
144 $outputlangs->setDefaultLang($newlang);
147 $ret = $object->fetch($id);
149 $model = $object->model_pdf;
151 $retgen = $object->generateDocument($model, $outputlangs, 0, 0, 0);
160 } elseif ($action ==
'confirm_accept' && $confirm ==
'yes' && $permissiontoadd) {
161 $result = $object->approve($user);
164 if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
165 if (method_exists($object,
'generateDocument')) {
166 $outputlangs = $langs;
169 $newlang =
GETPOST(
'lang_id',
'aZ09');
172 $newlang = $object->thirdparty->default_lang;
174 if (!empty($newlang)) {
176 $outputlangs->setDefaultLang($newlang);
179 $ret = $object->fetch($id);
181 $model = $object->model_pdf;
183 $retgen = $object->generateDocument($model, $outputlangs, 0, 0, 0);
192 } elseif ($action ==
'confirm_refuse' && $permissiontoadd && !
GETPOST(
'cancel',
'alpha')) {
194 if (!(
GETPOST(
'reason_decline_or_cancel',
'alpha'))) {
195 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"Refuse")),
null,
'errors');
199 if ($object->statut != $object::STATUS_REFUSED) {
202 $result = $object->refused($user,
GETPOST(
'reason_decline_or_cancel',
'restricthtml'));
207 $object->reason_decline_or_cancel =
GETPOST(
'reason_decline_or_cancel',
'restricthtml');
219 include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
222 include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
228 include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
230 if ($action ==
'set_thirdparty' && $permissiontoadd) {
231 $object->setValueFrom(
'fk_soc',
GETPOST(
'fk_soc',
'int'),
'',
'',
'date',
'', $user, $triggermodname);
233 if ($action ==
'classin' && $permissiontoadd) {
234 $object->setProject(
GETPOST(
'projectid',
'int'));
238 $triggersendname =
'PARTNERSHIP_SENTBYMAIL';
239 $autocopy =
'MAIN_MAIL_AUTOCOPY_PARTNERSHIP_TO';
240 $trackid =
'pship'.$object->id;
241 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
243 if (!empty($id) && !empty(
GETPOST(
'confirm'))) {
244 header(
"Location: ".$_SERVER[
'PHP_SELF'].
"?id=".$id);
249 if ($object->id > 0 && $object->status == $object::STATUS_REFUSED) $object->fields[
'reason_decline_or_cancel'][
'visible'] = 3;
261 $title = $langs->trans(
"Partnership");
266 if ($action ==
'create') {
267 print
load_fiche_titre($langs->trans(
"NewPartnership"),
'',
'object_'.$object->picto);
269 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
270 print
'<input type="hidden" name="token" value="'.newToken().
'">';
271 print
'<input type="hidden" name="action" value="add">';
273 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
275 if ($backtopageforcancel) {
276 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
281 print
'<table class="border centpercent tableforfieldcreate">'.
"\n";
284 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
287 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
289 print
'</table>'.
"\n";
293 print
$form->buttonsSaveCancel(
"Create");
301 if (($id || $ref) && $action ==
'edit') {
302 print
load_fiche_titre($langs->trans(
"Partnership"),
'',
'object_'.$object->picto);
304 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
305 print
'<input type="hidden" name="token" value="'.newToken().
'">';
306 print
'<input type="hidden" name="action" value="update">';
307 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
309 print
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
311 if ($backtopageforcancel) {
312 print
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
317 print
'<table class="border centpercent tableforfieldedit">'.
"\n";
320 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
323 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
329 print
$form->buttonsSaveCancel();
335 if ($object->id > 0 && (empty($action) || ($action !=
'edit' && $action !=
'create'))) {
336 $res = $object->fetch_optionals();
339 print
dol_get_fiche_head($head,
'card', $langs->trans(
"Partnership"), -1, $object->picto);
344 if ($action ==
'delete') {
345 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'DeletePartnership'), $langs->trans(
'ConfirmDeleteObject'),
'confirm_delete',
'', 0, 1);
348 if ($action ==
'deleteline') {
349 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'),
'confirm_deleteline',
'', 0, 1);
352 if ($action ==
'clone') {
354 $formquestion = array();
355 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', $object->ref),
'confirm_clone', $formquestion,
'yes', 1);
358 if ($action ==
'close') {
360 $formquestion = array();
361 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToClose'), $langs->trans(
'ConfirmClosePartnershipAsk', $object->ref),
'confirm_close', $formquestion,
'yes', 1);
364 if ($action ==
'reopen') {
366 $formquestion = array();
367 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToReopon'), $langs->trans(
'ConfirmReoponAsk', $object->ref),
'confirm_reopen', $formquestion,
'yes', 1);
371 if ($action ==
'refuse') {
373 $formquestion = array(
374 array(
'type' =>
'text',
'name' =>
'reason_decline_or_cancel',
'label' => $langs->trans(
"Note"),
'morecss' =>
'reason_decline_or_cancel minwidth400',
'value' =>
'')
385 $formconfirm =
$form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.$object->id, $langs->trans(
'ToRefuse'), $text,
'confirm_refuse', $formquestion,
'', 1, 250);
389 $parameters = array(
'formConfirm' =>
$formconfirm,
'lineid' => $lineid);
390 $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action);
391 if (empty($reshook)) {
393 } elseif ($reshook > 0) {
403 $linkback =
'<a href="'.dol_buildpath(
'/partnership/partnership_list.php', 1).
'?restore_lastsearch_values=1'.(!empty($socid) ?
'&socid='.$socid :
'').
'">'.$langs->trans(
"BackToList").
'</a>';
405 $morehtmlref =
'<div class="refidno">';
440 $morehtmlref .=
'</div>';
441 if (!isset($npfilter)) {
445 if ($managedfor ==
'member') $npfilter .=
" AND te.fk_member > 0 ";
else $npfilter .=
" AND te.fk_soc > 0 ";
446 $object->next_prev_filter = $npfilter;
448 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
451 print
'<div class="fichecenter">';
452 print
'<div class="fichehalfleft">';
453 print
'<div class="underbanner clearboth"></div>';
454 print
'<table class="border centpercent tableforfield">'.
"\n";
460 include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
463 if ($managedfor ==
'member') {
465 $fadherent->fetch($object->fk_member);
466 print
'<tr><td>'.$langs->trans(
"SubscriptionEndDate").
'</td><td class="valeur">';
467 if ($fadherent->datefin) {
469 if ($fadherent->hasDelay()) {
470 print
" ".img_warning($langs->trans(
"Late"));
473 if (!$adht->subscription) {
474 print $langs->trans(
"SubscriptionNotRecorded");
475 if ($fadherent->statut > 0) {
476 print
" ".img_warning($langs->trans(
"Late"));
479 print $langs->trans(
"SubscriptionNotReceived");
480 if ($fadherent->statut > 0) {
481 print
" ".img_warning($langs->trans(
"Late"));
489 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
495 print
'<div class="clearboth"></div>';
504 if (!empty($object->table_element_line)) {
506 $result = $object->getLinesArray();
508 print
' <form name="addproduct" id="addproduct" action="'.$_SERVER[
"PHP_SELF"].
'?id='.$object->id.(($action !=
'editline') ?
'' :
'#line_'.
GETPOST(
'lineid',
'int')).
'" method="POST">
509 <input type="hidden" name="token" value="' .
newToken().
'">
510 <input type="hidden" name="action" value="' . (($action !=
'editline') ?
'addline' :
'updateline').
'">
511 <input type="hidden" name="mode" value="">
512 <input type="hidden" name="page_y" value="">
513 <input type="hidden" name="id" value="' . $object->id.
'">
516 if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
517 include DOL_DOCUMENT_ROOT.
'/core/tpl/ajaxrow.tpl.php';
520 print
'<div class="div-table-responsive-no-min">';
521 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
522 print
'<table id="tablelines" class="noborder noshadow" width="100%">';
525 if (!empty($object->lines)) {
526 $object->printObjectLines($action, $mysoc,
null,
GETPOST(
'lineid',
'int'), 1);
530 if ($object->status == 0 && $permissiontoadd && $action !=
'selectlines') {
531 if ($action !=
'editline') {
534 $parameters = array();
535 $reshook = $hookmanager->executeHooks(
'formAddObjectLine', $parameters, $object, $action);
536 if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors,
'errors');
538 $object->formAddObjectLine(1, $mysoc, $soc);
542 if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action !=
'selectlines' && $action !=
'editline')) {
553 if ($action !=
'presend' && $action !=
'editline') {
554 print
'<div class="tabsAction">'.
"\n";
555 $parameters = array();
556 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
561 if (empty($reshook)) {
563 if (empty($user->socid)) {
564 print
dolGetButtonAction(
'', $langs->trans(
'SendMail'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=presend&token='.
newToken().
'&mode=init#formmailbeforetitle');
567 if ($object->status == $object::STATUS_DRAFT) {
568 print
dolGetButtonAction(
'', $langs->trans(
'Modify'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=edit&token='.
newToken(),
'', $permissiontoadd);
572 if ($object->status != $object::STATUS_DRAFT) {
573 print
dolGetButtonAction(
'', $langs->trans(
'SetToDraft'),
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=confirm_setdraft&confirm=yes&token='.
newToken(),
'', $permissiontoadd);
577 if ($object->status == $object::STATUS_DRAFT) {
578 if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
579 print
dolGetButtonAction(
'', $langs->trans(
'Validate'),
'default', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=confirm_validate&confirm=yes&token='.
newToken(),
'', $permissiontoadd);
581 $langs->load(
"errors");
582 print
dolGetButtonAction($langs->trans(
"ErrorAddAtLeastOneLineFirst"), $langs->trans(
"Validate"),
'default',
'#',
'', 0);
587 if ($object->status == $object::STATUS_VALIDATED) {
588 if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
589 print
dolGetButtonAction($langs->trans(
'Approve'),
'',
'default', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=confirm_accept&confirm=yes&token='.
newToken(),
'', $permissiontoadd);
591 $langs->load(
"errors");
592 print
dolGetButtonAction($langs->trans(
"ErrorAddAtLeastOneLineFirst"), $langs->trans(
"Approved"),
'default',
'#',
'', 0);
597 if ($permissiontoadd) {
598 if ($object->status == $object::STATUS_APPROVED) {
599 print
dolGetButtonAction($langs->trans(
'Resiliate'),
'',
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=close&token='.
newToken(),
'', $permissiontoadd);
600 } elseif ($object->status > $object::STATUS_APPROVED) {
602 print
dolGetButtonAction($langs->trans(
'Re-Open'),
'',
'default', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=confirm_reopen&confirm=yes&token='.
newToken(),
'', $permissiontoadd);
607 if ($permissiontoadd) {
608 if ($object->status != $object::STATUS_DRAFT && $object->status != $object::STATUS_APPROVED && $object->status != $object::STATUS_CANCELED && $object->status != $object::STATUS_REFUSED) {
609 print
dolGetButtonAction($langs->trans(
'Refuse'),
'',
'default', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=refuse&token='.
newToken(),
'', $permissiontoadd);
614 print
dolGetButtonAction($langs->trans(
'Delete'),
'',
'delete', $_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=delete&token='.
newToken(),
'', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
621 if (
GETPOST(
'modelselected')) {
625 if ($action !=
'presend') {
626 print
'<div class="fichecenter"><div class="fichehalfleft">';
627 print
'<a name="builddoc"></a>';
629 $includedocgeneration = 0;
632 if ($includedocgeneration) {
634 $relativepath = $objref.
'/'.$objref.
'.pdf';
635 $filedir = $conf->partnership->dir_output.
'/'.$object->element.
'/'.$objref;
636 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".$object->id;
637 $genallowed = $user->rights->partnership->read;
638 $delallowed = $user->rights->partnership->write;
639 print $formfile->showdocuments(
'partnership:Partnership', $object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0,
'',
'',
'', $langs->defaultlang);
643 $linktoelem =
$form->showLinkToObjectBlock($object,
null, array(
'partnership'));
644 $somethingshown =
$form->showLinkedObjectBlock($object, $linktoelem);
647 print
'</div><div class="fichehalfright">';
651 $morehtmlcenter =
dolGetButtonTitle($langs->trans(
'SeeAll'),
'',
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/partnership/partnership_agenda.php?id='.$object->id);
654 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
656 $somethingshown =
$formactions->showactions($object, $object->element, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1,
'', $MAXEVENT,
'', $morehtmlcenter);
658 print
'</div></div>';
662 if (
GETPOST(
'modelselected')) {
667 $modelmail =
'partnership_send';
668 $defaulttopic =
'InformationMessage';
669 $diroutput = $conf->partnership->dir_output;
670 $trackid =
'pship'.$object->id;
672 include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action=='set') elseif($action=='specimen') elseif($action=='setmodel') elseif($action=='del') elseif($action=='setdoc') $formactions
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage members of a foundation.
Class to manage translations.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalInt($key, $default=0)
Return dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
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.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
if(!defined( 'CSRFCHECK_WITH_TOKEN'))
$formconfirm
if ($action == 'delbookkeepingyear') {
partnershipPrepareHead($object)
Prepare array of tabs for Partnership.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.