33require
'../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.
'/ticket/class/actions_ticket.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formticket.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
46include_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
47include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
48include_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
51$langs->loadLangs(array(
"ticket",
"companies",
"other",
"projects",
"contracts"));
54$action =
GETPOST(
'action',
'aZ09') ?
GETPOST(
'action',
'aZ09') :
'view';
55$massaction =
GETPOST(
'massaction',
'alpha');
57$confirm =
GETPOST(
'confirm',
'alpha');
58$cancel =
GETPOST(
'cancel',
'alpha');
59$toselect =
GETPOST(
'toselect',
'array:int');
60$contextpage =
GETPOST(
'contextpage',
'aZ') ?
GETPOST(
'contextpage',
'aZ') :
'ticketlist';
61$backtopage =
GETPOST(
'backtopage',
'alpha');
62$optioncss =
GETPOST(
'optioncss',
'aZ');
63$mode =
GETPOST(
'mode',
'alpha');
69$project_ref =
GETPOST(
'project_ref',
'alpha');
70$search_societe =
GETPOST(
'search_societe',
'alpha');
84$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
85$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
87if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
91$offset = $limit * $page;
98$diroutputmassaction =
$conf->ticket->dir_output.
'/temp/massgeneration/'.$user->id;
100 $hookmanager->initHooks(array(
'thirdpartyticket',
'globalcard'));
101} elseif ($projectid > 0) {
102 $hookmanager->initHooks(array(
'projectticket',
'globalcard'));
104 $hookmanager->initHooks(array(
'ticketlist'));
107$extrafields->fetch_name_optionals_label(
$object->table_element);
108$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element,
'',
'search_');
112 $sortfield =
"t.datec";
123$search_all = trim(
GETPOST(
"search_all",
'alphanohtml'));
125foreach (
$object->fields as $key => $val) {
127 $search[$key] =
GETPOST(
'search_'.$key,
'array:alpha');
128 } elseif (
GETPOST(
'search_'.$key,
'alpha') !==
'') {
129 $search[$key] =
GETPOST(
'search_'.$key,
'alpha');
133 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
140$fieldstosearchall = array();
141foreach (
$object->fields as $key => $val) {
142 if (!empty($val[
'searchall'])) {
143 $fieldstosearchall[
't.'.$key] = $val[
'label'];
146$fieldstosearchall[
's.name_alias'] =
"AliasNameShort";
147$fieldstosearchall[
's.zip'] =
"Zip";
148$fieldstosearchall[
's.town'] =
"Town";
151$arrayfields = array();
152foreach (
$object->fields as $key => $val) {
154 if (!empty($val[
'visible'])) {
155 $visible = (int)
dol_eval((
string) $val[
'visible'], 1);
156 $arrayfields[
't.'.$key] = array(
157 'label' => $val[
'label'],
158 'checked' => (($visible < 0) ? 0 : 1),
159 'enabled' => (abs($visible) != 3 && (bool)
dol_eval((
string) $val[
'enabled'], 1)),
160 'position' => $val[
'position'],
161 'help' => isset($val[
'help']) ? $val[
'help'] :
''
166include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_array_fields.tpl.php';
173if (!$user->hasRight(
'ticket',
'read')) {
177if ($user->socid > 0) {
178 $socid = $user->socid;
182$url_page_current = DOL_URL_ROOT.
'/ticket/list.php';
186 $tmpproject->fetch(0, $project_ref);
187 $projectid = $tmpproject->id;
188 $search_fk_project = $projectid;
191$permissiontoread = $user->hasRight(
'ticket',
'read');
192$permissiontoadd = $user->hasRight(
'ticket',
'write');
193$permissiontodelete = $user->hasRight(
'ticket',
'delete');
202if (
GETPOST(
'cancel',
'alpha')) {
206if (!
GETPOST(
'confirmmassaction',
'alpha') && $massaction !=
'presend' && $massaction !=
'confirm_presend' && $massaction !=
'presendonclose' && $massaction !=
'close') {
210$parameters = array(
'arrayfields' => &$arrayfields);
212 $parameters[
'socid'] = $socid;
215 $parameters[
'projectid'] = $projectid;
217$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
222if (empty($reshook)) {
224 include DOL_DOCUMENT_ROOT.
'/core/actions_changeselectedfields.inc.php';
227 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
228 foreach (
$object->fields as $key => $val) {
230 if (preg_match(
'/^(date|timestamp|datetime)/', $val[
'type'])) {
231 $search[$key.
'_dtstart'] =
'';
232 $search[$key.
'_dtend'] =
'';
236 $search_array_options = array();
237 $search_date_start =
'';
238 $search_date_end =
'';
239 $search_dateread_start =
'';
240 $search_dateread_end =
'';
241 $search_dateclose_start =
'';
242 $search_dateclose_end =
'';
244 if (
GETPOST(
'button_removefilter_x',
'alpha') ||
GETPOST(
'button_removefilter.x',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')
245 ||
GETPOST(
'button_search_x',
'alpha') ||
GETPOST(
'button_search.x',
'alpha') ||
GETPOST(
'button_search',
'alpha')) {
250 $objectclass =
'Ticket';
251 $objectlabel =
'Ticket';
252 $uploaddir =
$conf->ticket->dir_output;
254 include DOL_DOCUMENT_ROOT.
'/core/actions_massactions.inc.php';
257 if (!$error && $massaction ==
'close' && $permissiontoadd) {
262 foreach ($toselect as $toselectid) {
263 $result = $objecttmp->fetch($toselectid);
265 $result = $objecttmp->close($user);
290 if (!$error && $massaction ==
'reopen' && $permissiontoadd) {
295 foreach ($toselect as $toselectid) {
296 $result = $objecttmp->fetch($toselectid);
298 if ($objecttmp->status == Ticket::STATUS_CLOSED || $objecttmp->status == Ticket::STATUS_CANCELED) {
300 $result = $objecttmp->setStatut(Ticket::STATUS_ASSIGNED,
null,
'',
'TICKET_MODIFY');
310 $langs->load(
"errors");
311 setEventMessages($langs->trans(
"ErrorObjectMustHaveStatusClosedToBeReOpened", $objecttmp->ref),
null,
'errors');
350 $socstatic->fetch($socid);
351 $moretitle = $langs->trans(
"ThirdParty") .
' - ';
352 if (
getDolGlobalString(
'MAIN_HTML_TITLE') && preg_match(
'/thirdpartynameonly/',
$conf->global->MAIN_HTML_TITLE) && $socstatic->name) {
353 $moretitle = $socstatic->name .
' - ';
357$title = $moretitle . $langs->trans(
'Tickets');
365$sql .=
$object->getFieldList(
't');
367if (!empty($extrafields->attributes[
$object->table_element][
'label'])) {
368 foreach ($extrafields->attributes[
$object->table_element][
'label'] as $key => $val) {
369 $sql .= ($extrafields->attributes[
$object->table_element][
'type'][$key] !=
'separate' ?
", ef.".$key.
" as options_".$key :
'');
373$parameters = array();
374$reshook = $hookmanager->executeHooks(
'printFieldListSelect', $parameters, $object, $action);
375$sql .= $hookmanager->resPrint;
376$sql = preg_replace(
'/,\s*$/',
'', $sql);
380$sql .=
" FROM ".MAIN_DB_PREFIX.$object->table_element.
" as t";
381if (isset($extrafields->attributes[
$object->table_element][
'label']) && is_array($extrafields->attributes[
$object->table_element][
'label']) && count($extrafields->attributes[
$object->table_element][
'label'])) {
382 $sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element.
"_extrafields as ef on (t.rowid = ef.fk_object)";
385$parameters = array();
386$reshook = $hookmanager->executeHooks(
'printFieldListFrom', $parameters, $object);
387$sql .= $hookmanager->resPrint;
388$sql .=
" LEFT JOIN ".MAIN_DB_PREFIX.
"societe as s ON (t.fk_soc = s.rowid)";
389$sql .=
" WHERE t.entity IN (".getEntity(
$object->element).
")";
391 $sql .=
" AND t.fk_soc = ".((int) $socid);
394foreach ($search as $key => $val) {
395 $tmpkey =
't.' . $key;
396 if ($key ==
'fk_statut' && !empty($search[
'fk_statut'])) {
397 $newarrayofstatus = array();
398 if (is_array($search[
'fk_statut'])) {
399 foreach ($search[
'fk_statut'] as $key2 => $val2) {
400 if (in_array($val2, array(
'openall',
'closeall'))) {
403 $newarrayofstatus[] = $val2;
406 if ($search[
'fk_statut'] ===
'openall' || (is_array($search[
'fk_statut']) && in_array(
'openall', $search[
'fk_statut']))) {
408 $newarrayofstatus[] = Ticket::STATUS_READ;
409 $newarrayofstatus[] = Ticket::STATUS_ASSIGNED;
410 $newarrayofstatus[] = Ticket::STATUS_IN_PROGRESS;
411 $newarrayofstatus[] = Ticket::STATUS_NEED_MORE_INFO;
412 $newarrayofstatus[] = Ticket::STATUS_WAITING;
414 if ($search[
'fk_statut'] ===
'closeall' || (is_array($search[
'fk_statut']) && in_array(
'closeall', $search[
'fk_statut']))) {
415 $newarrayofstatus[] = Ticket::STATUS_CLOSED;
416 $newarrayofstatus[] = Ticket::STATUS_CANCELED;
418 if (count($newarrayofstatus)) {
419 $sql .=
natural_search($tmpkey, implode(
',', $newarrayofstatus), 2);
422 } elseif ($key ==
'fk_user_assign' || $key ==
'fk_user_create' || $key ==
'fk_project' || $key ==
'fk_contract') {
423 if ($search[$key] > 0) {
427 } elseif ($key ==
'type_code') {
428 $newarrayoftypecodes = is_array($search[$key]) ? $search[$key] : (!empty($search[$key]) ? explode(
',', $search[$key]) : array());
429 if (count($newarrayoftypecodes)) {
430 $sql .=
natural_search($tmpkey, implode(
',', $newarrayoftypecodes), 3);
437 if ((is_array($search[$key]) && !empty($search[$key])) || (!is_array($search[$key]) && $search[$key] !=
'')) {
442 $sql .=
natural_search(array_keys($fieldstosearchall), $search_all);
444if ($search_societe) {
447if ($search_fk_project > 0) {
448 $sql .=
natural_search(
't.fk_project', (
string) $search_fk_project, 2);
450if ($search_fk_contract > 0) {
451 $sql .=
natural_search(
't.fk_contract', (
string) $search_fk_contract, 2);
453if ($search_date_start) {
454 $sql .=
" AND t.datec >= '".$db->idate($search_date_start).
"'";
456if ($search_date_end) {
457 $sql .=
" AND t.datec <= '".$db->idate($search_date_end).
"'";
459if ($search_dateread_start) {
460 $sql .=
" AND t.date_read >= '".$db->idate($search_dateread_start).
"'";
462if ($search_dateread_end) {
463 $sql .=
" AND t.date_read <= '".$db->idate($search_dateread_end).
"'";
465if ($search_dateclose_start) {
466 $sql .=
" AND t.date_close >= '".$db->idate($search_dateclose_start).
"'";
468if ($search_dateclose_end) {
469 $sql .=
" AND t.date_close <= '".$db->idate($search_dateclose_end).
"'";
472if (!$user->socid && ($mode ==
"mine" || (!$user->admin &&
getDolGlobalString(
'TICKET_LIMIT_VIEW_ASSIGNED_ONLY')))) {
473 $sql .=
" AND (t.fk_user_assign = ".((int) $user->id);
475 $sql .=
" OR t.fk_user_create = ".((int) $user->id);
481include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_sql.tpl.php';
483$parameters = array();
484$reshook = $hookmanager->executeHooks(
'printFieldListWhere', $parameters, $object, $action);
485$sql .= $hookmanager->resPrint;
488$nbtotalofrecords =
'';
491 $sqlforcount = preg_replace(
'/^'.preg_quote($sqlfields,
'/').
'/',
'SELECT COUNT(*) as nbtotalofrecords', $sql);
492 $sqlforcount = preg_replace(
'/GROUP BY .*$/',
'', $sqlforcount);
493 $resql =
$db->query($sqlforcount);
495 $objforcount =
$db->fetch_object($resql);
496 $nbtotalofrecords = $objforcount->nbtotalofrecords;
501 if (($page * $limit) > (
int) $nbtotalofrecords) {
509$sql .=
$db->order($sortfield, $sortorder);
511 $sql .=
$db->plimit($limit + 1, $offset);
514$resql =
$db->query($sql);
520$num =
$db->num_rows($resql);
523if ($num == 1 &&
getDolGlobalString(
'MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) {
524 $obj =
$db->fetch_object($resql);
526 header(
"Location: ".DOL_URL_ROOT.
'/ticket/card.php?id='.
$id);
534llxHeader(
'', $title, $help_url,
'', 0, 0, $morejs, $morecss,
'',
'mod-ticket page-list bodyforlist');
536if ($socid && !$projectid && !$project_ref && $user->hasRight(
'societe',
'lire')) {
538 $res = $socstat->fetch($socid);
545 print
dol_get_fiche_head($head,
'ticket', $langs->trans(
"ThirdParty"), -1,
'company');
547 dol_banner_tab($socstat,
'socid',
'', ($user->socid ? 0 : 1),
'rowid',
'nom');
549 print
'<div class="fichecenter">';
551 print
'<div class="underbanner clearboth"></div>';
552 print
'<table class="border centpercent tableforfield">';
555 print
'<tr><td class="titlefield">'.$langs->trans(
'NatureOfThirdParty').
'</td><td>';
556 print $socstat->getTypeUrl(1);
560 if ($socstat->client && !empty($socstat->code_client)) {
561 print
'<tr><td class="titlefield">';
562 print $langs->trans(
'CustomerCode').
'</td><td>';
564 $tmpcheck = $socstat->check_codeclient();
565 if ($tmpcheck != 0 && $tmpcheck != -5) {
566 print
' <span class="error">('.$langs->trans(
"WrongCustomerCode").
')</span>';
572 if ($socstat->fournisseur && !empty($socstat->code_fournisseur)) {
573 print
'<tr><td class="titlefield">';
574 print $langs->trans(
'SupplierCode').
'</td><td>';
576 $tmpcheck = $socstat->check_codefournisseur();
577 if ($tmpcheck != 0 && $tmpcheck != -5) {
578 print
' <span class="error">('.$langs->trans(
"WrongSupplierCode").
')</span>';
592if ($projectid > 0 || $project_ref) {
594 if ($projectstat->fetch($projectid, $project_ref) > 0) {
595 $projectid = $projectstat->id;
596 $projectstat->fetch_thirdparty();
603 $userWrite = $projectstat->restrictedProjectArea($user,
'write');
608 print
dol_get_fiche_head($head,
'ticket', $langs->trans(
"Project"), -1, ($projectstat->public ?
'projectpub' :
'project'));
612 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
614 $morehtmlref =
'<div class="refidno">';
616 $morehtmlref .=
$object->title;
618 if (!empty(
$object->thirdparty->id) &&
$object->thirdparty->id > 0) {
619 $morehtmlref .=
'<br>'.$object->thirdparty->getNomUrl(1,
'project');
621 $morehtmlref .=
'</div>';
624 if (!$user->hasRight(
'projet',
'all',
'lire')) {
625 $objectsListId =
$object->getProjectsAuthorizedForUser($user, 0, 0);
626 $object->next_prev_filter =
"rowid:IN:".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0');
629 dol_banner_tab($object,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref);
631 print
'<div class="fichecenter">';
632 print
'<div class="underbanner clearboth"></div>';
634 print
'<table class="border tableforfield centpercent">';
637 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
638 if ($projectstat->public) {
639 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
640 print $langs->trans(
'SharedProject');
642 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
643 print $langs->trans(
'PrivateProject');
656 print
"ErrorRecordNotFound";
660$arrayofselected = is_array($toselect) ? $toselect : array();
664 $param .=
'&mode='.urlencode($mode);
666if (!empty($contextpage) && $contextpage != $_SERVER[
"PHP_SELF"]) {
667 $param .=
'&contextpage='.urlencode($contextpage);
669if ($limit > 0 && $limit !=
$conf->liste_limit) {
670 $param .=
'&limit='.((int) $limit);
672if ($optioncss !=
'') {
673 $param .=
'&optioncss='.urlencode($optioncss);
675foreach ($search as $key => $val) {
676 if (is_array($search[$key])) {
677 foreach ($search[$key] as $skey) {
679 $param .=
'&search_'.$key.
'[]='.urlencode($skey);
682 } elseif (preg_match(
'/(_dtstart|_dtend)$/', $key) && !empty($val)) {
683 $param .=
'&search_'.$key.
'month='.(
GETPOSTINT(
'search_'.$key.
'month'));
684 $param .=
'&search_'.$key.
'day='.(
GETPOSTINT(
'search_'.$key.
'day'));
685 $param .=
'&search_'.$key.
'year='.(
GETPOSTINT(
'search_'.$key.
'year'));
686 } elseif ($search[$key] !=
'') {
687 $param .=
'&search_'.$key.
'='.urlencode($search[$key]);
691include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_param.tpl.php';
693$parameters = array(
'param' => &$param);
694$reshook = $hookmanager->executeHooks(
'printFieldListSearchParam', $parameters, $object, $action);
695$param .= $hookmanager->resPrint;
697 $param .=
'&socid='.urlencode((
string) ($socid));
699if ($search_societe) {
700 $param .=
'&search_societe='.urlencode($search_societe);
703 $param .=
'&projectid='.urlencode((
string) ($projectid));
705if ($contractid > 0) {
706 $param .=
'&contractid='.urlencode((
string) ($contractid));
708if ($search_date_start) {
710 $param .=
'&search_date_startday='.((int) $tmparray[
'mday']);
711 $param .=
'&search_date_startmonth='.((int) $tmparray[
'mon']);
712 $param .=
'&search_date_startyear='.((int) $tmparray[
'year']);
714if ($search_date_end) {
716 $param .=
'&search_date_endday='.((int) $tmparray[
'mday']);
717 $param .=
'&search_date_endmonth='.((int) $tmparray[
'mon']);
718 $param .=
'&search_date_endyear='.((int) $tmparray[
'year']);
720if ($search_dateread_start) {
722 $param .=
'&search_dateread_startday='.((int) $tmparray[
'mday']);
723 $param .=
'&search_dateread_startmonth='.((int) $tmparray[
'mon']);
724 $param .=
'&search_dateread_startyear='.((int) $tmparray[
'year']);
726if ($search_dateread_end) {
728 $param .=
'&search_dateread_endday='.((int) $tmparray[
'mday']);
729 $param .=
'&search_dateread_endmonth='.((int) $tmparray[
'mon']);
730 $param .=
'&search_dateread_endyear='.((int) $tmparray[
'year']);
732if ($search_dateclose_start) {
734 $param .=
'&search_dateclose_startday='.((int) $tmparray[
'mday']);
735 $param .=
'&search_dateclose_startmonth='.((int) $tmparray[
'mon']);
736 $param .=
'&search_dateclose_startyear='.((int) $tmparray[
'year']);
738if ($search_dateclose_end) {
740 $param .=
'&search_date_endday='.((int) $tmparray[
'mday']);
741 $param .=
'&search_date_endmonth='.((int) $tmparray[
'mon']);
742 $param .=
'&search_date_endyear='.((int) $tmparray[
'year']);
745$arrayofmassactions = array(
749if ($permissiontoadd) {
750 $arrayofmassactions[
'presendonclose'] =
img_picto(
'',
'close_title',
'class="pictofixedwidth"').$langs->trans(
"Close");
751 $arrayofmassactions[
'reopen'] =
img_picto(
'',
'folder-open',
'class="pictofixedwidth"').$langs->trans(
"ReOpen");
753if ($permissiontodelete) {
754 $arrayofmassactions[
'predelete'] =
img_picto(
'',
'delete',
'class="pictofixedwidth"').$langs->trans(
"Delete");
756if (
GETPOSTINT(
'nomassaction') || in_array($massaction, array(
'presend',
'predelete'))) {
757 $arrayofmassactions = array();
759$massactionbutton = $form->selectMassAction(
'', $arrayofmassactions);
761print
'<form method="POST" id="searchFormList" action="'.$_SERVER[
"PHP_SELF"].
'">'.
"\n";
762if ($optioncss !=
'') {
763 print
'<input type="hidden" name="optioncss" value="'.$optioncss.
'">';
765print
'<input type="hidden" name="token" value="'.newToken().
'">';
766print
'<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
767print
'<input type="hidden" name="action" value="list">';
768print
'<input type="hidden" name="sortfield" value="'.$sortfield.
'">';
769print
'<input type="hidden" name="sortorder" value="'.$sortorder.
'">';
770print
'<input type="hidden" name="contextpage" value="'.$contextpage.
'">';
771print
'<input type="hidden" name="page_y" value="">';
772print
'<input type="hidden" name="mode" value="'.$mode.
'" >';
775 print
'<input type="hidden" name="socid" value="'.$socid.
'" >';
778 print
'<input type="hidden" name="projectid" value="'.$projectid.
'" >';
781$url = DOL_URL_ROOT.
'/ticket/card.php?action=create&mode=init'.($socid ?
'&socid='.$socid :
'').($projectid ?
'&origin=projet_project&originid='.$projectid :
'');
783 $url .=
'&socid='.$socid;
786$newcardbutton .= dolGetButtonTitle($langs->trans(
'ViewList'),
'',
'fa fa-bars imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=common'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ((empty($mode) || $mode ==
'common') ? 2 : 1), array(
'morecss' =>
'reposition'));
787$newcardbutton .= dolGetButtonTitle($langs->trans(
'ViewKanban'),
'',
'fa fa-th-list imgforviewmode', $_SERVER[
"PHP_SELF"].
'?mode=kanban'.preg_replace(
'/(&|\?)*mode=[^&]+/',
'', $param),
'', ($mode ==
'kanban' ? 2 : 1), array(
'morecss' =>
'reposition'));
788$newcardbutton .= dolGetButtonTitle($langs->trans(
'Statistics'),
'',
'fa fa-chart-bar imgforviewmode', DOL_URL_ROOT.
'/ticket/stats/index.php?mode=statistics&objecttype=ticket@ticket'.preg_replace(
'/(&|\?)*(mode|groupby)=[^&]+/',
'', $param),
'', ($mode ==
'statistics' ? 2 : 1), array(
'morecss' =>
'reposition'));
789$newcardbutton .= dolGetButtonTitleSeparator();
790$newcardbutton .= dolGetButtonTitle($langs->trans(
'NewTicket'),
'',
'fa fa-plus-circle', $url,
'', $user->hasRight(
'ticket',
'write'));
797print_barre_liste($langs->trans(
'Tickets'), $page, $_SERVER[
"PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $newcardbutton,
'', $limit, 0, 0, 1);
799if ($mode ==
'mine') {
800 print
'<div class="opacitymedium">'.$langs->trans(
'TicketAssignedToMeInfos').
'</div><br>';
803$topicmail =
"SendTicketRef";
804$modelmail =
"ticket";
806$trackid =
'tic'.$object->id;
807include DOL_DOCUMENT_ROOT.
'/core/tpl/massactions_pre.tpl.php';
810if ($massaction ==
'presendonclose') {
811 $hidden_form = array([
813 "name" =>
"massaction",
817 print $form->formconfirm($_SERVER[
"PHP_SELF"], $langs->trans(
"ConfirmMassTicketClosingSendEmail"), $langs->trans(
"ConfirmMassTicketClosingSendEmailQuestion"),
'confirm_send_close', $hidden_form, $selectedchoice, 0, 200, 500, 1);
822 foreach ($fieldstosearchall as $key => $val) {
823 $fieldstosearchall[$key] = $langs->trans($val);
824 $setupstring .= $key.
"=".$val.
";";
826 print
'<!-- Search done like if TICKET_QUICKSEARCH_ON_FIELDS = '.$setupstring.
' -->'.
"\n";
827 print
'<div class="divsearchfieldfilter">'.$langs->trans(
"FilterOnInto", $search_all).implode(
', ', $fieldstosearchall).
'</div>'.
"\n";
835$parameters = array();
836$reshook = $hookmanager->executeHooks(
'printFieldPreListTitle', $parameters, $object, $action);
837if (empty($reshook)) {
838 $moreforfilter .= $hookmanager->resPrint;
840 $moreforfilter = $hookmanager->resPrint;
843if (!empty($moreforfilter)) {
844 print
'<div class="liste_titre liste_titre_bydiv centpercent">';
845 print $moreforfilter;
849$varpage = empty($contextpage) ? $_SERVER[
"PHP_SELF"] : $contextpage;
850$htmlofselectarray = $form->multiSelectArrayWithCheckbox(
'selectedfields', $arrayfields, $varpage,
$conf->main_checkbox_left_column);
851$selectedfields = ($mode !=
'kanban' ? $htmlofselectarray :
'');
852$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons(
'checkforselect', 1) :
'');
854print
'<div class="div-table-responsive">';
855print
'<div class="div-table-responsive-inside">';
856print
'<table class="tagtable noborder nobottomiftotal liste'.($moreforfilter ?
" listwithfilterbefore" :
"").
'">'.
"\n";
861print
'<tr class="liste_titre_filter">';
863if (
$conf->main_checkbox_left_column) {
864 print
'<td class="liste_titre maxwidthsearch center">';
865 $searchpicto = $form->showFilterButtons(
'left');
869foreach (
$object->fields as $key => $val) {
870 $searchkey = empty($search[$key]) ?
'' : $search[$key];
871 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
872 if ($key ==
'fk_statut') {
873 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
874 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
875 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
876 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
877 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
878 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'id',
'rowid',
'ref',
'status')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
879 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
881 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
882 if ($key ==
'progress') {
883 print
'<td class="liste_titre right'.($cssforfield ?
' '.$cssforfield :
'').
'">';
884 print
'<input type="text" class="flat maxwidth50" name="search_'.$key.
'" value="'.
dol_escape_htmltag(empty($search[$key]) ?
'' : $search[$key]).
'">';
886 } elseif ($key ==
'type_code') {
887 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
888 $formTicket->selectTypesTickets(empty($search[$key]) ?
'' : $search[$key],
'search_'.$key,
'', 2, 1, 1, 0, (!empty($val[
'css']) ? $val[
'css'] :
'maxwidth150'), 1);
890 } elseif ($key ==
'category_code') {
891 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
892 $formTicket->selectGroupTickets(
dol_escape_htmltag(empty($search[$key]) ?
'' : $search[$key]),
'search_'.$key,
'', 2, 1, 1, 0, (!empty($val[
'css']) ? $val[
'css'] :
'maxwidth150'));
894 } elseif ($key ==
'severity_code') {
895 print
'<td class="liste_titre center'.($cssforfield ?
' '.$cssforfield :
'').
'">';
896 $formTicket->selectSeveritiesTickets(
dol_escape_htmltag(empty($search[$key]) ?
'' : $search[$key]),
'search_'.$key,
'', 2, 1, 1, 0, (!empty($val[
'css']) ? $val[
'css'] :
'maxwidth150'));
898 } elseif ($key ==
'fk_user_assign' || $key ==
'fk_user_create') {
899 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
900 print $form->select_dolusers((empty($search[$key]) ?
'' : $search[$key]),
'search_'.$key, 1, null, 0,
'',
'',
'0', 0, 0,
'', 0,
'', (!empty($val[
'css']) ? $val[
'css'] :
'maxwidth100'));
902 } elseif ($key ==
'fk_statut') {
903 $arrayofstatus = array();
904 $langs->load(
"ticket");
905 $arrayofstatus[
'openall'] = array(
'id' =>
'openall',
'labelhtml' =>
'<b>-- '.$langs->trans(
'OpenAll').
'</b>',
'label' =>
'-- '.$langs->trans(
'OpenAll'));
906 foreach (
$object->labelStatusShort as $key2 => $val2) {
907 if ($key2 == Ticket::STATUS_CLOSED) {
908 $arrayofstatus[
'closeall'] = array(
'id' =>
'closeall',
'labelhtml' =>
'<b>-- '.$langs->trans(
'ClosedAll').
'</b>',
'label' =>
'-- '.$langs->trans(
'ClosedAll'));
910 $arrayofstatus[$key2] = array(
'id' => $key2,
'labelhtml' => $val2,
'label' => $val2);
912 print
'<td class="liste_titre center parentonrightofpage'.($cssforfield ?
' '.$cssforfield :
'').
'">';
916 $selectedarray =
null;
917 if (!empty($search[$key])) {
918 if (is_array($search[$key])) {
919 $selectedarray = array_values($search[$key]);
921 $selectedarray = array($search[$key]);
924 print
Form::multiselectarray(
'search_fk_statut', $arrayofstatus, $selectedarray, 0, 0,
'search_status width150 onrightofpage', 1, 0,
'',
'',
'');
926 } elseif ($key ==
"fk_soc") {
927 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'"><input type="text" class="flat maxwidth75" name="search_societe" value="'.
dol_escape_htmltag($search_societe).
'"></td>';
928 } elseif ($key ==
"datec" || $key ==
'date_read' || $key ==
'date_close') {
929 print
'<td class="liste_titre center">';
930 print
'<div class="nowrap">';
933 print $form->selectDate($search_date_start ?: -1,
'search_date_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
936 print $form->selectDate($search_dateread_start ?: -1,
'search_dateread_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
939 print $form->selectDate($search_dateclose_start ?: -1,
'search_dateclose_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"From"));
942 print
'<div class="nowrap">';
945 print $form->selectDate($search_date_end ?: -1,
'search_date_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
948 print $form->selectDate($search_dateread_end ?: -1,
'search_dateread_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
951 print $form->selectDate($search_dateclose_end ?: -1,
'search_dateclose_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
"to"));
956 print
'<td class="liste_titre'.($cssforfield ?
' '.$cssforfield :
'').
'">';
957 if (!empty($val[
'arrayofkeyval']) && is_array($val[
'arrayofkeyval'])) {
958 print $form->selectarray(
'search_'.$key, $val[
'arrayofkeyval'], $search[$key], $val[
'notnull'], 0, 0,
'', 1, 0, 0,
'',
'maxwidth100', 1);
959 } elseif (strpos($val[
'type'],
'integer:') === 0) {
960 print
$object->showInputField($val, $key, !empty($search[$key]) ? $search[$key] :
"",
'',
'',
'search_',
'maxwidth150', 1);
961 } elseif (!preg_match(
'/^(date|timestamp)/', $val[
'type'])) {
962 print
'<input type="text" class="flat maxwidth75" name="search_'.$key.
'" value="'.
dol_escape_htmltag(empty($search[$key]) ?
'' : $search[$key]).
'">';
969include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_input.tpl.php';
972$parameters = array(
'arrayfields' => $arrayfields);
973$reshook = $hookmanager->executeHooks(
'printFieldListOption', $parameters, $object, $action);
974print $hookmanager->resPrint;
976if (!
$conf->main_checkbox_left_column) {
977 print
'<td class="liste_titre center maxwidthsearch">';
978 $searchpicto = $form->showFilterButtons();
989print
'<tr class="liste_titre">';
990if (
$conf->main_checkbox_left_column) {
991 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
994foreach (
$object->fields as $key => $val) {
995 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
996 if ($key ==
'fk_statut' || $key ==
'severity_code') {
997 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
998 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
999 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1000 } elseif (in_array($val[
'type'], array(
'timestamp'))) {
1001 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
1002 } elseif (in_array($val[
'type'], array(
'double(24,8)',
'double(6,3)',
'integer',
'real',
'price')) && !in_array($key, array(
'id',
'rowid',
'ref',
'status')) && $val[
'label'] !=
'TechnicalID' && empty($val[
'arrayofkeyval'])) {
1003 $cssforfield .= ($cssforfield ?
' ' :
'').
'right';
1005 $cssforfield = preg_replace(
'/small\s*/',
'', $cssforfield);
1006 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1007 print
getTitleFieldOfList($arrayfields[
't.'.$key][
'label'], 0, $_SERVER[
'PHP_SELF'],
't.'.$key,
'', $param, ($cssforfield ?
'class="'.$cssforfield.
'"' :
''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.
' ' :
''), 0, (empty($val[
'helplist']) ?
'' : $val[
'helplist'])).
"\n";
1012include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_search_title.tpl.php';
1014$parameters = array(
'arrayfields' => $arrayfields,
'param' => $param,
'sortfield' => $sortfield,
'sortorder' => $sortorder,
'totalarray' => &
$totalarray);
1015$reshook = $hookmanager->executeHooks(
'printFieldListTitle', $parameters, $object, $action);
1016print $hookmanager->resPrint;
1017if (!
$conf->main_checkbox_left_column) {
1018 print
getTitleFieldOfList(($mode !=
'kanban' ? $selectedfields :
''), 0, $_SERVER[
"PHP_SELF"],
'',
'',
'',
'', $sortfield, $sortorder,
'center maxwidthsearch ').
"\n";
1025$needToFetchEachLine = 0;
1026if (isset($extrafields->attributes[
$object->table_element][
'computed']) && is_array($extrafields->attributes[
$object->table_element][
'computed']) && count($extrafields->attributes[
$object->table_element][
'computed']) > 0) {
1027 foreach ($extrafields->attributes[
$object->table_element][
'computed'] as $key => $val) {
1028 if (!is_null($val) && preg_match(
'/\$object/', $val)) {
1029 $needToFetchEachLine++;
1041$imaxinloop = ($limit ? min($num, $limit) : $num);
1042$cacheofoutputfield = array();
1043while ($i < $imaxinloop) {
1044 $obj =
$db->fetch_object($resql);
1050 $object->setVarsFromFetchObj($obj);
1051 $object->type_code = $obj->type_code;
1054 if ($mode ==
'kanban') {
1056 print
'<tr class="trkanban"><td colspan="'.$savnbfield.
'">';
1057 print
'<div class="box-flex-container kanban">';
1062 $arraydata = array();
1063 if ($obj->fk_user_assign > 0) {
1064 $user_temp->fetch($obj->fk_user_assign);
1065 $arraydata[
'user_assignment'] = $user_temp->getNomUrl(-3);
1067 $arraydata[
'selected'] = in_array(
$object->id, $arrayofselected);
1070 print
$object->getKanbanView(
'', $arraydata);
1071 if ($i == ($imaxinloop - 1)) {
1078 print
'<tr data-rowid="'.$object->id.
'" class="oddeven row-with-select">';
1081 if (
$conf->main_checkbox_left_column) {
1082 print
'<td class="nowrap center">';
1083 if ($massactionbutton || $massaction) {
1085 if (in_array(
$object->id, $arrayofselected)) {
1088 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1096 foreach (
$object->fields as $key => $val) {
1097 $cssforfield = (empty($val[
'csslist']) ? (empty($val[
'css']) ?
'' : $val[
'css']) : $val[
'csslist']);
1098 if (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1099 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1102 if (in_array($val[
'type'], array(
'timestamp'))) {
1103 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowrap';
1105 if (in_array($key, array(
'ref',
'fk_project'))) {
1106 $cssforfield .= ($cssforfield ?
' ' :
'').
'nowraponall';
1108 if (in_array($key, array(
'subject'))) {
1109 $cssforfield =
'minwidth200 tdoverflowbydiv';
1112 if ($key ==
'fk_statut' || $key ==
'severity_code') {
1113 $cssforfield .= ($cssforfield ?
' ' :
'').
'center';
1115 if (!empty($arrayfields[
't.'.$key][
'checked'])) {
1116 print
'<td'.($cssforfield ?
' class="'.$cssforfield.((preg_match(
'/tdoverflow/', $cssforfield) && !in_array($val[
'type'], array(
'ip',
'url')) && !is_numeric(
$object->$key)) ?
' classfortooltip' :
'').
'"' :
'');
1117 if (preg_match(
'/tdoverflow/', $cssforfield) && !in_array($val[
'type'], array(
'ip',
'url')) && !is_numeric(
$object->$key)) {
1118 print
' title="'.dolPrintHTMLForAttribute((
string)
$object->$key).
'"';
1121 if ($key ==
'fk_statut') {
1122 print
$object->getLibStatut(5);
1123 } elseif ($key ==
'subject') {
1124 print
'<div class="small twolinesmax lineheightsmall minwidth150 maxwidth250 classfortooltip">';
1127 } elseif ($key ==
'type_code') {
1128 $s = $langs->getLabelFromKey(
$db,
'TicketTypeShort'.
$object->type_code,
'c_ticket_type',
'code',
'label',
$object->type_code);
1129 print
'<span title="'.dolPrintHTMLForAttribute($s).
'">';
1132 } elseif ($key ==
'category_code') {
1133 $s = $langs->getLabelFromKey(
$db,
'TicketCategoryShort'.
$object->category_code,
'c_ticket_category',
'code',
'label',
$object->category_code);
1134 print
'<span title="'.dolPrintHTMLForAttribute($s).
'">';
1137 } elseif ($key ==
'severity_code') {
1138 $s = $langs->getLabelFromKey(
$db,
'TicketSeverityShort'.
$object->severity_code,
'c_ticket_severity',
'code',
'label',
$object->severity_code);
1139 print
'<span title="'.dolPrintHTMLForAttribute($s).
'">';
1142 } elseif ($key ==
'tms') {
1144 } elseif ($key ==
'fk_user_create') {
1145 if (
$object->fk_user_create > 0) {
1146 if (isset(
$conf->cache[
'user'][
$object->fk_user_create])) {
1147 $user_temp =
$conf->cache[
'user'][
$object->fk_user_create];
1150 $user_temp->fetch(
$object->fk_user_create);
1151 $conf->cache[
'user'][
$object->fk_user_create] = $user_temp;
1153 print $user_temp->getNomUrl(-1);
1155 } elseif ($key ==
'fk_user_assign') {
1156 if (
$object->fk_user_assign > 0) {
1157 if (isset(
$conf->cache[
'user'][
$object->fk_user_assign])) {
1158 $user_temp =
$conf->cache[
'user'][
$object->fk_user_assign];
1161 $user_temp->fetch(
$object->fk_user_assign);
1162 $conf->cache[
'user'][
$object->fk_user_assign] = $user_temp;
1164 print $user_temp->getNomUrl(-1);
1166 } elseif (in_array($val[
'type'], array(
'date',
'datetime',
'timestamp'))) {
1167 print
$object->showOutputField($val, $key,
$db->jdate($obj->$key),
'');
1168 } elseif ($key ==
'ref') {
1169 print
$object->showOutputField($val, $key, $obj->$key,
'');
1172 $is_open = (
$object->status != Ticket::STATUS_CLOSED &&
$object->status != Ticket::STATUS_CANCELED);
1174 if ($is_open && $should_show_warning) {
1175 $date_last_msg_sent = (int)
$object->date_last_msg_sent;
1176 $hour_diff = ($now - $date_last_msg_sent) / 3600 ;
1178 if (
getDolGlobalString(
'TICKET_DELAY_BEFORE_FIRST_RESPONSE') && $date_last_msg_sent == 0) {
1179 $creation_date =
$object->datec;
1180 $hour_diff_creation = ($now - $creation_date) / 3600 ;
1181 if ($hour_diff_creation >
getDolGlobalInt(
'TICKET_DELAY_BEFORE_FIRST_RESPONSE')) {
1182 print
" " .
img_picto($langs->trans(
'Late') .
' : ' . $langs->trans(
'TicketsDelayForFirstResponseTooLong',
getDolGlobalString(
'TICKET_DELAY_BEFORE_FIRST_RESPONSE')),
'warning',
'style="color: red;"', 0, 0, 0,
'',
'');
1185 print
" " .
img_picto($langs->trans(
'Late') .
' : ' . $langs->trans(
'TicketsDelayFromLastResponseTooLong',
getDolGlobalString(
'TICKET_DELAY_SINCE_LAST_RESPONSE')),
'warning');
1189 $tmp = explode(
':', $val[
'type']);
1190 if ($tmp[0] ==
'integer' && !empty($tmp[1]) && class_exists($tmp[1])) {
1193 if ($key && $obj->$key && $val[
'type'] && array_key_exists($key.
'-'.$obj->$key.
'-'.$val[
'type'], $cacheofoutputfield)) {
1194 $result = $cacheofoutputfield[$key.
'-'.$obj->$key.
'-'.$val[
'type']];
1196 $result =
$object->showOutputField($val, $key, $obj->$key,
'');
1197 $cacheofoutputfield[$key.
'-'.$obj->$key.
'-'.$val[
'type']] = $result;
1200 $result =
$object->showOutputField($val, $key, $obj->$key,
'');
1209 if (!empty($val[
'isameasure']) && $val[
'isameasure'] == 1) {
1224 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_list_print_fields.tpl.php';
1226 $parameters = array(
'arrayfields' => $arrayfields,
'object' => $object,
'obj' => $obj,
'i' => $i,
'totalarray' => &
$totalarray);
1227 $reshook = $hookmanager->executeHooks(
'printFieldListValue', $parameters, $object, $action);
1228 print $hookmanager->resPrint;
1231 if (!
$conf->main_checkbox_left_column) {
1232 print
'<td class="nowrap center">';
1233 if ($massactionbutton || $massaction) {
1235 if (in_array(
$object->id, $arrayofselected)) {
1238 print
'<input id="cb'.$object->id.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.
$object->id.
'"'.($selected ?
' checked="checked"' :
'').
'>';
1253include DOL_DOCUMENT_ROOT.
'/core/tpl/list_print_total.tpl.php';
1259 foreach ($arrayfields as $key => $val) {
1260 if (!empty($val[
'checked'])) {
1264 print
'<tr><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"NoRecordFound").
'</span></td></tr>';
1270$parameters = array(
'arrayfields' => $arrayfields,
'sql' => $sql);
1271$reshook = $hookmanager->executeHooks(
'printFieldListFooter', $parameters, $object);
1272print $hookmanager->resPrint;
1274print
'</table>'.
"\n";
1278print
'</form>'.
"\n";
1282if (in_array(
'builddoc', array_keys($arrayofmassactions)) && ($nbtotalofrecords ===
'' || $nbtotalofrecords)) {
1283 $hidegeneratedfilelistifempty = 1;
1284 if ($massaction ==
'builddoc' || $action ==
'remove_file' || $show_files) {
1285 $hidegeneratedfilelistifempty = 0;
1288 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
1292 $urlsource = $_SERVER[
'PHP_SELF'].
'?sortfield='.$sortfield.
'&sortorder='.$sortorder;
1293 $urlsource .= str_replace(
'&',
'&', $param);
1295 $filedir = $diroutputmassaction;
1296 $genallowed = $permissiontoread;
1297 $delallowed = $permissiontoadd;
1299 print $formfile->showdocuments(
'massfilesarea_ticket',
'', $filedir, $urlsource, 0, $delallowed,
'', 1, 1, 0, 48, 1, $param, $title,
'',
'',
'',
null, $hidegeneratedfilelistifempty);
$id
Support class for third parties, contacts, members, users or resources.
if(! $sortfield) if(! $sortorder) $object
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 projects.
Class to manage third parties objects (customers, suppliers, prospects...)
const STATUS_NOT_READ
Status.
Class to manage Dolibarr users.
societe_prepare_head(Societe $object, $subtabs='')
Return array of tabs to used on pages for third parties cards.
dol_now($mode='gmt')
Return date for now.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
print_barre_liste($title, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='generic', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $selectlimitsuffix=0, $hidenavigation=0, $pagenavastextinput=0, $morehtmlrightbeforearrow='')
Print a title with navigation controls for pagination.
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, $moreallowedtags=array())
Return a string (that can be on several lines) ready to be output on a HTML page.
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.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
dol_eval($s, $returnvalue=1, $hideerrors=1, $onlysimplestring='1')
Replace eval function to add more security.
GETPOSTISARRAY($paramname, $method=0)
Return true if the parameter $paramname is submit from a POST OR GET as an array.
natural_search($fields, $value, $mode=0, $nofirstand=0, $sqltoadd='')
Generate natural SQL search string for a criteria (this criteria can be tested on one or several fiel...
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by the value of a given key, which produces ascending (default) or descending out...
getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $moreparam="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $disablesortlink=0, $tooltip='', $forcenowrapcolumntitle=0)
Get title line of an array.
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).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
dol_getdate($timestamp, $fast=false, $forcetimezone='')
Return an array with locale date info.
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...
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
Class to generate the form for creating a new ticket.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.