dolibarr 23.0.3
view.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2013-2016 Jean-François FERRY <hello@librethic.io>
3 * Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2023 Benjamin Falière <benjamin.faliere@altairis.fr>
5 * Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
27if (!defined('NOREQUIREMENU')) {
28 define('NOREQUIREMENU', '1');
29}
30// If there is no need to load and show top and left menu
31if (!defined("NOLOGIN")) {
32 define("NOLOGIN", '1');
33}
34if (!defined('NOIPCHECK')) {
35 define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
36}
37if (!defined('NOBROWSERNOTIF')) {
38 define('NOBROWSERNOTIF', '1');
39}
40// If this page is public (can be called outside logged session)
41
42// For MultiCompany module.
43// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
44// Because 2 entities can have the same ref.
45$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
46if (is_numeric($entity)) {
47 define("DOLENTITY", $entity);
48}
49
50// Load Dolibarr environment
51require '../../main.inc.php';
52require_once DOL_DOCUMENT_ROOT.'/ticket/class/actions_ticket.class.php';
53require_once DOL_DOCUMENT_ROOT.'/core/class/html.formticket.class.php';
54require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
55require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php';
56require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
57require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
58require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
59
68// Load translation files required by the page
69$langs->loadLangs(array("companies", "other", "ticket"));
70
71// Get parameters
72$action = GETPOST('action', 'aZ09');
73$cancel = GETPOST('cancel');
74
75$track_id = GETPOST('track_id', 'alpha');
76$email = GETPOST('email', 'email');
77$suffix = "";
78
79if (GETPOST('btn_view_ticket')) {
80 unset($_SESSION['email_customer']);
81}
82if (isset($_SESSION['email_customer'])) {
83 $email = $_SESSION['email_customer'];
84}
85
86$object = new ActionsTicket($db);
87
88if (!isModEnabled('ticket')) {
89 httponly_accessforbidden('Module Ticket not enabled');
90}
91
92
93/*
94 * Actions
95 */
96
97if ($cancel) {
98 $backtopage = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/');
99
100 if (!empty($backtopage)) {
101 header("Location: ".$backtopage);
102 exit;
103 }
104 $action = 'view_ticket';
105}
106
107$display_ticket = false;
108if (in_array($action, array("view_ticket", "presend", "close", "confirm_public_close", "add_message", "add_contact"))) { // Test on permission not required here. Done later by using the $track_id + check email in session
109 $error = 0;
110 if (!strlen($track_id)) {
111 $error++;
112 array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketTrackId")));
113 $action = '';
114 }
115 if (!strlen($email)) {
116 $error++;
117 array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Email")));
118 $action = '';
119 } else {
120 if (!isValidEmail($email)) {
121 $error++;
122 array_push($object->errors, $langs->trans("ErrorEmailInvalid"));
123 $action = '';
124 }
125 }
126
127 if (!$error) {
128 $ret = $object->fetch(0, '', $track_id);
129 if ($ret && $object->dao->id > 0) {
130 // Check if emails provided is the one of author
131 $emailofticket = CMailFile::getValidAddress($object->dao->origin_email, 2);
132 if (strtolower($emailofticket) == strtolower($email)) {
133 $display_ticket = true;
134 $_SESSION['email_customer'] = $email;
135 } else {
136 // Check if emails provided is inside list of contacts
137 $contacts = $object->dao->liste_contact(-1, 'external');
138 foreach ($contacts as $contact) {
139 if (strtolower($contact['email']) == strtolower($email)) {
140 $display_ticket = true;
141 $_SESSION['email_customer'] = $email;
142 break;
143 } else {
144 $display_ticket = false;
145 }
146 }
147 }
148 // Check email of thirdparty of ticket
149 if ($object->dao->fk_soc > 0 || $object->dao->socid > 0) {
150 $object->dao->fetch_thirdparty();
151 if ($email == $object->dao->thirdparty->email) {
152 $display_ticket = true;
153 $_SESSION['email_customer'] = $email;
154 }
155 }
156 // Check if email is email of creator
157 if ($object->dao->fk_user_create > 0) {
158 $tmpuser = new User($db);
159 $tmpuser->fetch($object->dao->fk_user_create);
160 if (strtolower($email) == strtolower($tmpuser->email)) {
161 $display_ticket = true;
162 $_SESSION['email_customer'] = $email;
163 }
164 }
165 // Check if email is email of creator
166 if ($object->dao->fk_user_assign > 0 && $object->dao->fk_user_assign != $object->dao->fk_user_create) {
167 $tmpuser = new User($db);
168 $tmpuser->fetch($object->dao->fk_user_assign);
169 if (strtolower($email) == strtolower($tmpuser->email)) {
170 $display_ticket = true;
171 $_SESSION['email_customer'] = $email;
172 }
173 }
174 } else {
175 $error++;
176 array_push($object->errors, $langs->trans("ErrorTicketNotFound", $track_id));
177 $action = '';
178 }
179 }
180
181 if (!$error && $action == 'confirm_public_close' && $display_ticket) { // Test on permission already done
182 if ($object->dao->close($user)) {
183 setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs');
184
185 $url = 'view.php?action=view_ticket&track_id='.GETPOST('track_id', 'alpha').(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken();
186 header("Location: ".$url);
187 exit;
188 } else {
189 $action = '';
190 setEventMessages($object->error, $object->errors, 'errors');
191 }
192 }
193
194 if (!$error && $action == "add_message" && $display_ticket && GETPOSTISSET('btn_add_message')) { // Test on permission already done
195 $ret = $object->dao->newMessage($user, $action, 0, 1);
196
197 if (!$error) {
198 $action = 'view_ticket';
199 }
200 }
201
202 // Add a new external contributor to a ticket
203 if (!$error && $action == "add_contact" && $display_ticket && GETPOSTISSET('btn_add_contact')) { // Test on permission already done
204 $ret = $object->dao->add_contact(GETPOSTINT('contactid'), 'CONTRIBUTOR');
205
206 if (!$error) {
207 $action = 'view_ticket';
208 }
209 }
210
211 if ($error || !empty($object->errors)) {
212 setEventMessages($object->error, $object->errors, 'errors');
213 if ($action == "add_message") { // Test on permission not required here
214 $action = 'presend';
215 } else {
216 $action = '';
217 }
218 }
219}
220
221// Actions to send emails (for ticket, we need to manage the addfile and removefile only)
222$triggersendname = 'TICKET_SENTBYMAIL';
223$paramname = 'id';
224$autocopy = 'MAIN_MAIL_AUTOCOPY_TICKET_TO'; // used to know the automatic BCC to add
225if (!empty($object->dao->id)) {
226 $trackid = 'tic'.$object->dao->id;
227}
228include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
229
230
231
232/*
233 * View
234 */
235
236$form = new Form($db);
237$formticket = new FormTicket($db);
238
239// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
240$hookmanager->initHooks(array('ticketpublicview', 'globalcard'));
241
242if (!getDolGlobalString('TICKET_ENABLE_PUBLIC_INTERFACE')) {
243 print '<div class="error">'.$langs->trans('TicketPublicInterfaceForbidden').'</div>';
244 $db->close();
245 exit();
246}
247
248$arrayofjs = array();
249$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/public/ticket/').'css/styles.css.php');
250
251llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss);
252
253
254if ($action == "view_ticket" || $action == "presend" || $action == "close" || $action == "confirm_public_close") {
255 if ($display_ticket) {
256 print '<!-- public view ticket -->';
257 print '<div class="ticketpublicarea ticketlargemargin">';
258
259 // Confirmation close
260 if ($action == 'close') {
261 print $form->formconfirm($_SERVER["PHP_SELF"]."?track_id=".$track_id.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : ''), $langs->trans("CloseATicket"), $langs->trans("ConfirmCloseAticket"), "confirm_public_close", '', '', 1);
262 }
263
264 print '<div id="form_view_ticket" class="margintoponly">';
265
266 print '<table class="ticketpublictable centpercent tableforfield">';
267
268 // Ref - Tracking ID
269 print '<tr><td class="titlefield">'.$langs->trans("Ref").' / '.$langs->trans("TicketTrackId").'</td><td>';
270 print img_picto('', 'ticket', 'class="pictofixedwidth"');
271 print dolPrintHTML($object->dao->ref);
272 print '<span class="opacitylow"> &nbsp; / &nbsp; '.dolPrintHTML($object->dao->track_id).'</span>';
273 print '</td></tr>';
274
275 // Subject
276 print '<tr><td>'.$langs->trans("Subject").'</td><td>';
277 print '<span class="bold large">';
278 print dol_escape_htmltag($object->dao->subject);
279 print '</span>';
280 print '</td></tr>';
281
282 // Statut
283 print '<tr><td>'.$langs->trans("Status").'</td><td>';
284 print $object->dao->getLibStatut(2);
285 print '</td></tr>';
286
287 // Type
288 print '<tr><td>'.$langs->trans("Type").'</td><td>';
289 print dol_escape_htmltag($object->dao->type_label);
290 print '</td></tr>';
291
292 // Category
293 print '<tr><td>'.$langs->trans("Category").'</td><td>';
294 if ($object->dao->category_label) {
295 print img_picto('', 'category', 'class="pictofixedwidth"');
296 print dol_escape_htmltag($object->dao->category_label);
297 }
298 print '</td></tr>';
299
300 // Severity
301 print '<tr><td>'.$langs->trans("Severity").'</td><td>';
302 print dol_escape_htmltag($object->dao->severity_label);
303 print '</td></tr>';
304
305 // Creation date
306 print '<tr><td>'.$langs->trans("DateCreation").'</td><td>';
307 print img_picto('', 'calendar', 'class="pictofixedwidth"');
308 print dol_print_date($object->dao->datec, 'dayhour');
309 print '</td></tr>';
310
311 // Author
312 print '<tr><td>'.$langs->trans("Author").'</td><td>';
313 if ($object->dao->fk_user_create > 0) {
314 $langs->load("users");
315 $fuser = new User($db);
316 $fuser->fetch($object->dao->fk_user_create);
317 print img_picto('', 'user', 'class="pictofixedwidth"');
318 print $fuser->getFullName($langs);
319 } else {
320 print img_picto('', 'email', 'class="pictofixedwidth"');
321 print dol_escape_htmltag($object->dao->origin_email);
322 }
323
324 print '</td></tr>';
325
326 // Read date
327 if (!empty($object->dao->date_read)) {
328 print '<tr><td>'.$langs->trans("TicketReadOn").'</td><td>';
329 print dol_print_date($object->dao->date_read, 'dayhour');
330 print '</td></tr>';
331 }
332
333 // Close date
334 if (!empty($object->dao->date_close)) {
335 print '<tr><td>'.$langs->trans("TicketCloseOn").'</td><td>';
336 print dol_print_date($object->dao->date_close, 'dayhour');
337 print '</td></tr>';
338 }
339
340 // User assigned
341 print '<tr><td>'.$langs->trans("AssignedTo").'</td><td>';
342 if ($object->dao->fk_user_assign > 0) {
343 $fuser = new User($db);
344 $fuser->fetch($object->dao->fk_user_assign);
345 print img_picto('', 'user', 'class="pictofixedwidth"');
346 print $fuser->getFullName($langs, 0);
347 }
348 print '</td></tr>';
349
350 // External contributors
351 if (getDolGlobalInt('TICKET_PUBLIC_DISPLAY_EXTERNAL_CONTRIBUTORS')) {
352 print '<tr><td>'.$langs->trans("ExternalContributors").'</td><td>';
353 if ($object->dao->id > 0) {
354 $contactlist = $object->dao->liste_contact(-1, 'external');
355 foreach ($contactlist as $externalContributor) {
356 print img_picto('', 'contact', 'class="pictofixedwidth"');
357 print $externalContributor["lastname"]." ".$externalContributor["firstname"]."<br>";
358 }
359 }
360 print '</td></tr>';
361 }
362
363 // Add new external contributor
364 if (getDolGlobalInt('TICKET_PUBLIC_SELECT_EXTERNAL_CONTRIBUTORS') && !empty($object->dao->fk_soc)) {
365 print '<form method="post" id="form_view_add_contact" name="form_view_add_contact" action="'.$_SERVER['PHP_SELF'].'?track_id='.$object->dao->track_id.'">';
366 print '<input type="hidden" name="token" value="'.newToken().'">';
367 print '<input type="hidden" name="action" value="add_contact">';
368 print '<input type="hidden" name="email" value="'.$_SESSION['email_customer'].'">';
369 print '<tr><td>'.$langs->trans("AddContributor").'</td><td>';
370 //print $form->selectcontacts($object->dao->fk_soc, '', 'contactid', 3, '', '', 1, 'minwidth100imp widthcentpercentminusxx maxwidth400');
371 print $form->select_contact($object->dao->fk_soc, '', 'contactid', 3, '', '', 1, 'minwidth100imp widthcentpercentminusxx maxwidth400', true);
372 print '<input type="submit" class="button smallpaddingimp reposition" name="btn_add_contact" value="'.$langs->trans('Add').'" />';
373 print '</td></tr></form>';
374 }
375
376 // Progression
377 if (getDolGlobalString('TICKET_SHOW_PROGRESSION')) {
378 print '<tr><td>'.$langs->trans("Progression").'</td><td>';
379 print($object->dao->progress > 0 ? dol_escape_htmltag((string) $object->dao->progress) : '0').'%';
380 print '</td></tr>';
381 }
382
383 // Other attributes
384 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
385
386 print '</table>';
387
388 print '</div>';
389
390 print '<div style="clear: both; margin-top: 1.5em;"></div>';
391
392 if ($action == 'presend') {
393 print '<br>';
394 print load_fiche_titre($langs->trans('TicketAddMessage'), '', 'conversation');
395
396 $formticket = new FormTicket($db);
397
398 $formticket->action = "add_message";
399 $formticket->track_id = $object->dao->track_id;
400 $formticket->trackid = 'tic'.$object->dao->id;
401
402 $baseurl = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/');
403
404 $formticket->param = array('track_id' => $object->dao->track_id, 'fk_user_create' => '-1',
405 'returnurl' => $baseurl.'view.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : ''));
406
407 $formticket->withfile = 2;
408 $formticket->withcancel = 1;
409
410 $formticket->showMessageForm('100%');
411 }
412
413 if ($action != 'presend') {
414 $baseurl = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/');
415
416 print '<form method="POST" id="form_view_ticket_list" name="form_view_ticket_list" action="'.$baseurl.'list.php'.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'">';
417 print '<input type="hidden" name="token" value="'.newToken().'">';
418 print '<input type="hidden" name="action" value="view_ticketlist">';
419 print '<input type="hidden" name="track_id" value="'.$object->dao->track_id.'">';
420 print '<input type="hidden" name="email" value="'.$_SESSION['email_customer'].'">';
421 //print '<input type="hidden" name="search_fk_status" value="non_closed">';
422 print "</form>\n";
423
424 print '<div class="tabsAction">';
425
426 // List ticket
427 print '<div class="inline-block divButAction"><a class="left" style="padding-right: 50px" href="javascript:$(\'#form_view_ticket_list\').submit();">'.$langs->trans('ViewMyTicketList').'</a></div>';
428
429 if ($object->dao->fk_statut < Ticket::STATUS_CLOSED) {
430 // New message
431 print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=presend&mode=init&track_id='.$object->dao->track_id.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken().'">'.$langs->trans('TicketAddMessage').'</a></div>';
432
433 // Close ticket
434 if ($object->dao->fk_statut >= Ticket::STATUS_NOT_READ && $object->dao->fk_statut < Ticket::STATUS_CLOSED) {
435 print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=close&track_id='.$object->dao->track_id.(!empty($entity) && isModEnabled('multicompany') ? '&entity='.$entity : '').'&token='.newToken().'">'.$langs->trans('CloseTicket').'</a></div>';
436 }
437 }
438
439 print '</div>';
440 }
441
442 print '</div>';
443
444 // Message list
445 print '<div class="ticketpublicarea ticketlargemargin">';
446 print load_fiche_titre($langs->trans('TicketMessagesList'), '', 'conversation');
447 print '</div>';
448
449 $object->viewTicketMessages(false, true, $object->dao);
450
451 print '<br>';
452 } else {
453 print '<!-- public view ticket -->';
454 print '<div class="ticketpublicarea ticketlargemargin">';
455
456 print '<div class="error">Not Allowed<br><a href="'.$_SERVER['PHP_SELF'].'?track_id='.$object->dao->track_id.(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'" rel="nofollow noopener">'.$langs->trans("GoBack").'</a></div>';
457
458 print '</div>';
459 }
460} else {
461 print '<!-- public view ticket -->';
462 print '<div class="ticketpublicarea ticketlargemargin">';
463
464 print '<div class="center opacitymedium margintoponly marginbottomonly ticketlargemargin">'.$langs->trans("TicketPublicMsgViewLogIn").'</div>';
465
466 print '<div id="form_view_ticket">';
467 print '<form method="POST" class="maxwidth1000 center" name="form_view_ticket" action="'.$_SERVER['PHP_SELF'].(!empty($entity) && isModEnabled('multicompany') ? '?entity='.$entity : '').'">';
468
469 print '<input type="hidden" name="token" value="'.newToken().'">';
470 print '<input type="hidden" name="action" value="view_ticket">';
471
472 print '<p><label for="track_id" style="display: inline-block;" class="titlefieldcreate left"><span class="fieldrequired">';
473 print img_picto($langs->trans("TicketTrackId"), 'generic', 'class="pictofixedwidth"');
474 print $langs->trans("TicketTrackId").'</span></label>';
475 print '<br class="showonsmartphone hidden">';
476 print '<input class="minwidth100" id="track_id" name="track_id" value="'.(GETPOST('track_id', 'alpha') ? GETPOST('track_id', 'alpha') : '').'" />';
477 print '</p>';
478
479 print '<p><label for="email" style="display: inline-block;" class="titlefieldcreate left"><span class="fieldrequired">';
480 print img_picto($langs->trans("Email"), 'email', 'class="pictofixedwidth"');
481 print $langs->trans('Email').'</span></label>';
482 print '<br class="showonsmartphone hidden">';
483 print '<input class="minwidth100" id="email" name="email" value="'.(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : (!empty($_SESSION['customer_email']) ? $_SESSION['customer_email'] : "")).'" />';
484 print '</p>';
485
486 print '<p style="text-align: center; margin-top: 1.5em;">';
487 print '<input type="submit" class="button" name="btn_view_ticket" value="'.$langs->trans('ViewTicket').'" />';
488 print ' &nbsp; ';
489 print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
490 print "</p>\n";
491
492 print "</form>\n";
493 print "</div>\n";
494
495 print '</div>';
496}
497
498if (getDolGlobalInt('TICKET_SHOW_COMPANY_FOOTER')) {
499 // End of page
500 htmlPrintOnlineFooter($mysoc, $langs, 0, $suffix, $object);
501}
502
503llxFooter('', 'public');
504
505$db->close();
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
Class Actions of the module ticket.
static getValidAddress($address, $format, $encode=0, $maxnumberofemail=0)
Return a formatted address string for SMTP protocol.
Class to manage generation of HTML components Only common components must be here.
Class to manage Dolibarr users.
htmlPrintOnlineFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null)
Show footer of company in HTML public pages.
global $mysoc
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.
dolPrintHTML($s, $allowiframe=0)
Return a string (that can be on several lines) ready to be output on a HTML page.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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)
Return value of a param into GET or POST supervariable.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.
llxHeaderTicket($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs=[], $arrayofcss=[])
Show http header, open body tag and show HTML header banner for public pages for tickets.