25if (!defined(
'NOREQUIREMENU')) {
26 define(
'NOREQUIREMENU',
'1');
29if (!defined(
'NOLOGIN')) {
30 define(
'NOLOGIN',
'1');
33if (!defined(
'NOIPCHECK')) {
34 define(
'NOIPCHECK',
'1');
37if (!defined(
'NOBROWSERNOTIF')) {
38 define(
'NOBROWSERNOTIF',
'1');
44$entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
45if (is_numeric($entity)) {
46 define(
"DOLENTITY", $entity);
50require
'../../main.inc.php';
51require_once DOL_DOCUMENT_ROOT.
'/ticket/class/actions_ticket.class.php';
52require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formticket.class.php';
53require_once DOL_DOCUMENT_ROOT.
'/core/lib/ticket.lib.php';
54require_once DOL_DOCUMENT_ROOT.
'/core/lib/security.lib.php';
55require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
56require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
59$langs->loadLangs(array(
'companies',
'other',
'ticket',
'errors'));
62$track_id =
GETPOST(
'track_id',
'alpha');
63$action =
GETPOST(
'action',
'aZ09');
67if (!isModEnabled(
'ticket')) {
80 print $langs->trans(
'TicketPublicInterfaceForbidden');
85$arrayofcss = array(
getDolGlobalString(
'TICKET_URL_PUBLIC_INTERFACE',
'/public/ticket/').
'css/styles.css.php');
87llxHeaderTicket($langs->trans(
'Tickets'),
"", 0, 0, $arrayofjs, $arrayofcss);
89print
'<div class="ticketpublicarea ticketlargemargin centpercent">';
91print
'<p style="text-align: center">'.(getDolGlobalString(
"TICKET_PUBLIC_TEXT_HOME",
'<span class="opacitymedium">'.$langs->trans(
"TicketPublicDesc")).
'</span></p>').
'</p>';
94$baseurl =
getDolGlobalString(
'TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.
'/public/ticket/');
96print
'<div class="ticketform">';
97print
'<a href="'.$baseurl .
'create_ticket.php?action=create'.(!empty($entity) && isModEnabled(
'multicompany')?
'&entity='.$entity:
'').
'&token='.
newToken().
'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_create bigrounded"><span class="fa fa-15 fa-plus-circle valignmiddle btnTitle-icon"></span><br>'.
dol_escape_htmltag($langs->trans(
"CreateTicket")).
'</div></a>';
98print
'<a href="list.php'.(!empty($entity) && isModEnabled(
'multicompany') ?
'?entity='.$entity :
'').
'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded"><span class="fa fa-15 fa-list-alt valignmiddle btnTitle-icon"></span><br>'.
dol_escape_htmltag($langs->trans(
"ViewMyTicketList")).
'</div></a>';
99print
'<a href="view.php'.(!empty($entity) && isModEnabled(
'multicompany') ?
'?entity='.$entity :
'').
'" rel="nofollow noopener" class="butAction marginbottomonly"><div class="index_display bigrounded">'.
img_picto(
'',
'ticket',
'class="fa-15"').
'<br>'.
dol_escape_htmltag($langs->trans(
"ShowTicketWithTrackId")).
'</div></a>';
100print
'<div class="clearboth"></div>';
htmlPrintOnlineFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null)
Show footer of company in HTML pages.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
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.